Function:
(defun s4vec-override (strong weak) (declare (xargs :guard (and (s4vec-p strong) (s4vec-p weak)))) (let ((__function__ 's4vec-override)) (declare (ignorable __function__)) (b* (((s4vec strong)) ((s4vec weak))) (s4vec (sparseint-bitor (sparseint-bitand strong.lower weak.upper) strong.upper) (sparseint-bitand (sparseint-bitor strong.upper weak.lower) strong.lower)))))
Theorem:
(defthm s4vec-p-of-s4vec-override (b* ((res (s4vec-override strong weak))) (s4vec-p res)) :rule-classes :rewrite)
Theorem:
(defthm s4vec-override-correct (b* ((?res (s4vec-override strong weak))) (equal (s4vec->4vec res) (4vec-override (s4vec->4vec strong) (s4vec->4vec weak)))))
Theorem:
(defthm s4vec-override-of-s4vec-fix-strong (equal (s4vec-override (s4vec-fix strong) weak) (s4vec-override strong weak)))
Theorem:
(defthm s4vec-override-s4vec-equiv-congruence-on-strong (implies (s4vec-equiv strong strong-equiv) (equal (s4vec-override strong weak) (s4vec-override strong-equiv weak))) :rule-classes :congruence)
Theorem:
(defthm s4vec-override-of-s4vec-fix-weak (equal (s4vec-override strong (s4vec-fix weak)) (s4vec-override strong weak)))
Theorem:
(defthm s4vec-override-s4vec-equiv-congruence-on-weak (implies (s4vec-equiv weak weak-equiv) (equal (s4vec-override strong weak) (s4vec-override strong weak-equiv))) :rule-classes :congruence)