Mathematical "inclusion" and "exclusion" of elements from a given set $A$? If I have a set A, comprising of numbers from 1 to 10: $A = \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10\}$. Let's say I want to make another set by "including" all even numbers:
$\{2, 4, 6, 8, 10\}$
Or I wanted to make a different set by "excluding" all odd numbers:
$\{2, 4, 6, 8, 10\}$
These sets are of course the same. So is it correct to say that inclusion/exclusion are synonymous when it comes to set theory, as they're just different ways of building a set?
This might sound trivial, but I have a reason for asking: I want to understand if inclusion and exclusion are "commutative" properties, i.e. it doesn't matter in which order you apply them.
For example, let's say I make an operation to "filter" my set, by including all even numbers as we did before, producing set B
$B = \{2, 4, 6, 8, 10\}$
And then a separate operation to "exclude" any numbers less than 6 from set B, resulting in set C:
$C = \{6, 8, 10\}$
What if I started with A and applied the operations the other way around? First remove all numbers less than 6:
$B = \{6, 7, 8, 9, 10\}$
Then filter B to "include" only even numbers:
$C = \{6, 8, 10\}$
It seems intuitively to me that the result will always be the same no matter which order you apply the operation. Is this true for all cases no matter the set, however? Is there a way to prove that applying "filters" to a set (I'm not sure of the proper term) will always be commutative?

So in summary, there are two questions here:

*

*Are the notions of "inclusion" and "exclusion" really synonymous from the point of view of applying an operation to a set to produce a subset?

*Will applying these operations to produce a subset of a set always be commutative, i.e. produce the same result?

 A: This is perhaps easier to see in the math logic. When you apply conditions to a set, you get subsets that satisfy those conditions (possibly the emptyset if the conditions aren't met). In your example, define:
$$A := \{n\in\mathbb{N}\text{ }|\text{ }1\leq n\leq 10\}.$$
Then $B$ and $C$ are had by adding conditionals in the set definition:
$$B := \{n\in A\text{ }|\text{ }\exists k\in\mathbb{N}: n=2*k\}$$
and
$$C:= \{n\in B\text{ }|\text{ }n\geq 6\}.$$
$$\implies C = \bigg\{n\in \mathbb{N}\text{ }\bigg|\text{ }(1\leq n\leq 10)\wedge(\exists k\in\mathbb{N}: (n=2*k))\wedge(n\geq 6)\bigg\}.$$
From this viewpoint, the reductions made were simply conjuctions (a logical operation). Conjunction is certainly commutative.

Also, the term "exclusion" is synonymous with set difference: $$X-Y:= X\cap Y^c,$$
whereas "inclusion" usually refers to an injective map: $$\iota: S\hookrightarrow X$$
which can be used as an identifier of a subset. I wouldn't say the two notions are synonymous.
A: @KevinS offers an excellent answer from a logic point of view. Here's another that relies on the idea of a filter. That's a concept useful in programming (particularly in lisp). You pass the items in your set through a filter that lets some through and blocks others.
In this sense "inclusion" and "exclusion" are really different ways to describe the same result. You can specify what you keep or what you reject. "Keep (just) the odds" is the same as "reject (only) the evens".
If you have two filters each of which is described independently of the other and refers only to properties of the things you are filtering then you can filter in either order.
The independence matters. If you think that the wine must match the main course then your options will depend on whether you see the wine list or the menu first.
A: To your first question, consider using the set-builder notation to build a subset. That is, define $B\subseteq A$ such that $B = \{a\in A : \Phi(a)\}$, where $\Phi$ is the logical formula which dictates what how we pick the values of $A$.
Now say that $A$ is some collection of numbers, and $\Phi$ is the rule "include all even numbers". Then some other rule $\Psi$ which says "do not include all not even numbers" is completely logically equivalent to $\Phi$.
And this generalises nicely by considering that, if we impose a condition like "even number", any element of a set will satisify that condition, or not satisfy that condition. We cannot have an element which does neither.
The second question follows as others have pointed out, by writing the conditions as operations which are commutative.
