reserve x, x1, x2, y, z, X9 for set,
  X, Y for finite set,
  n, k, m for Nat,
  f for Function;
reserve F,Ch for Function;
reserve Fy for finite-yielding Function;

theorem Th60:
  for X1,Y1,X be finite set st (Y1 is empty implies X1 is empty) &
X c= X1 for F be Function of X1,Y1 st F is one-to-one & card X1=card Y1 holds (
card X1-'card X)!= card{f where f is Function of X1,Y1: f is one-to-one & rng(f
  |(X1\X)) c= F.:(X1\X) & for x st x in X holds f.x=F.x}
proof
  let X1,Y1,X be finite set such that
A1: Y1 is empty implies X1 is empty and
A2: X c= X1;
  set XX=X1\X;
  let F be Function of X1,Y1 such that
A3: F is one-to-one and
A4: card X1=card Y1;
  deffunc F(set)=F.$1;
  defpred P[Function,set,set] means $1 is one-to-one & rng ($1|XX) =F.:XX;
  reconsider FX=F.:XX as finite set;
  set F1={f where f is Function of XX,F.:XX:f is one-to-one};
A5: card XX= card X1 -card X by A2,CARD_2:44;
A6: for f be Function of X1,Y1 st (for x st x in X1\XX holds F(x)=f.x)
  holds P[f,X1,Y1] iff P[f|XX,XX,F.:XX]
  proof
    let f be Function of X1,Y1 such that
A7: for x st x in X1\XX holds F(x)=f.x;
    thus P[f,X1,Y1] implies P[f|XX,XX,F.:XX] by FUNCT_1:52;
    thus P[f|XX,XX,F.:XX] implies P[f,X1,Y1]
    proof
      F is onto by A3,A4,FINSEQ_4:63;
      then
A8:   rng F=Y1 by FUNCT_2:def 3;
A9:   rng (f|XX)=f.:XX & F.:((X1\XX)\/XX)=F.:(X1\XX)\/F.:XX by RELAT_1:115,120;
A10:  dom (F|(X1\XX))= dom F /\(X1\XX) & dom F=X1 by A1,FUNCT_2:def 1
,RELAT_1:61;
A11:  dom (f|(X1\XX))=dom f /\(X1\XX) & dom f=X1 by A1,FUNCT_2:def 1,RELAT_1:61
;
      now
A12:    X1\XX=X/\X1 & X/\X1=X by A2,XBOOLE_1:28,48;
        let x be object such that
A13:    x in dom (F|(X1\XX));
        f.x=(f|(X1\XX)).x by A11,A10,A13,FUNCT_1:47;
        hence F.x=(f|(X1\XX)).x by A7,A10,A13,A12;
      end;
      then f|(X1\XX)=F|(X1\XX) by A11,A10,FUNCT_1:46;
      then
A14:  rng (f|(X1\XX))=F.:(X1\XX) by RELAT_1:115;
A15:  (X1\XX)\/ XX= X1 & rng (f|(X1\XX))=f.:(X1\XX) by RELAT_1:115,XBOOLE_1:45;
A16:  X1=dom F & X1=dom f by A1,FUNCT_2:def 1;
A17:  F.:dom F=rng F by RELAT_1:113;
      assume
A18:  P[f|XX,XX,F.:XX];
      then rng (f|XX)=F.:XX;
      then F.:X1=f.:X1 by A14,A15,A9,RELAT_1:120;
      then rng F=rng f by A16,A17,RELAT_1:113;
      then f is onto by A8,FUNCT_2:def 3;
      hence thesis by A4,A18,FINSEQ_4:63;
    end;
  end;
  set F2={f where f is Function of X1,Y1:f is one-to-one & rng(f|XX) c= F.:XX
  & for x st x in X holds f.x=F.x};
  set S2={f where f is Function of X1,Y1:P[f,X1,Y1]&rng (f|XX) c=F.:XX& (for x
  st x in X1\XX holds f.x=F(x))};
A19: X1\XX=X/\X1 & X/\X1=X by A2,XBOOLE_1:28,48;
A20: S2 c= F2
  proof
    let x be object;
    assume x in S2;
    then ex f be Function of X1,Y1 st x=f & P[f,X1,Y1] & rng (f|XX) c=F.:XX &
    for x st x in X1\XX holds f.x=F(x);
    hence thesis by A19;
  end;
  dom F=X1 by A1,FUNCT_2:def 1;
  then XX,F.:XX are_equipotent by A3,CARD_1:33;
  then
A21: card XX=card (F.:XX) by CARD_1:5;
  then card F1= card XX!/((card FX-'card XX)!) & card FX-'card XX=0 by Th6,
XREAL_1:232;
  then
A22: card F1=(card X1 -' card X)! by A5,NEWTON:12,XREAL_0:def 2;
  set S1={f where f is Function of XX,F.:XX:P[f,XX,F.:XX]};
A23: for x st x in X1\XX holds F(x) in Y1
  proof
A24: X1=dom F by A1,FUNCT_2:def 1;
    let x;
    assume x in X1\XX;
    then F.x in rng F by A24,FUNCT_1:def 3;
    hence thesis;
  end;
A25: F1 c= S1
  proof
    let x be object;
    assume x in F1;
    then consider f be Function of XX,FX such that
A26: x=f and
A27: f is one-to-one;
A28: f|XX=f;
    f is onto by A21,A27,FINSEQ_4:63;
    then rng f=FX by FUNCT_2:def 3;
    hence thesis by A26,A27,A28;
  end;
  S1 c= F1
  proof
    let x be object;
    assume x in S1;
    then ex f be Function of XX,FX st f=x & P[f,XX,F.:XX];
    hence thesis;
  end;
  then
A29: F1=S1 by A25;
A30: F2 c= S2
  proof
    let x be object;
    assume x in F2;
    then consider f be Function of X1,Y1 such that
A31: x=f and
A32: f is one-to-one and
A33: rng(f|XX) c= F.:XX and
A34: for x st x in X holds f.x=F.x;
    dom f=X1 by A1,FUNCT_2:def 1;
    then XX,f.:XX are_equipotent by A32,CARD_1:33;
    then card XX=card (f.:XX) by CARD_1:5;
    then card FX=card rng(f|XX) by A21,RELAT_1:115;
    then rng(f|XX)=FX by A33,CARD_2:102;
    hence thesis by A19,A31,A32,A34;
  end;
A35: XX c= X1 & F.:XX c= Y1;
  then XX c= dom F by A1,FUNCT_2:def 1;
  then
A36: F.:XX is empty implies XX is empty by RELAT_1:119;
  card S1=card S2 from STIRL2_1:sch 3(A23,A35,A36,A6);
  hence thesis by A20,A30,A22,A29,XBOOLE_0:def 10;
end;
