Fixpoint MapDomRestrByApp1 (pf : ad -> ad) (l : list ad)
(m : Map A) {struct m} : Map B -> list ad :=
match m with
| M0 => fun _ : Map B => l
| M1 a y =>
fun m' : Map B =>
match MapGet B m' a with
| None => pf a :: l
| _ => l
end
| M2 m1 m2 =>
fun m' : Map B =>
match m' with
| M0 => map_app_list1 pf l m
| M1 a' y' => map_app_list1 pf l (MapRemove A m a')
| M2 m'1 m'2 =>
MapDomRestrByApp1 (fun a0 : ad => pf (Ndouble_plus_one a0))
(MapDomRestrByApp1 (fun a0 : ad => pf (Ndouble a0)) l m1 m'1)
m2 m'2
end
end.

Lemma MapDomRestrByApp1_lemma_1 :
forall (m : Map A) (m' : Map B) (l : list ad) (pf : ad -> ad) (a : ad),
In a l -> In a (MapDomRestrByApp1 pf l m m').