• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
        • Sat-solver-options
        • Config-p
        • Logical-story
        • Dimacs
        • Gather-benchmarks
        • Cnf
          • Litp
            • Lit-negate-cond
            • Lit-negate
            • Make-lit
            • Lit-equiv
              • Lit->var
              • Lit->neg
              • Maybe-litp
              • Lit-list
              • Lit-fix
              • Lit-list-list
            • Varp
            • Env$
            • Eval-formula
            • Max-index-formula
            • Max-index-clause
            • Formula-indices
            • Clause-indices
          • Satlink-extra-hook
          • Sat
        • Truth
        • Ubdds
        • Bdd
        • Faig
        • Bed
        • 4v
      • Debugging
      • Projects
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Litp

    Lit-equiv

    Basic equivalence relation for literals.

    Signature
    (lit-equiv x y) → *
    Arguments
    x — Guard (litp x).
    y — Guard (litp y).

    Definitions and Theorems

    Function: lit-equiv

    (defun lit-equiv (x y)
           (declare (xargs :guard (and (litp x) (litp y))))
           (let ((__function__ 'lit-equiv))
                (declare (ignorable __function__))
                (int= (lit-fix x) (lit-fix y))))

    Theorem: lit-equiv-is-an-equivalence

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

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

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

    Theorem: lit-equiv-of-lit-fix

    (defthm lit-equiv-of-lit-fix
            (lit-equiv (lit-fix lit) lit))

    Theorem: __deffixtype-lit-equiv-means-equal-of-lit-fix

    (defthm acl2::__deffixtype-lit-equiv-means-equal-of-lit-fix
            (implies (lit-equiv acl2::x acl2::y)
                     (equal (lit-fix acl2::x)
                            (lit-fix acl2::y)))
            :rule-classes nil)

    Theorem: lit-equiv-of-lit-fix-x

    (defthm lit-equiv-of-lit-fix-x
            (equal (lit-equiv (lit-fix x) y)
                   (lit-equiv x y)))

    Theorem: lit-equiv-lit-equiv-congruence-on-x

    (defthm lit-equiv-lit-equiv-congruence-on-x
            (implies (lit-equiv x x-equiv)
                     (equal (lit-equiv x y)
                            (lit-equiv x-equiv y)))
            :rule-classes :congruence)

    Theorem: lit-equiv-of-lit-fix-y

    (defthm lit-equiv-of-lit-fix-y
            (equal (lit-equiv x (lit-fix y))
                   (lit-equiv x y)))

    Theorem: lit-equiv-lit-equiv-congruence-on-y

    (defthm lit-equiv-lit-equiv-congruence-on-y
            (implies (lit-equiv y y-equiv)
                     (equal (lit-equiv x y)
                            (lit-equiv x y-equiv)))
            :rule-classes :congruence)