• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
        • Pretty-printing
          • Pretty-printing-implementation
            • Missing-functionality
            • Printconfig
            • Cons-ppr1
            • Print-escaped-charlist
            • Atom-size
            • Print-escaped-str
            • Obj-size
            • Maybe-merge-flat
            • Ppr
            • Printer-instructions
              • Pinst
                • Pinst-case
                • Pinst-p
                • Pinst-special-term
                • Pinst-indent
                • Pinst-wide
                • Pinst-equiv
                  • Pinst-keypair
                  • Pinst-quote
                  • Pinst-keyline
                  • Pinst-flat
                  • Pinst-dot
                  • Pinst-kind
                  • Pinst-fix
                  • Pinst-count
                • Pflat
                • Pinstlist
              • Keyword-param-valuep
              • Print-flat-objs
              • Radix-print-int
              • Print-escaped-atom
              • Print-atom
              • Print-escaped-symbol
              • Radix-print-complex
              • Basic-print-complex
              • Radix-print-rat
              • Spaces1
              • Basic-print-rat
              • Basic-print-nat
              • Basic-print-int
              • Spaces
              • My-needs-slashes
              • Pinstlist->max-width
              • Nat-size
              • Special-term-num
              • Print-column
              • Print-base-fix
              • Int-size
              • Keyword-fix
              • Print-instruction
              • Pinst->width
              • In-home-package-p
              • Eviscerated->guts
              • Evisceratedp
              • Pprdot
            • Eviscerate
            • Pretty
            • Revappend-pretty
            • Pretty-list
          • Printtree
          • Base64
          • Charset-p
          • Strtok!
          • Cases
          • Concatenation
          • Html-encoding
          • Character-kinds
          • Substrings
          • Strtok
          • Equivalences
          • Url-encoding
          • Lines
          • Explode-implode-equalities
          • Ordering
          • Numbers
          • Pad-trim
          • Coercion
          • Std/strings/digit-to-char
          • Substitution
          • Symbols
        • Std/osets
        • Std/io
        • Std/basic
        • 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
    • Pinst

    Pinst-equiv

    Basic equivalence relation for pinst structures.

    Definitions and Theorems

    Function: pinst-equiv$inline

    (defun pinst-equiv$inline (x y)
      (declare (xargs :guard (and (pinst-p x) (pinst-p y))))
      (equal (pinst-fix x) (pinst-fix y)))

    Theorem: pinst-equiv-is-an-equivalence

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

    Theorem: pinst-equiv-implies-equal-pinst-fix-1

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

    Theorem: pinst-fix-under-pinst-equiv

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

    Theorem: equal-of-pinst-fix-1-forward-to-pinst-equiv

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

    Theorem: equal-of-pinst-fix-2-forward-to-pinst-equiv

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

    Theorem: pinst-equiv-of-pinst-fix-1-forward

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

    Theorem: pinst-equiv-of-pinst-fix-2-forward

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