
theorem Th71:
  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 R_eal st 0 <= c & f is_simple_func_in S
& (for x be object st x in dom f holds f.x=c)
 holds integral'(M,f) = c*(M.(dom f))
proof
  let X be non empty set;
  let S be SigmaField of X;
  let M be sigma_Measure of S;
  let f be PartFunc of X,ExtREAL;
  let c be R_eal;
  assume that
A1: 0 <= c and
A2: f is_simple_func_in S and
A3: for x be object st x in dom f holds f.x = c;
  for x be object st x in dom f holds 0 <= f.x by A1,A3;
  then a4: f is nonnegative by SUPINF_2:52;
  reconsider A = dom f as Element of S by A2,Th37;
  per cases;
  suppose
A5: dom f = {};
    then
A6: M.A = 0 by VALUED_0:def 19;
    integral'(M,f) = 0 by A5,Def14;
    hence thesis by A6;
  end;
  suppose
A7: dom f <> {};
    set x = <* c * M.A *>;
    reconsider a = <* c *> as FinSequence of ExtREAL;
    set F = <* dom f *>;
    reconsider x as FinSequence of ExtREAL;
A8: rng F = {A} by FINSEQ_1:38;
    rng F c= S
    proof
      let z be object;
      assume z in rng F;
      then z = A by A8,TARSKI:def 1;
      hence thesis;
    end;
    then reconsider F as FinSequence of S by FINSEQ_1:def 4;
    for i,j be Nat st i in dom F & j in dom F & i <> j holds F.i misses F .j
    proof
      let i,j be Nat;
      assume that
A9:   i in dom F and
A10:  j in dom F and
A11:  i <> j;
A12:  dom F = {1} by FINSEQ_1:2,38;
      then i = 1 by A9,TARSKI:def 1;
      hence thesis by A10,A11,A12,TARSKI:def 1;
    end;
    then reconsider F as Finite_Sep_Sequence of S by MESFUNC3:4;
A13: dom F = Seg 1 by FINSEQ_1:38
      .= dom a by FINSEQ_1:38;
A14: for n be Nat st n in dom F for x be object st x in F.n holds f.x = a.n
    proof
      let n be Nat;
      assume n in dom F;
      then n in {1} by FINSEQ_1:2,38;
      then
A15:  n = 1 by TARSKI:def 1;
      let x be object;
      assume x in F.n;
      then x in dom f by A15;
      then f.x = c by A3;
      hence thesis by A15;
    end;
A16: for n be Nat st n in dom x holds x.n = c*M.A
    proof
      let n be Nat;
      assume n in dom x;
      then n in {1} by FINSEQ_1:2,38;
      then n = 1 by TARSKI:def 1;
      hence thesis;
    end;
A17: dom x = Seg 1 by FINSEQ_1:38
      .= dom F by FINSEQ_1:38;
A18: for n be Nat st n in dom x holds x.n = a.n*(M*F).n
    proof
      let n be Nat;
      assume
A19:  n in dom x;
      then n in {1} by FINSEQ_1:2,38;
      then
A20:  n = 1 by TARSKI:def 1;
      (M*F).n = M.(F.n) by A17,A19,FUNCT_1:13
        .= M.A by A20;
      hence thesis by A20;
    end;
    dom f = union rng F by A8,ZFMISC_1:25;
    then F,a are_Re-presentation_of f by A13,A14,MESFUNC3:def 1;
    then integral(M,f) = Sum x by A2,a4,A7,A17,A18,MESFUNC4:3;
    then
A22: integral'(M,f) = Sum x by A7,Def14;
    reconsider j = 1 as R_eal by XXREAL_0:def 1;
    1 = len x by FINSEQ_1:40;
    then Sum x = j *(c*M.A) by A16,MESFUNC3:18;
    hence thesis by A22,XXREAL_3:81;
  end;
end;
