• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Lists-light
        • Axe
        • Builtins
        • 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
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • 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)