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