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