
theorem Th27:
  for S be non empty finite set,
  D be EqSampleSpaces of S,
  f,g be Function of S,BOOLEAN holds
  Prob((f 'or' g),D)
  = Prob(f,D) + Prob(g,D) - Prob((f '&' g),D)
  proof
    let S be non empty finite set,
    D be EqSampleSpaces of S,
    f,g be Function of S,BOOLEAN;
    set s = the Element of D;
    card (trueEVENT(f*s) \/ trueEVENT(g*s)) =
    card (trueEVENT(f*s))+ card( trueEVENT(g*s))
    -card (trueEVENT(f*s) /\ trueEVENT(g*s)) by CARD_2:45;then
    Prob((f 'or' g),s) = (card (trueEVENT(f*s))+ card( trueEVENT(g*s))
    -card (trueEVENT(f*s) /\ trueEVENT(g*s)))/(len s) by Th24
    .=(card (trueEVENT(f*s)))/(len s) + (card( trueEVENT(g*s)))/(len s)
    - (card (trueEVENT(f*s) /\ trueEVENT(g*s)))/(len s) by XCMPLX_1:124
    .= Prob(f,s) + Prob(g,s) - Prob((f '&' g),s) by Th25
    .= Prob(f,D) + Prob(g,s) - Prob((f '&' g),s) by Def6
    .= Prob(f,D) + Prob(g,D) - Prob((f '&' g),s) by Def6
    .= Prob(f,D) + Prob(g,D) - Prob((f '&' g),D) by Def6;
    hence thesis by Def6;
  end;
