
theorem canlinsurj3:
for F being Field
for U being non trivial finite-dimensional VectSp of F
for V being finite-dimensional VectSp of F
for B being Basis of U
for f being Function of B,V
for l2 being Linear_Combination of (rng f)
ex l1 being Linear_Combination of B st (canLinTrans f).(Sum l1) = Sum l2
proof
let F be Field, U be non trivial finite-dimensional VectSp of F;
let V be finite-dimensional VectSp of F, B be Basis of U;
let f be Function of B,V, l2 be Linear_Combination of (rng f);
set T = canLinTrans f;
defpred P[Nat] means
  for l2 being Linear_Combination of (rng f) st card(Carrier l2) = $1
  ex l1 being Linear_Combination of B st (canLinTrans f).(Sum l1) = Sum l2;
IA: P[0]
    proof
    now let l2 be Linear_Combination of (rng f);
    assume card(Carrier l2) = 0;
    then Carrier l2 = {};
    then l2 = ZeroLC(V) by VECTSP_6:def 3;
    then A3: Sum l2 = 0.V by VECTSP_6:15;
    Carrier ZeroLC(U) c= B by VECTSP_6:def 3; then
    reconsider l1 = ZeroLC(U) as Linear_Combination of B by VECTSP_6:def 4;
    Sum l1 = 0.U by VECTSP_6:15; then
    T.(Sum l1) = Sum l2 by A3,RANKNULL:9;
    hence ex l1 being Linear_Combination of B st T.(Sum l1) = Sum l2;
    end;
    hence thesis;
    end;
