This PR uses a more simple approach to proving the unfolding theorem for a function defined by well-founded recursion. Instead of looping a bunch of tactics, it uses simp in single-pass mode to (try to) exactly undo the changes done in `WF.Fix`, using a dedicated theorem that pushes the extra argument in for each matcher (or `casesOn`). Improves performance for recursive functions with large `match` statements, as in #9598.
11 lines
203 B
Text
11 lines
203 B
Text
/-!
|
|
Checks that that the wfrec unfold theorem can be generated even if the
|
|
function type is not manifestly a forall.
|
|
-/
|
|
|
|
def T := Nat → Nat
|
|
|
|
def f : T
|
|
| 0 => 0
|
|
| n + 1 => f n + 1
|
|
termination_by n => n
|