(* 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 PPO_value_lt_size (v v': value) :
PPO rank (@term_from_value variable function constructor v) (@term_from_value _ _ _ v') ->
value_size v < value_size v'.