Number of scopes in the top frame of a computation state with a non-empty call stack.
(compustate-top-frame-scopes-number compst) → n
We use this as an enabled abbreviation.
Function:
(defun compustate-top-frame-scopes-number (compst) (declare (xargs :guard (compustatep compst))) (declare (xargs :guard (> (compustate-frames-number compst) 0))) (let ((__function__ 'compustate-top-frame-scopes-number)) (declare (ignorable __function__)) (car (compustate-scopes-numbers compst))))
Theorem:
(defthm posp-of-compustate-top-frame-scopes-number (implies (> (compustate-frames-number compst) 0) (b* ((n (compustate-top-frame-scopes-number compst))) (posp n))) :rule-classes :type-prescription)
Theorem:
(defthm compustate-top-frame-scopes-number-of-compustate-fix-compst (equal (compustate-top-frame-scopes-number (compustate-fix compst)) (compustate-top-frame-scopes-number compst)))
Theorem:
(defthm compustate-top-frame-scopes-number-compustate-equiv-congruence-on-compst (implies (compustate-equiv compst compst-equiv) (equal (compustate-top-frame-scopes-number compst) (compustate-top-frame-scopes-number compst-equiv))) :rule-classes :congruence)