(*****************************************************************************)
(*                                                                           *)
(*                     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 qif_swap t qic s:
∀ qif1 qif2,
(∀ f, f ∈ (functions_of_term t) → qif1 f = qif2 f) →
term_assignment variable function constructor qic qif1 (subst s t) =
term_assignment variable function constructor qic qif2 (subst s t).