Reduce a list of constant 4vecs using individual 4vmasks; any irrelevant bits become Xes.
(4veclist-mask masks values) → masked-values
Function:
(defun 4veclist-mask (masks values) (declare (xargs :guard (and (4vmasklist-p masks) (4veclist-p values)))) (let ((__function__ '4veclist-mask)) (declare (ignorable __function__)) (cond ((atom values) nil) ((atom masks) (4veclist-fix values)) (t (cons (4vec-mask (car masks) (car values)) (4veclist-mask (cdr masks) (cdr values)))))))
Theorem:
(defthm 4veclist-p-of-4veclist-mask (b* ((masked-values (4veclist-mask masks values))) (4veclist-p masked-values)) :rule-classes :rewrite)
Theorem:
(defthm 4veclist-mask-of-4vmasklist-fix-masks (equal (4veclist-mask (4vmasklist-fix masks) values) (4veclist-mask masks values)))
Theorem:
(defthm 4veclist-mask-4vmasklist-equiv-congruence-on-masks (implies (4vmasklist-equiv masks masks-equiv) (equal (4veclist-mask masks values) (4veclist-mask masks-equiv values))) :rule-classes :congruence)
Theorem:
(defthm 4veclist-mask-of-4veclist-fix-values (equal (4veclist-mask masks (4veclist-fix values)) (4veclist-mask masks values)))
Theorem:
(defthm 4veclist-mask-4veclist-equiv-congruence-on-values (implies (4veclist-equiv values values-equiv) (equal (4veclist-mask masks values) (4veclist-mask masks values-equiv))) :rule-classes :congruence)
Theorem:
(defthm len-of-4veclist-mask (equal (len (4veclist-mask masks values)) (len values)))
Theorem:
(defthm 4veclist-mask-of-nil (equal (4veclist-mask nil x) (4veclist-fix x)))
Theorem:
(defthm equal-of-4veclist-mask-cons (equal (equal (4veclist-mask (cons m1 m) x) (4veclist-mask (cons m1 m) y)) (and (equal (consp x) (consp y)) (equal (4vec-mask m1 (car x)) (4vec-mask m1 (car y))) (equal (4veclist-mask m (cdr x)) (4veclist-mask m (cdr y))))))