• 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
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Riscv
          • Specification
          • Executable
          • Specialized
          • Optimized
            • State-stobj
              • Stat1
              • Write1-memory-unsigned64{0}
              • Stat1-iso
              • Read1-memory-unsigned64{0}
              • Stat1-from-stat
              • Write1-memory-unsigned32{0}
              • Read1-memory-unsigned32{0}
              • Write1-memory-unsigned16{0}
              • Stat1-validp{1}
              • Read1-memory-unsigned16{0}
              • Write1-memory-unsigned8{0}
              • Stat1-validp{0}
              • Stat-from-stat1
              • Read1-instruction{0}
              • Write1-xreg{0}
              • Read1-xreg-unsigned{0}
              • Read1-xreg-unsigned32{0}
              • Read1-xreg-signed32{0}
              • Read1-memory-unsigned8{0}
              • Write1-xreg-32{0}
              • Read1-xreg-signed{0}
              • Write1-pc{0}
              • Make-stat1
              • Inc41-pc{0}
              • Error1{0}
              • Read1-pc{0}
              • Errorp1{0}
                • Stat1->memory
          • Ethereum
          • Bitcoin
          • Zcash
          • Yul
          • 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
    • State-stobj

    Errorp1{0}

    Refine errorp to use the stobj states.

    Definitions and Theorems

    Function: errorp1{0}

    (defun errorp1{0} (stat feat)
     (declare (xargs :non-executable t))
     (declare
        (xargs :guard (non-exec (and (stat1p stat)
                                     (statp (stat-from-stat1 stat))
                                     (featp feat)
                                     (stat-validp (stat-from-stat1 stat)
                                                  feat)))))
     (prog2$ (acl2::throw-nonexec-error 'errorp1{0}
                                        (list stat feat))
             (if (acl2::mbt$ (stat1p stat))
                 (stat->error (stat-from-stat1 stat))
               0)))

    Theorem: errorp1{0}-to-errorp

    (defthm errorp1{0}-to-errorp
      (implies (stat1p stat)
               (equal (errorp1{0} stat feat)
                      (errorp (stat-from-stat1 stat) feat)))
      :rule-classes :rewrite)

    Theorem: errorp-to-errorp1{0}

    (defthm errorp-to-errorp1{0}
      (implies (statp stat)
               (equal (errorp stat feat)
                      (errorp1{0} (stat1-from-stat stat)
                                  feat)))
      :rule-classes :rewrite)