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
base: main
Are you sure you want to change the base?
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. |
awaiting-review |
* `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.
* `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.
The PR description should be a coherent summary, not a list of commit messages. If the commit messages are largely separate, then this should be separate PRs; for instance, perhaps the porting note cleanup and renames can happen in mathlib before you move things. |
@eric-wieser I see. I can make separate pull requests from the later commits suggested by @semorrison. I'll do it until tomorrow. Thanks for pointing that out! |
@semorrison @eric-wieser I made a new PR from a commit and squashed the rest of the commits. |
2b8a859
to
3b0a7fc
Compare
* `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 it anymore. * `List.cons_prefix_cons` is from `Mathlib.Data.List.Infix` and was renamed `List.cons_prefix_iff`. We need these theorems to prove `String.splitOn_of_valid`. See leanprover-community#756. Co-authored-by: Kim Morrison <kim@tqft.net>
* `List.isEmpty_iff_eq_nil` and `List.modifyHead_modifyHead` are from `Mathlib.Data.List.Basic`. I removed the `simp` priority and the `nolint` attribute from `modifyHead_modifyHead` because we don't need it anymore. * `List.cons_prefix_cons` is from `Mathlib.Data.List.Infix` and was renamed `List.cons_prefix_iff`. We need these theorems to prove `String.splitOn_of_valid`. See leanprover-community/batteries#756.
* `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 it 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 <kim@tqft.net>
* `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 <kim@tqft.net>
* `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/batteries#756.
* `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 <kim@tqft.net>
* `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 <kim@tqft.net>
List.isEmpty_iff_eq_nil
andList.modifyHead_modifyHead
are fromMathlib.Data.List.Basic
. I removed thesimp
priority andnolint
attribute from
modifyHead_modifyHead
because we don't need themanymore.
List.cons_prefix_cons
is fromMathlib.Data.List.Infix
. Itsprevious name was
List.cons_prefix_iff
.We need these theorems to prove
String.splitOn_of_valid
. See#756.
Co-authored-by: Kim Morrison kim@tqft.net
Batteries bump PR in Mathlib: leanprover-community/mathlib4#12540
@[simp]
fromList.modifyHead
#790