Conversion can fail to equate primitive projections with their compatibility constants #18977
Labels
kind: bug
An error, flaw, fault or unintended behaviour.
kind: regression
Problems that were not present in previous versions.
part: primitive records
The primitive record and primitive projection mechanism.
Description of the problem
This is an unforeseen consequence of #18373, I think. If I am right, it highlights a flaw in the attempt to decouple the concept and exact implementation of compatibility constants from the kernel. IIRC we convinced ourselves that the kernel would never need to check if a constant is a compatibility constant because compatibility constants would always be considered transparent and that would allow the kernel to reach the underlying projection. This is correct assuming that there is really no way to make the constants themselves opaque.
Unfortunately, even without the debug syntax I used in the example, it is very easy to make a compatibility constant opaque: any
TransparentState.t
value withtr_cst := Cpred.empty
will do it. This happens for example when using a hint database's transparency state that hasHint Constants Opaque
.CC @rlepigre
Small Coq file to reproduce the bug
Version of Coq where this bug occurs
8.19.0
Last version of Coq where the bug did not occur
8.18
The text was updated successfully, but these errors were encountered: