reserve X for non empty set,
  S for SigmaField of X,
  M for sigma_Measure of S,
  f,g for PartFunc of X,ExtREAL,
  E for Element of S;

theorem Th3:
  f is_integrable_on M & g is_integrable_on M & g-f is nonnegative
  implies ex E be Element of S st E = dom f /\ dom g & Integral(M,f|E) <=
  Integral(M,g|E)
proof
  assume that
A1: f is_integrable_on M and
A2: g is_integrable_on M and
A3: g-f is nonnegative;
  set h=(-jj)(#)f;
A4: h is_integrable_on M by A1,MESFUNC5:110;
  then consider E be Element of S such that
A5: E = dom h /\ dom g and
A6: Integral(M,h+g) = Integral(M,h|E)+Integral(M,g|E) by A2,MESFUNC5:109;
A7: ex E3 be Element of S st E3 = dom h & h is E3-measurable by A4;
A8: g|E is_integrable_on M by A2,MESFUNC5:97;
  then
A9: Integral(M,g|E) < +infty by MESFUNC5:96;
  -infty < Integral(M,g|E) by A8,MESFUNC5:96;
  then reconsider c2=Integral(M,g|E) as Element of REAL by A9,XXREAL_0:14;
  take E;
A10: h|E = (-jj)(#)(f|E) by Th2;
  g+(-f) is nonnegative by A3,MESFUNC2:8;
  then
A11: h+g is nonnegative by MESFUNC2:9;
A12: f|E is_integrable_on M by A1,MESFUNC5:97;
  then
A13: Integral(M,f|E) < +infty by MESFUNC5:96;
  -infty < Integral(M,f|E) by A12,MESFUNC5:96;
  then reconsider c1=Integral(M,f|E) as Element of REAL by A13,XXREAL_0:14;
A14: (-jj qua ExtReal) * Integral(M,f|E) = (-jj)*c1 by EXTREAL1:1
    .= -c1;
  ex E2 be Element of S st E2 = dom g & g is E2-measurable by A2;
  then ex A be Element of S st A = dom(h+g) & (h+g) is A-measurable by A7,
MESFUNC5:47;
  then 0 <= Integral(M,h|E)+Integral(M,g|E) by A6,A11,MESFUNC5:90;
  then 0 <= (-jj qua ExtReal) * Integral(M,f|E) + Integral(M,g|E)
     by A12,A10,MESFUNC5:110;
  then 0 <= -c1 + c2 by A14,XXREAL_3:def 2;
  then 0 +c1 <=-c1+c2+c1 by XREAL_1:6;
  hence thesis by A5,MESFUNC1:def 6;
end;
