inl a -> inl (f a)\r
inr h -> inr (\ (b:B) -> h (g b))\r
\r
-pred : nat -> nat = split\r
- zero -> zero\r
- suc n -> n\r
-\r
-sucInj (n m : nat) (p:Id nat (suc n) (suc m)) : Id nat n m = \r
- <i> pred (p @ i)\r
-\r
caseNat (A:U) (a0 aS : A) : nat -> A = split\r
zero -> a0\r
suc n -> aS\r
(\ (m:nat) -> decEqCong (Id nat n m) (Id nat (suc n) (suc m)) (\ (p:Id nat n m) -> <i> suc (p @ i))\r
(sucInj n m) (natDec n m))\r
\r
-prop (A:U) : U = (a b:A) -> Id A a b\r
-\r
-set (A:U) : U = (a b:A) -> prop (Id A a b)\r
-\r
-exConst (A : U) :U = (f:A -> A) * const A f\r
+exConst (A : U) : U = (f:A -> A) * const A f\r
\r
decConst (A : U) : dec A -> exConst A = split\r
inl a -> (\ (x:A) -> a, \ (x y:A) -> refl A a)\r
J A a (\ (b:A) (p:Id A a b) -> Id (Id A a b) (compId A a a b (f a a (refl A a)) p) (f a b p)) \r
(refl (Id A a a) (f a a (refl A a)))\r
\r
-compUp (A : U) (a a' b b' : A) \r
- (p : Id A a a') (q: Id A b b') (r:Id A a b) : Id A a' b' =\r
- <i> comp A (r@i) [(i=0) -> p, (i=1) -> q]\r
-\r
-compDown (A : U) (a a' b b' : A) \r
- (p : Id A a a') (q: Id A b b') : Id A a' b' -> Id A a b =\r
- compUp A a' a b' b (inv A a a' p) (inv A b b' q)\r
-\r
hedberg (A : U) (h:discrete A) (a b :A) (p q:Id A a b) : Id (Id A a b) p q = \r
lemSimpl A a a b r p q rem5\r
where\r
zero -> \(x : nat) -> x
suc n -> \(x : nat) -> suc (add' n x)
+sucInj (n m : nat) (p : Id nat (suc n) (suc m)) : Id nat n m =
+ <i> pred (p @ i)
+
+-- TODO: Clean the rest of this file!
+
id (A : U) (a : A) : A = a
data list (A : U) = nil | cons (a : A) (as : list A)
(j = 1) -> <i> comp A (p @ i) [ (i=1) -> <l> q' @ k /\ l],
(k = 0) -> p,
(k = 1) -> s @ j ]
-
compId'' (A : U) (a b : A) (p : Id A a b) : (c : A) -> (q : Id A b c) -> Id A a c =
J A a ( \ (b : A) (p : Id A a b) -> (c : A) -> (q : Id A b c) -> Id A a c) rem b p
where rem (c : A) (p : Id A a c) : Id A a c = p
-
+
+compUp (A : U) (a a' b b' : A)
+ (p : Id A a a') (q : Id A b b') (r : Id A a b) : Id A a' b' =
+ <i> comp A (r @ i) [(i = 0) -> p, (i = 1) -> q]
+
+compDown (A : U) (a a' b b' : A)
+ (p : Id A a a') (q: Id A b b') : Id A a' b' -> Id A a b =
+ compUp A a' a b' b (inv A a a' p) (inv A b b' q)
+
isoId (A B : U) (f : A -> B) (g : B -> A)
(s : (y:B) -> Id B (f (g y)) y)
(t : (x:A) -> Id A (g (f x)) x) : Id U A B =