module helix where
import circle
-import retract
import equiv
encode (x:S1) (p:Id S1 base x) : helix x = subst S1 helix base x p zeroZ
loopS1equalsZ : Id U loopS1 Z =
isoId loopS1 Z (encode base) (decode base) decodeEncodeBase (encodeDecode base)
-
+setLoop : set loopS1 = substInv U set loopS1 Z loopS1equalsZ ZSet
lemPropF (A:U)(P:A->U)(pP:(x:A) -> prop (P x))(a0 a1:A)(p:Id A a0 a1)(b0:P a0)(b1:P a1): IdS A P a0 a1 p b0 b1 =
<i> (pP (p @ i) (transport (<j>P (p@i /\ j)) b0) (transport (<j>P (p@i \/ -j)) b1)) @ i
retHelix (x:S1) (p : Id S1 base x) : Id (Id S1 base x) (decode x (encode x p)) p =
transport (<i>Id (Id S1 base (p@i)) (decode (p@i) (encode (p@i) (<j>p@(i/\j)))) (<j>p@(i/\j))) (refl loopS1 triv)
-setLoop : set loopS1 = retractSet loopS1 Z (encode base) (decode base) (retHelix base) ZSet
+-- Alternative proof that loopS1 is a set (requires retract.ctt):
+-- setLoop' : set loopS1 = retractSet loopS1 Z (encode base) (decode base) (retHelix base) ZSet
-- S1 is a groupoid
isGroupoidS1 : groupoid S1 = lem