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: size lemma for Array.set! #807

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

fgdorais
Copy link
Collaborator

No description provided.

@fgdorais fgdorais added the awaiting-review This PR is ready for review; the author thinks it is ready to be merged. label May 23, 2024
eric-wieser
eric-wieser previously approved these changes May 28, 2024
Batteries/Data/Array/Lemmas.lean Outdated Show resolved Hide resolved
@eric-wieser eric-wieser dismissed their stale review May 28, 2024 23:30

Hmm, actually if Array.set!_is_setD is already a simp lemma then this seems somewhat unnecessary.

@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 Jun 7, 2024
@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 Jun 7, 2024
@fgdorais
Copy link
Collaborator Author

fgdorais commented Jun 7, 2024

@eric-wieser I just realized there is an ambiguity in your last comment. I read it to mean that the simp was not necessary but you might have meant that the lemma wasn't necessary?

I do have use cases where this lemma is useful but simp is more awkward, often in '(...) arguments to getElem. For example, I would like to use (xs.set! ...)[i]'(xs.size_get! .. ▸ ...) rather than a by simp proof in some cases.

@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 Jul 19, 2024
@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 Jul 22, 2024
@semorrison semorrison merged commit 1a28ab0 into leanprover-community:main Sep 9, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants