{-# OPTIONS --without-K #-}
module Trunc.Connection where
open import lib.Basics
open import lib.NType2
open import lib.Equivalences2
open import lib.types.Unit
open import lib.types.Nat hiding (_+_)
open import lib.types.Pi
open import lib.types.Sigma
open import lib.types.Paths
open import lib.types.TLevel
open import Preliminaries
open import Pointed
open import UniverseOfNTypes
open import Trunc.Universal
open import Trunc.Basics
open import Trunc.TypeConstructors
open import HHHUU-ComplicatedTypes
open trunc-ty
open trunc-props
module _ {i} (n : ℕ₋₂) (C : Type (lsucc i)) where
is-connected⋆ : Type (lsucc (lsucc i))
is-connected⋆ = (Tr : (X : Type i) → trunc-ty n X (lsucc i))
(TrC : trunc-ty n C (lsucc i))
→ is-contr ⟦ type TrC ⟧
module _ {i} (A : Type• i) where
module con (n : ℕ₋₂) where
connection• : Type• (lsucc i)
connection• =
Σ• (A
, ((λ b → (TrP : trunc-ty n (pt A == b) i) → ⟦ type TrP ⟧)
, (λ TrP → cons TrP idp)))
connection : Type (lsucc i)
connection = base connection•
connection-is-connected : is-connected⋆ (S n) connection
connection-is-connected Tr TrC = equiv-preserves-level (e ⁻¹) h where
TrA : trunc-ty (S n) (base A) (lsucc i)
TrA = Tr (base A)
TrP : (b : base A) → trunc-ty n (pt A == b) i
TrP = trunc-path.trunc {j = i} TrA (pt A)
TrD : trunc-ty (S n) (Σ (base A) (λ b → ⟦ type (TrP b) ⟧)) (lsucc i)
TrD = trunc-Σ.trunc {j = lsucc i} TrA
(λ b → trunc-self.trunc (Path-≤ (type TrA) (cons TrA (pt A)) b))
u : connection ≃ Σ (base A) (λ b → ⟦ type (TrP b) ⟧)
u = equiv-Σ-snd {B = λ _ → Π _ _}
(λ b → Π₁-contr (trunc-inhab-contr {j = i} (TrP b)))
e : ⟦ type TrC ⟧ ≃ ⟦ type TrD ⟧
e = trunc-functor.fmap-equiv {j = lsucc i} TrC TrD u
h : is-contr ⟦ type TrD ⟧
h = pathfrom-is-contr (cons TrA (pt A))
module con2 (n : ℕ) where
open con (n -2)
connection-higher-dim : (Ω ^ n) connection• ≃• (Ω ^ n) A
connection-higher-dim =
forget-Ω^-Σ•₂ _ n (λ _ → Π-level (λ Tr → snd (type Tr)))
open con public
open con2 public
module with-hits where
open import lib.types.Truncation
open import lib.NConnected
module _ {i j} where
trunc : (n : ℕ₋₂) (A : Type i) → trunc-ty n A (i ⊔ j)
trunc n A = record
{ type = (Trunc n A , Trunc-level)
; cons = [_]
; univ = λ U → is-eq
(λ f → f ∘ [_]) (Trunc-rec (snd U)) (λ f → idp)
(λ f → λ= (Trunc-elim (λ _ → =-preserves-level _ (snd U))
(λ a → idp)))}
trunc-contr : {n : ℕ₋₂} {A : Type i} → is-contr (trunc-ty n A (i ⊔ j))
trunc-contr = trunc-inhab-contr {j = j} (trunc _ _)
module _ {i} {n : ℕ₋₂} {A : Type (lsucc i)} where
conn⋆-conn : is-connected⋆ n A ≃ is-connected n A
conn⋆-conn = Π₁-contr (trunc-contr {j = lsucc i})
∘e Π₁-contr (Π-level (λ _ → trunc-contr {j = lsucc i}))
module _ (n : ℕ) where
M• : Type• 「 n + 2 」
M• = connection• (_ , Loop n) (n -1)
assertion-0 : has-level ⟨ n + 1 ⟩ (base M•)
assertion-0 = snd (Σ-≤ (⟨ n ⟩ -Type-≤ 「 n 」)
(λ b → Π-≤ (trunc-ty _ (_ == b) _)
(λ tr → raise (raise (type tr)))))
assertion-1 : ¬ (has-level ⟨ n ⟩ (base M•))
assertion-1 =
main' n
∘ –> (equiv-is-contr• (connection-higher-dim _ (n + 1)))
∘ (λ z → z (pt M•))
∘ –> has-level-equiv-contr-loops
assertion-2 : is-connected⋆ ⟨ n ⟩ (base M•)
assertion-2 = connection-is-connected _ _