(sparseint$-sign-ext n x x.height) → (mv ext height)
Function:
(defun sparseint$-sign-ext (n x x.height) (declare (xargs :guard (and (posp n) (sparseint$-p x) (natp x.height)))) (declare (xargs :guard (and (sparseint$-height-correctp x) (equal x.height (sparseint$-height x))))) (let ((__function__ 'sparseint$-sign-ext)) (declare (ignorable __function__)) (b* ((n (lposfix n)) (x.height (mbe :logic (sparseint$-height x) :exec x.height))) (sparseint$-concatenate-rebalance n x x.height (sparseint$-leaf (- (sparseint$-bit (1- n) x))) 0))))
Theorem:
(defthm sparseint$-p-of-sparseint$-sign-ext.ext (b* (((mv ?ext ?height) (sparseint$-sign-ext n x x.height))) (sparseint$-p ext)) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-sparseint$-sign-ext.height (b* (((mv ?ext ?height) (sparseint$-sign-ext n x x.height))) (equal height (sparseint$-height ext))) :rule-classes :rewrite)
Theorem:
(defthm sparseint$-sign-ext-height-correct (b* (((mv ?ext ?height) (sparseint$-sign-ext n x x.height))) (implies (sparseint$-height-correctp x) (sparseint$-height-correctp ext))))
Theorem:
(defthm sparseint$-sign-ext-correct (b* (((mv ?ext ?height) (sparseint$-sign-ext n x x.height))) (equal (sparseint$-val ext) (logext n (sparseint$-val x)))))
Theorem:
(defthm sparseint$-sign-ext-of-pos-fix-n (equal (sparseint$-sign-ext (pos-fix n) x x.height) (sparseint$-sign-ext n x x.height)))
Theorem:
(defthm sparseint$-sign-ext-pos-equiv-congruence-on-n (implies (pos-equiv n n-equiv) (equal (sparseint$-sign-ext n x x.height) (sparseint$-sign-ext n-equiv x x.height))) :rule-classes :congruence)
Theorem:
(defthm sparseint$-sign-ext-of-sparseint$-fix-x (equal (sparseint$-sign-ext n (sparseint$-fix x) x.height) (sparseint$-sign-ext n x x.height)))
Theorem:
(defthm sparseint$-sign-ext-sparseint$-equiv-congruence-on-x (implies (sparseint$-equiv x x-equiv) (equal (sparseint$-sign-ext n x x.height) (sparseint$-sign-ext n x-equiv x.height))) :rule-classes :congruence)
Theorem:
(defthm sparseint$-sign-ext-of-nfix-x.height (equal (sparseint$-sign-ext n x (nfix x.height)) (sparseint$-sign-ext n x x.height)))
Theorem:
(defthm sparseint$-sign-ext-nat-equiv-congruence-on-x.height (implies (nat-equiv x.height x.height-equiv) (equal (sparseint$-sign-ext n x x.height) (sparseint$-sign-ext n x x.height-equiv))) :rule-classes :congruence)