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  *)

Lemma K_arr s t ρ u P :
K (poly_arr s t) ρ (abs u P) <->
forall ξ1 ξ2 Q, E s ρ Q -> E t ρ (subst_term (ξ1 >> poly_var) (Q .: ξ2 >> var) P).