Identity, except Z bits become 0.
The closest monotonic approximation of the onset of each of the bits of the input. It differs from the actual onset in that the 4vec-onset of an X bit is X.
Function:
(defun 4vec-onset (x) (declare (xargs :guard (4vec-p x))) (let ((__function__ '4vec-onset)) (declare (ignorable __function__)) (b* (((4vec x))) (4vec x.upper (logand x.upper x.lower)))))
Theorem:
(defthm 4vec-p-of-4vec-onset (b* ((res (4vec-onset x))) (4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm 4vec-onset-bits (equal (4vec-idx->4v n (4vec-onset x)) (let ((in (4vec-idx->4v n x))) (if (eq 'z in) 'f in))))
Theorem:
(defthm 4vec-onset-of-4vec-fix-x (equal (4vec-onset (4vec-fix x)) (4vec-onset x)))
Theorem:
(defthm 4vec-onset-4vec-equiv-congruence-on-x (implies (4vec-equiv x x-equiv) (equal (4vec-onset x) (4vec-onset x-equiv))) :rule-classes :congruence)