reserve a,b,c,d,m,x,n,j,k,l for Nat,
  t,u,v,z for Integer,
  f,F for FinSequence of NAT;
reserve p,q,r,s for real number;
reserve a,b,c,d,m,x,n,k,l for Nat,
  t,z for Integer,
  f,F,G for FinSequence of REAL;
reserve q,r,s for real number;
reserve D for set;

theorem Th21:
  n is prime & k <> 0 & k <> n implies n divides (n choose k)
  proof
    assume
    A1: n is prime & k <> 0 & k <> n; then
    per cases by XXREAL_0:1;
    suppose
      k > n; then
      n choose k = 0 by NEWTON:def 3;
      hence thesis by NAT_D:6;
    end;
    suppose
      B1: k < n; then
      consider m such that
      B1a: n = 1 + m by NAT_1:14,10;
      B1b: k!,n are_coprime by A1,B1,NAT_4:19,GROUP_17:5;
      consider l such that
      B2: n = k + l by B1,NAT_1:10;
      k+l > 0+l by A1,XREAL_1:6; then
      B3a: l!,n are_coprime by A1,B2,NAT_4:19,GROUP_17:5;
      l = n - k by B2; then
      n choose k = (n!)/((k!) * (l!)) by B1,NEWTON:def 3; then
      (n choose k)*((k!)*(l!)) = n! by XCMPLX_1:87; then
      (n choose k)*((k!)*(l!)) = m!*n by B1a,NEWTON:15; then
      n divides ((n choose k)*(k!))*(l!); then
      n divides (n choose k)*(k!) by B3a,INT_2:25;
      hence thesis by B1b,INT_2:25;
    end;
  end;
