• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
        • Instructions
        • States
          • Stat
            • Statp
              • Stat-fix
              • Stat-equiv
              • Make-stat
              • Change-stat
              • Stat->memory
              • Stat->error
              • Stat->xregs
              • Stat->pc
            • Stat-validp
            • Write-memory-unsigned64
            • Write-memory-unsigned32
            • Write-memory-unsigned8
            • Write-memory-unsigned16
            • Read-xreg-unsigned
            • Write-xreg-32
            • States64
            • Write-xreg
            • Read-memory-unsigned8
            • Read-memory-unsigned64
            • Read-memory-unsigned32
            • Read-memory-unsigned16
            • Read-xreg-signed
            • Read-xreg-unsigned32
            • States32
            • Write-pc
            • Read-xreg-signed32
            • Read-pc
            • Inc4-pc
          • Decoding
          • Encoding
          • Features
          • Semantics
          • Execution
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Stat

    Statp

    Recognizer for stat structures.

    Signature
    (statp x) → *

    Definitions and Theorems

    Function: statp

    (defun statp (x)
     (declare (xargs :guard t))
     (let ((__function__ 'statp))
      (declare (ignorable __function__))
      (and
          (mbe :logic (and (alistp x)
                           (equal (strip-cars x)
                                  '(xregs pc memory error)))
               :exec (fty::alist-with-carsp x '(xregs pc memory error)))
          (b* ((?xregs (cdr (std::da-nth 0 x)))
               (acl2::?pc (cdr (std::da-nth 1 x)))
               (memory (cdr (std::da-nth 2 x)))
               (error (cdr (std::da-nth 3 x))))
            (and (ubyte8-listp memory)
                 (booleanp error))))))

    Theorem: consp-when-statp

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