Could the notation $\{1, a \mid a\in A\}$ make sense? Does having more than one variable before the vertical bar $|$ in the Set-builder notation make sense? For example, does the notation $\{a,b\mid a\in A, b \in B\}$ mean the set $A \cup B $?
This form of writing, if acceptable to mathematicians, can provide us with some benefits. Let's say $A$ is a finite subset of $\mathbb{R}$ and we want to find the minimum value among the square of elements of $A$ and the number 1. That would be  $\min\{\min\{a^2\mid a\in A\},\;1\}$ or $\min(\{a^2 \mid a\in A\}\cup\{1\})$. But would it be mathematically correct or acceptable to simply write $\min\{1,a^2 \mid a\in A\}$?
Would it be meaningful to use the notation $\{x_1,x_2,\cdots,x_n\,|\; P(x_1, x_2,\cdots, x_n)\}$? It is supposed to mean the set of all elements $x_1, \cdots, x_{n-1}$, and $x_n$ such that a certain property is satisfied between the ordered elements of $(x_1, x_2,\cdots, x_n)$ . Actually, we want to define the following notation if appropriate:
$$\{x,y\,|\; P(x, y)\}:= \left\{ x\,|\; \exists\,(x,y) \; \text{ s.t }\; P(x,y)\right\} \cup \left\{ y\,|\; \exists\,(x,y) \; \text{ s.t }\; P(x,y)\right\}$$
You could easily extend this to $n$ elements.
 A: Notation is a matter of clearly communicating an idea.  If your notation is clearly described and unambiguously communicates the idea that you are trying to communicate, then it is "mathematically correct" and "acceptable" to use it.
In the case of the notation described in the question, I would argue that the notation is nonstandard, therefore unclear.  I would also argue that there is standard notation which conveys the same idea, and so it would be preferable to use that standard notation.  Expanding upon this a little, the usual notation (see also MathWorld) should be understood as
$$\bigl\{ \text{(typical set element)} : \text{(conditions or restrictions)} \bigl\}. $$
That is, the expression between the opening curly brace and the vertical line (or colon) should describe the form of a typical element of the set, while expression (or expressions) following the vertical line (or colon) should express any conditions which such a typical element must satisfy (in more sophisticated language, this second datum is a predicate, or a statement which holds true for all elements of the set).  For example

*

*$\{ p/q \in \mathbb{R}: p,q\in\mathbb{Z}, q\ne 0 \}$ is the set of all real numbers of the form $p/q$, where both $p$ and $q$ are integers and $q$ is not zero,


*$\{ (x,y)\in\mathbb{R}^2 : x^2+y^2=1 \}$ is the set of all ordered pairs $(x,y)$ in the real plane which satisfy the equation $x^2 + y^2 = 1$ (this is unit circle in the plane), or


*$\{ X : X \in \mathscr{P}(\mathbb{R}) \land \text{$X$ is compact} \}$ is the set of all compact subsets of of $\mathbb{R}$.
The key point here is that the first datum in set builder notation is a variable or expression which names a typical set element.  From this point of view, the specification $\{1,a^2 : a\in A\}$ is kind of nonsense, and I would prefer to avoid it, and use $ \{1\} \cup \{a^2 : a \in A\}$ instead.
Having said all of the above, one must also consider the audience:

*

*Is the notation intended to be used in a publication?  If so, it is probably best to stick with standard notation.


*Is the notation intended to be used in an assignment for a course, or in a masters or phd thesis?  If so, one might get away with a sentence in the introduction which says something to the effect of "To reduce notation, write
$$ \min\{1, a^2 : a\in A\} := \min\{ \{1\} \cup \{a^2 : a\in A\} \}."$$
This may or may not fly, but that is between the student and their instructor / advisor / committee / whatever.  You might even get away with this in a publication, depending on the editor / reviewers.


*Is the notation intended to be used in one's own personal notes?  If so, the writer is free to adopt whatever notation they like.
