0
$\begingroup$

Is there an algebraic noatation for predicate functions i. e. functions that return booleans?

For example, I am fairly sure I can define a function that checks if a number is even as $$ E(x) = \begin{cases} 0 & \text{if}\; x \bmod 2 =1 \\ 1 & \text{if}\; x \bmod 2 = 0 \end{cases} $$ or, more simply $$ E(x) = 1 -x \bmod 2. $$

Would it be possible for me to define something like $$ E(x) = \begin{cases} \bot & x \bmod 2 = 1 \\ \top & x \bmod 2 = 0 \end{cases} $$ or even $$ E(x) = (x \bmod 2 \iff 0 \land x \in \mathbb{N}) $$ and have that be seen as "proper" algebraic notation?

$\endgroup$
1
  • $\begingroup$ From your first example, maybe conditions like "$x\bmod 2 = 1$" are already functions that return booleans? $\endgroup$
    – peterwhy
    Jan 14 at 18:31

Your Answer

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

Browse other questions tagged or ask your own question.