Function:
(defun lhs-varbound-fix (bound offset x) (declare (xargs :guard (and (integerp bound) (natp offset) (lhs-p x)))) (declare (xargs :guard (lhs-vars-normorderedp bound offset x))) (let ((__function__ 'lhs-varbound-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) (lhs-fix x) (cons (b* (((lhrange xf) (car x))) (lhrange xf.w (lhatom-bound-fix bound offset xf.atom))) (lhs-varbound-fix bound (+ (lnfix offset) (lhrange->w (car x))) (cdr x)))) :exec x)))
Theorem:
(defthm return-type-of-lhs-varbound-fix (b* ((xx (lhs-varbound-fix bound offset x))) (and (lhs-p xx) (lhs-vars-normorderedp bound offset xx))) :rule-classes :rewrite)
Theorem:
(defthm lhs-varbound-fix-when-lhs-vars-normorderedp (implies (lhs-vars-normorderedp bound offset x) (equal (lhs-varbound-fix bound offset x) (lhs-fix x))))
Theorem:
(defthm lhs-varbound-fix-of-ifix-bound (equal (lhs-varbound-fix (ifix bound) offset x) (lhs-varbound-fix bound offset x)))
Theorem:
(defthm lhs-varbound-fix-int-equiv-congruence-on-bound (implies (int-equiv bound bound-equiv) (equal (lhs-varbound-fix bound offset x) (lhs-varbound-fix bound-equiv offset x))) :rule-classes :congruence)
Theorem:
(defthm lhs-varbound-fix-of-nfix-offset (equal (lhs-varbound-fix bound (nfix offset) x) (lhs-varbound-fix bound offset x)))
Theorem:
(defthm lhs-varbound-fix-nat-equiv-congruence-on-offset (implies (nat-equiv offset offset-equiv) (equal (lhs-varbound-fix bound offset x) (lhs-varbound-fix bound offset-equiv x))) :rule-classes :congruence)
Theorem:
(defthm lhs-varbound-fix-of-lhs-fix-x (equal (lhs-varbound-fix bound offset (lhs-fix x)) (lhs-varbound-fix bound offset x)))
Theorem:
(defthm lhs-varbound-fix-lhs-equiv-congruence-on-x (implies (lhs-equiv x x-equiv) (equal (lhs-varbound-fix bound offset x) (lhs-varbound-fix bound offset x-equiv))) :rule-classes :congruence)