Propositional Logic
Truth tables, models, satisfiability, equivalence, and entailment — the algebra of true/false that GATE DA quietly tests every year.
What you'll learn
- Atomic propositions and the five connectives: ¬, ∧, ∨, →, ↔
- A truth assignment maps each variable to T/F; a model makes the formula true
- Satisfiable, valid (tautology), logical equivalence, and entailment — what each means on the truth table
- Counting models of a formula (a real 2024 NAT) by ruling out the false rows
- The key identity: X ⊨ Y if and only if X ∧ ¬Y is unsatisfiable
Before you start
Last lesson promised a turn from searching to reasoning — a language for facts and an exact notion of “follows from.” Here it begins. “If it rains, the picnic is off.” You have just stated a logical implication, and you can already feel that “it rains” tells you about “picnic off” but not the other way round. Propositional logic is the mathematics behind that feeling, and behind the doctor’s deduction and the verifier’s proof.
Each simple statement (“it rains”, “picnic is off”) is an atomic proposition — a variable that is either true or false. You glue them together with five connectives, and the entire apparatus of “what follows from what” collapses onto one humble object: the truth table. The payoff is everywhere in real systems — the same satisfiability and entailment reasoning drives SAT solvers, digital-circuit verification, and the rule engines behind feature flags and access-control checks.
The five connectives
¬p— notpp ∧ q—pandq(both true)p ∨ q—porq(at least one true)p → q—pimpliesq(false only whenpis true andqis false)p ↔ q—piffq(true whenpandqagree)
The one that trips people is →. p → q is false in exactly one row: p true, q false. In the other three rows it is true — even when p is false (“vacuously true”). Memorise the identity that makes most equivalence problems trivial: p → q ≡ ¬p ∨ q.
Truth assignments, models, and the words you’ll see on the exam
A truth assignment picks T or F for every variable; with n variables there are 2^n of them. A model of a formula is an assignment that makes the formula come out true. From models you get every other piece of vocabulary:
- Satisfiable — at least one model exists.
- Valid (a tautology) — every assignment is a model.
- Unsatisfiable (a contradiction) — no models at all.
- Logically equivalent —
S₁ ≡ S₂means they have exactly the same models. - Entailment —
X ⊨ Ymeans every model ofXis also a model ofY.
How GATE asks this
Three flavours, all close to the surface of the truth table:
- NAT — count the models of a small formula over 2–3 variables. Rule out the rows that make it false; what is left is the count.
- MCQ — logical equivalence. Pick which pair of formulas have the same truth table. The lever is almost always
p → q ≡ ¬p ∨ qor De Morgan. - MCQ/MSQ — entailment. Pick a true statement about
⊨. The key fact:X ⊨ Yif and only ifX ∧ ¬Yis unsatisfiable (no row makesXtrue andYfalse at once).
Worked example — GATE DA 2024
Over the three variables
A, B, C, how many models does the formulaA ∨ ¬B ∨ Chave?
There are 2^3 = 8 truth assignments. A disjunction is false only when every disjunct is false. The three disjuncts are A, ¬B, C, so the formula fails only when
A = F and ¬B = F (i.e. B = T) and C = F
That is the single row (A, B, C) = (F, T, F) — exactly one falsifying assignment, and every other row is a model. So 8 − 1 = 7, and the answer is 7 (GATE DA 2024, Q2) — “most of them,” as the prompt hinted. The recipe generalises: for any disjunction of literals over n variables, count the rows that make every literal false (usually just one) and subtract from 2^n.
Equivalence and entailment — the two identities to memorise
GATE DA 2025’s Q15 asked which equivalences hold, and the single trick was rewriting every implication as a disjunction:
p → q ≡ ¬p ∨ q
Once everything is in ¬/∧/∨ form, De Morgan and the absorption laws finish the job — no truth tables needed even for 4-variable formulas.
GATE DA 2026’s Q24 asked which statement is equivalent to “X entails Y”, and the answer hinges on this chain:
X ⊨ Y
⇔ every model of X is a model of Y
⇔ there is no assignment with X true and Y false
⇔ X ∧ ¬Y is unsatisfiable
⇔ X → Y is valid (a tautology)
Read those four lines twice. Every entailment MCQ in the syllabus is one of them in disguise.
In one breath
Propositional logic builds formulas from atomic true/false variables and the five connectives ¬, ∧, ∨, →, ↔ (with → false in exactly one row and p → q ≡ ¬p ∨ q), and reads every property off the truth table: a model is a satisfying assignment, a formula is satisfiable (≥1 model), valid/tautology (all 2^n are models), or unsatisfiable (none); two formulas are equivalent when they share all models, and X entails Y (X ⊨ Y) exactly when every model of X models Y — equivalently when X ∧ ¬Y is unsatisfiable, i.e. X → Y is valid.
Practice
Quick check
A question to carry forward
Propositional logic is sharp, but its atom is too coarse. To it, “Socrates is mortal” is one indivisible variable, and “Plato is mortal” is another, wholly unrelated one — the logic cannot see that both ascribe the same property, mortality, to different beings. And so it cannot state the most ordinary kind of fact at all: “every human is mortal.” There is no “every” in a language whose only nouns are opaque true/false blobs.
To capture that, you must crack the atom open — name the objects (Socrates, Plato), name the properties and relations that hold of them (is-human, is-mortal, taller-than), and add words for all and some. Then “all humans are mortal; Socrates is human; therefore Socrates is mortal” becomes a proof a machine can check. Here is the thread onward: what does that richer language look like, what exactly do the quantifiers ∀ (“for all”) and ∃ (“there exists”) mean, and how does flipping their order quietly change everything a sentence says?
Practice this in an interview
All questionsReasoning models are trained to produce an extended chain of thought before answering, often via reinforcement learning, so they spend more computation deliberating on hard problems. Test-time compute is the idea of improving answer quality by allocating more inference-time compute, for example longer reasoning chains, sampling multiple solutions, or self-verification, rather than only scaling parameters.
Chain-of-thought (CoT) prompting instructs the model to write out intermediate reasoning steps before producing a final answer, which improves accuracy on multi-step arithmetic, logic puzzles, and compositional questions. It is most impactful on models with at least ~10B parameters and on tasks where the answer space is large enough that guessing is hard.
The core toolkit is: system prompts (role and constraints), few-shot examples (format and tone anchoring), chain-of-thought (step-by-step reasoning), and output constraints (JSON schema, stop sequences). Combining these predictably closes the gap between a capable base model and a production-ready feature.