• 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
          • Maybe-posp-fix
          • Maybe-pos-equiv
          • 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
          • 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-posp

    Maybe-pos-equiv

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

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

    Definitions and Theorems

    Function: maybe-pos-equiv$inline

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

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

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

    Theorem: maybe-pos-equiv-implies-equal-maybe-posp-fix-1

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

    Theorem: maybe-posp-fix-under-maybe-pos-equiv

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