And, Or, and Not
Last timeA Claim You Can Test
Three ways of joining claims, two of which behave as expected and one of which does not. The rules for negating a joined claim are the ones people get wrong in writing and in code.
Claims rarely arrive alone. The order is paid and the stock is available. The
user is an administrator or the document is public. The file does not exist.
Three ways of joining, and only two of them behave the way people expect.
| A | B | A and B | A or B | not A | |
|---|---|---|---|---|---|
| both true | 1 | 1 | 1 | 1 | 0 |
| A true, B false | 1 | 0 | 0 | 1 | 0 |
| A false, B true | 0 | 1 | 0 | 1 | 1 |
| both false | 0 | 0 | 0 | 0 | 1 |
The inclusive reading is universal in this field, so the rule is to read every
or as at least one. When exactly one is genuinely meant, it has to be said: one
holds and the other fails.
Negating a joined claim
Here is where intuition stops being reliable.
The claim is that the order is paid and the stock is available. What is the
negation? Not that the order is unpaid and the stock is unavailable, which is
much stronger. The negation is that at least one of them failed: either the
order is unpaid, or the stock is unavailable, or both.
The lesson stops here
2 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents