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 Th59:
  for N be finite Subset of NAT
  ex Order be Function of N, Segm card N
 st Order is bijective & for n,k st n in dom Order & k in dom Order & n<k
  holds Order.n < Order.k
proof
  defpred P[Nat] means for N be finite Subset of NAT st card N = $1
  ex F be Function of N,Segm card N st F is bijective & for n,k st n in dom F &
  k in dom F & n<k holds F.n < F.k;
A1: for k st P[k] holds P[k+1]
  proof
    let k such that
A2: P[k];
    let N be finite Subset of NAT such that
A3: card N = k+1;
    defpred M[set] means $1 in N;
    ex x being object st x in N by A3,CARD_1:27,XBOOLE_0:def 1;
    then
A4: ex n be Nat st M[n];
    consider m9 be Nat such that
A5: for n st n in N holds n<=m9 by Th56;
A6: for n be Nat st M[n] holds n<=m9 by A5;
    consider m be Nat such that
A7: M[m] & for n be Nat st M[n] holds n <= m from NAT_1:sch 6(A6,A4
    );
    set Nm=N\{m};
    consider F be Function of Nm,Segm card Nm such that
A8: F is bijective and
A9: for n,k st n in dom F & k in dom F & n<k holds F.n < F.k by A2,A3,A7,Th55;
A10: card Nm=k by A3,A7,Th55;
A11: Segm(k)\/{k}= Segm(k+1) by AFINSQ_1:2;
A12: card Nm is empty implies Nm is empty;
    m in {m} by TARSKI:def 1;
    then not m in Nm by XBOOLE_0:def 5;
    then consider G be Function of Nm\/{m},card Nm\/{k} such that
A13: G|Nm=F and
A14: G.m=k by A12,Th57;
    N= Nm\/{m} by A7,ZFMISC_1:116;
    then reconsider G9=G as Function of N, Segm card N by A3,A10,A11;
    take G9;
    not k in card Nm by A10;
    then G is one-to-one onto by A8,A12,A13,A14,Th58;
    hence G9 is bijective by A11,A3,A10;
    thus for n,k st n in dom G9 & k in dom G9 & n<k holds G9.n < G9.k
    proof
A15:  for i st i in Nm holds i < m & G9.i <k
      proof
        let i such that
A16:    i in Nm;
        not i in {m} by A16,XBOOLE_0:def 5;
        then
A17:    i<>m by TARSKI:def 1;
        M[i] by A16,XBOOLE_0:def 5;
        then
    i <= m by A7;
        hence i < m by A17,XXREAL_0:1;
A18:     i in dom F by A16,FUNCT_2:def 1;
        then
A19:    F.i=G9.i by A13,FUNCT_1:47;
A20:     F.i in card Nm by A18,FUNCT_2:5;
        card Nm=k by A3,A7,Th55;
        hence G9.i <k by A19,NAT_1:44,A20;
      end;
      let i,j such that
A21:  i in dom G9 and
A22:  j in dom G9 and
A23:  i<j;
A24:  dom G9=Nm\/{m} by FUNCT_2:def 1;
      now
        per cases by A21,A22,A24,XBOOLE_0:def 3;
        suppose
A25:      i in Nm & j in Nm;
          then
A26:      j in dom F by FUNCT_2:def 1;
          then
A27:      F.j=G9.j by A13,FUNCT_1:47;
A28:      i in dom F by A25,FUNCT_2:def 1;
          then F.i=G9.i by A13,FUNCT_1:47;
          hence thesis by A9,A23,A28,A26,A27;
        end;
        suppose
A29:      i in Nm & j in {m};
          then G9.i<k by A15;
          hence thesis by A14,A29,TARSKI:def 1;
        end;
        suppose
A30:      i in {m} & j in Nm;
          then i=m by TARSKI:def 1;
          hence thesis by A23,A15,A30;
        end;
        suppose
A31:      i in {m} & j in {m};
          then i=m by TARSKI:def 1;
          hence thesis by A23,A31,TARSKI:def 1;
        end;
      end;
      hence thesis;
    end;
  end;
A32: P[0]
  proof
    set P={};
A33: rng P={};
    let N be finite Subset of NAT such that
A34: card N=0;
    N is empty by A34;
    then reconsider P as Function of N,Segm card N by A33,FUNCT_2:1;
    take P;
    rng P={};
    then P is one-to-one onto by A34,FUNCT_2:def 3;
    hence P is bijective;
    thus thesis;
  end;
  for k holds P[k] from NAT_1:sch 2(A32,A1);
  hence thesis;
end;
