Function:
(defun match-aig-var-ite (x) (declare (xargs :guard t)) (let ((__function__ 'match-aig-var-ite)) (declare (ignorable __function__)) (b* (((mv okp left right) (match-aig-or x)) ((unless okp) (mv nil nil nil nil)) ((mv okp a1 a2) (match-aig-and left)) ((unless okp) (mv nil nil nil nil)) ((mv okp b1 b2) (match-aig-and right)) ((unless okp) (mv nil nil nil nil)) ((mv okp var a b) (match-aig-var-ite-aux a1 a1 a2 b1 b2 x)) ((when okp) (mv t var a b)) ((mv okp var a b) (match-aig-var-ite-aux a2 a1 a2 b1 b2 x)) ((when okp) (mv t var a b)) ((mv okp var a b) (match-aig-var-ite-aux b1 a1 a2 b1 b2 x)) ((when okp) (mv t var a b)) ((mv okp var a b) (match-aig-var-ite-aux b2 a1 a2 b1 b2 x)) ((when okp) (mv t var a b))) (mv nil nil nil nil))))
Theorem:
(defthm atom-of-match-aig-var-ite.var (b* (((mv ?okp ?var ?a ?b) (match-aig-var-ite x))) (atom var)) :rule-classes :type-prescription)
Theorem:
(defthm match-aig-var-ite-correct (b* (((mv okp var a b) (match-aig-var-ite x))) (implies okp (equal (aig-eval x env) (if (aig-eval var env) (aig-eval a env) (aig-eval b env))))))
Theorem:
(defthm not-booleanp-of-match-aig-var-ite (b* (((mv okp var & &) (match-aig-var-ite x))) (implies okp (and (atom var) (not (equal var t)) (not (equal var nil))))) :rule-classes :type-prescription)
Theorem:
(defthm acl2-count-of-match-aig-var-ite-weak-1 (b* (((mv ?okp ?var ?a ?b) (match-aig-var-ite x))) (<= (acl2-count var) (acl2-count x))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-match-aig-var-ite-weak-2 (b* (((mv ?okp ?var ?a ?b) (match-aig-var-ite x))) (<= (acl2-count a) (acl2-count x))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-match-aig-var-ite-weak-3 (b* (((mv ?okp ?var ?a ?b) (match-aig-var-ite x))) (<= (acl2-count b) (acl2-count x))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-match-aig-var-ite-strong-1 (b* (((mv ?okp ?var ?a ?b) (match-aig-var-ite x))) (implies okp (< (acl2-count var) (acl2-count x)))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-match-aig-var-ite-strong-2 (b* (((mv ?okp ?var ?a ?b) (match-aig-var-ite x))) (implies okp (< (acl2-count a) (acl2-count x)))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm acl2-count-of-match-aig-var-ite-strong-3 (b* (((mv ?okp ?var ?a ?b) (match-aig-var-ite x))) (implies okp (< (acl2-count b) (acl2-count x)))) :rule-classes ((:rewrite) (:linear)))