• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
        • Aig-constructors
          • Aig-and
            • Aig-and-main
            • Aig-and-pass6a
            • Aig-and-pass5
              • Aig-and-pass3
              • Aig-and-pass4a
              • Aig-and-pass6
              • Aig-and-pass2a
              • Aig-and-pass2
              • Aig-and-pass4
              • Aig-and-dumb
              • Aig-negation-p
              • Aig-and-pass1
              • Aig-binary-and
              • Aig-and-macro-exec-part
              • Aig-and-macro-logic-part
            • Aig-or-list
            • Aig-and-list
            • Aig-or
            • Aig-not
            • Aig-implies
            • Aig-implies-lists
            • Aig-xor-lists
            • Aig-xor
            • Aig-orc2-lists
            • Aig-or-lists
            • Aig-nor-lists
            • Aig-nand-lists
            • Aig-iff-lists
            • Aig-iff
            • Aig-andc2-lists
            • Aig-andc1-lists
            • Aig-and-lists
            • Aig-not-list
            • Aig-ite
            • Aig-orc1-lists
            • Aig-orc1
            • Aig-nand
            • Aig-orc2
            • Aig-nor
            • Aig-andc2
            • Aig-andc1
          • Aig-vars
          • Aig-sat
          • Bddify
          • Aig-substitution
          • Aig-other
          • Aig-semantics
          • Aig-and-count
        • Satlink
        • Truth
        • Ubdds
        • Bdd
        • Faig
        • Bed
        • 4v
      • Projects
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Aig-and

    Aig-and-pass5

    Level 2, Resolution Rule.

    Signature
    (aig-and-pass5 x y) → (mv status arg1 arg2)

    Definitions and Theorems

    Function: aig-and-pass5$inline

    (defun aig-and-pass5$inline (x y)
      (declare (xargs :guard t))
      (let ((__function__ 'aig-and-pass5))
        (declare (ignorable __function__))
        (b* (((unless (and (not (aig-atom-p x))
                           (eq (cdr x) nil)
                           (not (aig-atom-p (car x)))
                           (not (eq (cdar x) nil))))
              (mv :fail x y))
             ((unless (and (not (aig-atom-p y))
                           (eq (cdr y) nil)
                           (not (aig-atom-p (car y)))
                           (not (eq (cdar y) nil))))
              (mv :fail x y))
             (a (caar x))
             (b (cdar x))
             (c (caar y))
             (d (cdar y))
             ((when (or (and (hons-equal a d)
                             (aig-negation-p b c))
                        (and (hons-equal a c)
                             (aig-negation-p b d))))
              (let ((ans (aig-not a)))
                (mv :subterm ans ans)))
             ((when (or (and (hons-equal b d)
                             (aig-negation-p a c))
                        (and (hons-equal b c)
                             (aig-negation-p a d))))
              (let ((ans (aig-not b)))
                (mv :subterm ans ans))))
          (mv :fail x y))))

    Theorem: aig-and-pass5-correct

    (defthm aig-and-pass5-correct
      (b* (((mv ?status ?arg1 ?arg2)
            (aig-and-pass5$inline x y)))
        (equal (and (aig-eval arg1 env)
                    (aig-eval arg2 env))
               (and (aig-eval x env)
                    (aig-eval y env))))
      :rule-classes nil)

    Theorem: aig-and-pass5-never-reduced

    (defthm aig-and-pass5-never-reduced
      (b* (((mv ?status ?arg1 ?arg2)
            (aig-and-pass5$inline x y)))
        (not (equal status :reduced))))

    Theorem: aig-and-pass5-subterm-convention

    (defthm aig-and-pass5-subterm-convention
      (b* (((mv ?status ?arg1 ?arg2)
            (aig-and-pass5$inline x y)))
        (implies (equal status :subterm)
                 (equal arg2 arg1))))

    Theorem: aig-and-pass5-normalize-status

    (defthm aig-and-pass5-normalize-status
      (b* (((mv ?status ?arg1 ?arg2)
            (aig-and-pass5$inline x y)))
        (implies (and (not (equal status :subterm))
                      (not (equal status :reduced)))
                 (and (equal status :fail)
                      (equal arg1 x)
                      (equal arg2 y)))))