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: verify toList for hash maps #6954

Merged
merged 21 commits into from
Feb 18, 2025
Merged

feat: verify toList for hash maps #6954

merged 21 commits into from
Feb 18, 2025

Conversation

jt0202
Copy link
Contributor

@jt0202 jt0202 commented Feb 5, 2025

This PR verifies the toListfunction for hash maps and dependent hash maps.

@jt0202
Copy link
Contributor Author

jt0202 commented Feb 5, 2025

This is currently WIP. If you think further lemmas are useful let me know. One lemma is currently unproven, because there are some problems with casting. As with previous PRs I will first only work in Internal/RawLemmas.lean.

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Feb 5, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Feb 5, 2025

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 6d63f6305eee006f1acaddff2f36654c98ce5b5e --onto 412389f71f8a24307e3adba69b38b4b685b04f72. (2025-02-05 12:00:25)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 6d63f6305eee006f1acaddff2f36654c98ce5b5e --onto b01ca8ee237a1b3c299384e73ad79d424e216a84. (2025-02-07 11:50:08)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 6d63f6305eee006f1acaddff2f36654c98ce5b5e --onto d61f506da254b919f93e571a84247319de78f526. (2025-02-10 20:03:26)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 80c8837f49ac95c03af15abdf2b350ad669d7d18 --onto ae9d12aeaa075578c7ee3a5a585d0f9fb89cedd2. (2025-02-13 18:30:03)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 47548aa171f02cf0b61fc1eb6bcaee82bb50d060 --onto ae9d12aeaa075578c7ee3a5a585d0f9fb89cedd2. (2025-02-14 08:51:13)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 47548aa171f02cf0b61fc1eb6bcaee82bb50d060 --onto f50b863868a3625dfbca4fd2ad777d187632b1d4. (2025-02-17 07:26:22)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 47548aa171f02cf0b61fc1eb6bcaee82bb50d060 --onto 88664e4a995883877a5d85211a5cfab0a672b5ed. (2025-02-17 18:43:42)

src/Init/Data/List/Lemmas.lean Outdated Show resolved Hide resolved
src/Std/Data/DHashMap/Internal/RawLemmas.lean Outdated Show resolved Hide resolved
src/Std/Data/DHashMap/Internal/RawLemmas.lean Outdated Show resolved Hide resolved
src/Std/Data/DHashMap/Internal/RawLemmas.lean Outdated Show resolved Hide resolved
src/Std/Data/DHashMap/Internal/RawLemmas.lean Show resolved Hide resolved
src/Std/Data/DHashMap/Internal/RawLemmas.lean Outdated Show resolved Hide resolved
src/Std/Data/DHashMap/Internal/RawLemmas.lean Show resolved Hide resolved
@TwoFX TwoFX self-assigned this Feb 11, 2025
@TwoFX
Copy link
Member

TwoFX commented Feb 11, 2025

RawLemmas statements look good to me. Will take a look at the proofs in a bit.

@jt0202
Copy link
Contributor Author

jt0202 commented Feb 13, 2025

I am sorry, I wanted to rebase my PR to get rid of the merge conflict, but this somehow created all the extra review requests. How to fix this?

Shall I close this and open a new one and readd my contributions?

@TwoFX
Copy link
Member

TwoFX commented Feb 14, 2025

Since the PR is still a draft the review requests should go away again once you fix your branch to only contain the correct commits.

@TwoFX
Copy link
Member

TwoFX commented Feb 14, 2025

It's difficult to review while the GitHub diff view is confused so I'll wait until you repaired your git history, but I have one remark: the new results in AssoList/Lemmas.lean are not required, the required results are all there in WF.lean, see c605c16.

@jt0202
Copy link
Contributor Author

jt0202 commented Feb 14, 2025

It's difficult to review while the GitHub diff view is confused so I'll wait until you repaired your git history, but I have one remark: the new results in AssoList/Lemmas.lean are not required, the required results are all there in WF.lean, see c605c16.

Ok, I have repaired it and used your changes. Additionally, I dropped lemmas in WF.lean that are no longer necessary. Now I only have to try again to get rid of the merge conflict.

@jt0202
Copy link
Contributor Author

jt0202 commented Feb 14, 2025

changelog-library

@github-actions github-actions bot added the changelog-library Library label Feb 14, 2025
@jt0202 jt0202 marked this pull request as ready for review February 14, 2025 11:35
@jt0202
Copy link
Contributor Author

jt0202 commented Feb 17, 2025

Interesting that "CI / Linux release (pull_request)" works again. Not sure what went wrong last time, seemed to be unconnected with my PR.

src/Std/Data/DHashMap/Lemmas.lean Outdated Show resolved Hide resolved
src/Std/Data/DHashMap/Raw.lean Show resolved Hide resolved
src/Std/Data/HashMap/RawLemmas.lean Show resolved Hide resolved
@TwoFX
Copy link
Member

TwoFX commented Feb 17, 2025

The List/Associative proofs can be shortened, see 9182483 for how to get started.

@TwoFX TwoFX added the awaiting-author Waiting for PR author to address issues label Feb 17, 2025
@jt0202
Copy link
Contributor Author

jt0202 commented Feb 17, 2025

awaiting-review

@github-actions github-actions bot added awaiting-review Waiting for someone to review the PR and removed awaiting-author Waiting for PR author to address issues labels Feb 17, 2025
Copy link
Member

@TwoFX TwoFX left a comment

Choose a reason for hiding this comment

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

Could you add 5a21fa9 to your PR? It's a quick test that simp applies the right lemmas in lawful and non-lawful contexts.

src/Std/Data/Internal/List/Associative.lean Outdated Show resolved Hide resolved
src/Std/Data/Internal/List/Associative.lean Outdated Show resolved Hide resolved
src/Std/Data/DHashMap/Lemmas.lean Outdated Show resolved Hide resolved
src/Std/Data/HashMap/Lemmas.lean Outdated Show resolved Hide resolved
src/Std/Data/HashMap/Lemmas.lean Show resolved Hide resolved
@TwoFX TwoFX added awaiting-author Waiting for PR author to address issues and removed awaiting-review Waiting for someone to review the PR labels Feb 18, 2025
@jt0202
Copy link
Contributor Author

jt0202 commented Feb 18, 2025

awaiting-review

@github-actions github-actions bot added awaiting-review Waiting for someone to review the PR and removed awaiting-author Waiting for PR author to address issues labels Feb 18, 2025
src/Std/Data/DHashMap/Lemmas.lean Show resolved Hide resolved
src/Std/Data/DHashMap/RawLemmas.lean Show resolved Hide resolved
src/Std/Data/DHashMap/RawLemmas.lean Outdated Show resolved Hide resolved
@TwoFX TwoFX added awaiting-author Waiting for PR author to address issues and removed awaiting-review Waiting for someone to review the PR labels Feb 18, 2025
@TwoFX TwoFX removed the awaiting-author Waiting for PR author to address issues label Feb 18, 2025
Copy link
Member

@TwoFX TwoFX left a comment

Choose a reason for hiding this comment

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

Great work as always, thanks!

@TwoFX TwoFX enabled auto-merge February 18, 2025 12:59
@TwoFX TwoFX added this pull request to the merge queue Feb 18, 2025
Merged via the queue into leanprover:master with commit 010c6c3 Feb 18, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-library Library toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants