• 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-pass2a

    Level 2 Contradiction Rule 1 and Idempotence Rule, Single Direction.

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

    Definitions and Theorems

    Function: aig-and-pass2a

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

    Theorem: aig-and-pass2a-correct

    (defthm aig-and-pass2a-correct
      (b* (((mv ?status ?arg1 ?arg2)
            (aig-and-pass2a 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-pass2a-never-reduced

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

    Theorem: aig-and-pass2a-subterm-convention

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

    Theorem: aig-and-pass2a-normalize-status

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