Relation between open sentences and sets (conceptual question) Hi I'm a college student getting into the more proof oriented side of math. I was reviewing Mathematical Proofs, A Transition to Advanced Mathematics 2nd edition and after thinking about chapters 1 and 2 came up with a question. Can sets be thought of us as the solution set of an open sentence over a specific domain? 
Sets can be described in a number of ways: a list of numbers following some pattern {2,4,6,...}; an expansion of sorts {2x: x is a natural number}; and what got me thinking about this whole thing, elements which satisfy some condition {x is even: x>0}. For example x>0 could be considered an open sentence with the set of even numbers as the domain. 
If all sets could be described as elements that satisfy some condition (or open sentence) wouldn't that mean sets are the solution sets of open sentences? Then normal set operations like intersections, unions, differences of sets, or partitions of sets could be thought of in terms of doing those operations to solution sets of open sentences. These open sentences may even be seemingly unrelated except for sharing similar solution sets. 
Also for an open sentence to have a solution set it needs to have a set as its domain. However this domain could be considered as a solution set to an open sentence containing its own domain (if what I'm asking is true atleast), and that type of thinking could go on infinitely. 
So is this connection between sets and open sentences correct? Any thoughts or advice about this whole topic are welcome. Maybe it seems like a pointless question, but I enjoy finding interrelations between seemingly separate parts of math.
 A: Your musings make excellent sense, but they lead into somewhat subtle territory where there are some pitfalls to avoid that you can't be expected to notice for yourself.
When set theory was first invented in the late 1800s, the general idea among the inventors was that a set is simply a more convenient way to talk about an open sentence, and use algebraic techniques to manipulate them. This is the idea you're trying to formulate here.
After a few decades of work, however, it became clear that this way of thinking, as useful as it is in many situations, can also sometimes lead to blatant nonsense. Most famously this is demonstrated by Russell's paradox, which considers the open sentence "$x$ is a set that does not have itself as an element". If this open sentence corresponds to a set, then that set would need to be an element of itself exactly if it isn't an element of itself. Madness!
These discoveries were the cause of much arguing and grief among mathematicians in the years around 1900, but the consensus that eventually emerged -- and which is still considered fundamental -- is that some but not all open sentences determine sets. The rules for which open sentences you can use to make sets are called the axioms of set theory. Several different sets of such rules have been proposed, but the one that essentially everyone use these days is known as ZFC set theory (for Zermelo-Fraenkel set theory with Choice).
As an undergraduate, it is likely you won't be shown the precise ZFC rules unless you actively seek them out -- instead you're more or less expected to develop a feeling for what one can do by imitating your textbooks and professors. This apparently mad approach to education seems to work better in practice than it has any right to -- but of course, now that you know what to search for, you have the opportunity to find the real thing yourself.
Quickly and informally, these are the ZFC rules:


*

*It is always allowed to use an open sentence of the form "$x$ is one of the following (finitely many) things ...". This corresponds to directly listing the elements of the set, as in $\{42,108,117,666\}$.

*It is always allowed to use any open sentence of the form "$x$ is an element of $A$, and additionally such-and-such", where $A$ is a set you already know exists. This allows set-builder notation, $\{x\in A\mid \text{such-and-such}(x) \}$. This is the workhorse rule of ZFC, the axiom of separation, also sometimes known as the axiom of set comprehension or subsets. It says, in the language you use here, that as long as your open sentence has a domain that you already know is a set, you're good and don't need to worry.

*It is allowed to use the open sentences "$x$ is a subset of $A$" and "$x$ is an element of some element of $A$", again where $A$ is an already known set. This produces the power set $\mathcal P(A)=\{x\mid x\subseteq A\}$ and the union of $A$'s elements: $\cup A = \{x\mid \exists y: x\in y\in A\}$.

*It is allowed to use the open sentence "$x$ is a natural number", guaranteeing that $\mathbb N$ is a set. (The actual technical formulation of this axiom of infinity is a bit subtler than this, but it will do for a first glimpse).

*If $F$ is any function you can come up with a precise definition for, then you may use the open sentence "$x$ is the value of $F$ when the input is some element of $A$", producing $\{F(y)\mid y\in A\}$. This is the axiom of replacement, providing the F of ZFC (since it was invented by Adolf Fraenkel). Essentially it says that when $A$ is a set, you can replace each of its elements with the value of $F$ on this element, and what you get from replacing all of them is still a set.

*Finally there's the axiom of choice, which states that there exist sets with certain properties which may not correspond to any open sentence. A full discussion of this would be too long for this answer; the important thing to be aware of is that in mainstream mathematics we do not assume that every set we see is given by some open sentence that can be written down.
