theorem
  for M being Matrix of D st len M=n holds M is Matrix of n,width M,D
proof
  let M be Matrix of D;
  assume that
A1: len M=n and
A2: not M is Matrix of n,width M,D;
  set m= width M;
  per cases by A2,Def2;
  suppose
    len M<>n;
    hence contradiction by A1;
  end;
  suppose
A3: ex p be FinSequence of D st p in rng M & not len p=m;
    consider k such that
A4: for x st x in rng M ex q st x = q & len q = k by Th9;
    consider p be FinSequence of D such that
A5: p in rng M and
A6: len p<>m by A3;
    reconsider x=p as set;
A7: ex q st x = q & len q = k by A5,A4;
    now
      per cases;
      suppose
        n= 0;
        then M={} by A1;
        hence len p= m by A5;
      end;
      suppose
        n>0;
        then consider s being FinSequence such that
A8:     s in rng M and
A9:     len s = width M by A1,Def3;
        reconsider y=s as set;
        ex r st y = r & len r = k by A4,A8;
        hence len p= m by A7,A9;
      end;
    end;
    hence contradiction by A6;
  end;
end;
