Get the next field from a stmt-for.
(stmt-for->next x) → next
This is an ordinary field accessor created by fty::defprod.
Function:
(defun stmt-for->next$inline (x) (declare (xargs :guard (stmtp x))) (declare (xargs :guard (equal (stmt-kind x) :for))) (let ((__function__ 'stmt-for->next)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (stmt-kind x) :for) x))) (expr-option-fix (std::da-nth 2 (cdr x)))) :exec (std::da-nth 2 (cdr x)))))
Theorem:
(defthm expr-optionp-of-stmt-for->next (b* ((next (stmt-for->next$inline x))) (expr-optionp next)) :rule-classes :rewrite)
Theorem:
(defthm stmt-for->next$inline-of-stmt-fix-x (equal (stmt-for->next$inline (stmt-fix x)) (stmt-for->next$inline x)))
Theorem:
(defthm stmt-for->next$inline-stmt-equiv-congruence-on-x (implies (stmt-equiv x x-equiv) (equal (stmt-for->next$inline x) (stmt-for->next$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm stmt-for->next-when-wrong-kind (implies (not (equal (stmt-kind x) :for)) (equal (stmt-for->next x) (expr-option-fix nil))))