Zulip Chat Archive
Stream: lean4
Topic: matching implicit args
Reid Barton (May 23 2023 at 22:40):
Is it possible to pattern match on implicit function arguments with the fun | ...
syntax?
Reid Barton (May 23 2023 at 22:42):
e.g. (doesn't work)
theorem f : ∀ {x : ℕ}, x = x := fun
| {.zero} => rfl
| {.succ n} => rfl
Reid Barton (May 23 2023 at 22:43):
Oh I understand now what the error message was telling me--use @fun
to turn the arguments into regular arguments.
Last updated: Dec 20 2023 at 11:08 UTC