Get the top field from a vl-scopestack-local.
(vl-scopestack-local->top x) → top
This is an ordinary field accessor created by defprod.
Function:
(defun vl-scopestack-local->top$inline (x) (declare (xargs :guard (vl-scopestack-p x))) (declare (xargs :guard (equal (vl-scopestack-kind x) :local))) (let ((__function__ 'vl-scopestack-local->top)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (vl-scopestack-kind x) :local) x))) (vl-scope-fix (car x))) :exec (car x))))
Theorem:
(defthm vl-scope-p-of-vl-scopestack-local->top (b* ((top (vl-scopestack-local->top$inline x))) (vl-scope-p top)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopestack-local->top$inline-of-vl-scopestack-fix-x (equal (vl-scopestack-local->top$inline (vl-scopestack-fix x)) (vl-scopestack-local->top$inline x)))
Theorem:
(defthm vl-scopestack-local->top$inline-vl-scopestack-equiv-congruence-on-x (implies (vl-scopestack-equiv x x-equiv) (equal (vl-scopestack-local->top$inline x) (vl-scopestack-local->top$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-scopestack-local->top-when-wrong-kind (implies (not (equal (vl-scopestack-kind x) :local)) (equal (vl-scopestack-local->top x) (vl-scope-fix nil))))