]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/formal_topology/overlap/concrete_spaces.ma
the new coercion behaviour (variants + composition with ID) and the new
[helm.git] / helm / software / matita / contribs / formal_topology / overlap / 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 "basic_pairs.ma".
16
17 (* full_subset e' una coercion che non mette piu' *)
18 record concrete_space : Type1 ≝
19  { bp:> BP;
20    converges: ∀a: concr bp.∀U,V: form bp. a ⊩ U → a ⊩ V → a ⊩ (U ↓ V);
21    all_covered: ∀x: concr bp. x ⊩ full_subset (form bp)
22  }.
23
24 record convergent_relation_pair (CS1,CS2: concrete_space) : Type1 ≝
25  { rp:> arrows1 ? CS1 CS2;
26    respects_converges:
27     ∀b,c.
28      minus_image ?? rp \sub\c (BPextS CS2 (b ↓ c)) =
29      BPextS CS1 ((minus_image ?? rp \sub\f b) ↓ (minus_image ?? rp \sub\f c));
30    respects_all_covered:
31     minus_image ?? rp\sub\c (BPextS CS2 (full_subset (form CS2))) = BPextS CS1 (full_subset (form CS1))
32  }.
33 (*
34 definition convergent_relation_space_setoid: concrete_space → concrete_space → setoid1.
35  intros;
36  constructor 1;
37   [ apply (convergent_relation_pair c c1)
38   | constructor 1;
39      [ intros;
40        apply (relation_pair_equality c c1 c2 c3);
41      | intros 1; apply refl1;
42      | intros 2; apply sym1; 
43      | intros 3; apply trans1]]
44 qed.
45
46 definition convergent_relation_space_composition:
47  ∀o1,o2,o3: concrete_space.
48   binary_morphism1
49    (convergent_relation_space_setoid o1 o2)
50    (convergent_relation_space_setoid o2 o3)
51    (convergent_relation_space_setoid o1 o3).
52  intros; constructor 1;
53      [ intros; whd in c c1 ⊢ %;
54        constructor 1;
55         [ apply (fun1 ??? (comp1 BP ???)); [apply (bp o2) |*: apply rp; assumption]
56         | intros;
57           change in ⊢ (? ? ? (? ? ? (? ? ? %) ?) ?) with (c1 \sub \c ∘ c \sub \c);
58           change in ⊢ (? ? ? ? (? ? ? ? (? ? ? ? ? (? ? ? (? ? ? %) ?) ?)))
59             with (c1 \sub \f ∘ c \sub \f);
60           change in ⊢ (? ? ? ? (? ? ? ? (? ? ? ? ? ? (? ? ? (? ? ? %) ?))))
61             with (c1 \sub \f ∘ c \sub \f);
62           apply (.= (extS_com ??????));
63           apply (.= (†(respects_converges ?????)));
64           apply (.= (respects_converges ?????));
65           apply (.= (†(((extS_com ??????) \sup -1)‡(extS_com ??????)\sup -1)));
66           apply refl1;
67         | change in ⊢ (? ? ? (? ? ? (? ? ? %) ?) ?) with (c1 \sub \c ∘ c \sub \c);
68           apply (.= (extS_com ??????));
69           apply (.= (†(respects_all_covered ???)));
70           apply (.= respects_all_covered ???);
71           apply refl1]
72      | intros;
73        change with (b ∘ a = b' ∘ a');
74        change in H with (rp'' ?? a = rp'' ?? a');
75        change in H1 with (rp'' ?? b = rp ?? b');
76        apply (.= (H‡H1));
77        apply refl1]
78 qed.
79
80 definition CSPA: category1.
81  constructor 1;
82   [ apply concrete_space
83   | apply convergent_relation_space_setoid
84   | intro; constructor 1;
85      [ apply id1
86      | intros;
87        unfold id; simplify;
88        apply (.= (equalset_extS_id_X_X ??));
89        apply (.= (†((equalset_extS_id_X_X ??)\sup -1‡
90                     (equalset_extS_id_X_X ??)\sup -1)));
91        apply refl1;
92      | apply (.= (equalset_extS_id_X_X ??));
93        apply refl1]
94   | apply convergent_relation_space_composition
95   | intros; simplify;
96     change with (a34 ∘ (a23 ∘ a12) = (a34 ∘ a23) ∘ a12);
97     apply (.= ASSOC1);
98     apply refl1
99   | intros; simplify;
100     change with (a ∘ id1 ? o1 = a);
101     apply (.= id_neutral_right1 ????);
102     apply refl1
103   | intros; simplify;
104     change with (id1 ? o2 ∘ a = a);
105     apply (.= id_neutral_left1 ????);
106     apply refl1]
107 qed.
108 *)