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

Importing Order.TTheory in the middle break the code #407

Open
hivert opened this issue Dec 11, 2023 · 0 comments
Open

Importing Order.TTheory in the middle break the code #407

hivert opened this issue Dec 11, 2023 · 0 comments

Comments

@hivert
Copy link
Member

hivert commented Dec 11, 2023

The following code

From HB Require Import structures.
From mathcomp Require Import all_ssreflect.

Structure foo : Type := Foo {fooval :> seq nat; _ : size fooval == 1}.
HB.instance Definition _ := [isSub of foo for fooval].
HB.instance Definition _ := [Equality of foo by <:].

Import Order.TTheory.   (* HERE *)

Structure bar : Type := Bar {barval :> seq nat; _ : size barval == 0}.
HB.instance Definition _ := [isSub of bar for barval].
HB.instance Definition _ := [Equality of bar by <:].

Fails on the last line with

 Error: eqtype_Equality__to__eqtype_hasDecEq already exists.

On the other hand, if the import of Order.TTheory is before the declaration of foo or not here at all, everything works.

According to @CohenCyril on zulip : this is a bug in the seeded/random name generator.

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