
theorem Th1:
  for V being RealUnitarySpace, A,B being finite Subset of V, v
being VECTOR of V st v in Lin(A \/ B) & not v in Lin(B) holds ex w being VECTOR
  of V st w in A & w in Lin(A \/ B \ {w} \/ {v})
proof
  let V be RealUnitarySpace;
  let A, B be finite Subset of V;
  let v be VECTOR of V such that
A1: v in Lin(A \/ B) and
A2: not v in Lin(B);
  consider L being Linear_Combination of (A \/ B) such that
A3: v = Sum(L) by A1,RUSUB_3:1;
  v in {v} by TARSKI:def 1;
  then v in Lin({v}) by RUSUB_3:2;
  then consider Lv being Linear_Combination of {v} such that
A4: v = Sum(Lv) by RUSUB_3:1;
A5: Carrier(L) c= A \/ B by RLVECT_2:def 6;
  now
    assume
A6: for w being VECTOR of V st w in A holds L.w = 0;
    now
      let x be object;
      assume that
A7:   x in Carrier(L) and
A8:   x in A;
      ex u being VECTOR of V st x = u & L.u <> 0 by A7,RLVECT_5:3;
      hence contradiction by A6,A8;
    end;
    then Carrier(L) misses A by XBOOLE_0:3;
    then Carrier(L) c= B by A5,XBOOLE_1:73;
    then L is Linear_Combination of B by RLVECT_2:def 6;
    hence contradiction by A2,A3,RUSUB_3:1;
  end;
  then consider w being VECTOR of V such that
A9: w in A and
A10: L.w <> 0;
  consider F being FinSequence of the carrier of V such that
A11: F is one-to-one and
A12: rng F = Carrier(L) and
A13: Sum(L) = Sum(L (#) F) by RLVECT_2:def 8;
A14: w in rng F by A10,A12,RLVECT_5:3;
  then reconsider Fw1 = (F -| w) as FinSequence of the carrier of V by
FINSEQ_4:41;
  reconsider Fw2 = (F |-- w) as FinSequence of the carrier of V by A14,
FINSEQ_4:50;
A15: rng Fw1 misses rng Fw2 by A11,A14,FINSEQ_4:57;
  set Fw = Fw1 ^ Fw2;
  consider K being Linear_Combination of V such that
A16: Carrier(K) = rng Fw /\ Carrier(L) and
A17: L (#) Fw = K (#) Fw by RLVECT_5:7;
  F just_once_values w by A11,A14,FINSEQ_4:8;
  then Fw = F - {w} by FINSEQ_4:54;
  then
A18: rng Fw = Carrier(L) \ {w} by A12,FINSEQ_3:65;
  then
A19: Carrier(K) = rng Fw by A16,XBOOLE_1:28,36;
  then
A20: Carrier(K) c= A \/ B \ {w} by A5,A18,XBOOLE_1:33;
  take w;
  set a = L.w;
A21: a" <> 0 by A10,XCMPLX_1:202;
  F = (F -| w) ^ <* w *> ^ (F |-- w) by A14,FINSEQ_4:51;
  then F = Fw1 ^ (<* w *> ^ Fw2) by FINSEQ_1:32;
  then L (#) F = (L (#) Fw1) ^ (L (#) (<* w *> ^ Fw2)) by RLVECT_3:34
    .= (L (#) Fw1) ^ ((L (#) <* w *>) ^ (L (#) Fw2)) by RLVECT_3:34
    .= (L (#) Fw1) ^ (L (#) <* w *>) ^ (L (#) Fw2) by FINSEQ_1:32
    .= (L (#) Fw1) ^ <* a*w *> ^ (L (#) Fw2) by RLVECT_2:26;
  then
A22: Sum(L (#) F) = Sum((L (#) Fw1) ^ (<* a*w *> ^ (L (#) Fw2))) by FINSEQ_1:32
    .= Sum(L (#) Fw1) + Sum(<* a*w *> ^ (L (#) Fw2)) by RLVECT_1:41
    .= Sum(L (#) Fw1) + (Sum(<* a*w *>) + Sum(L (#) Fw2)) by RLVECT_1:41
    .= Sum(L (#) Fw1) + (Sum(L (#) Fw2) + a*w) by RLVECT_1:44
    .= (Sum(L (#) Fw1) + Sum(L (#) Fw2)) + a*w by RLVECT_1:def 3
    .= Sum((L (#) Fw1) ^ (L (#) Fw2)) + a*w by RLVECT_1:41
    .= Sum(L (#) (Fw1 ^ Fw2)) + a*w by RLVECT_3:34;
  reconsider K as Linear_Combination of (A \/ B \ {w}) by A20,RLVECT_2:def 6;
  Carrier (-K + Lv) c= Carrier(-K) \/ Carrier(Lv) by RLVECT_2:37;
  then
A23: Carrier (-K + Lv) c= Carrier(K) \/ Carrier(Lv) by RLVECT_2:51;
  set LC = a"*(-K + Lv);
  Carrier(Lv) c= {v} by RLVECT_2:def 6;
  then Carrier(K) \/ Carrier(Lv) c= A \/ B \ {w} \/ {v} by A20,XBOOLE_1:13;
  then Carrier (-K + Lv) c= A \/ B \ {w} \/ {v} by A23;
  then Carrier (LC) c= A \/ B \ {w} \/ {v} by A21,RLVECT_2:42;
  then
A24: LC is Linear_Combination of (A \/ B \ {w} \/ {v}) by RLVECT_2:def 6;
  Fw1 is one-to-one & Fw2 is one-to-one by A11,A14,FINSEQ_4:52,53;
  then Fw is one-to-one by A15,FINSEQ_3:91;
  then Sum(K (#) Fw) = Sum(K) by A19,RLVECT_2:def 8;
  then a"*v = a"*Sum(K) + a"*(a*w) by A3,A13,A22,A17,RLVECT_1:def 5
    .= a"*Sum(K) + (a"*a)*w by RLVECT_1:def 7
    .= a"*Sum(K) +1*w by A10,XCMPLX_0:def 7
    .= a"*Sum(K) + w by RLVECT_1:def 8;
  then w = a"*v - a"*Sum(K) by RLSUB_2:61
    .= a"*(v - Sum(K)) by RLVECT_1:34
    .= a"*(-Sum(K) + v) by RLVECT_1:def 11;
  then w = a"*(Sum(-K) + Sum(Lv)) by A4,RLVECT_3:3
    .= a"*Sum(-K + Lv) by RLVECT_3:1
    .= Sum(a"*(-K + Lv)) by RLVECT_3:2;
  hence thesis by A9,A24,RUSUB_3:1;
end;
