(* liens entre PPO et sous-terme *)
Fixpoint sub_terms (t: term) : list term :=
t :: match t with
| var _ => []
| capply _ lt => flat_map sub_terms lt
| fapply _ lt => flat_map sub_terms lt
end.
Definition sub_terms_strict (t: term) : list term :=
match t with
| var _ => []
| capply _ lt => flat_map sub_terms lt
| fapply _ lt => flat_map sub_terms lt
end.

Lemma sub_term_eq_or_strict (t1 t2: term) :
In t1 (sub_terms t2) <-> t1 = t2 \/ In t1 (sub_terms_strict t2).