Zulip Chat Archive
Stream: lean4
Topic: Dot placeholders in binders
Eric Wieser (Jul 03 2024 at 17:59):
A puzzle/bug report:
-- surely this should be illegal?
def foo : Nat → Nat → Nat := (fun · => ‹Nat›)
-- what does this print?
#eval foo 1 2
Damiano Testa (Jul 03 2024 at 18:15):
I am surprised that the keyboard even allows to type the definition of foo
!
Kyle Miller (Jul 03 2024 at 18:17):
I think what's going on is that, for example, (fun · => 2)
is fun x => (fun x => 2)
.
It's possible to use ·
here because the binders in fun
syntax are arbitrary terms.
Eric Wieser (Jul 03 2024 at 18:22):
Kyle Miller said:
It's possible to use
·
here because the binders infun
syntax are arbitrary terms.
:double_exclamation:
Kyle Miller (Jul 26 2024 at 23:04):
I just saw that dot in the AlphaProof example and realized this was a sneak peak :laughing: (link to Eric's comment in that thread here)
I remember you also had a question about use ·
being (accidentally) legal.
Last updated: May 02 2025 at 03:31 UTC