This specific question is not really math, but computer programming.

The "else" part means "if not". That is, if the comparison is true (X **is **greater than Y), it will do the first action. Otherwise (that is, if X is **not** greater than Y), it will do the other.

Now, the rest is math:

If X is not greater than Y, then it must be either equal to Y, or less than Y.

The fact that two numbers can be related by either >, =, or <, and nothing else, is called "trichotomy" ("division into three possibilities"). It is equivalent to the fact that any number on a number line is either positive, zero, or negative (that is, greater than, equal to, or less than zero).

If we weren't talking about real numbers, this might not be true; for example, complex numbers can't be compared in this way. But for real numbers, the fact that they can be put on a number line forces this to be true.

Is there some reason you think something other than those three things could happen?

Please explain why you need to know "who said" this. Is it not obvious?