Fixpoint size t :=
match t with
| var n => 1
| app s t => size s + size t
| lambda s => 1 + size s
end.
Coercion app : term >-> Funclass.
Coercion var : nat >-> term.
Instance term_eq_dec : eq_dec term.

Lemma bound_closed_k s k n u : bound n s = true -> k >= n -> subst s k u = s.
Proof with eauto.