Very nicely done video by @david explaining some of my work on #leanprover and well-founded recursion:
https://youtu.be/LOUbbiV0mWc
Kernel Reduction Redemption: How Recursion Got Better in Lean 4.27.0

YouTube
@nomeata @david When I saw the "fuel" trick I said "hey, I remember that technique from Turner's paper!" ("Elementary Strong Functional Programming", 1995.) Which I read around 2007. I'm pretty pleased with myself but I have nobody but you to boast to about it, so here it is.
@mjd @david Using a fuel parameter is of course a well established idiom, and very common. What I haven't seen yet is to keep the interface of well-founded recursion but elaborate to primitive recursion on fuel, given that using the measure of well-founded recursion (plus one) works so nicely as the initial fuel. But I am bad at literate review, so me not having seen it does not mean it’s novel.
@nomeata @mjd
Ah, the "plus one" part explains why there end up being *six* copies of "5" in `make_infinite_list 5` (instead of five copies).