 reserve V for Z_Module;
 reserve W for Subspace of V;
 reserve v, u for Vector of V;
 reserve i for Element of INT.Ring;

theorem ThRankDirectSum:
  for V being torsion-free Z_Module,
  W1, W2 being finite-rank free Subspace of V
  st W1 /\ W2 = (0).V holds rank(W1 + W2) = rank W1 + rank W2
  proof
    let V be torsion-free Z_Module,
    W1, W2 be finite-rank free Subspace of V such that
    A1: W1 /\ W2 = (0).V;
    set W = W1 + W2;
    reconsider WW1 = W1, WW2 = W2 as Subspace of W by ZMODUL01:97;
    WW1 /\ WW2 = (0).V by A1,ZMODUL04:2
    .= (0).W by ZMODUL01:51;
    then A3: W is_the_direct_sum_of WW1,WW2 by ZMODUL04:1;
    reconsider WW1, WW2 as finite-rank free Subspace of W;
    set I1 = the Basis of WW1;
    set I2 = the Basis of WW2;
    A4: card(I1) = rank(WW1) by ZMODUL03:def 5;
    I1 /\ I2 = {} by A3,ZMODUL04:27;
    then A7: card(I1 \/ I2) = card(I1) + card(I2) by CARD_2:40,XBOOLE_0:def 7
    .= rank(WW1) + rank(WW2) by ZMODUL03:def 5,A4;
    set I = I1 \/ I2;
    the carrier of WW1 c= the carrier of W by VECTSP_4:def 2;
    then A11: I1 is Subset of W by XBOOLE_1:1;
    the carrier of WW2 c= the carrier of W by VECTSP_4:def 2;
    then I2 is Subset of W by XBOOLE_1:1;
    then reconsider I as Subset of W by A11,XBOOLE_1:8;
    Lin(I) = (Omega).W by A3,ZMODUL04:28;
    then I1 \/ I2 is Basis of W by VECTSP_7:def 3,A3,ZMODUL04:29;
    hence thesis by A7,ZMODUL03:def 5;
  end;
