Section Retracts.
Variable (X Y: Const).
Variable (RE: retract X Y).
Hypothesis consts_agree: forall x: X, ctype X x = ctype Y (I x).
Let inj (c: X) := const (I c).
Let re (f: Y -> nat) (d: Y) :=
match tight RE d with
| Some x => const x
| None => inhab X (f d) (ctype Y d)
end.

Lemma subst_consts_inject_backwards sigma s f:
subst_consts (re f) (sigma • subst_consts inj s) =
(sigma >> subst_consts (re f)) • s.