• 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
      • Riscv
        • Semantics
        • Instructions
        • States
          • Stat
          • Stat-validp
          • Write-memory-unsigned64
          • Write-memory-unsigned32
          • Write-memory-unsigned8
          • Write-memory-unsigned16
          • Read-xreg-unsigned
          • Write-xreg-32
          • Read-memory-unsigned8
          • Write-xreg
          • Read-memory-unsigned64
          • Read-memory-unsigned32
          • Read-memory-unsigned16
          • Read-xreg-signed
          • Read-instruction
          • Read-xreg-unsigned32
          • Write-pc
          • Read-xreg-signed32
          • Read-pc
          • Inc4-pc
          • Error
          • Errorp
          • Decoding
          • Encoding
          • Features
          • Rv32im
          • Rv64im
          • Execution
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • 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
      • Community
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • States

    Errorp

    Check if the error flag in the state is set.

    Signature
    (errorp stat feat) → yes/no
    Arguments
    stat — Guard (statp stat).
    feat — Guard (featp feat).
    Returns
    yes/no — Type (booleanp yes/no).

    Definitions and Theorems

    Function: errorp

    (defun errorp (stat feat)
      (declare (xargs :guard (and (statp stat) (featp feat))))
      (declare (ignore feat))
      (declare (xargs :guard (stat-validp stat feat)))
      (let ((__function__ 'errorp))
        (declare (ignorable __function__))
        (stat->error stat)))

    Theorem: booleanp-of-errorp

    (defthm booleanp-of-errorp
      (b* ((yes/no (errorp stat feat)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: errorp-of-stat-fix-stat

    (defthm errorp-of-stat-fix-stat
      (equal (errorp (stat-fix stat) feat)
             (errorp stat feat)))

    Theorem: errorp-stat-equiv-congruence-on-stat

    (defthm errorp-stat-equiv-congruence-on-stat
      (implies (stat-equiv stat stat-equiv)
               (equal (errorp stat feat)
                      (errorp stat-equiv feat)))
      :rule-classes :congruence)

    Theorem: errorp-of-feat-fix-feat

    (defthm errorp-of-feat-fix-feat
      (equal (errorp stat (feat-fix feat))
             (errorp stat feat)))

    Theorem: errorp-feat-equiv-congruence-on-feat

    (defthm errorp-feat-equiv-congruence-on-feat
      (implies (feat-equiv feat feat-equiv)
               (equal (errorp stat feat)
                      (errorp stat feat-equiv)))
      :rule-classes :congruence)