1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "formal_topology/categories.ma".
16 include "formal_topology/notation.ma".
18 record Fo (C1,C2:CAT2) (F:arrows3 CAT2 C1 C2) : Type[2] ≝ {
21 FP: map_objs2 ?? F F1 =_\ID F2
24 notation "ℱ\sub 1 x" non associative with precedence 65 for @{'F1 $x}.
25 notation > "ℱ_1" non associative with precedence 90 for @{F1 ???}.
26 interpretation "F1" 'F1 x = (F1 ??? x).
28 notation "ℱ\sub 2 x" non associative with precedence 65 for @{'F2 $x}.
29 notation > "ℱ_2" non associative with precedence 90 for @{F2 ???}.
30 interpretation "F2" 'F2 x = (F2 ??? x).
32 lemma REW : ∀C1,C2: CAT2.∀F:arrows3 CAT2 C1 C2.∀X,Y:Fo ?? F.
33 arrows2 C2 (F (ℱ_1 X)) (F (ℱ_1 Y)) →
34 arrows2 C2 (ℱ_2 X) (ℱ_2 Y).
35 intros 5; cases X; cases Y; clear X Y;
36 cases H; cases H1; intros; assumption;
39 record Fm_c (C1,C2:CAT2) (F:arrows3 CAT2 C1 C2) (X,Y:Fo ?? F) : Type[2] ≝ {
40 Fm2: arrows2 C2 (F2 ??? X) (F2 ??? Y);
41 Fm1: arrows2 C1 (F1 ??? X) (F1 ??? Y);
42 FmP: REW ?? F X Y (map_arrows2 ?? F ?? Fm1) = Fm2
45 notation "ℳ\sub 1 x" non associative with precedence 65 for @{'Fm1 $x}.
46 notation > "ℳ_1" non associative with precedence 90 for @{Fm1 ?????}.
47 interpretation "Fm1" 'Fm1 x = (Fm1 ????? x).
49 notation "ℳ\sub 2 x" non associative with precedence 65 for @{'Fm2 $x}.
50 notation > "ℳ_2" non associative with precedence 90 for @{Fm2 ?????}.
51 interpretation "Fm2" 'Fm2 x = (Fm2 ????? x).
54 ∀C1,C2: CAT2.∀F:arrows3 CAT2 C1 C2.
55 Fo ?? F → Fo ?? F → setoid2.
56 intros (C1 C2 F X Y); constructor 1; [apply (Fm_c C1 C2 F X Y)]
57 constructor 1; [apply (λf,g.Fm2 ????? f =_2 Fm2 ????? g);]
59 | intros 3; apply sym2; assumption;
60 | intros 5; apply (trans2 ?? ??? x1 x2);]
64 ∀C1,C2: CAT2.∀F:arrows3 CAT2 C1 C2.∀o.Fm ?? F o o.
65 intros; constructor 1;
66 [ apply (id2 C2 (F2 ??? o));
67 | apply (id2 C1 (F1 ??? o));
68 | cases o; cases H; simplify; apply (respects_id2 ?? F);]
72 ∀C1,C2: CAT2.∀F:arrows3 CAT2 C1 C2.∀o1,o2,o3.
73 (Fm ?? F o1 o2) × (Fm ?? F o2 o3) ⇒_2 (Fm ?? F o1 o3).
74 intros; constructor 1;
75 [ intros (f g); constructor 1;
76 [ apply (comp2 C2 ??? (ℳ_2 f) (ℳ_2 g));
77 | apply (comp2 C1 ??? (ℳ_1 f) (ℳ_1 g));
78 | apply hide; cases o1 in f; cases o2 in g; cases o3; clear o1 o2 o3;
79 cases H; cases H1; cases H2; intros 2; cases c; cases c1; clear c c1;
80 simplify; apply (.= (respects_comp2:?)); apply (e1‡e);]
81 | intros 6; change with ((ℳ_2 b ∘ ℳ_2 a) = (ℳ_2 b' ∘ ℳ_2 a'));
82 change in e1 with (ℳ_2 b = ℳ_2 b');
83 change in e with (ℳ_2 a = ℳ_2 a');
88 definition Apply : ∀C1,C2: CAT2.arrows3 CAT2 C1 C2 → CAT2.
95 | intros; apply (comp_assoc2 C2 ???? (ℳ_2 a12) (ℳ_2 a23) (ℳ_2 a34));
96 | intros; apply (id_neutral_right2 C2 ?? (ℳ_2 a));
97 | intros; apply (id_neutral_left2 C2 ?? (ℳ_2 a));]
100 definition faithful ≝
101 λC1,C2.λF:arrows3 CAT2 C1 C2.∀S,T.∀f,g:arrows2 C1 S T.
102 map_arrows2 ?? F ?? f = map_arrows2 ?? F ?? g → f=g.
104 definition Ylppa : ∀C1,C2: CAT2.∀F:arrows3 CAT2 C1 C2.
105 faithful ?? F → let rC2 ≝ Apply ?? F in arrows3 CAT2 rC2 C1.
106 intros; constructor 1;
107 [ intro; apply (ℱ_1 o);
108 | intros; constructor 1;
109 [ intros; apply (ℳ_1 c);
110 | apply hide; intros; apply f; change in e with (ℳ_2 a = ℳ_2 a');
111 lapply (FmP ????? a) as H1; lapply (FmP ????? a') as H2;
112 cut (REW ????? (map_arrows2 ?? F ?? (ℳ_1 a)) =
113 REW ????? (map_arrows2 ?? F ?? (ℳ_1 a')));[2:
114 apply (.= H1); apply (.= e); apply (H2^-1);]
115 clear H1 H2 e; cases S in a a' Hcut; cases T;
116 cases H; cases H1; simplify; intros; assumption;]
117 | intro; apply rule #;
118 | intros; simplify; apply rule #;]