• 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
            • Integer-operations
            • Object-designators
            • Operations
            • Errors
              • Error
              • Defresult
              • Boolean-result
                • Boolean-result-fix
                • Boolean-result-equiv
                • Boolean-result-ok
                • Boolean-result-err
                  • Boolean-result-err->get
                    • Make-boolean-result-err
                    • Change-boolean-result-err
                  • Boolean-resultp
                  • Boolean-result-kind
                • Defresult-fn
              • 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
    • Boolean-result-err

    Boolean-result-err->get

    Get the get field from a boolean-result-err.

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

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

    Definitions and Theorems

    Function: boolean-result-err->get$inline

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

    Theorem: errorp-of-boolean-result-err->get

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

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

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

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

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

    Theorem: boolean-result-err->get-when-wrong-kind

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