Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
(** * Universe Levels *)(** We provide casting definitions for raising universe levels. *)(** Because we have cumulativity (that [T : U@{i}] gives us [T : U@{j}] when [i < j]), we may define [Lift : U@{i} → U@{j}] to be the identity function. *)DefinitionLift@{i j | i < j} (A : Type@{i}) : Type@{j}
:= A.Definitionlift {A} : A -> Lift A := funx => x.Definitionlower {A} : Lift A -> A := funx => x.Definitionlift2 {AB} (f : forallx : A, B x) : forallx : Lift A, Lift (B (lower x))
:= f.Definitionlower2 {AB} (f : forallx : Lift A, Lift (B (lower x))) : forallx : A, B x
:= f.(** We make [lift] and [lower] opaque so that typeclass resolution doesn't pick up [isequiv_lift] as an instance of [IsEquiv idmap] and wreak havoc. *)#[global] Typeclasses Opaque lift lower lift2 lower2.Instanceisequiv_liftT : IsEquiv (@lift T)
:= @Build_IsEquiv
_ _
(@lift T)
(@lower T)
(fun_ => idpath)
(fun_ => idpath)
(fun_ => idpath).Instanceisequiv_lift2AB : IsEquiv (@lift2 A B)
:= @Build_IsEquiv
_ _
(@lift2 A B)
(@lower2 A B)
(fun_ => idpath)
(fun_ => idpath)
(fun_ => idpath).Instancelift_isequiv {AB} (f : A -> B) {H : IsEquiv f} : @IsEquiv (Lift A) (Lift B) (lift2 f)
:= @Build_IsEquiv
(Lift A) (Lift B)
(lift2 f)
(lift2 (f^-1))
(funx => ap lift (eisretr f (lower x)))
(funx => ap lift (eissect f (lower x)))
(funx => ((ap (ap lift) (eisadj f (lower x)))
@ (ap_compose f lift _)^)
@ (@ap_compose A (Lift A) (Lift B) lift (lift2 f) _ _ _)).Instancelower_isequiv {AB} (f : Lift A -> Lift B) {H : IsEquiv f} : @IsEquiv A B (lower2 f)
:= @Build_IsEquiv
_ _
(lower2 f)
(lower2 (f^-1))
(funx => ap lower (eisretr f (lift x)))
(funx => ap lower (eissect f (lift x)))
(funx => ((ap (ap lower) (eisadj f (lift x)))
@ (ap_compose f lower _)^)
@ (@ap_compose (Lift A) A B lower (lower2 f) _ _ _)).Definitionlower_equiv {AB} (e : Equiv (Lift A) (Lift B)) : Equiv A B
:= @Build_Equiv A B (lower2 e) _.(** This version doesn't force strict containment, i.e. it allows the two universes to possibly be the same. *)DefinitionLift'@{i j | i <= j} (A : Type@{i}) : Type@{j} := A.(** However, if we don't give the universes as explicit arguments here, then Coq collapses them. *)Definitionlift'@{i j} {A : Type@{i}} : A -> Lift'@{i j} A := funx => x.Definitionlower'@{i j} {A : Type@{i}} : Lift'@{i j} A -> A := funx => x.Definitionlift'2@{i i' j j'} {A : Type@{i}} {B : A -> Type@{i'}} (f : forallx : A, B x)
: forallx : Lift'@{i j} A, Lift'@{i' j'} (B (lower' x))
:= f.Definitionlower'2@{i i' j j'} {A : Type@{i}} {B : A -> Type@{i'}}
(f : forallx : Lift'@{i j} A, Lift'@{i' j'} (B (lower' x)))
: forallx : A, B x
:= f.(** We make [lift] and [lower] opaque so that typeclass resolution doesn't pick up [isequiv_lift] as an instance of [IsEquiv idmap] and wreak havoc. *)#[global] Typeclasses Opaque lift' lower' lift'2 lower'2.Instanceisequiv_lift'@{i j} (T : Type@{i})
: IsEquiv (@lift'@{i j} T)
:= @Build_IsEquiv
_ _
(@lift' T)
(@lower' T)
(fun_ => idpath)
(fun_ => idpath)
(fun_ => idpath).Instanceisequiv_lift'2@{e0 e1 i i' j j'} (A : Type@{i}) (B : A -> Type@{j})
: IsEquiv@{e0 e1} (@lift'2@{i i' j j'} A B)
:= @Build_IsEquiv
_ _
(@lift'2 A B)
(@lower'2 A B)
(fun_ => idpath)
(fun_ => idpath)
(fun_ => idpath).Instancelift'_isequiv@{a b i j i' j'} {A : Type@{a}} {B : Type@{b}}
(f : A -> B) {H : IsEquiv f}
: @IsEquiv (Lift'@{i j} A) (Lift'@{i' j'} B) (lift'2 f)
:= @Build_IsEquiv
(Lift' A) (Lift' B)
(lift'2 f)
(lift'2 (f^-1))
(funx => ap lift' (eisretr f (lower' x)))
(funx => ap lift' (eissect f (lower' x)))
(funx => ((ap (ap lift') (eisadj f (lower' x)))
@ (ap_compose f lift' _)^)
@ (@ap_compose A (Lift' A) (Lift' B) lift' (lift'2 f) _ _ _)).Instancelower'_isequiv@{i j i' j'} {A : Type@{i}} {B : Type@{j}}
(f : Lift'@{i j} A -> Lift'@{i' j'} B) {H : IsEquiv f}
: @IsEquiv A B (lower'2 f)
:= @Build_IsEquiv
_ _
(lower'2 f)
(lower'2 (f^-1))
(funx => ap lower' (eisretr f (lift' x)))
(funx => ap lower' (eissect f (lift' x)))
(funx => ((ap (ap lower') (eisadj f (lift' x)))
@ (ap_compose f lower' _)^)
@ (@ap_compose (Lift' A) A B lower' (lower'2 f) _ _ _)).Definitionlower'_equiv@{i j i' j'} {A : Type@{i}} {B : Type@{j}}
(e : Equiv (Lift'@{i j} A) (Lift'@{i' j'} B))
: Equiv A B
:= @Build_Equiv A B (lower'2 e) _.