Zulip Chat Archive
Stream: Is there code for X?
Topic: a + b - c = a - c + b
Eric Wieser (Jun 29 2021 at 08:45):
library_search
is being slow for me. Do we have the versions of these lemmas using subtraction?
import algebra.group.basic
example {A} [add_comm_monoid A] (a b c : A) : a + b + c = a + c + b := add_right_comm _ _ _
example {A} [add_comm_group A] (a b c : A) : a + b - c = a - c + b := by library_search
example {A} [add_comm_monoid A] (a b c : A) : a + (b + c) = b + (a + c) := add_left_comm _ _ _
example {A} [add_comm_group A] (a b c : A) : a + (b - c) = b + (a - c) := by library_search
Eric Wieser (Jun 29 2021 at 08:46):
Ah, it finished - we have the first as (sub_add_eq_add_sub a c b).symm
, it can't find the second
Eric Wieser (Jun 29 2021 at 08:47):
Do add_sub_right_comm
and add_sub_left_comm
make sense as more discoverable names for these?
Last updated: Dec 20 2023 at 11:08 UTC