Zulip Chat Archive

Stream: lean4

Topic: Structure diamond error


Aurélien Saue (Aug 19 2021 at 14:28):

I'm trying to experiment with the new structure diamond support and I get the error unexpected field access Semigroup.toMul with this minimal example:

class Semigroup (G : Type u) extends Mul G

class Numeric (α : Type u)

class Monoid (M : Type u) extends Semigroup M, Numeric M where
  mul_one (m : M) : m * m = m

class AddMonoid (A : Type u) extends Numeric A

class Semiring (R : Type u) extends AddMonoid R, Monoid R

I'm using nightly-2021-08-18

Leonardo de Moura (Aug 19 2021 at 14:50):

Fixed: https://github.com/leanprover/lean4/commit/7c9158a50e81db0b612bfc142bb24c31a5634de3


Last updated: Dec 20 2023 at 11:08 UTC