Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define spectra #589

Merged
merged 15 commits into from
Oct 22, 2021
14 changes: 14 additions & 0 deletions Cubical/Data/Unit/Pointed.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{-# OPTIONS --safe #-}
module Cubical.Data.Unit.Pointed where

open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Pointed.Base

open import Cubical.Data.Unit

private
variable
ℓ : Level

Unit∙ : Pointed ℓ
Unit∙ = Unit* , tt*
12 changes: 8 additions & 4 deletions Cubical/HITs/Susp/Base.agda
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,20 @@ open import Cubical.HITs.S3

open Iso

data Susp {ℓ} (A : Type ℓ) : Type ℓ where
private
variable
ℓ ℓ′ : Level

data Susp (A : Type ℓ) : Type ℓ where
north : Susp A
south : Susp A
merid : (a : A) → north ≡ south

Susp : ∀ {ℓ} (A : Type ℓ) → Pointed ℓ
Susp A = Susp A , north
Susp∙ : (A : Type ℓ) → Pointed ℓ
Susp A = Susp A , north

-- induced function
suspFun : ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} (f : A → B)
suspFun : {A : Type ℓ} {B : Type ℓ} (f : A → B)
→ Susp A → Susp B
suspFun f north = north
suspFun f south = south
Expand Down
2 changes: 1 addition & 1 deletion Cubical/Homotopy/Freudenthal.agda
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ open import Cubical.Foundations.Equiv.HalfAdjoint

module _ {ℓ} (n : HLevel) {A : Pointed ℓ} (connA : isConnected (suc (suc n)) (typ A)) where

σ : typ A → typ (Ω (Susp (typ A)))
σ : typ A → typ (Ω (Susp (typ A)))
σ a = merid a ∙ merid (pt A) ⁻¹

private
Expand Down
54 changes: 54 additions & 0 deletions Cubical/Homotopy/Prespectrum.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{-# OPTIONS --safe #-}
{-
This uses ideas from Floris van Doorn's phd thesis and the code in
https://github.com/cmu-phil/Spectral/blob/master/spectrum/basic.hlean
-}
module Cubical.Homotopy.Prespectrum where

open import Cubical.Foundations.Prelude
open import Cubical.Foundations.GroupoidLaws
open import Cubical.Foundations.Pointed
open import Cubical.Data.Unit.Pointed

open import Cubical.Structures.Successor

open import Cubical.Data.Nat
open import Cubical.Data.Int

open import Cubical.HITs.Susp

open import Cubical.Homotopy.Loopspace

private
variable
ℓ ℓ′ : Level

record GenericPrespectrum (S : SuccStr ℓ) (ℓ′ : Level) : Type (ℓ-max (ℓ-suc ℓ′) ℓ) where
open SuccStr S
field
space : Index → Pointed ℓ′
map : (i : Index) → (space i →∙ Ω (space (succ i)))

Prespectrum = GenericPrespectrum ℤ+

Unit∙→ΩUnit∙ : {ℓ : Level} → (Unit∙ {ℓ = ℓ}) →∙ Ω (Unit∙ {ℓ = ℓ})
Unit∙→ΩUnit∙ = (λ {tt* → refl}) , refl

makeℤPrespectrum : (space : ℕ → Pointed ℓ)
(map : (i : ℕ) → (space i) →∙ Ω (space (suc i)))
→ Prespectrum ℓ
GenericPrespectrum.space (makeℤPrespectrum space map) (pos n) = space n
GenericPrespectrum.space (makeℤPrespectrum space map) (negsuc n) = Unit∙
GenericPrespectrum.map (makeℤPrespectrum space map) (pos n) = map n
GenericPrespectrum.map (makeℤPrespectrum space map) (negsuc zero) = (λ {tt* → refl}) , refl
GenericPrespectrum.map (makeℤPrespectrum space map) (negsuc (suc n)) = Unit∙→ΩUnit∙

SuspensionPrespectrum : Pointed ℓ → Prespectrum ℓ
SuspensionPrespectrum A = makeℤPrespectrum space map
where
space : ℕ → Pointed _
space zero = A
space (suc n) = Susp∙ (typ (space n))

map : (n : ℕ) → _
map n = (λ a → merid a ∙ merid (pt (space n)) ⁻¹) , rCancel (merid (pt (space n)))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about upstreaming the σ in Freudenthal and this pointed version to HITs.Susp?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll try that now...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to move it to Susp/Properties to avoid cyclic dependency problems. Also, I had to introduce new dependecies in Susp/Properties and specialize imports in some places.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you just change them to toSusp and toSuspPointed? Capital names are meant to be reserved for types (although we haven't enforced it well). Then I'll merge.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

22 changes: 22 additions & 0 deletions Cubical/Homotopy/Spectrum.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{-# OPTIONS --safe #-}
{-
This uses ideas from Floris van Doorn's phd thesis and the code in
https://github.com/cmu-phil/Spectral/blob/master/spectrum/basic.hlean
-}
module Cubical.Homotopy.Spectrum where

open import Cubical.Foundations.Prelude
open import Cubical.Data.Unit.Pointed
open import Cubical.Foundations.Equiv

open import Cubical.Data.Int

open import Cubical.Homotopy.Prespectrum

private
variable
ℓ : Level

Spectrum : (ℓ : Level) → Type (ℓ-suc ℓ)
Spectrum ℓ = let open GenericPrespectrum
in Σ[ P ∈ Prespectrum ℓ ] ((k : ℤ) → isEquiv (fst (map P k)))
29 changes: 29 additions & 0 deletions Cubical/Structures/Successor.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{-# OPTIONS --safe #-}
{-
Successor structures for spectra, chain complexes and fiber sequences.
This is an idea from Floris van Doorn's phd thesis.
-}
module Cubical.Structures.Successor where

open import Cubical.Foundations.Prelude
open import Cubical.Data.Int
open import Cubical.Data.Nat

private
variable
ℓ : Level

record SuccStr (ℓ : Level) : Type (ℓ-suc ℓ) where
field
Index : Type ℓ
succ : Index → Index

open SuccStr

ℤ+ : SuccStr ℓ-zero
ℤ+ .Index = ℤ
ℤ+ .succ = sucℤ

ℕ+ : SuccStr ℓ-zero
ℕ+ .Index = ℕ
ℕ+ .succ = suc