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