-
Notifications
You must be signed in to change notification settings - Fork 103
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
refactor: move theorems about lists from mathlib #756
Conversation
awaiting-review |
23a45f4
to
075ff99
Compare
Is there a Mathlib adaptation PR ready? A lot of things are in flight at the moment so I'd like to be confident that after merging I can get everything working quickly. See e.g. what Yury did at #758. |
64e8be0
to
5e535c8
Compare
* `List.isEmpty_iff_eq_nil` and `List.modifyHead_modifyHead` are from `Mathlib.Data.List.Basic`. * `List.cons_prefix_iff` is from `Mathlib.Data.List.Infix`. * We need these theorems to prove `String.splitOn_of_valid`. See leanprover-community/batteries#756.
@semorrison I opened a Mathlib PR that removes the theorems I brought to |
awaiting-review |
I resolved merge conflicts. |
* `List.isEmpty_iff_eq_nil` and `List.modifyHead_modifyHead` are from `Mathlib.Data.List.Basic`. I removed the `simp` priority and `nolint` attribute from `modifyHead_modifyHead` because we don't need them anymore. * `List.cons_prefix_cons` is from `Mathlib.Data.List.Infix`. Its previous name was `List.cons_prefix_iff`. We need these theorems to prove `String.splitOn_of_valid`. See leanprover-community#756. Co-authored-by: Kim Morrison <[email protected]>
`List.isEmpty_iff_eq_nil` and `List.modifyHead_modifyHead` are from `Mathlib.Data.List.Basic`. I removed the `simp` priority and `nolint` attribute from `modifyHead_modifyHead` because we don't need them anymore. We need these theorems to prove `String.splitOn_of_valid`. See leanprover-community#756. Co-authored-by: Kim Morrison <[email protected]>
6a7a92f
to
6fb4f5e
Compare
The simplifier used to always unfold the definition of the function `List.modifyHead` because it had the `simp` attribute. This behavior hindered the simplifier from using lemmas about the function. To fix this issue, I opened leanprover-community/batteries#790 and it was merged on May 10. Now, the `simp` priority in the theorem `List.modifyHead_modifyHead` is no longer needed. leanprover-community/batteries#756 was supposed to remove the priority from it while also moving it from Mathlib to Batteries. But the pull request hasn't been merged for almost five months, hence this PR.
6fb4f5e
to
4cb9841
Compare
`List.isEmpty_iff_eq_nil` and `List.modifyHead_modifyHead` are from `Mathlib.Data.List.Basic`. We need these theorems to prove `String.splitOn_of_valid`. See leanprover-community/batteries#743. This is a Batteries bump PR corresponding to leanprover-community/batteries#756.
4cb9841
to
b6a0c53
Compare
`List.isEmpty_iff_eq_nil` and `List.modifyHead_modifyHead` are from `Mathlib.Data.List.Basic`. We need these theorems to prove `String.splitOn_of_valid`. See leanprover-community/batteries#743. Corresponding Batteries PR: leanprover-community/batteries#756
`List.isEmpty_iff_eq_nil` and `List.modifyHead_modifyHead` are from `Mathlib.Data.List.Basic`. We need these theorems to prove `String.splitOn_of_valid`. See leanprover-community#743. Batteries bump PR in Mathlib: leanprover-community/mathlib4#12540 Co-authored-by: Kim Morrison <[email protected]>
b6a0c53
to
f6e0091
Compare
The simplifier used to always unfold the definition of the function `List.modifyHead` because it had the `simp` attribute. This behavior hindered the simplifier from using lemmas about the function. To fix this issue, I opened leanprover-community/batteries#790 and it was merged on May 10. Now, the `simp` priority in the theorem `List.modifyHead_modifyHead` is no longer needed. leanprover-community/batteries#756 was supposed to remove the priority from it while also moving it from Mathlib to Batteries. But the pull request hasn't been merged for almost five months, hence this PR.
The simplifier used to always unfold the definition of the function `List.modifyHead` because it had the `simp` attribute. This behavior hindered the simplifier from using lemmas about the function. To fix this issue, I opened leanprover-community/batteries#790 and it was merged on May 10. Now, the `simp` priority in the theorem `List.modifyHead_modifyHead` is no longer needed. leanprover-community/batteries#756 was supposed to remove the priority from it while also moving it from Mathlib to Batteries. But the pull request hasn't been merged for almost five months, hence this PR.
The simplifier used to always unfold the definition of the function `List.modifyHead` because it had the `simp` attribute. This behavior hindered the simplifier from using lemmas about the function. To fix this issue, I opened leanprover-community/batteries#790 and it was merged on May 10. Now, the `simp` priority in the theorem `List.modifyHead_modifyHead` is no longer needed. leanprover-community/batteries#756 was supposed to remove the priority from it while also moving it from Mathlib to Batteries. But the pull request hasn't been merged for almost five months, hence this PR.
The simplifier used to always unfold the definition of the function `List.modifyHead` because it had the `simp` attribute. This behavior hindered the simplifier from using lemmas about the function. To fix this issue, I opened leanprover-community/batteries#790 and it was merged on May 10. Now, the `simp` priority in the theorem `List.modifyHead_modifyHead` is no longer needed. leanprover-community/batteries#756 was supposed to remove the priority from it while also moving it from Mathlib to Batteries. But the pull request hasn't been merged for almost five months, hence this PR.
The simplifier used to always unfold the definition of the function `List.modifyHead` because it had the `simp` attribute. This behavior hindered the simplifier from using lemmas about the function. To fix this issue, I opened leanprover-community/batteries#790 and it was merged on May 10. Now, the `simp` priority in the theorem `List.modifyHead_modifyHead` is no longer needed. leanprover-community/batteries#756 was supposed to remove the priority from it while also moving it from Mathlib to Batteries. But the pull request hasn't been merged for almost five months, hence this PR.
405f949
`List.modifyHead_modifyHead` is from `Mathlib.Data.List.Basic`. I need it to prove `String.splitOn_of_valid`. See leanprover-community/batteries#743. Corresponding Batteries PR: leanprover-community/batteries#756
`List.modifyHead_modifyHead` is from `Mathlib.Data.List.Basic`. I need it to prove `String.splitOn_of_valid`. See leanprover-community/batteries#743. Corresponding Batteries PR: leanprover-community/batteries#756
`List.modifyHead_modifyHead` is from `Mathlib.Data.List.Basic`. I need it to prove `String.splitOn_of_valid`. See leanprover-community/batteries#743. Corresponding Batteries PR: leanprover-community/batteries#756 Co-authored-by: Kim Morrison <[email protected]>
List.isEmpty_iff_eq_nil
andList.modifyHead_modifyHead
are fromMathlib.Data.List.Basic
. We need these theorems to proveString.splitOn_of_valid
. See#743.
Batteries bump PR in Mathlib: leanprover-community/mathlib4#12540
Co-authored-by: Kim Morrison [email protected]
@[simp]
fromList.modifyHead
#790