• 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
              • Uintp
              • Uint-fix
              • Uint-equiv
              • Make-uint
              • Change-uint
              • Uint->value
                • Uint->size
              • Int
            • Boolean-values
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Uint

    Uint->value

    Get the value field from a uint.

    Signature
    (uint->value x) → value
    Arguments
    x — Guard (uintp x).
    Returns
    value — Type (natp value).

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

    Definitions and Theorems

    Function: uint->value$inline

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

    Theorem: natp-of-uint->value

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

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

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

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

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