2014-09-09 16:25:35 +00:00
|
|
|
-- category
|
|
|
|
|
2014-09-17 21:39:05 +00:00
|
|
|
definition Prop := Type.{0}
|
2014-09-09 16:25:35 +00:00
|
|
|
variable eq {A : Type} : A → A → Prop
|
|
|
|
infix `=`:50 := eq
|
|
|
|
|
|
|
|
variable ob : Type.{1}
|
|
|
|
variable mor : ob → ob → Type.{1}
|
|
|
|
|
|
|
|
inductive category : Type :=
|
|
|
|
mk : Π (id : Π (A : ob), mor A A),
|
|
|
|
(Π (A B : ob) (f : mor A A), id A = f) → category
|
|
|
|
|
2014-09-17 21:39:05 +00:00
|
|
|
definition id (Cat : category) := category.rec (λ id idl, id) Cat
|
2014-09-09 16:25:35 +00:00
|
|
|
variable Cat : category
|
|
|
|
|
|
|
|
theorem id_left (A : ob) (f : mor A A) : @eq (mor A A) (id Cat A) f :=
|
|
|
|
@category.rec (λ (C : category), @eq (mor A A) (id C A) f)
|
|
|
|
(λ (id : Π (T : ob), mor T T)
|
|
|
|
(idl : Π (T : ob), _),
|
|
|
|
idl A A f)
|
|
|
|
Cat
|