• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
          • Defbyte
          • Defresult
          • Fold
          • Defsubtype
          • Specific-types
          • Defset
          • Defflatsum
          • Deflist-of-len
          • Pos-list
          • Defbytelist
          • Defomap
          • Defbyte-standard-instances
          • Deffixtype-alias
          • Defbytelist-standard-instances
          • Defunit
          • Byte-list
          • Database
          • Byte
          • Pos-option
          • Nibble
          • Nat-option
          • String-option
          • Byte-list20
          • Byte-list32
          • Byte-list64
          • Pseudo-event-form
          • Natoption/natoptionlist
          • Nati
          • Character-list
          • Nat/natlist
          • Maybe-string
          • Nibble-list
          • Natoption/natoptionlist-result
          • Nat/natlist-result
          • Nat-option-list-result
          • Set
          • String-result
          • String-list-result
          • Nat-result
          • Nat-option-result
          • Nat-list-result
          • Maybe-string-result
          • Integer-result
          • Character-result
          • Character-list-result
          • Boolean-result
          • Map
          • Bag
          • Pos-set
          • Hex-digit-char-list
          • Dec-digit-char-list
          • Pseudo-event-form-list
          • Nat-option-list
          • Symbol-set
          • String-set
          • Nat-set
          • Oct-digit-char-list
          • Bin-digit-char-list
          • Bit-list
            • Bit-list-fix
            • Bit-list-equiv
          • Isar
          • Kestrel-utilities
          • Set
          • Soft
          • C
          • 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
    • Bit-list

    Bit-list-equiv

    Basic equivalence relation for bit-list structures.

    Definitions and Theorems

    Function: bit-list-equiv$inline

    (defun bit-list-equiv$inline (x y)
      (declare (xargs :guard (and (bit-listp x) (bit-listp y))))
      (equal (bit-list-fix x)
             (bit-list-fix y)))

    Theorem: bit-list-equiv-is-an-equivalence

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

    Theorem: bit-list-equiv-implies-equal-bit-list-fix-1

    (defthm bit-list-equiv-implies-equal-bit-list-fix-1
      (implies (bit-list-equiv x x-equiv)
               (equal (bit-list-fix x)
                      (bit-list-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: bit-list-fix-under-bit-list-equiv

    (defthm bit-list-fix-under-bit-list-equiv
      (bit-list-equiv (bit-list-fix x) x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-bit-list-fix-1-forward-to-bit-list-equiv

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

    Theorem: equal-of-bit-list-fix-2-forward-to-bit-list-equiv

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

    Theorem: bit-list-equiv-of-bit-list-fix-1-forward

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

    Theorem: bit-list-equiv-of-bit-list-fix-2-forward

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