Open kyoDralliam opened 5 years ago
The problem with t
here is that it is "optimized" by Coq to land in Prop
so it is expected that we cannot derive Subterm.
For reference, it can be fixed either by replacing Type
by Set
or by adding an explicit universe annotation:
Inductive t@{u} : unit -> Type@{u} :=
| base : t tt.
Derive Subterm for t.
However it would be great if Equations could raise a more meaningful error when trying to derive the subterm relation of an inductive in Prop, for instance "Subterm relation cannot be derived for Prop-valued inductives".
On Equations 1.2, Coq 8.10.0, the following code has a puzzling behaviour. Derive Subterm fail to solve all obligations when the indexed family has one constructor, but it works when the constructor is duplicated...