reserve x,y for object, X,Y,Z for set;
reserve a,b for Real;
reserve k for Element of NAT;
reserve V for RealLinearSpace;
reserve W1,W2,W3 for Subspace of V;
reserve v,v1,v2,u for VECTOR of V;
reserve A,B,C for Subset of V;
reserve T for finite Subset of V;
reserve L,L1,L2 for Linear_Combination of V;
reserve l for Linear_Combination of A;
reserve F,G,H for FinSequence of the carrier of V;
reserve f,g for Function of the carrier of V, REAL;
reserve p,q,r for FinSequence;
reserve M for non empty set;
reserve CF for Choice_Function of M;

theorem Th12:
  v1 <> v2 & {v1,v2} is linearly-independent iff v2 <> 0.V & for a
  holds v1 <> a * v2
proof
  thus v1 <> v2 & {v1,v2} is linearly-independent implies v2 <> 0.V & for a
  holds v1 <> a * v2
  proof
    deffunc F(Element of V)=In(0,REAL);
    assume that
A1: v1 <> v2 and
A2: {v1,v2} is linearly-independent;
    thus v2 <> 0.V by A2,Th10;
    let a;
     reconsider aa=a as Element of REAL by XREAL_0:def 1;
    consider f such that
A3: f.v1 = - jj & f.v2 = aa and
A4: for v being Element of V st v <> v1 & v <> v2 holds f.v = F(v)
    from FUNCT_2:sch 7(A1);
    reconsider f as Element of Funcs(the carrier of V, REAL) by FUNCT_2:8;
    now
      let v;
      assume not v in {v1,v2};
      then v <> v1 & v <> v2 by TARSKI:def 2;
      hence f.v = 0 by A4;
    end;
    then reconsider f as Linear_Combination of V by RLVECT_2:def 3;
    Carrier(f) c= {v1,v2}
    proof
      let x be object;
      assume x in Carrier(f);
      then
A5:   ex u st x = u & f.u <> 0;
      assume not x in {v1,v2};
      then x <> v1 & x <> v2 by TARSKI:def 2;
      hence thesis by A4,A5;
    end;
    then reconsider f as Linear_Combination of {v1,v2} by RLVECT_2:def 6;
A6: v1 in Carrier(f) by A3;
    set w = a * v2;
    assume v1 = a * v2;
    then Sum(f) = (- jj) * w + w by A1,A3,RLVECT_2:33
      .= (- w) + w by RLVECT_1:16
      .= - (w - w) by RLVECT_1:33
      .= - 0.V by RLVECT_1:15
      .= 0.V;
    hence thesis by A2,A6;
  end;
  assume
A7: v2 <> 0.V;
  assume
A8: for a holds v1 <> a * v2;
A9: 1 * v2 = v2 by RLVECT_1:def 8;
  hence v1 <> v2 by A8;
  let l be Linear_Combination of {v1,v2};
  assume that
A10: Sum(l) = 0.V and
A11: Carrier(l) <> {};
A12: 0.V = l.v1 * v1 + l.v2 * v2 by A8,A9,A10,RLVECT_2:33;
  set x = the Element of Carrier(l);
  Carrier(l) c= {v1,v2} by RLVECT_2:def 6;
  then
A13: x in {v1,v2} by A11;
  x in Carrier(l) by A11;
  then
A14: ex u st x = u & l.u <> 0;
  now
    per cases by A14,A13,TARSKI:def 2;
    suppose
A15:  l.v1 <> 0;
      0.V = (l.v1)" * (l.v1 * v1 + l.v2 * v2) by A12
        .= (l.v1)" * (l.v1 * v1) + (l.v1)" * (l.v2 * v2) by RLVECT_1:def 5
        .= (l.v1)" * l.v1 * v1 + (l.v1)" * (l.v2 * v2) by RLVECT_1:def 7
        .= (l.v1)" * l.v1 * v1 + (l.v1)" * l.v2 * v2 by RLVECT_1:def 7
        .= 1 * v1 + (l.v1)" * l.v2 * v2 by A15,XCMPLX_0:def 7
        .= v1 + (l.v1)" * l.v2 * v2 by RLVECT_1:def 8;
      then v1 = - ((l.v1)" * l.v2 * v2) by RLVECT_1:6
        .= (- jj) * ((l.v1)" * l.v2 * v2) by RLVECT_1:16
        .= ((- jj) * ((l.v1)" * l.v2)) * v2 by RLVECT_1:def 7;
      hence thesis by A8;
    end;
    suppose
A16:  l.v2 <> 0 & l.v1 = 0;
      0.V = (l.v2)" * (l.v1 * v1 + l.v2 * v2) by A12
        .= (l.v2)" * (l.v1 * v1) + (l.v2)" * (l.v2 * v2) by RLVECT_1:def 5
        .= (l.v2)" * l.v1 * v1 + (l.v2)" * (l.v2 * v2) by RLVECT_1:def 7
        .= (l.v2)" * l.v1 * v1 + (l.v2)" * l.v2 * v2 by RLVECT_1:def 7
        .= (l.v2)" * l.v1 * v1 + 1 * v2 by A16,XCMPLX_0:def 7
        .= 0 * v1 + v2 by A16,RLVECT_1:def 8
        .= 0.V + v2 by RLVECT_1:10
        .= v2;
      hence thesis by A7;
    end;
  end;
  hence thesis;
end;
