reserve u,v,x,x1,x2,y,y1,y2,z,p,a for object,
        A,B,X,X1,X2,X3,X4,Y,Y1,Y2,Z,N,M for set;

theorem Th101:
  [:X \ Y, Z:] = [:X, Z:] \ [:Y, Z:] & [:Z, X \ Y:] = [:Z, X:] \ [:Z, Y:]
proof
A1: for x,y holds [x,y] in [:X \ Y, Z:] iff [x,y] in [:X, Z:] \ [:Y, Z:]
  proof
    let x,y;
    thus [x,y] in [:X \ Y, Z:] implies [x,y] in [:X, Z:] \ [:Y, Z:]
    proof
      assume
A2:   [x,y] in [:X \ Y, Z:];
      then
A3:   x in X \ Y by Lm16;
      then
A4:   x in X by XBOOLE_0:def 5;
      not x in Y by A3,XBOOLE_0:def 5;
      then
A5:   not [x,y] in [:Y,Z:] by Lm16;
      y in Z by A2,Lm16;
      then [x,y] in [:X,Z:] by A4,Lm16;
      hence thesis by A5,XBOOLE_0:def 5;
    end;
    assume
A6: [x,y] in [:X, Z:] \ [:Y, Z:];
    then
A7: [x,y] in [:X, Z:] by XBOOLE_0:def 5;
    then
A8: y in Z by Lm16;
    not [x,y] in [:Y, Z:] by A6,XBOOLE_0:def 5;
    then
A9: not (x in Y & y in Z) by Lm16;
    x in X by A7,Lm16;
    then x in X \ Y by A7,A9,Lm16,XBOOLE_0:def 5;
    hence thesis by A8,Lm16;
  end;
  [:X, Z:] \ [:Y, Z:] c= [:X, Z:] by XBOOLE_1:36;
  hence
A10: [:X \ Y, Z:] = [:X, Z:] \ [:Y, Z:] by A1,Lm17;
A11: for y,x holds [y,x] in [:Z, X \ Y:] iff [y,x] in [:Z, X:] \ [:Z, Y:]
  proof
    let y,x;
A12: [x,y]in[:X, Z:]& not[x,y]in[:Y,Z:] iff [y,x]in[:Z,X:]& not[y,x]in[:Z,
    Y :] by Th87;
    [y,x] in [:Z, X \ Y:] iff [x,y] in [:X \ Y, Z:] by Th87;
    hence thesis by A10,A12,XBOOLE_0:def 5;
  end;
  [:Z, X:] \ [:Z, Y:] c= [:Z, X:] by XBOOLE_1:36;
  hence thesis by A11,Lm17;
end;
