theorem Th27:
  ex f st (dom f = Sigma & for D st D in Sigma holds (p in D
  implies f.D = 1) & (not p in D implies f.D = 0))
proof
  deffunc G(set) = 0;
  deffunc F(set) = 1;
  defpred C[set] means p in $1;
  ex f being Function st dom f = Sigma & for x being set st x in Sigma
holds (C[x] implies f.x=F(x)) & (not C[x] implies f.x=G(x))
    from PARTFUN1:sch 5;
  then consider f being Function such that
A1: dom f = Sigma and
A2: for x being set st x in Sigma holds (C[x] implies f.x = 1) & (not C[
  x] implies f.x = 0);
  take f;
  thus dom f = Sigma by A1;
  let D;
  assume
A3: D in Sigma;
  hence p in D implies f.D = 1 by A2;
  assume not p in D;
  hence thesis by A2,A3;
end;
