• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/osets
      • Std/io
      • Std/basic
        • Maybe-stringp
        • Maybe-natp
        • Two-nats-measure
        • Impossible
        • Bytep
        • Nat-list-measure
        • Maybe-posp
        • Nibblep
        • Organize-symbols-by-pkg
        • Organize-symbols-by-name
        • Lnfix
        • Good-valuep
        • Streqv
        • Chareqv
        • Symbol-package-name-non-cl
        • Arith-equivs
        • Induction-schemes
        • Maybe-integerp
        • Char-fix
        • Pos-fix
        • Symbol-package-name-lst
        • Mbt$
        • Maybe-bitp
          • Maybe-bit-fix
          • Maybe-bit-equiv
          • Good-pseudo-termp
          • Str-fix
          • Maybe-string-fix
          • Nonkeyword-listp
          • Lifix
          • Bfix
          • Std/basic/if*
          • Impliez
          • Tuplep
          • Std/basic/intern-in-package-of-symbol
          • Lbfix
          • Std/basic/symbol-name-lst
          • True
          • Std/basic/rfix
          • Std/basic/realfix
          • Std/basic/member-symbol-name
          • Std/basic/fix
          • False
          • Std/basic/nfix
          • Std/basic/ifix
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Fty::basetypes
    • Maybe-bitp

    Maybe-bit-equiv

    (maybe-bitp-equiv x y) is an equivalence relation for maybe-bitps, i.e., equality up to maybe-bit-fix.

    Performance note. In the execution, this is just an inlined call of eql.

    Definitions and Theorems

    Function: maybe-bit-equiv$inline

    (defun maybe-bit-equiv$inline (x y)
      (declare (xargs :guard (and (maybe-bitp x) (maybe-bitp y))))
      (eql (maybe-bit-fix x)
           (maybe-bit-fix y)))

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

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

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

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

    Theorem: maybe-bit-fix-under-maybe-bit-equiv

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