Generate the definition of
the
(tailrec-gen-alpha-fn old$ test updates names-to-avoid wrld) → (mv event name updated-names-to-avoid)
This function is generated only locally,
because its purpose is just to prove local theorems
(
The name used for
Function:
(defun tailrec-gen-alpha-fn (old$ test updates names-to-avoid wrld) (declare (xargs :guard (and (symbolp old$) (pseudo-termp test) (pseudo-term-listp updates) (symbol-listp names-to-avoid) (plist-worldp wrld)))) (let ((__function__ 'tailrec-gen-alpha-fn)) (declare (ignorable __function__)) (b* (((mv name names-to-avoid) (fresh-logical-name-with-$s-suffix 'alpha 'function names-to-avoid wrld)) (formals (formals old$ wrld)) (body (cons 'if (cons test (cons (cons 'list formals) (cons (cons name updates) 'nil))))) (wfrel (well-founded-relation old$ wrld)) (measure (measure old$ wrld)) (termination-hints (cons (cons '"Goal" (cons ':use (cons (cons ':termination-theorem (cons old$ 'nil)) '(:in-theory nil)))) 'nil)) (event (cons 'local (cons (cons 'defun (cons name (cons formals (cons (cons 'declare (cons (cons 'xargs (cons ':well-founded-relation (cons wfrel (cons ':measure (cons measure (cons ':hints (cons termination-hints '(:guard t :verify-guards nil :normalize nil)))))))) 'nil)) (cons body 'nil))))) 'nil)))) (mv event name names-to-avoid))))