Zulip Chat Archive

Stream: mathlib4

Topic: dot notation with Multiplicative


Filippo A. E. Nuccio (Nov 03 2023 at 13:02):

This dot notation for Multiplicative no longer works

import Mathlib.Algebra.Group.TypeTags

example (a : Multiplicative ) : a.toAdd = 0 := by
  sorry
-- invalid field notation, function 'Multiplicative.toAdd' does not have argument with type (Multiplicative ...) that can be used, it must be explicit or implicit with a unique name

and I find myself writing

example (a : Multiplicative ) : Multiplicative.toAdd a = 0 := by
  sorry

Is this expected?

Yaël Dillies (Nov 03 2023 at 13:55):

This is the general issue with bundled morphisms not taking dot notation anymore. This is really annoying.

Filippo A. E. Nuccio (Nov 03 2023 at 13:56):

Indeed!

Eric Rodriguez (Nov 03 2023 at 14:31):

Have we made an RFC for this? Maybe the solution is to upstream something like FunLike, or an annotation on a type that says that 'this type should be coerced to a function to allow dot notation'

Filippo A. E. Nuccio (Nov 03 2023 at 14:32):

Eric Rodriguez said:

Have we made an RFC for this? Maybe the solution is to upstream something like FunLike, or an annotation on a type that says that 'this type should be coerced to a function to allow dot notation'

RFC?

Yaël Dillies (Nov 03 2023 at 14:33):

Reasonable Feature Cemetery Request For Comment

Eric Rodriguez (Nov 03 2023 at 14:42):

The let one is doing pretty well :)


Last updated: Dec 20 2023 at 11:08 UTC