Function:
(defun lhs-replace-range (start w repl x) (declare (xargs :guard (and (natp start) (natp w) (lhs-p repl) (lhs-p x)))) (let ((__function__ 'lhs-replace-range)) (declare (ignorable __function__)) (lhs-concat start x (lhs-concat w repl (lhs-rsh (+ (lnfix start) (lnfix w)) x)))))
Theorem:
(defthm lhs-p-of-lhs-replace-range (b* ((newx (lhs-replace-range start w repl x))) (lhs-p newx)) :rule-classes :rewrite)
Theorem:
(defthm lhs-replace-range-of-nfix-start (equal (lhs-replace-range (nfix start) w repl x) (lhs-replace-range start w repl x)))
Theorem:
(defthm lhs-replace-range-nat-equiv-congruence-on-start (implies (nat-equiv start start-equiv) (equal (lhs-replace-range start w repl x) (lhs-replace-range start-equiv w repl x))) :rule-classes :congruence)
Theorem:
(defthm lhs-replace-range-of-nfix-w (equal (lhs-replace-range start (nfix w) repl x) (lhs-replace-range start w repl x)))
Theorem:
(defthm lhs-replace-range-nat-equiv-congruence-on-w (implies (nat-equiv w w-equiv) (equal (lhs-replace-range start w repl x) (lhs-replace-range start w-equiv repl x))) :rule-classes :congruence)
Theorem:
(defthm lhs-replace-range-of-lhs-fix-repl (equal (lhs-replace-range start w (lhs-fix repl) x) (lhs-replace-range start w repl x)))
Theorem:
(defthm lhs-replace-range-lhs-equiv-congruence-on-repl (implies (lhs-equiv repl repl-equiv) (equal (lhs-replace-range start w repl x) (lhs-replace-range start w repl-equiv x))) :rule-classes :congruence)
Theorem:
(defthm lhs-replace-range-of-lhs-fix-x (equal (lhs-replace-range start w repl (lhs-fix x)) (lhs-replace-range start w repl x)))
Theorem:
(defthm lhs-replace-range-lhs-equiv-congruence-on-x (implies (lhs-equiv x x-equiv) (equal (lhs-replace-range start w repl x) (lhs-replace-range start w repl x-equiv))) :rule-classes :congruence)
Theorem:
(defthm lhs-vars-normorderedp-of-lhs-replace-range (implies (and (lhs-vars-normorderedp n m x) (lhs-vars-normorderedp n (+ (nfix m) (nfix start)) repl)) (lhs-vars-normorderedp n m (lhs-replace-range start w repl x))))