Zulip Chat Archive

Stream: mathlib4

Topic: issue with `AddGroup R` instance


Tomas Skrivan (May 16 2024 at 14:28):

There are two ways how to synthesize AddGroup G that are not defeq under reducible transparency. It is causing me issues when using simplifier.

import Mathlib

example {R} [NormedAddCommGroup R] :
  (NormedAddGroup.toAddGroup : AddGroup R)
  =
  (AddCommGroup.toAddGroup : AddGroup R) := by with_reducible rfl

The proof works with plain rfl but not with with_reducible rfl, is this expected behavior or not?

Matthew Ballard (May 16 2024 at 14:33):

Uh oh

Matthew Ballard (May 16 2024 at 14:33):

What is the blocker?

Tomas Skrivan (May 16 2024 at 14:34):

I didn't investigate yet

Matthew Ballard (May 16 2024 at 14:43):

This is intentional by with_reducible_and_instances rfl works

Tomas Skrivan (May 16 2024 at 14:45):

Ohh I'm stupid :man_facepalming: hmm then I do not understand why the (← withReducibleAndInstances <| isDefEq x val) check in simplifier fails on this. I have to investigate more.

Matthew Ballard (May 16 2024 at 14:46):

FWIW, I think it's easy to forget that instance projections are not reducible


Last updated: May 02 2025 at 03:31 UTC