Zulip Chat Archive
Stream: lean4
Topic: function.combine
Kevin Buzzard (May 29 2023 at 16:24):
It was pointed out on the Discord that docs4#Function.combine is not as universe polymorphic as one might expect, because of this line. Is this intentional (some sort of monad-related reason or something?)
Mario Carneiro (May 29 2023 at 16:26):
this is why I don't like variable
Mario Carneiro (May 29 2023 at 16:26):
in the context of combine
it doesn't seem intentional
Mario Carneiro (May 29 2023 at 16:26):
is it like this in mathlib3?
Eric Wieser (May 29 2023 at 16:27):
Yes (edit: but in lean3 core, docs#function.combine)
Eric Wieser (May 29 2023 at 16:28):
I don't think variable
is the culprit here; I would guess someone copied and pasted types and got fed up of writing universe variables.
Eric Wieser (May 29 2023 at 16:29):
At least in Lean3 you could write variables {A B C D E : Type*}
and have it do the right thing; in lean 4 you have to deal with the fact that two types may accidentally be assigned the same universe
Kyle Miller (May 29 2023 at 16:30):
Here's a PR to change that subscript in the universe variable: mathlib4#4474
Kyle Miller (May 29 2023 at 16:31):
It only affects Function.combine
Kyle Miller (May 29 2023 at 16:34):
This ζ : Sort u₁
was also present in Lean 3 (in core)
Kevin Buzzard (May 29 2023 at 16:35):
Indeed it was discovered in Lean 3 and then it was noted that it had been carefully ported to Lean 4 :-)
Notification Bot (Aug 02 2023 at 17:21):
22 messages were moved from this topic to #lean4 > Unwanted universe metavariables by Eric Wieser.
Last updated: Dec 20 2023 at 11:08 UTC