reserve x,y for object,X,Y for set,
  D for non empty set,
  i,j,k,l,m,n,m9,n9 for Nat,
  i0,j0,n0,m0 for non zero Nat,
  K for Field,
  a,b for Element of K,
  p for FinSequence of K,
  M for Matrix of n,K;
reserve A for (Matrix of D),
  A9 for Matrix of n9,m9,D,
  M9 for Matrix of n9, m9,K,
  nt,nt1,nt2 for Element of n-tuples_on NAT,
  mt,mt1 for Element of m -tuples_on NAT,
  M for Matrix of K;
reserve P,P1,P2,Q,Q1,Q2 for without_zero finite Subset of NAT;

theorem Th83:
  for M be Matrix of n,K holds the_rank_of M = n iff Det M <> 0.K
proof
  let M be Matrix of n,K;
A1: [:Seg n,Seg n:] c= Indices M by MATRIX_0:24;
A2: len M=n by MATRIX_0:24;
  then
A3: the_rank_of M <= n by Th74;
A4: width M=n by MATRIX_0:24;
  then
A5: M = Segm(M,Seg n,Seg n) by A2,Th46
    .= EqSegm(M,Seg n,Seg n) by Def3;
A6: card Seg n=n by FINSEQ_1:57;
  thus the_rank_of M = n implies Det M <> 0.K
  proof
    assume the_rank_of M = n;
    then consider P,Q such that
A7: [:P,Q:] c= Indices M and
A8: card P = card Q and
A9: card P = n and
A10: Det EqSegm(M,P,Q)<>0.K by Def4;
    P c= Seg n by A2,A7,A8,Th67;
    then
A11: P=Seg n by A6,A9,CARD_2:102;
    Q c= Seg n by A4,A7,A8,Th67;
    then Q=Seg n by A6,A8,A9,CARD_2:102;
    then M = Segm(M,P,Q) by A2,A4,A11,Th46
      .= EqSegm(M,P,Q) by A8,Def3;
    hence thesis by A9,A10;
  end;
  assume Det M <> 0.K;
  then the_rank_of M >= n by A6,A5,A1,Def4;
  hence thesis by A3,XXREAL_0:1;
end;
