This is not a mathematical question as such, but more about the correct grammatical way to describe the mathematical terms that are being introduced in a sentence.
I am used to writing sentences in this way:
A deterministic policy, $\pi$, is a function, $\pi: S \rightarrow A$, that selects an action, $a \in A$, for a state, $s \in S$.
But a reviewer for one of my paper submissions came back with a comment that I use too many commas around my variables. I used to think that my way is the correct way, since there is a pause when introducing the respective mathematical term.
I have seen papers that use either my approach, or a single comma after the term, or no commas at all.
What is the correct grammatical way to introduce mathematical terms in these kinds of sentences?