Zulip Chat Archive

Stream: general

Topic: eq_comm with implicit args


Yakov Pechersky (Dec 23 2020 at 03:04):

Is it possible to either redefine eq_comm or provide another version that is like:

lemma eq_comm {α : Sort u} a b : α : a = b  b = a :=
eq.symm, eq.symm

Often, I have to rely on eq_comm to rearrange some equalities so that iff statements like docs#map_eq_some' can actually proc. Alternatively, suggestions on how to get such iffs to simp when the equality is in the RHS = LHS form would be welcome.

Mario Carneiro (Dec 23 2020 at 04:14):

Is it so bad to write @eq_comm _?

Mario Carneiro (Dec 23 2020 at 04:14):

I don't understand your example use case

Yakov Pechersky (Dec 23 2020 at 04:19):

No, it's not so bad.

Chris Hughes (Dec 23 2020 at 22:26):

I agree that they should be explicit arguments, but I don't feel very strongly about it.

Yury G. Kudryashov (Dec 23 2020 at 23:36):

lemma eq_comm' {α : Sort u} (a b : α) : a = b  b = a := eq_comm

Yury G. Kudryashov (Dec 23 2020 at 23:36):

In some cases I added symmetric versions of simp lemmas.


Last updated: Dec 20 2023 at 11:08 UTC