• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Types
            • Integer-formats-definitions
            • Computation-states
            • Portable-ascii-identifiers
            • Values
              • Pointer
              • Member-types-of-member-values
              • Expr-value
              • Member-value-list->value-list
              • Member-value-list->name-list
              • Type-list-of-value-list
              • Type-of-value
              • Stmt-value
              • Value-option
              • Expr-value-option
              • Init-value
              • Value-result
              • Type-of-value-option
              • Value-list-result
              • Stmt-value-result
              • Member-value-list-result
              • Init-value-result
              • Expr-value-result
              • Expr-value-option-result
              • Value-option-result
              • Signed/unsigned-byte-p-of-integer-values
              • Bounds-of-integer-values
              • Value-promoted-arithmeticp
              • Type-option-of-stmt-value
              • Member-type-of-member-value
              • Init-type-of-init-value
              • Value-unsigned-integerp
              • Value-signed-integerp
              • Value-integerp
              • Value-arithmeticp
              • Value-scalarp
              • Value-realp
              • Values/membervalues
                • Value
                  • Valuep
                  • Value-case
                  • Value-struct
                  • Value-equiv
                  • Value-array
                  • Value-kind
                  • Value-pointer
                  • Value-ushort
                  • Value-ulong
                  • Value-ullong
                  • Value-uint
                  • Value-uchar
                  • Value-sshort
                  • Value-slong
                  • Value-sllong
                  • Value-sint
                    • Value-sint->get
                      • Make-value-sint
                      • Change-value-sint
                    • Value-schar
                    • Value-fix
                    • Value-count
                  • Member-value
                  • Value-list
                  • Member-value-list
              • Integer-operations
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Value-sint

    Value-sint->get

    Get the get field from a value-sint.

    Signature
    (value-sint->get x) → get
    Arguments
    x — Guard (valuep x).
    Returns
    get — Type (sint-integerp get).

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

    Definitions and Theorems

    Function: value-sint->get$inline

    (defun value-sint->get$inline (x)
      (declare (xargs :guard (valuep x)))
      (declare (xargs :guard (equal (value-kind x) :sint)))
      (mbe :logic
           (b* ((x (and (equal (value-kind x) :sint) x)))
             (sint-integer-fix (std::da-nth 0 (cdr x))))
           :exec (std::da-nth 0 (cdr x))))

    Theorem: sint-integerp-of-value-sint->get

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

    Theorem: value-sint->get$inline-of-value-fix-x

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

    Theorem: value-sint->get$inline-value-equiv-congruence-on-x

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

    Theorem: value-sint->get-when-wrong-kind

    (defthm value-sint->get-when-wrong-kind
      (implies (not (equal (value-kind x) :sint))
               (equal (value-sint->get x)
                      (sint-integer-fix nil))))