Foundations of propositional logic
A proposition is a statement that can be either true (1) or false (0). Logical operations are defined on propositions: negation, conjunction (AND), disjunction (OR), implication (if..then) and equivalence.
In plain words:
Negation is the opposite: if a statement is true, its negation is false and vice versa. In simple terms, we add the particle "not".
Example:
- A = "It is raining outside" — true (1)
- ¬A = "It is NOT raining outside" — false (0)
- The value is flipped: ¬1=0, ¬0=1
Main rule:
Double negation restores the original: ¬(¬A)=A.
In plain words:
Conjunction (AND) is "strictly both": the result is true only when both statements are true at the same time. One "false" spoils everything.
Example:
- A = "There is milk in the fridge"
- B = "There is cocoa"
- You get the drink only if A∧B: 1∧1=1, but 1∧0=0
Main rule:
"AND" is true in exactly one case — when both are true: A∧B=1 only at A=1 and B=1.
In plain words:
Disjunction (OR) is "at least one": the result is false only when both statements are false. One of the two is enough for true.
Example:
- A = "I have cash" = 0 (false)
- B = "I have a bank card" = 1 (true)
- I can pay: A∨B=0∨1=1 — one option is enough
Main rule:
"OR" is false in a single case — when both are false: A∨B=0 only at A=0 and B=0.
In plain words:
An implication is a promise: "if A, then B". It breaks in only one case: A is true but B is not, meaning the promise was not kept.
Example:
- A = "It will rain"
- B = "I will take an umbrella"
- The promise A→B is broken only if it rains (1) but no umbrella is taken (0): 1→0=0
Main rule:
From falsehood you can "promise" anything: 0→0=1 and 0→1=1; it is false only for 1→0.
In plain words:
Contraposition is the same promise said the other way round: "if A, then B" sounds the same as "if not B, then not A". The meaning does not change.
Example:
- A = "There is food in the bowl", B = "The cat is happy"
- Direct: "If there is food, the cat is happy"
- Contrapositive: "If the cat is NOT happy, there is NO food" — the same rule
Main rule:
Contraposition flips the arrow and adds "not" to both parts: A→B≡¬B→¬A.
In plain words:
Equivalence is "sameness": both statements are always true together or always false together. Like "today is Monday" and "tomorrow is Tuesday".
Example:
- A = "Today is Monday"
- B = "Tomorrow is Tuesday"
- Their values always match: 1↔1=1, while 1↔0=0
Main rule:
A↔B is true when the values are the same: 1↔1=1 and 0↔0=1.
In plain words:
"Not (both)" means "not the first OR not the second". If both are missing at once, then at least one of the two is missing.
Example:
- A = "The store has bread", B = "The store has milk"
- A∧B = "it has both bread and milk"
- ¬(A∧B) (something is missing) = ¬A∨¬B (no bread OR no milk)
Main rule:
Negation flips AND into OR: ¬(A∧B)=¬A∨¬B.
In plain words:
"Not (either)" means "neither one nor the other". If a person drinks neither coffee nor tea, then they drink no coffee AND no tea.
Example:
- A = "The guest drinks coffee", B = "The guest drinks tea"
- A∨B = "drinks at least one of the drinks"
- ¬(A∨B) (drinks nothing) = ¬A∧¬B (no coffee AND no tea)
Main rule:
Negation flips OR into AND: ¬(A∨B)=¬A∧¬B.