Definition compatible_rule (r:rule) : Prop :=
  match r with
    | rule_intro f _ t => forall f', In f' (functions_of_term t) -> rank f' <= rank f
  end.Definition compatible_prog : Prop :=
  forall r, In r prog -> compatible_rule r.

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'.