fact: Fixpoint subst (y : var) (t1 : term) (t2 : term) : term := match t2 with | Const n => Const n | Id x => if eq_nat_dec x y then t1 else t2 | App t t' => App (subst y t1 t) (subst y t1 t') | Abs t => subst (S y) t1 t end.
imports: mathcomp(ssreflect ssrbool eqtype) Arith List String Lia Program Relations Wellfounded Lexicographic_Product QuickChick(QuickChick) QuickChick.stlc(monad)