(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)
(*i 	$Id$	 i*)
Section MapSubsetDef.
Variables A B : Type.
Definition MapSubset (m:Map A) (m':Map B) :=
forall a:ad, in_dom A a m = true -> in_dom B a m' = true.
Definition MapSubset_1 (m:Map A) (m':Map B) :=
match MapSweep A (fun (a:ad) (_:A) => negb (in_dom B a m')) m with
| None => true
| _ => false
end.
Definition MapSubset_2 (m:Map A) (m':Map B) :=
eqmap A (MapDomRestrBy A B m m') (M0 A).

(* Specifications: *)
Lemma MapSubset_imp_1 :
forall (m:Map A) (m':Map B), MapSubset m m' -> MapSubset_1 m m' = true.
Lemma MapSubset_1_imp :
forall (m:Map A) (m':Map B), MapSubset_1 m m' = true -> MapSubset m m'.
Lemma map_dom_empty_1 :
forall m:Map A, eqmap A m (M0 A) -> forall a:ad, in_dom _ a m = false.
Lemma map_dom_empty_2 :
forall m:Map A, (forall a:ad, in_dom _ a m = false) -> eqmap A m (M0 A).
Lemma MapSubset_imp_2 :
forall (m:Map A) (m':Map B), MapSubset m m' -> MapSubset_2 m m'.
Lemma MapSubset_2_imp :
forall (m:Map A) (m':Map B), MapSubset_2 m m' -> MapSubset m m'.