Simulate
Check the claim with numbers
A statement is a sentence that is either true or false, never both. "The fund beat the index in 2024 and in 2025" is one. This lesson asks what it takes for such a statement to be false.
Write for "the fund beat the index in 2024" and for "the fund beat the index in 2025". Each is true or false, so there are four cases. The cell lists them, with two guesses at what "not ( and )" means.
The "or" guess matches the left column in all four rows; the "and" guess fails in rows 2 and 3. In row 2 the fund beat the index in 2024 but not in 2025. The statement is false, yet "it lost in both years" is false too.
The next cell counts the rows where two statements agree, for three candidate laws.
The first two laws agree in all 4 rows. The third agrees in only 2, so it is not a law.
Conjecture
For any two statements and , De Morgan's laws hold:
The symbol reads "is equivalent to": the two sides are true in exactly the same cases.
Two statements have only four cases between them, and the table checked all four. So here the table is a complete check, a proof by exhaustion. The proof below gives the reason in words, the kind of argument that still works later, when the cases are too many to list.
Statements and how they combine
Lesson 0.2.1 met statements that are true or false about a set. This section gives the rules for building new statements from old ones.
A question ("Is the index up?") or a command ("Buy the index") is not a statement. Neither is "" on its own, since it is true for some and false for others. Lesson PG1.3 turns such sentences into statements.
Three words build new statements: "not", written ; "and", written ; and "or", written . Each is defined by the truth values it gives:
| true | true | false | true | true |
| true | false | false | false | true |
| false | true | true | false | true |
| false | false | true | false | false |
"And" is true only when both parts are true. "Or" is true when at least one part is true, both included. Everyday English sometimes means "one or the other, not both", but in mathematics "or" always allows both.
Rule: Equivalent statements
Two statements and are equivalent when they have the same truth value in every case. To prove it, show that is true exactly when is.
Try it
Python's not, and and or follow the same table. Each row of output is , , then and .
Notice True or True is True: Python's "or" includes both, as mathematics does.
Format 1
Reorder the steps
Here is a proof of the first law in words, with its lines shuffled. Put them in order with the arrows, or drag a line by its handle.
- First suppose is true. Then is false.
- So is true or is true, which makes true.
- An 'and' is true only when both parts are true, so at least one of and is false.
- Now suppose is true. Then is false or is false.
- Either way has a false part, so it is false, and is true.
- Take any two statements and . We show that and are true in exactly the same cases.
- Each statement is true exactly when the other is, so they are equivalent.
The second law has the same shape of proof, with "and" and "or" swapped. The table in the simulation already settles it, since it checked all four cases.
Format 3
Find the error
This proof claims that is equivalent to . The simulation found that claim false in two rows, so one line must be wrong. Select it, then say what is wrong with it.
So the statement about 2024 and 2025 is false when the fund missed in 2024, in 2025, or in both. One bad year is enough.
Summary card
- A statement is true or false, never both. A question, a command or "" with unknown is not a statement.
- flips the truth value. needs both parts true. needs at least one, and allows both.
- Two statements are equivalent when they agree in every case. For two parts there are four cases, so a full truth table is a proof.
- De Morgan's laws: and .
- A common mistake: is not . When only one part fails, the first is true and the second is false.