Is it a convention that the word "where" following a mathematical formula needs a comma before it? I am not a native english speaker. I have learned about defining and non-defining relative clauses from english grammar books. The following example from p.12 of Hungerford's Algebra illustrates what is confusing me:

Theorem 6.7. (Fundamental Theorem of Arithmetic) Any positive integer $n \gt 1$ may be written uniquely in the form $n = p_1^{t_1}p_2^{t_2} \cdots p_k^{t_k}$, where $p_1 \lt p_2 \lt \cdots \lt p_k$ are primes and $t_i \gt 0$ for all $i$.

I think the clause "where $p_1 \lt p_2 \lt \cdots \lt p_k$ are primes and $t_i \gt 0$ for all $i$" is a defining relative clause since it gives essential information about the form $n = p_1^{t_1}p_2^{t_2} \cdots p_k^{t_k}$. Grammar books tell me not to use commas in defining relative clauses, so I can't understand why there is a comma preceding "where". I looked up the word "where" in three mathematical textbooks and all of them use commas between formulae and the words "where" in similar situations. Here is another example extracted from Theorem 4.59.(Sylow Theorems) of Anthony W. Knapp's Basic Algebra, Digital Second Edition:

Let $G$ be a finite group of order $p^mr$, where $p$ is prime and $p$ does not divide $r$ .

So, is it a convention in mathematical writing? I would appreciate your help with this situation.
 A: Consider an example:
(1)$\qquad$"We can find $x\in A$ such that $f(x,y)=0$, where $g(y)\in B$"
(2)$\qquad$"We can find $x\in A$ such that $f(x,y)=0$ where $g(y)\in B$".
The first statement could be rewritten, with a change of emphasis, as
$\qquad$"We can find $(x,y)\in A\times \{y:g(y)\in B\}$ such that $f(x,y)=0$".
The second statement has the same structure as "There is fire where there is smoke" and might be interpreted as
$\qquad$"We can find $x\in A$ such that $f(x,y)=0$ whenever $g(y)\in B$".
Usually in mathematics, this latter type of interpretation is unintended, and the comma is needed.
Ideally, all notation should be defined before it is used. However, it often happens that the defining condition—for example, "where $c$ is some positive constant"—is not the focus of interest of the statement; so we may not wish to preface our statement as "There is some positive constant $c$ such that ... ". This is especially the case when the notation and condition are routine and conventional. In such cases, the where clause (preceded, of course, by a comma!) is unobjectionable.
