How do Boolean-valued functions work?

$\begingroup$

Consider this function:

$$P: X\to \{true, false\}.$$

There's nothing in that expression that says when $X$ is true and when it is not true. How do these work?

$\endgroup$

1 Answer

$\begingroup$

Consider the expression $n < 3$. It can either true or false, depending on $n$.
Now put it into a function: $f(x) = (x < 3)$. It takes $x$ and yields true or false! You can put a logical statement into a function and refer to it as $f(x)$.

$\endgroup$ 1

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