Propositional Logic
You write if (user.isActive && !user.isBanned) without blinking. That && and that ! are
propositional logic - the oldest, most useful corner of logic, and the one that maps most directly
onto the code you write every day. It's the algebra of statements that are either true or false, and
the rules for combining them.
Most people pick this up by osmosis and end up with blind spots: an or that didn't mean what they
thought, a negated condition that quietly inverted the wrong thing, an if that's impossible to
satisfy. This guide closes those gaps. By the end you'll be able to take any tangle of ands, ors,
and nots and say exactly what it's true for - and rewrite it into something simpler without changing
its meaning.
It builds directly on What Logic Actually Is: there you learned what a statement is and what it means for reasoning to be valid. Here we make statements combine.
How to read this
- Want the core fast? Phase 1 covers the three connectives that do most of the work.
- Want real fluency? Read all three - Phase 2 gives you the tool (truth tables) that turns "I think this is right" into "I can prove this is right."
The phases
- Connectives: AND, OR, NOT - the three building blocks, what each one precisely means, and the inclusive-or trap.
- Truth Tables - the machine for evaluating any compound statement, plus tautologies and contradictions.
- Equivalences & De Morgan's Laws - rewriting expressions without changing their meaning, and how to negate a condition correctly every time.
The next guide, Implication & Conditionals, tackles the trickiest connective of all - "if P then Q" - which deserves its own guide.