(s4vec upper lower) → result
Function:
(defun s4vec (upper lower) (declare (xargs :guard (and (sparseint-p upper) (sparseint-p lower)))) (let ((__function__ 's4vec)) (declare (ignorable __function__)) (b* ((upper (sparseint-fix upper)) (lower (sparseint-fix lower))) (if (equal upper lower) (if (integerp upper) upper (list upper)) (cons upper lower)))))
Theorem:
(defthm s4vec-p-of-s4vec (b* ((result (s4vec upper lower))) (s4vec-p result)) :rule-classes :rewrite)
Theorem:
(defthm s4vec->upper-of-s4vec (b* ((?result (s4vec upper lower))) (equal (s4vec->upper result) (sparseint-fix upper))))
Theorem:
(defthm s4vec->lower-of-s4vec (b* ((?result (s4vec upper lower))) (equal (s4vec->lower result) (sparseint-fix lower))))
Theorem:
(defthm s4vec-of-sparseint-fix-upper (equal (s4vec (sparseint-fix upper) lower) (s4vec upper lower)))
Theorem:
(defthm s4vec-sparseint-equiv-congruence-on-upper (implies (sparseint-equiv upper upper-equiv) (equal (s4vec upper lower) (s4vec upper-equiv lower))) :rule-classes :congruence)
Theorem:
(defthm s4vec-of-sparseint-fix-lower (equal (s4vec upper (sparseint-fix lower)) (s4vec upper lower)))
Theorem:
(defthm s4vec-sparseint-equiv-congruence-on-lower (implies (sparseint-equiv lower lower-equiv) (equal (s4vec upper lower) (s4vec upper lower-equiv))) :rule-classes :congruence)