reserve A,X,X1,X2,Y,Y1,Y2 for set, a,b,c,d,x,y,z for object;
reserve P,P1,P2,Q,R,S for Relation;

theorem
  P*(R \/ Q) = (P*R) \/ (P*Q)
  proof
    let x,y;
    hereby
      assume [x,y] in P*(R \/ Q);
      then consider z such that
A1:   [x,z] in P and
A2:   [z,y] in R \/ Q by Def6;
      [z,y] in R or [z,y] in Q by A2,XBOOLE_0:def 3;
      then [x,y] in P*R or [x,y] in P*Q by A1,Def6;
      hence [x,y] in (P*R) \/ (P*Q) by XBOOLE_0:def 3;
    end;
    assume
A3: [x,y] in (P*R) \/ (P*Q);
    per cases by A3,XBOOLE_0:def 3;
    suppose [x,y] in P*Q;
      then consider z such that
A4:   [x,z] in P and
A5:   [z,y] in Q by Def6;
      [z,y] in R \/ Q by A5,XBOOLE_0:def 3;
      hence [x,y] in P*(R \/ Q) by A4,Def6;
    end;
    suppose [x,y] in P*R;
      then consider z such that
A6:   [x,z] in P and
A7:   [z,y] in R by Def6;
      [z,y] in R \/ Q by A7,XBOOLE_0:def 3;
      hence [x,y] in P*(R \/ Q) by A6,Def6;
    end;
  end;
