Left ``arithmetic'' shift of 4vecs.
In the usual case,
In cases where
Function:
(defun 4vec-lsh (amt src) (declare (xargs :guard (and (4vec-p amt) (4vec-p src)))) (let ((__function__ '4vec-lsh)) (declare (ignorable __function__)) (if (2vec-p amt) (4vec-shift-core (2vec->val amt) src) (4vec-x))))
Theorem:
(defthm 4vec-p-of-4vec-lsh (b* ((shifted (4vec-lsh amt src))) (4vec-p shifted)) :rule-classes :rewrite)
Theorem:
(defthm 4vec-lsh-of-2vecx-fix-amt (equal (4vec-lsh (2vecx-fix amt) src) (4vec-lsh amt src)))
Theorem:
(defthm 4vec-lsh-2vecx-equiv-congruence-on-amt (implies (2vecx-equiv amt amt-equiv) (equal (4vec-lsh amt src) (4vec-lsh amt-equiv src))) :rule-classes :congruence)
Theorem:
(defthm 4vec-lsh-of-4vec-fix-src (equal (4vec-lsh amt (4vec-fix src)) (4vec-lsh amt src)))
Theorem:
(defthm 4vec-lsh-4vec-equiv-congruence-on-src (implies (4vec-equiv src src-equiv) (equal (4vec-lsh amt src) (4vec-lsh amt src-equiv))) :rule-classes :congruence)