-
Notifications
You must be signed in to change notification settings - Fork 462
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: Std.HashMap #4583
feat: Std.HashMap #4583
Conversation
Some functions don't have any theorems (e.g. |
Split from #4583
Split from #4583 Mathlib has `isSome_map'` but calls it `isSome_map`.
Split from #4583 `exists_of_set` appears in Batteries as `exists_of_set'`. The `exists_of_set` version is unused in batteries and mathlib at least and I would argue that the primed version (i.e., the one added in this PR) is always better anyway. `isEmpty_iff` appears in mathlib as `isEmpty_iff_eq_nil`.
Split from #4583 Rewriting the `i` in `xs[i]` usually fails with `motive is not type correct`, but with this lemma it works.
Split from #4583
Split from #4583
Split from #4583
@david-christiansen Thank you very much for the detailed review! I'll give you a chance to confirm that all of your comments have been addressed and then I think it's time to get this merged. |
This is great, thanks! |
Preliminary PRs:
Quick overview over API/naming changes compared to
Lean.HashMap
andBatteries.HashMap
:Lean
find?
->get?
/getElem?
find!
->get!
/getElem!
findD
->getD
findEntry?
-> not implemented for nowinsert'
->containsThenInsert
(order reversed in result)insertIfNew
->getThenInsertIfNew?
(order reversed in result)numBuckets
->Internal.numBuckets
ofListWith
-> not implemented for nowArray.groupByKey
-> not implemented for nowmerge
-> not implemented for now, but you can useinsertMany
Batteries
modify
-> not implemented for nowmergeWith
-> not implemented for nowmergeWithM
-> not implemented for now