reserve D for non empty set,
  i,j,k for Nat,
  n,m for Nat,
  r for Real,
  e for real-valued FinSequence;

theorem Th44:
  for x,y being FinSequence of REAL,M being Matrix of REAL st len
x = len M & len y = width M & len y>0 holds |(x,M*y)| = SumAll QuadraticForm(x,
  M,y)
proof
  let x,y be FinSequence of REAL,M be Matrix of REAL;
  set Z=QuadraticForm(x,M,y);
  assume that
A1: len x = len M and
A2: len y = width M and
A3: len y>0;
A4: width Z = len y by A1,A2,Def4;
A5: len LineSum Z = len Z by Th20;
  len(M*y) = len x by A1,A2,A3,MATRIXR1:61;
  then
A6: len mlt(x,M*y) = len x by Th30
    .= len LineSum Z by A1,A2,A5,Def4;
  for i be Nat st 1<=i & i<=len (LineSum Z) holds (LineSum Z).i = (mlt(x,M
  *y)).i
  proof
    let i be Nat;
    assume that
A7: 1<=i and
A8: i<=len LineSum Z;
A9: i in Seg len LineSum Z by A7,A8;
    then
A10: i in Seg len M by A1,A2,A5,Def4;
    then
A11: i in Seg len (M*y) by A2,A3,MATRIXR1:61;
A12: len(Line(M,i))=len y by A2,MATRIX_0:def 7;
A13: i<=len M by A10,FINSEQ_1:1;
A14: for j be Nat st 1<=j & j<=len (Line(Z,i)) holds ((x.i)*(mlt(Line(M,i)
    ,y))).j = (Line(Z,i)).j
    proof
      let j be Nat such that
A15:  1<=j and
A16:  j<=len Line(Z,i);
      j<=width M by A2,A4,A16,MATRIX_0:def 7;
      then
A17:  [i,j] in Indices M by A7,A13,A15,MATRIXC1:1;
      j in Seg len Line(Z,i) by A15,A16;
      then
A18:  j in Seg width Z by MATRIX_0:def 7;
      thus ((x.i)*(mlt(Line(M,i),y))).j =(x.i)*((mlt(Line(M,i),y)).j) by
RVSUM_1:44
        .=(x.i)*((Line(M,i)).j*y.j) by RVSUM_1:59
        .=(x.i)*(M*(i,j)*y.j) by A2,A4,A18,MATRIX_0:def 7
        .=(x.i)*(M*(i,j))*(y.j)
        .=Z*(i,j) by A1,A2,A17,Def4
        .=(Line(Z,i)).j by A18,MATRIX_0:def 7;
    end;
A19: len Line(Z,i) = len y by A4,MATRIX_0:def 7;
    len mlt(Line(M,i),y) = len y by A12,Th30;
    then len ((x.i)*(mlt(Line(M,i),y))) =len Line(Z,i) by A19,RVSUM_1:117;
    then
A20: (x.i)*(mlt(Line(M,i),y)) = Line(Z,i) by A14;
    (mlt(x,M*y)).i = (x.i)*((M*y).i) by RVSUM_1:59
      .=(x.i)*(Line(M,i) "*" y) by A2,A3,A11,Th41
      .=Sum((x.i)*(mlt(Line(M,i),y))) by RVSUM_1:87;
    hence thesis by A5,A9,A20,Th20;
  end;
  hence thesis by A6,FINSEQ_1:14;
end;
