• 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
            • Semantics
            • Features
            • Instructions
            • Encoding
            • States
              • Stat
                • Statp
                • Stat-fix
                • Stat-equiv
                  • Make-stat
                  • Change-stat
                  • Stat->memory
                  • Stat->error
                  • Stat->xregs
                  • Stat->pc
                • Stat-validp
                • Read-instruction
                • Write-memory-unsigned64
                • Write-memory-unsigned32
                • Write-memory-unsigned8
                • Write-memory-unsigned16
                • Write-xreg-32
                • Read-xreg-unsigned
                • Write-xreg
                • Read-memory-unsigned64
                • Read-memory-unsigned8
                • Read-memory-unsigned32
                • Read-xreg-signed
                • Read-memory-unsigned16
                • Read-xreg-unsigned32
                • Write-pc
                • Read-xreg-signed32
                • Inc4-pc
                • Read-pc
                • Errorp
                • Error
              • Reads-over-writes
              • Semantics-equivalences
              • Decoding
              • Execution
            • Executable
            • Specialized
            • Optimized
          • 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
    • Stat

    Stat-equiv

    Basic equivalence relation for stat structures.

    Definitions and Theorems

    Function: stat-equiv$inline

    (defun stat-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (statp acl2::x) (statp acl2::y))))
      (equal (stat-fix acl2::x)
             (stat-fix acl2::y)))

    Theorem: stat-equiv-is-an-equivalence

    (defthm stat-equiv-is-an-equivalence
      (and (booleanp (stat-equiv x y))
           (stat-equiv x x)
           (implies (stat-equiv x y)
                    (stat-equiv y x))
           (implies (and (stat-equiv x y) (stat-equiv y z))
                    (stat-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: stat-equiv-implies-equal-stat-fix-1

    (defthm stat-equiv-implies-equal-stat-fix-1
      (implies (stat-equiv acl2::x x-equiv)
               (equal (stat-fix acl2::x)
                      (stat-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: stat-fix-under-stat-equiv

    (defthm stat-fix-under-stat-equiv
      (stat-equiv (stat-fix acl2::x) acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-stat-fix-1-forward-to-stat-equiv

    (defthm equal-of-stat-fix-1-forward-to-stat-equiv
      (implies (equal (stat-fix acl2::x) acl2::y)
               (stat-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-stat-fix-2-forward-to-stat-equiv

    (defthm equal-of-stat-fix-2-forward-to-stat-equiv
      (implies (equal acl2::x (stat-fix acl2::y))
               (stat-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: stat-equiv-of-stat-fix-1-forward

    (defthm stat-equiv-of-stat-fix-1-forward
      (implies (stat-equiv (stat-fix acl2::x) acl2::y)
               (stat-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: stat-equiv-of-stat-fix-2-forward

    (defthm stat-equiv-of-stat-fix-2-forward
      (implies (stat-equiv acl2::x (stat-fix acl2::y))
               (stat-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)