IAE Academy

GATE DA

Propositional and predicate logic

Propositional logic studies statements built from not, and, or, implies and iff, and asks when a formula is always true, sometimes true, or never true. Predicate (first-order) logic adds objects, predicates and the quantifiers for all and there exists. GATE questions test truth-table reasoning, equivalences, entailment and resolution, translating English into quantified formulas, negating and moving quantifiers, and unification.

7 previous-year questions · 7 solved · 6 practice questions

Propositional logic: connectives and truth tables

A proposition is a statement that is either true (T) or false (F). Compound formulas are built with the connectives not (), and (), or (), implies () and iff (). Convention: formulas are written with not, and, or, implies, iff; is the inclusive or; precedence from highest to lowest is , , , , ; implication is right-associative, so means . Use brackets whenever in doubt.

, and are commutative and associative. is neither: , and (take false and false: the left side is false, the right side true).

Truth tables of the binary connectives

p

q

p and q

p or q

p implies q

p iff q

T

T

T

T

T

T

T

F

F

T

F

F

F

T

F

T

T

F

F

F

F

F

T

T

The implication is false in exactly one row: true and false. When is false the implication is true (vacuously), whatever is. A formula over distinct variables has rows in its truth table.

IMPLICATION ELIMINATION

The usual first step (after rewriting ) when converting to CNF or DNF.

BICONDITIONAL

True exactly when p and q have the same truth value.

CONTRAPOSITIVE

The converse and the inverse are NOT equivalent to (they are equivalent to each other).

DE MORGAN'S LAWS

Double negation: .

NEGATING AN IMPLICATION AND A BICONDITIONAL

is the exclusive or : true exactly when and differ. The negation of an implication is a conjunction, never another implication.

DISTRIBUTIVE LAWS

Each of and distributes over the other; used to reach CNF and DNF.

ABSORPTION AND IDEMPOTENCE

Useful for simplifying a formula before counting its models.

IDENTITY, DOMINATION AND COMPLEMENT

Here T and F stand for the constant true and false formulas.

EXPORTATION

Moves a conjunction in the premise into a chain of implications.

IMPLICATIONS WITH A COMPOUND PART

Check any of these by rewriting both sides with . Note the second line: a conjunctive premise splits into an OR, not an AND.

A set of connectives is functionally complete if every truth function can be written with it alone. , , , and are each complete (for example ). is not: every formula built from these alone is true when all its variables are true, so cannot be expressed.

Tautology, contradiction, satisfiability, entailment

Classification of a formula

Name

Meaning

Truth-table test

Tautology (valid)

True under every assignment

Every row is T

Contradiction (unsatisfiable)

False under every assignment

Every row is F

Satisfiable

True under at least one assignment

At least one row is T

Contingent

Satisfiable but not a tautology

Both T and F appear

Every tautology is satisfiable. is a tautology exactly when is a contradiction, and is satisfiable exactly when is not a tautology. Two formulas are logically equivalent () when they have the same truth value under every assignment, which is the same as being a tautology.

ENTAILMENT AS VALIDITY

means every assignment making true also makes true. With several premises: exactly when is a tautology.

REFUTATION TEST FOR ENTAILMENT

The basis of proof by contradiction and of resolution refutation.

Three consequences of the definition: an unsatisfiable KB entails every formula (there is no assignment to check); every KB entails a tautology; and entailment is monotonic: if then for any .

NUMBER OF MODELS OF A CHAIN OF IMPLICATIONS

For variables. All the implications hold exactly when the truth values are non-decreasing along the chain (F...F then T...T), so only the switch point varies: choices.

A satisfying assignment is also called a model. To count models it is often quicker to count the falsifying assignments and subtract from : an implication is false only when is true and is false, and a disjunction is false only when every disjunct is false. For a conjunction it is usually quicker to count the models directly (every conjunct true). Checking satisfiability of a general formula is hard (SAT is NP-complete), but a truth table settles any small case.

Normal forms: CNF and DNF

A literal is a variable or its negation. A clause is a disjunction of literals. A formula in conjunctive normal form (CNF) is an and of clauses; in disjunctive normal form (DNF) it is an or of conjunctions of literals (terms). Every propositional formula has an equivalent CNF and an equivalent DNF, although distributing can make the result exponentially long: has clauses in CNF.

