Try to cheaply, statically determine whether an a4vec always evaluates to a 3vec, i.e., whether it has no Z bits.
(a4vec-syntactic-3vec-p x) → *
This is used mainly in a3vec-fix: when we know that there are no Z bits, we can avoid building AIGs to do unfloating.
Function:
(defun a4vec-syntactic-3vec-p (x) (declare (xargs :guard (a4vec-p x))) (let ((__function__ 'a4vec-syntactic-3vec-p)) (declare (ignorable __function__)) (b* (((a4vec x))) (a4vec-syntactic-3vec-p-rec x.upper x.lower))))
Theorem:
(defthm a4vec-syntactic-3vec-p-correct (implies (a4vec-syntactic-3vec-p x) (3vec-p (a4vec-eval x env))))
Theorem:
(defthm a4vec-syntactic-3vec-p-of-a4vec-fix-x (equal (a4vec-syntactic-3vec-p (a4vec-fix x)) (a4vec-syntactic-3vec-p x)))
Theorem:
(defthm a4vec-syntactic-3vec-p-a4vec-equiv-congruence-on-x (implies (a4vec-equiv x x-equiv) (equal (a4vec-syntactic-3vec-p x) (a4vec-syntactic-3vec-p x-equiv))) :rule-classes :congruence)