From: Anders Date: Tue, 12 May 2015 08:54:16 +0000 (+0200) Subject: Isomorphism of the direct and the susp definition of S2 X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=a59e63c84670f1686b7538569e86f9d5e69e024b;p=cubicaltt.git Isomorphism of the direct and the susp definition of S2 --- diff --git a/examples/s2.ctt b/examples/s2.ctt index 359ddf9..689b36e 100644 --- a/examples/s2.ctt +++ b/examples/s2.ctt @@ -1,12 +1,90 @@ module s2 where -import prelude +import pointed +import pi1s2 -data S2 = base - | loop2 [ (i=0) -> base - , (i=1) -> base - , (j=0) -> base - , (j=1) -> base] +data sph + = base + | surf [ (i=0) -> base + , (i=1) -> base + , (j=0) -> base + , (j=1) -> base + ] -loop2' : Id (Id S2 base base) (refl S2 base) (refl S2 base) = - loop2 {S2} @ i @ j +-- Isomorphism of sph and S2 due to tomjack: + +suspSurf : Id (Id S2 north north) ( north) ( north) + = comp S2 (merid{S2} (loop{S1} @ j) @ k) + [ (j=0) -> merid{S2} base @ -j /\ k + , (j=1) -> merid{S2} base @ -j /\ k + , (k=1) -> merid{S2} base @ -k + ] + +toS2 : sph -> S2 = split + base -> north + surf @ j k -> suspSurf @ j @ k + +sphMerid : S1 -> Id sph base base = split + base -> base + loop @ j -> surf{sph} @ j @ k + +fromS2 : S2 -> sph = split + north -> base + south -> base + merid x @ k -> sphMerid x @ k + +toFromS2 : (x : S2) -> Id S2 (toS2 (fromS2 x)) x = split + north -> north + south -> merid{S2} base @ i + merid x @ k -> rem x @ k + where + rem : (x : S1) + -> IdP ( Id S2 (toS2 (fromS2 (merid{S2} x @ k))) (merid{S2} x @ k)) + ( north) + ( merid{S2} base @ i) + = split + base -> merid{S2} base @ k /\ i + loop @ j -> comp S2 (merid{S2} (loop{S1} @ j) @ k) + [ (j=0) -> merid{S2} base @ -(-i /\ j) /\ k + , (j=1) -> merid{S2} base @ -(-i /\ j) /\ k + , (k=1) -> merid{S2} base @ -(-i /\ k) + ] + +fromToS2 : (x : sph) -> Id sph (fromS2 (toS2 x)) x = split + base -> base + surf @ j k -> surf{sph} @ j @ k + +s2EqSph : Id U S2 sph + = isoId S2 sph fromS2 toS2 fromToS2 toFromS2 + +s2EqSphPt : Id ptType (S2, north) (sph, base) + = (s2EqSph @ i, transport ( s2EqSph @ i /\ j) north) + +loopSph : U = Id sph base base +pi1Sph : U = sTrunc loopSph + +pi1 (A : ptType) : U = sTrunc (Id A.1 A.2 A.2) +propPi1 (A : ptType) : U = prop (pi1 A) + +trivSph : pi1Sph = subst ptType pi1 (S2, north) (sph, base) s2EqSphPt trivS2 +-- NORMEVAL: inc ( base) + +loopSph : pi1Sph = subst ptType pi1 (S2, north) (sph, base) s2EqSphPt loopS2 +-- NORMEVAL: inc ( base) + +loopSph' : pi1Sph = inc ( surf{sph} @ i @ i) +-- NORMEVAL: inc ( surf {sph} @ !0 @ !0) + +propPi1Sph : prop pi1Sph + = subst ptType propPi1 (S2, north) (sph, base) s2EqSphPt propPi1S2 + +-- > :n propPi1Sph trivSph loopSph +-- NORMEVAL: inc ( base) + +-- > :n propPi1Sph trivSph loopSph' +npropPi1Sph : Id pi1Sph trivSph loopSph' = + inc ( comp sph (comp sph base [ (i1 = 1) -> comp sph base [ (i3 = 1) -> comp sph base [ (i4 = 1) -> comp sph (comp sph base [ (i2 = 1) -> surf {sph} @ i3 @ i3 ]) [ (i5 = 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) ] ] ] ]) + +-- 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) ] ] ] ])