[Merged by Bors] - fix: update context in recursive calls in split_ifs#761
Closed
[Merged by Bors] - fix: update context in recursive calls in split_ifs#761
Conversation
Member
Author
|
I'm kind of confused about why this existing testcase works without this change: Lines 13 to 18 in 91897c4 |
Member
Author
|
Ah, the difference is that the new testcase puts the nested ifs within a hypothesis. So if I update the old testcase like this: example (x : Nat) (p : Prop) [Decidable p]
(h : x = if (if p then False else True) then y else y)
: x = y := by
split_ifs at h
-- does not fully splitThen we get the same bad behavior (before we apply this PR). |
Contributor
|
bors merge |
bors bot
pushed a commit
that referenced
this pull request
Nov 28, 2022
Fixes #760. Before this change, we were failing at an fvar lookup here: https://github.com/leanprover-community/mathlib4/blob/91897c46c6cdf35faad92219848764a4e6f87d86/Mathlib/Tactic/SplitIfs.lean#L44
|
Pull request successfully merged into master. Build succeeded: |
rosborn
added a commit
that referenced
this pull request
Nov 29, 2022
* master: (26 commits) docs (Order.BoundedOrder): fix typos (#775) feat: port Algebra.Order.Monoid.Cancel.Defs (#774) feat: port Order.Disjoint (#773) feat: port linarith (#526) feat: port Algebra.Order.Monoid.Defs (#771) feat: port control.functor (#612) feat(Algebra/GroupWithZero/Commute): port file (#762) feat: port Logic.Equiv.Option (#674) chore: fix todos in `to_additive` (#765) feat(Algebra/Order/Monoid/MinMax): port file (#763) fix: update context in recursive calls in split_ifs (#761) feat(Algebra/Regular/Basic): port file (#758) feat: port Order.BoundedOrder (#697) feat: port Data.Pi.Algebra (#564) feat: port Algebra.Hom.Embedding (#764) fix: to_additive generates equation lemmas for target (#767) fix: fix translation errors in various files (#716) fix: remove submodules (#766) feat(Algebra/Group/Commute): port file (#750) feat(Algebra/Ring/Commute): port file (#759) ...
bors bot
pushed a commit
that referenced
this pull request
Dec 8, 2022
Now that #761 has landed, we can use `split_ifs` in the proof of `setValue`. The proof is still not as nice as it could be, because we don't have `cc` yet.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #760.
Before this change, we were failing at an fvar lookup here:
mathlib4/Mathlib/Tactic/SplitIfs.lean
Line 44 in 91897c4