• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Bigmems
      • Builtins
      • Execloader
      • Aleo
      • Solidity
        • Values
          • Integer-values
            • Integer-operations
            • Bit-size
            • Uint
            • Int
              • Intp
              • Int-fix
              • Make-int
              • Int-equiv
              • Change-int
              • Int->value
                • Int->size
            • Boolean-values
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Int

    Int->value

    Get the value field from a int.

    Signature
    (int->value x) → value
    Arguments
    x — Guard (intp x).
    Returns
    value — Type (integerp value).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: int->value$inline

    (defun int->value$inline (x)
      (declare (xargs :guard (intp x)))
      (declare (xargs :guard t))
      (let ((__function__ 'int->value))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and t x))
                  (size (bit-size-fix (std::da-nth 0 (cdr x))))
                  (value (ifix (std::da-nth 1 (cdr x)))))
               (signed-byte-fix size value))
             :exec (std::da-nth 1 (cdr x)))))

    Theorem: integerp-of-int->value

    (defthm integerp-of-int->value
      (b* ((value (int->value$inline x)))
        (integerp value))
      :rule-classes :rewrite)

    Theorem: int->value$inline-of-int-fix-x

    (defthm int->value$inline-of-int-fix-x
      (equal (int->value$inline (int-fix x))
             (int->value$inline x)))

    Theorem: int->value$inline-int-equiv-congruence-on-x

    (defthm int->value$inline-int-equiv-congruence-on-x
      (implies (int-equiv x x-equiv)
               (equal (int->value$inline x)
                      (int->value$inline x-equiv)))
      :rule-classes :congruence)