Zulip Chat Archive
Stream: mathlib4
Topic: Data.Fintype.Array
Yury G. Kudryashov (Jul 02 2023 at 17:53):
Since length of an Array
is no longer fixed, should we port Data.Fintype.Array
?
Ruben Van de Velde (Jul 02 2023 at 17:59):
Earlier thread at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/porting.20.60.2Earray.60.20files.20whose.20PR's.20were.20closed.3F
Thomas Murrills (Jul 02 2023 at 18:04):
We could maybe translate the existing fintype defs for List
, which I believe are about duplicate-free lists, since that’s what you might expect to find in a file of that name. (Re: earlier discussion, hopefully such manual translations won’t always be necessary, but they seem to be for now.)
We don’t necessarily need to do this during the port though, and I think there’s an argument for just commenting the whole file out and leaving a porting note.
Yury G. Kudryashov (Jul 02 2023 at 18:06):
The existing instances are about arrays of fixed length.
Yury G. Kudryashov (Jul 02 2023 at 18:06):
Thomas Murrills (Jul 02 2023 at 18:07):
I’m talking about the existing instances for List
. Those could be translated to mathlib4’s Array
and might belong in this file.
Thomas Murrills (Jul 02 2023 at 18:07):
These aren’t actually for List
per se, but for lists without duplicate elements.
Yury G. Kudryashov (Jul 02 2023 at 18:08):
IMHO, this is not a part of the porting.
Yury G. Kudryashov (Jul 02 2023 at 18:09):
And it should be done by someone who understands how to make an implementation that doesn't rebuild arrays from lists lots of times.
Thomas Murrills (Jul 02 2023 at 18:10):
I agree, that’s why I said there’s an argument for not doing this during the port. :) I’m just saying the file itself could contain something meaningful and therefore could have a future in mathlib4 (and so could be “ported” with no real code in it and a TODO note)
Eric Wieser (Jul 10 2023 at 10:12):
I've ported this at #5792 to get it off the dashboard. The file only contains two results; one is un-stateable in current mathlib4, while the other is just false for the new Array
, and we already have the true version for Vector
.
Last updated: Dec 20 2023 at 11:08 UTC