proposition: Theorem pure_typing_to_typing {Gamma M t} : pure_typing Gamma M t -> exists P, M = erase P /\ typing Gamma P t.
proof: Proof. elim. - move=> > /typing_var /typing_contains H /H {H} [?] /= [->] /typing_many_ty_absI ?. eexists. constructor; last by eassumption. by rewrite erase_many_ty_abs. - move=> > _ [P] [-> +] _ [Q] [-> +] => /typing_app H /H /typing_contains {}H /H. move=> [?] /= [->] /typing_many_ty_absI ?. eexists. constructor; last by eassumption. by rewrite erase_many_ty_abs. - move=> > _ [?] [->] /typing_abs /typing_many_ty_absI ?. eexists. constructor; last by eassumption. by rewrite erase_many_ty_abs. Qed.
imports: List Lia Relation_Definitions Relation_Operators Operators_Properties Undecidability.SystemF.SysF Undecidability.SystemF.Autosubst.syntax Undecidability.SystemF.Autosubst.unscoped Undecidability.SystemF.Util(Facts poly_type_facts pure_term_facts term_facts typing_facts iipc2_facts) ssreflect ssrbool ssrfun