Module Restrict.
(* Universes which don't appear in the term should be pruned, unless they have names *)
Set Universe Polymorphism.
Ltac exact0 := let x := constr:(Type) in exact 0.
Definition dummy_pruned@{} : nat := ltac:(exact0).
Definition named_not_pruned@{u} : nat := 0.
Check named_not_pruned@{_}.
Definition named_not_pruned_nonstrict : nat := ltac:(let x := constr:(Type@{u}) in exact 0).
Check named_not_pruned_nonstrict@{_}.

Lemma lemma_restrict_poly@{} : nat.