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 Th2:
  for M,M1,i st l in dom M & k in dom M & i in dom M & M1 =
  InterchangeLine(M,l,k) holds (i = l implies Line(M1,i) = Line(M,k)) & (i = k
implies Line(M1,i) = Line(M,l)) & (i <> l & i <> k implies Line(M1,i) = Line(M,
  i))
proof
  let M,M1,i;
  assume that
A1: l in dom M and
A2: k in dom M and
A3: i in dom M and
A4: M1 = InterchangeLine(M,l,k);
  thus i = l implies Line(M1,i) = Line(M,k)
  proof
A5: width M1 = width M by Th1;
A6: len Line(M1,i) = width M1 by MATRIX_0:def 7;
    assume
A7: i=l;
A8: now
      let j be Nat such that
A9:   1 <=j & j <= len Line(M1,i);
A10:  j in Seg width M1 by A6,A9;
      hence Line(M1,i).j = M1*(i,j) by MATRIX_0:def 7
        .= M*(k,j) by A1,A4,A7,A5,A10,Def1
        .= Line(M,k).j by A5,A10,MATRIX_0:def 7;
    end;
    len Line(M,k) = width M by MATRIX_0:def 7;
    hence thesis by A6,A8,Th1;
  end;
  thus i = k implies Line(M1,i) = Line(M,l)
  proof
A11: width M1 = width M by Th1;
A12: len Line(M1,i) = width M1 by MATRIX_0:def 7;
    assume
A13: i = k;
A14: now
      let j be Nat such that
A15:  1 <=j & j <= len Line(M1,i);
A16:  j in Seg width M1 by A12,A15;
      hence Line(M1,i).j = M1*(i,j) by MATRIX_0:def 7
        .= M*(l,j) by A2,A4,A13,A11,A16,Def1
        .= Line(M,l).j by A11,A16,MATRIX_0:def 7;
    end;
    len Line(M,l) = width M by MATRIX_0:def 7
    .= width M1 by A11
    .= len Line(M1,i) by A12;
    hence thesis by A14;
  end;
  thus i <> l & i <> k implies Line(M1,i) = Line(M,i)
  proof
A17: width M1 = width M by Th1;
A18: len Line(M1,i) = width M1 by MATRIX_0:def 7;
    assume
A19: i <> l & i <> k;
A20: now
      let j be Nat such that
A21:  1 <=j & j <= len Line(M1,i);
A22:  j in Seg width M1 by A18,A21;
      hence Line(M1,i).j = M1*(i,j) by MATRIX_0:def 7
        .= M*(i,j) by A3,A4,A19,A17,A22,Def1
        .= Line(M,i).j by A17,A22,MATRIX_0:def 7;
    end;
    len Line(M,i) = width M by MATRIX_0:def 7;
    hence thesis by A18,A20,Th1;
  end;
end;
