(*****************************************************************************)
(*                                                                           *)
(*                     Translation produces a QI                             *)
(*                                                                           *)
(*****************************************************************************)
Definition  valid_QI_prog trs := valid_QI variable function constructor
trs.(rules) mcs qic (qif trs) cs.
Definition subterm_QI_prog trs := subterm function (qif trs).
Definition monotonicity_QI_prog trs := monotonicity_qif function (qif trs).
Definition compatible_QI_prog trs := compatible_QI variable function constructor
trs.(rules) qic (qif trs).
Definition noqif:=λ (f:function) (l:list nat), 0.

Lemma BC_to_TRS_monotonicity_comp_aux f inf bcl st lx ly:
(∀ bc s, bc ∈ bcl →
qif (snd (BC_to_TRS bc s)) f lx ≤ qif (snd (BC_to_TRS bc s)) f ly) →
assoc Nat.eqb f (get_infos (snd (lm_to_ml (map BC_to_TRS bcl) st))) = Some inf →
asg inf (firstn (norm inf) lx) + maxl (skipn (norm inf) lx) ≤
asg inf (firstn (norm inf) ly) + maxl (skipn (norm inf) ly).