Section Forward.
Variables (E: list deq).
Definition gf n := lambda enc n (var 0).
Definition enc_sol (sigma: nat -> nat) (x: fin) :=
match partition_F_G x with
| inl (exist _ x _) => gf (sigma x)
| inr (exist _ (x,y,z) _) => T (sigma y) (sigma x)
end.

Lemma typing_forward sigma:
(sigma ⊢⁺ₑ E) -> [] ⊩(2) enc_sol sigma : Gamma__deq E.