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: prove Array.toList_erase #1101

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

Mehbark
Copy link
Contributor

@Mehbark Mehbark commented Jan 28, 2025

This is functional, but I don't have much experience, so any review is much appreciated.

@Mehbark
Copy link
Contributor Author

Mehbark commented Jan 28, 2025

awaiting-review

@github-actions github-actions bot added the awaiting-review This PR is ready for review; the author thinks it is ready to be merged. label Jan 28, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 29, 2025
Copy link
Collaborator

@fgdorais fgdorais left a comment

Choose a reason for hiding this comment

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

Looks good! Just a couple of small changes.

(l.erase a).toList = l.toList.erase a
@[simp] theorem toList_erase [BEq α] {l : Array α} {a : α} :
(l.erase a).toList = l.toList.erase a := by
simp [erase, ← List.eraseIdx_indexOf_eq_erase, List.indexOf_eq_indexOf?]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nonterminal simp: please use simp only instead.

Batteries/Data/Array/Lemmas.lean Outdated Show resolved Hide resolved
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Jan 29, 2025

Mathlib CI status (docs):

@fgdorais fgdorais added awaiting-author Waiting for PR author to address issues and removed awaiting-review This PR is ready for review; the author thinks it is ready to be merged. labels Jan 29, 2025
@Mehbark
Copy link
Contributor Author

Mehbark commented Jan 29, 2025

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 29, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 29, 2025
@fgdorais fgdorais added this pull request to the merge queue Jan 29, 2025
@fgdorais
Copy link
Collaborator

Thank you!

Merged via the queue into leanprover-community:main with commit 61dd720 Jan 29, 2025
2 checks passed
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. builds-mathlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants