5

Let $X$ denote a set, and suppose that $B$ and $A$ are subsets thereof. Then the set-theoretic difference of $B$ and $A$ may be denoted in any of the following ways:

$$B \setminus A, \qquad B - A, \qquad B \cap A^c$$

I'm not entirely happy with any of these options, however:

  1. $B \setminus A$ "looks" contravariant in the first argument and covariant in the second, but in actuality the opposite is true. Furthermore, if $A$ and $B$ are subsets of a non-commutative monoid $M$, I like to write $B \setminus A$ for the set of all $c \in M$ such that $Bc \subseteq A$. Notice that this is contravariant in the first argument and covariant in the second.

  2. $B - A$ is a good option unless $X$ has an Abelian group structure, in which case there's a potential notational conflict with $\{b-a \mid b \in B, a \in A\}$.

  3. $B \cap A^c$ is a good way of proving things about set-differences algebraically, but I don't think its a good idea to get rid of a symbol for set-theoretic difference altogether. It would be like getting rid of "$p$ if $q$" in favor of "$p$ or not $q$." Although this algebraic reduction can be useful, I think it kind of undermines clarity and readability.

I'm currently using $\setminus$, but I'd like to replace it with something else. The notation $A / B$ isn't a good option, because it looks like a quotient of the structure $A$ by the subobject $B$.

Question. Other than $\setminus$ and $-$, are there any other notations for the set-theoretic difference of sets?

goblin GONE
  • 67,744
  • 1
    What do the downvotes mean? If they mean: "be happy with what you've got, don't ask for too much, don't try to make notation better, don't try to find better and less ambiguous notations for things" I'm going to have to reject this line of thought. I think this is an attitude that promotes notational stagnation, and ultimately makes mathematics more elitist than it needs to be. – goblin GONE Sep 04 '15 at 20:41
  • There may be other notations for the difference of two sets, but I doubt that any of those would be understood by the majority of set theorists without defining it. Therefore it seems best to introduce your own notation, if you are deeply unhappy with the existent notations or just deal with it ;) – Stefan Mesken Sep 04 '15 at 20:42
  • @Stefan, sure, I always define non-standard notation. Nonetheless, I prefer to use notation that other people are already using. – goblin GONE Sep 04 '15 at 20:42
  • I'd like to see a better notation and therefore I'm upvoting this question, but I don't see the relevance of an existing notation, if it isn't widely known anyways. – Stefan Mesken Sep 04 '15 at 20:46
  • @Stefan, thanks. In regards to issues of notation, I think it is better to jump on somebody elses bandwagon than try to create your own, hence why I asked. – goblin GONE Sep 04 '15 at 20:47
  • 5
    I agree with your objection to $B - A$. I find $B \cap A^c$ problematic: it suggests that $A^c$ is a set, but it is a proper class in any formulation of set theory that doesn't have a universal set (and set theories of that sort are not generally accepted). I see what you mean now about $B \mathop{\backslash} A$, but I think it is the "least worst" of the three. I suggest you think of a new symbol for your operator on subsets of a monoid. – Rob Arthan Sep 04 '15 at 20:48
  • 4
    I have seen $B\sim A$ for the difference. – GEdgar Sep 04 '15 at 20:52
  • 1
    @GEdgar: that looks too symmetric and too much like some kind of equivalence relation fro my tastes. – Rob Arthan Sep 04 '15 at 20:53
  • @RobArthan, I agree with your comment, except that $\setminus$ is standard notation in residuated lattice theory, so I'm hesitant to abandon it. – goblin GONE Sep 04 '15 at 20:55
  • 1
    Interestingly, contrary to @RobArthan, the objection against $B\setminus A$ made me consistently use $B-A$ instead, since it's only very rarely confusing, whereas the difference between right- and left cosets can be thoroughly confusing in several different situations. This might depend on the area of mathematics you're working in, though. I'd expect that for each subject at least one of the notations 1 and 2 should be clear. – HSN Sep 04 '15 at 20:55
  • There is the \complement symbol (from amssymb), but you have to write a macro to type set it : just typing $\complement_BA$ doesn't look fine. – Bernard Sep 04 '15 at 20:57
  • @HSN: do you really mean $A - B$ for $B \mathop{\backslash} A$? – Rob Arthan Sep 04 '15 at 20:58
  • No, sorry. That's because I'd prefer $B\subset A$ over $A\subset B$ and got confused by the two. – HSN Sep 04 '15 at 21:00
  • @goblin: funnily enough, I too work with residuated lattices sometimes and I hate some of the notations that seem to have become standard in that subject. However, your point about residuated lattices, HSN's point about right- and left- cosets and the widespread use of $\backslash$ for set difference all make me think we'll just have to grit our teeth and put up with rather unsatisfactory notation $\ddot{\frown}$. – Rob Arthan Sep 04 '15 at 21:06
  • To me, this issue seems like a slightly-less-annoying version of $\sin^2$/$\sin^{-1}$. – Akiva Weinberger Sep 04 '15 at 21:41
  • How about $B\cap(A\Delta B)$? (No, not really.) I'm not quite sure I understand what you mean with the "looks" co(ntra)variant part. Can you clarify that at all for me? – Cameron Buie Sep 04 '15 at 23:33
  • One alternative is to kind of split the difference between the first two types and use ´B\smallsetminus A´ to give $B\smallsetminus A.$ – Cameron Buie Sep 04 '15 at 23:44
  • @CameronBuie, sure. In the positive real numbers, we have $a' \geq a \rightarrow a'/b \geq a/b$, so division is "covariant" in the first argument. Similarly, we have $b' \geq b \rightarrow a/b \geq a/b'$, so division is "contravariant" in the second argument. Now take a look at the wikipedia page on residuated lattices. Each residuated lattice comes with two operations denoted $\setminus$ and $/$. They're covariant on the "numerator" side and contravariant on the "denominator" side. – goblin GONE Sep 05 '15 at 00:34
  • 2
    Ah. So it's an artefact of your experience with residuated lattices. No wonder I had no idea what you meant! – Cameron Buie Sep 05 '15 at 01:56
  • 1
    A bit late, but an alternative that I've started using is $A \ \lnot \ B$, because I always read the complement of $A$ and $B$ as '$A$ not $B$' anyway. – Nethesis Nov 20 '16 at 10:19
  • 1
    @Nethesis, I like it. I like it a lot. Honestly, you have no idea how much I like it. Feel free to post that as an answer. – goblin GONE Nov 20 '16 at 10:21

