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;

theorem Th32:
  for nt,nt1 be Element of n-tuples_on NAT st nt is one-to-one &
  nt1 is one-to-one & rng nt = rng nt1 ex perm be Permutation of Seg n st nt1 =
  nt * perm
proof
  let nt,nt1 such that
A1: nt is one-to-one and
A2: nt1 is one-to-one and
A3: rng nt = rng nt1;
  reconsider nt9=nt" as Function;
A4: dom nt9 = rng nt1 by A1,A3,FUNCT_1:33;
A5: dom nt=Seg n by FINSEQ_2:124;
  rng nt9 = dom nt by A1,FUNCT_1:33;
  then
A6: rng (nt9*nt1)=Seg n by A5,A4,RELAT_1:28;
  dom nt1 = Seg n by FINSEQ_2:124;
  then dom (nt9*nt1)=Seg n by A4,RELAT_1:27;
  then reconsider nn=nt9*nt1 as Function of Seg n,Seg n by A6,FUNCT_2:1;
  nn is one-to-one onto by A1,A2,A6,FUNCT_2:def 3;
  then reconsider nn as Permutation of Seg n;
  take nn;
  thus nt * nn = (nt*nt9)*nt1 by RELAT_1:36
    .= (id rng nt1)*nt1 by A1,A3,FUNCT_1:39
    .= nt1 by RELAT_1:54;
end;