Converting a formula to CNF

  1. Eliminate and using and .

  2. Push negations inward with De Morgan's laws and remove double negations .

  3. Distribute over until the formula is a conjunction of clauses.

  4. Delete any clause containing both and (it is a tautology), and any repeated literal within a clause.

NORMAL FORMS FROM A TRUTH TABLE

A minterm is true exactly on its row; a maxterm is false exactly on its row. In the maxterm, a variable that is T in the row appears negated and one that is F appears plain (for the row the maxterm is ). A formula with no T rows has an empty DNF (a contradiction); one with no F rows has an empty CNF (a tautology).

EXAM TIP

A CNF is a tautology exactly when every clause contains a complementary pair . A DNF is a contradiction exactly when every term contains a complementary pair. The other two directions (CNF contradiction, DNF tautology) are NOT checked clause by clause.

A Horn clause has at most one positive literal, for example , which reads . A definite clause has exactly one positive literal (a rule or a fact); a goal clause has none. Satisfiability of a set of Horn clauses can be decided in linear time by forward chaining (unit propagation).

Inference rules and resolution

Standard rules of inference

Rule

From

Conclude

Modus ponens

and

Modus tollens

and

Hypothetical syllogism

and

Disjunctive syllogism

and

Addition

Simplification

Conjunction

and

Constructive dilemma

, ,

Destructive dilemma

, ,

Resolution

and

EXAM TIP

Two invalid forms look like the rules above. Affirming the consequent: from and , concluding (fails at false, true). Denying the antecedent: from and , concluding (fails at the same assignment).

RESOLUTION RULE

Applies to two clauses holding a complementary pair of literals. The resolvent is entailed by its two parents (soundness). Resolution refutation is also complete for propositional logic: if a clause set is unsatisfiable, the empty clause can be derived from it.

Resolution refutation proves by showing that is unsatisfiable. Over a fixed finite set of variables only finitely many distinct clauses exist, so in propositional logic the procedure always stops.

1. Convert KB to CNF and put its clauses in a set S.
2. Negate the goal alpha, convert (not alpha) to CNF, and add its clauses to S.
3. Repeat:
4.     Pick two clauses in S that contain a complementary pair of literals.
5.     Resolve on ONE pair only; delete repeated literals in the resolvent.
6.     If the resolvent is the empty clause: stop, KB entails alpha.
7.     If the resolvent is not already in S: add it to S.
8.     If no pair of clauses gives a new clause: stop, KB does not entail alpha.

WORKED EXAMPLE

Using resolution refutation, show that the clauses entail .

Solution
  1. Add the negated goal: clause .

  2. Resolve with on : resolvent .

  3. Resolve with on : resolvent .

  4. Resolve with : the empty clause.

Answer: The empty clause is derived, so the three clauses together with are unsatisfiable, hence the clauses entail .

EXAM TIP

Resolving on two complementary pairs at once is a classic error: from and you may derive or , both tautologies, NOT the empty clause. These two clauses are satisfiable (take true, false).

Predicate logic: quantifiers and translation

First-order logic adds constants (a, b), variables (x, y), function symbols (f, g), predicates (P, Q, R, with arguments) and the quantifiers (for all) and (there exists). A formula is evaluated over an interpretation, that is a non-empty domain plus a meaning for each symbol. Convention: the domain is non-empty, and means at least one.

Translating English to first-order logic

English

Formula

Note

Every is a

Use with

Some is a

Use with

No is a

Equivalent to

Not every is a

Negation of the first row

Only s are s

Same as every is a ; the arrow is reversed

Exactly one has

Needs equality

At least two have

Needs equality

Everyone loves someone

The may differ for each

Someone is loved by everyone

One fixed ; entails the row above, not conversely

NEGATING QUANTIFIERS

Negation flips the quantifier and moves inside; apply De Morgan's laws to what remains.

DISTRIBUTION OF QUANTIFIERS

When both P and Q contain x free, only these two distribute as equivalences.

MOVING A QUANTIFIER PAST Q (X NOT FREE IN Q)

Valid when does not occur free in and the domain is non-empty.

MOVING A QUANTIFIER OUT OF AN IMPLICATION (X NOT FREE IN Q)

Valid when does not occur free in and the domain is non-empty. A quantifier moved out of the conclusion stays the same; one moved out of the premise FLIPS ( becomes and vice versa), because the premise sits under a hidden negation: .

ONE-WAY IMPLICATIONS

The converse of each is NOT valid.

MORE ONE-WAY ENTAILMENTS

