
theorem Th86:
  for X be non empty set, S be SigmaField of X, M be sigma_Measure
  of S, f be PartFunc of X,ExtREAL, c be Real st 0 <= c & (ex A be Element of S
st A = dom f & f is A-measurable) & f is nonnegative holds integral+(M,c(#)f
  ) = c * integral+(M,f)
proof
  let X be non empty set, S be SigmaField of X, M be sigma_Measure of S, f be
  PartFunc of X,ExtREAL, c be Real such that
A1: 0 <= c and
A2: ex A be Element of S st A = dom f & f is A-measurable and
A3: f is nonnegative;
  consider F1 be Functional_Sequence of X,ExtREAL, K1 be ExtREAL_sequence such
  that
A4: for n be Nat holds F1.n is_simple_func_in S & dom(F1.n) = dom f and
A5: for n be Nat holds F1.n is nonnegative and
A6: for n,m be Nat st n <=m holds for x be Element of X st x in dom f
  holds (F1.n).x <= (F1.m).x and
A7: for x be Element of X st x in dom f holds F1#x is convergent & lim(
  F1#x) = f.x and
A8: for n be Nat holds K1.n=integral'(M,F1.n) and
  K1 is convergent and
A9: integral+(M,f)=lim K1 by A2,A3,Def15;
  deffunc PF(Nat) = c(#)(F1.$1);
  consider F be Functional_Sequence of X,ExtREAL such that
A10: for n be Nat holds F.n=PF(n) from SEQFUNC:sch 1;
A11: c(#)f is nonnegative by A1,A3,Th20;
A12: for n be Nat holds F.n is nonnegative
  proof
    let n be Nat;
    reconsider n as Element of NAT by ORDINAL1:def 12;
    F1.n is nonnegative by A5;
    then c(#)(F1.n) is nonnegative by A1,Th20;
    hence thesis by A10;
  end;
  consider A be Element of S such that
A13: A = dom f and
A14: f is A-measurable by A2;
A15: c(#)f is A-measurable by A13,A14,MESFUNC1:37;
A16: for n be Nat holds F.n is_simple_func_in S & dom(F.n) = dom(c(#)f)
  proof
    let n be Nat;
    reconsider n1=n as Element of NAT by ORDINAL1:def 12;
A17: F.n1=c(#)(F1.n1) by A10;
    hence F.n is_simple_func_in S by A4,Th39;
    thus dom(F.n) = dom(F1.n) by A17,MESFUNC1:def 6
      .=A by A4,A13
      .=dom(c(#)f) by A13,MESFUNC1:def 6;
  end;
A18: for n,m be Nat st n<=m holds K1.n <= K1.m
  proof
    let n,m be Nat;
A19: K1.n = integral'(M,F1.n) by A8;
A20: K1.m = integral'(M,F1.m) by A8;
A21: F1.m is_simple_func_in S by A4;
A22: F1.n is nonnegative by A5;
A23: dom(F1.n) = dom f by A4;
A24: F1.m is nonnegative by A5;
A25: dom(F1.m) = dom f by A4;
    assume
A26: n<=m;
A27: for x be object st x in dom(F1.m - F1.n) holds (F1.n).x <= (F1.m).x
    proof
      let x be object;
      assume x in dom(F1.m - F1.n);
      then x in (dom(F1.m) /\ dom(F1.n) \ (((F1.m)"{+infty}/\(F1.n)"{+infty})
      \/((F1.m)"{-infty}/\(F1.n)"{-infty}))) by MESFUNC1:def 4;
      then x in dom(F1.m) /\ dom(F1.n) by XBOOLE_0:def 5;
      hence thesis by A6,A26,A23,A25;
    end;
A28: F1.n is_simple_func_in S by A4;
    then
A29: dom(F1.m - F1.n) = dom(F1.m)/\dom(F1.n) by A21,A22,A24,A27,Th69;
    then
A30: F1.m|dom(F1.m - F1.n) = F1.m by A23,A25,GRFUNC_1:23;
    F1.n|dom(F1.m - F1.n) = F1.n by A23,A25,A29,GRFUNC_1:23;
    hence thesis by A19,A20,A28,A21,A22,A24,A27,A30,Th70;
  end;
  deffunc PK(Nat) = integral'(M,F.$1);
  consider K be ExtREAL_sequence such that
A31: for n be Element of NAT holds K.n = PK(n) from FUNCT_2:sch 4;
A32: now
    let n be Nat;
    n in NAT by ORDINAL1:def 12;
    hence K.n = PK(n) by A31;
  end;
A33: for n be Nat holds K.n=(c)*(K1.n)
  proof
    let n be Nat;
    reconsider n1=n as Element of NAT by ORDINAL1:def 12;
A34: F1.n is_simple_func_in S by A4;
A35: F.n1=c(#)(F1.n1) by A10;
    thus K.n=integral'(M,F.n1) by A32
      .= c * integral'(M,F1.n) by A1,A5,A34,A35,Th66
      .= c * K1.n by A8;
  end;
A36: A = dom(c(#)f) by A13,MESFUNC1:def 6;
A37: for x be Element of X st x in dom(c(#)f) holds F#x is convergent & lim(
  F#x) = (c(#)f).x
  proof
    let x be Element of X;
    now
      let n1 be set;
      assume n1 in dom(F1#x);
      then reconsider n=n1 as Element of NAT;
A38:  (F1#x).n = (F1.n).x by Def13;
      F1.n is nonnegative by A5;
      hence -infty < (F1#x).n1 by A38,Def5;
    end;
    then
A39: F1#x is without-infty by Th10;
    assume
A40: x in dom(c(#)f);
A41: now
      let n be Nat;
      reconsider n1=n as Element of NAT by ORDINAL1:def 12;
A42:  dom(c(#)(F1.n1)) = dom (F.n1) by A10
        .=dom(c(#)f) by A16;
      thus (F#x).n = (F.n).x by Def13
        .= (c(#)(F1.n1)).x by A10
        .=  c * (F1.n).x by A40,A42,MESFUNC1:def 6
        .=  c * (F1#x).n by Def13;
    end;
A43: now
      let n,m be Nat;
      assume
A44:  n <=m;
A45:  (F1#x).m = (F1.m).x by Def13;
      (F1#x).n = (F1.n).x by Def13;
      hence (F1#x).n<= (F1#x).m by A6,A13,A36,A40,A44,A45;
    end;
     c *lim(F1#x) = c * f.x by A7,A13,A36,A40
      .=(c(#)f).x by A40,MESFUNC1:def 6;
    hence thesis by A1,A41,A39,A43,Th63;
  end;
  now
    let n1 be set;
    assume n1 in dom K1;
    then reconsider n = n1 as Element of NAT;
A46: F1.n is_simple_func_in S by A4;
    K1.n = integral'(M,F1.n) by A8;
    hence -infty < K1.n1 by A5,A46,Th68;
  end;
  then
A47: K1 is without-infty by Th10;
  then
A48: lim K = c * lim K1 by A1,A18,A33,Th63;
A49: for n,m be Nat st n <=m holds for x be Element of X st x in dom (c(#)f)
  holds (F.n).x <= (F.m).x
  proof
    let n,m be Nat;
    assume
A50: n<=m;
    reconsider n,m as Element of NAT by ORDINAL1:def 12;
    let x be Element of X;
    assume
A51: x in dom(c(#)f);
    dom(c(#)(F1.m)) = dom(F.m) by A10;
    then
A52: dom(c(#)(F1.m)) = dom(c(#)f) by A16;
    (F.m).x =(c(#)(F1.m)).x by A10;
    then
A53: (F.m).x =(c)*(F1.m).x by A51,A52,MESFUNC1:def 6;
    dom(c(#)(F1.n)) = dom(F.n) by A10;
    then
A54: dom(c(#)(F1.n)) = dom(c(#)f) by A16;
    (F.n).x =(c(#)(F1.n)).x by A10;
    then (F.n).x =(c)*(F1.n).x by A51,A54,MESFUNC1:def 6;
    hence thesis by A1,A6,A13,A36,A50,A51,A53,XXREAL_3:71;
  end;
  K is convergent by A1,A47,A18,A33,Th63;
  hence thesis by A9,A36,A15,A11,A32,A16,A12,A49,A37,A48,Def15;
end;
