Zulip Chat Archive
Stream: mathlib4
Topic: mathport drops priorities in `attribute [instance]`
Scott Morrison (Apr 24 2023 at 03:34):
mathport drops priorities when we add instance
after the fact. e.g. attribute [instance, priority 100]
just turning into attribute [instance]
, when it should probably be attribute [instance 100]
. There are many many cases of this. Should we fix mathport? Re-port these priorities?
Scott Morrison (Apr 24 2023 at 03:47):
These missing priorities just recently resulted in @Joël Riou running into a mysterious timeout at https://github.com/leanprover-community/mathlib4/pull/3595.
Joël Riou (Apr 24 2023 at 05:24):
The other timeouts in https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Type.20class.20inference.20problem may be related to this. However, the fix found by @Scott Morrison does not seem to work there.
Mario Carneiro (Apr 24 2023 at 05:48):
Fixed in mathport
Scott Morrison (Apr 24 2023 at 07:25):
I ported the things we previously missed at https://github.com/leanprover-community/mathlib4/pull/3613
Scott Morrison (Apr 24 2023 at 07:25):
This doesn't include any local attributes, or priorities on coercion related instances.
Eric Wieser (Apr 24 2023 at 08:13):
A lot of those priorities still don't seem to show up in the mathport output
Mario Carneiro (Apr 24 2023 at 08:23):
any examples in particular?
Mario Carneiro (Apr 24 2023 at 08:23):
that diff seems to be full of fixes
Mario Carneiro (Apr 24 2023 at 08:24):
but I can't see the fixes that didn't happen
Mario Carneiro (Apr 24 2023 at 08:25):
specifically, what was the syntactic context of a priority annotation that was skipped
Mario Carneiro (Apr 24 2023 at 08:25):
I wouldn't be too surprised if one was missed, because the lean 3 way of writing priorities is somewhat indirect
Eric Wieser (Apr 24 2023 at 08:25):
!4#3613 is full of attributes in CategoryTheory
that aren't present in the mathport output
Mario Carneiro (Apr 24 2023 at 08:26):
what was the lean 3 code?
Mario Carneiro (Apr 24 2023 at 08:26):
you are asking me to diff 4 things here
Eric Wieser (Apr 24 2023 at 08:27):
I don't know whether that's because Scott added new ones or because mathport just forgot them
Eric Wieser (Apr 24 2023 at 08:27):
Eric Wieser (Apr 24 2023 at 08:28):
Sorry, I think I'm just struggling to match up Scott's diff to mathport'
Eric Wieser (Apr 24 2023 at 08:28):
Those are in mathport after all
Mario Carneiro (Apr 24 2023 at 08:31):
I think all of scott's changes are in the diff
Floris van Doorn (Apr 24 2023 at 13:01):
Many instance priorities in the algebraic hierarchy are also "wrong" (different from mathlib3) since we cannot change the priorities of classes extending other classes (cf. lean4#2115)
Last updated: Dec 20 2023 at 11:08 UTC