Level 2, Subsumption Rules 1 and 2, Single Direction.
(aig-and-pass4a x y) → (mv status arg1 arg2)
Function:
(defun aig-and-pass4a (x y) (declare (xargs :guard t)) (let ((__function__ 'aig-and-pass4a)) (declare (ignorable __function__)) (b* (((unless (and (not (aig-atom-p x)) (eq (cdr x) nil))) (mv :fail x y)) (~x (car x)) ((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 y y)) ((when (and (not (aig-atom-p y)) (not (eq (cdr y) nil)))) (b* ((c (car y)) (d (cdr y)) ((when (or (aig-negation-p a c) (aig-negation-p a d) (aig-negation-p b c) (aig-negation-p b d))) (mv :subterm y y))) (mv :fail x y)))) (mv :fail x y))))
Theorem:
(defthm aig-and-pass4a-correct (b* (((mv ?status ?arg1 ?arg2) (aig-and-pass4a 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:
(defthm aig-and-pass4a-never-reduced (b* (((mv ?status ?arg1 ?arg2) (aig-and-pass4a x y))) (not (equal status :reduced))))
Theorem:
(defthm aig-and-pass4a-subterm-convention (b* (((mv ?status ?arg1 ?arg2) (aig-and-pass4a x y))) (implies (equal status :subterm) (equal arg2 arg1))))
Theorem:
(defthm aig-and-pass4a-normalize-status (b* (((mv ?status ?arg1 ?arg2) (aig-and-pass4a x y))) (implies (and (not (equal status :subterm)) (not (equal status :reduced))) (and (equal status :fail) (equal arg1 x) (equal arg2 y)))))