Logic: Else Symbol
$\Begingroup$ Is There a Mathematical Symbol to Represent "Else"; the Way It's Used in Computer Science and Propositional Logic? Is It Simply "Or"? $\Endgroup$...
$\begingroup$
$\endgroup$
4
Is there a mathematical symbol to represent "else"; the way it's used in computer science and propositional logic? Is it simply "or"?
1 Answer
$\begingroup$
$\endgroup$
The closest thing to an "else" comes with piecewise defined functions, which is in act the very application of else in programming:
function max(x,y) {
if (x > y) then
return x
else
return y
end if
}
would match the piecewise definition $$ \max\{x,y\}:=\begin{cases}x&\text{if }x>y\\y&\text{otherwise}\end{cases}$$ Note that one commonly embeds natural language into such definitions, for the sake of readability.