How do Boolean-valued functions work?

632 Views Asked by At

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?

1

There are 1 best solutions below

1
On

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)$.