Set Implicit Arguments.
Fixpoint before_func {A: Type} (f : A -> bool) (g : A -> bool) (l : list A) : Prop :=
match l with
| [] => False
| a :: l' =>
f a = true \/
(g a = false /\ before_func f g l')
end.
Section before_func.
Variable A : Type.
Variables f g : A -> bool.
Definition before_func_dec : forall l, {before_func f g l} + {~ before_func f g l}.
intros; induction l; simpl in *.
- intuition.
- destruct (f a); destruct (g a); intuition.
Defined.

Lemma before_func_app :
forall l x,
before_func f g l ->
before_func f g (l ++ x).