Zulip Chat Archive
Stream: mathlib4
Topic: porting `Data.RBTree.Init`
Andrew Yang (Nov 11 2022 at 11:34):
I'm would like to try and port Data.RBTree.Init
. Should it go in Mathlib
or Std
?
Moritz Doll (Nov 11 2022 at 11:36):
probably mathlib4, we can move parts to Std4 later on
Andrew Yang (Nov 11 2022 at 11:43):
It seems like I do not have the permission to write to a non-master branch. Is it still standard to work on an non-master branch? If so, can someone grant the right to me? Thanks!
Ruben Van de Velde (Nov 11 2022 at 12:12):
@Andrew Yang note that there's also https://leanprover-community.github.io/mathlib4_docs/Std/Data/RBMap/Basic.html in std4, so I'm not sure what (if anything) still needs porting
Andrew Yang (Nov 11 2022 at 12:19):
Oh I didn't notice that. But that rbtree is (syntactically) different than the docs#rbtree in mathlib3, and we should probably do something to appease mathport? Is it possible to align them in this case?
Mario Carneiro (Nov 11 2022 at 13:23):
I think a suitable "port" of the data.rbtree
is: make a list of all the theorems about rbtree that don't yet exist in Std.Data.RBMap
, open an issue for them on std4
, and then remove everything from the module except for #align
s if possible (if the types are too different, just leave them unaligned). Std.Data.RBMap
intends to completely replace that directory.
Scott Morrison (Nov 11 2022 at 21:59):
@Andrew Yang, I've given you permissions for mathlib4.
Lukas Miaskiwskyi (Dec 28 2022 at 15:22):
I PR'd the RBTree.Init file a couple hours ago, thinking it'd be a simple job, but this thread showed me that it's a bit of a nonstandard endeavour :) I followed @Mario Carneiro's recommended approach trying to align the contents with the corresponding ones from std4, maybe someone can have a look if things make sense in there: https://github.com/leanprover-community/mathlib4/pull/1246
Mario Carneiro (Dec 28 2022 at 15:29):
Note: I have an incomplete port of the rbtree files in progress, although it is a relatively low priority so I'm not actively working on it now. As for the #align
s, most of them need to have \_x
because they aren't exact defeq ports, and for something like depth
which is more than a little different (such that it would not be reasonable to ask someone porting a downstream file to migrate from one definition to the other) it should either be #noalign
ed or #align
ed to a depth'
function that is defined as it is in mathlib3.
Bulhwi Cha (Apr 21 2023 at 13:39):
Mario Carneiro said:
Note: I have an incomplete port of the rbtree files in progress, although it is a relatively low priority so I'm not actively working on it now.
Can I have a look at these files so I can port them?
Bulhwi Cha (Apr 21 2023 at 14:00):
Um, perhaps there isn't anything left to port.
Mario Carneiro (Apr 21 2023 at 15:29):
The intention was to replicate the functionality of all the files in std, and then delete the mathlib files. I think it's about 80% there, but it's almost all unused by mathlib in the first place
Mario Carneiro (Apr 21 2023 at 15:31):
What is there is almost all already landed in Std.Data.RBMap.Lemmas
Last updated: Dec 20 2023 at 11:08 UTC