X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fdama%2Fintegration_algebras.ma;h=534882ff2a54b31dbeef313f1740168959f1af92;hb=08d8e4e422aafdc11e4230a87f2adee7facad809;hp=c44d3e4822fa91fe15ed8fc9c708c9527946a2b2;hpb=9da5a5054b66ee9264ecccb2af43c2fce3b35e64;p=helm.git diff --git a/matita/dama/integration_algebras.ma b/matita/dama/integration_algebras.ma index c44d3e482..534882ff2 100644 --- a/matita/dama/integration_algebras.ma +++ b/matita/dama/integration_algebras.ma @@ -14,303 +14,296 @@ set "baseuri" "cic:/matita/integration_algebras/". -include "higher_order_defs/functions.ma". -include "nat/nat.ma". -include "nat/orders.ma". +include "reals.ma". -definition left_neutral \def λC,op.λe:C. ∀x:C. op e x = x. - -definition right_neutral \def λC,op. λe:C. ∀x:C. op x e=x. +record is_vector_space (K: field) (G:abelian_group) (emult:K→G→G) : Prop +≝ + { vs_nilpotent: ∀v. emult 0 v = 0; + vs_neutral: ∀v. emult 1 v = v; + vs_distributive: ∀a,b,v. emult (a + b) v = (emult a v) + (emult b v); + vs_associative: ∀a,b,v. emult (a * b) v = emult a (emult b v) + }. -definition left_inverse \def λC,op.λe:C.λinv:C→C. ∀x:C. op (inv x) x = e. +record vector_space (K:field): Type \def +{ vs_abelian_group :> abelian_group; + emult: K → vs_abelian_group → vs_abelian_group; + vs_vector_space_properties :> is_vector_space ? vs_abelian_group emult +}. -definition right_inverse \def λC,op.λe:C.λ inv: C→ C. ∀x:C. op x (inv x)=e. +interpretation "Vector space external product" 'times a b = + (cic:/matita/integration_algebras/emult.con _ _ a b). -definition distributive_left ≝ - λA:Type.λf:A→A→A.λg:A→A→A. - ∀x,y,z. f x (g y z) = g (f x y) (f x z). +record is_semi_norm (R:real) (V: vector_space R) (semi_norm:V→R) : Prop \def + { sn_positive: ∀x:V. 0 ≤ semi_norm x; + sn_omogeneous: ∀a:R.∀x:V. semi_norm (a*x) = (abs ? a) * semi_norm x; + sn_triangle_inequality: ∀x,y:V. semi_norm (x + y) ≤ semi_norm x + semi_norm y + }. -definition distributive_right ≝ - λA:Type.λf:A→A→A.λg:A→A→A. - ∀x,y,z. f (g x y) z = g (f x z) (f y z). +theorem eq_semi_norm_zero_zero: + ∀R:real.∀V:vector_space R.∀semi_norm:V→R. + is_semi_norm ? ? semi_norm → + semi_norm 0 = 0. + intros; + (* facile *) + elim daemon. +qed. -record is_abelian_group (C:Type) (plus:C→C→C) (zero:C) (opp:C→C) : Prop \def - { (* abelian additive semigroup properties *) - plus_assoc: associative ? plus; - plus_comm: symmetric ? plus; - (* additive monoid properties *) - zero_neutral: left_neutral ? plus zero; - (* additive group properties *) - opp_inverse: left_inverse ? plus zero opp +record is_norm (R:real) (V:vector_space R) (norm:V → R) : Prop \def + { n_semi_norm:> is_semi_norm ? ? norm; + n_properness: ∀x:V. norm x = 0 → x = 0 }. -record is_ring (C:Type) (plus:C→C→C) (mult:C→C→C) (zero:C) (opp:C→C) : Prop -≝ - { (* abelian group properties *) - abelian_group:> is_abelian_group ? plus zero opp; - (* multiplicative semigroup properties *) - mult_assoc: associative ? mult; - (* ring properties *) - mult_plus_distr_left: distributive_left C mult plus; - mult_plus_distr_right: distributive_right C mult plus - }. - -record ring : Type \def - { r_carrier:> Type; - r_plus: r_carrier → r_carrier → r_carrier; - r_mult: r_carrier → r_carrier → r_carrier; - r_zero: r_carrier; - r_opp: r_carrier → r_carrier; - r_ring_properties:> is_ring ? r_plus r_mult r_zero r_opp +record is_semi_distance (R:real) (C:Type) (semi_d: C→C→R) : Prop \def + { sd_positive: ∀x,y:C. 0 ≤ semi_d x y; + sd_properness: \forall x:C. semi_d x x = 0; + sd_triangle_inequality: ∀x,y,z:C. semi_d x z ≤ semi_d x y + semi_d z y }. -notation "0" with precedence 89 -for @{ 'zero }. - -interpretation "Ring zero" 'zero = - (cic:/matita/integration_algebras/r_zero.con _). - -interpretation "Ring plus" 'plus a b = - (cic:/matita/integration_algebras/r_plus.con _ a b). - -interpretation "Ring mult" 'times a b = - (cic:/matita/integration_algebras/r_mult.con _ a b). +record is_distance (R:real) (C:Type) (d:C→C→R) : Prop \def + { d_semi_distance:> is_semi_distance ? ? d; + d_properness: ∀x,y:C. d x y = 0 → x=y + }. -interpretation "Ring opp" 'uminus a = - (cic:/matita/integration_algebras/r_opp.con _ a). +definition induced_distance ≝ + λR:real.λV:vector_space R.λnorm:V→R. + λf,g:V.norm (f - g). -lemma eq_mult_zero_x_zero: ∀R:ring.∀x:R.0*x=0. +theorem induced_distance_is_distance: + ∀R:real.∀V:vector_space R.∀norm:V→R. + is_norm ? ? norm → is_distance ? ? (induced_distance ? ? norm). intros; - generalize in match (zero_neutral ? ? ? ? R 0); intro; - generalize in match (eq_f ? ? (λy.y*x) ? ? H); intro; clear H; - rewrite > (mult_plus_distr_right ? ? ? ? ? R) in H1; - generalize in match (eq_f ? ? (λy.-(0*x)+y) ? ? H1); intro; clear H1; - rewrite < (plus_assoc ? ? ? ? R) in H; - rewrite > (opp_inverse ? ? ? ? R) in H; - rewrite > (zero_neutral ? ? ? ? R) in H; - assumption. + apply mk_is_distance; + [ apply mk_is_semi_distance; + [ unfold induced_distance; + intros; + apply sn_positive; + apply n_semi_norm; + assumption + | unfold induced_distance; + intros; + unfold minus; + rewrite < plus_comm; + rewrite > opp_inverse; + apply eq_semi_norm_zero_zero; + apply n_semi_norm; + assumption + | unfold induced_distance; + intros; + (* ??? *) + elim daemon + ] + | unfold induced_distance; + intros; + generalize in match (n_properness ? ? ? H ? H1); + intro; + (* facile *) + elim daemon + ]. qed. -lemma eq_mult_x_zero_zero: ∀R:ring.∀x:R.x*0=0. -intros; -generalize in match (zero_neutral ? ? ? ? R 0); -intro; -generalize in match (eq_f ? ? (\lambda y.x*y) ? ? H); intro; clear H; -rewrite > (mult_plus_distr_left ? ? ? ? ? R) in H1; -generalize in match (eq_f ? ? (\lambda y. (-(x*0)) +y) ? ? H1);intro; -clear H1; -rewrite < (plus_assoc ? ? ? ? R) in H; -rewrite > (opp_inverse ? ? ? ? R) in H; -rewrite > (zero_neutral ? ? ? ? R) in H; -assumption. - - -record is_field (C:Type) (plus:C→C→C) (mult:C→C→C) (zero,one:C) (opp:C→C) - (inv:∀x:C.x ≠ zero →C) : Prop -≝ - { (* ring properties *) - ring_properties:> is_ring ? plus mult zero opp; - (* multiplicative abelian properties *) - mult_comm: symmetric ? mult; - (* multiplicative monoid properties *) - one_neutral: left_neutral ? mult one; - (* multiplicative group properties *) - inv_inverse: ∀x.∀p: x ≠ zero. mult (inv x p) x = one; - (* integral domain *) - not_eq_zero_one: zero ≠ one +record is_lattice (C:Type) (join,meet:C→C→C) : Prop \def + { (* abelian semigroup properties *) + l_comm_j: symmetric ? join; + l_associative_j: associative ? join; + l_comm_m: symmetric ? meet; + l_associative_m: associative ? meet; + (* other properties *) + l_adsorb_j_m: ∀f,g. join f (meet f g) = f; + l_adsorb_m_j: ∀f,g. meet f (join f g) = f }. -lemma cancellationlaw: \forall R:ring. \forall x,y,z:R. -(x+y=x+z) \to (y=z). -intros; -generalize in match (eq_f ? ? (\lambda a. (-x +a)) ? ? H); -intros; clear H; -rewrite < (plus_assoc ? ? ? ? R) in H1; -rewrite < (plus_assoc ? ? ? ? R) in H1; -rewrite > (opp_inverse ? ? ? ? R) in H1; -rewrite > (zero_neutral ? ? ? ? R) in H1; -rewrite > (zero_neutral ? ? ? ? R) in H1; -assumption. -qed. - +record lattice (C:Type) : Type \def + { join: C → C → C; + meet: C → C → C; + l_lattice_properties: is_lattice ? join meet + }. -lemma opp_opp: \forall R:ring. \forall x:R. (-(-x))=x. -intros; -apply (cancellationlaw ? (-x) ? ?); -rewrite > (opp_inverse ? ? ? ? R (x)); -rewrite > (plus_comm ? ? ? ? R); -rewrite > (opp_inverse ? ? ? ? R); -reflexivity. -qed. +definition le \def λC:Type.λL:lattice C.λf,g. meet ? L f g = f. +interpretation "Lattice le" 'leq a b = + (cic:/matita/integration_algebras/le.con _ _ a b). +definition lt \def λC:Type.λL:lattice C.λf,g. le ? L f g ∧ f ≠ g. +interpretation "Lattice lt" 'lt a b = + (cic:/matita/integration_algebras/lt.con _ _ a b). -let rec sum (C:Type) (plus:C→C→C) (zero,one:C) (n:nat) on n ≝ - match n with - [ O ⇒ zero - | (S m) ⇒ plus one (sum C plus zero one m) - ]. +definition carrier_of_lattice ≝ + λC:Type.λL:lattice C.C. -record field : Type \def - { f_ring:> ring; - one: f_ring; - inv: ∀x:f_ring. x ≠ 0 → f_ring; - field_properties:> - is_field ? (r_plus f_ring) (r_mult f_ring) (r_zero f_ring) one - (r_opp f_ring) inv +record is_riesz_space (K:ordered_field_ch0) (V:vector_space K) + (L:lattice (Type_OF_vector_space ? V)) +: Prop +\def + { rs_compat_le_plus: ∀f,g,h. le ? L f g → le ? L (f+h) (g+h); + rs_compat_le_times: ∀a:K.∀f. of_le ? 0 a → le ? L 0 f → le ? L 0 (a*f) }. -definition sum_field ≝ - λF:field. sum ? (r_plus F) (r_zero F) (one F). - -notation "1" with precedence 89 -for @{ 'one }. - -interpretation "Field one" 'one = - (cic:/matita/integration_algebras/one.con _). - -record is_ordered_field_ch0 (C:Type) (plus,mult:C→C→C) (zero,one:C) (opp:C→C) - (inv:∀x:C.x ≠ zero → C) (le:C→C→Prop) : Prop \def - { (* field properties *) - of_is_field:> is_field C plus mult zero one opp inv; - of_mult_compat: ∀a,b. le zero a → le zero b → le zero (mult a b); - of_plus_compat: ∀a,b,c. le a b → le (plus a c) (plus b c); - of_weak_tricotomy : ∀a,b. a≠b → le a b ∨ le b a; - (* 0 characteristics *) - of_char0: ∀n. n > O → sum ? plus zero one n ≠ zero - }. - -record ordered_field_ch0 : Type \def - { of_field:> field; - of_le: of_field → of_field → Prop; - of_ordered_field_properties:> - is_ordered_field_ch0 ? (r_plus of_field) (r_mult of_field) (r_zero of_field) - (one of_field) (r_opp of_field) (inv of_field) of_le +record riesz_space (K:ordered_field_ch0) : Type \def + { rs_vector_space:> vector_space K; + rs_lattice:> lattice rs_vector_space; + rs_riesz_space_properties: is_riesz_space ? rs_vector_space rs_lattice }. -interpretation "Ordered field le" 'leq a b = - (cic:/matita/integration_algebras/of_le.con _ a b). - -definition lt \def λF:ordered_field_ch0.λa,b:F.a ≤ b ∧ a ≠ b. - -interpretation "Ordered field lt" 'lt a b = - (cic:/matita/integration_algebras/lt.con _ a b). - -(*incompleto -lemma le_zero_x_to_le_opp_x_zero: ∀F:ordered_field_ch0.∀x:F. 0 ≤ x → -x ≤ 0. -intros; - generalize in match (of_plus_compat ? ? ? ? ? ? ? ? F ? ? (-x) H); intro; - rewrite > (zero_neutral ? ? ? ? F) in H1; - rewrite > (plus_comm ? ? ? ? F) in H1; - rewrite > (opp_inverse ? ? ? ? F) in H1; - - assumption. -qed.*) - -axiom le_x_zero_to_le_zero_opp_x: ∀F:ordered_field_ch0.∀x:F. x ≤ 0 → 0 ≤ -x. -(* intros; - generalize in match (of_plus_compat ? ? ? ? ? ? ? ? F ? ? (-x) H); intro; - rewrite > (zero_neutral ? ? ? ? F) in H1; - rewrite > (plus_comm ? ? ? ? F) in H1; - rewrite > (opp_inverse ? ? ? ? F) in H1; - assumption. -qed.*) - -(* -lemma eq_opp_x_times_opp_one_x: ∀F:ordered_field_ch0.∀x:F.-x = -1*x. - intros; - -lemma not_eq_x_zero_to_lt_zero_mult_x_x: - ∀F:ordered_field_ch0.∀x:F. x ≠ 0 → 0 < x * x. - intros; - elim (of_weak_tricotomy ? ? ? ? ? ? ? ? F ? ? H); - [ generalize in match (le_x_zero_to_le_zero_opp_x F ? H1); intro; - generalize in match (of_mult_compat ? ? ? ? ? ? ? ? F ? ? H2 H2); intro; -*) +definition absolute_value \def λK.λS:riesz_space K.λf.join ? S f (-f). -axiom not_eq_sum_field_zero: ∀F,n. n > O → sum_field F n ≠ 0. +record is_archimedean_riesz_space (K) (S:riesz_space K) : Prop +\def + { ars_archimedean: ∃u.∀n.∀a.∀p:n > O. + le ? S + (absolute_value ? S a) + ((inv ? (sum_field K n) (not_eq_sum_field_zero ? n p))* u) → + a = 0 + }. -record is_vector_space (K: field) (C:Type) (plus:C→C→C) (zero:C) (opp:C→C) - (emult:K→C→C) : Prop -≝ - { (* abelian group properties *) - vs_abelian_group: is_abelian_group ? plus zero opp; - (* other properties *) - vs_nilpotent: ∀v. emult 0 v = zero; - vs_neutral: ∀v. emult 1 v = v; - vs_distributive: ∀a,b,v. emult (a + b) v = plus (emult a v) (emult b v); - vs_associative: ∀a,b,v. emult (a * b) v = emult a (emult b v) +record archimedean_riesz_space (K:ordered_field_ch0) : Type \def + { ars_riesz_space:> riesz_space K; + ars_archimedean_property: is_archimedean_riesz_space ? ars_riesz_space }. -record vector_space : Type \def -{vs_ : - +record is_integral (K) (R:archimedean_riesz_space K) (I:R→K) : Prop +\def + { i_positive: ∀f:R. le ? R 0 f → of_le K 0 (I f); + i_linear1: ∀f,g:R. I (f + g) = I f + I g; + i_linear2: ∀f:R.∀k:K. I (k*f) = k*(I f) + }. -} -record is_lattice (C:Type) (join,meet:C→C→C) : Prop \def - { (* abelian semigroup properties *) - l_comm_j: symmetric ? join; - l_associative_j: associative ? join; - l_comm_m: symmetric ? meet; - l_associative_m: associative ? meet; - (* other properties *) - l_adsorb_j_m: ∀f,g. join f (meet f g) = f; - l_adsorb_m_j: ∀f,g. meet f (join f g) = f +definition is_weak_unit ≝ +(* This definition is by Spitters. He cites Fremlin 353P, but: + 1. that theorem holds only in f-algebras (as in Spitters, but we are + defining it on Riesz spaces) + 2. Fremlin proves |x|/\u=0 \to u=0. How do we remove the absolute value? + λR:real.λV:archimedean_riesz_space R.λunit: V. + ∀x:V. meet x unit = 0 → u = 0. + 3. Fremlin proves u > 0 implies x /\ u > 0 > 0 for Archimedean spaces + only. We pick this definition for now. +*) λR:real.λV:archimedean_riesz_space R.λe:V. + ∀v:V. lt ? V 0 v → lt ? V 0 (meet ? V v e). + +(* Here we are avoiding a construction (the quotient space to define + f=g iff I(|f-g|)=0 *) +record integration_riesz_space (R:real) : Type \def + { irs_archimedean_riesz_space:> archimedean_riesz_space R; + irs_unit: irs_archimedean_riesz_space; + irs_weak_unit: is_weak_unit ? ? irs_unit; + integral: irs_archimedean_riesz_space → R; + irs_integral_properties: is_integral ? ? integral; + irs_limit1: + ∀f:irs_archimedean_riesz_space. + tends_to ? + (λn.integral (meet ? irs_archimedean_riesz_space f + ((sum_field R n)*irs_unit))) + (integral f); + irs_limit2: + ∀f:irs_archimedean_riesz_space. + tends_to ? + (λn. + integral (meet ? irs_archimedean_riesz_space f + ((inv ? (sum_field R (S n)) + (not_eq_sum_field_zero R (S n) (le_S_S O n (le_O_n n))) + ) * irs_unit))) 0; + irs_quotient_space1: + ∀f,g:irs_archimedean_riesz_space. + integral (absolute_value ? irs_archimedean_riesz_space (f - g)) = 0 → f=g }. -(* This should be a let-in field of the riesz_space!!! *) -definition le_ \def λC.λmeet:C→C→C.λf,g. meet f g = f. +definition induced_norm ≝ + λR:real.λV:integration_riesz_space R.λf:V. + integral ? ? (absolute_value ? ? f). -record is_riesz_space (K:ordered_field_ch0) (C:Type) (plus:C→C→C) (zero:C) - (opp:C→C) (emult:K→C→C) (join,meet:C→C→C) : Prop \def - { (* vector space properties *) - rs_vector_space: is_vector_space K C plus zero opp emult; - (* lattice properties *) - rs_lattice: is_lattice C join meet; - (* other properties *) - rs_compat_le_plus: ∀f,g,h. le_ ? meet f g → le_ ? meet (plus f h) (plus g h); - rs_compat_le_times: ∀a,f. 0≤a → le_ ? meet zero f → le_ ? meet zero (emult a f) - }. - -definition absolute_value \def λC:Type.λopp.λjoin:C→C→C.λf.join f (opp f). - -record is_archimedean_riesz_space (K:ordered_field_ch0) (C:Type) (plus:C→C→C) - (zero:C) (opp:C→C) (emult:K→C→C) (join,meet:C→C→C) - :Prop \def - { ars_riesz_space: is_riesz_space ? ? plus zero opp emult join meet; - ars_archimedean: ∃u.∀n,a.∀p:n > O. - le_ C meet (absolute_value ? opp join a) - (emult (inv K (sum_field K n) (not_eq_sum_field_zero K n p)) u) → - a = zero - }. +lemma induced_norm_is_norm: + ∀R:real.∀V:integration_riesz_space R.is_norm ? V (induced_norm ? V). + intros; + apply mk_is_norm; + [ apply mk_is_semi_norm; + [ unfold induced_norm; + intros; + apply i_positive; + [ apply (irs_integral_properties ? V) + | (* difficile *) + elim daemon + ] + | intros; + unfold induced_norm; + (* facile *) + elim daemon + | intros; + unfold induced_norm; + (* difficile *) + elim daemon + ] + | intros; + unfold induced_norm in H; + apply irs_quotient_space1; + unfold minus; + rewrite < plus_comm; + rewrite < eq_zero_opp_zero; + rewrite > zero_neutral; + assumption + ]. +qed. + +definition distance_induced_by_integral ≝ + λR:real.λV:integration_riesz_space R. + induced_distance ? ? (induced_norm R V). + +theorem distance_induced_by_integral_is_distance: + ∀R:real.∀V:integration_riesz_space R. + is_distance ? ? (distance_induced_by_integral ? V). + intros; + unfold distance_induced_by_integral; + apply induced_distance_is_distance; + apply induced_norm_is_norm. +qed. -record is_algebra (K: field) (C:Type) (plus:C→C→C) (zero:C) (opp:C→C) - (emult:K→C→C) (mult:C→C→C) : Prop +record is_algebra (K: field) (V:vector_space K) (mult:V→V→V) (one:V) : Prop ≝ - { (* vector space properties *) - a_vector_space_properties: is_vector_space ? ? plus zero opp emult; - (* ring properties *) - a_ring: is_ring ? plus mult zero opp; + { (* ring properties *) + a_ring: is_ring V mult one; (* algebra properties *) - a_associative_left: ∀a,f,g. emult a (mult f g) = mult (emult a f) g; - a_associative_right: ∀a,f,g. emult a (mult f g) = mult f (emult a g) + a_associative_left: ∀a,f,g. a * (mult f g) = mult (a * f) g; + a_associative_right: ∀a,f,g. a * (mult f g) = mult f (a * g) }. - - -record is_f_algebra (K: ordered_field_ch0) (C:Type) (plus: C\to C \to C) -(zero:C) (opp: C \to C) (emult: Type_OF_ordered_field_ch0 K\to C\to C) (mult: C\to C\to C) -(join,meet: C\to C\to C) : Prop + +record algebra (K: field) (V:vector_space K) (a_one:V) : Type \def + { a_mult: V → V → V; + a_algebra_properties: is_algebra ? ? a_mult a_one + }. + +interpretation "Algebra product" 'times a b = + (cic:/matita/integration_algebras/a_mult.con _ _ _ a b). + +definition ring_of_algebra ≝ + λK.λV:vector_space K.λone:V.λA:algebra ? V one. + mk_ring V (a_mult ? ? ? A) one + (a_ring ? ? ? ? (a_algebra_properties ? ? ? A)). + +coercion cic:/matita/integration_algebras/ring_of_algebra.con. + +record is_f_algebra (K) (S:archimedean_riesz_space K) (one: S) + (A:algebra ? S one) : Prop \def -{ archimedean_riesz_properties:> is_archimedean_riesz_space K C - plus zero opp emult join meet ; -algebra_properties:> is_algebra ? ? plus zero opp emult mult; -compat_mult_le: \forall f,g: C. le_ ? meet zero f \to le_ ? meet zero g \to - le_ ? meet zero (mult f g); -compat_mult_meet: \forall f,g,h. meet f g = zero \to meet (mult h f) g = zero +{ compat_mult_le: + ∀f,g:S. + le ? S 0 f → le ? S 0 g → le ? S 0 (a_mult ? ? ? A f g); + compat_mult_meet: + ∀f,g,h:S. + meet ? S f g = 0 → meet ? S (a_mult ? ? ? A h f) g = 0 +}. + +record f_algebra (K:ordered_field_ch0) (R:archimedean_riesz_space K) (one:R) : +Type \def +{ fa_algebra:> algebra ? R one; + fa_f_algebra_properties: is_f_algebra ? ? ? fa_algebra }. -record f_algebra : Type \def -{ +(* to be proved; see footnote 2 in the paper by Spitters *) +axiom symmetric_a_mult: + ∀K,R,one.∀A:f_algebra K R one. symmetric ? (a_mult ? ? ? A). -} +record integration_f_algebra (R:real) : Type \def + { ifa_integration_riesz_space:> integration_riesz_space R; + ifa_f_algebra:> + f_algebra ? ifa_integration_riesz_space + (irs_unit ? ifa_integration_riesz_space) + }. \ No newline at end of file