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 Th64:
  for F be Function of Ne,Ke st rng F is finite for I1,I2 be
  Function of Ne,Me,P1,P2 be Function st P1 is one-to-one & P2 is one-to-one &
  rng I1=rng I2 & rng I1=dom P1 & dom P1=dom P2 & F=P1*I1 & F=P2*I2 & I1 is
  'increasing & I2 is 'increasing holds P1=P2 & I1=I2
proof
  defpred Q[set,Function] means $1=$2.(min* dom $2);
  defpred P[set] means for Ne,Ke,Me be Subset of NAT for F be Function of Ne,
  Ke st F=$1 for I1,I2 be Function of Ne,Me, P1,P2 be Function st P1 is
one-to-one & P2 is one-to-one & rng I1=rng I2 & rng I1=dom P1 & dom P1=dom P2 &
F=P1*I1 & F=P2*I2 & I1 is 'increasing & I2 is 'increasing holds P1=P2 & I1=I2;
A1: P[{}]
  proof
    let Ne,Ke,Me be Subset of NAT;
    let F be Function of Ne,Ke such that
A2: F={};
    let I1,I2 be Function of Ne,Me, P1,P2 be Function such that
    P1 is one-to-one and
    P2 is one-to-one and
A3: rng I1=rng I2 and
A4: rng I1=dom P1 and
A5: dom P1=dom P2 and
A6: F=P1*I1 and
    F=P2*I2 and
    I1 is 'increasing and
    I2 is 'increasing;
    dom I1={} by A2,A4,A6,RELAT_1:27;
    then
A7: I1={};
    rng P1={} by A2,A4,A6,RELAT_1:28,38;
    then P1={};
    hence thesis by A3,A5,A7;
  end;
A8: for F be Function st for x st x in rng F & Q[x,F] holds P[F|(dom F\F"{x
  })] holds P[F]
  proof
    let F9 be Function such that
