(vl-elabscopes-pop/update n scopes) → (mv new-scopes undo)
Function:
(defun vl-elabscopes-pop/update (n scopes) (declare (xargs :guard (and (natp n) (vl-elabscopes-p scopes)))) (let ((__function__ 'vl-elabscopes-pop/update)) (declare (ignorable __function__)) (if (zp n) (mv (vl-elabscopes-fix scopes) nil) (b* (((mv scopes undo1) (vl-elabscopes-pop/update-one scopes)) ((mv scopes undo2) (vl-elabscopes-pop/update (1- n) scopes))) (mv scopes (vl-elabpaths-append undo1 undo2))))))
Theorem:
(defthm vl-elabscopes-p-of-vl-elabscopes-pop/update.new-scopes (b* (((mv ?new-scopes ?undo) (vl-elabscopes-pop/update n scopes))) (vl-elabscopes-p new-scopes)) :rule-classes :rewrite)
Theorem:
(defthm vl-elabtraversal-p-of-vl-elabscopes-pop/update.undo (b* (((mv ?new-scopes ?undo) (vl-elabscopes-pop/update n scopes))) (vl-elabtraversal-p undo)) :rule-classes :rewrite)
Theorem:
(defthm vl-elabscopes-pop/update-of-nfix-n (equal (vl-elabscopes-pop/update (nfix n) scopes) (vl-elabscopes-pop/update n scopes)))
Theorem:
(defthm vl-elabscopes-pop/update-nat-equiv-congruence-on-n (implies (acl2::nat-equiv n n-equiv) (equal (vl-elabscopes-pop/update n scopes) (vl-elabscopes-pop/update n-equiv scopes))) :rule-classes :congruence)
Theorem:
(defthm vl-elabscopes-pop/update-of-vl-elabscopes-fix-scopes (equal (vl-elabscopes-pop/update n (vl-elabscopes-fix scopes)) (vl-elabscopes-pop/update n scopes)))
Theorem:
(defthm vl-elabscopes-pop/update-vl-elabscopes-equiv-congruence-on-scopes (implies (vl-elabscopes-equiv scopes scopes-equiv) (equal (vl-elabscopes-pop/update n scopes) (vl-elabscopes-pop/update n scopes-equiv))) :rule-classes :congruence)