Zulip Chat Archive

Stream: new members

Topic: print redundant parentheses

Mikołaj Gradowski (Dec 21 2019 at 12:48):

is there a way to make Lean always print redundant parentheses? Here's what I mean:
Let's say I have constant apple : a → b → c,
now, when I do #check apple, Lean will print apple : a → b → c, but I want it to print the redundant parentheses like so: apple : a → (b → c).

Is this even possible? Skipping redundant parentheses seems like some additional work than just always printing them so to me it seems reasonable that such an option should exist.

Thanks for the answers!

(Context: The system I described in #new members > error when using theorem/lemma instead of def requires redundant parentheses for well-formed-formulas, but inserting them manually is labour-intensive and error-prone.)

Mario Carneiro (Dec 21 2019 at 12:57):

I don't think the pretty printer has an option for this

Marc Huisinga (Dec 21 2019 at 12:57):

i've looked through the ones shown in #help options. and didn't find any either

Mikołaj Gradowski (Dec 21 2019 at 13:02):

Well that's a pity. Thanks for your time guys!

Last updated: Dec 20 2023 at 11:08 UTC