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

theorem Th22:
  for M be Matrix of REAL holds ColSum M = LineSum(M@)
proof
  let M be Matrix of REAL;
A1: len ColSum M=width M by Def2;
A2: len (LineSum(M@))=len (M@) by Th20;
A3: now
    let i be Nat;
    assume that
A4: 1 <= i and
A5: i <= len ColSum M;
    i <= len LineSum(M@) by A2,A1,A5,MATRIX_0:def 6;
    then i in Seg len LineSum(M@) by A4;
    then
A6: i in Seg len (M@) by Th20;
A7: i in Seg width M by A1,A4,A5;
    hence (ColSum M).i = Sum Col(M,i) by Def2
      .= Sum (Line(M@,i)) by A7,MATRIX_0:59
      .= (LineSum(M@)).i by A6,Th20;
  end;
  len ColSum M=len LineSum(M@) by A2,A1,MATRIX_0:def 6;
  hence thesis by A3;
end;
