reserve R for Ring,
  V for RightMod of R,
  W,W1,W2,W3 for Submodule of V,
  u,u1, u2,v,v1,v2 for Vector of V,
  x,y,y1,y2 for object;

theorem Th6:
  W1 + (W2 + W3) = (W1 + W2) + W3
proof
  set A = {v + u : v in W1 & u in W2};
  set B = {v + u : v in W2 & u in W3};
  set C = {v + u : v in W1 + W2 & u in W3};
  set D = {v + u : v in W1 & u in W2 + W3};
A1: the carrier of W1 + (W2 + W3) = D by Def1;
A2: C c= D
  proof
    let x be object;
    assume x in C;
    then consider u,v such that
A3: x = v + u and
A4: v in W1 + W2 and
A5: u in W3;
    v in the carrier of W1 + W2 by A4;
    then v in A by Def1;
    then consider u2,u1 such that
A6: v = u1 + u2 and
A7: u1 in W1 and
A8: u2 in W2;
    u2 + u in B by A5,A8;
    then u2 + u in the carrier of W2 + W3 by Def1;
    then
A9: u2 + u in W2 + W3;
    v + u =u1 + (u2 + u) by A6,RLVECT_1:def 3;
    hence thesis by A3,A7,A9;
  end;
  D c= C
  proof
    let x be object;
    assume x in D;
    then consider u,v such that
A10: x = v + u and
A11: v in W1 and
A12: u in W2 + W3;
    u in the carrier of W2 + W3 by A12;
    then u in B by Def1;
    then consider u2,u1 such that
A13: u = u1 + u2 and
A14: u1 in W2 and
A15: u2 in W3;
    v + u1 in A by A11,A14;
    then v + u1 in the carrier of W1 + W2 by Def1;
    then
A16: v + u1 in W1 + W2;
    v + u = (v + u1) + u2 by A13,RLVECT_1:def 3;
    hence thesis by A10,A15,A16;
  end;
  then D = C by A2;
  hence thesis by A1,Def1;
end;
