Closed ejgallego closed 4 years ago
Typical error if ssrnat doesn't pre-load Setoid is:
Error:
not a rewritable relation: ((mx _ \+ _ = mx _ -> (_ = _) * (_ = Unit)) /\
((_ = _) * (_ = Unit) -> mx _ \+ _ = mx _))
in rule cancelMx
Hi Emilio, thanks for bringing this up! There is an alternative fix, namely, we could remove ssrnat
from the list of imports, since it turns out there is no real dependency here. What do you think?
I guess that Setoid
(or Morphisms
) dependency comes from elsewhere then.
Ah, I keep forgetting that this kind of dependency is transitive. mutex
imports fcsl.pcm
which imports mathcomp.ssrnat
which indirectly exports Coq.Setoid
hence the rewrite
tactic is able to do setoid rewrites.
Ah, I keep forgetting that this kind of dependency is transitive.
mutex
importsfcsl.pcm
which importsmathcomp.ssrnat
which indirectly exportsCoq.Setoid
hence therewrite
tactic is able to do setoid rewrites.
Thanks Anton; indeed, this kind of implicit global effects are pretty weird and far from modular. IMHO it is good to start documenting them for the day we make them more explicit.
A couple of files depend on
Setoid
rewriting implicitly.As of today,
Setoid
rules are placed in scope byssrnat
, but IMO you should not rely on this behavior asssrnat
may stop requiringSetoid
in the future.The patch is fully backwards compatible.