-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Guess lexicographic order for well-founded recursion #2874
Conversation
|
f108bc1
to
f3344ff
Compare
!bench |
Here are the benchmark results for commit f3344ff.Found no runs to compare against. |
Whohoo, only one bug found via the lean test suite, and mathlib goes through on the first attempt :-) |
these are compagnions to `MatcherApp.addArg` and `CasesOnApp.addArg` when one only has a type to transform, but not a concrete values. Prerequisite for guessing lexicographic order (#2874)
657e3c7
to
e8b6cb3
Compare
!bench |
Here are the benchmark results for commit e8b6cb3. Benchmark Metric Change
================================================
- stdlib instructions 1.1% (2531.8 σ)
- stdlib tactic execution 24.1% (52.1 σ)
- stdlib task-clock 1.2% (12.2 σ)
- stdlib wall-clock 1.9% (56.6 σ) |
!bench |
Here are the benchmark results for commit 64a8074. Benchmark Metric Change
=====================================================
- lake build no-op instructions 2.4% (12.0 σ)
- stdlib tactic execution 24.6% (51.5 σ)
- stdlib task-clock 1.8% (20.5 σ) |
Here is the result for mathlib, if I got the commits right (it is quite tedious to do, or I am doing it wrong): I don't know how to read these reports yet. It seems that on mathlib there is no stderiv, and thus I cannot sort the table by regression? In any case, it seems that the optimization in #2954 kicks in often enough to fix the mathlib regressions: |
these are compagnions to `MatcherApp.addArg` and `CasesOnApp.addArg` when one only has an expression (which may not be a type) to transform, but not a concret values. This is a prerequisite for guessing lexicographic order (#2874). Keeping this on a separate PR because it’s sizable, and has a clear independent specification.
This improves Lean’s capabilities to guess the termination measure for well-founded
recursion, by also trying lexicographic orders. For example:
now just works.
The module docstring of
Lean.Elab.PreDefinition.WF.GuessLex
tells the technical story.Fixes #2837