Implication has the symbol of . Implication means that . It is easier to think about this in Python code.
def implies(a, b):
return (not a) or bOr by using the phrase: If it rains () then I will need to bring my umbrella ().
- If it is not raining () and you don’t bring an umbrella () then you are fine
- If it is not raining () and you brought an umbrella () then it’s annoying but fine
- if it is raining () and you didn’t bring an umbrella () then it’s not fine
- If it is raining () and you brought an umbrella () it is fine
Essentially, you want a case where you do not get wet!
A use case for this is if we wanted to assert that if an admin exists they must have 2FA:
assert (not user.is_admin) or user.has_2fa # admin ⇒ has 2FA