(*****************************************************************************)
(*                                                                           *)
(*                     Translation respects PPO                              *)
(*                                                                           *)
(*****************************************************************************)
Ltac ppo := Ordering.ppo Nat.eq_dec Nat.eq_dec constructor_eq_dec.

Lemma ppo_comp_calls trsl f rk n m t:
n ≤ m → (∀ g : function, g ∈ map main trsl → rk g < rk f) →
t ∈ map (mk_call_trs n) trsl → PPO rk t (fapply f (mk_tvl 0 m)).