Idempotence
The property that combining a value with itself yields that value - A AND A = A, A OR A = A.
Duplicate conditions show up in real specifications all the time. Idempotence says they're harmless—A OR A is just A. Knowing this lets you simplify mechanically instead of worrying about whether repetition changes meaning.
The Idempotence Laws
Idempotence means "same power" - an operation is idempotent if applying it to the same value twice gives that same value back.
In Boolean algebra:
- A $\lor$ A = A (OR is idempotent)
- A $\land$ A = A (AND is idempotent)
This makes intuitive sense: "A or A" is just A, and "A and A" is just A.
Repeating a condition doesn't change its truth value.
Simplifying with Idempotence
Idempotence helps simplify expressions with repeated terms:
- A $\lor$ A = A
- A $\land$ A = A
- (A $\lor$ B) $\lor$ (A $\lor$ B) = A $\lor$ B
- (A $\land$ B) $\land$ (A $\land$ B) = A $\land$ B
Any expression OR'd or AND'd with itself simplifies to just that expression.
OR Idempotence Practice
OR is idempotent: A $\lor$ A = A
This applies to any expression, not just single variables:
- (P $\land$ Q) $\lor$ (P $\land$ Q) = P $\land$ Q
- $\neg$X $\lor$ $\neg$X = $\neg$X
AND Idempotence Practice
AND is idempotent: A $\land$ A = A
This applies to any expression, not just single variables:
- (P $\lor$ Q) $\land$ (P $\lor$ Q) = P $\lor$ Q
- $\neg$X $\land$ $\neg$X = $\neg$X
Recognizing Idempotence
Idempotence applies when the same expression appears on both sides of an AND or OR:
- A $\lor$ A = A ✓ (idempotence applies)
- A $\lor$ B = ? (idempotence does NOT apply - different terms)
- A $\lor$ $\neg$A = T (NOT idempotence - this is complement law)
Idempotence vs Other Laws
Don't confuse idempotence with other laws:
| Pattern | Law | Result |
|---|---|---|
| A $\lor$ A | Idempotence | A |
| A $\lor$ $\neg$A | Complement | T |
| A $\lor$ F | Identity | A |
| A $\lor$ T | Annihilation | T |
Idempotence requires identical terms on both sides.
Idempotence in Larger Expressions
Idempotence can simplify parts of larger expressions:
- (A $\lor$ A) $\land$ B = A $\land$ B (simplify A $\lor$ A first)
- A $\lor$ (B $\land$ B) = A $\lor$ B (simplify B $\land$ B first)
Look for repeated terms within the expression.
Why Idempotence Works
Why is A $\lor$ A = A true?
- If A = T: T $\lor$ T = T = A ✓
- If A = F: F $\lor$ F = F = A ✓
Why is A $\land$ A = A true?
- If A = T: T $\land$ T = T = A ✓
- If A = F: F $\land$ F = F = A ✓
In both cases, repeating a condition doesn't change its truth value.
When Idempotence Helps
Idempotence: P $\land$ P = P and P $\lor$ P = P
When it helps:
- After factoring or distribution creates duplicates
- When combining equivalent conditions
- Simplifying redundant checks in code
When it doesn't help:
- No duplicate terms exist
- Terms look similar but aren't identical
Idempotence with Other Laws
Idempotence often works with other laws:
- After distribution: creates duplicate terms
- With absorption: P $\lor$ (P $\land$ Q) = P (absorption subsumes idempotence)
- With complement: P $\lor$ P $\lor$ $\neg$P = P $\lor$ $\neg$P = T
The key: look for the same term appearing multiple times.
Real-World Idempotence
Idempotence appears in many real-world contexts:
Programming:
if (x || x)is redundant (same asif (x))- HTTP GET requests are idempotent (repeating gives same result)
Databases:
SELECT DISTINCTremoves duplicates- Set operations naturally deduplicate
Everyday logic:
- "I need milk and milk" = "I need milk"
Ready to test your understanding?
Bitwit uses spaced repetition to help you truly master concepts like this—not just read about them. Each card generates with different values, so you can't just memorize answers.
Practice Idempotence →