# Correct set notation for "all integers which are not multiples of 7"?

What is correct set notation for "all integers which are not multiples of $7$"? My best guess is:

$$\{ x : (\forall k \in \mathbb{Z})(\neg(7k = x)) \}$$

Or

$$\{ x : \neg(\exists k \in \mathbb{Z})(7k = x) \}$$

However this seems unlike other examples I have seen.

Is there are proper way to denote this set in set notation?

• Curly brackets \{ and \} (in math mode). Your ways are fine. Words are better. Mar 2, 2016 at 5:14
• They're both correct. In general: $$\neg (\forall x \in X) P(x) \iff (\exists x\in X) \neg P(x)$$ Mar 2, 2016 at 5:23
• What's wrong with (x mod 7 is different than 0)? Mar 2, 2016 at 13:34
• Don't forget about the simplest one: $\{ x : \text{x is not a multiple of 7} \}$. Mar 2, 2016 at 14:03
• Perhaps worth noting (somewhat pedantically) is that when you say "all numbers" you do mean, apparently, all integers. Although the language of "not multiples" would not lead the reader to suspect you were quantifying over $\mathbb{R}$ or $\mathbb{C}$, it is possible to believe (as I initially did) that you were quantifying over $\mathbb{N}$. Mar 2, 2016 at 19:31

I'd generally go with $\{x\in\mathbb{Z}: 7 \nmid x\}$, though this does presuppose familiarity with the $\mid \, \nmid$ notation.

• In fact, every notation requires familiarity to use it. Mar 6, 2016 at 14:56

For starters, you should be using curly braces $\{\}$ for sets, and what you have is fine, but generally the clean abbreviation would be: $$\mathbb{Z}-7\mathbb{Z}$$

This is because $-$ denotes set difference and $7\mathbb{Z}$ denotes the set of integer multiples of $7$.

• Or $\mathbb{Z} \setminus 7\mathbb{Z}$ Mar 2, 2016 at 5:16
• Note that for sets $A$ and $B$ sometimes the notation $A-B$ may be used in another sense, namely for the set of all differences $a-b$ where $a\in A$ and $b\in B$ (clearly this requires that $A$ and $B$ come from a context where there is some additive (abelian) group structure). Mar 2, 2016 at 9:41
• In this case I'd prefer $\Bbb Z - 7\Bbb Z$ over $\Bbb Z \setminus 7\Bbb Z$, since the latter might be confused with $\Bbb Z / 7\Bbb Z$, which is a completely different set. Mar 2, 2016 at 10:28
• If you are worried about confusion with quotient, there’s $\mathbb Z\smallsetminus7\mathbb Z$ (\smallsetminus). I’d never use $-$ to denote set difference in the same context where I am using other arithmetic operations to act pointwise on the set, such as in $7\mathbb Z$, per Jeppe Stig Nielsen’s comment. Mar 3, 2016 at 13:32
• @ChristianBlatter plenty of people use $-$ in both colloquial and professional environments. I don't see why this is "basically wrong". Mar 3, 2016 at 20:51

My preferred notation is the "not divides" symbol $a \nmid b$ what means "a not divides b". But you can achieve the same meaning by different ways, by example:

$$\{n\in\Bbb Z: (\nexists k\in\Bbb Z :n/k=7)\}$$

or

$$\{n\in\Bbb Z:n\not\equiv 0\pmod 7\}$$

But the common notation is

$$\{n\in\Bbb Z:7\nmid n\}$$

• $n/7 \notin \mathbb{Z}$ seems a bit more concise than the first version. Mar 2, 2016 at 22:13
• Of all answers, first one here is by far easiest to read and understand for math noobs like me.
– m0s
Mar 4, 2016 at 0:40

Of course, you could always use $$\{ x \in \mathbb{Z} : \text{x is not a multiple of 7} \}$$

If you think the notation will get in the way of what you're trying to say, then discard the notation!

The most accurate translation of the English condition would be $$\left\{n\in\mathbb{Z}:\frac n7\not\in\mathbb{Z}\right\}$$

• This is also very succint and clear. +1 Mar 6, 2016 at 13:44

I think the vertical line should be used in sets. This is how it's usually done:

$$\{x \in \mathbb{Z} \mid \forall z \in \mathbb{Z}: x \neq 7z \}$$

First part naming some elements, then after the pipe comes the conditions for those elements. I actually have never seen the colon used instead of the pipe before in any lecture material or mathematical book. I think their usage is different.

$$\{x \in \mathbb{Z} \mid 7 \nmid x \}$$

Is another shorter form, but as others said, it required knowledge of the $\nmid$ symbol.

• I don't think you should make the vertical line do double duty as both such that and divides in the same breath.
– Era
Mar 3, 2016 at 17:05
• @Zelphir - Your experience is rather limited, then. ":" is the older notation. It is less popular now, but as Era points out, if "|" is being used for some other purpose in the expression, many people will fall back on ":" as the "such that" so as to avoid confusion. Mar 3, 2016 at 18:20
• @PaulSinclair Aha, thanks, didn't know that! Mar 4, 2016 at 1:07

Another possibility (more wordy but to me clearer):

$$\{x \in ℤ:x \neq 7k \quad \forall k∈ℤ\}$$

• Isn't this almost the same as the first line in the question? Mar 2, 2016 at 8:26
• Yes but to my eyes at least this is the clearest answer as it uses the least technical notation. Mar 2, 2016 at 8:29
• A professor of mine strongly disliked notation like this due to $k$ being used before it is defined. Mar 2, 2016 at 14:20
• @filmor that is quite strange, since this is standard notation
– user
Mar 2, 2016 at 14:30
• @user I don't believe it is standard to write the forall symbol after its use. It is certainly common in spoken English to say e.g. "$x$ is not equal to $7k$ for any $k$", but $x\ne7k\ \forall k\in\Bbb Z$ is just plain wrong, and is downright misleading if it's not the only quantifier (how to parse $\exists x\in\Bbb Z, x\ne7k\ \forall k\in\Bbb Z$?). Quantifier symbols always precede their formulas, with appropriate parentheses to delimit their scope if necessary. Mar 2, 2016 at 18:38

The only issue with what you wrote is that you didn't specify what set the $x$ should come from. For example, $x$ could be $1.5$, since $1.5$ isn't an integer multiple of 7. More correct would be

$$\{ x\in \mathbb{Z} : (\forall k \in \mathbb{Z})(\neg(7k = x)) \}$$

Of course, in terms of simplicity, as others have noted, there are more compact notations for divisibility that you can use.

What about: {7j+k (∀j∈Z) (∀k∈{1,2,3,4,5,6})} ?