The first needs the non-empty domain. None of the converses is valid: for example, with domain , true, false and false, is true but is false.

QUANTIFIER ORDER

Like quantifiers commute: and .

In the variable is bound by its quantifier and is free. A formula with no free variables is a sentence and is true or false in a given interpretation. A bound variable can be renamed without changing meaning (), but never rename it to a name that is free in the scope.

WORKED EXAMPLE

Negate and simplify .

Solution
  1. Remove the implication: .

  2. Negate the whole sentence: .

  3. Apply De Morgan inside: .

  4. Since is not free in , the can be moved out: .

Answer: , equivalently : some is related to something yet fails .

EXAM TIP

The two most common translation errors are for "every P is a Q" (it says everything is a P) and for "some P is a Q" (it is true whenever any object fails ).

Unification and first-order resolution

A substitution replaces variables by terms, written and applied to all occurrences at once (simultaneously). A unifier of two expressions is a substitution making them identical. The most general unifier (MGU) is a unifier from which every other unifier can be obtained by a further substitution; it is unique up to renaming of variables. Convention: lower-case letters from the end of the alphabet (x, y, z, w) are variables, while a, b and names like f, g, h denote constants and function symbols.

The unification algorithm, with the substitution theta starting empty:

Unify(s, t, theta):
1. Let s1 = s with theta applied, and t1 = t with theta applied.
2. If s1 and t1 are identical: return theta.
3. If s1 is a variable v:
       if v occurs inside t1: return FAIL            (the occurs check)
       else: apply v/t1 to every binding already in theta,
             add the binding v/t1 to theta, and return theta.
4. If t1 is a variable: return Unify(t1, s1, theta).
5. If s1 and t1 are compound with the same symbol and the same number of arguments:
       for i = 1 to the number of arguments:
           theta = Unify(i-th argument of s1, i-th argument of t1, theta)
           if theta is FAIL: return FAIL
       return theta
6. Otherwise return FAIL.
   (Two different constants, a constant against a compound term,
    different function or predicate symbols, or different numbers of arguments.)

For example and unify with MGU , while and do not unify because the occurs check fails ( would equal ).

Preparing a first-order knowledge base for resolution

  1. To prove , first form and convert it together with KB. Negate the goal BEFORE Skolemising, never after.

  2. Eliminate and , and push negations inward until they sit on atoms.

  3. Rename bound variables apart so that each quantifier has its own variable.

  4. Skolemise: replace each existentially quantified variable by a new Skolem constant if no encloses it, otherwise by a new Skolem function whose arguments are the universally quantified variables whose scope encloses that .

  5. Drop the universal quantifiers (all remaining variables are universal) and put the matrix in CNF.

FIRST-ORDER RESOLUTION RULE

Clauses must share no variable names (standardise apart); the empty clause again signals unsatisfiability of the clause set. Resolution together with factoring (unifying two literals inside one clause) is refutation-complete for first-order logic: an unsatisfiable clause set always yields the empty clause. If the set is satisfiable the search may never stop, since first-order entailment is only semi-decidable.

WORKED EXAMPLE

Here is a constant. Using resolution, show that and entail .

Solution
  1. Clauses: and , plus the negated goal .

  2. Resolve with : the MGU of and is , so the resolvent is .

  3. Resolve with : the empty clause.

Answer: The empty clause is derived, so the premises entail .

EXAM TIP

Skolemisation preserves satisfiability, not equivalence. becomes with a new function symbol, while becomes with a new constant. The first-order version of the empty-clause test is still correct because only unsatisfiability matters.

PREVIOUS-YEAR QUESTIONS

7 questions from the DA papers

Try each question first, then open the answer. We placed each question under a topic ourselves; the exam paper does not label topics.

See these papers in full: GATE DA 2026 · GATE DA 2025 · GATE DA 2024

GATE 2026 DA Q.14

GATE 2026 · DAQ.14 · 1 mark · MCQ

Which of the following statements is NOT true?

(The names of the predicates are intuitive.)

  1. (A)

  2. (B)

  3. (C)

    "Each king is a person" is equivalent to

  4. (D)

    "All humans are mortal" is equivalent to

Answer and solution
See the question in the paper
GATE 2026 DA Q.14: answer and solution

GATE 2026 DA Q.38

GATE 2026 · DAQ.38 · 2 marks · MCQ

Assume that a Creative () person will Succeed () if the person is also Disciplined (), but will not succeed otherwise. Now, consider the following statements:

