Zulip Chat Archive
Stream: mathlib4
Topic: Missing space in pp ouput for ∑ .. with ..
Michael Stoll (Jun 07 2025 at 15:46):
Just noticed the following.
import Mathlib
-- ∑ n ∈ Finset.range 5with Even n, 0 : ℕ
#check ∑ n ∈ Finset.range 5 with Even n, 0
The pretty-printer does not put a space before with when a numeral precedes it. (It does when I replace 5 by a variable, though.) So it does round-trip, but it still looks ugly.
Yaël Dillies (Jun 07 2025 at 16:03):
Oh, sounds like an issue for me. Will investigate
Damiano Testa (Jun 07 2025 at 21:02):
Maybe just adding a space before with in
syntax (name := bigsum) "∑ " bigOpBinders ("with " term)? ", " term:67 : term
here suffices?
Bhavik Mehta (Jun 07 2025 at 21:21):
Or ppSpace, perhaps?
Last updated: Dec 20 2025 at 21:32 UTC