Zulip Chat Archive

Stream: lean4

Topic: Custom eliminators


Trebor Huang (Dec 09 2022 at 11:22):

I somehow have the impression that Lean 4 allows you to define your own eliminators and use pattern matching with them. But I can't find the documentation. Is that a real feature or am I hallucinating like GPT3?

Mario Carneiro (Dec 09 2022 at 11:24):

That sounds like induction using

Mario Carneiro (Dec 09 2022 at 11:24):

there is also a way to register your functions as if they were using'd by default

Mario Carneiro (Dec 09 2022 at 11:25):

however, you probably hallucinated that there was documentation about it ;)

Mario Carneiro (Dec 09 2022 at 11:27):

the attribute to register custom eliminators is @[eliminator]

Jannis Limperg (Dec 09 2022 at 11:43):

There's also an attribute for custom patterns, I think @[match_pattern].


Last updated: Dec 20 2023 at 11:08 UTC