Section InverseTransport.
Local Arguments many_pure_app : simpl never.
Local Arguments map : simpl never.
(* construct semi-unification term from a polymorphic type pruning quantification *)
Fixpoint prune (s: poly_type) : SU.term :=
match s with
| poly_var x => SU.atom (1 + x)
| poly_arr s t => SU.arr (prune s) (prune t)
| poly_abs _ => SU.atom 0
end.
Fact substitute_prune_ex τ t : exists ψ, SU.substitute ψ (prune t) = prune (subst_poly_type τ t).
Fact substitute_prune {σ t} :
SU.substitute (funcomp prune σ) t = prune (subst_poly_type σ (SU_term_to_poly_type t)).
End InverseTransport.

(* typability to semi-unification solution *)
Lemma inverse_transport : SysF_TYP (sval HM_W2) -> SU.LU2SemiU (SUs, SUt0, SUt1).