Skip to content
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: add String.splitOn_of_valid #719

Conversation

chabulhwi
Copy link
Contributor

@chabulhwi chabulhwi commented Apr 1, 2024

refactor: move Function.id_def from mathlib

Move the theorem from Mathlib.Logic.Function.Basic to Std.

refactor: move theorems about lists from mathlib

  • Move theorems about lists from Mathlib.Data.List.Basic to Std.
  • I removed the nolint attribute from List.modifyHead_modifyHead.

refactor: move List.cons_prefix_iff from mathlib

Move the theorem from Mathlib.Data.List.Infix to Std.

feat: add lemmas about lists

feat: add Std.Data.List.SplitOnList

  • List.splitOnceP returns (l₁, l₂) for the first split l = l₁ ++ l₂ such that P l₂ returns true.
  • List.splitOnList splits a list at every occurrence of a separator list. The separators are not in the result.

Co-authored-by: Mario Carneiro di.gama@gmail.com
Co-authored-by: Scott Morrison scott.morrison@gmail.com

feat: add lemmas about Nat.add

feat: add String.splitOn_of_valid


This is the second version of #495 and includes #531.

@chabulhwi
Copy link
Contributor Author

WIP

@github-actions github-actions bot added the WIP work in progress label Apr 1, 2024
@chabulhwi chabulhwi force-pushed the String.splitOn_of_valid_v2 branch 6 times, most recently from 38dadf0 to bd4c1fe Compare April 1, 2024 14:39
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict This PR has merge conflicts with the `main` branch which must be resolved by the author. label Apr 1, 2024
@chabulhwi chabulhwi force-pushed the String.splitOn_of_valid_v2 branch 2 times, most recently from ff8f99b to 7f41b9a Compare April 2, 2024 10:09
@chabulhwi
Copy link
Contributor Author

Since the current definition of String.splitOn is incorrect, I'll take a break until the issue leanprover/lean4#3829 is resolved.

@chabulhwi chabulhwi force-pushed the String.splitOn_of_valid_v2 branch 2 times, most recently from 059c653 to fd15c80 Compare April 4, 2024 03:28
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict This PR has merge conflicts with the `main` branch which must be resolved by the author. label Apr 4, 2024
chabulhwi and others added 7 commits April 15, 2024 17:57
Move the theorem from `Mathlib.Logic.Function.Basic` to Std.
Move theorems about lists from `Mathlib.Data.List.Basic` to Std.

I removed the `nolint` attribute from `List.modifyHead_modifyHead`.
Move the theorem from `Mathlib.Data.List.Infix` to Std.
* `List.splitOnceP` returns `(l₁, l₂)` for the first split `l = l₁ ++
  l₂` such that `P l₂` returns true.
* `List.splitOnList` splits a list at every occurrence of a separator
  list. The separators are not in the result.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@chabulhwi
Copy link
Contributor Author

Since leanprover/lean4#3829 was fixed, I'll make a third version of #495.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants