Adapting to Coq PR #7257 which fixes a sensitivity of unification wrt alphabetic order #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear maintainers of FCF,
We realized that Coq unification had a sensitivity on the ASCII order of variable names (!!) and a fix has been prepared coq/coq#7257.
FCF is one of the developments which we track (via cross-crypto) and which exposes the case of a unification problem solved by ordering variable names alphabetically. Indeed, there is in
DistRules.v
a unification problem?s'@{a:=a; s':=s'; x:=a; x0:=s'} == s'
for which the solution?s':=s'
is chosen becauses'
comes beforex0
in ASCII order. [To clarify all risk of confusion, the fact that there are 3 distinct uses of the names'
in the problem does not matter: one,?s'
is the name of the evar, one is the name of the variables'
in the context of the evar?s'
, and the third is the name of an eponymous variable in the context of the current goal; otherwise said, the problem could have equivalently be reformulated?e@{a:=a; s':=S; x:=a; x0:=S} == S
and expose the same two possible solutions?e:=s'
or?e:=x0
for?e
.]Coq PR coq/coq#7257 makes the solution to this problem independent of the exact names of variables by systematically chosing the most recent name, so, here,
x0
. This breaks the compilation ofDistRules.v
. This PR against FCF provides a backward-compatible fix so that FCF can continue to compile after coq/coq#7257 is merged.Please tell me if you have any question.