Skip to content
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: WF.GuessLex: If there is only one plausible measure, use it #2954

Merged
merged 40 commits into from
Nov 27, 2023

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented Nov 23, 2023

If here is only one plausible measure, there is no point having the GuessLex code see if it
is terminating, running all the tactics, only for the MkFix code then run the tactics again.

So if there is only one plausible measure (non-mutual recursion with only one varying
parameter), just use that measure.

Side benefit: If the function isn’t terminating, more detailed error messages are shown
(failing proof goals), located at the recursive calls.

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)
it avoids some unnecessary work, and gives better error message
(squiggly lines under the failing recursive calls).
@leanprover-community-mathlib4-bot
Copy link
Collaborator

leanprover-community-mathlib4-bot commented Nov 23, 2023

  • ❗ Mathlib CI will not be attempted unless you rebase your PR onto the 'nightly' branch. (2023-11-23 20:14:32)
  • ❗ Mathlib CI can not be attempted yet, as the 'nightly-testing-2023-11-24' branch does not exist there yet. We will retry when you push more commits. It may be necessary to rebase onto 'nightly' tomorrow. (2023-11-24 09:49:21)
  • ✅ Mathlib branch lean-pr-testing-2954 has successfully built against this PR. (2023-11-24 15:02:15) View Log
  • 🟡 Mathlib branch lean-pr-testing-2954 build against this PR was cancelled. (2023-11-27 10:25:38) View Log
  • ✅ Mathlib branch lean-pr-testing-2954 has successfully built against this PR. (2023-11-27 11:34:36) View Log

@nomeata nomeata changed the base branch from master to joachim/guess-lex November 24, 2023 06:42
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 24, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Nov 24, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 27, 2023
@nomeata nomeata marked this pull request as ready for review November 27, 2023 09:37
@nomeata
Copy link
Collaborator Author

nomeata commented Nov 27, 2023

This seems straightforward and reasonable, and fixes some of the performance regressions of introducing GuessLex (#2960). Will merge right after that (but separately for bisecting and more helpful history).

leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 27, 2023
@nomeata nomeata changed the base branch from joachim/guess-lex to master November 27, 2023 16:40
@nomeata nomeata added this pull request to the merge queue Nov 27, 2023
@nomeata nomeata removed this pull request from the merge queue due to a manual request Nov 27, 2023
@nomeata nomeata changed the base branch from master to joachim/guess-lex November 27, 2023 16:41
Base automatically changed from joachim/guess-lex to master November 27, 2023 18:50
@nomeata nomeata enabled auto-merge November 27, 2023 22:00
@nomeata nomeata added this pull request to the merge queue Nov 27, 2023
Merged via the queue into master with commit ffbea84 Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants