-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.kry
More file actions
36 lines (27 loc) · 943 Bytes
/
sample.kry
File metadata and controls
36 lines (27 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
-- This is a comment.
-- Equivalence of Types:
--- Contractible Type
isContr: Type -> Type
isContr X = (x:X) # (y:X) -> (x ==[X] y)
--- Homotopy Fiber
hfiber: (A:Type) -> (A -> B) -> B -> Type
hfiber A f b = (a:A) # ((f a) ==[B] b)
--- Function is Equivalence
isEquiv: (A:Type) -> (B:Type) -> (A -> B) -> Type
isEquiv A B f = (b:B) -> isContr $ hfiber A f b
--- Type of Equivalences
-- _ ~= _: Type -> Type -> Type
-- (A ~= B) = (f: A -> B) # isEquiv A B f
-- Equivalence is Reflexive:
-- idEquiv: (A:Type) -> (A ~= A)
-- idEquiv A = ( \(a:A) -> a, \(a:A) -> ((a, <i> a), equatePair a) )
-- where equatePair a (a', p) = <i> (p@i, <j> p@(i & j))
-- Equivalence is Symmetric:
-- symEquiv: (A ~= B) -> (B ~= A)
-- symEquiv (f, contrMap) =
-- (
-- invContrMap,
--
-- \(a:A) -> ( (f a, <i> a), \(F': hfiber B invContrMap a) -> <i> ( ???, <j> F'.2 @ (j | ~i)) )
-- )
-- where invContrMap = \(b:B) -> (contrMap b).1.1