
theorem Th3:
  for X be non empty set, S be SigmaField of X, M be sigma_Measure
  of S, f be PartFunc of X,ExtREAL, E be Element of S, a be Real st f
is_integrable_on M & E c= dom f & M.E < +infty & (for x be Element of X st x in
  E holds f.x <= a) holds Integral(M,f|E) <= (a qua ExtReal)*M.E
proof
  let X be non empty set, S be SigmaField of X, M be sigma_Measure of S, f be
  PartFunc of X,ExtREAL, E be Element of S, a be Real;
  assume that
A1: f is_integrable_on M and
A2: E c= dom f and
A3: M.E < +infty and
A4: for x be Element of X st x in E holds f.x <=a;
  set C = chi(E,X);
A5: f|E is_integrable_on M by A1,MESFUNC5:97;
  dom(a(#)(C|E)) = dom(C|E) by MESFUNC1:def 6;
  then dom(a(#)(C|E)) = dom C /\ E by RELAT_1:61;
  then dom(a(#)(C|E)) = X /\ E by FUNCT_3:def 3;
  then
A6: dom(a(#)(C|E)) = E by XBOOLE_1:28;
  dom(f|E) = dom f /\ E by RELAT_1:61;
  then
A7: dom(f|E) = E by A2,XBOOLE_1:28;
  for x be Element of X st x in dom(f|E) holds (f|E).x <= (a(#)(C|E)).x
  proof
    let x be Element of X;
    assume
A8: x in dom(f|E);
    then
A9: x in dom(C|E) by A7,A6,MESFUNC1:def 6;
    then x in dom C /\ E by RELAT_1:61;
    then
A10: x in E by XBOOLE_0:def 4;
    then f.x <= a by A4;
    then
A11: (f|E).x <=a by A10,FUNCT_1:49;
    (a(#)(C|E)).x = a * (C|E).x by A7,A6,A8,MESFUNC1:def 6
      .= a * C.x by A9,FUNCT_1:47
      .= a * 1.by A10,FUNCT_3:def 3;
    hence thesis by A11,XXREAL_3:81;
  end;
  then
A12: (a(#)(C|E))-(f|E) is nonnegative by MESFUNC7:1;
  dom(a(#)(C|E)) = dom(C|E) by MESFUNC1:def 6;
  then dom(a(#)(C|E)) = dom C /\ E by RELAT_1:61;
  then dom(a(#)(C|E)) = X /\ E by FUNCT_3:def 3;
  then
A13: dom(a(#)(C|E)) = E by XBOOLE_1:28;
  E = E/\E;
  then
A14: Integral(M,C|E) = M.E by A3,MESFUNC7:25;
  chi(E,X) is_integrable_on M by A3,MESFUNC7:24;
  then
A15: C|E is_integrable_on M by MESFUNC5:97;
  then a(#)(C|E) is_integrable_on M by MESFUNC5:110;
  then consider E1 be Element of S such that
A16: E1 = dom(f|E) /\ dom(a(#)(C|E)) and
A17: Integral(M,(f|E)|E1) <= Integral(M,(a(#)(C|E))|E1) by A5,A12,MESFUNC7:3;
  dom(f|E) = dom f /\ E by RELAT_1:61;
  then dom(f|E) = E by A2,XBOOLE_1:28;
  then (a(#)(C|E))|E1 = a(#)(C|E) & (f|E)|E1 = f|E by A16,A13;
  hence thesis by A15,A17,A14,MESFUNC5:110;
end;
