]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/library/formal_topology/concrete_spaces.ma
Reordering of lemmas in proper places.
[helm.git] / helm / software / matita / library / formal_topology / concrete_spaces.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "formal_topology/basic_pairs.ma".
16
17 record concrete_space : Type ≝
18  { bp:> BP;
19    converges: ∀a: concr bp.∀U,V: form bp. a ⊩ U → a ⊩ V → a ⊩ (U ↓ V);
20    all_covered: ∀x: concr bp. x ⊩ form bp
21  }.
22
23 definition bp': concrete_space → basic_pair ≝ λc.bp c.
24
25 coercion bp'.
26
27 record convergent_relation_pair (CS1,CS2: concrete_space) : Type ≝
28  { rp:> arrows1 ? CS1 CS2;
29    respects_converges:
30     ∀b,c.
31      extS ?? rp \sub\c (BPextS CS2 (b ↓ c)) =
32      BPextS CS1 ((extS ?? rp \sub\f b) ↓ (extS ?? rp \sub\f c));
33    respects_all_covered:
34     extS ?? rp\sub\c (BPextS CS2 (form CS2)) = BPextS CS1 (form CS1)
35  }.
36
37 definition rp' : ∀CS1,CS2. convergent_relation_pair CS1 CS2 → relation_pair CS1 CS2 ≝
38  λCS1,CS2,c. rp CS1 CS2 c.
39  
40 coercion rp'.
41
42 definition convergent_relation_space_setoid: concrete_space → concrete_space → setoid1.
43  intros;
44  constructor 1;
45   [ apply (convergent_relation_pair c c1)
46   | constructor 1;
47      [ intros;
48        apply (relation_pair_equality c c1 c2 c3);
49      | intros 1; apply refl1;
50      | intros 2; apply sym1; 
51      | intros 3; apply trans1]]
52 qed.
53
54 definition rp'': ∀CS1,CS2.convergent_relation_space_setoid CS1 CS2 → arrows1 BP CS1 CS2 ≝
55  λCS1,CS2,c.rp ?? c.
56
57 coercion rp''.
58
59 definition convergent_relation_space_composition:
60  ∀o1,o2,o3: concrete_space.
61   binary_morphism1
62    (convergent_relation_space_setoid o1 o2)
63    (convergent_relation_space_setoid o2 o3)
64    (convergent_relation_space_setoid o1 o3).
65  intros; constructor 1;
66      [ intros; whd in c c1 ⊢ %;
67        constructor 1;
68         [ apply (fun1 ??? (comp1 BP ???)); [apply (bp o2) |*: apply rp; assumption]
69         | intros;
70           change in ⊢ (? ? ? (? ? ? (? ? ? %) ?) ?) with (c \sub \c ∘ c1 \sub \c);
71           change in ⊢ (? ? ? ? (? ? ? ? (? ? ? ? ? (? ? ? (? ? ? %) ?) ?)))
72             with (c \sub \f ∘ c1 \sub \f);
73           change in ⊢ (? ? ? ? (? ? ? ? (? ? ? ? ? ? (? ? ? (? ? ? %) ?))))
74             with (c \sub \f ∘ c1 \sub \f);
75           apply (.= (extS_com ??????));
76           apply (.= (†(respects_converges ?????)));
77           apply (.= (respects_converges ?????));
78           apply (.= (†(((extS_com ??????) \sup -1)‡(extS_com ??????)\sup -1)));
79           apply refl1;
80         | change in ⊢ (? ? ? (? ? ? (? ? ? %) ?) ?) with (c \sub \c ∘ c1 \sub \c);
81           apply (.= (extS_com ??????));
82           apply (.= (†(respects_all_covered ???)));
83           apply (.= respects_all_covered ???);
84           apply refl1]
85      | intros;
86        change with (a ∘ b = a' ∘ b');
87        change in H with (rp'' ?? a = rp'' ?? a');
88        change in H1 with (rp'' ?? b = rp ?? b');
89        apply (.= (H‡H1));
90        apply refl1]
91 qed.
92
93 definition CSPA: category1.
94  constructor 1;
95   [ apply concrete_space
96   | apply convergent_relation_space_setoid
97   | intro; constructor 1;
98      [ apply id1
99      | intros;
100        unfold id; simplify;
101        apply (.= (equalset_extS_id_X_X ??));
102        apply (.= (†((equalset_extS_id_X_X ??)\sup -1‡
103                     (equalset_extS_id_X_X ??)\sup -1)));
104        apply refl1;
105      | apply (.= (equalset_extS_id_X_X ??));
106        apply refl1]
107   | apply convergent_relation_space_composition
108   | intros; simplify;
109     change with ((a12 ∘ a23) ∘ a34 = a12 ∘ (a23 ∘ a34));
110     apply (.= ASSOC1);
111     apply refl1
112   | intros; simplify;
113     change with (id1 ? o1 ∘ a = a);
114     apply (.= id_neutral_left1 ????);
115     apply refl1
116   | intros; simplify;
117     change with (a ∘ id1 ? o2 = a);
118     apply (.= id_neutral_right1 ????);
119     apply refl1]
120 qed.