]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/dama/dama/ordered_uniform.ma
lebesgue completely dualized
[helm.git] / helm / software / matita / contribs / dama / dama / ordered_uniform.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 "uniform.ma".
16
17 record ordered_uniform_space_ : Type ≝ {
18   ous_os:> ordered_set;
19   ous_us_: uniform_space;
20   with_ : us_carr ous_us_ = bishop_set_of_ordered_set ous_os
21 }.
22
23 lemma ous_unifspace: ordered_uniform_space_ → uniform_space.
24 intro X; apply (mk_uniform_space (bishop_set_of_ordered_set X));
25 unfold bishop_set_OF_ordered_uniform_space_;
26 [1: rewrite < (with_ X); simplify; apply (us_unifbase (ous_us_ X));
27 |2: cases (with_ X); simplify; apply (us_phi1 (ous_us_ X));
28 |3: cases (with_ X); simplify; apply (us_phi2 (ous_us_ X));
29 |4: cases (with_ X); simplify; apply (us_phi3 (ous_us_ X));
30 |5: cases (with_ X); simplify; apply (us_phi4 (ous_us_ X))]
31 qed.
32
33 coercion ous_unifspace.
34
35 record ordered_uniform_space : Type ≝ {
36   ous_stuff :> ordered_uniform_space_;
37   ous_convex: ∀U.us_unifbase ous_stuff U → convex ous_stuff U
38 }.   
39
40 definition half_ordered_set_OF_ordered_uniform_space : ordered_uniform_space → half_ordered_set.
41 intro; compose ordered_set_OF_ordered_uniform_space with os_l. apply (f o);
42 qed.
43
44 definition invert_os_relation ≝
45   λC:ordered_set.λU:C squareO → Prop.
46     λx:C squareO. U 〈\snd x,\fst x〉.
47
48 interpretation "relation invertion" 'invert a = (invert_os_relation _ a).
49 interpretation "relation invertion" 'invert_symbol = (invert_os_relation _).
50 interpretation "relation invertion" 'invert_appl a x = (invert_os_relation _ a x).
51
52 lemma segment_square_of_ordered_set_square: 
53   ∀O:ordered_set.∀u,v:O.∀x:O squareO.
54    \fst x ∈ [u,v] → \snd x ∈ [u,v] → {[u,v]} squareO.
55 intros; split; exists; [1: apply (\fst x) |3: apply (\snd x)] assumption;
56 qed.
57
58 coercion segment_square_of_ordered_set_square with 0 2 nocomposites.
59
60 alias symbol "pi1" (instance 4) = "exT \fst".
61 alias symbol "pi1" (instance 2) = "exT \fst".
62 lemma ordered_set_square_of_segment_square : 
63  ∀O:ordered_set.∀u,v:O.{[u,v]} squareO → O squareO ≝ 
64   λO:ordered_set.λu,v:O.λb:{[u,v]} squareO.〈\fst(\fst b),\fst(\snd b)〉.
65
66 coercion ordered_set_square_of_segment_square nocomposites.
67
68 lemma restriction_agreement : 
69   ∀O:ordered_uniform_space.∀l,r:O.∀P:{[l,r]} squareO → Prop.∀OP:O squareO → Prop.Prop.
70 apply(λO:ordered_uniform_space.λl,r:O.
71        λP:{[l,r]} squareO → Prop. λOP:O squareO → Prop.
72           ∀b:O squareO.∀H1,H2.(P b → OP b) ∧ (OP b → P b));
73 [5,7: apply H1|6,8:apply H2]skip;
74 qed.
75
76 lemma unrestrict: ∀O:ordered_uniform_space.∀l,r:O.∀U,u.∀x:{[l,r]} squareO.
77   restriction_agreement ? l r U u → U x → u x.
78 intros 7; cases x (b b1); cases b (w1 H1); cases b1 (w2 H2); clear b b1 x; 
79 cases (H 〈w1,w2〉 H1 H2) (L _); intro Uw; apply L; apply Uw;
80 qed.
81
82 lemma restrict: ∀O:ordered_uniform_space.∀l,r:O.∀U,u.∀x:{[l,r]} squareO.
83   restriction_agreement ? l r U u → u x → U x.
84 intros 6; cases x (b b1); cases b (w1 H1); cases b1 (w2 H2); clear b1 b x;
85 intros (Ra uw); cases (Ra 〈w1,w2〉 H1 H2) (_ R); apply R; apply uw;
86 qed.
87
88 lemma invert_restriction_agreement: 
89   ∀O:ordered_uniform_space.∀l,r:O.
90    ∀U:{[l,r]} squareO → Prop.∀u:O squareO → Prop.
91     restriction_agreement ? l r U u →
92     restriction_agreement ? l r (\inv U) (\inv u).
93 intros 9; split; intro;
94 [1: apply (unrestrict ????? (segment_square_of_ordered_set_square ??? 〈\snd b,\fst b〉 H2 H1) H H3);
95 |2: apply (restrict ????? (segment_square_of_ordered_set_square ??? 〈\snd b,\fst b〉 H2 H1) H H3);]
96 qed. 
97
98 lemma bs2_of_bss2: 
99  ∀O:ordered_set.∀u,v:O.(bishop_set_of_ordered_set {[u,v]}) squareB → (bishop_set_of_ordered_set O) squareB ≝ 
100   λO:ordered_set.λu,v:O.λb:{[u,v]} squareO.〈\fst(\fst b),\fst(\snd b)〉.
101
102 coercion bs2_of_bss2 nocomposites.
103
104 lemma segment_ordered_uniform_space: 
105   ∀O:ordered_uniform_space.∀u,v:O.ordered_uniform_space.
106 intros (O l r); apply mk_ordered_uniform_space;
107 [1: apply (mk_ordered_uniform_space_ {[l,r]});
108     [1: alias symbol "and" = "constructive and".
109         letin f ≝ (λP:{[l,r]} squareO → Prop. ∃OP:O squareO → Prop.
110                     (us_unifbase O OP) ∧ restriction_agreement ??? P OP);
111         apply (mk_uniform_space (bishop_set_of_ordered_set {[l,r]}) f);
112         [1: intros (U H); intro x; simplify; 
113             cases H (w Hw); cases Hw (Gw Hwp); clear H Hw; intro Hm;
114             lapply (us_phi1 O w Gw x Hm) as IH;
115             apply (restrict ? l r ??? Hwp IH); 
116         |2: intros (U V HU HV); cases HU (u Hu); cases HV (v Hv); clear HU HV;
117             cases Hu (Gu HuU); cases Hv (Gv HvV); clear Hu Hv;
118             cases (us_phi2 O u v Gu Gv) (w HW); cases HW (Gw Hw); clear HW;
119             exists; [apply (λb:{[l,r]} squareB.w b)] split;
120             [1: unfold f; simplify; clearbody f;
121                 exists; [apply w]; split; [assumption] intro b; simplify;
122                 unfold segment_square_of_ordered_set_square;
123                 cases b; intros; split; intros; assumption;
124             |2: intros 2 (x Hx); cases (Hw ? Hx); split;
125                 [apply (restrict O l r ??? HuU H)|apply (restrict O l r ??? HvV H1);]]
126         |3: intros (U Hu); cases Hu (u HU); cases HU (Gu HuU); clear Hu HU;
127             cases (us_phi3 O u Gu) (w HW); cases HW (Gw Hwu); clear HW;
128             exists; [apply (λx:{[l,r]} squareB.w x)] split;
129             [1: exists;[apply w];split;[assumption] intros; simplify; intro;
130                 unfold segment_square_of_ordered_set_square;
131                 cases b; intros; split; intro; assumption;
132             |2: intros 2 (x Hx); apply (restrict O l r ??? HuU); apply Hwu; 
133                 cases Hx (m Hm); exists[apply (\fst m)] apply Hm;]
134         |4: intros (U HU x); cases HU (u Hu); cases Hu (Gu HuU); clear HU Hu;
135             cases (us_phi4 O u Gu x) (Hul Hur);
136             split; intros; 
137             [1: lapply (invert_restriction_agreement O l r ?? HuU) as Ra;
138                 apply (restrict O l r ?? x Ra);
139                 apply Hul; apply (unrestrict O l r ??? HuU H);
140             |2: apply (restrict O l r ??? HuU); apply Hur; 
141                 apply (unrestrict O l r ??? (invert_restriction_agreement O l r ?? HuU) H);]]
142     |2: simplify; reflexivity;]
143 |2: simplify; unfold convex; intros;
144     cases H (u HU); cases HU (Gu HuU); clear HU H; 
145     lapply (ous_convex ?? Gu p ? H2 y H3) as Cu;
146     [1: apply (unrestrict O l r ??? HuU); apply H1;
147     |2: apply (restrict O l r ??? HuU Cu);]]
148 qed.
149
150 interpretation "Ordered uniform space segment" 'segment_set a b = 
151  (segment_ordered_uniform_space _ a b).
152
153 (* Lemma 3.2 *)
154 alias symbol "pi1" = "exT \fst".
155 lemma restric_uniform_convergence:
156  ∀O:ordered_uniform_space.∀l,u:O.
157   ∀x:{[l,u]}.
158    ∀a:sequence {[l,u]}.
159     (⌊n, \fst (a n)⌋ : sequence O) uniform_converges (\fst x) → 
160       a uniform_converges x.
161 intros 8; cases H1; cases H2; clear H2 H1;
162 cases (H ? H3) (m Hm); exists [apply m]; intros; 
163 apply (restrict ? l u ??? H4); apply (Hm ? H1);
164 qed.
165
166 definition order_continuity ≝
167   λC:ordered_uniform_space.∀a:sequence C.∀x:C.
168     (a ↑ x → a uniform_converges x) ∧ (a ↓ x → a uniform_converges x).
169
170 lemma hint_boh1: ∀O. Type_OF_ordered_uniform_space O → hos_carr (os_l O).
171 intros; assumption;
172 qed.
173
174 coercion hint_boh1 nocomposites. 
175
176 lemma hint_boh2: ∀O:ordered_uniform_space. hos_carr (os_l O) → Type_OF_ordered_uniform_space O.
177 intros; assumption;
178 qed.
179
180 coercion hint_boh2 nocomposites. 
181