Set Builder Notation: "lift" the predicate My question is on "lifting" the predicate out of the predicate part of Set Builder Notation.
For Example:
$$
S = \{ \; x \; | \; x \in \mathbb{N} \;\text{ and }\; 0 \lt x \leq 10 \; \}
$$ 
Can I write that as:
$$
\Phi(x) = 0 \lt x \leq 10 \\
S = \{ \; x \; | \; x \in \mathbb{N} \;\text{ and }\; \Phi(x) \;  \}
$$
I am asking this because I want to understand SBN (I'm not a mathematician) and predicates in general. This question could also have been: "How can I bind a predicate to a name?"
 A: The Set-builder notation is exactly an "operation" that transform a predicate into a term (i.e. a name).
We start with the predicate $\varphi(x)$ (e.g. "$x$ is Even") and applying to it the SBN we get the "name" of the set: $E = \{ x \mid \varphi(x) \}$ of all and only those objects that satisfy the predicate (i.e. the set of even numbers).

In the formal syntax, $\varphi$ can be any (well-formed) formula with one free variable.
Thus, if we abbreviate with $\varphi(x)$ the formula:

$\exists z \ (x = 2 \times z) \land x \le 10$

the set $E_{10} = \{ x \mid \varphi(x) \}$ will contain all and only the even numbers up to $10$.

See e.g. :


*

*Herbert Enderton, A Mathematical Introduction to Logic (2nd ed - 2001), Ch.ZERO Useful Facts about Sets, page 2:



We write “$\{ x \mid \text{__} x \text{__} \}$” for the set of all objects $x$ such that $\text{__} x \text{__}$.
We will take considerable liberty with this notation. For example, $\{m, n
 \mid m < n \in \mathbb N \}$ is the set of all ordered pairs of natural numbers for which the first component is smaller than the second. And $\{x \in A \mid \text{__} x \text{__} \}$ is the set of all elements $x$ in $A$ such that $\text{__} x \text{__}$.

A: Yes, you can do this. Here's a rough approximation to how most mathematicians would write it.
Let $\Phi$ denote the unary predicate on $\mathbb{R}$ defined as follows.
$$\Phi(x) \iff 0 < x \leq 10$$
Let $S$ denote the subset of $\mathbb{N}$ defined as follows.
$$ S = \{n \in \mathbb{N} \mid \Phi(n)\}$$
I'd probably write that last one a bit more like so:
Let $S$ denote the subset of $\mathbb{N}$ defined as follows.
$$n \in S \iff \Phi(n)$$
A: A minor point: You should probably define the unary predicate $\Phi$ such that $\forall x\in \mathbb{N}:[\Phi(x)\iff 0 \lt x \leq 10]$. Otherwise OK.
