Skip to content

jonsterling/agda-cubical-sets-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

agda-cubical-sets

Cubical Set(oid)s in Agda

Synopsis

This is a direct agda definition of the nominal presentation of cubical sets, roughly following descriptions from Cohen, Coquand, Huber, Mortberg, and Pitts.

Because these are defined directly in Agda we use a representation similar to families of setoids (as a flattened E-functor Cat[Cubesα΅’α΅–, Setoids]). Another difference is that our category of cubes uses a kind of defunctionalized substitution for morphisms Cubes[J, I] rather than the function space Set[I, deMorgan(J)].

Examples

We can define the interval in HIT style as follows:

data Interval (I : Sym) : Set where
  west : Interval I
  east : Interval I
  walk : (Ο† : 𝕀 I) β†’ Interval I

interval : β–‘Set
obj interval = Interval
hom interval I west west = T.πŸ™
hom interval I east east = T.πŸ™
hom interval I west (walk φ₁) = φ₁ 𝕀.β‰… #0
hom interval I east (walk φ₁) = φ₁ 𝕀.β‰… #1
hom interval I (walk Ο†β‚€) west = Ο†β‚€ 𝕀.β‰… #0
hom interval I (walk Ο†β‚€) east = Ο†β‚€ 𝕀.β‰… #1
hom interval I (walk Ο†β‚€) (walk φ₁) = Ο†β‚€ 𝕀.β‰… φ₁
…

Now we can reason about relatedness of the interval operators:

-- walk "a" β‰… west (under {"a" ≔ #0})
Ο•β‚€ :
  hom interval []
    (sub interval ("a" ≔ #0 ∷ []) (walk β‰ͺ "a" ≫))
    west
Ο•β‚€ = 𝕀.idn refl

-- walk (Β¬ "a" ∨ "b") β‰… east (under {"a" ≔ #0; "b" ≔ #0})
ϕ₁ :
  hom interval []
    (sub interval ("a" ≔ #0 ∷ "b" ≔ #0 ∷ []) (walk (Β¬ β‰ͺ "a" ≫ ∨ β‰ͺ "b" ≫)))
    east
ϕ₁ = 𝕀.seq 𝕀.∨-uni 𝕀.Β¬-#0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages