• 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
          • Syntax-for-tools
          • Atc
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
              • Objdesign
              • Address
                • Address-fix
                • Address-equiv
                • Make-address
                • Change-address
                • Address->number
                  • Addressp
                • Object-disjointp
                • Objdesign-option
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Bytes
              • Keywords
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • 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
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Address

    Address->number

    Get the number field from a address.

    Signature
    (address->number x) → number
    Arguments
    x — Guard (addressp x).
    Returns
    number — Type (natp number).

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

    Definitions and Theorems

    Function: address->number$inline

    (defun address->number$inline (x)
      (declare (xargs :guard (addressp x)))
      (declare (xargs :guard t))
      (let ((__function__ 'address->number))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and t x)))
               (nfix (cdr (std::da-nth 0 (cdr x)))))
             :exec (cdr (std::da-nth 0 (cdr x))))))

    Theorem: natp-of-address->number

    (defthm natp-of-address->number
      (b* ((number (address->number$inline x)))
        (natp number))
      :rule-classes :rewrite)

    Theorem: address->number$inline-of-address-fix-x

    (defthm address->number$inline-of-address-fix-x
      (equal (address->number$inline (address-fix x))
             (address->number$inline x)))

    Theorem: address->number$inline-address-equiv-congruence-on-x

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