Function:
(defun s4vec-clog2 (a) (declare (xargs :guard (s4vec-p a))) (let ((__function__ 's4vec-clog2)) (declare (ignorable __function__)) (if (s4vec-index-p a) (s2vec (int-to-sparseint (sparseint-length (sparseint-plus (s4vec->upper a) -1)))) (s4vec-x))))
Theorem:
(defthm s4vec-p-of-s4vec-clog2 (b* ((res (s4vec-clog2 a))) (s4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm s4vec-clog2-correct (b* ((?res (s4vec-clog2 a))) (equal (s4vec->4vec res) (4vec-clog2 (s4vec->4vec a)))))
Theorem:
(defthm s4vec-clog2-of-s4vec-fix-a (equal (s4vec-clog2 (s4vec-fix a)) (s4vec-clog2 a)))
Theorem:
(defthm s4vec-clog2-s4vec-equiv-congruence-on-a (implies (s4vec-equiv a a-equiv) (equal (s4vec-clog2 a) (s4vec-clog2 a-equiv))) :rule-classes :congruence)