Zulip Chat Archive

Stream: new members

Topic: How do I subtract endomorphisms?


Scott Carnahan (Oct 03 2023 at 03:30):

I can't seem to use a minus sign when dealing with endomorphisms of a module - The computer assumes I want a heterogeneous subtraction.

import Mathlib.Algebra.Module.LinearMap

theorem sub_self_zero [CommRing R] [AddCommMonoid V] [Module R V] (f : Module.End R V) : f-f = 0 := sorry

Is this expected behavior?

Patrick Massot (Oct 03 2023 at 03:35):

What if you assume V itself has a negation? I mean use AddCommGroup V instead of AddCommMonoid V.

Scott Carnahan (Oct 03 2023 at 03:40):

Oh wow, it works! Thank you!

Scott Carnahan (Oct 03 2023 at 03:40):

(deleted)


Last updated: Dec 20 2023 at 11:08 UTC