(match-aig-xor-1 x) → (mv okp arg1 arg2)
Function:
(defun match-aig-xor-1 (x) (declare (xargs :guard t)) (let ((__function__ 'match-aig-xor-1)) (declare (ignorable __function__)) (b* (((mv okp left right) (match-aig-or x)) ((unless okp) (mv nil nil nil)) ((mv okp a b) (match-aig-andc1 left)) ((when okp) (b* (((mv okp c d) (match-aig-andc1 right)) ((when (and okp (hons-equal a d) (hons-equal b c))) (mv t a b)) ((mv okp c d) (match-aig-andc2 right)) ((when (and okp (hons-equal a c) (hons-equal b d))) (mv t a b))) (mv nil nil nil))) ((mv okp a b) (match-aig-andc2 left)) ((unless okp) (mv nil nil nil)) ((mv okp c d) (match-aig-andc1 right)) ((when (and okp (hons-equal a c) (hons-equal b d))) (mv t a b)) ((mv okp c d) (match-aig-andc2 right)) ((when (and okp (hons-equal a d) (hons-equal b c))) (mv t a b))) (mv nil nil nil))))
Theorem:
(defthm match-aig-xor-1-correct (b* (((mv okp arg1 arg2) (match-aig-xor-1 x))) (implies okp (equal (aig-eval x env) (xor (aig-eval arg1 env) (aig-eval arg2 env))))))
Theorem:
(defthm acl2-count-of-match-aig-xor-1-weak-1 (b* (((mv & arg1 &) (match-aig-xor-1 x))) (<= (acl2-count arg1) (acl2-count x))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-match-aig-xor-1-weak-2 (b* (((mv & & arg2) (match-aig-xor-1 x))) (<= (acl2-count arg2) (acl2-count x))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-match-aig-xor-1-strong-1 (b* (((mv okp arg1 &) (match-aig-xor-1 x))) (implies okp (< (acl2-count arg1) (acl2-count x)))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-match-aig-xor-1-strong-2 (b* (((mv okp & arg2) (match-aig-xor-1 x))) (implies okp (< (acl2-count arg2) (acl2-count x)))) :rule-classes ((:rewrite) (:linear)))