reserve x,y,z for object,
  i,j,n,m for Nat,
  D for non empty set,
  s,t for FinSequence,
  a,a1,a2,b1,b2,d for Element of D,
  p, p1,p2,q,r for FinSequence of D;
reserve M,M1,M2 for Matrix of D;
reserve f for FinSequence of D;
reserve i,j,i1,j1 for Nat;
reserve k for Nat, G for Matrix of D;
reserve x,y,x1,x2,y1,y2 for object,
  i,j,k,l,n,m for Nat,
  D for non empty set,
  s,s2 for FinSequence,
  a,b,c,d for Element of D,
  q,r for FinSequence of D,
  a9,b9 for Element of D;

theorem Th52:
  for M be Matrix of n,m,D holds for k st k in Seg n holds M.k= Line(M,k)
proof
  let M be Matrix of n,m,D;
  let k;
  assume
A1: k in Seg n;
  len M = n & dom M = Seg len M by Th25,FINSEQ_1:def 3;
  then
A2: M.k in rng M by A1,FUNCT_1:def 3;
  per cases;
  suppose
    n=0;
    hence thesis by A1;
  end;
  suppose
A3: 0 < n;
    consider l such that
A4: for x st x in rng M ex p be FinSequence of D st x = p & len p = l
    by Th9;
    consider p being FinSequence of D such that
A5: M.k = p and
    len p= l by A2,A4;
A6: width M=m by A3,Th23;
A7: for j st j in Seg width M holds p.j = M*(k,j)
    proof
      let j;
      assume j in Seg width M;
      then [k,j] in [:Seg n,Seg m:] by A1,A6,ZFMISC_1:87;
      then [k,j] in Indices M by A3,Th23;
      then ex q being FinSequence of D st q=M.k & M*(k,j)=q.j by Def5;
      hence thesis by A5;
    end;
    len p=width M by A2,A6,A5,Def2;
    hence thesis by A5,A7,Def7;
  end;
end;