4 Answers4

3

There's a notation that I've seen in a point-set topology book: $\mathrm{C}_S \,(\mathrm{T})$ is notation for the complement of $\mathrm{T}$ relative to $\mathrm{S}$, or $\mathrm{S} \setminus \mathrm{T}$. See https://proofwiki.org/wiki/Definition:Relative_Complement.

Chris
  • 5,106
  • 12
  • 26
3

As stated in my comment, an alternative notation that I have started using is to write $A \, \lnot \, B$ for $A\setminus B$. This makes sense from my point of view as I've always read $A\setminus B$ as '$A$ not $B$', anyway. You might need to define your own command in LaTeX to get the spacing right, but that takes only a second.

Nethesis
  • 3,986
2

A standard notation in Boolean calculus is to use $\bar A$ for the complement of $A$, $AB$ for $A \cap B$ and $A + B$ for $A \cup B$ and hence $B\bar A$ for $B \setminus A$ .

That being said, the most appropriate notation depends on the context. If you are working on Hausdorff's nested difference hierarchy, the notation $B - A$ proves to be very convenient (together with $B + A$ for the union). Actually, I tend to use more and more $B - A$ instead of $B \setminus A$. If $X$ has a group structure, there is ambiguity only if you use the group operation and the set difference at the same time. In this event, you may wish to use some temporary notation like $\dot{-}$ with a dot on top.

Viktor Vaughn
  • 19,278
J.-E. Pin
  • 40,163
2

I would suggest $A \nrightarrow B$ or $A\nRightarrow B$ because that is really what it is: The negation of the implication $A\to B := A^c \cup B$.

Stefan Perko
  • 12,467
  • I thought about this too, the problem is really the confusion with exponential objects: $A \rightarrow B$ is easy to mistake for $B^A$. – goblin GONE Nov 20 '16 at 10:37
  • How is that a problem? This is an exponential object (and $A \nrightarrow B$ is a coexponential) – Stefan Perko Nov 20 '16 at 10:38
  • It's a bit like saying: why not write $A \times B$ in place of $A \cap B$? After all, they're both categorial products. – goblin GONE Nov 20 '16 at 10:39
  • @goblin I'm not. I use $A\to B$ in posets and $B^A$ in non-thin categories. How else are you going to denote implication in a Heyting algebra? – Stefan Perko Nov 20 '16 at 10:40
  • It sounds like, subject to the conventions you personally use, there's no ambiguity, because $A \rightarrow B$ never means "the set of functions from $A$ to $B$" for you. But, according to your conventions, we have to be very careful not to analyse $f : A \rightarrow B$ as $f \in A \rightarrow B$, since $A \rightarrow B$ doesn't make sense. I'm not sure I like that. – goblin GONE Nov 20 '16 at 10:45
  • Then use $\Rightarrow$. – Stefan Perko Nov 20 '16 at 10:46
  • That could work. I'll have to toy with it. – goblin GONE Nov 20 '16 at 10:47