Zulip Chat Archive

Stream: new members

Topic: How to use omit?


Michael Novak (Dec 27 2025 at 13:12):

Lean suggest I use omit of some unnecessary assumption in a lemma, but I don't understand where exactly I can put this line. Do you have a link for some documentation of this tacitc?

Weiyi Wang (Dec 27 2025 at 13:16):

omit (var) in
theorem foo : ...

omit [TypeClass T] in
theorem foo :...

Weiyi Wang (Dec 27 2025 at 13:17):

I don't know where the doc is but I often search mathlib code base to find examples

Michael Novak (Dec 27 2025 at 13:19):

for some reason I get a red error line under the word omit when I do it like this

Michael Novak (Dec 27 2025 at 13:24):

Oh, that was because I had documentation string before it. Now when I put it before the documentation string it works. Thank you very much for the help!


Last updated: Feb 28 2026 at 14:05 UTC