Section Evaluation.
Variable (M : model).
Fixpoint eval (ρ : nat -> tpred) (s : poly_type) : tpred :=
match s with
| poly_var n => Var M (ρ n)
| poly_arr s t => Arr M (eval ρ s) (eval ρ t)
| poly_abs s => All M (fun d => eval (d .: ρ) s)
end.
Instance eval_ext :
Proper (pointwise_relation _ pw_iff ==> eq ==> pw_iff) eval.
Definition D : model.
(* ** Logical Relation  *)
(* ** Logical relation on contexts  *)
Definition C (Γ : nat -> poly_type) (ρ : nat -> tpred) : (nat -> term) -> Prop :=
fun σ => forall n, E (Γ n) ρ (σ n).

(* ** Fundamental theorem & Strong Normalisation  *)
Lemma E2_ind s t ρ1 ρ2 p :
(forall P Q, E s ρ1 P -> E t ρ2 Q -> (forall P', step P P' -> p P' Q) -> (forall Q', step Q Q' -> p P Q') -> p P Q) ->
forall P Q, E s ρ1 P -> E t ρ2 Q -> p P Q.