(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
(****************************************************************************)
(*                                                                          *)
(*  Proof of the three gap theorem.                                         *)
(*                                                                          *)
(*  Micaela Mayero (INRIA-Rocquencourt)                                     *)
(*  September 1998                                                          *)
(*                                                                          *)
(****************************************************************************)
(****************************************************************************)
(*                               Nat_compl.v                                *)
(****************************************************************************)
(*********************************************************)
(*             Complements for the natural numbers       *)
(*                                                       *)
(*********************************************************)
Global Set Asymmetric Patterns.
Require Export Arith.
Require Export Compare_dec.
(*********************************************************)
Definition decidable (P : Prop) := P \/ ~ P.
(**********************************************************)
(*       Technical lemmas                                 *)
(**********************************************************)
tauto.
Qed.
intros;
generalize (not_ex_all_not nat (fun n : nat => P n /\ Q n /\ R n /\ S n) H);
intro; generalize (not_symt_et (P k) (Q k) (R k) (S k) (H2 k));
intro; generalize (not_and_or (P k /\ Q k) (R k /\ S k) H3);
intro; generalize (or_to_imply (P k /\ Q k) (~ (R k /\ S k)) H4);
intro; cut (P k /\ Q k); auto with core arith.
intro; generalize (H5 H6); intro; apply (not_and_or (R k) (S k) H7).
Qed.

(**********)
Lemma contraposee_ou :
forall P Q R : Prop, (P \/ Q -> R) -> ~ R -> ~ P /\ ~ Q.