2014-12-01 05:16:01 +00:00
|
|
|
prelude
|
2014-09-09 16:25:35 +00:00
|
|
|
-- category
|
|
|
|
|
2014-09-17 21:39:05 +00:00
|
|
|
definition Prop := Type.{0}
|
2014-10-02 23:20:52 +00:00
|
|
|
constant eq {A : Type} : A → A → Prop
|
2014-09-09 16:25:35 +00:00
|
|
|
infix `=`:50 := eq
|
|
|
|
|
|
|
|
inductive category (ob : Type) (mor : ob → ob → Type) : Type :=
|
|
|
|
mk : Π (id : Π (A : ob), mor A A),
|
|
|
|
(Π (A B : ob) (f : mor A A), id A = f) → category ob mor
|
|
|
|
|
2014-09-17 21:39:05 +00:00
|
|
|
definition id (ob : Type) (mor : ob → ob → Type) (Cat : category ob mor) := category.rec (λ id idl, id) Cat
|
2014-10-02 23:20:52 +00:00
|
|
|
constant ob : Type.{1}
|
|
|
|
constant mor : ob → ob → Type.{1}
|
|
|
|
constant Cat : category ob mor
|
2014-09-09 16:25:35 +00:00
|
|
|
|
2015-01-09 02:47:44 +00:00
|
|
|
reducible id
|
2014-09-09 16:25:35 +00:00
|
|
|
theorem id_left (A : ob) (f : mor A A) : @eq (mor A A) (id ob mor Cat A) f :=
|
|
|
|
@category.rec ob mor (λ (C : category ob mor), @eq (mor A A) (id ob mor C A) f)
|
|
|
|
(λ (id : Π (T : ob), mor T T)
|
|
|
|
(idl : Π (T : ob), _),
|
|
|
|
idl A A f)
|
|
|
|
Cat
|