diff --git a/src/HottBook/Chapter2Util.agda b/src/HottBook/Chapter2Util.agda index 7043fe2..09e6d04 100644 --- a/src/HottBook/Chapter2Util.agda +++ b/src/HottBook/Chapter2Util.agda @@ -2,10 +2,25 @@ module HottBook.Chapter2Util where open import HottBook.Chapter1 open import HottBook.Chapter2 +open import HottBook.CoreUtil neg-homotopy : (neg ∘ neg) ∼ id neg-homotopy true = refl neg-homotopy false = refl neg-equiv : 𝟚 ≃ 𝟚 -neg-equiv = neg , qinv-to-isequiv (mkQinv neg neg-homotopy neg-homotopy) \ No newline at end of file +neg-equiv = neg , qinv-to-isequiv (mkQinv neg neg-homotopy neg-homotopy) + +Bool : βˆ€ {l} β†’ Set l +Bool = Lift 𝟚 + +Bool-neg : βˆ€ {l} β†’ Bool {l} β†’ Bool {l} +Bool-neg (lift true) = lift false +Bool-neg (lift false) = lift true + +Bool-neg-homotopy : βˆ€ {l} β†’ (Bool-neg {l} ∘ Bool-neg {l}) ∼ id +Bool-neg-homotopy (lift true) = refl +Bool-neg-homotopy (lift false) = refl + +Bool-neg-equiv : βˆ€ {l} β†’ Bool {l} ≃ Bool {l} +Bool-neg-equiv = Bool-neg , qinv-to-isequiv (mkQinv Bool-neg Bool-neg-homotopy Bool-neg-homotopy) \ No newline at end of file diff --git a/src/HottBook/Chapter3.lagda.md b/src/HottBook/Chapter3.lagda.md index 175ed2b..c268f5e 100644 --- a/src/HottBook/Chapter3.lagda.md +++ b/src/HottBook/Chapter3.lagda.md @@ -126,30 +126,35 @@ lemma3βˆ™1βˆ™8 {A} A-set x y p q r s = ### Example 3.1.9 ``` -example3βˆ™1βˆ™9 : Β¬ (isSet Set) +example3βˆ™1βˆ™9 : βˆ€ {l} β†’ Β¬ (isSet (Set l)) example3βˆ™1βˆ™9 p = remark2βˆ™12βˆ™6.trueβ‰’false lol where open axiom2βˆ™10βˆ™3 - f-path : 𝟚 ≑ 𝟚 - f-path = ua neg-equiv + f-path : Bool ≑ Bool + f-path = ua Bool-neg-equiv - bogus : id ≑ neg + bogus : id ≑ Bool-neg bogus = let helper : f-path ≑ refl - helper = p 𝟚 𝟚 f-path refl + helper = p Bool Bool f-path refl wtf : idtoeqv f-path ≑ idtoeqv refl wtf = ap idtoeqv helper + wtf2 : Ξ£.fst (idtoeqv (ua Bool-neg-equiv)) ≑ id wtf2 = ap Ξ£.fst wtf - wtf3 = ap Ξ£.fst (propositional-computation neg-equiv) + + wtf3 : Ξ£.fst (idtoeqv (ua Bool-neg-equiv)) ≑ Bool-neg + wtf3 = ap Ξ£.fst (propositional-computation Bool-neg-equiv) + + wtf4 : Bool-neg ≑ id wtf4 = sym wtf3 βˆ™ wtf2 in sym wtf4 lol : true ≑ false - lol = ap (Ξ» f β†’ f true) bogus + lol = ap (Ξ» f β†’ Lift.lower (f (lift true))) bogus ``` ## 3.2 Propositions as types? diff --git a/src/HottBook/Chapter3Exercises.lagda.md b/src/HottBook/Chapter3Exercises.lagda.md index 2340e6a..f13512a 100644 --- a/src/HottBook/Chapter3Exercises.lagda.md +++ b/src/HottBook/Chapter3Exercises.lagda.md @@ -30,11 +30,25 @@ exercise3βˆ™1 {A} {B} equiv@(f , mkIsEquiv g g* h h*) isSetA xB yB pB qB = lol3 : ap (f ∘ g) pB ≑ ap (f ∘ g) qB lol3 = sym (lemma2βˆ™2βˆ™2.iii g f pB) βˆ™ lol2 βˆ™ (lemma2βˆ™2βˆ™2.iii g f qB) - lemma1 : βˆ€ {A B} {x y : A} (f g : A β†’ B) - β†’ (p : x ≑ y) - β†’ f ≑ g - β†’ ap f p ≃ {! ap g p !} - lemma1 = {! !} + lol4 : (xB ≑ yB) β†’ ((f ∘ g) xB ≑ (f ∘ g) yB) + lol4 p = ap (f ∘ g) p + + lol5 : ((f ∘ g) xB ≑ (f ∘ g) yB) β†’ (xB ≑ yB) + lol5 p = sym (g* xB) βˆ™ p βˆ™ g* yB + + -- lol4 : (xB ≑ yB) β†’ ((f ∘ g) xB ≑ (f ∘ g) yB) + -- lol4 = ua (ff , qinv-to-isequiv (mkQinv gg forward {! !})) + -- where + -- gg : ((f ∘ g) xB ≑ (f ∘ g) yB) β†’ (xB ≑ yB) + -- gg p = sym (g* xB) βˆ™ p βˆ™ g* yB + -- forward : (p : (f ∘ g) xB ≑ (f ∘ g) yB) β†’ ap (f ∘ g) (gg p) ≑ p + -- forward p = {! !} + + -- lemma1 : βˆ€ {A B} {x y : A} (f g : A β†’ B) + -- β†’ (p : x ≑ y) + -- β†’ f ≑ g + -- β†’ ap f p ≃ {! ap g p !} + -- lemma1 = {! !} -- lol4 : βˆ€ {A B} {x y : B} -- β†’ (p : x ≑ y) β†’ (f : A β†’ B) β†’ (g : B β†’ A) diff --git a/src/HottBook/Chapter6.lagda.md b/src/HottBook/Chapter6.lagda.md index a1d501b..b3b2631 100644 --- a/src/HottBook/Chapter6.lagda.md +++ b/src/HottBook/Chapter6.lagda.md @@ -1,3 +1,6 @@ +
+ Imports + ``` module HottBook.Chapter6 where @@ -10,14 +13,11 @@ private l : Level ``` +
+ # Chapter 6 Higher Inductive Types -``` -postulate - SΒΉ : Set - base : SΒΉ - loop : base ≑ base -``` +Using the approach from here: https://github.com/HoTT/HoTT-Agda/blob/master/old/Spaces/Circle.agda ## 6.2 Induction principles and dependent paths @@ -50,4 +50,50 @@ record I-ind (P : I β†’ Set) (b0 : P 0I) (b1 : P 1I) (s : b0 ≑[ P , seg ] b1) prop1 : f 0I ≑ b0 prop2 : f 1I ≑ b1 prop3 : apd f seg ≑ {! s !} +``` + +## 6.4 Circles and sphere + +``` +private + data #SΒΉ : Set where + #base : #SΒΉ + +SΒΉ : Set +SΒΉ = #SΒΉ + +base : SΒΉ +base = #base + +postulate + loop : base ≑ base + +SΒΉ-rec : {P : SΒΉ β†’ Set} β†’ (b : P base) β†’ (l : b ≑[ P , loop ] b) β†’ ((x : SΒΉ) β†’ P x) +SΒΉ-rec b l #base = b + +postulate + SΒΉ-rec-loop : {P : SΒΉ β†’ Set} β†’ (b : P base) β†’ (l : b ≑[ P , loop ] b) β†’ apd (SΒΉ-rec b l) loop ≑ l +``` + +### Lemma 6.4.1 + +``` +lemma6βˆ™4βˆ™1 : loop β‰’ refl +lemma6βˆ™4βˆ™1 loop≑refl = + {! !} + where + f : {A : Set} {x : A} {p : x ≑ x} β†’ (SΒΉ β†’ A) + f {A = A} {x = x} {p = p} s = + let p' = transportconst A loop x + in (SΒΉ-rec x (p' βˆ™ p)) s + f-loop : {A : Set} {x : A} {p : x ≑ x} β†’ apd f loop ≑ p + f-loop {x = x} = SΒΉ-rec-loop x ? + + goal : βŠ₯ + + goal2 : (A : Set l) (a : A) (p : a ≑ a) β†’ isSet A + goal = example3βˆ™1βˆ™9 (goal2 {! !} {! !} {! !}) + + -- goal3 : βˆ€ (s : SΒΉ) (p : s ≑ s) β†’ p ≑ refl + goal2 A a p x y r s = {! !} ``` \ No newline at end of file