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