coq icon indicating copy to clipboard operation
coq copied to clipboard

Warn when automatically lowering an inductive declared with `: Type` to Prop

Open SkySkimmer opened this issue 1 year ago • 2 comments

  • option to disable the lowering and option to default declare dependent eliminators for inductives with explicit Prop (for compat when fixing the warning by putting explicit Prop)

Inductives with no explicit type (eg Inductive foo := C.) can still get silently put in Prop.

Maybe it would make sense to support _ as "pick Prop or Type as needed" to make it easier to port indexed inductives? eg Inductive foo : nat -> Type := . would become Inductive foo : nat -> _ := . (currently it fails saying "not an arity"). But it doesn't look that nice so probably not worth doing.

Funind behaviour is slightly changed as we now force its inductives in Type instead of letting them be lowered (forward compatible way to disable the warning).

Overlays:

  • https://github.com/LPCIC/coq-elpi/pull/624

SkySkimmer avatar Apr 29 '24 15:04 SkySkimmer

Maybe the options should be attributes instead, not sure.

SkySkimmer avatar Apr 30 '24 11:04 SkySkimmer

@coqbot run full ci

SkySkimmer avatar May 16 '24 14:05 SkySkimmer

@coqbot run full ci

ppedrot avatar May 22 '24 17:05 ppedrot

category theory failure is spurious

SkySkimmer avatar May 23 '24 11:05 SkySkimmer

@coqbot run full ci

ppedrot avatar May 28 '24 06:05 ppedrot

@coqbot merge now

ppedrot avatar May 29 '24 10:05 ppedrot

@ppedrot: Please take care of the following overlays:

  • 18989-SkySkimmer-warn-auto-lower.sh

coqbot-app[bot] avatar May 29 '24 10:05 coqbot-app[bot]