Function:
(defun lhs-add-namespace (namespace x) (declare (xargs :guard (and (name-p namespace) (lhs-p x)))) (declare (xargs :guard (svarlist-addr-p (lhs-vars x)))) (let ((__function__ 'lhs-add-namespace)) (declare (ignorable __function__)) (b* (((when (atom x)) nil) ((lhrange first) (lhrange-fix (car x)))) (cons (lhatom-case first.atom :z first :var (change-lhrange first :atom (change-lhatom-var first.atom :name (svar-add-namespace namespace first.atom.name)))) (lhs-add-namespace namespace (cdr x))))))
Theorem:
(defthm return-type-of-lhs-add-namespace (b* ((xx (lhs-add-namespace namespace x))) (and (lhs-p xx) (svarlist-addr-p (lhs-vars xx)))) :rule-classes :rewrite)
Theorem:
(defthm lhs-add-namespace-of-name-fix-namespace (equal (lhs-add-namespace (name-fix namespace) x) (lhs-add-namespace namespace x)))
Theorem:
(defthm lhs-add-namespace-name-equiv-congruence-on-namespace (implies (name-equiv namespace namespace-equiv) (equal (lhs-add-namespace namespace x) (lhs-add-namespace namespace-equiv x))) :rule-classes :congruence)
Theorem:
(defthm lhs-add-namespace-of-lhs-fix-x (equal (lhs-add-namespace namespace (lhs-fix x)) (lhs-add-namespace namespace x)))
Theorem:
(defthm lhs-add-namespace-lhs-equiv-congruence-on-x (implies (lhs-equiv x x-equiv) (equal (lhs-add-namespace namespace x) (lhs-add-namespace namespace x-equiv))) :rule-classes :congruence)