# Is there a language-agnostic way to formularize “if”-conditions?

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

$$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?

-

1
There's no need to use such a word, at least not in your example, AFAICT. – Gigili May 7 '12 at 8: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 7 '12 at 9: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 7 '12 at 9: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$". – Rahul Narain May 7 '12 at 9: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. May 7 '12 at 9:15
show 4 more comments

## 2 Answers

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.

-

I was tought 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$.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 17, "mathjax_display_tex": 4, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9671146869659424, "perplexity_flag": "middle"}