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
  the_rank_of M = 0 iff M = 0.(K,len M,width M)
proof
  set NULL=0.(K,len M,width M);
  reconsider M9=M as Matrix of len M,width M,K by MATRIX_0:51;
  thus the_rank_of M = 0 implies M = 0.(K,len M,width M)
  proof
    assume
A1: the_rank_of M = 0;
    now
A2:   Indices M9=Indices NULL by MATRIX_0:26;
      let i,j such that
A3:   [i,j] in Indices M9;
      reconsider i9=i,j9=j as Element of NAT by ORDINAL1:def 12;
      M*(i9,j9)=0.K by A1,A3,Th94;
      hence M9*(i,j)=NULL*(i,j) by A3,A2,MATRIX_3:1;
    end;
    hence thesis by MATRIX_0:27;
  end;
  assume
A4: M = NULL;
  assume the_rank_of M<>0;
  then ex i,j st [i,j] in Indices M & M*(i,j) <> 0.K by Th94;
  hence thesis by A4,MATRIX_3:1;
end;
