This PR ports Batteries.WF to Init.WFC for executable well-founded fixpoints. It introduces `csimp` theorems to replace the recursors and non-executable definitions with executable definitions. This ocassionally comes up on Zulip as it prevents admiting definitions generated from well-founded induction. (e.g., [#lean4 > Computable WellFounded.fix](https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Computable.20WellFounded.2Efix/with/529347861) and [#mathlib4 > Why Nat.find is computable, when Wellfounded.fix isn't?](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Why.20Nat.2Efind.20is.20computable.2C.20when.20Wellfounded.2Efix.20isn't.3F/with/545143617)). This was motivated by running into poor elaboration performance with recursive definitions involving complex inductive types generated by a custom elaborator. It would be helpful to explore bypassing the elaborator and generating elaborated terms directly, but this requires an executable fixpoint (such as `WellFounded.fixC` introduced in batteries). |
||
|---|---|---|
| .. | ||
| bench | ||
| bench-radar | ||
| compiler | ||
| elabissues | ||
| ir | ||
| lake | ||
| lean | ||
| pkg | ||
| playground | ||
| plugin | ||
| simpperf | ||
| .gitignore | ||
| common.sh | ||
| lakefile.toml | ||
| lean-toolchain | ||