Discrete Structures
§5 Propositional Logic
7 min read
Propositional logic studies statements that are either true or false and the rules for combining them. Truth tables make those rules concrete by listing every possible set of truth values.
Propositions and truth values
A proposition is a declarative statement that is either true or false, but not both. For example:
- : “ is divisible by ” is true.
- : “” is false.
- : “Extraterrestrial life exists” has a truth value even though we do not currently know what it is.
A proposition's truth value belongs to the Boolean set
Here, means false and means true.
Basic logical connectives
A logical connective combines or changes propositions.
| Notation | Name | Read as | When it is true |
|---|---|---|---|
| negation | “not ” | when is false | |
| conjunction | “ and ” | when both propositions are true | |
| disjunction | “ or ” | when at least one proposition is true | |
| exclusive OR | “ or , but not both” | when exactly one proposition is true |
The word “or” in is inclusive, so it includes the case where both propositions are true. Negation has higher priority than the binary connectives on this page, but parentheses are the clearest way to show the intended order.
Basic connective table
| 0 | 0 | 1 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 | 1 | 0 |
Logical equivalence
Two propositions are logically equivalent when they have the same truth value in every possible case. We write
A truth table proves an equivalence when the final columns for the two expressions match row by row.
De Morgan's law
Consider
Build it from the inside out: first calculate and , then their conjunction, and finally negate that conjunction.
| 0 | 0 | 1 | 1 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 | 0 | 1 | 1 |
The final two columns match, so
This is one form of De Morgan's law. The two forms are
Logical identities
Logical identities closely parallel set identities. Conjunction acts like intersection, disjunction like union, and negation like taking a complement.
| Set notation | Logical notation |
|---|---|
For example, the set identity corresponds to
Some useful identities are
First distributive law
Conjunction distributes over disjunction:
The intermediate columns show how each side is built. The two final expression columns match in every row.
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Second distributive law
Disjunction also distributes over conjunction:
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Example: simplifying a proposition
Simplify
Work from the inner negations outward:
Exclusive OR
Exclusive OR can be written using conjunction, disjunction, and negation:
The first factor requires at least one true proposition. The second rules out the case where both are true.
| 0 | 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 |
Conditional and biconditional statements
Conditional
The conditional
can be read in three equivalent ways:
- “If , then .”
- “ if .”
- “ only if .”
Here, is the antecedent and is the consequent. A conditional makes one promise: whenever is true, must also be true. It is therefore false only when and . When is false, the conditional is true regardless of ; this is called vacuous truth.
For example, “If I pay 1,000 dollars, then you bring me a coffee” is false only if I pay the money and no coffee arrives.
A conditional has the equivalent form
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 |
Biconditional
The biconditional means that each proposition implies the other:
It is true exactly when and have the same truth value.
| 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 | 0 | 1 | 1 |
Negating “only if”
Campus Wi-Fi example
Let
- : you can access campus Wi-Fi;
- : you are a student;
- : you are an employee.
The statement
You can access campus Wi-Fi only if you are a student or an employee.
becomes
Its negation is
| 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 |
| 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
The only row where the negation is true is , , and . In words: you can access the Wi-Fi even though you are neither a student nor an employee.
0 reads
Last edited