• 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
                • Stmt-value-result-fix
                • Stmt-value-result-equiv
                • Stmt-value-result-ok
                • Stmt-value-result-err
                  • Stmt-value-result-err->get
                    • Make-stmt-value-result-err
                    • Change-stmt-value-result-err
                  • Stmt-value-resultp
                  • Stmt-value-result-kind
                • 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
              • 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
    • Stmt-value-result-err

    Stmt-value-result-err->get

    Get the get field from a stmt-value-result-err.

    Signature
    (stmt-value-result-err->get acl2::x) → get
    Arguments
    acl2::x — Guard (stmt-value-resultp acl2::x).
    Returns
    get — Type (errorp get).

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

    Definitions and Theorems

    Function: stmt-value-result-err->get$inline

    (defun stmt-value-result-err->get$inline (acl2::x)
      (declare (xargs :guard (stmt-value-resultp acl2::x)))
      (declare (xargs :guard (equal (stmt-value-result-kind acl2::x)
                                    :err)))
      (mbe :logic
           (b* ((acl2::x (and (equal (stmt-value-result-kind acl2::x)
                                     :err)
                              acl2::x)))
             (error-fix acl2::x))
           :exec acl2::x))

    Theorem: errorp-of-stmt-value-result-err->get

    (defthm errorp-of-stmt-value-result-err->get
      (b* ((get (stmt-value-result-err->get$inline acl2::x)))
        (errorp get))
      :rule-classes :rewrite)

    Theorem: stmt-value-result-err->get$inline-of-stmt-value-result-fix-x

    (defthm stmt-value-result-err->get$inline-of-stmt-value-result-fix-x
      (equal (stmt-value-result-err->get$inline
                  (stmt-value-result-fix acl2::x))
             (stmt-value-result-err->get$inline acl2::x)))

    Theorem: stmt-value-result-err->get$inline-stmt-value-result-equiv-congruence-on-x

    (defthm
     stmt-value-result-err->get$inline-stmt-value-result-equiv-congruence-on-x
     (implies (stmt-value-result-equiv acl2::x x-equiv)
              (equal (stmt-value-result-err->get$inline acl2::x)
                     (stmt-value-result-err->get$inline x-equiv)))
     :rule-classes :congruence)

    Theorem: stmt-value-result-err->get-when-wrong-kind

    (defthm stmt-value-result-err->get-when-wrong-kind
      (implies (not (equal (stmt-value-result-kind acl2::x)
                           :err))
               (equal (stmt-value-result-err->get acl2::x)
                      (error-fix nil))))