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 set "baseuri" "cic:/matita/vector_spaces/".
19 record is_vector_space (K: field) (G:abelian_group) (emult:K→G→G) : Prop
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)
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
33 interpretation "Vector space external product" 'times a b =
34 (cic:/matita/vector_spaces/emult.con _ _ a b).
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
42 theorem eq_semi_norm_zero_zero:
43 ∀R:real.∀V:vector_space R.∀semi_norm:V→R.
44 is_semi_norm ? ? semi_norm →
51 record is_norm (R:real) (V:vector_space R) (norm:V → R) : Prop ≝
52 { n_semi_norm:> is_semi_norm ? ? norm;
53 n_properness: ∀x:V. norm x = 0 → x = 0
56 record norm (R:real) (V:vector_space R) : Type ≝
58 n_norm_properties: is_norm ? ? n_function
61 record is_semi_distance (R:real) (C:Type) (semi_d: C→C→R) : Prop ≝
62 { sd_positive: ∀x,y:C. 0 ≤ semi_d x y;
63 sd_properness: ∀x:C. semi_d x x = 0;
64 sd_triangle_inequality: ∀x,y,z:C. semi_d x z ≤ semi_d x y + semi_d z y
67 record is_distance (R:real) (C:Type) (d:C→C→R) : Prop ≝
68 { d_semi_distance:> is_semi_distance ? ? d;
69 d_properness: ∀x,y:C. d x y = 0 → x=y
72 record distance (R:real) (V:vector_space R) : Type ≝
73 { d_function:2> V→V→R;
74 d_distance_properties: is_distance ? ? d_function
77 definition induced_distance_fun ≝
78 λR:real.λV:vector_space R.λnorm:norm ? V.
81 theorem induced_distance_is_distance:
82 ∀R:real.∀V:vector_space R.∀norm:norm ? V.
83 is_distance ? ? (induced_distance_fun ? ? norm).
86 [ apply mk_is_semi_distance;
87 [ unfold induced_distance_fun;
91 apply (n_norm_properties ? ? norm)
92 | unfold induced_distance_fun;
96 rewrite > opp_inverse;
97 apply eq_semi_norm_zero_zero;
99 apply (n_norm_properties ? ? norm)
100 | unfold induced_distance_fun;
105 | unfold induced_distance_fun;
107 generalize in match (n_properness ? ? norm ? ? H);
111 | apply (n_norm_properties ? ? norm)
116 definition induced_distance ≝
117 λR:real.λV:vector_space R.λnorm:norm ? V.
118 mk_distance ? ? (induced_distance_fun ? ? norm)
119 (induced_distance_is_distance ? ? norm).
121 definition tends_to :
122 ∀R:real.∀V:vector_space R.∀d:distance ? V.∀f:nat→V.∀l:V.Prop.
123 alias symbol "leq" = "Ordered field le".
124 alias id "le" = "cic:/matita/nat/orders/le.ind#xpointer(1/1)".
126 (λR:real.λV:vector_space R.λd:distance ? V.λf:nat→V.λl:V.
127 ∀n:nat.∃m:nat.∀j:nat. le m j →
128 d (f j) l ≤ inv R (sum_field ? (S n)) ?);
129 apply not_eq_sum_field_zero;
134 definition is_cauchy_seq : ∀R:real.\forall V:vector_space R.
135 \forall d:distance ? V.∀f:nat→V.Prop.
137 (λR:real.λV: vector_space R. \lambda d:distance ? V.
141 -(inv R (sum_field ? (S m)) ?) ≤ d (f N) (f n) ∧
142 d (f N) (f n)≤ inv R (sum_field R (S m)) ?);
143 apply not_eq_sum_field_zero;
148 definition is_complete ≝
149 λR:real.λV:vector_space R.
151 ∀f:nat→V. is_cauchy_seq ? ? d f→
152 ex V (λl:V. tends_to ? ? d f l).