proposition: Lemma ren_subst_term xi sigma t : ren xi (subst sigma t) = subst (funcomp (ren xi) sigma) t.
proof: Proof. elim: t xi sigma => /=. - done. - move=> ? IH1 ? IH2 ??. by rewrite IH1 IH2. - move=> ? IH ??. rewrite IH. congr lam. apply: ext_subst_term. case; first done. move=> ?. by rewrite /= !ren_ren_term. Qed.
imports: Undecidability.LambdaCalculus.Lambda PeanoNat Lia List Relations ssreflect