• 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
          • Syntax-for-tools
          • Atc
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
            • Operations
            • Errors
              • Error
                • Error-fix
                • Error-equiv
                  • Make-error
                  • Errorp
                  • Change-error
                  • Error->info
                • Defresult
                • Boolean-result
                • Defresult-fn
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Bytes
              • Keywords
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • 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
    • Error

    Error-equiv

    Basic equivalence relation for error structures.

    Definitions and Theorems

    Function: error-equiv$inline

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

    Theorem: error-equiv-is-an-equivalence

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

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

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

    Theorem: error-fix-under-error-equiv

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

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

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

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

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

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

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

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

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