I1: P[1]
    proof
    now let l2 be Linear_Combination of (rng f);
    assume card(Carrier l2) = 1;
    then consider v being object such that
    A2: Carrier l2 = { v } by CARD_2:42;
    A3: Carrier l2 c= rng f & v in Carrier l2
        by A2,TARSKI:def 1,VECTSP_6:def 4;
    then reconsider v as Element of V;
    consider u being object such that
    A4: u in dom f & f.u = v by A3,FUNCT_1:def 3;
    reconsider u as Element of B by A4;
    A5: T.u = (T|B).u by FUNCT_1:49.= f.u by defcl;
    defpred Q[object,object] means
           ($1 = u & $2 = l2.(f.u)) or ($1 <> u & $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 = u;
           hence ex y being object st y in the carrier of F & Q[x,y];
           end;
         suppose x <> u;
           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;
      H: {u} c= the carrier of U by TARSKI:def 3;
      for v being Element of U st not v in {u} holds l1.v = 0.F
        proof
        let v be Element of U;
        assume not v in {u};
        then v <> u by TARSKI:def 1;
        hence l1.v = 0.F by B5;
        end; then
      reconsider l1 as Linear_Combination of U by H,VECTSP_6:def 1;
      now let o be object;
        assume o in Carrier l1;
        then consider w being Element of U such that
        C1: o = w & l1.w <> 0.F;
        Q[w,l1.w] by B5;
        hence o in {u} by C1,TARSKI:def 1;
        end; then
      B6: Carrier(l1) c= {u};
      now let o be object;
          assume o in Carrier l1;
          then o = u by B6,TARSKI:def 1;
          hence o in B;
          end; then
      Carrier(l1) c= B; then
      reconsider l1 as Linear_Combination of B by VECTSP_6:def 4;
      Carrier l1 = {u}
          proof
          now let o be object;
            assume o in {u}; then
            H: o = u by TARSKI:def 1;
            B9: l1.u = l2.v by A4,B5;
            v in Carrier l2 by A2,TARSKI:def 1; then
            l2.v <> 0.F by VECTSP_6:2;
            hence o in Carrier l1 by H,B9;
            end;
          then {u} c= Carrier l1;
          hence thesis by B6;
          end; then
    T.(Sum l1) = T.(l1.u * u) by VECTSP_6:20
              .= l1.u * T.u by MOD_2:def 2
              .= l2.v * f.u by A5,B5,A4
              .= Sum l2 by A4,A2,VECTSP_6:20;
    hence ex l1 being Linear_Combination of B st T.(Sum l1) = Sum l2;
    end;
    hence thesis;
    end;
IS: now let k be Nat;
    assume IV: P[k];
    now let l2 be Linear_Combination of (rng f);
      assume B1: card(Carrier l2) = k + 1; then
      Carrier l2 <> {}; then
      consider o being object such that
      B2: o in Carrier l2 by XBOOLE_0:def 1;
      consider v being Element of V such that
      B3: o = v & l2.v <> 0.F by B2;
      defpred Q[object,object] means
           ($1 = v & $2 = l2.v) or ($1 <> v & $2 = 0.F);
      B4: for x being object st x in the carrier of V
          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 V;
         per cases;
         suppose x = v;
           hence ex y being object st y in the carrier of F & Q[x,y];
           end;
         suppose x <> v;
           hence ex y being object st y in the carrier of F & Q[x,y];
           end;
         end;
      consider l3 being Function of the carrier of V,the carrier of F such that
      B5: for x being object st x in the carrier of V holds Q[x,l3.x]
          from FUNCT_2:sch 1(B4);
      reconsider l3 as Element of Funcs(the carrier of V, the carrier of F)
         by FUNCT_2:8;
      for w being Element of V st not w in {v} holds l3.w = 0.F
        proof
        let w be Element of V;
        assume not w in {v};
        then v <> w by TARSKI:def 1;
        hence l3.w = 0.F by B5;
        end; then
      reconsider l3 as Linear_Combination of V by VECTSP_6:def 1;
      now let o be object;
        assume o in Carrier l3;
        then consider w being Element of V such that
        C1: o = w & l3.w <> 0.F;
        w = v by C1,B5;
        hence o in {v} by C1,TARSKI:def 1;
        end; then
      B6: Carrier(l3) c= {v};
      now let o be object;
          assume o in Carrier l3; then
          o = v by B6,TARSKI:def 1; then
          C1: o in Carrier l2 by B3;
          Carrier l2 c= rng f by VECTSP_6:def 4;
          hence o in rng f by C1;
          end; then
      Carrier(l3) c= rng f; then
      reconsider l3 as Linear_Combination of rng f by VECTSP_6:def 4;
      B8: Carrier l3 = {v}
          proof
          now let o be object;
            assume C1: o in {v};
            then o = v by TARSKI:def 1;
            then l3.o <> 0.F by B5,B3;
            hence o in Carrier l3 by C1;
            end;
          then {v} c= Carrier l3;
          hence thesis by B6;
          end;
      reconsider l4 = l2 - l3 as Linear_Combination of rng f by VECTSP_6:42;
      C0: l4 + l3 = l2 + (-l3 + l3) by VECTSP_6:26
                 .= l2 + (l3 - l3) by VECTSP_6:25
                 .= l2 + ZeroLC(V) by VECTSP_6:43
                 .= l2 by VECTSP_6:27;
      C1: Carrier l4 = (Carrier l2) \ (Carrier l3)
          proof
          C4: now let o be object;
              assume o in Carrier l4;
              then consider w being Element of V such that
              C5: o = w & l4.w <> 0.F;
              C6: now assume C7: v = w;
                  l4.w = l2.w - l3.w by VECTSP_6:40
                      .= l2.w - l2.w by B5,C7;
                  hence contradiction by C5,RLVECT_1:15;
                  end; then
              C7: not w in Carrier(l3) by B8,TARSKI:def 1;
              l4.w = l2.w - l3.w by VECTSP_6:40
                  .= l2.w - 0.F by C6,B5; then
              w in Carrier l2 by C5;
              hence o in Carrier(l2) \ Carrier(l3) by C5,C7,XBOOLE_0:def 5;
              end;
         now let o be object;
           assume o in Carrier(l2) \ Carrier(l3); then
           C5: o in Carrier(l2) & not o in Carrier(l3) by XBOOLE_0:def 5; then
           consider w being Element of V such that
           C6: o = w & l2.w <> 0.F;
           l4.w = l2.w - l3.w by VECTSP_6:40
               .= l2.w - 0.F by C6,C5;
           hence o in Carrier l4 by C6;
           end;
         hence thesis by C4,TARSKI:2;
         end;
      now let o be object;
        assume o in Carrier l3; then
        C4: o = v by B8,TARSKI:def 1;
        v in Carrier(l3) by B8,TARSKI:def 1; then
        C5: l3.v <> 0.F by VECTSP_6:2;
        l2.v = l3.v by B5;
        hence o in Carrier l2 by C4,C5;
        end; then
      Carrier l3 c= Carrier l2; then
      card(Carrier(l2) \ Carrier(l3))
         = card(Carrier l2) - card(Carrier l3) by CARD_2:44
        .= (k + 1) - 1 by B1,B8,CARD_2:42; then
      consider l5 being Linear_Combination of B such that
      C2: T.(Sum l5) = Sum l4 by IV,C1;
      card(Carrier l3) = 1 by B8,CARD_1:30; then
      consider l6 being Linear_Combination of B such that
      C3: T.(Sum l6) = Sum l3 by I1;
      reconsider l1 = l5 + l6 as Linear_Combination of B by VECTSP_6:24;
      Sum l1 = Sum l5 + Sum l6 by VECTSP_6:44; then
      T.(Sum l1) = T.(Sum l5) + T.(Sum l6) by VECTSP_1:def 20
                .= Sum l2 by C0,C2,C3,VECTSP_6:44;
      hence ex l1 being Linear_Combination of B st T.(Sum l1) = Sum l2;
      end;
    hence P[k+1];
    end;
I: for k being Nat holds P[k] from NAT_1:sch 2(IA,IS);
consider n being Nat such that H: card(Carrier l2) = n;
thus thesis by H,I;
end;
