• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
        • Mmp-trees
          • Mmp-encode-n/c
          • Mmp-encode-c-max
          • Mmp-encode
          • Mmp-write
          • Mmp-decode
          • Mmp-encode-u-map
          • Nibblelist-bytelist-map-sup-len-key
          • Mmp-encode-c-forall
          • Mmp-read
          • Mmp-encoding-p
          • Bytelist-to-nibblelist-keys
          • Mmp-encode-c-exists
          • Bytelist-bytelist-map
          • Nibblelist-bytelist-map
            • Nibblelist-bytelist-mfix
            • Nibblelist-bytelist-mapp
            • Nibblelist-bytelist-mequiv
          • Semaphore
          • Database
          • Cryptography
          • Rlp
          • Transactions
          • Hex-prefix
          • Basics
          • Addresses
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Nibblelist-bytelist-map

    Nibblelist-bytelist-mequiv

    Basic equivalence relation for nibblelist-bytelist-map structures.

    Definitions and Theorems

    Function: nibblelist-bytelist-mequiv$inline

    (defun nibblelist-bytelist-mequiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (nibblelist-bytelist-mapp acl2::x)
                                  (nibblelist-bytelist-mapp acl2::y))))
      (equal (nibblelist-bytelist-mfix acl2::x)
             (nibblelist-bytelist-mfix acl2::y)))

    Theorem: nibblelist-bytelist-mequiv-is-an-equivalence

    (defthm nibblelist-bytelist-mequiv-is-an-equivalence
      (and (booleanp (nibblelist-bytelist-mequiv x y))
           (nibblelist-bytelist-mequiv x x)
           (implies (nibblelist-bytelist-mequiv x y)
                    (nibblelist-bytelist-mequiv y x))
           (implies (and (nibblelist-bytelist-mequiv x y)
                         (nibblelist-bytelist-mequiv y z))
                    (nibblelist-bytelist-mequiv x z)))
      :rule-classes (:equivalence))

    Theorem: nibblelist-bytelist-mequiv-implies-equal-nibblelist-bytelist-mfix-1

    (defthm
     nibblelist-bytelist-mequiv-implies-equal-nibblelist-bytelist-mfix-1
     (implies (nibblelist-bytelist-mequiv acl2::x x-equiv)
              (equal (nibblelist-bytelist-mfix acl2::x)
                     (nibblelist-bytelist-mfix x-equiv)))
     :rule-classes (:congruence))

    Theorem: nibblelist-bytelist-mfix-under-nibblelist-bytelist-mequiv

    (defthm nibblelist-bytelist-mfix-under-nibblelist-bytelist-mequiv
      (nibblelist-bytelist-mequiv (nibblelist-bytelist-mfix acl2::x)
                                  acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-nibblelist-bytelist-mfix-1-forward-to-nibblelist-bytelist-mequiv

    (defthm
     equal-of-nibblelist-bytelist-mfix-1-forward-to-nibblelist-bytelist-mequiv
     (implies (equal (nibblelist-bytelist-mfix acl2::x)
                     acl2::y)
              (nibblelist-bytelist-mequiv acl2::x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: equal-of-nibblelist-bytelist-mfix-2-forward-to-nibblelist-bytelist-mequiv

    (defthm
     equal-of-nibblelist-bytelist-mfix-2-forward-to-nibblelist-bytelist-mequiv
     (implies (equal acl2::x
                     (nibblelist-bytelist-mfix acl2::y))
              (nibblelist-bytelist-mequiv acl2::x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: nibblelist-bytelist-mequiv-of-nibblelist-bytelist-mfix-1-forward

    (defthm
       nibblelist-bytelist-mequiv-of-nibblelist-bytelist-mfix-1-forward
     (implies
          (nibblelist-bytelist-mequiv (nibblelist-bytelist-mfix acl2::x)
                                      acl2::y)
          (nibblelist-bytelist-mequiv acl2::x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: nibblelist-bytelist-mequiv-of-nibblelist-bytelist-mfix-2-forward

    (defthm
       nibblelist-bytelist-mequiv-of-nibblelist-bytelist-mfix-2-forward
     (implies
         (nibblelist-bytelist-mequiv acl2::x
                                     (nibblelist-bytelist-mfix acl2::y))
         (nibblelist-bytelist-mequiv acl2::x acl2::y))
     :rule-classes :forward-chaining)