Section Subst.
Context {Σ_funcs : funcs_signature}.
Context {Σ_preds : preds_signature}.
Context {ops : operators}.
End Subst.
(* ** Discreteness *)
Ltac resolve_existT := try
match goal with
| [ H2 : @existT ?X _ _ _ = existT _ _ _ |- _ ] => eapply Eqdep_dec.inj_pair2_eq_dec in H2;
[subst | try (eauto || now intros; decide equality)]
end.

Lemma dec_vec_in X n (v : vec X n) :
(forall x, vec_in x v -> forall y, dec (x = y)) -> forall v', dec (v = v').