reserve E for non empty set;
reserve a for Element of E;
reserve A, B for Subset of E;
reserve Y for set;
reserve p for FinSequence;
reserve e, e1, e2 for Singleton of E;

theorem Th51:
  for E being finite non empty set, A,B1,B2,B3 being Event of E st
0 < prob(B1) & 0 < prob(B2) & 0 < prob(B3) & B1 \/ B2 \/ B3 = E & B1 misses B2
& B1 misses B3 & B2 misses B3 holds prob(A) = ( prob(A, B1) * prob(B1) + prob(A
  , B2) * prob(B2) ) + prob(A, B3) * prob(B3)
proof
  let E be finite non empty set, A,B1,B2,B3 be Event of E;
  assume that
A1: 0 < prob(B1) and
A2: 0 < prob(B2) and
A3: 0 < prob(B3) and
A4: B1 \/ B2 \/ B3 = E and
A5: B1 /\ B2 = {} and
A6: B1 /\ B3 = {} and
A7: B2 /\ B3 = {};
  (B1 /\ B3) \/ (B2 /\ B3) = B2 /\ B3 by A6;
  then (B1 \/ B2) /\ B3 = {} by A7,XBOOLE_1:23;
  then
A8: (B1 \/ B2) misses B3;
  (B1 \/ B2 \/ B3) /\ A = A by A4,XBOOLE_1:28;
  then ((B1 \/ B2) /\ A) \/ (B3 /\ A) = A by XBOOLE_1:23;
  then prob(A) = prob((B1 \/ B2) /\ A) + prob(B3 /\ A) by A8,Th21,XBOOLE_1:76;
  then
A9: prob(A) = prob((B1 /\ A) \/ (B2 /\ A)) + prob(B3 /\ A) by XBOOLE_1:23;
  B1 misses B2 by A5;
  then prob(A) = prob(A /\ B1) + prob(A /\ B2) + prob(A /\ B3) by A9,Th21,
XBOOLE_1:76;
  then
  prob(A) = prob(A, B1) * prob(B1) + prob(A /\ B2) + prob(A /\ B3) by A1,
XCMPLX_1:87;
  then prob(A) = prob(A, B1) * prob(B1) + prob(A, B2) * prob(B2) + prob(A /\
  B3) by A2,XCMPLX_1:87;
  hence thesis by A3,XCMPLX_1:87;
end;
