Implements svex-argmasks for
(svmask-for-uand mask args) → argmasks
We are considering a
Accordingly, it seems that if we care about any bit of the result, we need to care about all of the bits of the argument. On the other hand, if we don't care about any bits of the result, then we don't need to care about any bit of the argument.
Function:
(defun svmask-for-uand$inline (mask args) (declare (xargs :guard (and (4vmask-p mask) (svexlist-p args)))) (let ((__function__ 'svmask-for-uand)) (declare (ignorable __function__)) (b* (((svex-nths x) args) (mask (4vmask-fix mask))) (list (4vmask-all-or-none mask)))))
Theorem:
(defthm 4vmasklist-p-of-svmask-for-uand (b* ((argmasks (svmask-for-uand$inline mask args))) (4vmasklist-p argmasks)) :rule-classes :rewrite)
Theorem:
(defthm svmask-for-uand$inline-of-4vmask-fix-mask (equal (svmask-for-uand$inline (4vmask-fix mask) args) (svmask-for-uand$inline mask args)))
Theorem:
(defthm svmask-for-uand$inline-4vmask-equiv-congruence-on-mask (implies (4vmask-equiv mask mask-equiv) (equal (svmask-for-uand$inline mask args) (svmask-for-uand$inline mask-equiv args))) :rule-classes :congruence)
Theorem:
(defthm svmask-for-uand$inline-of-svexlist-fix-args (equal (svmask-for-uand$inline mask (svexlist-fix args)) (svmask-for-uand$inline mask args)))
Theorem:
(defthm svmask-for-uand$inline-svexlist-equiv-congruence-on-args (implies (svexlist-equiv args args-equiv) (equal (svmask-for-uand$inline mask args) (svmask-for-uand$inline mask args-equiv))) :rule-classes :congruence)
Theorem:
(defthm svmask-for-uand-correct (implies (and (equal (4veclist-mask (svmask-for-uand mask args) (svexlist-eval args env)) (4veclist-mask (svmask-for-uand mask args) args1)) (syntaxp (not (equal args1 (cons 'svexlist-eval (cons args (cons env 'nil))))))) (equal (4vec-mask mask (svex-apply 'uand args1)) (4vec-mask mask (svex-apply 'uand (svexlist-eval args env))))))