• 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
        • Bv
        • Imp-language
          • Semantics
          • Abstract-syntax
            • Aexp
            • Bexp
            • Comm
              • Comm-case
              • Comm-if
              • Comm-equiv
                • Comm-while
                • Comm-asg
                • Commp
                • Comm-kind
                • Comm-fix
                • Comm-count
              • Comm-list
              • Command-fixtypes
            • Interpreter
          • 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
    • Comm

    Comm-equiv

    Basic equivalence relation for comm structures.

    Definitions and Theorems

    Function: comm-equiv$inline

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

    Theorem: comm-equiv-is-an-equivalence

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

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

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

    Theorem: comm-fix-under-comm-equiv

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

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

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

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

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

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

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

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

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