
theorem Th29:

for S be non empty finite set,
  D be EqSampleSpaces of S,
  f be Function of S, BOOLEAN
  st f = chi(S,S)
  holds Prob(f,D) = 1
  proof
    let S be non empty finite set,
    D be EqSampleSpaces of S,
    f be Function of S, BOOLEAN;
    assume A1: f = chi(S,S);
    set s = the Element of D;
    reconsider s0 = dom s as finite set;
    reconsider CfS = Coim(f*s,TRUE) as finite set;
    card Seg len s = len s by FINSEQ_1:57;
    then
    A2: card s0 = len s by FINSEQ_1:def 3;
    A3: s is Function of dom s,rng s by FUNCT_2:1;
    A4: s is Function of dom s,S by A3,FUNCT_2:2;
    A5: f is Function of dom f,rng f by FUNCT_2:1;
    S c= S;
    then
    A6: f is Function of dom f,{TRUE} by A5,A1,INTEGRA1:17;
    A7: dom f = S by FUNCT_2:def 1;
    A8:trueEVENT(f*s) = s"(trueEVENT(f)) by Th14
    .=s"(S) by A7,A6,FUNCT_2:40
    .=dom s by A4,FUNCT_2:40;
    thus Prob(f,D) = Prob(f,s) by Def6
    .=1 by A2,A8,XCMPLX_1:60;
  end;
