• 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
          • Defbyte
          • Defresult
            • Reserr
            • Reserr-option
              • Reserr-optionp
              • Reserr-option-fix
              • Reserr-option-case
              • Reserr-option-equiv
              • Reserr-option-some
                • Reserr-option-some->val
                  • Make-reserr-option-some
                  • Change-reserr-option-some
                • Reserr-option-none
              • Patbind-ok
              • Reserrf-push
              • Defresult-macro-definition
              • Reserrf
              • Patbind-okf
            • Fold
            • Specific-types
            • Defsubtype
            • Defset
            • Defflatsum
            • Deflist-of-len
            • Pos-list
            • Defomap
            • Defbytelist
            • Defbyte-standard-instances
            • Deffixtype-alias
            • Defbytelist-standard-instances
            • Defunit
            • Byte-list
            • Database
            • Byte
            • String-option
            • Pos-option
            • Nibble
            • Nat-option
            • Ubyte32-option
            • Byte-list20
            • Byte-list32
            • Byte-list64
            • Pseudo-event-form
            • Natoption/natoptionlist
            • Nati
            • Character-list
            • Nat/natlist
            • Maybe-string
            • Nibble-list
            • Natoption/natoptionlist-result
            • Nat/natlist-result
            • Nat-option-list-result
            • Set
            • String-result
            • String-list-result
            • Nat-result
            • Nat-option-result
            • Nat-list-result
            • Maybe-string-result
            • Integer-result
            • Character-result
            • Character-list-result
            • Boolean-result
            • Map
            • Dependencies
            • Bag
            • Pos-set
            • Hex-digit-char-list
            • Dec-digit-char-list
            • Pseudo-event-form-list
            • Nat-option-list
            • Character-any-map
            • Any-nat-map
            • Symbol-set
            • String-set
            • Nat-set
            • Character-set
            • Oct-digit-char-list
            • Bin-digit-char-list
            • Bit-list
          • Isar
          • Kestrel-utilities
          • Set
          • C
          • 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
    • Reserr-option-some

    Reserr-option-some->val

    Get the val field from a reserr-option-some.

    Signature
    (reserr-option-some->val x) → val
    Arguments
    x — Guard (reserr-optionp x).
    Returns
    val — Type (reserrp val).

    This is an ordinary field accessor created by defprod.

    Definitions and Theorems

    Function: reserr-option-some->val$inline

    (defun reserr-option-some->val$inline (x)
      (declare (xargs :guard (reserr-optionp x)))
      (declare (xargs :guard x))
      (let ((__function__ 'reserr-option-some->val))
        (declare (ignorable __function__))
        (mbe :logic (b* ((x (and x x))) (reserr-fix x))
             :exec x)))

    Theorem: reserrp-of-reserr-option-some->val

    (defthm reserrp-of-reserr-option-some->val
      (b* ((val (reserr-option-some->val$inline x)))
        (reserrp val))
      :rule-classes :rewrite)

    Theorem: reserr-option-some->val$inline-of-reserr-option-fix-x

    (defthm reserr-option-some->val$inline-of-reserr-option-fix-x
      (equal (reserr-option-some->val$inline (reserr-option-fix x))
             (reserr-option-some->val$inline x)))

    Theorem: reserr-option-some->val$inline-reserr-option-equiv-congruence-on-x

    (defthm
     reserr-option-some->val$inline-reserr-option-equiv-congruence-on-x
     (implies (reserr-option-equiv x x-equiv)
              (equal (reserr-option-some->val$inline x)
                     (reserr-option-some->val$inline x-equiv)))
     :rule-classes :congruence)

    Theorem: reserr-option-some->val-when-wrong-kind

    (defthm reserr-option-some->val-when-wrong-kind
      (implies (not x)
               (equal (reserr-option-some->val x)
                      (reserr-fix nil))))