From cd08197d66817211905106a02b62628779c7cb91 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Mon, 31 Oct 2022 16:05:18 -0500 Subject: [PATCH] update --- cubical-playground.agda-lib | 2 +- src/Ch6.agda | 75 +++++++++++++++++++++++++++++++++++++ src/HIT.agda | 13 +++++++ src/loopspace.agda | 20 ++++++++++ 4 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 src/Ch6.agda create mode 100644 src/HIT.agda create mode 100644 src/loopspace.agda diff --git a/cubical-playground.agda-lib b/cubical-playground.agda-lib index 672cf91..53c7164 100644 --- a/cubical-playground.agda-lib +++ b/cubical-playground.agda-lib @@ -1,2 +1,2 @@ include: src -depend: standard-library +depend: standard-library cubical diff --git a/src/Ch6.agda b/src/Ch6.agda new file mode 100644 index 0000000..053da39 --- /dev/null +++ b/src/Ch6.agda @@ -0,0 +1,75 @@ +{-# OPTIONS --cubical #-} + +module Ch6 where + +open import Cubical.Core.Everything +open import Cubical.Foundations.Prelude + +open import HIT using (SĀ¹; base; loop; apd) + +-- Lemma 6.2.5, if A is a type together with a : A and p : a = a, then there is +-- a function f : š•ŠĀ¹ ā†’ A with f(base) :ā‰” a and ap\_f(loop) := p + +lemma625 : {A : Type} ā†’ (a : A) ā†’ (p : a ā‰” a) ā†’ (SĀ¹ ā†’ A) +lemma625 a p base = a +lemma625 a p (loop i) = a + +lemma625prop1 : {A : Type} {a : A} {p : a ā‰” a} ā†’ (lemma625 a p base ā‰” a) +lemma625prop1 = refl + +lemma625prop2 : {A : Type} {a : A} {p : a ā‰” a} ā†’ (apd (lemma625 a p) loop ā‰” p) +lemma625prop2 {a} {p} = ? + +-- Lemma 6.2.8 + +lemma628 : {A : Type} (f g : SĀ¹ ā†’ A) + ā†’ (p : f base ā‰” g base) + ā†’ (q : f loop ā‰” g loop) + ā†’ ((x : SĀ¹) ā†’ f x ā‰” g x) + +-- Lemma 6.2.9 + +-- lemma629f : {A : Type} ā†’ (g : SĀ¹ ā†’ A) ā†’ {x : A} ā†’ Ī£ A (x ā‰” x) +-- +-- lemma629 : {A : Type} ā†’ (SĀ¹ ā†’ A) ā‰” ((x : A) ā†’ x ā‰” x) +-- lemma629 = ? + +-- Lemma 6.3.1 +-- Type I is contractible + +record is-contr {ā„“} (A : Type ā„“) : Type ā„“ where + constructor contr + field + centre : A + paths : (x : A) ā†’ centre ā‰” x +open is-contr public + +-- Lemma 6.3.2 +-- Function extensionality + +lemma632 : {A B : Type} {f g : A ā†’ B} ā†’ ((x : A) ā†’ f x ā‰” g x) ā†’ f ā‰” g +lemma632 {A} {B} {f} {g} p = + -- For all x : A, define a function pā‚“ : I ā†’ B + ? + where + pā‚“ : {x : A} ā†’ I ā†’ B + -- pā‚“ {x} i0 = f x + -- pā‚“ {x} i1 = g x +-- pā‚“ i0 = f x +-- pā‚“ i1 = g x +-- pā‚“ seg = p x in +-- let q : I ā†’ (A ā†’ B) +-- q i x = pā‚“ i in + +-- Lemma 6.4.1 + +open import Data.Empty using (āŠ„; āŠ„-elim) + +Ā¬_ : Set ā†’ Set +Ā¬ A = A ā†’ āŠ„ + +_ā‰¢_ : āˆ€ {A : Set} ā†’ A ā†’ A ā†’ Set +x ā‰¢ y = Ā¬ (x ā‰” y) + +lemma641 : loop ā‰¢ refl +lemma641 p = ? diff --git a/src/HIT.agda b/src/HIT.agda new file mode 100644 index 0000000..4197665 --- /dev/null +++ b/src/HIT.agda @@ -0,0 +1,13 @@ +{-# OPTIONS --cubical #-} + +module HIT where + +open import Cubical.Core.Everything + +data SĀ¹ : Set where + base : SĀ¹ + loop : base ā‰” base + +apd : {A : Set} {B : A ā†’ Set} (f : (x : A) ā†’ B x) {x y : A} (p : x ā‰” y) + ā†’ PathP (Ī» i ā†’ B (p i)) (f x) (f y) +apd f p i = f (p i) diff --git a/src/loopspace.agda b/src/loopspace.agda new file mode 100644 index 0000000..886399e --- /dev/null +++ b/src/loopspace.agda @@ -0,0 +1,20 @@ +-- TODO: Define arbitrary high loop spaces + +-- Prelude stuff +{-# OPTIONS --cubical #-} + +open import Agda.Primitive public renaming ( Set to Type ) +open import Agda.Builtin.Cubical.Path public + +variable + ā„“ : Level + +Path : āˆ€ {ā„“} (A : Type ā„“) ā†’ A ā†’ A ā†’ Type ā„“ +Path A a b = PathP (Ī» _ ā†’ A) a b + +-- Circle +data SĀ¹ : Type where + base : SĀ¹ + loop : base ā‰” base + +