(lhs-alias-canonicalize-replace-top x aliases) → (mv xx aliases1)
Function:
(defun lhs-alias-canonicalize-replace-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-replace-top)) (declare (ignorable __function__)) (b* (((mv first rest) (lhs-decomp x)) ((unless first) (let ((aliases (aliases-bound-fix aliases))) (mv nil aliases))) ((lhrange first) first)) (lhatom-case first.atom :z (b* (((mv restx aliases) (lhs-alias-canonicalize-replace-top rest aliases))) (mv (lhs-cons first restx) aliases)) :var (b* ((idx (svar-index first.atom.name)) (alias (getalias idx aliases)) ((mv firstx aliases) (lhs-alias-canonicalize-replace (lhs-rsh first.atom.rsh alias) idx first.w first.atom.rsh aliases)) ((mv restx aliases) (lhs-alias-canonicalize-replace-top rest aliases))) (mv (lhs-concat first.w firstx restx) aliases))))))
Theorem:
(defthm return-type-of-lhs-alias-canonicalize-replace-top.xx (b* (((mv ?xx ?aliases1) (lhs-alias-canonicalize-replace-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 return-type-of-lhs-alias-canonicalize-replace-top.aliases1 (b* (((mv ?xx ?aliases1) (lhs-alias-canonicalize-replace-top x aliases))) (and (aliases-normorderedp aliases1) (implies (svarlist-boundedp (lhs-vars x) (len aliases)) (equal (len aliases1) (len aliases))))) :rule-classes :rewrite)
Theorem:
(defthm len-aliases-of-lhs-alias-canonicalize-replace-top (implies (svarlist-boundedp (lhs-vars x) (len aliases)) (equal (len (mv-nth 1 (lhs-alias-canonicalize-replace-top x aliases))) (len aliases))))
Theorem:
(defthm lhs-alias-canonicalize-replace-top-of-lhs-fix-x (equal (lhs-alias-canonicalize-replace-top (lhs-fix x) aliases) (lhs-alias-canonicalize-replace-top x aliases)))
Theorem:
(defthm lhs-alias-canonicalize-replace-top-lhs-equiv-congruence-on-x (implies (lhs-equiv x x-equiv) (equal (lhs-alias-canonicalize-replace-top x aliases) (lhs-alias-canonicalize-replace-top x-equiv aliases))) :rule-classes :congruence)
Theorem:
(defthm lhs-alias-canonicalize-replace-top-of-aliases-bound-fix-aliases (equal (lhs-alias-canonicalize-replace-top x (aliases-bound-fix aliases)) (lhs-alias-canonicalize-replace-top x aliases)))
Theorem:
(defthm lhs-alias-canonicalize-replace-top-aliases-equiv-congruence-on-aliases (implies (aliases-equiv aliases aliases-equiv) (equal (lhs-alias-canonicalize-replace-top x aliases) (lhs-alias-canonicalize-replace-top x aliases-equiv))) :rule-classes :congruence)