some category theory
This commit is contained in:
parent
a3cd366379
commit
7dce99e1f8
1 changed files with 21 additions and 0 deletions
|
|
@ -18,6 +18,12 @@ section Category
|
||||||
def initial (A : Obj) := forall (B : Obj), exists_uniq_t (Hom A B);
|
def initial (A : Obj) := forall (B : Obj), exists_uniq_t (Hom A B);
|
||||||
def terminal (A : Obj) := forall (B : Obj), exists_uniq_t (Hom B A);
|
def terminal (A : Obj) := forall (B : Obj), exists_uniq_t (Hom B A);
|
||||||
|
|
||||||
|
def product (A B C : Obj) (piA : Hom C A) (piB : Hom C B) :=
|
||||||
|
forall (D : Obj) (f : Hom D A) (g : Hom D B),
|
||||||
|
exists_uniq (Hom D C) (fun (fxg : Hom D C) =>
|
||||||
|
and (eq (Hom D A) (comp D C A fxg piA) f)
|
||||||
|
(eq (Hom D B) (comp D C B fxg piB) g));
|
||||||
|
|
||||||
section Inverses
|
section Inverses
|
||||||
variable
|
variable
|
||||||
(A B : Obj)
|
(A B : Obj)
|
||||||
|
|
@ -48,4 +54,19 @@ section Category
|
||||||
(eq_trans (Hom B B) (comp B A B g f) b (id B)
|
(eq_trans (Hom B B) (comp B A B g f) b (id B)
|
||||||
(eq_sym (Hom B B) b (comp B A B g f) (b_uniq (comp B A B g f)))
|
(eq_sym (Hom B B) b (comp B A B g f) (b_uniq (comp B A B g f)))
|
||||||
(b_uniq (id B)))))))));
|
(b_uniq (id B)))))))));
|
||||||
|
|
||||||
|
def terminal_uniq (A B : Obj) (hA : terminal A) (hB : terminal B) : isomorphic A B :=
|
||||||
|
exists_uniq_t_elim (Hom A B) (isomorphic A B) (hB A) (fun (f : Hom A B) (f_uniq : forall (y : Hom A B), eq (Hom A B) f y) =>
|
||||||
|
exists_uniq_t_elim (Hom B A) (isomorphic A B) (hA B) (fun (g : Hom B A) (g_uniq : forall (y : Hom B A), eq (Hom B A) g y) =>
|
||||||
|
exists_uniq_t_elim (Hom A A) (isomorphic A B) (hA A) (fun (a : Hom A A) (a_uniq : forall (y : Hom A A), eq (Hom A A) a y) =>
|
||||||
|
exists_uniq_t_elim (Hom B B) (isomorphic A B) (hB B) (fun (b : Hom B B) (b_uniq : forall (y : Hom B B), eq (Hom B B) b y) =>
|
||||||
|
exists_intro (Hom A B) (fun (f : Hom A B) => exists (Hom B A) (inv A B f)) f
|
||||||
|
(exists_intro (Hom B A) (inv A B f) g
|
||||||
|
(and_intro (inv_l A B f g) (inv_r A B f g)
|
||||||
|
(eq_trans (Hom A A) (comp A B A f g) a (id A)
|
||||||
|
(eq_sym (Hom A A) a (comp A B A f g) (a_uniq (comp A B A f g)))
|
||||||
|
(a_uniq (id A)))
|
||||||
|
(eq_trans (Hom B B) (comp B A B g f) b (id B)
|
||||||
|
(eq_sym (Hom B B) b (comp B A B g f) (b_uniq (comp B A B g f)))
|
||||||
|
(b_uniq (id B)))))))));
|
||||||
end Category
|
end Category
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue