(lhs-alias-canonicalize-top x aliases) → xx
Function:
(defun lhs-alias-canonicalize-top (x aliases) (declare (xargs :stobjs (aliases))) (declare (xargs :guard (and (lhs-p x) (aliases-normorderedp aliases)))) (declare (xargs :guard (svarlist-boundedp (lhs-vars x) (aliass-length aliases)))) (let ((__function__ 'lhs-alias-canonicalize-top)) (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-canonicalize-top rest aliases)) :var (b* ((idx (svar-index first.atom.name))) (lhs-concat first.w (lhs-alias-canonicalize (lhs-rsh first.atom.rsh (getalias idx aliases)) idx first.w first.atom.rsh aliases) (lhs-alias-canonicalize-top rest aliases)))))))
Theorem:
(defthm return-type-of-lhs-alias-canonicalize-top (b* ((xx (lhs-alias-canonicalize-top x aliases))) (and (lhs-p xx) (implies (svarlist-boundedp (lhs-vars x) (len aliases)) (svarlist-boundedp (lhs-vars xx) (len aliases))))) :rule-classes :rewrite)
Theorem:
(defthm lhs-alias-canonicalize-top-of-lhs-fix-x (equal (lhs-alias-canonicalize-top (lhs-fix x) aliases) (lhs-alias-canonicalize-top x aliases)))
Theorem:
(defthm lhs-alias-canonicalize-top-lhs-equiv-congruence-on-x (implies (lhs-equiv x x-equiv) (equal (lhs-alias-canonicalize-top x aliases) (lhs-alias-canonicalize-top x-equiv aliases))) :rule-classes :congruence)
Theorem:
(defthm lhs-alias-canonicalize-top-of-aliases-bound-fix-aliases (equal (lhs-alias-canonicalize-top x (aliases-bound-fix aliases)) (lhs-alias-canonicalize-top x aliases)))
Theorem:
(defthm lhs-alias-canonicalize-top-aliases-equiv-congruence-on-aliases (implies (aliases-equiv aliases aliases-equiv) (equal (lhs-alias-canonicalize-top x aliases) (lhs-alias-canonicalize-top x aliases-equiv))) :rule-classes :congruence)