paramcoq icon indicating copy to clipboard operation
paramcoq copied to clipboard

sort polymorphic constants are not handled properly

Open tabareau opened this issue 1 month ago • 0 comments

When a sort poly constant is translated, the sort variable is not propagated and thus substituted with Type instead. Given that the names of universe level change also, I suspect that the instance is not propagated at all, and infer again at definition time.

#[universes(polymorphic)]
Definition id_poly@{s;l} (A:Type@{s;l}) : A -> A := fun x => x.

Definition id@{l} := id_poly@{Type;l}.

Parametricity id_poly.
Parametricity id.

(* Error: Universe instance length for id_poly_R is (1 | 1) but should be (0 | 1). *)

tabareau avatar Oct 24 '25 16:10 tabareau