• 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
        • 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
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
    • 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)