• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • 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
              • Comm
                • Comm-case
                • Comm-if
                • Comm-equiv
                  • Comm-while
                  • Comm-asg
                  • Commp
                  • Comm-kind
                  • Comm-fix
                  • Comm-count
                • Comm-list
            • Interpreter
          • Sidekick
          • Leftist-trees
          • Java
          • Taspi
          • Riscv
          • Bitcoin
          • 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
          • Aleo
          • Bigmems
          • Builtins
          • Execloader
          • Solidity
          • Paco
          • Concurrent-programs
          • Bls12-377-curves
        • Debugging
        • Std
        • Community
        • Proof-automation
        • Macro-libraries
        • ACL2
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • 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)