Zulip Chat Archive

Stream: general

Topic: smul_smul_smul_comm


Yaël Dillies (Jan 11 2022 at 20:23):

Do you want such an abomination in mathlib?

import algebra.algebra.basic

lemma smul_smul_smul_comm {α β γ δ : Type*} [has_scalar α β] [has_scalar α γ] [has_scalar β δ]
  [has_scalar α δ] [has_scalar γ δ] [is_scalar_tower α β δ] [is_scalar_tower α γ δ]
  [smul_comm_class β γ δ] (a : α) (b : β) (c : γ) (d : δ) :
  (a  b)  (c  d) = (a  c)  b  d :=
by { rw [smul_assoc, smul_assoc, smul_comm b], apply_instance }

Thomas Browning (Jan 11 2022 at 20:26):

Several times now, I've run into things sort of like this (e.g., (a+b)+(c+d)=(a+c)+(b+d)), and wished that mathlib had the lemma.

Yaël Dillies (Jan 11 2022 at 20:27):

docs#add_add_add_comm :wink: (I think I added that one?)

Yaël Dillies (Jan 11 2022 at 20:33):

Ah no, I don't remember which one I added then

Johan Commelin (Jan 11 2022 at 20:40):

It's time for a smaug tactic, which is like ring, but for smul. :stuck_out_tongue_wink:

Bhavik Mehta (Jan 11 2022 at 20:42):

Johan Commelin said:

It's time for a smaug tactic, which is like ring, but for smul. :stuck_out_tongue_wink:

Perhaps @Patrick Stevens might want to write this :stuck_out_tongue_closed_eyes:

Patrick Stevens (Jan 11 2022 at 20:51):

Hah, there's a blast from the past! (Bhavik and I interacted during the National Cipher Challenge a decade ago, where I had the username Smaug.)

Johan Commelin (Jan 11 2022 at 20:51):

You still have on github, don't you?

Patrick Stevens (Jan 11 2022 at 20:51):

Oh I do - I forgot its vestiges were still with me, so in fact no backstory is required

Mario Carneiro (Jan 13 2022 at 01:56):

I think we should certainly have this lemma where applicable. If I added it, it will probably have the name add_comm_four or something like it


Last updated: Dec 20 2023 at 11:08 UTC