Type of, and constructor for, a lambda function, used in the FTY support for pseudo-terms.
(pseudo-lambda formals body) → lambda
Function:
(defun pseudo-lambda (formals body) (declare (xargs :guard (and (symbol-listp formals) (pseudo-termp body)))) (let ((__function__ 'pseudo-lambda)) (declare (ignorable __function__)) (mbe :logic (list 'lambda (replace-non-symbols-with-nil formals) (pseudo-term-fix body)) :exec (list 'lambda formals body))))
Theorem:
(defthm pseudo-lambda-p-of-pseudo-lambda (b* ((lambda (pseudo-lambda formals body))) (pseudo-lambda-p lambda)) :rule-classes (:rewrite (:type-prescription :typed-term (pseudo-lambda formals body))))
Theorem:
(defthm pseudo-lambda->formals-of-pseudo-lambda (equal (pseudo-lambda->formals (pseudo-lambda formals body)) (replace-non-symbols-with-nil formals)))
Theorem:
(defthm pseudo-lambda->body-of-pseudo-lambda (equal (pseudo-lambda->body (pseudo-lambda body body)) (pseudo-term-fix body)))
Theorem:
(defthm pseudo-lambda-of-accessors (equal (pseudo-lambda (pseudo-lambda->formals x) (pseudo-lambda->body x)) (pseudo-lambda-fix x)))
Theorem:
(defthm pseudo-lambda-of-pseudo-term-fix-body (equal (pseudo-lambda formals (pseudo-term-fix body)) (pseudo-lambda formals body)))
Theorem:
(defthm pseudo-lambda-pseudo-term-equiv-congruence-on-body (implies (pseudo-term-equiv body body-equiv) (equal (pseudo-lambda formals body) (pseudo-lambda formals body-equiv))) :rule-classes :congruence)