-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(data/set_like/basic): add a congr lemma #10643
base: master
Are you sure you want to change the base?
Conversation
eric-wieser
commented
Dec 6, 2021
src/data/set_like/basic.lean
Outdated
for dome discussion about this lemma. It can occasionally result in `simp, simp` being needed. -/ | ||
@[congr] lemma dep_congr {ι α} [set_like A B] | ||
{p : ι → A} (f : Π i, p i → α) : | ||
∀ {i j} (x : p i) (h : i = j), f i x = f j ⟨x, h ▸ x.prop⟩ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in that Zulip thread, this should not be a congr lemma because it 1) does higher-order matching, 2) it does it on every subterm (since the head symbol is a variable and thus indexing bails out), and 3) it can't rewrite at x.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious to see whether mathlib builds anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand @gebner correctly, this is not the correct solution. Instead, core should be fixed. But I don't know if anyone wants to pour energy in that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's my understanding too. It would be great if we could check if lean4 core works for this type of case, if we decide no one has the energy to make it work in lean3
See [this Zulip thred](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/simp.20simp/near/263872040) | ||
for dome discussion about this lemma. It can occasionally result in `simp, simp` being needed. -/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See [this Zulip thred](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/simp.20simp/near/263872040) | |
for dome discussion about this lemma. It can occasionally result in `simp, simp` being needed. -/ | |
See [this Zulip thread](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/simp.20simp/near/263872040) | |
for some discussion about this lemma. It can occasionally result in `simp, simp` being needed. -/ |
Hopefully the simp
fixes can be done in some version of Lean!
Removing |