+definition is_riesz_norm ≝
+ λR:real.λV:riesz_space R.λnorm:norm R V.
+ ∀f,g:V. os_le V (absolute_value ? V f) (absolute_value ? V g) →
+ os_le R (n_function R V norm f) (n_function R V norm g).
+
+record riesz_norm (R:real) (V:riesz_space R) : Type ≝
+ { rn_norm:> norm R V;
+ rn_riesz_norm_property: is_riesz_norm ? ? rn_norm
+ }.
+
+(*CSC: non fa la chiusura delle coercion verso funclass *)
+definition rn_function ≝
+ λR:real.λV:riesz_space R.λnorm:riesz_norm ? V.
+ n_function R V (rn_norm ? ? norm).
+
+coercion cic:/matita/integration_algebras/rn_function.con 1.
+
+(************************** L-SPACES *************************************)
+(*
+record is_l_space (R:real) (V:riesz_space R) (norm:riesz_norm ? V) : Prop ≝
+ { ls_banach: is_complete ? V (induced_distance ? ? norm);
+ ls_linear: ∀f,g:V. le ? V 0 f → le ? V 0 g → norm (f+g) = norm f + norm g
+ }.
+*)
+(******************** ARCHIMEDEAN RIESZ SPACES ***************************)
+
+record is_archimedean_riesz_space (K) (S:riesz_space K) : Prop
+\def
+ { ars_archimedean: ∃u:S.∀n.∀a.∀p:n > O.
+ os_le S
+ (absolute_value ? S a)
+ ((inv K (sum_field K n) (not_eq_sum_field_zero K n p))* u) →
+ a = 0
+ }.
+
+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
+ }.
+
+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 (l_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_positive_linear: is_positive_linear ? ? integral;
+ irs_limit1:
+ ∀f:irs_archimedean_riesz_space.
+ tends_to ?
+ (λn.integral (l_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 (l_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
+ }.