(i)
(ii)
(iii)

Which of the following options is correct?

  1. (A)

    Both (i) and (ii) are TRUE

  2. (B)

    Only (ii) is TRUE

  3. (C)

    Both (ii) and (iii) are TRUE

  4. (D)

    Only (iii) is TRUE

Answer and solution
See the question in the paper
GATE 2026 DA Q.38: answer and solution

GATE 2025 DA Q.15

GATE 2025 · DAQ.15 · 1 mark · MCQ

Let and be any two propositions. Consider the following propositional statements.

, , , ,

where denotes conjunction (AND operation), denotes disjunction (OR operation), and denotes negation (NOT operation). Which one of the following options is correct?

(Note: denotes logical equivalence)

  1. (A)

  2. (B)

  3. (C)

  4. (D)

Answer and solution
See the question in the paper
GATE 2025 DA Q.15: answer and solution

GATE 2024 DA Q.54

GATE 2024 · DAQ.54 · 2 marks · MSQ

Let be true if the ball is used in rugby and false otherwise. Let be true if the ball is round and false otherwise. Consider the following logical sentences:

s1:
s2:
s3:
s4:

Which of the following choices is/are logical representations of the assertion, "All balls are round except balls used in rugby"?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

Answer and solution
See the question in the paper
GATE 2024 DA Q.54: answer and solution

PRACTICE

6 questions to test yourself

PRACTICE 11 mark · MCQ

Which one of the following propositional formulas is a tautology?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

Answer and solution

Answer: (B)

  1. A is false at false, true: is true but is false.

  2. C is false at true, false: the premise is true, the conclusion false.

  3. D is false at true, true: the premise is true and is false.

  4. B is hypothetical syllogism. If and are both true and is true, then and are true; if is false, is true. So B is true in every row.

PRACTICE 22 marks · NAT

How many of the 16 truth assignments to make the formula true?

Answer and solution

Answer:

  1. All three implications hold exactly when the truth values are non-decreasing along (once a variable is true, every later one must be true).

  2. So the assignment is false values followed by true values, for .

  3. That gives 5 assignments: TTTT, FTTT, FFTT, FFFT, FFFF (in the order p, q, r, s).

PRACTICE 32 marks · MCQ

Here is a constant, , and are function symbols, and are variables. Which is the most general unifier of and ? (A substitution is applied to all variables simultaneously.)

  1. (A)

  2. (B)

  3. (C)

  4. (D)

    No unifier exists

Answer and solution

Answer: (A)

  1. First arguments: against gives .

  2. Second arguments: against gives .

  3. Third arguments: after the pair is against , so ; applying this to the earlier binding turns into .

  4. The unifier is . Applying it to both expressions gives each time.

  5. B leaves the third arguments and different. C applied simultaneously sends to itself, not to , so and would become and , which differ.

PRACTICE 41 mark · NAT

For how many of the 8 assignments to is the formula false?

Answer and solution

Answer:

  1. An implication is false only when its premise is true and its conclusion false.

  2. The premise is true for 2 of the 4 choices of : both true or both false.

  3. The conclusion must be false, which fixes .

  4. Hence 2 assignments make the formula false: and .

PRACTICE 52 marks · MSQ

Over a non-empty domain, which of the following are logically equivalent to ? Select all that apply.

  1. (A)

  2. (B)

  3. (C)

  4. (D)

Answer and solution

Answer: (A), (B)

  1. Negating gives .

  2. De Morgan: , which is B.

  3. Since , this is also A.

  4. C is weaker: it holds whenever some object fails , even if another object has and not . D is the converse of A and is not equivalent: with a single object where is false and is true, the given formula is true but D is false.

PRACTICE 61 mark · MCQ

is a sentence in which does not occur, and the domain is non-empty. Which one of the following is logically equivalent to ?

  1. (A)

  2. (B)

  3. (C)

  4. (D)

Answer and solution

Answer: (B)

  1. Rewrite: , since is not free in and the domain is non-empty.

  2. , so the formula is , which is B.

  3. A fails: with domain , true, false and false, the given formula is false (at ) but A is true (its premise is false).

  4. C and D fail: with false everywhere and false, the given formula is true but C and D are both false.

OFFICIAL GATE 2027 SYLLABUS WORDING

Copied from the GATE 2027 syllabus; see all 2027 syllabi.

GATE DA

logic, propositional, predicate

Preparing in Kolkata? IAE Academy's course for GATE DA.