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