Definition ensemble_base (A : Set) (m : Map A) (x : Map bool) :=
  domain_equal A bool m x.Fixpoint map_fill (A : Set) (m : Map A) {struct m} : 
 bool -> Map bool :=
  fun b : bool =>
  match m with
  | M0 => M0 bool
  | M1 a _ => M1 bool a b
  | M2 m0 m1 => M2 bool (map_fill A m0 b) (map_fill A m1 b)
  end.Definition map_mini (A : Set) (m : Map A) : Map bool := map_fill A m false.Definition map_maxi (A : Set) (m : Map A) : Map bool := map_fill A m true.

Lemma map_maxi_maxi : forall (A : Set) (x : Map A), maxi bool lem (ensemble_base A x) (map_maxi A x).