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_mini_appartient :
forall (A : Set) (x : Map A), ensemble_base A x (map_mini A x).