(**************************************************************)
(*   Copyright Dominique Larchey-Wendling [*]                 *)
(*                                                            *)
(*                             [*] Affiliation LORIA -- CNRS  *)
(**************************************************************)
(*      This file is distributed under the terms of the       *)
(*         CeCILL v2 FREE SOFTWARE LICENSE AGREEMENT          *)
(**************************************************************)
Set Implicit Arguments.
Local Notation "∑" := (msum plus 0).
Section nat_swap.
Variables (i j : nat).
Definition swap n := if eq_nat_dec n i then j else
if eq_nat_dec n j then i else n.
Fact swap_spec_i : swap i = j.
Fact swap_spec n : n <> i -> n <> j -> swap n = n.
Fact swap_involutive n : swap (swap n) = n.
Fact swap_inj n m : swap n = swap m -> n = m.
End nat_swap.
Opaque swap.
Section php_fun.
Variable (n : nat) (f : nat -> nat) (Hf : forall i, i <= n -> f i < n).

(* Specifications: *)
Theorem php_fun : exists i j, i < j <= n /\ f i = f j.
End php_fun.