{-# OPTIONS --safe #-}
module Cubical.Papers.Synthetic where
import Agda.Builtin.Cubical.Path as Path
import Cubical.Foundations.Prelude as Prelude
import Agda.Primitive.Cubical as PrimitiveCubical
import Cubical.Data.Bool as Bool
import Cubical.Core.Primitives as CorePrimitives
import Cubical.HITs.S1 as S1
import Cubical.Foundations.Equiv as Equiv
import Cubical.Core.Glue as CoreGlue
import Cubical.Foundations.Univalence as Univalence
import Cubical.HITs.Torus as T2
import Cubical.Data.Int as Int
import Cubical.Data.Int.Properties as IntProp
import Cubical.Foundations.Isomorphism as Isomorphism
import Cubical.HITs.Susp as Suspension
import Cubical.HITs.Sn as Sn
import Agda.Builtin.Nat as BNat
import Agda.Builtin.Bool as BBool
import Cubical.Foundations.GroupoidLaws as GroupoidLaws
import Cubical.HITs.S2 as S2
import Cubical.HITs.S3 as S3
import Cubical.HITs.Pushout as Push
import Cubical.HITs.Pushout.Properties as PushProp
import Cubical.HITs.Join as Join
import Cubical.HITs.Join.Properties as JoinProp
import Cubical.Homotopy.Hopf as Hopf
open Path using (PathP) public
open Prelude using (_≡_ ; refl ; funExt) public
open Prelude renaming (sym to _⁻¹) public
open Prelude using (transport ; subst ; J ; JRefl) public
open PrimitiveCubical using (Partial) public
open Bool using (Bool ; true ; false) public
partialBool : ∀ i → Partial (i ∨ ~ i) Bool
partialBool i = λ {(i = i1) → true
; (i = i0) → false}
open CorePrimitives using (inS ; outS ; hcomp) public
open Prelude using (_∙_) public
open S1 using (S¹ ; base ; loop) public
double : S¹ → S¹
double base = base
double (loop i) = (loop ∙ loop) i
open Equiv using (idEquiv) public
open CoreGlue using (Glue) public
open Univalence using (ua) public
open T2 using ( Torus ; point ; line1 ; line2 ; square
; t2c ; c2t ; c2t-t2c ; t2c-c2t ; Torus≡S¹×S¹)
open S1 using (ΩS¹) public
open T2 using (ΩTorus) public
open Int using (pos ; negsuc) renaming (ℤ to Int) public
open IntProp using (sucPathℤ) public
open S1 using (helix ; winding) public
_ : winding (loop ∙ loop ∙ loop) ≡ pos 3
_ = refl
_ : winding ((loop ⁻¹) ∙ loop ∙ (loop ⁻¹)) ≡ negsuc 0
_ = refl
open S1 renaming (intLoop to loopn) public
open S1 renaming (windingℤLoop to winding-loopn) public
open S1 using (encode ; decode ; decodeEncode ; ΩS¹≡ℤ) public
open Isomorphism using (isoToPath ; iso) public
ΩS¹≡Int' : ΩS¹ ≡ Int
ΩS¹≡Int' = isoToPath (iso winding loopn
winding-loopn (decodeEncode base))
open T2 using (ΩTorus≡ℤ×ℤ ; windingTorus) public
_ : windingTorus (line1 ∙ line2) ≡ (pos 1 , pos 1)
_ = refl
_ : windingTorus ((line1 ⁻¹) ∙ line2 ∙ line1) ≡ (pos 0 , pos 1)
_ = refl
open Suspension using (Susp ; north ; south ; merid) public
open Sn using (S₊) public
open Suspension using ( SuspBool→S¹ ; S¹→SuspBool
; SuspBool→S¹→SuspBool
; S¹→SuspBool→S¹) public
open BNat renaming (Nat to ℕ) hiding (_*_) public
open CorePrimitives renaming (Type to Set) public
open BBool using (Bool) public
_-sphere : ℕ → Set
0 -sphere = Bool
(suc n) -sphere = Susp (n -sphere)
open BBool using (true ; false) public
s2c : 1 -sphere → S¹
s2c north = base
s2c south = base
s2c (merid true i) = loop i
s2c (merid false i) = base
c2s : S¹ → 1 -sphere
c2s base = north
c2s (loop i) = (merid true ∙ (merid false ⁻¹)) i
open GroupoidLaws using (rUnit) public
s2c-c2s : ∀ (p : S¹) → s2c (c2s p) ≡ p
s2c-c2s base = refl
s2c-c2s (loop i) j = rUnit loop (~ j) i
h1 : I → I → 1 -sphere
h1 i j = merid false (i ∧ j)
h2 : I → I → 1 -sphere
h2 i j = hcomp (λ k → λ { (i = i0) → north
; (i = i1) → merid false (j ∨ ~ k)
; (j = i1) → merid true i })
(merid true i)
c2s-s2c : ∀ (t : 1 -sphere) → c2s (s2c t) ≡ t
c2s-s2c north j = north
c2s-s2c south j = merid false j
c2s-s2c (merid true i) j = h2 i j
c2s-s2c (merid false i) j = merid false (i ∧ j)
1-sphere≡S¹ : 1 -sphere ≡ S¹
1-sphere≡S¹ = isoToPath (iso s2c c2s s2c-c2s c2s-s2c)
open S2 using (S²) public
open S3 using (S³) public
open Push using (Pushout) public
open PushProp using (3x3-span) public
open 3x3-span using (f□1) public
open 3x3-span using (3x3-lemma) public
open Join renaming (join to Join) using (S³≡joinS¹S¹) public
open JoinProp using (join-assoc) public
open S1 using (_·_ ; rotLoop) public
open Hopf.S¹Hopf renaming ( HopfSuspS¹ to Hopf
; JoinS¹S¹→TotalHopf to j2h
; TotalHopf→JoinS¹S¹ to h2j)
using (HopfS²) public
open S1 renaming (rotInv-1 to lem-rot-inv) public