Function:
(defun s4vec-lsh (amt x) (declare (xargs :guard (and (s4vec-p amt) (s4vec-p x)))) (let ((__function__ 's4vec-lsh)) (declare (ignorable __function__)) (b* (((unless (s4vec-2vec-p amt)) (s4vec-x)) (amtval (s4vec-sparseint-val (s4vec->upper amt)))) (s4vec-shift-core amtval x))))
Theorem:
(defthm s4vec-p-of-s4vec-lsh (b* ((res (s4vec-lsh amt x))) (s4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm s4vec-lsh-correct (b* ((?res (s4vec-lsh amt x))) (equal (s4vec->4vec res) (4vec-lsh (s4vec->4vec amt) (s4vec->4vec x)))))
Theorem:
(defthm s4vec-lsh-of-s4vec-fix-amt (equal (s4vec-lsh (s4vec-fix amt) x) (s4vec-lsh amt x)))
Theorem:
(defthm s4vec-lsh-s4vec-equiv-congruence-on-amt (implies (s4vec-equiv amt amt-equiv) (equal (s4vec-lsh amt x) (s4vec-lsh amt-equiv x))) :rule-classes :congruence)
Theorem:
(defthm s4vec-lsh-of-s4vec-fix-x (equal (s4vec-lsh amt (s4vec-fix x)) (s4vec-lsh amt x)))
Theorem:
(defthm s4vec-lsh-s4vec-equiv-congruence-on-x (implies (s4vec-equiv x x-equiv) (equal (s4vec-lsh amt x) (s4vec-lsh amt x-equiv))) :rule-classes :congruence)