Zulip Chat Archive
Stream: new members
Topic: how does this rfl work
Kenny Lau (Jun 25 2025 at 16:44):
theorem what (x : PUnit) : x = PUnit.unit := rfl
This looks like magic to me
Aaron Liu (Jun 25 2025 at 16:44):
x is eta expanded to a structure with no fields
Kenny Lau (Jun 25 2025 at 16:45):
theorem the (x : α × β) : x = (x.1, x.2) := rfl
right, so like this as well?
Kenny Lau (Jun 25 2025 at 16:45):
I mean, i'm not complaining that we got auto eta expansion
Kenny Lau (Jun 25 2025 at 16:45):
what's the range of that eta expansion? does it work with rw and simp as well? or only rfl?
Aaron Liu (Jun 25 2025 at 16:45):
Yes, Prod is a structure with two fields, and PUnit is a structure with no fields
Aaron Liu (Jun 25 2025 at 16:46):
Kenny Lau said:
what's the range of that eta expansion? does it work with rw and simp as well? or only rfl?
It's a definitional equality, so it works whenever defeq is tested
Kevin Buzzard (Jun 25 2025 at 16:53):
Welcome to Lean 4 Kenny :-)
Last updated: Dec 20 2025 at 21:32 UTC