reserve k, l, m, n, i, j for Nat,
  K, N for non empty Subset of NAT,
  Ke, Ne, Me for Subset of NAT,
  X,Y for set;
reserve f for Function of Segm n,Segm k;
reserve x,y for set;

theorem Th34:
  for f be Function of Segm(n+1),Segm(k+1)
   st f is onto "increasing & f"{f.n}=
  {n} holds f.n=k
proof
  let f be Function of Segm(n+1),Segm(k+1) such that
A1: f is onto "increasing and
A2: f"{f.n}={n};
  assume
A3: f.n<>k;
  now
    per cases by A3,XXREAL_0:1;
    suppose
A4:   f.n>k;
      f.n<k+1 by NAT_1:44;
      hence contradiction by A4,NAT_1:13;
    end;
    suppose
A5:   f.n<k;
A6:   min* f"{k} <=(n+1)-1 by Th16;
A7:   rng f = k+1 by A1,FUNCT_2:def 3;
      k<k+1 by NAT_1:13;
      then
   k in rng f by A7,NAT_1:44;
       then min* f"{f.n} < min* f"{k} & k in NAT & n in NAT
  by A1,A5,A7,ORDINAL1:def 12;
      hence contradiction by A2,A6,Th5;
    end;
  end;
  hence contradiction;
end;
