Zulip Chat Archive

Stream: mathlib4

Topic: Why are type variables in `IsTrans α r` explicit?


Kim Morrison (Jul 29 2024 at 01:27):

It seems to me they ought to be implicit, as α is determined by r.

It is occasionally convenient that we can write e.g. IsTrans α (· ≤ ·). However we can still write IsTrans (α := α) (· ≤ ·) when this occurs

Kim Morrison (Jul 29 2024 at 01:27):

I started having a look at the fallout, but have other things that need to get done more urgently.

Kim Morrison (Jul 29 2024 at 01:27):

If anyone is interested in this, you could take a look at branch#algebra_classes_implicit and see if you can finish fixing things!

Yaël Dillies (Jul 29 2024 at 01:30):

I'm not sure making them implicit is a good thing since r is most often some polymorphic relation

Kim Morrison (Jul 29 2024 at 01:31):

Well, most often in the code it is actually some variable, e.g. r. It's true that IsTrans α (· ≤ ·) occurs frequently, but it is far from exclusive.

Kim Morrison (Jul 29 2024 at 01:32):

I'm not particularly bothered either way. I noticed this because it interacted badly with something on lean#4814, but this can /shouldbe fixed independently.


Last updated: May 02 2025 at 03:31 UTC