Can you have negative sets?

This is possible. Essentially you want to extend the definition of a multiset to also include negative numbers as multiplicities. But I don't know if there is any useful application of this.


What you describe is isomorphic (using this word loosely) an operation (in the normal sense) of the class of all functions $f:\; S \mapsto \{-1,0,1\}$. For example, if $f(a) =m$, then the set $f$ has $m$ copies of element $a$.

Call $$ \mathcal{L} := \big\{ f: S \mapsto \{-1,0,1\} \big\} $$

Then union becomes "addition and truncate to 1". I.e.,

$$ \cup : \mathcal{L} \times \mathcal{L} \mapsto \mathcal{L} \\\\ (f \cup g)(a) := \begin{cases} 1,\; f(a)+g(a) \geq 1 \\\\ -1,\; f(a)+g(a) \leq -1 \\\\ 0,\; \textrm{otherwise} \end{cases},\; a \in S. $$ However, this doesn't preserve the property $f \cup (g \cup h) = (f \cup g) \cup h$.

So I have another suggestion. Allow set elements be repetitive, even negative copies. Then, $$ \mathcal{L} := \big\{ f: S \mapsto \mathbb{Z} \big\} $$

Then simply define union to be addition:

$$ \cup : \mathcal{L} \times \mathcal{L} \mapsto \mathcal{L} \\\\ (f \cup g)(a) := f(a)+g(a),\; a \in S. $$ I don't know how to define intersection, though. Maybe an intersection of sets is $$ \cap : \mathcal{L} \times \mathcal{L} \mapsto \mathcal{L} \\\\ (f \cap g)(a) := f(a) g(a),\; a \in S. $$ So I have preserved $$ f \cap g = g \cap f \\\\ f \cup g = g \cup f \\\\ (f \cup g) \cap h =(f \cap h) \cup (g \cap h) $$ Unfortunately, I did not preserve $$ (f \cap g) \cup h =(f \cup h) \cap (g \cup h) $$ The traditional count of element is the number of element truncated by one. If $f*$ be traditional count of $f$, then $$ f*(a) =\begin{cases} f(a),\; f(a)=-1,0,1 \\\\ 1,\; f(a) >1 \\\\ -1,\; f(a) <-1 \end{cases} $$


There is a generalization of multisets that may be what you want, which I shall call countsets but is actually nothing more than a set of pairs such that the first member of the pairs is unique and the second member of each pair is a non-zero integer. The reason I describe it this way instead of as a function from the universe (whole domain of discourse) to the integers is that in ZFC there is no function because every function has domain being a set, and there is no universal set. $ \def\none{\varnothing} \def\wi{\subseteq} \def\zz{\mathbb{Z}} $

More precisely, a set $S$ is a countset iff ( $S \wi U \times \zz_{\ne 0}$ for some set $U$ and ( for each $x \in U$ there is a unique $y \in \zz_{\ne 0}$ such that $(x,y) \in S$ ) ).

For convenience let $base(S) = \{ x : (x,y) \in S \}$ and $count(S,x) = \cases{ 0 & if $x \notin base(S)$ \\ y & if $(x,y) \in S$ for some $y$ }$.

We can then define operations on countsets $S,T$ as follows:

  • $S \cap T = \{ (x,m) : x \in base(S) \cup base(T) \land m = \min(count(S,x),count(T,x)) \land m \ne 0 \}$.

  • $S \cup T = \{ (x,m) : x \in base(S) \cup base(T) \land m = \max(count(S,x),count(T,x)) \land m \ne 0 \}$.

  • $S + T = \{ (x,m) : x \in base(S) \cup base(T) \land m = count(S,x)+count(T,x) \land m \ne 0 \}$.

  • $S - T = \{ (x,m) : x \in base(S) \cup base(T) \land m = count(S,x)-count(T,x) \land m \ne 0 \}$.

  • $-S = \none - S$.

These satisfy the properties:

  • Normal sets embed into countsets via $S \mapsto \{ (x,1) : x \in S \}$. [So countsets extend normal sets.]

  • $\cap,\cup,+$ are commutative and associative on countsets.

  • $\cap,\cup$ are idempotent on countsets (when applied to identical countsets gives the same result).

  • $\none$ is the identity for $+$ on countsets; namely $S + \none = S$ for any countset $S$.

  • $-$ is the inverse operation for $+$; namely $S + (-S) = \none$ for any countset $S$.

  • Countsets obey extensionality; namely $S = T$ iff $count(S,x) = count(T,x)$ for every $x \in base(S) \cup base(T)$. [The restriction of non-zero count is precisely to achieve this property, because it ensures that there is a unique representation of each countset.]

In particular we get what you want because:

$\{(1,1),(2,1),(3,1)\} + \{(3,-1)\} = \{(1,1),(2,1)\}$.

In short, we can use non-zero integer tags for each item, instead of thinking of them as negative items, and all this can be defined and manipulated in any reasonable set theory.