reserve
  j, k, l, n, m, t,i for Nat,
  K for comRing, 
  a for Element of K,
  M,M1,M2 for Matrix of n,m,K,
  pK,qK for FinSequence of K,
  A for Matrix of n,K;

theorem Th16:
  l in Seg width M & n>0 & m>0 & M1 = M@ implies (SXLine(M1,l,a))@
  = SXCol(M,l,a)
proof
  assume that
A1: l in Seg width M and
A2: n>0 and
A3: m>0 and
A4: M1 = M@;
A5: width M = m by A2,MATRIX_0:23;
A6: width SXLine(M1,l,a) = width M1 by Th1;
  len M = n by A2,MATRIX_0:23;
  then
A7: width (M1) = n by A3,A4,A5,MATRIX_0:54;
  then
A8: len (SXLine(M1,l,a)@) = n by A2,A6,MATRIX_0:54;
A9: len SXLine(M1,l,a) = len M1 by Def2;
  len (M1) = m by A3,A4,A5,MATRIX_0:54;
  then width (SXLine(M1,l,a)@) = m by A2,A7,A9,A6,MATRIX_0:54;
  then
A10: (SXLine(M1,l,a)@) is Matrix of n,m,K by A2,A8,MATRIX_0:20;
  then consider M2 being Matrix of n,m,K such that
A11: M2 = (SXLine(M1,l,a))@;
A12: for i,j st i in dom M & j in Seg width M holds (j = l implies M2*(i,j)
  = a*(M*(i,l))) & (j <> l implies M2*(i,j) = M*(i,j))
  proof
    let i,j;
    assume i in dom M & j in Seg width M;
    then
A13: [i,j] in Indices M by ZFMISC_1:87;
    then
A14: [j,i] in Indices M1 by A4,MATRIX_0:def 6;
    then
A15: j in dom M1 & i in Seg width M1 by ZFMISC_1:87;
    dom (SXLine(M1,l,a)) = Seg len SXLine(M1,l,a) by FINSEQ_1:def 3
      .= Seg len M1 by Def2
      .= dom M1 by FINSEQ_1:def 3;
    then
A16: [j,i] in Indices (SXLine(M1,l,a)) by A14,Th1;
    thus j = l implies M2*(i,j) = a*(M*(i,l))
    proof
      assume
A17:  j = l;
      M2*(i,j) = (SXLine(M1,l,a))*(j,i) by A11,A16,MATRIX_0:def 6
        .= a*(M1*(l,i)) by A15,A17,Def2
        .= a*(M*(i,l)) by A4,A13,A17,MATRIX_0:def 6;
      hence thesis;
    end;
    assume
A18: j <> l;
    M2*(i,j) = (SXLine(M1,l,a))*(j,i) by A11,A16,MATRIX_0:def 6
      .= M1*(j,i) by A15,A18,Def2
      .= M*(i,j) by A4,A13,MATRIX_0:def 6;
    hence thesis;
  end;
  for i,j st [i,j] in Indices SXCol(M,l,a) holds SXCol(M,l,a)*(i,j) = ((
  SXLine(M1,l,a))@)*(i,j)
  proof
A19: Indices M = Indices SXCol(M,l,a) by MATRIX_0:26;
    let i,j;
    assume [i,j] in Indices SXCol(M,l,a);
    then
A20: i in dom M & j in Seg width M by A19,ZFMISC_1:87;
    then
A21: j = l implies ((SXLine(M1,l,a))@)*(i,j) = a*(M*(i,l)) by A11,A12;
A22: j <> l implies ((SXLine(M1,l,a))@)*(i,j) = M*(i,j) by A11,A12,A20;
    j = l implies SXCol(M,l,a)*(i,j) = a*(M*(i,l)) by A2,A3,A20,Def5;
    hence thesis by A1,A2,A3,A20,A21,A22,Def5;
  end;
  hence thesis by A10,MATRIX_0:27;
end;
