From: Anders Date: Mon, 18 May 2015 09:29:02 +0000 (+0200) Subject: Add direct proof that s2 is trivial (for the HIT definition of S2) X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=df7bb7712f1fd0161557f9751aaa5c71830e1e32;p=cubicaltt.git Add direct proof that s2 is trivial (for the HIT definition of S2) --- diff --git a/examples/s2.ctt b/examples/s2.ctt index 689b36e..dfb4be2 100644 --- a/examples/s2.ctt +++ b/examples/s2.ctt @@ -88,3 +88,38 @@ npropPi1Sph : Id pi1Sph trivSph loopSph' = -- Slightly simplified: npropPi1Sph' : Id pi1Sph trivSph loopSph' = inc ( comp sph (comp sph base [ (i1 = 1) -> comp sph (comp sph base [ (i2 = 1) -> surf {sph} @ i3 @ i3 ]) [ (i4 = 0) -> comp sph base [ (i6 = 0) -> comp sph (comp sph base [ (i2 = 1) -> surf {sph} @ i3 @ i3 ]) [ (i7 = 0) -> comp sph base [ (i8 = 0) -> comp sph (comp sph base [ (i2 = 1) -> surf {sph} @ i3 @ i3 ]) [ (i9 = 0) -> comp sph base [ (i10 = 0) -> comp sph base [ (i11 = 1) -> comp sph base [ (i12 = 1) -> comp sph base [ (i13 = 1) -> comp sph base [ (i14 = 0) -> comp sph base [ (i2 = 1) -> surf {sph} @ i16 @ i15 ], (i14 = 1) -> comp sph base [ (i2 = 1) -> surf {sph} @ i16 @ (i15 /\ i16) ] ] ] ] ] ] ] ] ] ] ] ]) [ (i1 = 1) -> comp sph (comp sph base [ (i2 = 1) -> surf {sph} @ i3 @ i3 ]) [ (i3 = 1) -> comp sph (comp sph base [ (i2 = 1) -> surf {sph} @ i3 @ i3 ]) [ (i4 = 0) -> comp sph (comp sph base [ (i2 = 1) -> surf {sph} @ (i5 /\ i6) @ (i5 /\ i6) ]) [ (i2 = 1) -> surf {sph} @ (i5 \/ i6) @ (i5 \/ i6) ], (i4 = 1) -> comp sph (surf {sph} @ (i5 /\ i2) @ (i5 /\ i2)) [ (i2 = 1) -> surf {sph} @ (i5 \/ i6) @ (i5 \/ i6) ] ] ] ]) + +-- Comparison with a direct proof of prop pi1Sph + +contrTruncSph : (x : gTrunc sph) -> Id (gTrunc sph) (inc base) x + = gTruncElim sph (\(x : gTrunc sph) -> Id (gTrunc sph) (inc base) x) rem1 rem2 + where + rem1 : (x : gTrunc sph) -> groupoid (Id (gTrunc sph) (inc base) x) + = \(x : gTrunc sph) + (p q : Id (gTrunc sph) (inc base) x) + (r s : Id (Id (gTrunc sph) (inc base) x) p q) + (t u : Id (Id (Id (gTrunc sph) (inc base) x) p q) r s) + -> propSet (Id (Id (gTrunc sph) (inc base) x) p q) + (\(r s : Id (Id (gTrunc sph) (inc base) x) p q) + -> squashC{gTrunc sph} (inc base) x p q r s @ i @ j @ k) + r s t u + + rem2 : (x : sph) -> Id (gTrunc sph) (inc base) (inc x) = split + base -> inc base + surf @ i j -> squashC{gTrunc sph} (inc base) (inc base) + ( inc base) ( inc base) + ( inc base) ( inc (surf{sph} @ i @ j)) + @ k @ i @ j + +propTruncSph : prop (gTrunc sph) + = \(x y : gTrunc sph) + -> compId (gTrunc sph) x (inc base) y ( contrTruncSph x @ -i) (contrTruncSph y) + +propPi1SphDirect : prop pi1Sph + = substInv U prop pi1Sph (Id (gTrunc sph) (inc base) (inc base)) (thm7312 sph base base) + (propSet (gTrunc sph) propTruncSph (inc base) (inc base)) + +-- Roughly 30x faster +npropPi1SphDirect : Id pi1Sph trivSph loopSph' + -- = propPi1SphDirect trivSph loopSph' + = inc ( comp (sph) (comp (sph) base [ (i1 = 1) -> comp (sph) base [ (i3 = 1) -> comp (sph) base [ (i4 = 1) -> comp (sph) base [ (i5 = 1) -> comp (sph) base [ (i6 = 0) -> comp (sph) base [ (i2 = 1) -> surf {sph} @ i8 @ i7 ], (i6 = 1) -> comp (sph) base [ (i2 = 1) -> surf {sph} @ i8 @ (i7 /\ i8) ] ] ] ] ] ]) [ (i1 = 1) -> comp (sph) (comp (sph) base [ (i2 = 1) -> surf {sph} @ i3 @ i3 ]) [ (i3 = 1) -> comp (sph) (comp (sph) base [ (i2 = 1) -> surf {sph} @ i3 @ i3 ]) [ (i4 = 0) -> comp (sph) (comp (sph) base [ (i2 = 1) -> surf {sph} @ (i5 /\ i6) @ (i5 /\ i6) ]) [ (i2 = 1) -> surf {sph} @ (i5 \/ i6) @ (i5 \/ i6) ], (i4 = 1) -> comp (sph) (surf {sph} @ (i5 /\ i2) @ (i5 /\ i2)) [ (i2 = 1) -> surf {sph} @ (i5 \/ i6) @ (i5 \/ i6) ] ] ] ])