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

theorem Th13:
 for z,x,y being object holds
  not z in X & x<>y implies card Choose(X,k,x,y)= card{f where f
  is Function of X\/{z},{x,y}:card (f"{x})=k & f.z=y}
proof let z,x,y be object;
  assume that
A1: not z in X and
A2: x<>y;
  defpred P[set,set,set] means for f be Function st f=$1 holds card (f"{x})=k;
A3: for f be Function of X\/{z},{x,y}\/{y} st f.z=y holds P[f,X\/{z},{x,y}\/
  {y}] iff P[f|X,X,{x,y}]
  proof
    let f be Function of X\/{z},{x,y}\/{y} such that
A4: f.z=y;
    (X\/{z})\{z}=X & dom f=X\/{z} by A1,FUNCT_2:def 1,ZFMISC_1:117;
    then (f|X)"{x} = f"{x} by A2,A4,AFINSQ_2:67;
    hence thesis;
  end;
  set F2={f where f is Function of X\/{z},{x,y}\/{y}: P[f,X\/{z},{x,y}\/{y}] &
  rng (f|X) c={x,y} & f.z=y};
  set F1={f where f is Function of X,{x,y}:P[f,X,{x,y}]};
A5: {x,y} is empty implies X is empty;
A6: card F1=card F2 from STIRL2_1:sch 4(A5,A1,A3);
  set F3={f where f is Function of X\/{z},{x,y}:card (f"{x})=k & f.z=y};
A7: F2 c= F3
  proof
    let x1 be object;
    assume x1 in F2;
    then consider f be Function of X\/{z},{x,y}\/{y} such that
A8: x1=f and
A9: P[f,X\/{z},{x,y}\/{y}] and
    rng (f|X) c={x,y} and
A10: f.z=y;
    {x,y}\/{y}={y,y,x} by ENUMSET1:2;
    then
A11: f is Function of X\/{z},{x,y} by ENUMSET1:30;
    card (f"{x})=k by A9;
    hence thesis by A8,A10,A11;
  end;
A12: F3 c= F2
  proof
    let x1 be object;
    assume x1 in F3;
    then consider f be Function of X\/{z},{x,y}such that
A13: f=x1 and
A14: card (f"{x})=k and
A15: f.z=y;
    {x,y}\/{y}={y,y,x} by ENUMSET1:2;
    then
A16: rng (f|X) c={x,y} & f is Function of X\/{z},{x,y}\/{y} by ENUMSET1:30;
    P[f,X\/{z},{x,y}\/{y}] by A14;
    hence thesis by A13,A15,A16;
  end;
A17: Choose(X,k,x,y) c= F1
  proof
    let x1 be object;
    assume x1 in Choose(X,k,x,y);
    then consider f be Function of X,{x,y} such that
A18: x1=f and
A19: card (f"{x})=k by Def1;
    P[f,X,{x,y}] by A19;
    hence thesis by A18;
  end;
  F1 c= Choose(X,k,x,y)
  proof
    let x1 be object;
    assume x1 in F1;
    then consider f be Function of X,{x,y} such that
A20: x1=f and
A21: P[f,X,{x,y}];
    card (f"{x})=k by A21;
    hence thesis by A20,Def1;
  end;
  then Choose(X,k,x,y) = F1 by A17;
  hence thesis by A7,A12,A6,XBOOLE_0:def 10;
end;
