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