Zulip Chat Archive
Stream: mathlib4
Topic: docs#int.nat_mod
Yaël Dillies (Jan 04 2023 at 22:50):
Where is docs#int.nat_mod gone? Context: #17896
Niels Voss (Jan 05 2023 at 02:42):
I think it went here, since the theorems seem similar nevermind, read the PR wrong
I think nat_mod
was only used in 2 places in mathlib3, none of which are ported, and it was defined in core so the file was changed a lot
Yaël Dillies (Jan 05 2023 at 08:46):
What should I do? I am supposed to port a lemma about a definition that doesn't exist anymore :speechless:
Mario Carneiro (Jan 05 2023 at 09:32):
the definition exists, as I said on the issue, it's Int.natMod
Mario Carneiro (Jan 05 2023 at 09:34):
correction: it does not exist, it was planned to move from core to std but only the deletion from core was done
Mario Carneiro (Jan 05 2023 at 09:35):
The standard fix for a missing definition is to put it in the mathlib4 file corresponding to wherever it lived in lean 3
Eric Wieser (Jan 05 2023 at 09:38):
What file would that be for init.data.int.basic
?
Mario Carneiro (Jan 05 2023 at 09:48):
Mathlib.Init.Data.Int.Basic
Yaël Dillies (Jan 05 2023 at 09:57):
Great, thanks!
Eric Wieser (Jan 05 2023 at 10:27):
Where do the #align
s live for the lemmas in that mathlib3 file?
Mario Carneiro (Jan 05 2023 at 10:27):
same place
Eric Wieser (Jan 05 2023 at 10:28):
Would it make sense to populate Mathlib.Init.Data.Int.Basic
with an align
for every mathlib3 declaration, even if the mathlib4 versions no longer live in that file?
Mario Carneiro (Jan 05 2023 at 10:28):
that too
Mario Carneiro (Jan 05 2023 at 10:30):
aligns always go there, the declaration also goes there if it hasn't been upstreamed
Yaël Dillies (Jan 05 2023 at 10:58):
Oh wait, it can't use %
anymore, can it?
Reid Barton (Jan 05 2023 at 11:52):
Mod Int
is overridden in Std.Data.Int.Basic
to use the Lean 3 definition (at least if you're lucky and Lean picks the right instance)
Yaël Dillies (Jan 05 2023 at 11:54):
So I don't have to spell Int.emod
out?
Reid Barton (Jan 05 2023 at 11:56):
I think that's right, you can and should just use %
.
Last updated: Dec 20 2023 at 11:08 UTC