(* 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                                                     *)
Require Export Max.

(* Specifications: *)
Lemma nat_sum : forall n : nat, n = 0 \/ (exists m : nat, n = S m).
Lemma le_n_n : forall n : nat, n <= n.
Lemma le_l_or_r : forall n m : nat, n <= m \/ m <= n.
Lemma plus_n_O : forall n : nat, n + 0 = n.
Lemma S_plus_l : forall n m : nat, S (n + m) = S n + m.
Lemma S_plus_r : forall n m : nat, S (n + m) = n + S m.
(* lemmes concernant max *)
Lemma max_le_Sr_0 :
forall n m : nat, max n m <= max n (S m) /\ max (S n) m <= max (S n) (S m).
Lemma max_le_Sr : forall n m : nat, max n m <= max n (S m).
(* lemmes arithmétiques *)
Lemma plus_O_r : forall n : nat, n + 0 = n.
Lemma plus_O_l : forall n : nat, n + 0 = n.
Lemma le_mult_lS : forall n m : nat, n * m <= S n * m.
Lemma le_mult_rS : forall n m : nat, n * m <= n * S m.
Lemma le_disj : forall n m : nat, n <= m -> n = m \/ S n <= m.
Lemma le_mult_l : forall n m p : nat, n <= m -> n * p <= m * p.
Lemma le_mult_r : forall n m p : nat, n <= m -> p * n <= p * m.
Lemma le_mult_mult : forall n m p q : nat, n <= m -> p <= q -> n * p <= m * q.
Lemma Sn_eq_Sm_n_eq_m : forall n m : nat, S n = S m -> n = m.
(* lemmes sur les booléens *)
Lemma bool_dec_eq : forall a b : bool, {a = b} + {a <> b}.
Lemma bool_is_false_or_true : forall a : bool, a = false \/ a = true.
Lemma bool_is_true_or_false : forall a : bool, a = true \/ a = false.
Lemma in_M0_false :
forall (A : Set) (a : A), ~ (exists e : ad, MapGet A (M0 A) e = Some a).
Lemma in_M1_id :
forall (A : Set) (a : A) (x : ad) (e : A),
(exists c : ad, MapGet A (M1 A x e) c = Some a) -> a = e.
Lemma in_M2_disj :
forall (A : Set) (a : A) (m0 m1 : Map A),
(exists c : ad, MapGet A (M2 A m0 m1) c = Some a) ->
(exists c : ad, MapGet A m0 c = Some a) \/
(exists c : ad, MapGet A m1 c = Some a).