idToId (A B : U) (w : equiv A B)
: Id (equiv A B) (transEquiv A B (transEquivToId A B w)) w
- = lemSig (A -> B) (isEquiv A B) (propIsEquiv A B)
- (transEquiv A B (transEquivToId A B w)) w
+ = equivLemma A B (transEquiv A B (transEquivToId A B w)) w
(transIdFun A B w)
+transEquivIsEquiv (A B : U)
+ : isEquiv (Id U A B) (equiv A B) (transEquiv A B)
+ = gradLemma (Id U A B) (equiv A B) (transEquiv A B)
+ (transEquivToId A B) (idToId A B) (eqToEq A B)
+
univalence (A B : U) : equiv (Id U A B) (equiv A B) =
- (transEquiv A B,gradLemma (Id U A B) (equiv A B) (transEquiv A B)
- (transEquivToId A B) (idToId A B) (eqToEq A B))
+ (transEquiv A B,transEquivIsEquiv A B)
univalence1 (A B:U) : Id U (Id U A B) (equiv A B) =
isoId (Id U A B) (equiv A B) (transEquiv A B) (transEquivToId A B) (idToId A B) (eqToEq A B)
idToId A A (idEquiv A)
+-- The canonical map defined using J
+canIdToEquiv (A : U) : (B : U) -> Id U A B -> equiv A B =
+ J U A (\ (B : U) (_ : Id U A B) -> equiv A B) (idEquiv A)
+
+canDiagTrans (A : U) : Id (A -> A) (canIdToEquiv A A (<_> A)).1 (idfun A) =
+ <i> fill (<_> A -> A) (idfun A) [] @ -i
+
+transDiagTrans (A : U) : Id (A -> A) (idfun A) (trans A A (<_> A)) =
+ <i> \ (a : A) -> fill (<_> A) a [] @ i
+
+canIdToEquivLem (A : U) : (B : U) (p : Id U A B) ->
+ Id (A -> B) (canIdToEquiv A B p).1 (transEquiv A B p).1
+ = J U A
+ (\ (B : U) (p : Id U A B) ->
+ Id (A -> B) (canIdToEquiv A B p).1 (transEquiv A B p).1)
+ (compId (A -> A)
+ (canIdToEquiv A A (<_> A)).1 (idfun A) (trans A A (<_> A))
+ (canDiagTrans A) (transDiagTrans A))
+
+canIdToEquivIsTransEquiv (A B : U) :
+ Id (Id U A B -> equiv A B) (canIdToEquiv A B) (transEquiv A B) =
+ <i> \ (p : Id U A B) ->
+ equivLemma A B (canIdToEquiv A B p) (transEquiv A B p)
+ (canIdToEquivLem A B p) @ i
+
+-- The canonical map is an equivalence
+univalence2 (A B : U) : isEquiv (Id U A B) (equiv A B) (canIdToEquiv A B) =
+ substInv (Id U A B -> equiv A B)
+ (isEquiv (Id U A B) (equiv A B))
+ (canIdToEquiv A B) (transEquiv A B)
+ (canIdToEquivIsTransEquiv A B)
+ (transEquivIsEquiv A B)
\ No newline at end of file