
theorem
  for p be Prime, n be even Nat st n < p holds
    ((p - 1) choose n) mod p = 1
  proof
    let p be Prime, n be even Nat such that
    A1: n < p;
    per cases;
    suppose p is even; then
      B1: p = 2 by LAGRA4SQ:13;
      2*0 + 1 is odd; then
      n = 0 by A1,B1,NAT_1:23; then
      ((p - 1) choose n) mod p = 1 mod (1 + (p - 1)) by NEWTON:19;
      hence thesis;
    end;
    suppose p is odd; then
      reconsider p as odd Nat;
      reconsider m = n/2 as Nat;
      2*m + 1 <= p by A1,INT_1:7; then
      per cases by XXREAL_0:1;
      suppose 2*m + 1 < p; then
        1 = ((p - 1) choose ((2*m + 1) - 1)) mod p by PCZ;
        hence thesis;
      end;
      suppose 2*m + 1 = p; then
        ((p - 1) choose n) mod p = 1 mod (1 + (p - 1)) by NEWTON:21;
        hence thesis;
      end;
    end;
  end;
