(* Autor(s): Andrej Dudenhefner (1) Affiliation(s): (1) Saarland University, Saarbrücken, Germany *)
From Undecidability.SystemF.Util Require Import Facts poly_type_facts typing_facts.
Local Arguments nth_error_In {A l n x}.
Local Arguments In_nth_error {A l x}.
(* intuitionistic implicational propositional calculus of order 2  *)
Definition iipc2 (Gamma: environment) (t: poly_type) := exists P, typing Gamma P t.
Arguments iipc2 : simpl never.

Corollary last_poly_var_typingI {t Gamma}:
(if last_poly_var t is Some x then In (poly_var x) Gamma else False) -> iipc2 Gamma t.