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 Std.Data.List.SplitOnList #531

Closed

Conversation

chabulhwi
Copy link
Contributor

@chabulhwi chabulhwi commented Jan 15, 2024

  • Move a theorem from Mathlib.Data.List.Basic to Std.
  • Add theorems about List.isPrefixOf and List.isSuffixOf.
  • Add Std.Data.List.SplitOnList.

List.splitOnList is a specification for String.splitOn. We need it to prove String.splitOn_of_valid, which is on the to-do list in Std.Data.String.Lemmas.

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


See #495 for more context.

@chabulhwi chabulhwi force-pushed the Data.List.SplitOnList branch 4 times, most recently from 31785a8 to b5d8205 Compare January 15, 2024 16:19
@semorrison
Copy link
Collaborator

awaiting-author

@github-actions github-actions bot added the awaiting-author Waiting for PR author to address issues label Jan 16, 2024
@chabulhwi
Copy link
Contributor Author

awaiting-review

@github-actions github-actions bot added awaiting-review This PR is ready for review; the author thinks it is ready to be merged. and removed awaiting-author Waiting for PR author to address issues labels Jan 16, 2024
Copy link
Collaborator

@semorrison semorrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM.

@chabulhwi chabulhwi force-pushed the Data.List.SplitOnList branch 2 times, most recently from 8261f59 to 00976c2 Compare January 16, 2024 06:37
@chabulhwi chabulhwi force-pushed the Data.List.SplitOnList branch 2 times, most recently from 3a076c7 to 6f1f6d2 Compare January 17, 2024 05:03
chabulhwi and others added 9 commits February 12, 2024 15:45
Move a theorem from `Mathlib.Data.List.Basic` 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 chabulhwi closed this Feb 12, 2024
@chabulhwi chabulhwi deleted the Data.List.SplitOnList branch February 12, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review This PR is ready for review; the author thinks it is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants