(vl-elabscopes->top-scope x &key (allow-empty 'nil)) → scope
Function:
(defun vl-elabscopes->top-scope-fn (x allow-empty) (declare (xargs :guard (vl-elabscopes-p x))) (let ((__function__ 'vl-elabscopes->top-scope)) (declare (ignorable __function__)) (b* ((x (vl-elabscopes-fix x))) (if (atom x) (prog2$ (or allow-empty (raise "Empty elabscopes")) (make-vl-elabscope)) (cdar x)))))
Theorem:
(defthm vl-elabscope-p-of-vl-elabscopes->top-scope (b* ((scope (vl-elabscopes->top-scope-fn x allow-empty))) (vl-elabscope-p scope)) :rule-classes :rewrite)
Theorem:
(defthm vl-elabscopes->top-scope-fn-of-vl-elabscopes-fix-x (equal (vl-elabscopes->top-scope-fn (vl-elabscopes-fix x) allow-empty) (vl-elabscopes->top-scope-fn x allow-empty)))
Theorem:
(defthm vl-elabscopes->top-scope-fn-vl-elabscopes-equiv-congruence-on-x (implies (vl-elabscopes-equiv x x-equiv) (equal (vl-elabscopes->top-scope-fn x allow-empty) (vl-elabscopes->top-scope-fn x-equiv allow-empty))) :rule-classes :congruence)