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 <:].
The following code
Fails on the last line with
On the other hand, if the import of
Order.TTheory
is before the declaration offoo
or not here at all, everything works.According to @CohenCyril on zulip : this is a bug in the seeded/random name generator.