{-# OPTIONS --safe #-}
module Cubical.Papers.ZCohomology where
open import Cubical.Data.Int hiding (_+_)
open import Cubical.Data.Nat
open import Cubical.HITs.S1
open import Cubical.Data.Sum
open import Cubical.Data.Sigma
open import Cubical.Core.Glue as Glue
open import Cubical.Foundations.Prelude as Prelude
open import Cubical.Foundations.GroupoidLaws as GroupoidLaws
open import Cubical.Foundations.Isomorphism
import Cubical.Foundations.Path as Path
open import Cubical.Foundations.Pointed
open import Cubical.HITs.S1 as S1
open import Cubical.HITs.Susp as Suspension
open import Cubical.HITs.Sn as Sn
open import Cubical.Homotopy.Loopspace as Loop
open import Cubical.Foundations.HLevels as n-types
open import Cubical.HITs.Truncation as Trunc
open import Cubical.Homotopy.Connected as Connected
import Cubical.HITs.Pushout as Push
import Cubical.HITs.Wedge as ⋁
import Cubical.Foundations.Univalence as Unival
import Cubical.Foundations.SIP as StructIdPrinc
import Cubical.Algebra.Group as Gr
import Cubical.Algebra.Group.GroupPath as GrPath
import Cubical.ZCohomology.Base as coHom
renaming (coHomK to K ; coHomK-ptd to K∙)
import Cubical.HITs.Sn.Properties as S
import Cubical.ZCohomology.GroupStructure as GroupStructure
import Cubical.ZCohomology.Properties as Properties
renaming (Kn→ΩKn+1 to σ ; ΩKn+1→Kn to σ⁻¹)
import Cubical.Experiments.ZCohomologyOld.Properties as oldCohom
import Cubical.ZCohomology.RingStructure.CupProduct as Cup
import Cubical.ZCohomology.RingStructure.RingLaws as ⌣Ring
import Cubical.ZCohomology.RingStructure.GradedCommutativity as ⌣Comm
import Cubical.Foundations.Pointed.Homogeneous as Homogen
import Cubical.HITs.Torus as 𝕋²
renaming (Torus to 𝕋²)
import Cubical.HITs.KleinBottle as 𝕂²
renaming (KleinBottle to 𝕂²)
import Cubical.HITs.RPn as ℝP
renaming (RP² to ℝP²)
import Cubical.ZCohomology.Groups.Sn as HⁿSⁿ
renaming (Hⁿ-Sᵐ≅0 to Hⁿ-Sᵐ≅1)
import Cubical.ZCohomology.Groups.Torus as HⁿT²
import Cubical.ZCohomology.Groups.Wedge as Hⁿ-wedge
import Cubical.ZCohomology.Groups.KleinBottle as Hⁿ𝕂²
import Cubical.ZCohomology.Groups.RP2 as HⁿℝP²
renaming (H¹-RP²≅0 to H¹-RP²≅1)
import Cubical.ZCohomology.Groups.CP2 as HⁿℂP²
renaming (CP² to ℂP² ; ℤ→HⁿCP²→ℤ to g)
import Cubical.Homotopy.EilenbergSteenrod as ES-axioms
import Cubical.ZCohomology.EilenbergSteenrodZ as satisfies-ES-axioms
renaming (coHomFunctor to H^~ ; coHomFunctor' to Ĥ)
import Cubical.ZCohomology.MayerVietorisUnreduced as MayerVietoris
open Prelude using ( PathP
; _≡_
; refl
; cong
; cong₂
; funExt)
open GroupoidLaws using (_⁻¹)
open Prelude using ( transport
; subst
; hcomp)
open S1 using (S¹)
open Suspension using (Susp)
open Sn using (S₊∙)
open Loop using (Ω^_)
Eckmann-Hilton : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) → isComm∙ ((Ω^ (suc n)) A)
Eckmann-Hilton n α β =
transport (λ i → cong (λ x → rUnit x (~ i)) α ∙ cong (λ x → lUnit x (~ i)) β
≡ cong (λ x → lUnit x (~ i)) β ∙ cong (λ x → rUnit x (~ i)) α)
(λ i → (λ j → α (j ∧ ~ i) ∙ β (j ∧ i)) ∙ λ j → α (~ i ∨ j) ∙ β (i ∨ j))
open n-types using (isOfHLevel)
open Trunc using (hLevelTrunc)
open Trunc using (elim)
truncPathElim : ∀ {ℓ ℓ'} {A : Type ℓ} {x y : A} (n : ℕ)
→ {B : Path (hLevelTrunc (suc n) A) ∣ x ∣ ∣ y ∣ → Type ℓ'}
→ ((q : _) → isOfHLevel n (B q))
→ ((p : x ≡ y) → B (cong ∣_∣ p))
→ (q : _) → B q
truncPathElim zero hlev ind q = hlev q .fst
truncPathElim (suc n) {B = B} hlev ind q =
subst B (Iso.leftInv (Trunc.PathIdTruncIso _) q)
(help (ΩTrunc.encode-fun ∣ _ ∣ ∣ _ ∣ q))
where
help : (q : _) → B (ΩTrunc.decode-fun ∣ _ ∣ ∣ _ ∣ q)
help = Trunc.elim (λ _ → hlev _) ind
open Connected using (isConnected)
open Push using (Pushout)
open ⋁ using (_⋁_)
open Unival using (univalence ; ua)
open Glue using (Glue)
open StructIdPrinc using (SIP ; sip)
open Gr using (Group)
open GrPath using (GroupPath)
open coHom using (K ; K∙)
open S using (sphereConnected)
open S using (wedgeconFun; wedgeconLeft ; wedgeconRight)
wedgeConSn' : ∀ {ℓ} (n m : ℕ) {A : (S₊ (suc n)) → (S₊ (suc m)) → Type ℓ}
→ ((x : S₊ (suc n)) (y : S₊ (suc m)) → isOfHLevel ((suc n) + (suc m)) (A x y))
→ (fₗ : (x : _) → A x (ptSn (suc m)))
→ (fᵣ : (x : _) → A (ptSn (suc n)) x)
→ (p : fₗ (ptSn (suc n)) ≡ fᵣ (ptSn (suc m)))
→ Σ[ F ∈ ((x : S₊ (suc n)) (y : S₊ (suc m)) → A x y) ]
(Σ[ (left , right) ∈ ((x : S₊ (suc n)) → fₗ x ≡ F x (ptSn (suc m)))
× ((x : S₊ (suc m)) → fᵣ x ≡ F (ptSn (suc n)) x) ]
p ≡ left (ptSn (suc n)) ∙ (right (ptSn (suc m))) ⁻¹)
wedgeConSn' zero zero hlev fₗ fᵣ p =
(wedgeconFun 0 0 hlev fᵣ fₗ p)
, ((λ x → sym (wedgeconRight 0 0 hlev fᵣ fₗ p x))
, λ _ → refl)
, rUnit _
wedgeConSn' zero (suc m) hlev fₗ fᵣ p =
(wedgeconFun 0 (suc m) hlev fᵣ fₗ p)
, ((λ _ → refl)
, (λ x → sym (wedgeconLeft 0 (suc m) hlev fᵣ fₗ p x)))
, lUnit _
wedgeConSn' (suc n) m hlev fₗ fᵣ p =
(wedgeconFun (suc n) m hlev fᵣ fₗ p)
, ((λ x → sym (wedgeconRight (suc n) m hlev fᵣ fₗ p x))
, λ _ → refl)
, rUnit _
open GroupStructure using (_+ₖ_ ; 0ₖ)
open GroupStructure using (-ₖ_)
open Properties using (σ)
open GroupStructure using ( rUnitₖ ; lUnitₖ
; rCancelₖ ; lCancelₖ
; commₖ
; assocₖ)
0-rUnit≡refl : rUnitₖ 0 (0ₖ 0) ≡ refl
1-rUnit≡refl : rUnitₖ 1 (0ₖ 1) ≡ refl
n≥2-rUnit≡refl : {n : ℕ} → rUnitₖ (2 + n) (0ₖ (2 + n)) ≡ refl
0-rUnit≡refl = refl
1-rUnit≡refl = refl
n≥2-rUnit≡refl = refl
0-lUnit≡refl : lUnitₖ 0 (0ₖ 0) ≡ refl
1-lUnit≡refl : lUnitₖ 1 (0ₖ 1) ≡ refl
n≥2-lUnit≡refl : {n : ℕ} → lUnitₖ (2 + n) (0ₖ (2 + n)) ≡ refl
0-lUnit≡refl = refl
1-lUnit≡refl = refl
n≥2-lUnit≡refl = refl
0-assoc≡refl : assocₖ 0 (0ₖ 0) (0ₖ 0) (0ₖ 0) ≡ refl
1-assoc≡refl : assocₖ 1 (0ₖ 1) (0ₖ 1) (0ₖ 1) ≡ refl
n≥2-assoc≡refl : {n : ℕ} → assocₖ (2 + n) (0ₖ (2 + n)) (0ₖ (2 + n)) (0ₖ (2 + n)) ≡ refl
0-assoc≡refl = refl
1-assoc≡refl = refl
n≥2-assoc≡refl = refl
0-comm≡refl : commₖ 0 (0ₖ 0) (0ₖ 0) ≡ refl
1-comm≡refl : commₖ 1 (0ₖ 1) (0ₖ 1) ≡ refl
n≥2-comm≡refl : {n : ℕ} → commₖ (2 + n) (0ₖ (2 + n)) (0ₖ (2 + n)) ≡ refl
0-comm≡refl = refl
1-comm≡refl = refl
n≥2-comm≡refl = sym (rUnit refl)
0-lCancel≡refl : lCancelₖ 0 (0ₖ 0) ≡ refl
1-lCancel≡refl : lCancelₖ 1 (0ₖ 1) ≡ refl
n≥2-lCancel≡refl : {n : ℕ} → lCancelₖ (2 + n) (0ₖ (2 + n)) ≡ refl
0-lCancel≡refl = refl
1-lCancel≡refl = refl
n≥2-lCancel≡refl = refl
0-rCancel≡refl : rCancelₖ 0 (0ₖ 0) ≡ refl
1-rCancel≡refl : rCancelₖ 1 (0ₖ 1) ≡ refl
n≥2-rCancel≡refl : {n : ℕ} → rCancelₖ (2 + n) (0ₖ (2 + n)) ≡ refl
0-rCancel≡refl = refl
1-rCancel≡refl = refl
n≥2-rCancel≡refl i = rUnit (rUnit refl (~ i)) (~ i)
open GroupStructure using (_+ₖ_ ; 0ₖ ; rUnitₖ ; lUnitₖ ; lUnitₖ≡rUnitₖ)
open oldCohom using (_+ₖ_ ; 0ₖ ; rUnitₖ ; lUnitₖ ; rUnitlUnit0)
open GroupStructure using (+ₖ-unique)
open oldCohom using (addLemma)
additionsAgree : (n : ℕ) → GroupStructure._+ₖ_ {n = n} ≡ oldCohom._+ₖ_ {n = n}
additionsAgree zero i x y = oldCohom.addLemma x y (~ i)
additionsAgree (suc n) i x y =
+ₖ-unique n (GroupStructure._+ₖ_) (oldCohom._+ₖ_)
(GroupStructure.rUnitₖ (suc n)) (GroupStructure.lUnitₖ (suc n))
(oldCohom.rUnitₖ (suc n)) (oldCohom.lUnitₖ (suc n))
(sym (lUnitₖ≡rUnitₖ (suc n)))
(rUnitlUnit0 (suc n)) x y i
open Properties using (Kn≃ΩKn+1)
open Properties using (Kn→ΩKn+1-hom ; ΩKn+1→Kn-hom)
open GroupStructure using (∙≡+₁ ; ∙≡+₂)
open GroupStructure using (cong+ₖ-comm ; isCommΩK)
open GroupStructure using (_+ₕ_ ; -ₕ_ ; 0ₕ)
open GroupStructure using ( rUnitₕ ; lUnitₕ
; rCancelₕ ; lCancelₕ
; commₕ
; assocₕ)
open GroupStructure using (coHomRedGroupDir)
open Properties using (coHomGroup≡coHomRedGroup)
open Properties using (isOfHLevel↑∙)
open Cup using (_⌣ₖ_)
open ⌣Ring using (0ₖ-⌣ₖ ; ⌣ₖ-0ₖ)
open Cup using (_⌣_)
Lem14 : ∀ {ℓ} {A : Pointed ℓ} (n : ℕ) (f g : A →∙ K∙ n) → fst f ≡ fst g → f ≡ g
Lem14 n f g p = Homogen.→∙Homogeneous≡ (Properties.isHomogeneousKn n) p
open ⌣Ring using (leftDistr-⌣ₖ ; rightDistr-⌣ₖ)
open ⌣Ring using (assocer-helpFun≡)
open ⌣Ring using (assoc-⌣ₖ)
open ⌣Comm using () renaming (gradedComm'-⌣ₖ to gradedComm-⌣ₖ)
open ⌣Ring using (leftDistr-⌣ ; rightDistr-⌣
; assoc-⌣ ; 1⌣
; rUnit⌣ ; lUnit⌣
; ⌣0 ; 0⌣)
open ⌣Comm using (gradedComm-⌣)
open HⁿSⁿ using (Hⁿ-Sⁿ≅ℤ)
open 𝕋² using (𝕋²)
open HⁿT² using (H¹-T²≅ℤ×ℤ ; H²-T²≅ℤ)
open 𝕂² using (𝕂²)
open ℝP using (ℝP²)
open Hⁿ𝕂² using (H¹-𝕂²≅ℤ ; H²-𝕂²≅Bool)
open HⁿℝP² using (H¹-RP²≅1 ; H²-RP²≅Bool)
open HⁿℂP² using (ℂP²)
open HⁿℂP² using (H²CP²≅ℤ ; H⁴CP²≅ℤ)
open HⁿT² using (T²≠S²⋁S¹⋁S¹)
open HⁿℂP² using (g)
brunerie2 : ℤ
brunerie2 = g 1
open Homogen using (→∙Homogeneous≡)
open Homogen using (isHomogeneous→∙)
open Properties using (isHomogeneousKn)
open Path using (sym≡flipSquare ; sym-cong-sym≡id ; sym≡cong-sym)
open ⌣Comm using () renaming (cong-ₖ'-gen-inr to cong-ₖ-gen-inr)
open HⁿSⁿ using (Hⁿ-Sᵐ≅1)
open ES-axioms.coHomTheory
_ : ∀ {ℓ} → satisfies-ES-axioms.H^~ {ℓ} ≡ satisfies-ES-axioms.Ĥ
_ = satisfies-ES-axioms.coHomFunctor≡coHomFunctor'
_ : ∀ {ℓ} → ES-axioms.coHomTheory {ℓ} satisfies-ES-axioms.H^~
_ = satisfies-ES-axioms.isCohomTheoryZ
open MayerVietoris.MV using ( Ker-i⊂Im-d ; Im-d⊂Ker-i
; Ker-Δ⊂Im-i ; Im-i⊂Ker-Δ
; Ker-d⊂Im-Δ ; Im-Δ⊂Ker-d)
import Cubical.Experiments.ZCohomology.Benchmarks