Zulip Chat Archive

Stream: mathlib4

Topic: Indentation after classical


Andrew Yang (Apr 22 2024 at 14:35):

Should we indent after the tactic classical? To me, classical is just a abbreviation for have := Classical.propDecidable so there shouldn't be one, but it seems that it is indented at times? For example here. What is the concensus on this?

Johan Commelin (Apr 22 2024 at 14:38):

If you indent, then it limits the scope of that have.

Johan Commelin (Apr 22 2024 at 14:39):

So in certain proofs, it might even be necessary to indent.

Kyle Miller (Apr 22 2024 at 15:18):

There are quite a few times classical is indented that are purely a consequence of mathport using the tactic pretty printer. I think we've agreed that the style is not to indent (unless you want to limit the scope for some reason).

Andrew Yang (Apr 22 2024 at 18:49):

I see. Thanks for the replies!

Damiano Testa (Apr 22 2024 at 21:00):

By the way, I initially found space sensitivity a nuisance, until I internalised more the difference between a tactic and a tacticSeq.

Mario Carneiro (Apr 22 2024 at 21:33):

Kyle Miller said:

There are quite a few times classical is indented that are purely a consequence of mathport using the tactic pretty printer. I think we've agreed that the style is not to indent (unless you want to limit the scope for some reason).

classical contains a pretty printer annotation telling it to not indent, so this doesn't sound correct. (Indeed, we have the opposite problem: a classical which does not scope over the whole remainder of the block will be pretty printed incorrectly because it doesn't indent.)

Kyle Miller (Apr 22 2024 at 21:39):

That's because you fixed it in the meantime :smile: #4519


Last updated: May 02 2025 at 03:31 UTC