Zulip Chat Archive

Stream: mathlib4

Topic: Infer kinds are unsupported


Moritz Doll (Dec 13 2022 at 12:49):

What should I do about this error from mathport?

/- ./././Mathport/Syntax/Translate/Command.lean:379:30: infer kinds are unsupported in Lean 4: #[`abv_nonneg] [] -/

Ruben Van de Velde (Dec 13 2022 at 12:50):

Never seen that. Does it break anything?

Moritz Doll (Dec 13 2022 at 12:51):

nope

Moritz Doll (Dec 13 2022 at 12:51):

(except for the 100 char linter)

Ruben Van de Velde (Dec 13 2022 at 12:52):

Maybe it's about the [] in the mathlib3 declaration? I never understood what those were for either :)

Eric Rodriguez (Dec 13 2022 at 16:39):

So it's about setting some things to implicits, I don't know how to describe it but the answer is kinda "look at docs#countable vs docs4#Countable and the next few lines"

Eric Rodriguez (Dec 13 2022 at 16:40):

This has bit me before and should be written in the wiki, I would do it but I'm a bit under the weather

Mario Carneiro (Dec 13 2022 at 17:06):

the effect of the [] in src#is_absolute_value.abv_nonneg is to make the f argument explicit. Lean 4 does not support this annotation, so if you take the definition that mathport gives you then f will be implicit.

Mario Carneiro (Dec 13 2022 at 17:07):

I don't think there is any principled reason for the removal in lean 4, except for an optimistic hope that it is a rarely used feature with a weird syntax and we can get by without it

Jireh Loreaux (Jan 24 2023 at 20:13):

What about when the structure field is data (e.g., docs#bornology.cobounded)? If I follow the method in docs4#Countable, I would have a structure field Bornology.cobounded' where the α is implicit and a def following it Bornology.cobounded with α explicit. Surely we don't want both floating around though. So how do I handle this?


Last updated: Dec 20 2023 at 11:08 UTC