1

How can you formularize "if"-conditions in a language-agnostic way?

I'm talking about formulas like

$$ x=\begin{cases} 2,&\text{ if } n \le 2 \lor m=3\\ 3,&\text{ if } n \gt 2 \land m=n \end{cases} $$ Of course, everybody in the world will understand the "if", but is there a way to write it completely without using any "real world" language whatsoever?

F.P
  • 117
  • 6
  • 1
    There's no need to use such a word, at least not in your example, AFAICT. – Gigili May 07 '12 at 08:59
  • 6
    It is a common mistake to think that mathematics is written in pure symbols. There is a lot of text around and it just makes things clearer. – Asaf Karagila May 07 '12 at 09:01
  • 1
    If you're going to use "if", you may as well use "and" and "or", and I assure you it looks much better that way. – Zhen Lin May 07 '12 at 09:01
  • 2
    To add on to Asaf's point, symbols are used because sometimes they make things clearer to express, not because they are inherently better than words. For example, it's easier to understand "$y = ax + b$" than to understand "$y$ is the sum of $b$ and the product of $a$ and $x$", but it is easier to understand "$A$ is a nonsingular $3\times3$ matrix" than to understand "$A \in M_{3\times3} \wedge \det A \ne 0$". –  May 07 '12 at 09:13
  • 2
    Asaf has told you about how words are a lot of times preferred in mathematical writing (and personally I'm not at all fond of $\land$ and $\lor$); that being said, look into Iverson brackets. – J. M. ain't a mathematician May 07 '12 at 09:15
  • 1
    I'm not arguing about that using the words is preferrable in some cases, I just wanted to know if there is a way or not. I always write "if", "and", "or" etc., but was wondering on how to write it without them – F.P May 07 '12 at 09:33
  • See this link. It would seem $\rightarrow$ is what you're looking for. – Neil May 07 '12 at 09:40
  • This formula is not self completed, you should say what m,n are that is reals , integers, naturals or whatever. – checkmath May 07 '12 at 12:06
  • 1
    It's merely for demonstration, no matter what the actual values are. The point of interest is the if, not the formula as such – F.P May 07 '12 at 13:03

2 Answers2

5

If you absolutely insist, you can use Iverson brackets:

$$x=\begin{cases} 2,&\text{ if } n \le 2 \lor m=3\\ 3,&\text{ if } n \gt 2 \land m=n \end{cases}$$

is equivalent to

$$x=2+[n>2][m=n]\;.$$

But the first version is easier to read, and while I don't at all mind $\lor$ and $\land$, $\text{or}$ and $\text{and}$ are preferable for most audiences.

Brian M. Scott
  • 616,228
2

I was taught that if ... then is written in such form:

$$ x>0 \Rightarrow y=2x $$

which means if $x$ is greater than 0 then assign $2x$ to $y$.

Misery
  • 571
  • 2
  • 8
  • 23