]> matita.cs.unibo.it Git - helm.git/blob - matita/dama/integration_algebras.ma
534882ff2a54b31dbeef313f1740168959f1af92
[helm.git] / matita / dama / integration_algebras.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 set "baseuri" "cic:/matita/integration_algebras/".
16
17 include "reals.ma".
18
19 record is_vector_space (K: field) (G:abelian_group) (emult:K→G→G) : Prop
20
21  { vs_nilpotent: ∀v. emult 0 v = 0;
22    vs_neutral: ∀v. emult 1 v = v;
23    vs_distributive: ∀a,b,v. emult (a + b) v = (emult a v) + (emult b v);
24    vs_associative: ∀a,b,v. emult (a * b) v = emult a (emult b v)
25  }.
26
27 record vector_space (K:field): Type \def
28 { vs_abelian_group :> abelian_group;
29   emult: K → vs_abelian_group → vs_abelian_group;
30   vs_vector_space_properties :> is_vector_space ? vs_abelian_group emult
31 }.
32
33 interpretation "Vector space external product" 'times a b =
34  (cic:/matita/integration_algebras/emult.con _ _ a b).
35
36 record is_semi_norm (R:real) (V: vector_space R) (semi_norm:V→R) : Prop \def
37  { sn_positive: ∀x:V. 0 ≤ semi_norm x;
38    sn_omogeneous: ∀a:R.∀x:V. semi_norm (a*x) = (abs ? a) * semi_norm x;
39    sn_triangle_inequality: ∀x,y:V. semi_norm (x + y) ≤ semi_norm x + semi_norm y
40  }.
41
42 theorem eq_semi_norm_zero_zero:
43  ∀R:real.∀V:vector_space R.∀semi_norm:V→R.
44   is_semi_norm ? ? semi_norm →
45    semi_norm 0 = 0.
46  intros;
47  (* facile *)
48  elim daemon.
49 qed.
50
51 record is_norm (R:real) (V:vector_space R) (norm:V → R) : Prop \def
52  { n_semi_norm:> is_semi_norm ? ? norm;
53    n_properness: ∀x:V. norm x = 0 → x = 0
54  }.
55
56 record is_semi_distance (R:real) (C:Type) (semi_d: C→C→R) : Prop \def
57  { sd_positive: ∀x,y:C. 0 ≤ semi_d x y;
58    sd_properness: \forall x:C. semi_d x x = 0; 
59    sd_triangle_inequality: ∀x,y,z:C. semi_d x z ≤ semi_d x y + semi_d z y
60  }.
61
62 record is_distance (R:real) (C:Type) (d:C→C→R) : Prop \def
63  { d_semi_distance:> is_semi_distance ? ? d;
64    d_properness: ∀x,y:C. d x y = 0 → x=y
65  }.
66
67 definition induced_distance ≝
68  λR:real.λV:vector_space R.λnorm:V→R.
69   λf,g:V.norm (f - g).
70
71 theorem induced_distance_is_distance:
72  ∀R:real.∀V:vector_space R.∀norm:V→R.
73   is_norm ? ? norm → is_distance ? ? (induced_distance ? ? norm).
74  intros;
75  apply mk_is_distance;
76   [ apply mk_is_semi_distance;
77     [ unfold induced_distance;
78       intros;
79       apply sn_positive;
80       apply n_semi_norm;
81       assumption
82     | unfold induced_distance;
83       intros;
84       unfold minus;
85       rewrite < plus_comm;
86       rewrite > opp_inverse;
87       apply eq_semi_norm_zero_zero;
88       apply n_semi_norm;
89       assumption
90     | unfold induced_distance;
91       intros;
92       (* ??? *)
93       elim daemon
94     ]
95   | unfold induced_distance;
96     intros;
97     generalize in match (n_properness ? ? ? H ? H1);
98     intro;
99     (* facile *)
100     elim daemon
101   ].
102 qed.
103
104 record is_lattice (C:Type) (join,meet:C→C→C) : Prop \def
105  { (* abelian semigroup properties *)
106    l_comm_j: symmetric ? join;
107    l_associative_j: associative ? join;
108    l_comm_m: symmetric ? meet;
109    l_associative_m: associative ? meet;
110    (* other properties *)
111    l_adsorb_j_m: ∀f,g. join f (meet f g) = f;
112    l_adsorb_m_j: ∀f,g. meet f (join f g) = f
113  }.
114
115 record lattice (C:Type) : Type \def
116  { join: C → C → C;
117    meet: C → C → C;
118    l_lattice_properties: is_lattice ? join meet
119  }.
120
121 definition le \def λC:Type.λL:lattice C.λf,g. meet ? L f g = f.
122
123 interpretation "Lattice le" 'leq a b =
124  (cic:/matita/integration_algebras/le.con _ _ a b).
125
126 definition lt \def λC:Type.λL:lattice C.λf,g. le ? L f g ∧ f ≠ g.
127
128 interpretation "Lattice lt" 'lt a b =
129  (cic:/matita/integration_algebras/lt.con _ _ a b).
130
131 definition carrier_of_lattice ≝
132  λC:Type.λL:lattice C.C.
133
134 record is_riesz_space (K:ordered_field_ch0) (V:vector_space K)
135  (L:lattice (Type_OF_vector_space ? V))
136 : Prop
137 \def
138  { rs_compat_le_plus: ∀f,g,h. le ? L f g → le ? L (f+h) (g+h);
139    rs_compat_le_times: ∀a:K.∀f. of_le ? 0 a → le ? L 0 f → le ? L 0 (a*f)
140  }.
141
142 record riesz_space (K:ordered_field_ch0) : Type \def
143  { rs_vector_space:> vector_space K;
144    rs_lattice:> lattice rs_vector_space;
145    rs_riesz_space_properties: is_riesz_space ? rs_vector_space rs_lattice
146  }.
147
148 definition absolute_value \def λK.λS:riesz_space K.λf.join ? S f (-f).   
149
150 record is_archimedean_riesz_space (K) (S:riesz_space K) : Prop
151 \def
152   { ars_archimedean: ∃u.∀n.∀a.∀p:n > O.
153      le ? S
154       (absolute_value ? S a)
155       ((inv ? (sum_field K n) (not_eq_sum_field_zero ? n p))* u) →
156      a = 0
157   }.
158
159 record archimedean_riesz_space (K:ordered_field_ch0) : Type \def
160  { ars_riesz_space:> riesz_space K;
161    ars_archimedean_property: is_archimedean_riesz_space ? ars_riesz_space
162  }.
163
164 record is_integral (K) (R:archimedean_riesz_space K) (I:R→K) : Prop
165 \def
166  { i_positive: ∀f:R. le ? R 0 f → of_le K 0 (I f);
167    i_linear1: ∀f,g:R. I (f + g) = I f + I g;
168    i_linear2: ∀f:R.∀k:K. I (k*f) = k*(I f)
169  }.
170
171 definition is_weak_unit ≝
172 (* This definition is by Spitters. He cites Fremlin 353P, but:
173    1. that theorem holds only in f-algebras (as in Spitters, but we are
174       defining it on Riesz spaces)
175    2. Fremlin proves |x|/\u=0 \to u=0. How do we remove the absolute value?
176  λR:real.λV:archimedean_riesz_space R.λunit: V.
177   ∀x:V. meet x unit = 0 → u = 0.
178   3. Fremlin proves u > 0 implies x /\ u > 0  > 0 for Archimedean spaces
179    only. We pick this definition for now.
180 *) λR:real.λV:archimedean_riesz_space R.λe:V.
181     ∀v:V. lt ? V 0 v → lt ? V 0 (meet ? V v e).
182
183 (* Here we are avoiding a construction (the quotient space to define
184    f=g iff I(|f-g|)=0 *)
185 record integration_riesz_space (R:real) : Type \def
186  { irs_archimedean_riesz_space:> archimedean_riesz_space R;
187    irs_unit: irs_archimedean_riesz_space;
188    irs_weak_unit: is_weak_unit ? ? irs_unit;
189    integral: irs_archimedean_riesz_space → R;
190    irs_integral_properties: is_integral ? ? integral;
191    irs_limit1:
192     ∀f:irs_archimedean_riesz_space.
193      tends_to ?
194       (λn.integral (meet ? irs_archimedean_riesz_space f
195        ((sum_field R n)*irs_unit)))
196        (integral f);
197    irs_limit2:
198     ∀f:irs_archimedean_riesz_space.
199      tends_to ?
200       (λn.
201         integral (meet ? irs_archimedean_riesz_space f
202          ((inv ? (sum_field R (S n))
203            (not_eq_sum_field_zero R (S n) (le_S_S O n (le_O_n n)))
204          ) * irs_unit))) 0;
205    irs_quotient_space1:
206     ∀f,g:irs_archimedean_riesz_space.
207      integral (absolute_value ? irs_archimedean_riesz_space (f - g)) = 0 → f=g
208  }.
209
210 definition induced_norm ≝
211  λR:real.λV:integration_riesz_space R.λf:V.
212   integral ? ? (absolute_value ? ? f).
213
214 lemma induced_norm_is_norm:
215  ∀R:real.∀V:integration_riesz_space R.is_norm ? V (induced_norm ? V).
216  intros;
217  apply mk_is_norm;
218   [ apply mk_is_semi_norm;
219      [ unfold induced_norm;
220        intros;
221        apply i_positive;
222        [ apply (irs_integral_properties ? V)
223        | (* difficile *)
224          elim daemon
225        ]
226      | intros;
227        unfold induced_norm;
228        (* facile *)
229        elim daemon
230      | intros;
231        unfold induced_norm;
232        (* difficile *)
233        elim daemon
234      ]
235   | intros;
236     unfold induced_norm in H;
237     apply irs_quotient_space1;
238     unfold minus;
239     rewrite < plus_comm;
240     rewrite < eq_zero_opp_zero;
241     rewrite > zero_neutral;
242     assumption
243   ].
244 qed.
245
246 definition distance_induced_by_integral ≝
247  λR:real.λV:integration_riesz_space R.
248   induced_distance ? ? (induced_norm R V).
249
250 theorem distance_induced_by_integral_is_distance:
251  ∀R:real.∀V:integration_riesz_space R.
252   is_distance ? ? (distance_induced_by_integral ? V).
253  intros;
254  unfold distance_induced_by_integral;
255  apply induced_distance_is_distance;
256  apply induced_norm_is_norm.
257 qed.
258
259 record is_algebra (K: field) (V:vector_space K) (mult:V→V→V) (one:V) : Prop
260
261  { (* ring properties *)
262    a_ring: is_ring V mult one;
263    (* algebra properties *)
264    a_associative_left: ∀a,f,g. a * (mult f g) = mult (a * f) g;
265    a_associative_right: ∀a,f,g. a * (mult f g) = mult f (a * g)
266  }.
267
268 record algebra (K: field) (V:vector_space K) (a_one:V) : Type \def
269  { a_mult: V → V → V;
270    a_algebra_properties: is_algebra ? ? a_mult a_one
271  }.
272
273 interpretation "Algebra product" 'times a b =
274  (cic:/matita/integration_algebras/a_mult.con _ _ _ a b).
275
276 definition ring_of_algebra ≝
277  λK.λV:vector_space K.λone:V.λA:algebra ? V one.
278   mk_ring V (a_mult ? ? ? A) one
279    (a_ring ? ? ? ? (a_algebra_properties ? ? ? A)).
280
281 coercion cic:/matita/integration_algebras/ring_of_algebra.con.
282
283 record is_f_algebra (K) (S:archimedean_riesz_space K) (one: S)
284  (A:algebra ? S one) : Prop
285 \def 
286 { compat_mult_le:
287    ∀f,g:S.
288     le ? S 0 f → le ? S 0 g → le ? S 0 (a_mult ? ? ? A f g);
289   compat_mult_meet:
290    ∀f,g,h:S.
291     meet ? S f g = 0 → meet ? S (a_mult ? ? ? A h f) g = 0
292 }.
293
294 record f_algebra (K:ordered_field_ch0) (R:archimedean_riesz_space K) (one:R) :
295 Type \def 
296 { fa_algebra:> algebra ? R one;
297   fa_f_algebra_properties: is_f_algebra ? ? ? fa_algebra
298 }.
299
300 (* to be proved; see footnote 2 in the paper by Spitters *)
301 axiom symmetric_a_mult:
302  ∀K,R,one.∀A:f_algebra K R one. symmetric ? (a_mult ? ? ? A).
303
304 record integration_f_algebra (R:real) : Type \def
305  { ifa_integration_riesz_space:> integration_riesz_space R;
306    ifa_f_algebra:>
307     f_algebra ? ifa_integration_riesz_space
308      (irs_unit ? ifa_integration_riesz_space)
309  }.