• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Soft
        • C
        • Bv
        • Imp-language
          • Semantics
            • Step
            • Write-var
            • Outcome
              • Outcome-case
              • Outcome-fix
              • Outcome-equiv
              • Outcome-terminated
              • Outcomep
                • Outcome-nonterminating
                • Outcome-kind
              • Beval
              • Read-var
              • Config
              • Terminatingp
              • Aeval
              • Step*
              • Stepn
              • Env
            • Abstract-syntax
            • Interpreter
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Outcome

    Outcomep

    Recognizer for outcome structures.

    Signature
    (outcomep x) → *

    Definitions and Theorems

    Function: outcomep

    (defun outcomep (x)
      (declare (xargs :guard t))
      (let ((__function__ 'outcomep))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x) (eq (car x) :terminated))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((env (std::da-nth 0 (cdr x))))
                           (envp env))))
                   (t (and (eq (car x) :nonterminating)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 0))
                           (b* nil t)))))))

    Theorem: consp-when-outcomep

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