Hacker News new | ask | show | jobs
by anon4 3878 days ago
It's easier if you see it as logical operations, rather than language. A iff B has the same meaning as A == B, but with the added twist that !B negates the answer in the example (knaves always lie). So let's take A = Pluto is a dwarf planet; B = you're a knight, then "are you a knight if and only if Pluto is a dwarf planet" has the formula (B && (A == B)) || !(!B && (A == B)), which after a bit of simplifying you can see is the same as A == True || !(A == False), or A == True.

Very often logic formulas, when translated in English, sound absolutely bonkers, not least because the words if, and, or have pretty loose meanings in ordinary language.