Symbolic version of 4vec-remainder.
Function:
(defun a4vec-remainder (x y) (declare (xargs :guard (and (a4vec-p x) (a4vec-p y)))) (let ((__function__ 'a4vec-remainder)) (declare (ignorable __function__)) (a4vec-ite (aig-and (a2vec-p x) (a2vec-p y) (aig-not (aig-=-ss (a4vec->upper y) (aig-sterm nil)))) (b* (((a4vec x)) ((a4vec y)) (res (aig-rem-ss x.upper y.upper))) (a4vec res res)) (a4vec-x))))
Theorem:
(defthm a4vec-p-of-a4vec-remainder (b* ((res (a4vec-remainder x y))) (a4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm a4vec-remainder-correct (equal (a4vec-eval (a4vec-remainder x y) env) (4vec-remainder (a4vec-eval x env) (a4vec-eval y env))))
Theorem:
(defthm a4vec-remainder-of-a4vec-fix-x (equal (a4vec-remainder (a4vec-fix x) y) (a4vec-remainder x y)))
Theorem:
(defthm a4vec-remainder-a4vec-equiv-congruence-on-x (implies (a4vec-equiv x x-equiv) (equal (a4vec-remainder x y) (a4vec-remainder x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm a4vec-remainder-of-a4vec-fix-y (equal (a4vec-remainder x (a4vec-fix y)) (a4vec-remainder x y)))
Theorem:
(defthm a4vec-remainder-a4vec-equiv-congruence-on-y (implies (a4vec-equiv y y-equiv) (equal (a4vec-remainder x y) (a4vec-remainder x y-equiv))) :rule-classes :congruence)