Zulip Chat Archive

Stream: mathlib4

Topic: Space before semicolon linter incompatible with variance


Yaël Dillies (Aug 12 2025 at 06:05):

Yesterday I PRed a few results about the variance Var[X ; μ] in #28248. Yesterday is also the day I learned that we had a linter for spaces before a semicolon: ; :neutral: What should I do?

Etienne Marion (Aug 12 2025 at 06:37):

Personnally I have been writing Var[X; mu].

Yaël Dillies (Aug 12 2025 at 06:38):

But isn't ; supposed to be an infix?

Damiano Testa (Aug 12 2025 at 06:40):

Not having been educated in France, I find spaces before punctuation very jarring.

Etienne Marion (Aug 12 2025 at 06:46):

Looking at the variance file, it’s all written without a space, and the notation is defined without a space too.

Yaël Dillies (Aug 12 2025 at 06:46):

But isn't it supposed to mimic the XμX \sim μ notation?

Yaël Dillies (Aug 12 2025 at 06:47):

You don't write X ⁣ ⁣μX\!\!\sim μ, I presume.

Etienne Marion (Aug 12 2025 at 06:54):

Indeed I don't write that, but that's not how I interpret the notation. To me XμX \sim \mu means XX has law μ\mu under some probability measure on the domain of XX, while in Var[X; μ], μ is the measure on the domain of XX, not its law. So it's more like "the variance of XX with respect to the measure μ\mu", which I would write I think Varμ[X]\mathrm{Var}_{\mu}[X].

Yaël Dillies (Aug 12 2025 at 06:55):

If it's the fact that we're using punctuation as an infix that's jarring, maybe we should find a different symbol?

Kim Morrison (Aug 12 2025 at 06:58):

Var[X; mu] seems not-at-all jarring to me?

Yaël Dillies (Aug 12 2025 at 07:04):

Yes, but in PFR there's suddenly dk[κ ; μ # η ; ν] and then it's not clear dk[κ; μ # η; ν] is the right choice

Yaël Dillies (Aug 12 2025 at 07:05):

Sorry, I didn't imagine this would be at all polemical

Sébastien Gouëzel (Aug 12 2025 at 07:30):

I don't think dk[κ; μ # η; ν]is a problem either.


Last updated: Dec 20 2025 at 21:32 UTC