Level 2, Resolution Rule.
(aig-and-pass5 x y) → (mv status arg1 arg2)
Function:
(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:
(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:
(defthm aig-and-pass5-never-reduced (b* (((mv ?status ?arg1 ?arg2) (aig-and-pass5$inline x y))) (not (equal status :reduced))))
Theorem:
(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:
(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)))))