I have written a custom size function size2
for my datatype. Using this function I can manually prove the termination of my function:
termination
apply (relation "measure (λ(a,b,c). size2 c)")
apply auto
done
Is there a way to make fun
use my alternative size function for the automatic termination proof?
A function
f
can be registered as a measure function for the termination prover by declaring the lemmais_measure f
with the attributemeasure_function
. In your case, this looks as follows.Then,
lexicographic_order
, whichfun
uses, andsize_change
trysize2
, too.