module 1Lab.HLevel.Universe where
Universes of n-types🔗
A common phenomenon in higher category theory is that the collection of all in a given universe assembles into an in the successor universe
- The collection of all sets (0-categories) is a (1-)-category;
- The collection of all (1-)categories is a 2-category;
- The collection of all 2-categories is a 3-category;
Because of the univalence axiom, the same phenomenon can be observed in homotopy type theory: The subuniverse of consisting of all is a in That means: the universe of propositions is a set, the universe of sets is a groupoid, the universe of groupoids is a bigroupoid, and so on.
h-Levels of equivalences🔗
As warmup, we prove that if and are then so is the type of equivalences For the case where is a successor, this only depends on the h-level of
: (n : Nat) → is-hlevel A n → is-hlevel B n → is-hlevel (A ≃ B) n
≃-is-hlevel {A = A} {B = B} zero Ahl Bhl = contr (f , f-eqv) deform where
≃-is-hlevel : A → B
f _ = Bhl .centre
f
: is-equiv f
f-eqv = is-contr→is-equiv Ahl Bhl f-eqv
For the zero
case, we’re asked
to give a proof of contractibility
of A ≃ B
. As
the centre we pick the canonical function sending
to the centre of contraction
of
which is an equivalence because it is a map between contractible types
.
By the characterisation of paths in Σ
and the fact that being an equivalence is a proposition
,
we get the required family of paths deforming any
to our f
.
: (g : A ≃ B) → (f , f-eqv) ≡ g
deform (g , g-eqv) = Σ-path (λ i x → Bhl .paths (g x) i)
deform (is-equiv-is-prop _ _ _)
As mentioned before, the case for successors does not depend on the proof that has the given h-level. This is because, for has the same h-level as which is the same as
(suc n) _ Bhl =
≃-is-hlevel (suc n)
Σ-is-hlevel (fun-is-hlevel (suc n) Bhl)
λ f → is-prop→is-hlevel-suc (is-equiv-is-prop f)
h-Levels of paths🔗
Univalence states that the type is equivalent to Since the latter is of h-level when and are then so is the former:
: (n : Nat) → is-hlevel A n → is-hlevel B n → is-hlevel (A ≡ B) n
≡-is-hlevel = equiv→is-hlevel n ua univalence⁻¹ (≃-is-hlevel n Ahl Bhl) ≡-is-hlevel n Ahl Bhl
Universes🔗
We refer to the dependent sum of the family is-hlevel - n
as
n-Type
:
record n-Type ℓ n : Type (lsuc ℓ) where
no-eta-equality
constructor el
field
_∣ : Type ℓ
∣: is-hlevel ∣_∣ n is-tr
Like mentioned in the introduction, the main theorem of this section
is that n-Type
is a type of h-level
We take a detour first and establish a characterisation of paths for
n-Type
: Since is-tr
is a proposition, paths in n-Type
are determined by paths of the
underlying types. By univalence, these correspond to
equivalences of the underlying type:
: {n : Nat} {X Y : n-Type ℓ n} → ∣ X ∣ ≡ ∣ Y ∣ → X ≡ Y
n-path .∣_∣ = f i
n-path f i {n = n} {X} {Y} f i .is-tr =
n-path (λ i → is-hlevel-is-prop {A = f i} n) (X .is-tr) (Y .is-tr) i
is-prop→pathp
: {n : Nat} {X Y : n-Type ℓ n} → ∣ X ∣ ≃ ∣ Y ∣ → X ≡ Y
n-ua = n-path (ua f)
n-ua f
: {n : Nat} {X Y : n-Type ℓ n} → (∣ X ∣ ≃ ∣ Y ∣) ≃ (X ≡ Y)
n-univalence {n = n} {X} {Y} = n-ua , is-iso→is-equiv isic where
n-univalence : ∀ {Y} → X ≡ Y → ∣ X ∣ ≃ ∣ Y ∣
inv = path→equiv (ap ∣_∣ p)
inv p
: ∀ {Y} → is-left-inverse (inv {Y}) n-ua
linv = Σ-prop-path is-equiv-is-prop (funext λ x → transport-refl _)
linv x
: ∀ {Y} → is-right-inverse (inv {Y}) n-ua
rinv = J (λ y p → n-ua (inv p) ≡ p) path where
rinv : n-ua (inv {X} refl) ≡ refl
path .∣_∣ = ua.ε {A = ∣ X ∣} refl i j
path i j .is-tr = is-prop→squarep
path i j (λ i j → is-hlevel-is-prop
{A = ua.ε {A = ∣ X ∣} refl i j} n)
(λ j → X .is-tr) (λ j → n-ua {X = X} {Y = X} (path→equiv refl) j .is-tr)
(λ j → X .is-tr) (λ j → X .is-tr)
i j
: is-iso n-ua
isic = iso inv rinv (linv {Y}) isic
Since h-levels are closed under equivalence, and we already have an upper bound on the h-level of when is an we know that is a
: ∀ n → is-hlevel (n-Type ℓ n) (suc n)
n-Type-is-hlevel = n-ua
n-Type-is-hlevel zero x y ((λ _ → y .is-tr .centre) , is-contr→is-equiv (x .is-tr) (y .is-tr))
(suc n) x y =
n-Type-is-hlevel (suc n) (n-univalence e⁻¹) (≃-is-hlevel (suc n) (x .is-tr) (y .is-tr)) Equiv→is-hlevel
For 1-categorical mathematics, the important h-levels are the propositions and the sets, so they get short names:
Set : ∀ ℓ → Type (lsuc ℓ)
Set ℓ = n-Type ℓ 2
Prop : ∀ ℓ → Type (lsuc ℓ)
Prop ℓ = n-Type ℓ 1