
theorem Th41:
  for X be non empty set, S be SigmaField of X, M be sigma_Measure
of S, A be Element of S, c be R_eal st c <> +infty & c <> -infty holds ex f be
PartFunc of X,ExtREAL st f is_simple_func_in S & dom f = A &
for x be object st x in A holds f.x=c
proof
  let X be non empty set;
  let S be SigmaField of X;
  let M be sigma_Measure of S;
  let A be Element of S;
  let c be R_eal;
  assume that
A1: c <> +infty and
A2: c <> -infty;
  -infty < c by A2,XXREAL_0:6;
  then
A3: -(+infty) < c by XXREAL_3:def 3;
  deffunc F(object) = c;
  defpred P[object] means $1 in A;
A4: for x be object st P[x] holds F(x) in ExtREAL;
  consider f be PartFunc of X,ExtREAL such that
A5: (for x be object holds x in dom f iff x in X & P[x]) &
for x be object st
  x in dom f holds f.x = F(x) from PARTFUN1:sch 3(A4);
  c < +infty by A1,XXREAL_0:4;
  then |.c.| < +infty by A3,EXTREAL1:22;
  then for x be Element of X st x in dom f holds |. f.x .| < +infty by A5;
  then
A6: f is real-valued by MESFUNC2:def 1;
  take f;
A7: A c= dom f
  by A5;
 set F = <* dom f *>;
A8: dom f c= A
  by A5;
A9: rng F = {dom f} by FINSEQ_1:38;
  then
A10: rng F = {A} by A8,A7,XBOOLE_0:def 10;
  rng F c= S
  proof
    let z be object;
    assume z in rng F;
    then z = A by A10,TARSKI:def 1;
    hence thesis;
  end;
  then reconsider F as FinSequence of S by FINSEQ_1:def 4;
  now
    let i,j be Nat;
    assume that
A11: i in dom F and
A12: j in dom F and
A13: i <> j;
A14: dom F = Seg 1 by FINSEQ_1:38;
    then i = 1 by A11,FINSEQ_1:2,TARSKI:def 1;
    hence F.i misses F.j by A12,A13,A14,FINSEQ_1:2,TARSKI:def 1;
  end;
  then reconsider F as Finite_Sep_Sequence of S by MESFUNC3:4;
A15: now
    let n be Nat;
    let x,y be Element of X;
    assume that
A16: n in dom F and
A17: x in F.n and
A18: y in F.n;
    dom F = Seg 1 by FINSEQ_1:38;
    then
A19: n = 1 by A16,FINSEQ_1:2,TARSKI:def 1;
    then x in dom f by A17;
    then
A20: f.x = c by A5;
    y in dom f by A18,A19;
    hence f.x = f.y by A5,A20;
  end;
  dom f = union rng F by A9,ZFMISC_1:25;
  hence f is_simple_func_in S by A6,A15,MESFUNC2:def 4;
  thus dom f = A by A8,A7;
  thus thesis by A5;
end;
