Proof using.
intros.
find_apply_lem_hyp Prefix_exists_rest.
break_exists; subst.
eauto using before_func_app.
Qed.

(* Specifications: *)
Lemma before_func_app_necessary :
forall l l',
~ before_func f g l ->
before_func f g (l ++ l') ->
(forall x, In x l -> g x = false) /\
before_func f g l'.