
theorem Th2:
  for V being RealUnitarySpace, A,B being finite Subset of V st the
UNITSTR of V = Lin(A) & B is linearly-independent holds card B <= card A & ex C
being finite Subset of V st C c= A & card C = card A - card B & the UNITSTR of
  V = Lin(B \/ C)
proof
  let V be RealUnitarySpace;
  defpred P[Nat] means for n being Element of NAT for A, B being
finite Subset of V st card(A) = n & card(B) = $1 & the UNITSTR of V = Lin(A) &
B is linearly-independent holds $1 <= n & ex C being finite Subset of V st C c=
  A & card(C) = n - $1 & the UNITSTR of V = Lin(B \/ C);
A1: for m being Nat st P[m] holds P[m + 1]
  proof
    let m be Nat such that
A2: P[m];
    let n be Element of NAT;
    let A, B be finite Subset of V such that
A3: card(A) = n and
A4: card(B) = m + 1 and
A5: the UNITSTR of V = Lin(A) and
A6: B is linearly-independent;
    consider v being object such that
A7: v in B by A4,CARD_1:27,XBOOLE_0:def 1;
    reconsider v as VECTOR of V by A7;
    set Bv = B \ {v};
A8: Bv is linearly-independent by A6,RLVECT_3:5,XBOOLE_1:36;
    {v} is Subset of B by A7,SUBSET_1:41;
    then
A9: card(B \ {v}) = card(B) - card({v}) by CARD_2:44
      .= m + 1 - 1 by A4,CARD_1:30
      .= m;
    then consider C being finite Subset of V such that
A10: C c= A and
A11: card(C) = n - m and
A12: the UNITSTR of V = Lin(Bv \/ C) by A2,A3,A5,A8;
A13: not v in Lin(Bv) by A6,A7,RUSUB_3:25;
A14: now
      assume m = n;
      then consider C being finite Subset of V such that
      C c= A and
A15:  card(C) = m - m and
A16:  the UNITSTR of V = Lin(Bv \/ C) by A2,A3,A5,A9,A8;
      C = {} by A15;
      then Bv is Basis of V by A8,A16,RUSUB_3:def 2;
      hence contradiction by A13,RUSUB_3:21;
    end;
    v in Lin(Bv \/ C) by A12;
    then consider w being VECTOR of V such that
A17: w in C and
A18: w in Lin(C \/ Bv \ {w} \/ {v}) by A13,Th1;
    set Cw = C \ {w};
    (Bv \ {w}) \/ {v} c= Bv \/ {v} by XBOOLE_1:9,36;
    then Cw \/ ((Bv \ {w}) \/ {v}) c= Cw \/ (Bv \/ {v}) by XBOOLE_1:9;
    then
A19: Cw \/ ((Bv \ {w}) \/ {v}) c= B \/ Cw by A7,Lm1;
    {w} is Subset of C by A17,SUBSET_1:41;
    then
A20: card(Cw) = card(C) - card({w}) by CARD_2:44
      .= n - m - 1 by A11,CARD_1:30
      .= n - (m + 1);
    Cw c= C by XBOOLE_1:36;
    then
A21: Cw c= A by A10;
    C \/ Bv \ {w} \/ {v} = (Cw \/ (Bv \ {w})) \/ {v} by XBOOLE_1:42
      .= Cw \/ ((Bv \ {w}) \/ {v}) by XBOOLE_1:4;
    then Lin(C \/ Bv \ {w} \/ {v}) is Subspace of Lin(B \/ Cw) by A19,RUSUB_3:7
;
    then
A22: w in Lin(B \/ Cw) by A18,RUSUB_1:1;
A23: Bv c= B & C = Cw \/ {w} by A17,Lm1,XBOOLE_1:36;
    now
      let x be object;
      assume x in Bv \/ C;
      then x in Bv or x in C by XBOOLE_0:def 3;
      then x in B or x in Cw or x in {w} by A23,XBOOLE_0:def 3;
      then x in B \/ Cw or x in {w} by XBOOLE_0:def 3;
      then x in Lin(B \/ Cw) or x = w by RUSUB_3:2,TARSKI:def 1;
      hence x in the carrier of Lin(B \/ Cw) by A22;
    end;
    then Bv \/ C c= the carrier of Lin(B \/ Cw);
    then Lin(Bv \/ C) is Subspace of Lin(B \/ Cw) by RUSUB_3:27;
    then
A24: the carrier of Lin(Bv \/ C) c= the carrier of Lin(B \/ Cw) by
RUSUB_1:def 1;
    the carrier of Lin(B \/ Cw) c= the carrier of V by RUSUB_1:def 1;
    then the carrier of Lin(B \/ Cw) = the carrier of V by A12,A24;
    then
A25: the UNITSTR of V = Lin(B \/ Cw) by A12,RUSUB_1:24;
    m <= n by A2,A3,A5,A9,A8;
    then m < n by A14,XXREAL_0:1;
    hence thesis by A21,A20,A25,NAT_1:13;
  end;
A26: P[0]
  proof
    let n be Element of NAT;
    let A, B be finite Subset of V such that
A27: card(A) = n and
A28: card(B) = 0 and
A29: the UNITSTR of V = Lin(A) and
    B is linearly-independent;
    B = {} by A28;
    then A = B \/ A;
    hence thesis by A27,A29;
  end;
A30: for m being Nat holds P[m] from NAT_1:sch 2(A26, A1);
  let A, B be finite Subset of V;
  assume the UNITSTR of V = Lin(A) & B is linearly-independent;
  hence thesis by A30;
end;
