reserve X for set;

theorem Th26:
  for S being SigmaField of X, a,b being R_eal holds ex M being
Function of S,ExtREAL st for A being Element of S holds (A = {} implies M.A = a
  ) & (A <> {} implies M.A = b)
proof
  let S be SigmaField of X, a,b be R_eal;
  defpred P[object,object] means
   ($1 = {} implies $2 = a) & ($1 <> {} implies $2 = b);
A1: for x being object st x in S ex y being object st y in ExtREAL & P[x,y]
  proof
    let x be object;
    x <> {} implies ex y being set st y in ExtREAL & P[x,y];
    hence thesis;
  end;
  ex F being Function of S,ExtREAL st for x being object st x in S holds P[x,
  F.x] from FUNCT_2:sch 1(A1);
  then consider M being Function of S,ExtREAL such that
A2: for x being object st x in S holds P[x,M.x];
  take M;
  thus thesis by A2;
end;
