• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Error-checking
        • Apt
        • Abnf
        • Fty-extensions
          • Defbyte
          • Defresult
            • Reserr
              • Reserrp
                • Reserr-fix
                • Reserr-equiv
                • Make-reserr
                • Reserr->info
                • Change-reserr
              • Reserr-option
              • Reserrf-push
              • Patbind-ok
              • Reserrf
              • Defresult-macro-definition
              • Patbind-okf
            • Defsubtype
            • Pos-list
            • Defflatsum
            • Deflist-of-len
            • Defbytelist
            • Defset
            • Specific-types
            • Defbyte-standard-instances
            • Deffixtype-alias
            • Defomap
            • Defbytelist-standard-instances
            • Defunit
            • Byte-list
            • Byte
            • Nibble
            • Pos-option
            • Nat-option
            • Byte-list20
            • String-option
            • Byte-list32
            • Byte-list64
            • Pseudo-event-form
            • Character-list
            • Natoption/natoptionlist
            • Nati
            • Maybe-string
            • Nat/natlist
            • Nibble-list
            • Natoption/natoptionlist-result
            • Set
            • Nat/natlist-result
            • Nat-option-list-result
            • 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
            • Bag
            • Pseudo-event-form-list
            • Nat-option-list
            • Nat-set
            • Bit-list
          • Isar
          • Kestrel-utilities
          • Prime-field-constraint-systems
          • Soft
          • Bv
          • Imp-language
          • Event-macros
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Java
          • C
          • Syntheto
          • Number-theory
          • Cryptography
          • Lists-light
          • File-io-light
          • Json
          • Built-ins
          • Solidity
          • Axe
          • Std-extensions
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Reserr

    Reserrp

    Recognizer for reserr structures.

    Signature
    (reserrp x) → *

    Definitions and Theorems

    Function: reserrp

    (defun
        reserrp (x)
        (declare (xargs :guard t))
        (let ((__function__ 'reserrp))
             (declare (ignorable __function__))
             (and (consp x)
                  (eq (car x) :error)
                  (mbe :logic (and (alistp (cdr x))
                                   (equal (strip-cars (cdr x)) '(info)))
                       :exec (alist-with-carsp (cdr x) '(info)))
                  (b* ((info (cdr (std::da-nth 0 (cdr x)))))
                      (acl2::any-p info)))))

    Theorem: consp-when-reserrp

    (defthm consp-when-reserrp
            (implies (reserrp x) (consp x))
            :rule-classes :compound-recognizer)