Zulip Chat Archive

Stream: general

Topic: diamond in data.complex.module


Heather Macbeth (Aug 23 2021 at 02:18):

I just hit what seems to be two competing instances of the -action on ; wanted to report it in case it's not known.

import data.complex.module

-- this fails
example :
  (sub_neg_monoid.has_scalar_int : has_scalar  ) = (complex.has_scalar : has_scalar  ) :=
rfl

Eric Wieser (Aug 23 2021 at 07:17):

For reference: docs#complex.has_scalar, docs#complex.comm_ring.

Eric Wieser (Aug 23 2021 at 07:18):

The latter has the wrong definition of nsmul and gsmul

Eric Wieser (Aug 23 2021 at 07:19):

They need to both be defined as λ r x, ⟨r • x.re - 0 * x.im, r • x.im + 0 * x.re⟩

Eric Wieser (Aug 23 2021 at 07:47):

(to match the has_scalar, which in turn matches (↑r) * x when r : ℝ)


Last updated: Dec 20 2023 at 11:08 UTC