Symbolic version of a3vec-bit?.
Function:
(defun a3vec-bit? (x y y3p z z3p) (declare (xargs :guard (and (a4vec-p x) (a4vec-p y) (a4vec-p z)))) (let ((__function__ 'a3vec-bit?)) (declare (ignorable __function__)) (b* (((a4vec a) x) ((a4vec b) y) ((a4vec c) z) (a=x (aig-logandc2-ss a.upper a.lower)) (boolcase (aig-logior-ss (aig-logand-ss a.lower b.upper) (aig-logandc1-ss a.upper c.upper))) (xcase (aig-logior-ss (if z3p c.upper (aig-logior-ss c.upper c.lower)) (if y3p b.upper (aig-logior-ss b.upper b.lower)))) (upper (aig-logior-ss boolcase (aig-logand-ss a=x xcase))) (boolcase (aig-logior-ss (aig-logand-ss a.lower b.lower) (aig-logandc1-ss a.upper c.lower))) (xcase (aig-logand-ss (if z3p c.lower (aig-logand-ss c.upper c.lower)) (if y3p b.lower (aig-logand-ss b.upper b.lower)))) (lower (aig-logior-ss boolcase (aig-logand-ss a=x xcase)))) (a4vec upper lower))))
Theorem:
(defthm a4vec-p-of-a3vec-bit? (b* ((res (a3vec-bit? x y y3p z z3p))) (a4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm a3vec-bit?-correct (implies (and (case-split (implies y3p (3vec-p (a4vec-eval y env)))) (case-split (implies z3p (3vec-p (a4vec-eval z env)))) (3vec-p (a4vec-eval x env))) (equal (a4vec-eval (a3vec-bit? x y y3p z z3p) env) (3vec-bit? (a4vec-eval x env) (a4vec-eval y env) (a4vec-eval z env)))))
Theorem:
(defthm a3vec-bit?-of-a4vec-fix-x (equal (a3vec-bit? (a4vec-fix x) y y3p z z3p) (a3vec-bit? x y y3p z z3p)))
Theorem:
(defthm a3vec-bit?-a4vec-equiv-congruence-on-x (implies (a4vec-equiv x x-equiv) (equal (a3vec-bit? x y y3p z z3p) (a3vec-bit? x-equiv y y3p z z3p))) :rule-classes :congruence)
Theorem:
(defthm a3vec-bit?-of-a4vec-fix-y (equal (a3vec-bit? x (a4vec-fix y) y3p z z3p) (a3vec-bit? x y y3p z z3p)))
Theorem:
(defthm a3vec-bit?-a4vec-equiv-congruence-on-y (implies (a4vec-equiv y y-equiv) (equal (a3vec-bit? x y y3p z z3p) (a3vec-bit? x y-equiv y3p z z3p))) :rule-classes :congruence)
Theorem:
(defthm a3vec-bit?-of-a4vec-fix-z (equal (a3vec-bit? x y y3p (a4vec-fix z) z3p) (a3vec-bit? x y y3p z z3p)))
Theorem:
(defthm a3vec-bit?-a4vec-equiv-congruence-on-z (implies (a4vec-equiv z z-equiv) (equal (a3vec-bit? x y y3p z z3p) (a3vec-bit? x y y3p z-equiv z3p))) :rule-classes :congruence)