(vl-elabscopes-root/update scopes) → (mv new-scopes undo)
Function:
(defun vl-elabscopes-root/update (scopes) (declare (xargs :guard (vl-elabscopes-p scopes))) (let ((__function__ 'vl-elabscopes-root/update)) (declare (ignorable __function__)) (b* ((scopes (vl-elabscopes-fix scopes)) ((when (atom scopes)) (raise "Can't get root scope of empty elabscopes") (mv scopes nil)) ((when (atom (cdr scopes))) (mv scopes nil)) ((mv scopes undo1) (vl-elabscopes-pop/update-one scopes)) ((mv scopes undo2) (vl-elabscopes-root/update scopes))) (mv scopes (vl-elabpaths-append undo1 undo2)))))
Theorem:
(defthm vl-elabscopes-p-of-vl-elabscopes-root/update.new-scopes (b* (((mv ?new-scopes ?undo) (vl-elabscopes-root/update scopes))) (vl-elabscopes-p new-scopes)) :rule-classes :rewrite)
Theorem:
(defthm vl-elabtraversal-p-of-vl-elabscopes-root/update.undo (b* (((mv ?new-scopes ?undo) (vl-elabscopes-root/update scopes))) (vl-elabtraversal-p undo)) :rule-classes :rewrite)
Theorem:
(defthm vl-elabscopes-root/update-of-vl-elabscopes-fix-scopes (equal (vl-elabscopes-root/update (vl-elabscopes-fix scopes)) (vl-elabscopes-root/update scopes)))
Theorem:
(defthm vl-elabscopes-root/update-vl-elabscopes-equiv-congruence-on-scopes (implies (vl-elabscopes-equiv scopes scopes-equiv) (equal (vl-elabscopes-root/update scopes) (vl-elabscopes-root/update scopes-equiv))) :rule-classes :congruence)