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

(* ordering the mk_call of rec and comp *)
Lemma ppo_rec_calls f g rk (Suc:constructor) n s:
rk g < rk f →
PPO rk
(fapply g (mk_args_h (S n) s (mk_call (S (n + s)) f)))
(fapply f (capply Suc [var 0] :: map term_from_pattern (mk_pvl 1 (S (n + s))))).