Understanding what is a set. I thought I understand what is a set long ago, that is, a collection $S$ of some stuff satisfying some "well defined" rule so that either $a\in S$ or $a\notin S$. But recently I became less sure.
For example, consider subsets of integers. I thought it is something like
$S=\{n\in{\mathbb Z}\,|\, property\}$, where "property" is some "rule" to decide if $a\in S$ or not, like " $n$ is an even number that cannot be written as the sum of two primes". However, each "rule" can be formalized into an English paragraph so that it uniquely decides the rule, but the set of English paragraphs is countable, this means there are at most countably many "rules". Now there are uncountably many subsets of ${\mathbb Z}$. So there are subsets in ${\mathbb Z}$ without "rules", I guess meaning only God knows whether $n\in S$ or not, or even He does not know? It is disturbing to think like this, especially when we often use languages like "let $S$ be an arbitrary subset of ${\mathbb Z}$".
I am aware that there is no formal definition of set. I would like to hear any comments on how to think about what is a set, hopefully regain some peace in mind.
 A: I find the reason you lost your piece of mind is rather problematic... Applying your reasoning to the real numbers we can reach the same "conclusion", namely there are real numbers that "only God knows" what they are. The example of the reals can even become equivalent with the subsets of $ \mathbb{Z} $, if we order $ \mathbb{Z} $ then every subset of $ \mathbb{Z} $ can be described by a sequence of zeros and ones (its characteristic function) - which can be thought of as the binary representation of a real number in $ [0,1] $. So every subset of $ \mathbb{Z} $ is now merely a point on an interval (there are some minor technical problems with this mapping but they don't affect the essence of the argument)...
Sets can be really mind-bending (axiom of choice, non-measurable sets...) and it is a fact that Cantor wrote to Dedekind "I see it, but don't believe it!" on a set theory question but these difficulties don't have to do with how and if we can "express" every single set in writing.
PS the set of English paragraphs may be countable, but the set of English paragraphs that can be read by a human being during a period of 20.000 years is actually finite - so until we figure out a way to live forever we are bounded as a species by finiteness
A: What you say is kind of true, but you're talking about a different thing. Sets are well defined, Set Theory is built from what we call the Zermelo-Fraenkel Axioms. The thing is that, as you have correctly pointed out, we can't "define" every set through given rules. What you describe has more to do with what we call partially recursive sets, which are sets such that you can verify in human terms if an element is or is not there. The definition of set has problems, but they are of other nature. And the fact we can't construct certain sets need not mean we can't work with them, sets we can describe are just particular examples of sets, and you might think they cover all just because we can't "see" any other kind of set
A: The very concept of sets exists to avoid your worries.
We can formalize properties using a programming language.  Specify some basic operations you are allowed to perform on objects (depending on context, these could be set inclusion, addition, …).  Then any syntactically correct use of these operations is a so-called "atomic" property; any finite combination of atomic properties using "and (${\wedge}$)" and "or (${\vee}$)" is also a property.  If you want, you can also use infinite combinations of atomic properties too (but see below), or allow yourself to introduce "local variables" using the existential (${\exists}$) and universal (${\forall}$) quantifiers.
For example, allow yourself to use addition, multiplication, and quantifiers, and assume all values are integers; then one can immediately write down a property to test for "is prime": $$\text{prime}(p)=(\forall a,b)((ab\neq p)\vee(a\cdot a=a)\vee(b\cdot b=b))$$  "$n$ is an even number that cannot be written as the sum of two primes" can then be written as $$\phi(n)=(\exists q)(q+q=n)\wedge(\forall p,q)(\neg\text{prime}(p)\vee\neg\text{prime}(q)\vee p^2+q^2\neq n)$$
But the programming-based approach leads to trouble.  Suppose $\phi$ is a property.  Then any proposition about $S=\{x:\phi(x)\}$ is implicitly a proposition about $\phi$:

*

*"$x\in S$" is the same as "$\phi(x)$"

*"$S$ is uncountable" is the same as "uncountably many points satisfy $\phi$"

*"$S$ is closed" is the same as "$\phi$ is preserved under limit operations"

*etc.

So why bother with sets at all?  Because, as you fear, some properties are hard to write down.  Instead, we try to construct a system which doesn't require them to be written down at all.
A set is defined as an object $O$, such that, for any other object $x$, either $x\in O$ is true, or it is false.  One way to decide which of these propositions holds is to use a rule: $$x\in O\Leftrightarrow \phi_O(x)$$ where $\phi_O$ is some property.  But a rule is not required.
If your "programming language" is sufficiently rich, using sets doesn't actually save you anything; one can define $\phi_O(x)=(x\in O)$.  Even if you don't allow use of ${\in}$, you still can just write down all the elements and call that a "property": $$\phi_O(x)=\left(\bigvee_{y\in O}{y=x}\right)$$  But for this reason, most mathematical logicians try to use programming languages that allow neither trick, and then one can prove via an elementary cardinality argument that there must exist sets without a corresponding property.
