Avoid universe bumps of `gset`/`mapset` (fixes #134)
I don't understand universes well enough to see why the previous version does not work. So if anyone can explain that, that would be great :).
Merge request reports
Activity
mentioned in issue #134 (closed)
From comparison: Before this MR:
gset = λ (K : Type@{gset.u0}) (EqDecision0 : EqDecision K) (H : Countable K), mapset (gmap K) : ∀ (K : Type@{gset.u0}) (EqDecision0 : EqDecision K), Countable K → Type@{max(Set,gmap.u1)}
After this MR:
gset = λ (K : Type@{gset.u0}) (EqDecision0 : EqDecision K) (H : Countable K), mapset (gmap K) : ∀ (K : Type@{gset.u0}) (EqDecision0 : EqDecision K), Countable K → Set
Edited by Michael Sammler- Resolved by Robbert Krebbers
- Resolved by Robbert Krebbers
I think I developed a little better sense why the previous approach does not work.
Types like
gmap Z
have typeType@{u} → Type@{u}
for anyu
, i.e., the map is at the same universe as the elements. Hence,gmap Z ()
would beSet
.However, given
mapset : (Type -> Type) -> Type
, how could you put universe annotations to make sure thatmapset (gmap K)
will have typeSet
? I suppose something likemapset : (M : forall u, Type@{u} → Type@{u}) → Set
might work, sinceM
is applied to()
, but such higher-ranked types cannot be expressed.With this MR we have
mapset' : Type@{u} → Type@{u}
, so thenmapset' (gmap K ())
will have typeSet
.
mentioned in commit d5b53680