Section Update.
Context {X: Const}.
Definition update x v (sigma: fin -> exp X) :=
fun y => if x == y then v else sigma y.

Lemma update_typing n Delta Gamma sigma (s: exp X) x A:
Delta ⊩(n) sigma : Gamma -> Delta ⊢(n) s : A -> nth Gamma x = Some A -> Delta ⊩(n) update x s sigma : Gamma.