A9: for x st x in rng F9 & Q[x,F9] holds P[F9|(dom F9\F9"{x})];
    now
      per cases;
      suppose
        F9={};
        hence thesis by A1;
      end;
      suppose
A10:    F9<>{};
        let Ne,Ke,Me be Subset of NAT;
        let F be Function of Ne,Ke such that
A11:    F=F9;
        Ke is non empty by A10,A11;
        then reconsider domF=dom F as non empty Subset of NAT by A10,A11,
FUNCT_2:def 1;
        set m=min* dom F;
        let I1,I2 be Function of Ne,Me, P1,P2 be Function such that
A12:    P1 is one-to-one and
A13:    P2 is one-to-one and
A14:    rng I1=rng I2 and
A15:    rng I1=dom P1 and
A16:    dom P1=dom P2 and
A17:    F=P1*I1 and
A18:    F=P2*I2 and
A19:    I1 is 'increasing and
A20:    I2 is 'increasing;
        dom I1=dom F by A15,A17,RELAT_1:27;
        then
A21:    min* rng I1=I1.m by A19,Th62;
        reconsider I=rng I1\{I1.m} as Subset of NAT by XBOOLE_1:1;
        reconsider D=dom F\F"{F.m} as Subset of NAT by XBOOLE_1:1;
A22:    for I be Function of Ne,Me,P be Function st P is one-to-one & rng
I=dom P & F=P*I & I is 'increasing holds dom (I|D)=D & rng (I|D)=rng I\{I.m} &
dom (P|(rng I\{I.m}))=rng I\{I.m} & F|D=(P|(rng I\{I.m}))*(I|D) & P|(rng I\{I.m
}) is one-to-one & for M be Subset of NAT st M=rng I\{I.m} for I1 be Function
        of D,M st I1=I|D holds I1 is 'increasing
        proof
A23:      F.m in {F.m} by TARSKI:def 1;
          let I be Function of Ne,Me,P be Function such that
A24:      P is one-to-one and
A25:      rng I=dom P and
A26:      F=P*I and
A27:      I is 'increasing;
A28:      dom P/\(rng I\{I.m})=rng I\{I.m} by A25,XBOOLE_1:28,36;
          m in domF by NAT_1:def 1;
          then F.m in rng F by FUNCT_1:def 3;
          then consider x such that
          x in dom P and
          x in rng I and
          P"{F.m}={x} and
A29:      I"{x}=F"{F.m} by A24,A26,Th61;
A30:      dom (P|(rng I\{I.m}))=dom P/\(rng I\{I.m}) by RELAT_1:61;
A31:      dom F=dom I by A25,A26,RELAT_1:27;
          then
A32:      dom I/\D=D by XBOOLE_1:28,36;
          m in domF by NAT_1:def 1;
          then m in I"{x} by A29,A23,FUNCT_1:def 7;
          then I.m in {x} by FUNCT_1:def 7;
          then
A33:      I.m=x by TARSKI:def 1;
A34:      for M be Subset of NAT st M=rng I\{I.m} for I1 be Function of D
          ,M st I1=I|D holds I1 is 'increasing
          proof
            let M be Subset of NAT such that
            M=rng I\{I.m};
            let I1 be Function of D,M such that
A35:        I1=I|D;
A36:        rng I1=rng I\{I.m} by A29,A33,A31,A35,Th54;
            let l,n such that
A37:        l in rng I1 and
A38:        n in rng I1 and
A39:        l < n;
A40:        n in rng I by A38,A36,ZFMISC_1:56;
            n<>I.m by A38,A36,ZFMISC_1:56;
            then
A41:        I1"{n}=I"{n} by A29,A33,A31,A35,Th54;
            l<>I.m by A37,A36,ZFMISC_1:56;
            then
A42:        I1"{l}=I"{l} by A29,A33,A31,A35,Th54;
            l in rng I by A37,A36,ZFMISC_1:56;
            hence thesis by A27,A39,A40,A42,A41;
          end;
          set rI=rng I\{I.m};
A43:      dom (I|D)=dom I/\D by RELAT_1:61;
A44:      rng (I|D)=rng I\{I.m} by A29,A33,A31,Th54;
A45:      for x being object st x in dom (F|D)
holds (F|D).x = (P|rI).((I|D).x)
          proof
            let x being object such that
A46:        x in dom (F|D);
A47:        x in dom F/\D by A46,RELAT_1:61;
            then
A48:        x in dom F by XBOOLE_0:def 4;
            (I|D).x in dom (P|rI) by A31,A43,A30,A28,A44,A47,FUNCT_1:def 3;
            then
A49:        (P|rI).((I|D).x)=P.((I|D).x) by FUNCT_1:47;
A50:        (F|D).x=F.x by A46,FUNCT_1:47;
            I.x=(I|D).x by A31,A43,A47,FUNCT_1:47;
            hence thesis by A26,A48,A49,A50,FUNCT_1:12;
          end;
          dom F/\D=D by XBOOLE_1:28,36;
          then dom (F|D)=D by RELAT_1:61;
          then for x being object
      holds x in dom (F|D) iff x in dom (I|D) & (I|D).x in dom
          (P|rI) by A43,A32,A30,A28,A44,FUNCT_1:def 3;
          hence thesis by A24,A29,A33,A31,A32,A28,A45,A34,Th54,FUNCT_1:10,52
,RELAT_1:61;
        end;
        then
A51:    P1|I is one-to-one by A12,A15,A17,A19;
        dom I2=dom F by A14,A15,A16,A18,RELAT_1:27;
        then
A52:    min* rng I2=I2.m by A20,Th62;
        then
A53:    P2|I is one-to-one by A13,A14,A15,A16,A18,A20,A22,A21;
A54:    dom (I2|D)=D by A13,A14,A15,A16,A18,A20,A22;
A55:    dom (I1|D)=D by A12,A15,A17,A19,A22;
A56:    rng (I1|D)=I by A12,A15,A17,A19,A22;
        rng (I2|D)=I by A13,A14,A15,A16,A18,A20,A22,A21,A52;
        then reconsider I1D=I1|D,I2D=I2|D as Function of D,I by A55,A54,A56,
FUNCT_2:1;
A57:    I2D is 'increasing by A13,A14,A15,A16,A18,A20,A22,A21,A52;
A58:    rng I1D=I by A12,A15,A17,A19,A22;
        then
A59:    rng I1D=dom (P1|I) by A12,A15,A17,A19,A22;
        reconsider rFD=rng (F|D) as Subset of NAT by XBOOLE_1:1;
        dom F/\D=D by XBOOLE_1:28,36;
        then dom (F|D)=D by RELAT_1:61;
        then reconsider FD=F|D as Function of D,rFD by FUNCT_2:1;
A60:    FD=(P1|I)*I1D by A12,A15,A17,A19,A22;
A61:    FD=(P2|I)*I2D by A13,A14,A15,A16,A18,A20,A22,A21,A52;
        m in domF by NAT_1:def 1;
        then
A62:    F.m in rng F by FUNCT_1:def 3;
        dom (P1|I)=I by A12,A15,A17,A19,A22;
        then
A63:    dom (P1|I)=dom (P2|I) by A13,A14,A15,A16,A18,A20,A22,A21,A52;
A64:    I1D is 'increasing by A12,A15,A17,A19,A22;
A65:    rng I1D=rng I2D by A13,A14,A15,A16,A18,A20,A22,A21,A52,A58;
        for x being object st x in dom P1 holds P1.x = P2.x
        proof
A66:      m in domF by NAT_1:def 1;
          dom I1=dom F by A15,A17,RELAT_1:27;
          then I1.m in rng I1 by A66,FUNCT_1:def 3;
          then
A67:      dom P1=I\/{I1.m} by A15,ZFMISC_1:116;
          let x being object such that
A68:      x in dom P1;
          now
            per cases by A68,A67,XBOOLE_0:def 3;
            suppose
A69:          x in I;
              dom P1/\I=I by A15,XBOOLE_1:28,36;
              then x in dom (P1|I) by A69,RELAT_1:61;
              then
A70:          (P1|I).x=P1.x by FUNCT_1:47;
              dom P2/\I=I by A15,A16,XBOOLE_1:28,36;
              then x in dom (P2|I) by A69,RELAT_1:61;
              then (P2|I).x=P2.x by FUNCT_1:47;
              hence
              thesis by A9,A11,A62,A51,A53,A65,A59,A63,A60,A61,A64,A57,A70;
            end;
            suppose
A71:          x in {I1.m};
A72:          m in domF by NAT_1:def 1;
A73:          x=I1.m by A71,TARSKI:def 1;
              then F.m=P1.x by A17,A72,FUNCT_1:12;
              hence thesis by A14,A18,A21,A52,A73,A72,FUNCT_1:12;
            end;
          end;
          hence thesis;
        end;
        then
A74:    P1=P2 by A16;
        I2 is Function of dom I2,rng I2 by FUNCT_2:1;
        then
A75:    I2=(id rng I2)*I2 by FUNCT_2:17;
        I1 is Function of dom I1,rng I1 by FUNCT_2:1;
        then
A76:    I1=(id rng I1)*I1 by FUNCT_2:17;
        P1"*P1 = id dom P1 by A12,FUNCT_1:39;
        then
A77:    I1=P1"*(P1*I1) by A15,A76,RELAT_1:36;
        P2"*P2 = id dom P2 by A13,FUNCT_1:39;
        hence P1=P2 & I1=I2 by A14,A15,A17,A18,A74,A75,A77,RELAT_1:36;
      end;
    end;
    hence thesis;
  end;
  for F be Function st rng F is finite holds P[F] from Sch9(A1,A8 );
  hence thesis;
end;
