lean4-htt/tests
Joachim Breitner f9dc77673b
feat: dedicated fix operator for well-founded recursion on Nat (#7965)
This PR lets recursive functions defined by well-founded recursion use a
different `fix` function when the termination measure is of type `Nat`.
This fix-point operator use structural recursion on “fuel”, initialized
by the given measure, and is thus reasonable to reduce, e.g. in `by
decide` proofs.

Extra provisions are in place that the fixpoint operator only starts
reducing when the fuel is fully known, to prevent “accidential” defeqs
when the remaining fuel for the recursive calls match the initial fuel
for that recursive argument.

To opt-out, the idiom `termination_by (n,0)` can be used.

We still use `@[irreducible]` as the default for such recursive
definitions, to avoid unexpected `defeq` lemmas. Making these functions
`@[semireducible]` by default showed performance regressions in lean.
When the measure is of type `Nat`, the system will accept an explicit
`@[semireducible]` without the usual warning.

Fixes #5234. Fixes: #11181.
2025-12-01 12:51:55 +00:00
..
bench feat: reduce server memory consumption (#11162) 2025-12-01 10:53:23 +00:00
bench-radar chore: update and add benchmark metrics (#11420) 2025-11-28 14:40:43 +00:00
compiler chore: minor String API improvements (#11439) 2025-12-01 11:44:14 +00:00
elabissues
ir
lake chore: lake: update tests/toml (#11314) 2025-11-22 04:41:58 +00:00
lean feat: dedicated fix operator for well-founded recursion on Nat (#7965) 2025-12-01 12:51:55 +00:00
pkg feat: dedicated fix operator for well-founded recursion on Nat (#7965) 2025-12-01 12:51:55 +00:00
playground
plugin chore: re-enable tests (#10923) 2025-10-23 08:38:57 +00:00
simpperf
.gitignore
common.sh chore: make workspaceSymbol benchmarks modules (#11094) 2025-11-05 18:40:39 +00:00
lakefile.toml
lean-toolchain