reserve k,t,i,j,m,n for Nat,
  x,y,y1,y2 for object,
  D for non empty set;
reserve K for Field,
  V for VectSp of K,
  a for Element of K,
  W for Element of V;
reserve KL1,KL2,KL3 for Linear_Combination of V,
  X for Subset of V;
reserve s for FinSequence,
  V1,V2,V3 for finite-dimensional VectSp of K,
  f,f1,f2 for Function of V1,V2,
  g for Function of V2,V3,
  b1 for OrdBasis of V1,
  b2 for OrdBasis of V2,
  b3 for OrdBasis of V3,
  v1,v2 for Vector of V2,
  v,w for Element of V1;
reserve p2,F for FinSequence of V1,
  p1,d for FinSequence of K,
  KL for Linear_Combination of V1;

theorem Th37:
  for a,d be FinSequence of K st len a = len b1
  for j be Nat st j in dom b2 & len d = len b1 &
  for k st k in dom b1 holds d.k = (f.((b1/.k)) |-- b2)/.j holds
    len b1 > 0 implies (Sum(lmlt(a,f*b1)) |-- b2)/.j = Sum(mlt(a,d))
proof
  let a,d be FinSequence of K such that
A1: len a = len b1;
  reconsider B3 = f*b1 as FinSequence of V2;
  deffunc V(Nat,Nat) = ((B3/.$1) |-- b2)/.$2;
  consider M being Matrix of len b1,len b2,the carrier of K such that
A2: for i,j st [i,j] in Indices M holds M*(i,j) = V(i,j) from MATRIX_0:
  sch 1;
  deffunc W(Nat) = Sum mlt(a,Col(M,$1));
  consider dd being FinSequence of K such that
A3: len dd = len b2 & for j be Nat st j in dom dd holds dd/.j = W(j)
  from FINSEQ_4:sch 2;
  let j be Nat such that
A4: j in dom b2;
A5: j in dom dd by A4,A3,FINSEQ_3:29;
  assume that
A6: len d = len b1 and
A7: for k st k in dom b1 holds d.k = (f.(b1/.k) |-- b2)/.j;
A8: len Col(M,j) = len M by MATRIX_0:def 8
    .= len d by A6,MATRIX_0:def 2;
  len M = len b1 by MATRIX_0:def 2;
  then
A9: dom M = dom b1 by FINSEQ_3:29;
A10: len b1 = len B3 by FINSEQ_2:33;
  then
A11: dom b1 = dom B3 by FINSEQ_3:29;
  assume
A12: len b1 > 0;
  then
A13: width M = len b2 by MATRIX_0:23;
A14: now
    let i such that
A15: i in dom B3;
A16: now
      let j be Nat;
      assume
A17:  j in dom ((B3/.i) |-- b2);
      then j in Seg len ((B3/.i) |-- b2) by FINSEQ_1:def 3;
      then
A18:  j in Seg width M by A13,Def7;
      then [i,j] in [:dom M,Seg width M:] by A9,A11,A15,ZFMISC_1:87;
      then
A19:  [i,j] in Indices M by MATRIX_0:def 4;
      thus Line(M,i).j = M*(i,j) by A18,MATRIX_0:def 7
        .= ((B3/.i) |-- b2)/.j by A2,A19
        .= ((B3/.i) |-- b2).j by A17,PARTFUN1:def 6;
    end;
A20: len Line(M,i) = width M by MATRIX_0:def 7
      .= len ((B3/.i) |-- b2) by A13,Def7;
    thus B3/.i = Sum lmlt((B3/.i) |-- b2,b2) by Th35
      .= Sum lmlt(Line(M,i),b2) by A20,A16,FINSEQ_2:9;
  end;
  Seg len b2 = dom b2 by FINSEQ_1:def 3;
  then
A21: j in Seg width M by A4,A12,MATRIX_0:23;
A22: now
    let i be Nat;
    assume i in dom d;
    then
A23: i in dom b1 by A6,FINSEQ_3:29;
    then
A24: B3/.i = B3.i by A11,PARTFUN1:def 6
      .= f.(b1.i) by A23,FUNCT_1:13
      .= f.(b1/.i) by A23,PARTFUN1:def 6;
    [i,j] in [:dom M,Seg width M:] by A9,A21,A23,ZFMISC_1:87;
    then
A25: [i,j] in Indices M by MATRIX_0:def 4;
    thus Col(M,j).i = M*(i,j) by A9,A23,MATRIX_0:def 8
      .= (f.((b1/.i)) |-- b2)/.j by A2,A24,A25
      .= d.i by A7,A23;
  end;
  len b2 > 0 by A4,Lm2;
  hence (Sum(lmlt(a,f*b1)) |-- b2)/.j = (Sum(lmlt(dd,b2)) |-- b2)/.j
  by A1,A12,A3,A10,A14,Th33
    .= dd/.j by A3,Th36
    .= Sum(mlt(a,Col(M,j))) by A3,A5
    .= Sum(mlt(a,d)) by A8,A22,FINSEQ_2:9;
end;
