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

1 Answer

$\begingroup$

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.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like