-
Notifications
You must be signed in to change notification settings - Fork 447
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: use omega
in decreasing_tactic
#3478
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nomeata
added
the
WIP
This is work in progress, and only a PR for the sake of CI or sharing. No review yet.
label
Feb 23, 2024
github-actions
bot
added
the
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
label
Feb 23, 2024
Mathlib CI status (docs):
|
nomeata
added a commit
that referenced
this pull request
Feb 26, 2024
with this, more functions will be proven terminating automatically, namely those where after `simp_wf`, lexicographic order handling, possibly subst_vars and `simp` all remaining goals can be handled by `omega`. This does *not* remove any of the existing ad-hoc `decreasing_trivial` rules based on `apply` and `assumption`, to not regress over the status quo (these rules may apply in cases where `omega` wouldn't “see” everything, but `apply` due to defeq works). Additionally, this makes bootstrapping easier; early in `Init` where `omega` does not work yet these other tactics can still be used. (Using a single `omega`-based tactic was tried in #3478 but isn’t quite possible yet, and will be postponed until we have better automation including forward reasoning.)
Closing in favor of #3503 |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 27, 2024
with this, more functions will be proven terminating automatically, namely those where after `simp_wf`, lexicographic order handling, possibly `subst_vars` the remaining goal can be solved by `omega`. Note that `simp_wf` already does simplification of the goal, so this adds `omega`, not `(try simp) <;> omega` here. There are certainly cases where `(try simp) <;> omega` will solve more goals (e.g. due to the `subst_vars` in `decreasing_with`), and `(try simp at *) <;> omega` even more. This PR errs on the side of taking smaller steps. Just appending `<;> omega` to the existing `simp (config := { arith := true, failIfUnchanged := false })` call doesn’t work nicely, as that leaves forms like `Nat.sub` in the goal that `omega` does not seem to recognize. This does *not* remove any of the existing ad-hoc `decreasing_trivial` rules based on `apply` and `assumption`, to not regress over the status quo (these rules may apply in cases where `omega` wouldn't “see” everything, but `apply` due to defeq works). Additionally, just extending makes bootstrapping easier; early in `Init` where `omega` does not work yet these other tactics can still be used. (Using a single `omega`-based tactic was tried in #3478 but isn’t quite possible yet, and will be postponed until we have better automation including forward reasoning.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
WIP
This is work in progress, and only a PR for the sake of CI or sharing. No review yet.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.