reserve X for non empty set,
  Y for set,
  S for SigmaField of X,
  F for sequence of S,
  f,g for PartFunc of X,REAL,
  A,B for Element of S,
  r,s for Real,
  a for Real,
  n for Nat;

theorem Th2:
  for X be non empty set, S be SigmaField of X, M be sigma_Measure
of S, f be PartFunc of X,ExtREAL, r be Real
 st dom f in S & (for x be object st x  in dom f holds f.x = r)
  holds f is_simple_func_in S
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 r be Real;
  assume that
A1: dom f in S and
A2: for x be object st x in dom f holds f.x = r;
  reconsider Df = dom f as Element of S by A1;
A3: ex F being Finite_Sep_Sequence of S st (dom f = union rng F & for n
being Nat,x,y being Element of X st n in dom F & x in F.n & y in F.n holds f.x
  = f.y)
  proof
    set F = <*Df*>;
A4: dom F = Seg 1 by FINSEQ_1:38;
A5: now
      let i,j be Nat;
      assume that
A6:   i in dom F and
A7:   j in dom F & i <> j;
      i = 1 by A4,A6,FINSEQ_1:2,TARSKI:def 1;
      hence F.i misses F.j by A4,A7,FINSEQ_1:2,TARSKI:def 1;
    end;
A8: for n be Nat st n in dom F holds F.n = Df
    proof
      let n be Nat;
      assume n in dom F;
      then n = 1 by A4,FINSEQ_1:2,TARSKI:def 1;
      hence thesis by FINSEQ_1:40;
    end;
    reconsider F as Finite_Sep_Sequence of S by A5,MESFUNC3:4;
    take F;
    F = <* F.1 *> by FINSEQ_1:40;
    then
A9: rng F = {F.1} by FINSEQ_1:38;
    1 in Seg 1;
    then F.1 = Df by A4,A8;
    hence dom f = union rng F by A9,ZFMISC_1:25;
    hereby
      let n be Nat, x,y be Element of X;
      assume that
A10:  n in dom F and
A11:  x in F.n and
A12:  y in F.n;
A13:  F.n = Df by A8,A10;
      then f.x = r by A2,A11;
      hence f.x = f.y by A2,A12,A13;
    end;
  end;
  now
    let x be Element of X;
A14: r in REAL by XREAL_0:def 1;
    assume x in dom f;
    then
A15: f.x = r by A2;
    then -infty < f.x by XXREAL_0:12,A14;
    then
A16: -(+infty) < f.x by XXREAL_3:def 3;
    f.x < +infty by A15,XXREAL_0:9,A14;
    hence |. f.x .| < +infty by A16,EXTREAL1:22;
  end;
  then f is real-valued by MESFUNC2:def 1;
  hence thesis by A3,MESFUNC2:def 4;
end;
