Function:
(defun lhs-alias-norm (x aliases) (declare (xargs :stobjs (aliases))) (declare (xargs :guard (lhs-p x))) (declare (xargs :guard (svarlist-boundedp (lhs-vars x) (aliass-length aliases)))) (let ((__function__ 'lhs-alias-norm)) (declare (ignorable __function__)) (b* (((mv first rest) (lhs-decomp x)) ((unless first) nil) ((lhrange first) first)) (lhatom-case first.atom :z (lhs-cons first (lhs-alias-norm rest aliases)) :var (b* ((idx (svar-index first.atom.name))) (lhs-concat first.w (lhs-rsh first.atom.rsh (get-alias idx aliases)) (lhs-alias-norm rest aliases)))))))
Theorem:
(defthm lhs-p-of-lhs-alias-norm (b* ((xx (lhs-alias-norm x aliases))) (lhs-p xx)) :rule-classes :rewrite)
Theorem:
(defthm lhs-alias-norm-of-lhs-fix-x (equal (lhs-alias-norm (lhs-fix x) aliases) (lhs-alias-norm x aliases)))
Theorem:
(defthm lhs-alias-norm-lhs-equiv-congruence-on-x (implies (lhs-equiv x x-equiv) (equal (lhs-alias-norm x aliases) (lhs-alias-norm x-equiv aliases))) :rule-classes :congruence)
Theorem:
(defthm lhs-alias-norm-of-lhslist-fix-aliases (equal (lhs-alias-norm x (lhslist-fix aliases)) (lhs-alias-norm x aliases)))
Theorem:
(defthm lhs-alias-norm-lhslist-equiv-congruence-on-aliases (implies (lhslist-equiv aliases aliases-equiv) (equal (lhs-alias-norm x aliases) (lhs-alias-norm x aliases-equiv))) :rule-classes :congruence)
Theorem:
(defthm vars-of-lhs-alias-norm (implies (not (member v (aliases-vars aliases))) (not (member v (lhs-vars (lhs-alias-norm x aliases))))))