# Is there a symbol for "as long as" in math?

Let's say we have the expression

$$∀𝑎,𝑏∈ℤ:𝑎𝑥=𝑏𝑥⟹𝑎=𝑏$$

Which means "for all values of 𝑎 and 𝑏 in the set of integers, if 𝑎𝑥 equals 𝑏𝑥 then 𝑎 must equal 𝑏."

For example, if 4×6=4×6, then 4=4.

However, this does not apply to 0.

For example, 7×0=6×0, but 6≠0.

Is there a way to add to the previous expression a term that says "as long as x doesn't equal 0"?

• Yes, then we write $\forall a,b\in \Bbb Z$ and for all $x\neq 0$ we have that $ax=bx$ implies $a=b$ by cancelling. May 31 at 16:13
• There are a few ways to do this; in your example, you could instead say $\forall a,b\in\mathbb{Z}, ax=bx\implies (a=b\lor x=0)$ (where $\lor$ is read as "or"), or equivalently $\forall a,b\in\mathbb{Z}, ax=bx\land x\neq0\implies a=b$ (where $\land$ is read as "and"). May 31 at 16:15
• "a term that says "as long as a or b doesn't equal 0"? Be careful, you want to cancel $x$, which should be nonzero. You don't have to assume anything else on $a$ and $b$. May 31 at 16:20
• @DietrichBurde Ah, you're right. Sorry, I meant to say as long as x doesn't equal 0. Thank you for pointing that out! May 31 at 16:22
• @ryang Ah, I see! Thank you for clearing this up! :D May 31 at 16:26

There is no formal symbol for this. Even if there were, words are usually easier on your reader than formality. So write

If $$x \ne 0$$ then $$ax= bx \implies a =b$$.

You could write

$$ax= bx \implies a =b$$ provided $$x \ne 0$$.

but that might make your reader hesitate and wonder until they finished the sentence. It's kinder to state the condition first.

The Ruby programming language has an unless keyword that can follow the statement it references, so you could code something like

you can cancel x unless x is 0

• $\forall \{ a, b, x \} \in \mathbb{R} \wedge x \neq 0, a x = b x \implies a = b.$ May 31 at 16:44
• @DavidG.Stork That's correct, of course, but much harder to read than the same thing written out mostly in English. May 31 at 16:46
• Or: $∀𝑎{,}𝑏{,}x{∈}\mathbb R\;(x\ne0\land 𝑎𝑥=𝑏𝑥⟹𝑎=𝑏).$ @DavidG.Stork May 31 at 16:55
• Btw, do "as long as" and "provided that" both simply mean "if", or are there exceptions? Some online dictionaries claim that "as long as" mean "only if", but then again they anyway seem to variously think that "only if" means "if" or sometimes "iff". May 31 at 16:57
• @ryang Yes, but see my response to David Stork. This is all part of my campaign to convince students that "prove it" does not mean "write it using formal logic". May 31 at 16:58

You could use "as long as $$x$$ does not equal $$0$$" like so:

With $$\forall x \neq 0$$ at the end:

$$∀a,b\in\mathbb{Z}:ax=bx\implies a=b, \forall x \neq 0$$

or with $$\forall x\in\mathbb{Z}^*$$ at the end:

$$∀a,b\in\mathbb{Z}:ax=bx\implies a=b, \forall x\in\mathbb{Z}^*$$

or with $$\forall x\in\mathbb{Z}^*$$ at the beggining:

$$∀a,b\in\mathbb{Z} \wedge \forall x\in\mathbb{Z}^*:ax=bx\implies a=b$$