Symbolic version of 4vec-clog2.
Function:
(defun a4vec-clog2 (x) (declare (xargs :guard (a4vec-p x))) (let ((__function__ 'a4vec-clog2)) (declare (ignorable __function__)) (b* (((a4vec x))) (a4vec-ite (aig-and (a2vec-p x) (aig-not (aig-sign-s x.upper))) (b* ((res (aig-integer-length-s (aig-+-ss nil '(t) x.upper)))) (a4vec res res)) (a4vec-x)))))
Theorem:
(defthm a4vec-p-of-a4vec-clog2 (b* ((res (a4vec-clog2 x))) (a4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm a4vec-clog2-correct (equal (a4vec-eval (a4vec-clog2 x) env) (4vec-clog2 (a4vec-eval x env))))
Theorem:
(defthm a4vec-clog2-of-a4vec-fix-x (equal (a4vec-clog2 (a4vec-fix x)) (a4vec-clog2 x)))
Theorem:
(defthm a4vec-clog2-a4vec-equiv-congruence-on-x (implies (a4vec-equiv x x-equiv) (equal (a4vec-clog2 x) (a4vec-clog2 x-equiv))) :rule-classes :congruence)