Section EncodingLemmas.
Variable (C: list X) (n: nat).
Hypothesis (O: ord' (map (ctype X) C) < n).
Global Instance enc_proper:
Proper (equiv (@step X) ++> equiv (@step Y)) (enc_term C).
Global Instance inv_proper:
Proper (equiv (@step Y) ++> equiv (@step X)) (inv_term C).

Lemma subst_consts_subst Z (s: exp X) sigma tau theta zeta (kappa: X -> exp Z):
(forall x, x ∈ vars s -> sigma • subst_consts zeta (tau x) >* subst_consts kappa (theta x)) ->
(forall x, x ∈ consts s -> sigma • zeta x >* kappa x) ->
sigma • subst_consts zeta (tau • s) >* subst_consts kappa (theta • s).