
theorem lembas1:
for F being Field
for U being VectSp of F
for B being linearly-independent Subset of U
for w being Element of U st w in B
for l being Linear_Combination of B st Sum l = w
holds Carrier l = { w } & l.w = 1.F
proof
let F be Field, U be VectSp of F, B be linearly-independent Subset of U;
let w be Element of U;
assume AS1: w in B;
let l be Linear_Combination of B;
assume AS2: Sum l = w;
defpred Q[object,object] means
           ($1 = w & $2 = 1.F) or ($1 <> w & $2 = 0.F);
      B4: for x being object st x in the carrier of U
          ex y being object st y in the carrier of F & Q[x,y]
         proof
         let x be object;
         assume x in the carrier of U;
         per cases;
         suppose x = w;
           hence ex y being object st y in the carrier of F & Q[x,y];
           end;
         suppose x <> w;
           hence ex y being object st y in the carrier of F & Q[x,y];
           end;
         end;
consider l1 being Function of the carrier of U,the carrier of F such that
B5: for x being object st x in the carrier of U holds Q[x,l1.x]
    from FUNCT_2:sch 1(B4);
reconsider l1 as Element of Funcs(the carrier of U, the carrier of F)
    by FUNCT_2:8;
      for v being Element of U st not v in {w} holds l1.v = 0.F
        proof
        let v be Element of U;
        assume not v in {w};
        then v <> w by TARSKI:def 1;
        hence l1.v = 0.F by B5;
        end; then
      reconsider l1 as Linear_Combination of U by VECTSP_6:def 1;
      now let o be object;
        assume o in Carrier l1;
        then consider v being Element of U such that
        C1: o = v & l1.v <> 0.F;
        v = w & l1.v = 1.F by B5,C1;
        hence o in {w} by C1,TARSKI:def 1;
        end; then
      B6: Carrier(l1) c= {w}; then
      Carrier(l1) c= B by AS1,TARSKI:def 1; then
      reconsider l1 as Linear_Combination of B by VECTSP_6:def 4;
      B8: Carrier l1 = {w}
          proof
          now let o be object;
            assume C1: o in {w};
            then o = w by TARSKI:def 1;
            then l1.o <> 0.F by B5;
            hence o in Carrier l1 by C1;
            end;
          then {w} c= Carrier l1;
          hence thesis by B6;
          end;
B: l1.w = 1.F by B5;
Sum l1 = (l1.w) * w by B8,VECTSP_6:20 .= 1.F * w by B5 .= w;
hence thesis by B8,AS2,B,FIELD_7:6;
end;
