 reserve R for Ring;
 reserve x, y, y1 for set;
 reserve a, b for Element of R;
 reserve V for LeftMod of R;
 reserve v, w for Vector of V;
 reserve u,v,w for Vector of V;
 reserve F,G,H,I for FinSequence of V;
 reserve j,k,n for Nat;
 reserve f,f9,g for sequence of V;
 reserve R for Ring;
 reserve V, X, Y for LeftMod of R;
 reserve u, u1, u2, v, v1, v2 for Vector of V;
 reserve a for Element of R;
 reserve V1, V2, V3 for Subset of V;
 reserve x for set;
 reserve W, W1, W2 for Submodule of V;
 reserve w, w1, w2 for Vector of W;
 reserve D for non empty set;
 reserve d1 for Element of D;
 reserve A for BinOp of D;
 reserve M for Function of [:the carrier of R,D:],D;
reserve B,C for Coset of W;
 reserve V for LeftMod of R;
 reserve W, W1, W2, W3 for Submodule of V;
 reserve u, u1, u2, v, v1, v2 for Vector of V;
 reserve a, a1, a2 for Element of R;
 reserve X, Y, y, y1, y2 for set;
 reserve C for Coset of W;
 reserve C1 for Coset of W1;
 reserve C2 for Coset of W2;

theorem
  V = W1 + W2 & (ex v st for v1,v2,u1,u2 st v1 + v2 = u1 + u2 &
  v1 in W1 & u1 in W1 & v2 in W2 & u2 in W2 holds v1 = u1 & v2 = u2) implies
  V is_the_direct_sum_of W1,W2
  proof
    assume
    A1: V = W1 + W2;
    the carrier of (0).V = {0.V} & (0).V is Submodule of W1 /\ W2
    by Th54,VECTSP_4:def 3; then
    A2: {0.V} c= the carrier of W1 /\ W2 by VECTSP_4:def 2;
    given v such that
    A3: for v1, v2, u1, u2 st v1 + v2 = u1 + u2 & v1 in W1 & u1 in W1 &
    v2 in W2 & u2 in W2 holds v1 = u1 & v2 = u2;
    assume not thesis;
    then the carrier of W1 /\ W2 <> {0.V} by VECTSP_4:def 3,A1;
    then {0.V} c< the carrier of W1 /\ W2 by A2;
    then consider x being object such that
    A4: x in the carrier of W1 /\ W2 and
    A5: not x in {0.V} by XBOOLE_0:6;
    A6: x <> 0.V by A5,TARSKI:def 1;
    A7: x in W1 /\ W2 by A4;
    then x in V by Th24;
    then reconsider u = x as Vector of V;
    consider v1, v2 such that
    A8: v1 in W1 and
    A9: v2 in W2 and
    A10: v = v1 + v2 by A1,Lm17;
    A11: v = v1 + v2 + 0.V by A10,RLVECT_1:4
    .= (v1 + v2) + (u - u) by RLVECT_1:15
    .= ((v1 + v2) + u) - u by RLVECT_1:def 3
    .= ((v1 + u) + v2) - u by RLVECT_1:def 3
    .= (v1 + u) + (v2 - u) by RLVECT_1:def 3;
    x in W2 by A7,Th94;
    then
    A12: v2 - u in W2 by A9,Th39;
    x in W1 by A7,Th94;
    then v1 + u in W1 by A8,Th36;
    then v2 - u = v2 by A3,A8,A9,A10,A11,A12
    .= v2 - 0.V by RLVECT_1:13;
    hence thesis by A6,RLVECT_1:23;
  end;
