 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 LmSumModX:
  for V being torsion-free Z_Module, W being finite-rank free Subspace of V,
  v being Vector of V
  st v <> 0.V & W /\ Lin{v} <> (0).V holds
  W + Lin{v} is free
  proof
    let V be torsion-free Z_Module;
    defpred P[Nat] means for W being finite-rank free Subspace of V,
    v being Vector of V st v <> 0.V & W /\ Lin{v} <> (0).V
    & rank(W) = $1 + 1 holds W + Lin{v} is free;
    A1: P[0]
    proof
      let W be finite-rank free Subspace of V, v be Vector of V such that
      B1: v <> 0.V & W /\ Lin{v} <> (0).V and
      B2: rank(W) = 0 + 1;
      ex x being Vector of V st x <> 0.V & W + Lin{v} = Lin{x}
      proof
        consider w be Vector of W such that
        C1: w <> 0.W & (Omega).W = Lin{w} by ZMODUL05:5,B2;
        reconsider wv = w as Vector of V by ZMODUL01:25;
        C2: (Omega).W = Lin{wv} by C1,ZMODUL03:20;
        C3: (Omega).Lin{v} = Lin{v};
        then C4: W + Lin{v} = Lin{wv} + Lin{v} by C2,ZMODUL04:22;
        C5: Lin{wv} /\ Lin{v} <> (0).V by B1,C2,C3,ZMODUL04:23;
        wv <> 0.V by C1,ZMODUL01:26;
        hence thesis by B1,C4,C5,LmSumMod2;
      end;
      then consider x being Vector of V such that
      B3: x <> 0.V & W + Lin{v} = Lin{x};
      thus thesis by B3;
    end;
    A2: for n being Nat st P[n] holds P[n+1]
    proof
      let n be Nat such that
      B1: P[n];
      let W be finite-rank free Subspace of V, v be Vector of V such that
      B2: v <> 0.V & W /\ Lin{v} <> (0).V & rank(W) = (n+1) + 1;
      set I = the Basis of W;
      B3: card(I) = n+2 by B2,ZMODUL03:def 5;
      then I <> {}(the carrier of W);
      then consider w be object such that
      B4: w in I by XBOOLE_0:7;
      reconsider w as Vector of W by B4;
      B5: W is_the_direct_sum_of Lin(I \ {w}),Lin{w} by B4,ZMODUL04:33;
      I c= the carrier of W & the carrier of W c= the carrier of V
      by VECTSP_4:def 2;
      then I c= the carrier of V;
      then reconsider IV = I as finite Subset of V;
      reconsider wv = w as Vector of V by ZMODUL01:25;
      B6: Lin(I \ {w}) = Lin(IV \ {wv}) by ZMODUL03:20;
      B7: Lin{w} = Lin{wv} by ZMODUL03:20;
      then reconsider WLinIw = Lin(I \ {w}), WLinw = Lin{w}
      as Subspace of Lin(IV \ {wv}) + Lin{wv} by B6,ZMODUL01:97;
      B8: Lin(IV \ {wv}) /\ Lin{wv} = (0).V
      proof
        C1: for x being object holds
        x in Lin(IV \ {wv}) /\ Lin{wv} implies x in (0).V
        proof
          let x be object;
          assume D1: x in Lin(IV \ {wv}) /\ Lin{wv};
          D2: Lin(I \ {w}) /\ Lin{w} = (0).V by ZMODUL01:51,B5;
          x in Lin(I \ {w}) & x in Lin{w} by B6,B7,D1,ZMODUL01:94;
          hence thesis by D2,ZMODUL01:94;
        end;
        for x being object holds
        x in (0).V implies x in Lin(IV \ {wv}) /\ Lin{wv}
        proof
          let x be object;
          assume x in (0).V;
          then x = 0.V by ZMODUL02:66;
          hence thesis by ZMODUL01:33;
        end;
        then for x being Vector of V holds
        x in Lin(IV \ {wv}) /\ Lin{wv} iff x in (0).V by C1;
        hence thesis by ZMODUL01:46;
      end;
      I is linearly-independent by VECTSP_7:def 3;
      then I \ {w} is linearly-independent by XBOOLE_1:36,ZMODUL02:56;
      then B9: IV \ {wv} is linearly-independent by ZMODUL03:15;
      reconsider LinIw = Lin(IV \ {wv}) as finite-rank free Subspace of V
      by B9;
      reconsider IVwv = IV \ {wv} as Subset of Lin(IV \ {wv}) by ThLin4;
      (Omega).Lin(IV \ {wv}) = Lin(IVwv) by ZMODUL03:20;
      then B11: IVwv is Basis of LinIw by VECTSP_7:def 3,B9,ZMODUL03:16;
      B12: card(I \ {w}) = card(I) - card{w} by B4,ZFMISC_1:31,CARD_2:44
      .= (n+2) - 1 by B3,CARD_1:30
      .= n+1;
      B13: rank(LinIw) = n+1 by B12,B11,ZMODUL03:def 5;
      B15: Lin(IV \ {wv}) + Lin{v} is free
      proof
        per cases;
        suppose Lin(IV \ {wv}) /\ Lin{v} = (0).V;
          hence thesis by B9,ZMODUL04:31;
        end;
        suppose Lin(IV \ {wv}) /\ Lin{v} <> (0).V;
          hence thesis by B1,B2,B13;
        end;
      end;
      B16: (Lin(IV \ {wv}) + Lin{v}) + Lin{wv} is free
      proof
        per cases;
        suppose (Lin(IV \ {wv}) + Lin{v}) /\ Lin{wv} = (0).V;
          hence thesis by B15,ZMODUL04:31;
        end;
        suppose C1: (Lin(IV \ {wv}) + Lin{v}) /\ Lin{wv} <> (0).V;
          I is linearly-independent by VECTSP_7:def 3;
          then {w} is linearly-independent by B4,ZFMISC_1:31,ZMODUL02:56;
          then {wv} is linearly-independent by ZMODUL03:15;
          then C3: wv <> 0.V;
          per cases;
          suppose Lin{v} /\ Lin{wv} <> (0).V;
            then consider wx be Vector of V such that
            D1: wx <> 0.V & Lin{v} + Lin{wv} = Lin{wx} by B2,C3,LmSumMod2;
            Lin(IV \ {wv}) + Lin{wx} is free
            proof
              per cases;
              suppose Lin(IV \ {wv}) /\ Lin{wx} = (0).V;
                hence thesis by B9,ZMODUL04:31;
              end;
              suppose Lin(IV \ {wv}) /\ Lin{wx} <> (0).V;
                hence thesis by B1,B13,D1;
              end;
            end;
            hence thesis by D1,ZMODUL01:96;
          end;
          suppose Lin{v} /\ Lin{wv} = (0).V;
            then consider w1, w2 be Vector of V such that
            D2: w1 <> 0.V & w2 <> 0.V &
            (LinIw + Lin{v}) + Lin{wv} = (LinIw + Lin{w1}) + Lin{w2} &
            LinIw /\ Lin{w1} <> (0).V &
            (LinIw + Lin{w1}) /\ Lin{w2} = (0).V &
            v in Lin{w1} + Lin{w2} & wv in Lin{w1} + Lin{w2} &
            w1 in Lin{v} + Lin{wv} & w2 in Lin{v} + Lin{wv}
            by B2,B8,C1,C3,LmSumMod3;
            Lin(IV \ {wv}) + Lin{w1} is free by B1,B13,D2;
            hence thesis by D2,ZMODUL04:31;
          end;
        end;
      end;
      B17: (Omega).W = Lin(IV \ {wv}) + Lin{wv}
      proof
        for x being object holds
        x in (Omega).W iff x in Lin(IV \ {wv}) + Lin{wv}
        proof
          let x be object;
          hereby
            assume x in (Omega).W;
            then consider xx1, xx2 be Vector of W such that
            C2: xx1 in Lin(I \ {w}) & xx2 in Lin{w} & x = xx1 + xx2
            by ZMODUL01:92,B5;
            reconsider x1 = xx1, x2 = xx2 as Vector of V by ZMODUL01:25;
            C3: x1 in Lin(IV \ {wv}) & x2 in Lin{wv} by C2,ZMODUL03:20;
            x = x1 + x2 by C2,ZMODUL01:28;
            hence x in Lin(IV \ {wv}) + Lin{wv} by C3,ZMODUL01:92;
          end;
          assume x in Lin(IV \ {wv}) + Lin{wv};
          then consider x1, x2 be Vector of V such that
          C2: x1 in Lin(IV \ {wv}) & x2 in Lin{wv} & x = x1 + x2
          by ZMODUL01:92;
          C3: x1 in Lin(I \ {w}) & x2 in Lin{w} by C2,ZMODUL03:20;
          Lin(I \ {w}) is Subspace of Lin(I \ {w}) + Lin{w} by ZMODUL01:97;
          then C4: x1 in Lin(I \ {w}) + Lin{w} by C3,ZMODUL01:24;
          Lin{w} is Subspace of Lin(I \ {w}) + Lin{w} by ZMODUL01:97;
          then x2 in Lin(I \ {w}) + Lin{w} by C3,ZMODUL01:24;
          then reconsider xx1 = x1, xx2 = x2 as Vector of W by B5,C4;
          x = xx1 + xx2 by C2,ZMODUL01:28;
          hence x in (Omega).W;
        end;
        then CX1: for x being Vector of V holds
        x in (Omega).W iff x in Lin(IV \ {wv}) + Lin{wv};
        reconsider Wo = (Omega).W as Subspace of V by ZMODUL01:42;
        Wo = Lin(IV \ {wv}) + Lin{wv} by CX1,ZMODUL01:46;
        hence thesis;
      end;
      reconsider Ws = (Omega).W as strict Subspace of V by ZMODUL01:42;
      reconsider Linvs = (Omega).Lin{v} as strict Subspace of V;
      (Lin(IV \ {wv}) + Lin{v}) + Lin{wv} = Ws + Linvs by B17,ZMODUL01:96
      .= W + Lin{v} by ZMODUL04:22;
      hence thesis by B16;
    end;
    A3: for n being Nat holds P[n] from NAT_1:sch 2(A1,A2);
    let W be finite-rank free Subspace of V, v be Vector of V such that
    A4: v <> 0.V & W /\ Lin{v} <> (0).V;
    set rk = rank(W);
    rk-1 is Nat
    proof
      assume not rk - 1 is Nat;
      then rk = 0;
      then B1: (Omega).W = (0).W by ZMODUL05:1
      .= (0).V by ZMODUL01:51;
      (Omega).Lin{v} = Lin{v};
      then W /\ Lin{v} = (0).V /\ Lin{v} by B1,ZMODUL04:23
      .= (0).V by ZMODUL01:107;
      hence contradiction by A4;
    end;
    then reconsider rk1 = rk-1 as Nat;
    P[rk1] by A3;
    hence thesis by A4;
  end;
