Negations
Let's say we have a boolean function to determine if a certain number is acceptable,
Suppose we are now presented with the task of designing a boolean function that determines whether a function is unacceptable.
In Python, we would normally do something like this:
def is_unacceptable(bool_value: bool) -> bool:
return not is_acceptable(bool_value)
A more generalized approach to this would be:
def negate(boolValue: bool) -> bool{
return not boolValue
}
def isUnacceptable(boolValue: bool) -> bool {
return negate(isAcceptable(boolValue));
}
Let's try to define mathematically. What we would like to do here is switch the outputs of the above function, such that we map to and to . That is, we want to design a function such that
One thing to notice is that
So, we can use this to say that
And we're done!