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

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

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest