Constructor for a lambda call (
(pseudo-term-lambda formals body args) → term
Function:
(defun pseudo-term-lambda (formals body args) (declare (xargs :guard (and (symbol-listp formals) (pseudo-termp body) (pseudo-term-listp args)))) (declare (xargs :guard (equal (len args) (len formals)))) (let ((__function__ 'pseudo-term-lambda)) (declare (ignorable __function__)) (mbe :logic (cons (pseudo-lambda formals body) (take (len formals) (pseudo-term-list-fix args))) :exec (cons (list 'lambda formals body) args))))
Theorem:
(defthm pseudo-termp-of-pseudo-term-lambda (b* ((term (pseudo-term-lambda formals body args))) (pseudo-termp term)) :rule-classes :rewrite)
Theorem:
(defthm kind-of-pseudo-term-lambda (equal (pseudo-term-kind (pseudo-term-lambda formals body args)) :lambda))
Theorem:
(defthm pseudo-term-lambda->fn-of-pseudo-term-lambda (equal (pseudo-term-lambda->fn (pseudo-term-lambda formals body args)) (pseudo-lambda formals body)))
Theorem:
(defthm pseudo-term-call->args-of-pseudo-term-lambda (equal (pseudo-term-call->args (pseudo-term-lambda formals body args)) (take (len formals) (pseudo-term-list-fix args))))
Theorem:
(defthm pseudo-term-lambda->formals-of-pseudo-term-lambda (equal (pseudo-term-lambda->formals (pseudo-term-lambda formals body args)) (replace-non-symbols-with-nil formals)))
Theorem:
(defthm pseudo-term-lambda->body-of-pseudo-term-lambda (equal (pseudo-term-lambda->body (pseudo-term-lambda formals body args)) (pseudo-term-fix body)))
Theorem:
(defthm base-ev-of-pseudo-term-lambda (equal (base-ev (pseudo-term-lambda formals body args) a) (base-ev body (pairlis$ formals (base-ev-list args a)))))
Theorem:
(defthm base-ev-when-pseudo-term-lambda (implies (equal (pseudo-term-kind x) :lambda) (equal (base-ev x a) (base-ev (pseudo-term-lambda->body x) (pairlis$ (pseudo-term-lambda->formals x) (base-ev-list (pseudo-term-call->args x) a))))))
Theorem:
(defthm pseudo-term-lambda-of-accessors (implies (equal (pseudo-term-kind x) :lambda) (equal (pseudo-term-lambda (pseudo-term-lambda->formals x) (pseudo-term-lambda->body x) (pseudo-term-call->args x)) (pseudo-term-fix x))))
Theorem:
(defthm pseudo-term-lambda-of-pseudo-term-fix-body (equal (pseudo-term-lambda formals (pseudo-term-fix body) args) (pseudo-term-lambda formals body args)))
Theorem:
(defthm pseudo-term-lambda-pseudo-term-equiv-congruence-on-body (implies (pseudo-term-equiv body body-equiv) (equal (pseudo-term-lambda formals body args) (pseudo-term-lambda formals body-equiv args))) :rule-classes :congruence)
Theorem:
(defthm pseudo-term-lambda-of-pseudo-term-list-fix-args (equal (pseudo-term-lambda formals body (pseudo-term-list-fix args)) (pseudo-term-lambda formals body args)))
Theorem:
(defthm pseudo-term-lambda-pseudo-term-list-equiv-congruence-on-args (implies (pseudo-term-list-equiv args args-equiv) (equal (pseudo-term-lambda formals body args) (pseudo-term-lambda formals body args-equiv))) :rule-classes :congruence)