
theorem Th35:
  for V being RealUnitarySpace, v1,v2,v3 being VECTOR of V, x
being set holds x in Lin{v1,v2,v3} iff ex a,b,c being Real st x = a * v1 + b *
  v2 + c * v3
proof
  let V be RealUnitarySpace;
  let v1,v2,v3 be VECTOR of V;
  let x be set;
  thus x in Lin{v1,v2,v3} implies ex a,b,c being Real st x = a * v1 + b * v2 +
  c * v3
  proof
    assume
A1: x in Lin{v1,v2,v3};
    now
      per cases;
      suppose
A2:     v1 <> v2 & v1 <> v3 & v2 <> v3;
        consider l being Linear_Combination of {v1,v2,v3} such that
A3:     x = Sum(l) by A1,Th1;
        x = l.v1 * v1 + l.v2 * v2 + l.v3 * v3 by A2,A3,RLVECT_4:6;
        hence thesis;
      end;
      suppose
        v1 = v2 or v1 = v3 or v2 = v3;
        then
A4:     {v1,v2,v3} = {v1,v3} or {v1,v2,v3} = {v1,v1,v2} or {v1,v2,v3} = {
        v3,v3,v1} by ENUMSET1:30,59;
        now
          per cases by A4,ENUMSET1:30;
          suppose
            {v1,v2,v3} = {v1,v2};
            then consider a,b being Real such that
A5:         x = a * v1 + b * v2 by A1,Th32;
            x = a * v1 + b * v2 + 0.V by A5,RLVECT_1:4
              .= a * v1 + b * v2 + 0 * v3 by RLVECT_1:10;
            hence thesis;
          end;
          suppose
            {v1,v2,v3} = {v1,v3};
            then consider a,b being Real such that
A6:         x = a * v1 + b * v3 by A1,Th32;
            x = a * v1 + 0.V + b * v3 by A6,RLVECT_1:4
              .= a * v1 + 0 * v2 + b * v3 by RLVECT_1:10;
            hence thesis;
          end;
        end;
        hence thesis;
      end;
    end;
    hence thesis;
  end;
  given a,b,c be Real such that
A7: x = a * v1 + b * v2 + c * v3;
  now
    per cases;
    suppose
A8:   v1 = v2 or v1 = v3 or v2 = v3;
      now
        per cases by A8;
        suppose
          v1 = v2;
          then {v1,v2,v3} = {v1,v3} & x = (a + b) * v1 + c * v3 by A7,
ENUMSET1:30,RLVECT_1:def 6;
          hence thesis by Th32;
        end;
        suppose
A9:       v1 = v3;
          then
A10:      {v1,v2,v3} = {v1,v1,v2} by ENUMSET1:57
            .= {v2,v1} by ENUMSET1:30;
          x = b * v2 + (a * v1 + c * v1) by A7,A9,RLVECT_1:def 3
            .= b * v2 + (a + c) * v1 by RLVECT_1:def 6;
          hence thesis by A10,Th32;
        end;
        suppose
A11:      v2 = v3;
          then
A12:      {v1,v2,v3} = {v2,v2,v1} by ENUMSET1:59
            .= {v1,v2} by ENUMSET1:30;
          x = a * v1 + (b * v2 + c * v2) by A7,A11,RLVECT_1:def 3
            .= a * v1 + (b + c) * v2 by RLVECT_1:def 6;
          hence thesis by A12,Th32;
        end;
      end;
      hence thesis;
    end;
    suppose
A13:  v1 <> v2 & v1 <> v3 & v2 <> v3;
      deffunc F(set)=In(0,REAL);
A14:  v1 <> v3 by A13;
A15:  v2 <> v3 by A13;
A16:  v1 <> v2 by A13;
  reconsider a,b,c as Element of REAL by XREAL_0:def 1;
      consider f being Function of the carrier of V,REAL such that
A17:  f.v1 = a & f.v2 = b & f.v3 = c and
A18:  for v being VECTOR of V st v <> v1 & v <> v2 & v <> v3 holds f.
      v = F(v) from RLVECT_4:sch 1 (A16,A14,A15);
      reconsider f as Element of Funcs(the carrier of V,REAL) by FUNCT_2:8;
      now
        let v be VECTOR of V;
        assume
A19:    not v in {v1,v2,v3};
        then
A20:    v <> v3 by ENUMSET1:def 1;
        v <> v1 & v <> v2 by A19,ENUMSET1:def 1;
        hence f.v = 0 by A18,A20;
      end;
      then reconsider f as Linear_Combination of V by RLVECT_2:def 3;
      Carrier f c= {v1,v2,v3}
      proof
        let x be object;
        assume that
A21:    x in Carrier f and
A22:    not x in {v1,v2,v3};
A23:    x <> v3 by A22,ENUMSET1:def 1;
        x <> v1 & x <> v2 by A22,ENUMSET1:def 1;
        then f.x = 0 by A18,A21,A23;
        hence thesis by A21,RLVECT_2:19;
      end;
      then reconsider f as Linear_Combination of {v1,v2,v3} by RLVECT_2:def 6;
      x = Sum(f) by A7,A13,A17,RLVECT_4:6;
      hence thesis by Th1;
    end;
  end;
  hence thesis;
end;
