Variant of defun that re-uses existing termination theorems automatically.
General Form: (defunt fn (var1 ... varn) doc-string dcl ... dcl body)
where the arguments are the same as for defun, but without any
xargs that specify
To use this utility, first evaluate the following event.
(include-book "kestrel/auto-termination/defunt-top" :dir :system)
Examples may be found in the community book,
ACL2 !>(defunt f0 (x y) (if (endp x) y (list (f0 (cddr x) (cons 23 y)) 100))) *Defunt note*: Using termination theorem for EVENS. F0 ACL2 !>:pe f0 2:x(DEFUNT F0 (X Y) ...) >L (DEFUN F0 (X Y) (DECLARE (XARGS :MEASURE (ACL2-COUNT X) :HINTS (("Goal" :BY (:FUNCTIONAL-INSTANCE F0-TERMINATION-LEMMA-3 (TD-STUB-2 F0)))))) (IF (ENDP X) Y (LIST (F0 (CDDR X) (CONS 23 Y)) 100))) ACL2 !>