Module Import Prog := Syn.MkProg (BAProg).
Definition rank : function -> nat := ltac:(autorank function_beq ranklist).
(* QI *)
Definition cs (c : constructor) := 1. (* same for all *)
Ltac qif_monotonic_tac :=
repeat (apply forall2_le_suml || apply forall2_le_maxl ||
apply Plus.plus_le_compat_r || apply Plus.plus_le_compat_l || apply Plus.plus_le_compat ||
apply Nat.max_le_compat_r || apply Nat.max_le_compat_l || apply Nat.max_le_compat ||
apply Mult.mult_le_compat_l || apply Mult.mult_le_compat_r
); trivial.

Lemma qif_monotonic : monotonicity_qif qif.