Zulip Chat Archive
Stream: mathlib4
Topic: Sum.elim equality
Martin Dvořák (Mar 04 2024 at 10:39):
It seems to me that we either miss a lemma or a simp tag...
import Mathlib
example {α β γ : Type*} {u u' : α → γ} {v v' : β → γ}
(huv : Sum.elim u v = Sum.elim u' v') :
v = v' := by
simp_all [Function.funext_iff]
Eric Wieser (Mar 04 2024 at 10:50):
That lemma can't be simp
, it would try to apply on any function equality
Eric Wieser (Mar 04 2024 at 10:51):
I think you probably want Sum.elim u v = Sum.elim u' v' \iff u = u' \and v = v'
?
Martin Dvořák (Mar 04 2024 at 10:56):
Yes.
Martin Dvořák (Mar 04 2024 at 11:08):
If this lemma is really missing (it is not just my overlook), std
deserves it IMO.
Martin Dvořák (Mar 05 2024 at 14:19):
https://github.com/leanprover/std4/issues/685
Last updated: May 02 2025 at 03:31 UTC