Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting use of "~=" in Coq.Program.Equality and Coq.Structures.Equalities #16

Open
imaxw opened this issue Jul 31, 2022 · 0 comments

Comments

@imaxw
Copy link

imaxw commented Jul 31, 2022

Description of the problem

The Coq.Structures.Equalities library file declares the ~= notation (in the empty scope) to mean inequivalence according to some equivalence relation:

Module Type EqNotation (Import E:Eq).
  Infix "==" := eq (at level 70, no associativity).
  Notation "x ~= y" := (~eq x y) (at level 70, no associativity).
End EqNotation.

The Coq.Program.Equality library file, however, declares it to mean heterogeneous-type equality:

Notation " x ~= y " := (@JMeq _ x _ y) (at level 70, no associativity).

This is not exactly a bug but leads to annoying redefinition warnings when including EqNotation in a module where the Equality library is imported.

Since most projects importing Coq.Program.Equality are probably doing so for access to its tactics, and not making use of the declared ~= notation, it is probably unnecessary to export that notation at all. I cannot find any actual uses of it within the standard library, so simply deleting the notation from Coq.Program.Equality is probably an acceptable solution. If in fact it is being used, another solution would be to declare it in type_scope or program_scope rather than the empty scope. However, it is in any case probably bad practice to use the same notation for equality in one setting and inequality in another, so probably some change should be made to one or the other of these declarations.

Coq Version

The Coq Proof Assistant, version 8.15.2
compiled with OCaml 4.13.1

@imaxw imaxw changed the title Conflicting use of "~=" in Coq.Program.Equality.EqNotation and Coq.Structures.Equalities Conflicting use of "~=" in Coq.Program.Equality and Coq.Structures.Equalities Jul 31, 2022
SkySkimmer referenced this issue in SkySkimmer/coq Aug 29, 2022
SkySkimmer referenced this issue in SkySkimmer/coq Aug 29, 2022
SkySkimmer referenced this issue in SkySkimmer/coq Sep 5, 2022
@proux01 proux01 transferred this issue from coq/coq Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant