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

refactor: move theorems about lists to batteries #12540

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chabulhwi
Copy link
Collaborator

@chabulhwi chabulhwi commented Apr 30, 2024

  • 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. I replaced the deprecated
    name with the new one.

We need these theorems to prove String.splitOn_of_valid. See
leanprover-community/batteries#756.


@chabulhwi chabulhwi self-assigned this Apr 30, 2024
@chabulhwi chabulhwi added blocked-by-other-PR This PR depends on another PR to Mathlib blocked-by-batt-PR This PR depends on a PR to Batteries labels Apr 30, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

This PR/issue depends on:

@chabulhwi chabulhwi added the dependency-bump This PR bumps the version of an upstream dependency (but not toolchain). label May 6, 2024
@chabulhwi chabulhwi changed the title refactor: move theorems about lists to std refactor: move theorems about lists to batteries May 7, 2024
@chabulhwi chabulhwi force-pushed the chabulhwi/list-theorems branch 4 times, most recently from a9f7bb7 to cd6d973 Compare May 10, 2024 01:44
Copy link

github-actions bot commented Jun 8, 2024

PR summary

Import changes

No significant changes to the import graph


Declarations diff

- cons_prefix_iff
- isEmpty_iff_eq_nil
- modifyHead_modifyHead

You can run this locally as follows
## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>

## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>

* `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.
Use `List.cons_prefix_cons` instead of `List.cons_prefix_iff`.
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-by-batt-PR This PR depends on a PR to Batteries blocked-by-other-PR This PR depends on another PR to Mathlib dependency-bump This PR bumps the version of an upstream dependency (but not toolchain). merge-conflict The PR has a merge conflict with master, and needs manual merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants