Notation member := (in_dec eq_nat_dec).

Lemma fold_left_for_each_in : forall (f : A -> B -> A) (g : A -> B -> C) (B_eq_dec : forall x y : B, {x = y} + {x <> y}), (forall a b b', b <> b' -> g (f a b') b = g a b) -> forall l a b, In b l -> exists a', g (fold_left f l a) b = g (f a' b) b.