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