
theorem LM03:
  for I be set, Y, Z be ManySortedSet of I st
  (for i, j be object st i in I & j in I &
  i <> j holds Y. i /\ Z.j = {})
  holds Union (Y (\) Z) = (Union Y) \ (Union Z)
proof
  let I be set, Y, Z be ManySortedSet of I;
  set X = Y (\) Z;
  assume
A2: for i, j be object st i in I & j in I & i <> j
  holds  Y.i /\ Z.j = {};
P0: dom X = I by PARTFUN1:def 2;
R0: dom Y = I by PARTFUN1:def 2;
Q0: dom Z = I by PARTFUN1:def 2;
x: for x be object
  holds x in union rng X iff x in (union rng Y) \ (union rng Z)
  proof
    let x be object;
    hereby
      assume x in union rng X; then
      consider K be set such that
S61:  x in K and
S62:  K in rng X by TARSKI:def 4;
      consider i be object such that
S7:   i in dom X and
S71:  K = X.i by FUNCT_1:def 3, S62;
      set W = Y.i;
V1:   X.i = Y.i \ Z.i by PBOOLE:def 6, S7;
S82:  W in rng Y by FUNCT_1:3, R0, S7;
S9:   x in union rng Y by TARSKI:def 4, S71, S61, V1, S82;
      not x in union rng Z
      proof
        assume x in union rng Z;
        then consider L be set such that
S101:   x in L and
S102:   L in rng Z by TARSKI:def 4;
        consider j be object such that
S112:   j in dom Z and
S113:   L = Z.j by S102, FUNCT_1:def 3;
        per cases;
        suppose
          i = j;
          hence contradiction by V1, S61, S71, XBOOLE_0:def 5, S101, S113;
        end;
        suppose i <> j;
          then Y.i /\ Z.j = {} by A2, S7, S112;
          hence contradiction by XBOOLE_0:def 4, S113, S101, S71, S61, V1;
        end;
      end;
      hence x in (union rng Y) \ (union rng Z) by S9, XBOOLE_0:def 5;
    end;
    assume
A03: x in (union rng Y) \ (union rng Z);
    then
A3:  x in (union rng Y) & not x in union rng Z by XBOOLE_0:def 5;
    consider K be set such that
S6:  x in K & K in rng Y by TARSKI:def 4, A03;
    consider i be object such that
S7:  i in dom Y & K=Y.i by S6, FUNCT_1:def 3;
    not x in Z.i
    proof
      assume
S81:  x in Z.i;
      Z.i in rng Z by S7, Q0, FUNCT_1:3;
      hence contradiction by A3, S81, TARSKI:def 4;
    end;
    then
S9:  x in Y.i \ Z.i by S6,S7,XBOOLE_0:def 5;
S10: x in X.i by S7, S9, PBOOLE:def 6;
    X.i in rng X by S7, P0, FUNCT_1:3;
    hence x in union rng X by S10, TARSKI:def 4;
  end;
  Union X = union rng X & Union Y = union rng Y &
  Union Z = union rng Z by CARD_3:def 4;
  hence thesis by x,TARSKI:2;
end;
