-
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 default decreasing_trivial #3503
Merged
Merged
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
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.)
nomeata
changed the title
feat: Use omega in default decreasing_trivial
feat: use omega in default decreasing_trivial
Feb 26, 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 26, 2024
Mathlib CI status (docs):
|
nomeata
added a commit
that referenced
this pull request
Feb 27, 2024
with this, hopefully more obvious array accesses will be handled automatically. Just like #3503, this PR does not investiate which of the exitsting tactics in `get_elem_tactic_trivial` are subsumed now and could be dropped without (too much) breakage.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 27, 2024
with this, hopefully more obvious array accesses will be handled automatically. Just like #3503, this PR does not investiate which of the exitsting tactics in `get_elem_tactic_trivial` are subsumed now and could be dropped without (too much) breakage.
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
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.
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 byomega
.Note that
simp_wf
already does simplification of the goal, sothis adds
omega
, not(try simp) <;> omega
here.There are certainly cases where
(try simp) <;> omega
will solve moregoals (e.g. due to the
subst_vars
indecreasing_with
), and(try simp at *) <;> omega
even more. This PR errs on the side of takingsmaller steps.
Just appending
<;> omega
to the existingsimp (config := { arith := true, failIfUnchanged := false })
calldoesn’t work nicely, as that leaves forms like
Nat.sub
in the goal thatomega
does not seem to recognize.This does not remove any of the existing ad-hoc
decreasing_trivial
rules based on
apply
andassumption
, to not regress over the statusquo (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
whereomega
does not work yet these other tactics can still be used.(Using a single
omega
-based tactic was tried in #3478 but isn’t quitepossible yet, and will be postponed until we have better automation
including forward reasoning.)