100% FREE Updated: Mar 2026 Engineering Mathematics Discrete Mathematics

Propositional and First-Order Logic

Comprehensive study notes on Propositional and First-Order Logic for GATE CS preparation. This chapter covers key concepts, formulas, and examples needed for your exam.

Propositional and First-Order Logic

Overview

The study of logic provides the fundamental basis for all rigorous reasoning within computer science and mathematics. It is the language through which we can articulate and analyze computational processes, algorithm correctness, and system specifications with unambiguous precision. In this chapter, we shall explore the formal systems of logic that are indispensable for a computer science engineer. A mastery of these concepts is not merely an academic exercise; it is a prerequisite for a deep understanding of subjects ranging from digital circuit design and database theory to artificial intelligence and software verification.

We begin our investigation with Propositional Logic, a system that deals with simple, declarative statements that are either true or false. Here, we will introduce the core operators, or logical connectives, that allow us to construct complex expressions from elementary propositions. We will then proceed to establish the notion of logical equivalence, providing a formal toolkit for simplifying and manipulating these expressions. Subsequently, we will examine the rules of inference, which form the bedrock of deductive reasoning and allow us to construct valid arguments from a set of premises.

Finally, we will extend our framework to First-Order Logic, a significantly more expressive system that incorporates variables, predicates, and quantifiers. This extension allows us to reason about objects and their properties, a capability essential for modeling the complex domains encountered in advanced computer science. For the GATE examination, a strong command of both systems is critical, as questions frequently test the ability to translate natural language into formal expressions, determine the validity of arguments, and apply logical principles to solve algorithmic problems.

---

Chapter Contents

| # | Topic | What You'll Learn |
|---|-------|-------------------|
| 1 | Propositional Logic | Formalizing statements using propositions and connectives. |
| 2 | Logical Equivalences | Simplifying expressions using standard equivalence laws. |
| 3 | Rules of Inference | Deriving conclusions from a set of premises. |
| 4 | First-Order Logic | Extending logic with predicates and quantifiers. |

---

Learning Objectives

❗ By the End of This Chapter

After completing this chapter, you will be able to:

  • Construct truth tables and determine the tautology, contradiction, or contingency of a compound proposition.

  • Simplify complex logical expressions by applying the laws of logical equivalence.

  • Apply rules of inference, such as Modus Ponens and Modus Tollens, to validate formal arguments.

  • Translate statements between natural language and first-order logic using predicates and quantifiers (βˆ€,βˆƒ\forall, \exists).

---

We now turn our attention to Propositional Logic...

Part 1: Propositional Logic

Introduction

Propositional Logic, also known as sentential calculus, serves as the bedrock of mathematical reasoning and digital computation. It is a formal system that deals with propositionsβ€”statements that can be definitively classified as either true or falseβ€”and the logical relationships that connect them. For a computer science engineer, a firm grasp of propositional logic is indispensable, as its principles directly underpin digital circuit design, algorithm analysis, artificial intelligence, database theory, and software verification.

In the context of the GATE examination, questions from this area test not only the mechanical application of rules but also the conceptual understanding of logical structures. We will systematically explore the fundamental components of this system, from basic propositions and logical connectives to the classification of complex logical statements. Our focus will remain steadfastly on the methods and principles most relevant to solving competitive examination problems, enabling the development of both accuracy and speed. Let us begin by defining the elementary unit of our study: the proposition.

πŸ“– Proposition

A proposition is a declarative sentence that is unambiguously either true or false, but not both. The truth value of a proposition is denoted by TT (True) or FF (False). Simple propositions, often represented by variables such as pp, qq, rr, …\dots, are called atomic propositions.

---

Key Concepts

1. Logical Connectives

To construct more complex statements, known as compound propositions, we combine atomic propositions using logical connectives or operators. The truth value of a compound proposition is entirely determined by the truth values of its constituent parts and the connectives used.

a. Negation (NOT)

The negation of a proposition pp, denoted by ¬p\neg p (or sometimes ∼p\sim p), is the statement "it is not the case that pp." It reverses the truth value of the original proposition.

| pp | Β¬p\neg p |
|:---:|:---:|
| TT | FF |
| FF | TT |

b. Conjunction (AND)

The conjunction of two propositions pp and qq, denoted by p∧qp \land q, is true only when both pp and qq are true. It corresponds to the English word "and."

| pp | qq | p∧qp \land q |
|:---:|:---:|:---:|
| TT | TT | TT |
| TT | FF | FF |
| FF | TT | FF |
| FF | FF | FF |

c. Disjunction (OR)

The disjunction of two propositions pp and qq, denoted by p∨qp \lor q, is false only when both pp and qq are false. This is an inclusive OR, meaning it is true if at least one of the propositions is true.

| pp | qq | p∨qp \lor q |
|:---:|:---:|:---:|
| TT | TT | TT |
| TT | FF | TT |
| FF | TT | TT |
| FF | FF | FF |

d. Implication (Conditional)

The implication p→qp \to q (read as "if pp, then qq") is a proposition that is false only in the case where the premise pp is true and the conclusion qq is false.

| pp | qq | p→qp \to q |
|:---:|:---:|:---:|
| TT | TT | TT |
| TT | FF | FF |
| FF | TT | TT |
| FF | FF | TT |

The cases where pp is false are noteworthy. When the premise is false, the implication is considered true regardless of the conclusion's truth value. This is known as vacuous truth.

❗ Understanding Implication

The statement p→qp \to q can be expressed in various ways in English, all of which are crucial to recognize in GATE questions:

    • If pp, then qq.

    • qq if pp.

    • pp is a sufficient condition for qq.

    • qq is a necessary condition for pp.

    • pp only if qq.

    • qq when pp.

    • qq follows from pp.

e. Biconditional (If and Only If)

The biconditional statement p↔qp \leftrightarrow q (read as "pp if and only if qq") is true when pp and qq have the same truth value.

| pp | qq | p↔qp \leftrightarrow q |
|:---:|:---:|:---:|
| TT | TT | TT |
| TT | FF | FF |
| FF | TT | FF |
| FF | FF | TT |

---

---

2. Tautology, Contradiction, and Contingency

We can classify compound propositions based on their truth values across all possible assignments to their variables.

πŸ“– Tautology, Contradiction, and Contingency
    • A Tautology is a compound proposition that is always true, regardless of the truth values of its atomic propositions.
    • A Contradiction is a compound proposition that is always false.
    • A Contingency is a proposition that is neither a tautology nor a contradiction.

Worked Example:

Problem: Determine if the proposition S:(pβ†’q)∨(qβ†’p)S: (p \to q) \lor (q \to p) is a tautology, contradiction, or contingency.

Solution: We construct a truth table to analyze all possible truth value combinations for pp and qq.

Step 1: List all possible truth values for pp and qq.

| pp | qq |
|:---:|:---:|
| T | T |
| T | F |
| F | T |
| F | F |

Step 2: Evaluate the sub-expressions p→qp \to q and q→pq \to p.

| pp | qq | p→qp \to q | q→pq \to p |
|:---:|:---:|:---:|:---:|
| T | T | T | T |
| T | F | F | T |
| F | T | T | F |
| F | F | T | T |

Step 3: Evaluate the final expression (pβ†’q)∨(qβ†’p)(p \to q) \lor (q \to p).

| pp | qq | pβ†’qp \to q | qβ†’pq \to p | (pβ†’q)∨(qβ†’p)(p \to q) \lor (q \to p) |
|:---:|:---:|:---:|:---:|:---:|
| T | T | T | T | T |
| T | F | F | T | T |
| F | T | T | F | T |
| F | F | T | T | T |

Result: Since the final column contains only TT values, the proposition is a tautology.

Answer: The proposition SS is a tautology.

---

3. Logical Equivalence

Two compound propositions, PP and QQ, are said to be logically equivalent if P↔QP \leftrightarrow Q is a tautology. We denote this by P≑QP \equiv Q. This concept is immensely powerful for simplifying complex expressions without resorting to truth tables.

πŸ“ Standard Logical Equivalences

Identity Laws:

p∧T≑pp \land T \equiv p

p∨F≑pp \lor F \equiv p

Domination Laws:

p∨T≑Tp \lor T \equiv T

p∧F≑Fp \land F \equiv F

Idempotent Laws:

p∨p≑pp \lor p \equiv p

p∧p≑pp \land p \equiv p

Double Negation:

Β¬(Β¬p)≑p\neg (\neg p) \equiv p

Commutative Laws:

p∨q≑q∨pp \lor q \equiv q \lor p

p∧q≑q∧pp \land q \equiv q \land p

Associative Laws:

(p∨q)∨r≑p∨(q∨r)(p \lor q) \lor r \equiv p \lor (q \lor r)

(p∧q)∧r≑p∧(q∧r)(p \land q) \land r \equiv p \land (q \land r)

Distributive Laws:

p∨(q∧r)≑(p∨q)∧(p∨r)p \lor (q \land r) \equiv (p \lor q) \land (p \lor r)

p∧(q∨r)≑(p∧q)∨(p∧r)p \land (q \lor r) \equiv (p \land q) \lor (p \land r)

De Morgan's Laws:

Β¬(p∧q)≑¬p∨¬q\neg (p \land q) \equiv \neg p \lor \neg q

Β¬(p∨q)≑¬p∧¬q\neg (p \lor q) \equiv \neg p \land \neg q

Absorption Laws:

p∨(p∧q)≑pp \lor (p \land q) \equiv p

p∧(p∨q)≑pp \land (p \lor q) \equiv p

Implication Equivalence:

pβ†’q≑¬p∨qp \to q \equiv \neg p \lor q

Contrapositive:

pβ†’q≑¬qβ†’Β¬pp \to q \equiv \neg q \to \neg p

Biconditional Equivalence:

p↔q≑(pβ†’q)∧(qβ†’p)p \leftrightarrow q \equiv (p \to q) \land (q \to p)

Exportation Law:

(p∧q)β†’r≑pβ†’(qβ†’r)(p \land q) \to r \equiv p \to (q \to r)

When to use: These equivalences are the primary tools for simplifying propositional formulae and for proving that a statement is a tautology, especially when the number of variables makes a truth table impractical.

Worked Example:

Problem: Show that (Β¬p∧(p∨q))β†’q(\neg p \land (p \lor q)) \to q is a tautology using logical equivalences.

Solution:

Step 1: Let us begin by simplifying the antecedent, (¬p∧(p∨q))(\neg p \land (p \lor q)). We apply the distributive law.

(¬p∧p)∨(¬p∧q)(\neg p \land p) \lor (\neg p \land q)

Step 2: The term (¬p∧p)(\neg p \land p) is a contradiction, which is always false (FF).

F∨(¬p∧q)F \lor (\neg p \land q)

Step 3: Using the identity law (F∨A≑AF \lor A \equiv A), the antecedent simplifies to:

¬p∧q\neg p \land q

Step 4: Now, we substitute this simplified antecedent back into the original implication.

(Β¬p∧q)β†’q(\neg p \land q) \to q

Step 5: We apply the implication equivalence law (Aβ†’B≑¬A∨BA \to B \equiv \neg A \lor B).

¬(¬p∧q)∨q\neg (\neg p \land q) \lor q

Step 6: Apply De Morgan's Law to the negated term.

(¬(¬p)∨¬q)∨q(\neg(\neg p) \lor \neg q) \lor q

Step 7: Apply the double negation law.

(p∨¬q)∨q(p \lor \neg q) \lor q

Step 8: Apply the associative law.

p∨(¬q∨q)p \lor (\neg q \lor q)

Step 9: The term (¬q∨q)(\neg q \lor q) is a tautology, which is always true (TT).

p∨Tp \lor T

Step 10: Finally, by the domination law, the expression simplifies to TT.

TT

Result: Since the expression simplifies to TT, we have proven that it is a tautology.

---

Problem-Solving Strategies

For GATE, efficiency is paramount. While truth tables are fundamental, they are often too slow. Mastery of logical equivalences is the key to rapid and accurate problem-solving.

πŸ’‘ GATE Strategy: Proving Tautologies

To determine if a complex statement SS is a tautology, consider these approaches in order:

  • Pattern Recognition: Look for known equivalences. Is the statement of the form Aβ†’AA \to A? Or does it match the exportation law, (P∧Q)β†’R≑Pβ†’(Qβ†’R)(P \land Q) \to R \equiv P \to (Q \to R)? Recognizing these patterns provides an instant solution.

  • Simplification via Equivalences: If no immediate pattern is obvious, systematically simplify the expression using the laws of logic. The goal is to reduce it to TT. Convert all implications (β†’\to) and biconditionals (↔\leftrightarrow) to their equivalent forms using only ∧\land, ∨\lor, and Β¬\neg.

  • Proof by Contradiction: To prove SS is a tautology, assume it is false and derive a contradiction. For an implication Aβ†’BA \to B, assume AA is true and BB is false. Work backwards to find truth values for the atomic propositions. If you arrive at a contradiction (e.g., pp must be both TT and FF), then your initial assumption was wrong, and SS must be a tautology.

  • Truth Table (Last Resort): If the expression has only 2 or 3 variables and simplification seems difficult, a truth table is a reliable, albeit slower, method.

---

Common Mistakes

A clear understanding of common pitfalls can significantly improve accuracy in an exam setting.

⚠️ Avoid These Errors
    • ❌ Confusing Implication and Biconditional: Treating "if pp then qq" as if it means "pp and qq must happen together."
βœ… Correct Approach: Remember pβ†’qp \to q is false only when pp is true and qq is false. It does not mean pp causes qq.
    • ❌ Incorrectly Translating "p only if q": Many students translate this as qβ†’pq \to p.
βœ… Correct Approach: "p only if q" means that if pp is true, then qq must also be true. This translates to pβ†’qp \to q.
    • ❌ Errors in De Morgan's Law: Forgetting to negate both terms and flip the operator. For example, writing Β¬(p∧q)≑¬p∧¬q\neg(p \land q) \equiv \neg p \land \neg q.
βœ… Correct Approach: The operator must be flipped: Β¬(p∧q)≑¬p∨¬q\neg(p \land q) \equiv \neg p \lor \neg q.
    • ❌ Ignoring Operator Precedence: Evaluating expressions from left to right without respecting the standard order of precedence.
βœ… Correct Approach: The standard precedence is: Negation (Β¬\neg) has the highest precedence, followed by Conjunction (∧\land), then Disjunction (∨\lor), and finally Implication (β†’\to) and Biconditional (↔\leftrightarrow) at the lowest level. Use parentheses to clarify order.

---

---

Practice Questions

:::question type="MCQ" question="Let pp be 'The system is online' and qq be 'The network is congested'. The statement 'The system is online only if the network is not congested' can be logically represented as:" options=["pβ†’Β¬qp \to \neg q","qβ†’pq \to p","Β¬qβ†’p\neg q \to p","p∧¬qp \land \neg q"] answer="pβ†’Β¬qp \to \neg q" hint="Recall the translation for 'P only if Q'. 'The network is not congested' is the negation of qq." solution="Step 1: Identify the propositions.
pp: The system is online.
qq: The network is congested.
Β¬q\neg q: The network is not congested.

Step 2: Analyze the English statement. The phrase 'A only if B' is a standard form for an implication, which translates to A→BA \to B.

Step 3: Apply the translation rule to the given statement.
Here, AA is 'The system is online' (pp).
BB is 'the network is not congested' (Β¬q\neg q).

Step 4: Construct the final logical expression.
Substituting AA with pp and BB with ¬q\neg q into the form A→BA \to B gives us:

p→¬qp \to \neg q

Result: The correct representation is p→¬qp \to \neg q.
Answer: p→¬q\boxed{p \to \neg q}"
:::

:::question type="NAT" question="Consider the propositional formula Ο•=(pβ†’q)↔(Β¬qβ†’Β¬p)\phi = (p \to q) \leftrightarrow (\neg q \to \neg p). For how many distinct assignments of truth values to the variables pp and qq does the formula Ο•\phi evaluate to True?" answer="4" hint="This question asks to determine if the formula is a tautology. A tautology is true for all possible truth value assignments." solution="Step 1: The formula is Ο•=(pβ†’q)↔(Β¬qβ†’Β¬p)\phi = (p \to q) \leftrightarrow (\neg q \to \neg p). This compares an implication with its contrapositive.

Step 2: We know from the laws of logical equivalence that an implication is always logically equivalent to its contrapositive. That is, pβ†’q≑¬qβ†’Β¬pp \to q \equiv \neg q \to \neg p.

Step 3: Let A=(pβ†’q)A = (p \to q) and B=(Β¬qβ†’Β¬p)B = (\neg q \to \neg p). Since A≑BA \equiv B, the biconditional A↔BA \leftrightarrow B will be true for all possible truth values of its constituent propositions. An expression of the form X↔XX \leftrightarrow X is a tautology.

Step 4: The variables are pp and qq. The total number of distinct truth value assignments for two variables is 22=42^2 = 4. These assignments are (T, T), (T, F), (F, T), and (F, F).

Step 5: Since the formula is a tautology, it will be true for all 4 of these assignments.

Result: The formula evaluates to True for 4 distinct assignments.
Answer: 4\boxed{4}"
:::

:::question type="MSQ" question="Which of the following propositional formulae are tautologies? Let TT represent the logical constant True." options=["(p∧q)β†’p(p \land q) \to p","(p∨q)β†’p(p \lor q) \to p","pβ†’(p∨q)p \to (p \lor q)","pβ†’(p∧q)p \to (p \land q)"] answer="(p∧q)β†’p(p \land q) \to p,pβ†’(p∨q)p \to (p \lor q)" hint="Use the implication equivalence Aβ†’B≑¬A∨BA \to B \equiv \neg A \lor B and simplify each option." solution="Let's analyze each option by converting the implication to its equivalent disjunctive form (Β¬A∨B\neg A \lor B) and simplifying.

Option A: (p∧q)β†’p(p \land q) \to p
Step 1: Apply implication equivalence.

¬(p∧q)∨p\neg(p \land q) \lor p

Step 2: Apply De Morgan's Law.
(¬p∨¬q)∨p(\neg p \lor \neg q) \lor p

Step 3: Apply associative and commutative laws.
(¬p∨p)∨¬q(\neg p \lor p) \lor \neg q

Step 4: Simplify Β¬p∨p≑T\neg p \lor p \equiv T.
T∨¬qT \lor \neg q

Step 5: Apply domination law.
TT

Result: This is a tautology. So, (A) is correct.

Option B: (p∨q)β†’p(p \lor q) \to p
Step 1: Apply implication equivalence.

¬(p∨q)∨p\neg(p \lor q) \lor p

Step 2: Apply De Morgan's Law.
(¬p∧¬q)∨p(\neg p \land \neg q) \lor p

Step 3: Apply distributive law.
(¬p∨p)∧(¬q∨p)(\neg p \lor p) \land (\neg q \lor p)

Step 4: Simplify Β¬p∨p≑T\neg p \lor p \equiv T.
T∧(¬q∨p)T \land (\neg q \lor p)

Step 5: Apply identity law.
¬q∨p\neg q \lor p

Result: This is not a tautology. It is false if pp is false and qq is true. So, (B) is incorrect.

Option C: pβ†’(p∨q)p \to (p \lor q)
Step 1: Apply implication equivalence.

¬p∨(p∨q)\neg p \lor (p \lor q)

Step 2: Apply associative law.
(¬p∨p)∨q(\neg p \lor p) \lor q

Step 3: Simplify Β¬p∨p≑T\neg p \lor p \equiv T.
T∨qT \lor q

Step 4: Apply domination law.
TT

Result: This is a tautology. So, (C) is correct.

Option D: pβ†’(p∧q)p \to (p \land q)
Step 1: Apply implication equivalence.

¬p∨(p∧q)\neg p \lor (p \land q)

Step 2: Apply distributive law.
(¬p∨p)∧(¬p∨q)(\neg p \lor p) \land (\neg p \lor q)

Step 3: Simplify Β¬p∨p≑T\neg p \lor p \equiv T.
T∧(¬p∨q)T \land (\neg p \lor q)

Step 4: Apply identity law.
¬p∨q\neg p \lor q

Result: This is not a tautology. It is false if pp is true and qq is false. So, (D) is incorrect.

The correct options are (A) and (C).
Answer: (p∧q)β†’p,pβ†’(p∨q)\boxed{(p \land q) \to p, p \to (p \lor q)}"
:::

---

Summary

❗ Key Takeaways for GATE

  • Master Connective Translations: Be fluent in translating English phrases into logical expressions, especially for implication (pβ†’qp \to q). Phrases like "p only if q," "q when p," and "p is sufficient for q" are common in questions.

  • Equivalence over Truth Tables: For expressions with three or more variables, proving tautologies or simplifying expressions is almost always faster using logical equivalence laws than by constructing a full truth table. Memorize De Morgan's laws, the implication equivalence (pβ†’q≑¬p∨qp \to q \equiv \neg p \lor q), and distributive laws.

  • Recognize Fundamental Structures: Be able to instantly identify that an implication is equivalent to its contrapositive (pβ†’q≑¬qβ†’Β¬pp \to q \equiv \neg q \to \neg p) and that the exportation law ((p∧q)β†’r≑pβ†’(qβ†’r)(p \land q) \to r \equiv p \to (q \to r)) holds. These patterns can turn a complex problem into a trivial one.

---

What's Next?

πŸ’‘ Continue Learning

Propositional logic is the foundation for more expressive logical systems and has direct applications in other core CS subjects.

    • First-Order Logic (Predicate Logic): This is the immediate next step. It extends propositional logic by introducing quantifiers (βˆ€\forall for all, βˆƒ\exists there exists), variables, and predicates, allowing for reasoning about objects and their properties.
    • Digital Logic Design: The connectives AND (∧\land), OR (∨\lor), and NOT (Β¬\neg) directly correspond to the fundamental logic gates (AND, OR, NOT) that form the building blocks of all digital circuits. The simplification of logical expressions is equivalent to minimizing circuit complexity.
Master these connections to build a comprehensive and integrated understanding for the GATE examination.

---

πŸ’‘ Moving Forward

Now that you understand Propositional Logic, let's explore Logical Equivalences which builds on these concepts.

---

Part 2: Logical Equivalences

Introduction

In the domain of mathematical logic, our objective is often not merely to construct propositions, but to reason about them, to simplify them, and to determine when two different-looking statements convey the same essential truth. The concept of logical equivalence provides the formal framework for this undertaking. Two compound propositions are said to be logically equivalent if they have identical truth values for all possible truth assignments of their constituent atomic propositions.

The study of logical equivalences is fundamental to computer science, forming the bedrock for circuit design in digital logic, query optimization in databases, and program verification in software engineering. Mastery of these equivalences allows one to manipulate and simplify complex logical expressions with confidence and precision, a skill indispensable for rigorous analytical reasoning. In this section, we will explore the core definitions and the principal laws that govern these equivalences.

πŸ“– Logical Equivalence

Two compound propositions pp and qq are called logically equivalent if p↔qp \leftrightarrow q is a tautology. The notation for this is p≑qp \equiv q or pβ€…β€ŠβŸΊβ€…β€Šqp \iff q. This signifies that pp and qq have the same truth table.

---

Key Concepts

Before delving into the laws of equivalence, we must first establish the classifications of compound propositions based on their truth values.

1. Tautology, Contradiction, and Contingency

The nature of a compound proposition can be determined by examining its truth table.

πŸ“– Tautology

A compound proposition that is always true, regardless of the truth values of the atomic propositions that occur in it, is called a tautology. A common example is p∨¬pp \lor \neg p.

πŸ“– Contradiction

A compound proposition that is always false, regardless of the truth values of the atomic propositions that occur in it, is called a contradiction. A common example is p∧¬pp \land \neg p.

πŸ“– Contingency

A compound proposition that is neither a tautology nor a contradiction is called a contingency. Its truth value depends on the truth values of its atomic propositions. An example is p→qp \rightarrow q.

We observe that two propositions PP and QQ are equivalent, P≑QP \equiv Q, precisely when the proposition P↔QP \leftrightarrow Q is a tautology. This is the foundational test for equivalence.

2. Standard Logical Equivalences

A set of fundamental equivalences, often called laws, provides the tools for the algebraic manipulation of logical propositions. These laws allow us to simplify complex statements without constructing full truth tables.

πŸ“ Laws of Logical Equivalence

| Law Name | Equivalence with ∧\land | Equivalence with ∨\lor |
| :--- | :--- | :--- |
| Identity | p∧T≑pp \land T \equiv p | p∨F≑pp \lor F \equiv p |
| Domination | p∧F≑Fp \land F \equiv F | p∨T≑Tp \lor T \equiv T |
| Idempotent | p∧p≑pp \land p \equiv p | p∨p≑pp \lor p \equiv p |
| Double Negation | Β¬(Β¬p)≑p\neg (\neg p) \equiv p | |
| Commutative | p∧q≑q∧pp \land q \equiv q \land p | p∨q≑q∨pp \lor q \equiv q \lor p |
| Associative | (p∧q)∧r≑p∧(q∧r)(p \land q) \land r \equiv p \land (q \land r) | (p∨q)∨r≑p∨(q∨r)(p \lor q) \lor r \equiv p \lor (q \lor r) |
| Distributive | p∧(q∨r)≑(p∧q)∨(p∧r)p \land (q \lor r) \equiv (p \land q) \lor (p \land r) | p∨(q∧r)≑(p∨q)∧(p∨r)p \lor (q \land r) \equiv (p \lor q) \land (p \lor r) |
| De Morgan's | Β¬(p∧q)≑¬p∨¬q\neg(p \land q) \equiv \neg p \lor \neg q | Β¬(p∨q)≑¬p∧¬q\neg(p \lor q) \equiv \neg p \land \neg q |
| Absorption | p∧(p∨q)≑pp \land (p \lor q) \equiv p | p∨(p∧q)≑pp \lor (p \land q) \equiv p |
| Negation | p∧¬p≑Fp \land \neg p \equiv F | p∨¬p≑Tp \lor \neg p \equiv T |

Additional Key Equivalences:

    • Conditional Statement: pβ†’q≑¬p∨qp \rightarrow q \equiv \neg p \lor q
    • Biconditional Statement: p↔q≑(pβ†’q)∧(qβ†’p)≑(Β¬p∨q)∧(p∨¬q)p \leftrightarrow q \equiv (p \rightarrow q) \land (q \rightarrow p) \equiv (\neg p \lor q) \land (p \lor \neg q)
    • Contrapositive: pβ†’q≑¬qβ†’Β¬pp \rightarrow q \equiv \neg q \rightarrow \neg p
Variables:
    • p,q,rp, q, r represent arbitrary propositions.
    • TT represents a tautology (always True).
    • FF represents a contradiction (always False).
When to use: These laws are used to simplify complex logical expressions, prove that two expressions are equivalent, and form the basis for simplifying Boolean expressions in digital logic.

Worked Example:

Problem: Show that ¬(p∨(¬p∧q))\neg(p \lor (\neg p \land q)) is logically equivalent to ¬p∧¬q\neg p \land \neg q.

Solution:

We will start with the more complex expression and apply the laws of logical equivalence to simplify it.

Step 1: Apply De Morgan's Law to the outermost negation.

Β¬(p∨(Β¬p∧q))≑¬p∧¬(Β¬p∧q)\neg(p \lor (\neg p \land q)) \equiv \neg p \land \neg(\neg p \land q)

Step 2: Apply De Morgan's Law again to the second term.

≑¬p∧(Β¬(Β¬p)∨¬q)\equiv \neg p \land (\neg(\neg p) \lor \neg q)

Step 3: Apply the Double Negation Law to Β¬(Β¬p)\neg(\neg p).

≑¬p∧(p∨¬q)\equiv \neg p \land (p \lor \neg q)

Step 4: Apply the Distributive Law.

≑(Β¬p∧p)∨(Β¬p∧¬q)\equiv (\neg p \land p) \lor (\neg p \land \neg q)

Step 5: Apply the Negation Law to (¬p∧p)(\neg p \land p).

≑F∨(Β¬p∧¬q)\equiv F \lor (\neg p \land \neg q)

Step 6: Apply the Identity Law.

≑¬p∧¬q\equiv \neg p \land \neg q

Result:
We have successfully transformed the left-hand side into the right-hand side using a sequence of logical equivalences.

Β¬(p∨(Β¬p∧q))≑¬p∧¬q\neg(p \lor (\neg p \land q)) \equiv \neg p \land \neg q

---

Problem-Solving Strategies

While algebraic manipulation using the laws of equivalence is the primary method for simplification, it is not the only one. For smaller expressions or for verification, truth tables provide a mechanical, albeit sometimes tedious, alternative.

πŸ’‘ GATE Strategy: Truth Table Verification

If you are asked to determine if two complex expressions are equivalent and algebraic simplification seems difficult or error-prone under time pressure, constructing a truth table is a reliable method.

  • Identify all atomic propositions (e.g., p,q,rp, q, r).

  • Construct a table with 2n2^n rows, where nn is the number of atomic propositions.

  • Evaluate the truth value of each complex expression for every row.

  • If the final columns for both expressions are identical, they are logically equivalent.

This method is foolproof but becomes impractical for more than three variables (23=82^3=8 rows). For four variables, 1616 rows make it too time-consuming for a typical GATE question.

---

Common Mistakes

A frequent source of error in manipulating logical expressions is the misapplication of the distributive and De Morgan's laws.

⚠️ Avoid These Errors
    • Incorrect Distribution:
- ❌ p∧(q∨r)≑(p∧q)∨rp \land (q \lor r) \equiv (p \land q) \lor r - βœ… p∧(q∨r)≑(p∧q)∨(p∧r)p \land (q \lor r) \equiv (p \land q) \lor (p \land r). The term p∧p \land must distribute over both terms inside the parenthesis.
    • Incorrect application of De Morgan's Law:
- ❌ Β¬(p∧q)≑¬p∧¬q\neg(p \land q) \equiv \neg p \land \neg q - βœ… Β¬(p∧q)≑¬p∨¬q\neg(p \land q) \equiv \neg p \lor \neg q. The operator between the propositions must also be flipped (∧\land becomes ∨\lor, and ∨\lor becomes ∧\land).
    • Confusing Implication:
- ❌ Treating pβ†’qp \rightarrow q as equivalent to qβ†’pq \rightarrow p (its converse). - βœ… The implication pβ†’qp \rightarrow q is equivalent to its contrapositive, Β¬qβ†’Β¬p\neg q \rightarrow \neg p.

---

---

Practice Questions

:::question type="MCQ" question="The proposition (pβ†’q)∧(Β¬pβ†’q)(p \rightarrow q) \land (\neg p \rightarrow q) is logically equivalent to which of the following?" options=["pp","qq","Β¬p\neg p","Β¬q\neg q"] answer="qq" hint="First, convert the implications to their disjunctive normal form using the equivalence Aβ†’B≑¬A∨BA \rightarrow B \equiv \neg A \lor B. Then apply the distributive law." solution="
Step 1: Convert the implications to their equivalent OR form.

(pβ†’q)∧(Β¬pβ†’q)≑(Β¬p∨q)∧(Β¬(Β¬p)∨q)(p \rightarrow q) \land (\neg p \rightarrow q) \equiv (\neg p \lor q) \land (\neg(\neg p) \lor q)

Step 2: Apply the Double Negation Law.

≑(Β¬p∨q)∧(p∨q)\equiv (\neg p \lor q) \land (p \lor q)

Step 3: Apply the Distributive Law (in reverse). Here, qq is common to both clauses.

≑(Β¬p∧p)∨q\equiv (\neg p \land p) \lor q

Step 4: Apply the Negation Law.

≑F∨q\equiv F \lor q

Step 5: Apply the Identity Law.

≑q\equiv q

Result: The expression simplifies to qq.
Answer: q\boxed{q}
"
:::

:::question type="MCQ" question="Which of the following propositions is a tautology?" options=["(p∨q)β†’p(p \lor q) \rightarrow p","p∨(qβ†’p)p \lor (q \rightarrow p)","(p∧q)β†’p(p \land q) \rightarrow p","p∧(pβ†’q)p \land (p \rightarrow q)"] answer="(p∧q)β†’p(p \land q) \rightarrow p" hint="A proposition of the form Aβ†’BA \rightarrow B is a tautology if whenever AA is true, BB must also be true. Consider the definition of the ∧\land operator." solution="
Let us analyze each option.

Option A: (p∨q)β†’p(p \lor q) \rightarrow p
If p=Fp=F and q=Tq=T, then p∨qp \lor q is TT, but pp is FF. So, Tβ†’FT \rightarrow F is FF. Not a tautology.

Option B: p∨(qβ†’p)p \lor (q \rightarrow p)
If p=Fp=F, the expression becomes F∨(qβ†’F)F \lor (q \rightarrow F). If q=Tq=T, this is F∨(Tβ†’F)≑F∨F≑FF \lor (T \rightarrow F) \equiv F \lor F \equiv F. Not a tautology.

Option C: (p∧q)β†’p(p \land q) \rightarrow p
Let's convert to its equivalent form: ¬(p∧q)∨p\neg(p \land q) \lor p.
Applying De Morgan's Law: (¬p∨¬q)∨p(\neg p \lor \neg q) \lor p.
Using Associative and Commutative Laws: (¬p∨p)∨¬q(\neg p \lor p) \lor \neg q.
Using Negation Law: T∨¬qT \lor \neg q.
Using Domination Law: TT.
Since the expression simplifies to TT, it is a tautology. This is also known as the Simplification rule of inference. If p∧qp \land q is true, then by definition, pp must be true.

Option D: p∧(pβ†’q)p \land (p \rightarrow q)
This simplifies to p∧(Β¬p∨q)≑(p∧¬p)∨(p∧q)≑F∨(p∧q)≑p∧qp \land (\neg p \lor q) \equiv (p \land \neg p) \lor (p \land q) \equiv F \lor (p \land q) \equiv p \land q. This is a contingency, not a tautology.
Answer: (p∧q)β†’p\boxed{(p \land q) \rightarrow p}
"
:::

:::question type="MSQ" question="Which of the following pairs of propositions are logically equivalent? Let TT be a tautology and FF be a contradiction." options=["pβ†’qp \rightarrow q and Β¬qβ†’Β¬p\neg q \rightarrow \neg p","pβ†’(qβ†’r)p \rightarrow (q \rightarrow r) and (p∧q)β†’r(p \land q) \rightarrow r","p↔qp \leftrightarrow q and (p∧q)∨(Β¬p∧¬q)(p \land q) \lor (\neg p \land \neg q)","Β¬(pβ†’q)\neg(p \rightarrow q) and p∨¬qp \lor \neg q"] answer="A,B,C" hint="For each pair (X,Y)(X, Y), check if X≑YX \equiv Y using either algebraic simplification or by comparing their truth tables. Remember the equivalence for implication: Aβ†’B≑¬A∨BA \rightarrow B \equiv \neg A \lor B." solution="
Option A: p→qp \rightarrow q and ¬q→¬p\neg q \rightarrow \neg p
This is the law of contraposition. Let's prove it.
pβ†’q≑¬p∨qp \rightarrow q \equiv \neg p \lor q.
Β¬qβ†’Β¬p≑¬(Β¬q)∨(Β¬p)≑q∨¬p≑¬p∨q\neg q \rightarrow \neg p \equiv \neg(\neg q) \lor (\neg p) \equiv q \lor \neg p \equiv \neg p \lor q.
Since both simplify to the same expression, they are equivalent. So, A is correct.

Option B: pβ†’(qβ†’r)p \rightarrow (q \rightarrow r) and (p∧q)β†’r(p \land q) \rightarrow r
Let's simplify both.
pβ†’(qβ†’r)≑pβ†’(Β¬q∨r)≑¬p∨(Β¬q∨r)≑¬p∨¬q∨rp \rightarrow (q \rightarrow r) \equiv p \rightarrow (\neg q \lor r) \equiv \neg p \lor (\neg q \lor r) \equiv \neg p \lor \neg q \lor r.
(p∧q)β†’r≑¬(p∧q)∨r≑(Β¬p∨¬q)∨r≑¬p∨¬q∨r(p \land q) \rightarrow r \equiv \neg(p \land q) \lor r \equiv (\neg p \lor \neg q) \lor r \equiv \neg p \lor \neg q \lor r.
Since both simplify to the same expression, they are equivalent. This is known as the Exportation Law. So, B is correct.

Option C: p↔qp \leftrightarrow q and (p∧q)∨(Β¬p∧¬q)(p \land q) \lor (\neg p \land \neg q)
The biconditional p↔qp \leftrightarrow q is true if and only if pp and qq have the same truth value.
The expression (p∧q)∨(Β¬p∧¬q)(p \land q) \lor (\neg p \land \neg q) is true if either (pp is true and qq is true) or (pp is false and qq is false). This is precisely the condition for p↔qp \leftrightarrow q being true. Thus, they are equivalent. So, C is correct.

Option D: Β¬(pβ†’q)\neg(p \rightarrow q) and p∨¬qp \lor \neg q
Let's simplify ¬(p→q)\neg(p \rightarrow q).
Β¬(pβ†’q)≑¬(Β¬p∨q)≑¬(Β¬p)∧¬q≑p∧¬q\neg(p \rightarrow q) \equiv \neg(\neg p \lor q) \equiv \neg(\neg p) \land \neg q \equiv p \land \neg q.
The expression p∧¬qp \land \neg q is not equivalent to p∨¬qp \lor \neg q. So, D is incorrect.
Answer: A,B,C\boxed{A,B,C}
"
:::

:::question type="MCQ" question="The absorption law in propositional logic states that:" options=["p∨(p∧q)≑pp \lor (p \land q) \equiv p","p∧(q∨q)≑pp \land (q \lor q) \equiv p","p∨(p∨q)≑pp \lor (p \lor q) \equiv p","p∧(pβ†’q)≑pp \land (p \rightarrow q) \equiv p"] answer="p∨(p∧q)≑pp \lor (p \land q) \equiv p" hint="Recall the two forms of the absorption law. One involves OR with AND, and the other involves AND with OR." solution="
The absorption laws are:

  • p∨(p∧q)≑pp \lor (p \land q) \equiv p

  • p∧(p∨q)≑pp \land (p \lor q) \equiv p
  • Option A directly matches the first form of the absorption law. The other options are incorrect applications of logical laws.
    Answer: p∨(p∧q)≑p\boxed{p \lor (p \land q) \equiv p}
    "
    :::

    ---

    Summary

    ❗ Key Takeaways for GATE

    • Equivalence is Tautology: Two propositions PP and QQ are logically equivalent if and only if the proposition P↔QP \leftrightarrow Q is a tautology. This is the formal definition.

    • Master the Core Laws: For simplification and proofs, you must have immediate recall of De Morgan's Laws, Distributive Laws, and the implication equivalence (pβ†’q≑¬p∨qp \rightarrow q \equiv \neg p \lor q). These are the most frequently applied transformations.

    • Algebraic vs. Truth Table Method: Algebraic simplification using the laws is generally faster and more elegant for complex propositions. However, for expressions with only two variables, a truth table is a quick and completely reliable method for verification.

    ---

    What's Next?

    πŸ’‘ Continue Learning

    A solid understanding of logical equivalences is a prerequisite for more advanced topics in logic and its applications.

      • Predicate Logic: The concepts of equivalence extend to first-order logic, where you will encounter laws for quantifiers, such as Β¬βˆ€xP(x)β‰‘βˆƒxΒ¬P(x)\neg \forall x P(x) \equiv \exists x \neg P(x).
      • Digital Logic Design: The laws of logical equivalence are known as Boolean algebra identities in this context. They are used extensively to simplify logic circuits, which reduces the number of gates required and thus the cost and complexity of the hardware. For example, (Aβ‹…B)+(Aβ‹…C)(A \cdot B) + (A \cdot C) is simplified to Aβ‹…(B+C)A \cdot (B+C).
    Mastering these connections is crucial for a comprehensive understanding of how fundamental logical principles are applied across different areas of computer science.

    ---

    πŸ’‘ Moving Forward

    Now that you understand Logical Equivalences, let's explore Rules of Inference which builds on these concepts.

    ---

    Part 3: Rules of Inference

    Introduction

    In the study of logic, our objective extends beyond merely assigning truth values to propositions. We are fundamentally concerned with the structure of arguments and the process of reasoning from a set of established truths, or premises, to a new truth, the conclusion. An argument's validity is not determined by the actual truth of its premises in the real world, but by its logical form. A valid argument guarantees that if its premises are true, its conclusion must necessarily be true.

    Rules of inference are the foundational templates or schemata for constructing valid arguments. They provide the syntactical transformations that allow us to deduce conclusions from premises with logical certainty. Mastering these rules is indispensable for constructing formal proofs, a cornerstone of both mathematics and theoretical computer science. Whether we are proving the correctness of an algorithm, verifying a property of a data structure, or establishing a theorem in discrete mathematics, the underlying framework is invariably built upon these principles of logical deduction.

    πŸ“– Valid Argument

    An argument is a sequence of propositions, called premises, that logically implies another proposition, called the conclusion. An argument form is valid if, for any substitution of propositions for its variables, the conclusion is true whenever all the premises are true. This is equivalent to stating that the conditional statement formed by the conjunction of the premises implying the conclusion is a tautology. If p1,p2,…,pnp_1, p_2, \dots, p_n are the premises and qq is the conclusion, the argument is valid if and only if the proposition (p1∧p2βˆ§β‹―βˆ§pn)β‡’q(p_1 \land p_2 \land \dots \land p_n) \Rightarrow q is a tautology. We denote a valid deduction as p1,p2,…,pn⊒qp_1, p_2, \dots, p_n \vdash q.

    ---

    Key Concepts for Propositional Logic

    We begin our exploration with rules of inference that operate on simple or compound propositions. These rules form the bedrock of logical deduction and are frequently combined to build more complex proofs.

    1. Modus Ponens (Law of Detachment)

    Modus Ponens, or "the way that affirms," is perhaps the most intuitive rule of inference. It states that if we have an implication and we know its antecedent (the 'if' part) is true, we can validly conclude that its consequent (the 'then' part) is also true.

    πŸ“ Modus Ponens
    ((pβ‡’q)∧p)β‡’q((p \Rightarrow q) \land p) \Rightarrow q

    Symbolic Form:
    From p⇒qp \Rightarrow q and pp, we can conclude qq.
    This is written as:

    p⇒qp \Rightarrow q

    pp

    ∴q\therefore q

    When to use: This is the fundamental rule for moving forward in a proof. When you have an if-then statement and you can establish the 'if' condition, you can use Modus Ponens to assert the 'then' outcome.

    Worked Example:

    Problem: Given the premises:

  • If it is raining, the ground is wet.

  • It is raining.

  • What can be concluded?

    Solution:

    Step 1: Translate the premises into propositional logic.
    Let pp be "It is raining" and qq be "The ground is wet".
    The premises are:

  • pβ‡’qp \Rightarrow q

  • pp
  • Step 2: Apply the Modus Ponens rule.
    The structure of the premises, (p⇒q)(p \Rightarrow q) and pp, directly matches the template for Modus Ponens.

    Step 3: Derive the conclusion.
    According to Modus Ponens, from p⇒qp \Rightarrow q and pp, we can infer qq.

    Answer: We can conclude that "The ground is wet" (qq).

    2. Modus Tollens (Law of Contraposition)

    Modus Tollens, or "the way that denies," works in the opposite direction of Modus Ponens. If we have an implication and we know its consequent is false, we can validly conclude that its antecedent must also be false. This is based on the logical equivalence between an implication and its contrapositive (pβ‡’q≑¬qβ‡’Β¬pp \Rightarrow q \equiv \neg q \Rightarrow \neg p).

    πŸ“ Modus Tollens
    ((pβ‡’q)∧¬q)β‡’Β¬p((p \Rightarrow q) \land \neg q) \Rightarrow \neg p

    Symbolic Form:
    From p⇒qp \Rightarrow q and ¬q\neg q, we can conclude ¬p\neg p.

    p⇒qp \Rightarrow q

    Β¬q\neg q

    ∴¬p\therefore \neg p

    When to use: Use this rule when you have an if-then statement and you can establish that the 'then' outcome is false. This allows you to negate the 'if' condition.

    Worked Example:

    Problem: Given the premises:

  • If a program is correct, it does not produce an error on test case A.

  • The program produced an error on test case A.

  • What is the logical conclusion?

    Solution:

    Step 1: Define the propositions.
    Let pp be "The program is correct".
    Let qq be "It does not produce an error on test case A".
    The premises are:

  • pβ‡’qp \Rightarrow q

  • Β¬q\neg q (The program did produce an error)
  • Step 2: Identify the applicable rule of inference.
    The premises p⇒qp \Rightarrow q and ¬q\neg q match the structure required for Modus Tollens.

    Step 3: Conclude based on the rule.
    Modus Tollens allows us to infer Β¬p\neg p from the given premises.

    Answer: We can conclude that "The program is not correct" (Β¬p\neg p).

    3. Hypothetical Syllogism

    This rule describes a chain of reasoning. If one event implies a second, and that second event implies a third, then the first event must imply the third. It allows us to combine conditional statements transitively.

    πŸ“ Hypothetical Syllogism
    ((pβ‡’q)∧(qβ‡’r))β‡’(pβ‡’r)((p \Rightarrow q) \land (q \Rightarrow r)) \Rightarrow (p \Rightarrow r)

    Symbolic Form:

    p⇒qp \Rightarrow q

    q⇒rq \Rightarrow r

    ∴pβ‡’r\therefore p \Rightarrow r

    When to use: When you have a series of implications where the consequent of one is the antecedent of another, you can use this rule to "cut out the middleman" and form a direct implication.

    4. Other Fundamental Rules

    While Modus Ponens and Modus Tollens are central, several other rules are essential for constructing proofs.

    | Rule Name | Tautology Form | Symbolic Form | Description |
    | --------------------- | ------------------------------------------------------ | ----------------------------------- | ------------------------------------------------------------------------- |
    | Disjunctive Syllogism | ((p∨q)∧¬p)β‡’q((p \lor q) \land \neg p) \Rightarrow q | p∨q,Β¬p⊒qp \lor q, \neg p \vdash q | If a disjunction is true and one disjunct is false, the other must be true. |
    | Addition | pβ‡’(p∨q)p \Rightarrow (p \lor q) | p⊒p∨qp \vdash p \lor q | If a proposition is true, we can form a disjunction with any other proposition. |
    | Simplification | (p∧q)β‡’p(p \land q) \Rightarrow p | p∧q⊒pp \land q \vdash p | If a conjunction is true, then each of its components must be true. |
    | Conjunction | ((p)∧(q))β‡’(p∧q)((p) \land (q)) \Rightarrow (p \land q) | p,q⊒p∧qp, q \vdash p \land q | If two propositions are true separately, their conjunction is true. |
    | Resolution | ((p∨q)∧(Β¬p∨r))β‡’(q∨r)((p \lor q) \land (\neg p \lor r)) \Rightarrow (q \lor r) | p∨q,Β¬p∨r⊒q∨rp \lor q, \neg p \lor r \vdash q \lor r | A powerful rule that combines two disjunctions, eliminating a complementary pair. |

    ---

    Rules of Inference for Quantified Statements

    When our statements involve variables and quantifiers such as "for all" (βˆ€\forall) and "there exists" (βˆƒ\exists), we require additional rules to handle them. These rules allow us to move between general statements about a domain and specific instances within that domain. Let the domain of discourse be UU.

    1. Universal Instantiation (UI)

    This rule allows us to conclude that a property holds for a specific individual element of the domain if we know it holds for all elements of the domain.

    • Formal Rule: From the premise βˆ€xP(x)\forall x P(x), we can conclude P(c)P(c) for any arbitrary element c∈Uc \in U.
    • Symbolic Form: βˆ€xP(x)⊒P(c)\forall x P(x) \vdash P(c)

    2. Universal Generalization (UG)

    This rule is the reverse of UI, but it must be applied with great care. If we can show that a property P(c)P(c) holds for an arbitrary element cc of the domain (meaning no specific properties of cc other than its membership in the domain were used), then we can generalize that the property holds for all elements.

    • Formal Rule: From the premise P(c)P(c) for an arbitrary c∈Uc \in U, we can conclude βˆ€xP(x)\forall x P(x).
    • Symbolic Form: P(c)Β forΒ anΒ arbitraryΒ cβŠ’βˆ€xP(x)P(c) \text{ for an arbitrary } c \vdash \forall x P(x)

    3. Existential Instantiation (EI)

    If we know that there exists at least one element in the domain for which a property is true, we can give that element a name (a new constant symbol not used elsewhere in the proof) and proceed with our reasoning.

    • Formal Rule: From the premise βˆƒxP(x)\exists x P(x), we can conclude P(c)P(c) for some specific, but potentially unknown, element c∈Uc \in U.
    • Symbolic Form: βˆƒxP(x)⊒P(c)Β forΒ someΒ elementΒ c\exists x P(x) \vdash P(c) \text{ for some element } c

    4. Existential Generalization (EG)

    This rule is straightforward. If we can demonstrate that a property P(c)P(c) is true for at least one specific element cc in the domain, we can generalize that there exists an element in the domain for which the property is true.

    • Formal Rule: From the premise P(c)P(c) for a particular element c∈Uc \in U, we can conclude βˆƒxP(x)\exists x P(x).
    • Symbolic Form: P(c)βŠ’βˆƒxP(x)P(c) \vdash \exists x P(x)

    5. Mathematical Induction as a Rule of Inference

    A particularly powerful rule of inference used for statements over the domain of natural numbers (N={0,1,2,… }\mathbb{N} = \{0, 1, 2, \dots\}) is the principle of mathematical induction. It allows us to prove that a property P(n)P(n) holds for all natural numbers. It is a tautology derived from the axioms that define the natural numbers.

    πŸ“ Principle of Mathematical Induction
    (P(0)βˆ§βˆ€k∈N[P(k)β‡’P(k+1)])β‡’βˆ€n∈NP(n)(P(0) \land \forall k \in \mathbb{N} [P(k) \Rightarrow P(k+1)]) \Rightarrow \forall n \in \mathbb{N} P(n)

    Components:

      • Base Case: P(0)P(0) is true. We must establish that the property holds for the first element of the domain (or a different starting point, if specified).

      • Inductive Step: βˆ€k∈N[P(k)β‡’P(k+1)]\forall k \in \mathbb{N} [P(k) \Rightarrow P(k+1)]. We must prove that if the property holds for an arbitrary natural number kk (the inductive hypothesis), then it must also hold for the next number, k+1k+1.

      • Conclusion: βˆ€n∈NP(n)\forall n \in \mathbb{N} P(n). If both the base case and the inductive step are true, we can conclude the property holds for all natural numbers.


    When to use: This rule is specifically designed for proving properties of all natural numbers (or any well-ordered set). GATE questions often test the logical structure of this principle.

    Worked Example:

    Problem: Use mathematical induction to prove that for all non-negative integers nn, the sum of the first nn integers is given by βˆ‘i=0ni=n(n+1)2\sum_{i=0}^{n} i = \frac{n(n+1)}{2}.

    Solution:

    Let P(n)P(n) be the proposition βˆ‘i=0ni=n(n+1)2\sum_{i=0}^{n} i = \frac{n(n+1)}{2}.

    Step 1: Establish the Base Case (n=0n=0).
    We must show that P(0)P(0) is true.

    βˆ‘i=00i=0\sum_{i=0}^{0} i = 0
    0(0+1)2=0\frac{0(0+1)}{2} = 0

    Since both sides are equal, P(0)P(0) is true.

    Step 2: Formulate the Inductive Hypothesis.
    Assume P(k)P(k) is true for an arbitrary non-negative integer kk.

    AssumeΒ βˆ‘i=0ki=k(k+1)2\text{Assume } \sum_{i=0}^{k} i = \frac{k(k+1)}{2}

    Step 3: Prove the Inductive Step.
    We must show that P(k)β‡’P(k+1)P(k) \Rightarrow P(k+1) is true. That is, we must prove βˆ‘i=0k+1i=(k+1)((k+1)+1)2\sum_{i=0}^{k+1} i = \frac{(k+1)((k+1)+1)}{2}.

    βˆ‘i=0k+1i=(βˆ‘i=0ki)+(k+1)\sum_{i=0}^{k+1} i = \left( \sum_{i=0}^{k} i \right) + (k+1)

    By the inductive hypothesis, we can substitute the formula for the sum up to kk:

    =k(k+1)2+(k+1)= \frac{k(k+1)}{2} + (k+1)

    Now, we perform algebraic simplification:

    =(k+1)(k2+1)= (k+1) \left( \frac{k}{2} + 1 \right)
    =(k+1)(k+22)= (k+1) \left( \frac{k+2}{2} \right)
    =(k+1)(k+2)2= \frac{(k+1)(k+2)}{2}

    This is precisely the formula for P(k+1)P(k+1). Thus, we have shown that P(k)β‡’P(k+1)P(k) \Rightarrow P(k+1).

    Step 4: Conclude by the Principle of Mathematical Induction.
    Since we have established the base case P(0)P(0) and the inductive step βˆ€k[P(k)β‡’P(k+1)]\forall k [P(k) \Rightarrow P(k+1)], we can conclude that P(n)P(n) is true for all non-negative integers nn.

    Answer: βˆ€n∈N,βˆ‘i=0ni=n(n+1)2\forall n \in \mathbb{N}, \sum_{i=0}^{n} i = \frac{n(n+1)}{2}.

    ---

    Problem-Solving Strategies

    πŸ’‘ GATE Strategy: Argument Validation

    To determine if an argument is valid, follow these steps:

    • Translate: Convert the English sentences into symbolic logic, clearly defining each proposition (p,q,r,…p, q, r, \dots).

    • Identify Premises and Conclusion: List all premises and the final conclusion to be derived.

    • Apply Rules Sequentially: Start with the given premises. Apply the rules of inference one step at a time to derive new, true statements. Each new statement can be used in subsequent steps.

    • Check for Tautology: For simpler arguments, you can construct a single conditional statement ((p1βˆ§β‹―βˆ§pn)β‡’q)((p_1 \land \dots \land p_n) \Rightarrow q) and verify if it is a tautology using a truth table. This is often too slow for complex arguments but is a reliable method.

    • Recognize Induction: If a question involves a predicate over natural numbers (e.g., P(x)P(x)) and an implication relating a value to its successor (e.g., P(x)β‡’P(x+1)P(x) \Rightarrow P(x+1)) or predecessor (P(x)β‡’P(xβˆ’1)P(x) \Rightarrow P(x-1)), it is testing your understanding of mathematical induction. Carefully check the base case and the direction of the implication.

    ---

    Common Mistakes

    ⚠️ Avoid These Logical Fallacies
      • Fallacy of Affirming the Consequent:
    ❌ Given pβ‡’qp \Rightarrow q and qq, concluding pp. This is invalid. (Example: "If it is raining, the ground is wet. The ground is wet. Therefore, it is raining." This is false; the ground could be wet for other reasons). βœ… The correct rule is Modus Ponens: from pβ‡’qp \Rightarrow q and pp, conclude qq.
      • Fallacy of Denying the Antecedent:
    ❌ Given pβ‡’qp \Rightarrow q and Β¬p\neg p, concluding Β¬q\neg q. This is invalid. (Example: "If it is raining, the ground is wet. It is not raining. Therefore, the ground is not wet." This is false; the ground could still be wet). βœ… The correct rule is Modus Tollens: from pβ‡’qp \Rightarrow q and Β¬q\neg q, conclude Β¬p\neg p.
      • Incorrect Universal Generalization:
    ❌ Proving a property for a specific number, like P(5)P(5), and then concluding it holds for all xx, i.e., βˆ€xP(x)\forall x P(x). βœ… To use UG, you must prove P(c)P(c) for an arbitrary element cc, one with no special properties assumed.
      • Incomplete Induction:
    ❌ A proof by induction is invalid if it lacks a base case or if the inductive step is flawed. Both components are absolutely essential. βœ… Always explicitly state and prove the base case, then clearly state the inductive hypothesis before proving the inductive step.

    ---

    Practice Questions

    :::question type="MCQ" question="Consider the following premises:

  • If the server is down, no user can log in.

  • If the network is congested, the server is down.

  • The network is congested.

  • Which of the following can be logically concluded?" options=["The server is not down.","All users can log in.","No user can log in.","The network is not congested."] answer="No user can log in." hint="Use Hypothetical Syllogism followed by Modus Ponens." solution="Step 1: Translate the premises into symbolic logic.
    Let pp: The network is congested.
    Let qq: The server is down.
    Let rr: No user can log in.

    Premises:

  • qβ‡’rq \Rightarrow r

  • pβ‡’qp \Rightarrow q

  • pp
  • Step 2: Apply Hypothetical Syllogism to premises 1 and 2.
    From p⇒qp \Rightarrow q and q⇒rq \Rightarrow r, we can conclude p⇒rp \Rightarrow r.

    Step 3: Apply Modus Ponens.
    We now have the derived premise p⇒rp \Rightarrow r and the given premise pp.
    Using Modus Ponens, we can conclude rr.

    Result:
    The conclusion is rr, which translates to 'No user can log in'.
    Answer: \boxed{\text{No user can log in.}}"
    :::

    :::question type="MSQ" question="Let the domain of discourse be all integers. Which of the following arguments are valid?
    Let P(x)P(x) be 'xx is an even number' and Q(x)Q(x) be 'xx is divisible by 2'." options=["Given βˆ€x(P(x)β‡’Q(x))\forall x (P(x) \Rightarrow Q(x)) and P(3)P(3), we can conclude Q(3)Q(3).","Given βˆ€x(P(x)⇔Q(x))\forall x (P(x) \Leftrightarrow Q(x)) and Β¬Q(7)\neg Q(7), we can conclude Β¬P(7)\neg P(7).","Given βˆƒxP(x)\exists x P(x), we can conclude P(4)P(4).","Given P(8)P(8), we can conclude βˆ€xP(x)\forall x P(x)."] answer="Given βˆ€x(P(x)⇔Q(x))\forall x (P(x) \Leftrightarrow Q(x)) and Β¬Q(7)\neg Q(7), we can conclude Β¬P(7)\neg P(7)." hint="Analyze each option using the rules for quantified statements. Pay close attention to the difference between universal and existential quantifiers." solution="

    • Option A: This is an application of Universal Instantiation to get P(3)β‡’Q(3)P(3) \Rightarrow Q(3), followed by Modus Ponens. However, the premise P(3)P(3) ('3 is an even number') is false. While the logical form is valid, the argument is not sound because a premise is false. Thus, we cannot soundly conclude Q(3)Q(3).


    • Option B: From βˆ€x(P(x)⇔Q(x))\forall x (P(x) \Leftrightarrow Q(x)), we use Universal Instantiation to get P(7)⇔Q(7)P(7) \Leftrightarrow Q(7). This is equivalent to (P(7)β‡’Q(7))∧(Q(7)β‡’P(7))(P(7) \Rightarrow Q(7)) \land (Q(7) \Rightarrow P(7)). Given Β¬Q(7)\neg Q(7), we apply Modus Tollens to (P(7)β‡’Q(7))(P(7) \Rightarrow Q(7)) and Β¬Q(7)\neg Q(7) to validly conclude Β¬P(7)\neg P(7). This argument is valid.


    • Option C: Given βˆƒxP(x)\exists x P(x), we cannot conclude P(4)P(4). Existential quantification only guarantees the existence of some xx for which P(x)P(x) is true, not a specific one like 44. This is an invalid deduction.


    • Option D: Given P(8)P(8), we cannot conclude βˆ€xP(x)\forall x P(x). Proving a property for a single, specific instance (P(8)P(8)) is not sufficient to generalize it to all integers. This is an invalid deduction.


    Therefore, only the argument in Option B is logically valid.
    Answer: \boxed{\text{Given } \forall x (P(x) \Leftrightarrow Q(x)) \text{ and } \neg Q(7), \text{ we can conclude } \neg P(7).}"
    :::

    :::question type="MCQ" question="Let P(x)P(x) be a predicate on the set of integers. Consider the statement: (P(10)βˆ§βˆ€kβ‰₯10[P(k)β‡’P(k+1)])(P(10) \land \forall k \ge 10 [P(k) \Rightarrow P(k+1)]). What is the strongest valid conclusion?" options=["βˆ€n∈Z,P(n)\forall n \in \mathbb{Z}, P(n)","βˆ€nβ‰₯10,P(n)\forall n \ge 10, P(n)","βˆ€n≀10,P(n)\forall n \le 10, P(n)","P(n)P(n) is true for all even integers nβ‰₯10n \ge 10"] answer="βˆ€nβ‰₯10,P(n)\forall n \ge 10, P(n)" hint="This is a direct application of the principle of mathematical induction, but with a different starting point (base case)." solution="Step 1: Identify the components of the argument.
    The given statement has the form of mathematical induction.

    • Base Case: P(10)P(10) is given as true. The induction starts at n=10n=10.

    • Inductive Step: βˆ€kβ‰₯10[P(k)β‡’P(k+1)]\forall k \ge 10 [P(k) \Rightarrow P(k+1)] is given. This means that for any integer kk from 10 onwards, if P(k)P(k) is true, then P(k+1)P(k+1) is also true.


    Step 2: Apply the principle of induction.
    Since the base case is true for n=10n=10 and the inductive step guarantees that truth propagates from any kβ‰₯10k \ge 10 to k+1k+1, we can conclude that the property P(n)P(n) holds for all integers greater than or equal to 10.

    Step 3: Evaluate the options.

    • βˆ€n∈Z,P(n)\forall n \in \mathbb{Z}, P(n): This is incorrect. We have no information about integers less than 10.

    • βˆ€nβ‰₯10,P(n)\forall n \ge 10, P(n): This is the correct conclusion based on our analysis.

    • βˆ€n≀10,P(n)\forall n \le 10, P(n): This is incorrect. The implication goes from kk to k+1k+1, not downwards.

    • P(n)P(n) is true for all even integers nβ‰₯10n \ge 10: This is a weaker conclusion than what can be drawn. The argument proves it for all integers nβ‰₯10n \ge 10, not just the even ones.


    Result:
    The strongest valid conclusion is βˆ€nβ‰₯10,P(n)\forall n \ge 10, P(n).
    Answer: \boxed{\forall n \ge 10, P(n)}"
    :::

    :::question type="NAT" question="Consider the following proof sequence:

  • pβ‡’qp \Rightarrow q (Premise)

  • Β¬rβ‡’Β¬q\neg r \Rightarrow \neg q (Premise)

  • pp (Premise)

  • qq (From 1, 3)

  • qβ‡’rq \Rightarrow r (From 2)

  • rr (From 4, 5)

  • A single rule of inference was used to derive each of lines 4, 5, and 6. The rule used to derive line 5 is the Law of Contraposition. How many of the three derivations (to get lines 4, 5, and 6) use Modus Ponens?" answer="2" hint="Identify the rule of inference used for each step. The Law of Contraposition states that an implication is equivalent to its contrapositive." solution="Step 1: Analyze the derivation of line 4.
    • Premise 1: pβ‡’qp \Rightarrow q

    • Premise 3: pp

    • Conclusion: qq

    This is a direct application of Modus Ponens.

    Step 2: Analyze the derivation of line 5.

    • Premise 2: Β¬rβ‡’Β¬q\neg r \Rightarrow \neg q

    • Conclusion: qβ‡’rq \Rightarrow r

    This is an application of the Law of Contraposition, which states that (Aβ‡’B)⇔(Β¬Bβ‡’Β¬A)(A \Rightarrow B) \Leftrightarrow (\neg B \Rightarrow \neg A). This is an equivalence rule, not Modus Ponens.

    Step 3: Analyze the derivation of line 6.

    • Derived Premise 4: qq

    • Derived Premise 5: qβ‡’rq \Rightarrow r

    • Conclusion: rr

    This is another direct application of Modus Ponens.

    Step 4: Count the number of times Modus Ponens was used.
    Modus Ponens was used to derive line 4 and line 6. Therefore, it was used 2 times.

    Result: 2
    Answer: \boxed{2}"
    :::

    ---

    Summary

    ❗ Key Takeaways for GATE

    • Validity vs. Truth: An argument's validity depends on its logical form, not the truth of its premises. A valid argument with true premises is called a sound argument.

    • Core Propositional Rules: You must have instant recall of Modus Ponens (p,pβ‡’q⊒qp, p \Rightarrow q \vdash q) and Modus Tollens (Β¬q,pβ‡’q⊒¬p\neg q, p \Rightarrow q \vdash \neg p). Be wary of the common fallacies: affirming the consequent and denying the antecedent.

    • Quantifier Rules: Understand the four rules for quantifiers (UI, UG, EI, EG) and, crucially, the conditions under which they can be applied. Universal Generalization (UG) is the most subtle and requires proving a property for an arbitrary element.

    • Mathematical Induction's Logical Form: Recognize the structure (P(base)βˆ§βˆ€k[P(k)β‡’P(k+1)])β‡’βˆ€nP(n)(P(\text{base}) \land \forall k [P(k) \Rightarrow P(k+1)]) \Rightarrow \forall n P(n). GATE questions often test variations of the base case and the direction of the implication, so analyze these components carefully.

    ---

    What's Next?

    πŸ’‘ Continue Learning

    The mastery of rules of inference is a prerequisite for more advanced topics in discrete mathematics and logic.

      • Proof Techniques: Rules of inference are the building blocks for all major proof techniques, including Direct Proof, Proof by Contradiction, and Proof by Contraposition. Understanding these rules will clarify why those techniques are logically sound.
      • Predicate Logic and Set Theory: The rules for quantified statements are used extensively to prove properties of sets, relations, and functions. For example, proving that one set is a subset of another often involves using Universal Instantiation and Generalization.

    ---

    ---

    πŸ’‘ Moving Forward

    Now that you understand Rules of Inference, let's explore First-Order Logic which builds on these concepts.

    ---

    Part 4: First-Order Logic

    Introduction

    In our study of mathematical logic, we begin with propositional logic, a system that allows us to reason about the truth values of complete, declarative statements. While powerful, its expressive capacity is limited. It cannot, for instance, reason about the properties of objects or the relationships between them. Consider the statement, "All computer science students must study Discrete Mathematics." Propositional logic can only treat this as a single atomic proposition, say PP, obscuring the internal structure involving "all students" and the property of "studying Discrete Mathematics."

    To overcome this limitation, we turn our attention to First-Order Logic (FOL), also known as Predicate Logic. It extends propositional logic by introducing a richer vocabulary of predicates, variables, and quantifiers. This allows us to make general assertions about collections of objects and to formalize statements of much greater complexity. For the GATE examination, a firm grasp of First-Order Logic is indispensable, particularly for translating natural language statements into formal logical expressions, a skill frequently tested.

    πŸ“– First-Order Logic (Predicate Logic)

    First-Order Logic is a formal system of logic that extends propositional logic by allowing for quantification over individuals of a given domain. Its fundamental components include predicates, which describe properties or relations; variables, which range over individuals; constants, which name specific individuals; and quantifiers (βˆ€,βˆƒ\forall, \exists), which express the extent of a predicate's application.

    ---

    Key Concepts

    1. Components of First-Order Logic

    A well-formed formula (WFF) in First-Order Logic is constructed from several basic building blocks.

    * Constants: These are symbols that represent specific objects or individuals in the domain of discourse. For example, `2`, `c`, `'GATE'` could be constants.
    * Variables: These are symbols, such as x,y,zx, y, z, that act as placeholders for objects. Variables do not refer to a specific object but range over the entire domain.
    * Predicates: A predicate is a symbol that represents a property of an object or a relationship between objects. A predicate takes one or more arguments (variables or constants) and evaluates to either true or false.
    * P(x)P(x) is a unary predicate (denoting a property). Example: IsEven(x)IsEven(x) could mean "xx is an even number."
    * Q(x,y)Q(x, y) is a binary predicate (denoting a relation). Example: GreaterThan(x,y)GreaterThan(x, y) could mean "xx is greater than yy."
    * Functions: A function symbol represents a mapping from one or more elements of the domain to a single element of the domain. For example, plus(x,y)plus(x, y) could represent the sum x+yx+y. (Note: In many GATE problems, functions are implicitly part of the predicates).
    * Logical Connectives: First-Order Logic uses the same connectives as propositional logic: ∧\land (conjunction), ∨\lor (disjunction), Β¬\neg (negation), β€…β€ŠβŸΉβ€…β€Š\implies (implication), and β€…β€ŠβŸΊβ€…β€Š\iff (biconditional).
    * Quantifiers: These are the defining features of FOL, allowing us to specify the scope of a predicate.

    2. Quantifiers in Detail

    Quantifiers bind variables, specifying how many individuals in the domain a formula applies to.

    The Universal Quantifier (βˆ€\forall)

    The symbol βˆ€\forall, read as "for all" or "for every," is the universal quantifier. The expression βˆ€xP(x)\forall x P(x) asserts that the predicate P(x)P(x) is true for every object xx in the domain of discourse.

    Consider the statement: "Every student in the class passed the exam."
    Let the domain be all students in the class.
    Let S(x)S(x) be the predicate "xx is a student in the class."
    Let P(x)P(x) be the predicate "xx passed the exam."

    The formal representation is:

    βˆ€x(S(x)β€…β€ŠβŸΉβ€…β€ŠP(x))\forall x (S(x) \implies P(x))

    This reads: "For every xx, if xx is a student in the class, then xx passed the exam."

    The Existential Quantifier (βˆƒ\exists)

    The symbol βˆƒ\exists, read as "there exists" or "for some" or "there is at least one," is the existential quantifier. The expression βˆƒxP(x)\exists x P(x) asserts that there is at least one object xx in the domain of discourse for which the predicate P(x)P(x) is true.

    Consider the statement: "Some students are GATE toppers."
    Let the domain be all people.
    Let S(x)S(x) be the predicate "xx is a student."
    Let T(x)T(x) be the predicate "xx is a GATE topper."

    The formal representation is:

    βˆƒx(S(x)∧T(x))\exists x (S(x) \land T(x))

    This reads: "There exists an xx such that xx is a student and xx is a GATE topper."

    ⚠️ Common Mistake: Connectives with Quantifiers

    A frequent source of error is choosing the wrong logical connective to pair with a quantifier when restricting a domain.

    ❌ For universal quantification, using ∧\land: βˆ€x(S(x)∧P(x))\forall x (S(x) \land P(x)). This incorrectly states "Everything in the universe is a student AND passed the exam."
    βœ… The correct pattern is implication: βˆ€x(S(x)β€…β€ŠβŸΉβ€…β€ŠP(x))\forall x (S(x) \implies P(x)).

    ❌ For existential quantification, using β€…β€ŠβŸΉβ€…β€Š\implies: βˆƒx(S(x)β€…β€ŠβŸΉβ€…β€ŠT(x))\exists x (S(x) \implies T(x)). This is a weak statement that is true even if no students exist (since if S(x)S(x) is false, the implication is true). It does not assert the existence of a student who is a topper.
    βœ… The correct pattern is conjunction: βˆƒx(S(x)∧T(x))\exists x (S(x) \land T(x)).

    3. Free and Bound Variables

    The scope of a quantifier is the part of the formula to which it applies. A variable is said to be bound if it falls within the scope of a corresponding quantifier. A variable that is not bound is free.

    Consider the formula:

    βˆ€x(P(x)∧Q(y))∨R(x)\forall x (P(x) \land Q(y)) \lor R(x)

    * In the subformula βˆ€x(P(x)∧Q(y))\forall x (P(x) \land Q(y)), the quantifier βˆ€x\forall x binds the variable xx within the parentheses. The variable yy is free.
    * In the overall formula, the xx in R(x)R(x) is not within the scope of the βˆ€x\forall x quantifier, so this occurrence of xx is free.
    * Therefore, in the complete formula, yy is a free variable, and the second occurrence of xx is a free variable.

    A formula with no free variables is called a sentence or a closed formula. Sentences have a definite truth value (true or false).

    4. Expressing Uniqueness

    A common task in translating statements to FOL is expressing quantity, particularly "exactly one." This requires a combination of existential and universal quantifiers. Let us build this concept systematically.

    Let P(x)P(x) be a property.

    a) At least one xx has property PP:
    This is the standard existential quantification.

    βˆƒxP(x)\exists x P(x)

    b) At most one xx has property PP:
    This means that if we find two individuals, say xx and yy, that both have property PP, then they must be the same individual.

    βˆ€xβˆ€y((P(x)∧P(y))β€…β€ŠβŸΉβ€…β€Šx=y)\forall x \forall y ((P(x) \land P(y)) \implies x=y)

    c) Exactly one xx has property PP:
    This is the conjunction of "at least one" and "at most one." While we could combine the two formulas above, more compact and equivalent forms are used in practice.

    πŸ“ Expressing 'Exactly One'

    Let P(x)P(x) be a predicate. The statement "There exists exactly one xx such that P(x)P(x) is true" can be written in several equivalent ways. Let x≠yx \neq y be shorthand for ¬(x=y)\neg(x=y).

    Form 1: Existence + Uniqueness by Implication

    βˆƒx(P(x)βˆ§βˆ€y(P(y)β€…β€ŠβŸΉβ€…β€Šy=x))\exists x (P(x) \land \forall y (P(y) \implies y=x))

    "There is an xx with property PP, and for any yy that also has property PP, yy must be the same as xx."

    Form 2: Existence + Uniqueness by Negation

    βˆƒx(P(x)βˆ§βˆ€y(yβ‰ xβ€…β€ŠβŸΉβ€…β€ŠΒ¬P(y)))\exists x (P(x) \land \forall y (y \neq x \implies \neg P(y)))

    "There is an xx with property PP, and for any yy that is different from xx, yy does not have property PP."

    Form 3: Existence + Non-existence of a Second

    βˆƒx(P(x)βˆ§Β¬βˆƒy(yβ‰ x∧P(y)))\exists x (P(x) \land \neg \exists y (y \neq x \land P(y)))

    "There is an xx with property PP, and there does not exist a different yy that also has property PP."

    When to use: All three forms are logically equivalent. Familiarity with each is crucial, as any of them may appear in GATE questions, particularly in MSQ-type problems.

    Worked Example:

    Problem: Translate the statement "Every computer has exactly one central processing unit (CPU)" into a first-order logic formula.
    Use the predicates:
    * Computer(x)Computer(x): xx is a computer.
    * CPU(y)CPU(y): yy is a CPU.
    * Has(x,y)Has(x, y): computer xx has CPU yy.

    Solution:

    Step 1: Deconstruct the statement. The outer structure is "For every computer...". This immediately suggests a universal quantifier for computers.

    βˆ€x(Computer(x)β€…β€ŠβŸΉβ€…β€Šβ€¦β€‰)\forall x (Computer(x) \implies \dots)

    Step 2: The inner part of the statement is "...has exactly one CPU." This requires expressing the uniqueness of the CPU for a given computer xx. Let the property P(y)P(y) be Has(x,y)∧CPU(y)Has(x, y) \land CPU(y). We need to state that for a given xx, there is exactly one yy with this property.

    Step 3: Apply one of the "exactly one" formula structures. Let's use Form 1: βˆƒy(P(y)βˆ§βˆ€z(P(z)β€…β€ŠβŸΉβ€…β€Šz=y))\exists y (P(y) \land \forall z (P(z) \implies z=y)).

    Substituting P(y)P(y) with (Has(x,y)∧CPU(y))(Has(x, y) \land CPU(y)) and using zz as the second variable for the CPU:

    βˆƒy((Has(x,y)∧CPU(y))βˆ§βˆ€z((Has(x,z)∧CPU(z))β€…β€ŠβŸΉβ€…β€Šz=y))\exists y ((Has(x, y) \land CPU(y)) \land \forall z ((Has(x, z) \land CPU(z)) \implies z=y))

    Step 4: Combine the outer and inner parts into the final formula.

    βˆ€x(Computer(x)β€…β€ŠβŸΉβ€…β€Šβˆƒy((Has(x,y)∧CPU(y))βˆ§βˆ€z((Has(x,z)∧CPU(z))β€…β€ŠβŸΉβ€…β€Šz=y)))\forall x (Computer(x) \implies \exists y ((Has(x, y) \land CPU(y)) \land \forall z ((Has(x, z) \land CPU(z)) \implies z=y)))

    Answer: The logical formula is βˆ€x(Computer(x)β€…β€ŠβŸΉβ€…β€Šβˆƒy((Has(x,y)∧CPU(y))βˆ§βˆ€z((Has(x,z)∧CPU(z))β€…β€ŠβŸΉβ€…β€Šz=y)))\forall x (Computer(x) \implies \exists y ((Has(x, y) \land CPU(y)) \land \forall z ((Has(x, z) \land CPU(z)) \implies z=y))). Assuming the domain for yy and zz is implicitly CPUs, this can be simplified, but the above is the most rigorous translation based on the given predicates.

    ---

    Problem-Solving Strategies

    Translating natural language into First-Order Logic can be challenging. A systematic approach is often effective.

    πŸ’‘ GATE Strategy for Translation

    • Identify the Domain: Determine the universe of discourse. Are we talking about numbers, people, computers, or all objects?

    • Find the Quantifiers: Look for keywords. "All," "every," "any" suggest βˆ€\forall. "Some," "at least one," "there is" suggest βˆƒ\exists. "No," "none" suggest Β¬βˆƒ\neg \exists or βˆ€β€¦Β¬\forall \dots \neg.

    • Define Predicates: Break down the sentences into properties and relationships. Assign clear predicate symbols, like S(x)S(x) for "xx is a student" or L(x,y)L(x, y) for "xx loves yy."

    • Structure the Formula: Start with the outermost quantifier and work inwards. Use parentheses to ensure the correct scope for quantifiers and connectives.

    • Check the Connectives: Remember the common patterns: βˆ€\forall usually pairs with β€…β€ŠβŸΉβ€…β€Š\implies, and βˆƒ\exists usually pairs with ∧\land.

    • Verify Uniqueness: If you see "exactly one," "at most one," or "exactly two," immediately recall the specific logical structures for these expressions. Write them down separately and then integrate them into the main formula.

    ---

    Common Mistakes

    ⚠️ Avoid These Errors
      • Incorrect Quantifier Order: The order of quantifiers matters significantly. βˆ€xβˆƒyP(x,y)\forall x \exists y P(x, y) is not equivalent to βˆƒyβˆ€xP(x,y)\exists y \forall x P(x, y). The first means "for every xx, there is some yy (which can depend on xx)," while the second means "there is a single yy that works for all xx."
    ❌ Saying "Every integer has a successor" as βˆƒyβˆ€x(y=x+1)\exists y \forall x (y = x+1). This claims there is one number yy that is the successor of ALL integers. βœ… The correct form is βˆ€xβˆƒy(y=x+1)\forall x \exists y (y = x+1). For each xx, a corresponding yy exists.
      • Negating Quantified Statements: Forgetting De Morgan's laws for quantifiers.
    ❌ Β¬(βˆ€xP(x))β‰‘βˆ€x(Β¬P(x))\neg (\forall x P(x)) \equiv \forall x (\neg P(x)) βœ… Β¬(βˆ€xP(x))β‰‘βˆƒx(Β¬P(x))\neg (\forall x P(x)) \equiv \exists x (\neg P(x)) ❌ Β¬(βˆƒxP(x))β‰‘βˆƒx(Β¬P(x))\neg (\exists x P(x)) \equiv \exists x (\neg P(x)) βœ… Β¬(βˆƒxP(x))β‰‘βˆ€x(Β¬P(x))\neg (\exists x P(x)) \equiv \forall x (\neg P(x))

    ---

    Practice Questions

    :::question type="MCQ" question="Which of the following is the correct translation of the statement 'Not all birds can fly'?" options=["βˆ€x(Bird(x)∧¬CanFly(x))\forall x (Bird(x) \land \neg CanFly(x))","Β¬βˆ€x(Bird(x)β€…β€ŠβŸΉβ€…β€ŠΒ¬CanFly(x))\neg \forall x (Bird(x) \implies \neg CanFly(x))","βˆƒx(Bird(x)∧¬CanFly(x))\exists x (Bird(x) \land \neg CanFly(x))","βˆ€x(Bird(x)β€…β€ŠβŸΉβ€…β€ŠΒ¬CanFly(x))\forall x (Bird(x) \implies \neg CanFly(x))"] answer="βˆƒx(Bird(x)∧¬CanFly(x))\exists x (Bird(x) \land \neg CanFly(x))" hint="The statement 'Not all P are Q' is equivalent to 'Some P are not Q'." solution="
    Step 1: Analyze the initial statement: 'Not all birds can fly'. This is the negation of 'All birds can fly'.

    Step 2: First, let's write the formula for 'All birds can fly'. Using predicates Bird(x)Bird(x) and CanFly(x)CanFly(x), this is:

    βˆ€x(Bird(x)β€…β€ŠβŸΉβ€…β€ŠCanFly(x))\forall x (Bird(x) \implies CanFly(x))

    Step 3: Now, negate the formula from Step 2.

    Β¬(βˆ€x(Bird(x)β€…β€ŠβŸΉβ€…β€ŠCanFly(x)))\neg (\forall x (Bird(x) \implies CanFly(x)))

    Step 4: Apply De Morgan's law for quantifiers, which states that Β¬(βˆ€xP(x))β‰‘βˆƒx(Β¬P(x))\neg (\forall x P(x)) \equiv \exists x (\neg P(x)).

    βˆƒx(Β¬(Bird(x)β€…β€ŠβŸΉβ€…β€ŠCanFly(x)))\exists x (\neg (Bird(x) \implies CanFly(x)))

    Step 5: Use the logical equivalence Β¬(Aβ€…β€ŠβŸΉβ€…β€ŠB)≑A∧¬B\neg(A \implies B) \equiv A \land \neg B.

    βˆƒx(Bird(x)∧¬CanFly(x))\exists x (Bird(x) \land \neg CanFly(x))

    Result: This formula reads "There exists an xx such that xx is a bird and xx cannot fly," which is the precise meaning of "Not all birds can fly" or "Some birds cannot fly." This matches the third option.
    Answer: βˆƒx(Bird(x)∧¬CanFly(x))\boxed{\exists x (Bird(x) \land \neg CanFly(x))}
    "
    :::

    :::question type="NAT" question="Consider the first-order logic formula Ο•=βˆ€x((βˆƒyP(x,y,z))β€…β€ŠβŸΉβ€…β€Š(βˆ€zQ(y,z)))\phi = \forall x ((\exists y P(x, y, z)) \implies (\forall z Q(y, z))). What is the number of free variables in Ο•\phi?" answer="2" hint="A variable is free if it is not bound by any quantifier. Check the scope of each quantifier carefully." solution="
    Step 1: Identify all variables in the formula. The variables are x,y,zx, y, z.

    Step 2: Identify the quantifiers and their scopes.

    • The quantifier βˆ€x\forall x has the scope ((βˆƒyP(x,y,z))β€…β€ŠβŸΉβ€…β€Š(βˆ€zQ(y,z)))((\exists y P(x, y, z)) \implies (\forall z Q(y, z))). Any occurrence of xx within this scope is bound. The variable xx in P(x,y,z)P(x, y, z) is therefore bound.


    • The quantifier βˆƒy\exists y has the scope P(x,y,z)P(x, y, z). Any occurrence of yy within this scope is bound. The variable yy in P(x,y,z)P(x, y, z) is therefore bound.


    • The quantifier βˆ€z\forall z has the scope Q(y,z)Q(y, z). Any occurrence of zz within this scope is bound. The variable zz in Q(y,z)Q(y, z) is therefore bound.


    Step 3: Check each variable's status.
    • xx: Bound by βˆ€x\forall x.

    • yy: The yy in P(x,y,z)P(x, y, z) is bound by βˆƒy\exists y. However, the yy in Q(y,z)Q(y, z) is outside the scope of βˆƒy\exists y. Thus, this occurrence of yy is free.

    • zz: The zz in P(x,y,z)P(x, y, z) is not in the scope of any quantifier for zz. Thus, this occurrence of zz is free. The zz in Q(y,z)Q(y, z) is bound by βˆ€z\forall z.


    Step 4: Count the unique free variables. The variable yy has a free occurrence, and the variable zz has a free occurrence. Therefore, there are two free variables in the formula Ο•\phi.

    Result: The number of free variables is 2.
    Answer: 2\boxed{2}
    "
    :::

    :::question type="MSQ" question="Which of the following formulae correctly represent the statement 'There are at least two distinct items that are faulty'? Use the predicate Faulty(x)Faulty(x) and xβ‰ yx \neq y for 'xx and yy are not equal'." options=["βˆƒxβˆƒy(Faulty(x)∧Faulty(y))\exists x \exists y (Faulty(x) \land Faulty(y))","βˆƒxβˆƒy(xβ‰ y∧Faulty(x)∧Faulty(y))\exists x \exists y (x \neq y \land Faulty(x) \land Faulty(y))","Β¬βˆ€xβˆ€y((Faulty(x)∧Faulty(y))β€…β€ŠβŸΉβ€…β€Šx=y)\neg \forall x \forall y ( (Faulty(x) \land Faulty(y)) \implies x=y )","βˆƒxβˆƒy(xβ‰ yβ€…β€ŠβŸΉβ€…β€Š(Faulty(x)∧Faulty(y)))\exists x \exists y (x \neq y \implies (Faulty(x) \land Faulty(y)))"] answer="B,C" hint="The core of the problem is to ensure the two items are 'distinct'. Think about what 'at most one' means and how its negation relates to 'at least two'." solution="
    Let's analyze each option:

    Option A: βˆƒxβˆƒy(Faulty(x)∧Faulty(y))\exists x \exists y (Faulty(x) \land Faulty(y))
    This states that there exists an xx that is faulty and there exists a yy that is faulty. However, it does not enforce that xx and yy must be different. If there were only one faulty item, say aa, we could choose x=ax=a and y=ay=a, making the formula true. So, this only guarantees at least one faulty item. It is incorrect.

    Option B: βˆƒxβˆƒy(xβ‰ y∧Faulty(x)∧Faulty(y))\exists x \exists y (x \neq y \land Faulty(x) \land Faulty(y))
    This states that there exist two individuals, xx and yy, such that they are not equal, xx is faulty, and yy is faulty. This perfectly captures the meaning of "at least two distinct items that are faulty." This is correct.

    Option C: Β¬βˆ€xβˆ€y((Faulty(x)∧Faulty(y))β€…β€ŠβŸΉβ€…β€Šx=y)\neg \forall x \forall y ( (Faulty(x) \land Faulty(y)) \implies x=y )
    The inner formula, βˆ€xβˆ€y((Faulty(x)∧Faulty(y))β€…β€ŠβŸΉβ€…β€Šx=y)\forall x \forall y ( (Faulty(x) \land Faulty(y)) \implies x=y ), means "at most one item is faulty." By negating this entire statement, we are asserting that "it is not the case that at most one item is faulty," which is logically equivalent to "there are more than one (i.e., at least two) faulty items." This is correct.

    Option D: βˆƒxβˆƒy(xβ‰ yβ€…β€ŠβŸΉβ€…β€Š(Faulty(x)∧Faulty(y)))\exists x \exists y (x \neq y \implies (Faulty(x) \land Faulty(y)))
    This statement is logically weak. If we pick any two items xx and yy that are identical (x=yx=y), the premise x≠yx \neq y becomes false. A false premise makes the implication true. So, this formula is true in any domain with at least one object, regardless of whether anything is faulty. It is incorrect.

    Therefore, options B and C are correct.
    Answer: B,C\boxed{B, C}
    "
    :::

    :::question type="MCQ" question="Let L(x,y)L(x,y) be the predicate 'xx likes yy'. Which formula represents the statement 'There is someone whom everyone likes'?" options=["βˆ€xβˆƒyL(x,y)\forall x \exists y L(x,y)","βˆ€yβˆƒxL(x,y)\forall y \exists x L(x,y)","βˆƒxβˆ€yL(y,x)\exists x \forall y L(y,x)","βˆƒyβˆ€xL(x,y)\exists y \forall x L(x,y)"] answer="βˆƒyβˆ€xL(x,y)\exists y \forall x L(x,y)" hint="The order of quantifiers is critical. Does the person who is liked depend on who is doing the liking, or is there one person liked by all?" solution="
    Step 1: Deconstruct the sentence: "There is someone whom everyone likes."

    Step 2: Identify the core quantifiers and structure. "There is someone" points to an existential quantifier (βˆƒ\exists). "everyone likes" points to a universal quantifier (βˆ€\forall).

    Step 3: Determine the order. The statement asserts the existence of a single person (let's call them yy) who is liked by all people (let's call them xx). The choice of yy is independent of xx. This means the existential quantifier must have a wider scope than the universal one.

    Step 4: Formulate the expression.

    • "There is someone, yy..." translates to βˆƒy\exists y.

    • "...such that for everyone, xx..." translates to βˆ€x\forall x.

    • "...xx likes yy." translates to L(x,y)L(x,y).


    Step 5: Combine the parts:
    βˆƒyβˆ€xL(x,y)\exists y \forall x L(x,y)

    Step 6: Analyze the other options to confirm understanding.

    • βˆ€xβˆƒyL(x,y)\forall x \exists y L(x,y): "For every person xx, there is some person yy that xx likes." This means "Everyone likes someone."

    • βˆ€yβˆƒxL(x,y)\forall y \exists x L(x,y): "For every person yy, there is someone xx who likes them." This means "Everyone is liked by someone."

    • βˆƒxβˆ€yL(y,x)\exists x \forall y L(y,x): "There is a person xx such that for all yy, yy likes xx." This is equivalent to the correct answer, just with variables swapped.

    • βˆƒyβˆ€xL(x,y)\exists y \forall x L(x,y): "There is a person yy such that for all xx, xx likes yy." This is the direct translation.


    Result: The formula βˆƒyβˆ€xL(x,y)\exists y \forall x L(x,y) correctly states that there exists a specific individual yy such that for all individuals xx, the relation L(x,y)L(x,y) holds.
    Answer: βˆƒyβˆ€xL(x,y)\boxed{\exists y \forall x L(x,y)}
    "
    :::

    ---

    Summary

    ❗ Key Takeaways for GATE

    • Expressive Power: First-Order Logic extends propositional logic with predicates and quantifiers (βˆ€,βˆƒ\forall, \exists) to reason about objects, their properties, and relations.

    • Quantifier-Connective Pairing: The most common and reliable patterns for restricting domains are βˆ€x(P(x)β€…β€ŠβŸΉβ€…β€ŠQ(x))\forall x (P(x) \implies Q(x)) and βˆƒx(P(x)∧Q(x))\exists x (P(x) \land Q(x)). Using the wrong connective is a frequent error.

    • Uniqueness is Key: Master the different but equivalent ways to express "exactly one." This is a concept that directly appeared in previous GATE exams and tests a deep understanding of quantifier interplay.

    • Order Matters: The sequence of quantifiers (βˆ€βˆƒ\forall \exists vs. βˆƒβˆ€\exists \forall) fundamentally changes the meaning of a formula. Always analyze the dependency between variables.

    ---

    What's Next?

    πŸ’‘ Continue Learning

    A solid foundation in First-Order Logic is a prerequisite for several advanced topics in the GATE CS syllabus.

      • Set Theory & Relations: The language of FOL is used to formally define properties of sets and relations, such as reflexivity, symmetry, and transitivity. For example, a relation RR is transitive if βˆ€xβˆ€yβˆ€z((R(x,y)∧R(y,z))β€…β€ŠβŸΉβ€…β€ŠR(x,z))\forall x \forall y \forall z ((R(x,y) \land R(y,z)) \implies R(x,z)).
      • Theory of Computation: Formal definitions of languages and the properties of automata often rely on logical formalisms. The expressive power of different logical systems relates to the computational power of machine models.
      • Databases: Relational algebra and SQL are built upon the principles of First-Order Logic. A query can be seen as a logical formula that describes the desired set of tuples.
    Mastering these connections will provide a more holistic and robust preparation for the GATE examination.

    ---

    Chapter Summary

    πŸ“– Propositional and First-Order Logic - Key Takeaways

    In this chapter, we have established the formal foundations of logical reasoning, a critical skill for all areas of computer science and engineering. The following points encapsulate the core concepts that are essential for the GATE examination.

    • Propositional Logic as a Formal System: We began by defining propositions as declarative sentences that are either true or false. We then constructed a formal language using propositional variables and logical connectives (Β¬,∧,∨,β†’,↔\neg, \land, \lor, \rightarrow, \leftrightarrow) to create compound propositions, whose truth values can be systematically determined using truth tables.

    • Tautologies, Contradictions, and Contingencies: We have classified compound propositions based on their truth values. A tautology is always true, a contradiction is always false, and a contingency can be either. Identifying the class of a proposition is a fundamental skill, often tested by checking for logical equivalence with True (TT) or False (FF).

    • The Power of Logical Equivalence: We demonstrated that different propositional formulas can be logically equivalent, meaning they have identical truth tables. Mastery of key equivalences, such as De Morgan's Laws, the Distributive Laws, and the implication equivalence (Pβ†’Q≑¬P∨QP \rightarrow Q \equiv \neg P \lor Q), is crucial for simplifying complex expressions and proving arguments.

    • Valid Arguments and Rules of Inference: An argument is valid if the conclusion is true whenever all premises are true. We moved beyond truth tables to prove argument validity using rules of inference like Modus Ponens, Modus Tollens, and Hypothetical Syllogism. These rules provide the syntactic machinery for constructing formal proofs.

    • First-Order Logic for Expressiveness: We identified the limitations of propositional logic and introduced First-Order Logic (FOL) to reason about objects and their properties. By incorporating predicates, variables, and quantifiers (universal βˆ€\forall and existential βˆƒ\exists), FOL allows us to express complex statements about entire domains of discourse.

    • Quantifier Negation and Scope: A critical aspect of working with FOL is understanding how to negate quantified statements. We established the rules Β¬βˆ€xP(x)β‰‘βˆƒxΒ¬P(x)\neg \forall x P(x) \equiv \exists x \neg P(x) and Β¬βˆƒxP(x)β‰‘βˆ€xP(x)\neg \exists x P(x) \equiv \forall x P(x). Correctly applying these rules, especially in nested quantifier scenarios, is a frequent source of examination questions.

    ---

    Chapter Review Questions

    :::question type="MCQ" question="Consider the following first-order logic statement, where the domain is the set of all integers: βˆ€xβˆƒy((x>0)β†’(y<0∧xy=βˆ’10))\forall x \exists y ((x > 0) \rightarrow (y < 0 \land xy = -10)). Which of the following is the most accurate negation of this statement?" options=["βˆƒxβˆ€y((x≀0)∨(yβ‰₯0∨xyβ‰ βˆ’10))\exists x \forall y ((x \le 0) \lor (y \ge 0 \lor xy \ne -10))","βˆƒxβˆ€y((x>0)∧(yβ‰₯0∨xyβ‰ βˆ’10))\exists x \forall y ((x > 0) \land (y \ge 0 \lor xy \ne -10))","βˆ€xβˆƒy((x>0)∧(yβ‰₯0∨xyβ‰ βˆ’10))\forall x \exists y ((x > 0) \land (y \ge 0 \lor xy \ne -10))","βˆƒxβˆ€y((x≀0)∧(yβ‰₯0∧xyβ‰ βˆ’10))\exists x \forall y ((x \le 0) \land (y \ge 0 \land xy \ne -10))"] answer="B" hint="To negate the statement, first negate the quantifiers (βˆ€β†’βˆƒ\forall \rightarrow \exists, βˆƒβ†’βˆ€\exists \rightarrow \forall). Then, negate the inner logical expression. Recall that the negation of an implication Pβ†’QP \rightarrow Q is P∧¬QP \land \neg Q." solution="Let the original statement be SS.

    S:βˆ€xβˆƒy((x>0)β†’(y<0∧xy=βˆ’10))S: \forall x \exists y ((x > 0) \rightarrow (y < 0 \land xy = -10))

    To find the negation, Β¬S\neg S, we proceed in steps.

    Step 1: Negate the quantifiers.
    The negation of βˆ€x\forall x is βˆƒx\exists x.
    The negation of βˆƒy\exists y is βˆ€y\forall y.
    So, the structure becomes:

    Β¬S:βˆƒxβˆ€yΒ¬((x>0)β†’(y<0∧xy=βˆ’10))\neg S: \exists x \forall y \neg((x > 0) \rightarrow (y < 0 \land xy = -10))

    Step 2: Negate the inner implication.
    We use the rule Β¬(Pβ†’Q)≑P∧¬Q\neg(P \rightarrow Q) \equiv P \land \neg Q.
    Here, PP is (x>0)(x > 0) and QQ is (y<0∧xy=βˆ’10)(y < 0 \land xy = -10).
    Applying the rule, we get:

    Β¬S:βˆƒxβˆ€y((x>0)∧¬(y<0∧xy=βˆ’10))\neg S: \exists x \forall y ((x > 0) \land \neg(y < 0 \land xy = -10))

    Step 3: Negate the conjunction inside.
    We use De Morgan's Law: Β¬(A∧B)≑¬A∨¬B\neg(A \land B) \equiv \neg A \lor \neg B.
    Here, AA is (y<0)(y < 0) and BB is (xy=βˆ’10)(xy = -10).
    Applying the law, we get:

    Β¬(y<0∧xy=βˆ’10)≑¬(y<0)∨¬(xy=βˆ’10)\neg(y < 0 \land xy = -10) \equiv \neg(y < 0) \lor \neg(xy = -10)

    ≑(yβ‰₯0)∨(xyβ‰ βˆ’10)\equiv (y \ge 0) \lor (xy \ne -10)

    Step 4: Substitute back into the full expression.
    Substituting the result from Step 3 into the expression from Step 2 gives the final negated statement:

    Β¬S:βˆƒxβˆ€y((x>0)∧(yβ‰₯0∨xyβ‰ βˆ’10))\neg S: \exists x \forall y ((x > 0) \land (y \ge 0 \lor xy \ne -10))

    This matches option B.
    Answer: B\boxed{B}
    "
    :::

    :::question type="NAT" question="Consider the compound proposition F=((Pβ†’Q)∧(Qβ†’R))β†’(Pβ†’R)F = ((P \rightarrow Q) \land (Q \rightarrow R)) \rightarrow (P \rightarrow R). How many combinations of truth values for the propositional variables P,Q,P, Q, and RR result in the proposition FF being true?" answer="8" hint="Analyze the structure of the proposition. Does it correspond to a known rule of inference or a logical equivalence? Consider constructing a truth table or identifying if it's a specific type of proposition (tautology, contradiction, or contingency)." solution="The given proposition is:

    F=((Pβ†’Q)∧(Qβ†’R))β†’(Pβ†’R)F = ((P \rightarrow Q) \land (Q \rightarrow R)) \rightarrow (P \rightarrow R)

    This logical structure represents the Hypothetical Syllogism rule of inference. A rule of inference, when expressed as a conditional statement, is always a tautology. A tautology is a proposition that is true for all possible truth assignments of its variables.

    Let's verify this using a truth table. There are 3 variables (P,Q,RP, Q, R), so there are 23=82^3 = 8 possible combinations of truth values.

    Let A=P→QA = P \rightarrow Q, B=Q→RB = Q \rightarrow R, and C=P→RC = P \rightarrow R.
    The proposition is (A∧B)β†’C(A \land B) \rightarrow C.

    | P | Q | R | A=Pβ†’QA = P \rightarrow Q | B=Qβ†’RB = Q \rightarrow R | A∧BA \land B | C=Pβ†’RC = P \rightarrow R | F=(A∧B)β†’CF = (A \land B) \rightarrow C |
    |---|---|---|---|---|---|---|---|
    | T | T | T | T | T | T | T | T |
    | T | T | F | T | F | F | F | T |
    | T | F | T | F | T | F | T | T |
    | T | F | F | F | T | F | F | T |
    | F | T | T | T | T | T | T | T |
    | F | T | F | T | F | F | T | T |
    | F | F | T | T | T | T | T | T |
    | F | F | F | T | T | T | T | T |

    As shown in the final column of the truth table, the proposition FF is true for all 8 combinations of truth values for P,Q,P, Q, and RR.

    Therefore, the number of combinations that result in FF being true is 8.
    Answer: 8\boxed{8}
    "
    :::

    :::question type="MSQ" question="Let the universe of discourse be the set of all people. Consider the following predicates:

    • S(x)S(x): 'xx is a student.'

    • E(x)E(x): 'xx is an engineer.'

    • L(x,y)L(x, y): 'xx likes yy.'


    Which of the following English sentences are correct translations of the first-order logic formula βˆ€x(S(x)∧¬E(x)β†’βˆƒy(E(y)∧L(x,y)))\forall x (S(x) \land \neg E(x) \rightarrow \exists y (E(y) \land L(x, y)))?
    " options=["Every person who is a student but not an engineer likes at least one engineer.","For any person xx, if xx is a student and not an engineer, then there exists some person yy who is an engineer and whom xx likes.","There is a student who is not an engineer and who likes all engineers.","All non-engineer students like some engineer."] answer="A,B,D" hint="Break down the formula piece by piece. βˆ€x\forall x means 'For all x' or 'Every x'. The structure is βˆ€x(P(x)β†’Q(x))\forall x(P(x) \rightarrow Q(x)), which translates to 'For every x, if P(x) is true, then Q(x) is true'. Analyze what P(x)P(x) and Q(x)Q(x) represent in this context." solution="Let's analyze the given first-order logic formula:
    βˆ€x(S(x)∧¬E(x)β†’βˆƒy(E(y)∧L(x,y)))\forall x (S(x) \land \neg E(x) \rightarrow \exists y (E(y) \land L(x, y)))

    The structure is a universally quantified implication: βˆ€x(P(x)β†’Q(x))\forall x (P(x) \rightarrow Q(x)).

    • The universal quantifier βˆ€x\forall x means "For all people x" or "Every person x".

    • The antecedent (the 'if' part) is P(x)≑S(x)∧¬E(x)P(x) \equiv S(x) \land \neg E(x). This translates to "xx is a student AND xx is not an engineer".

    • The consequent (the 'then' part) is Q(x)β‰‘βˆƒy(E(y)∧L(x,y))Q(x) \equiv \exists y (E(y) \land L(x, y)). This translates to "There exists a person yy such that yy is an engineer AND xx likes yy". In simpler terms, "xx likes at least one engineer".


    Combining these pieces, the formula states: "For every person xx, if xx is a student and not an engineer, then xx likes at least one engineer."

    Now let's evaluate the given options:

    • A: Every person who is a student but not an engineer likes at least one engineer. This is a direct and accurate translation of the formula. The phrase "student but not an engineer" corresponds to S(x)∧¬E(x)S(x) \land \neg E(x), and "likes at least one engineer" corresponds to βˆƒy(E(y)∧L(x,y))\exists y (E(y) \land L(x, y)). This is a correct translation.
    • B: For any person xx, if xx is a student and not an engineer, then there exists some person yy who is an engineer and whom xx likes. This is a more literal, step-by-step translation of the logical symbols into English. It perfectly matches the structure and meaning of the formula. This is a correct translation.
    • C: There is a student who is not an engineer and who likes all engineers. This translates to βˆƒx(S(x)∧¬E(x)βˆ§βˆ€y(E(y)β†’L(x,y)))\exists x (S(x) \land \neg E(x) \land \forall y (E(y) \rightarrow L(x, y))). This formula is existentially quantified (βˆƒx\exists x) and states that the student likes all engineers (βˆ€y\forall y), which is fundamentally different from the original formula's universal quantification (βˆ€x\forall x) and liking some engineer (βˆƒy\exists y). This is an incorrect translation.
    • D: All non-engineer students like some engineer. This is a concise and natural-sounding English sentence that captures the exact meaning of the formula. "Non-engineer students" corresponds to S(x)∧¬E(x)S(x) \land \neg E(x), and "like some engineer" corresponds to βˆƒy(E(y)∧L(x,y))\exists y (E(y) \land L(x, y)). The word "All" at the beginning captures the universal quantifier βˆ€x\forall x. This is a correct translation.
    Therefore, options A, B, and D are correct. Answer: A,B,D\boxed{A, B, D} " :::

    ---

    What's Next?

    πŸ’‘ Continue Your GATE Journey

    Having completed Propositional and First-Order Logic, you have established a firm foundation for reasoning and formal proof, which underpins much of computer science. The principles we have discussed here are not isolated; they are the language used to define and prove concepts in subsequent chapters.

    Key connections:

      • Set Theory and Relations: The language of First-Order Logic is indispensable for precisely defining properties of sets and relations. For instance, the definition of a reflexive relation RR on a set AA is formally stated as βˆ€a(a∈Aβ†’(a,a)∈R)\forall a (a \in A \rightarrow (a, a) \in R). You will find that quantifiers and logical connectives are used extensively to describe properties like symmetry, transitivity, and functions.
      • Digital Logic Design: Propositional logic is the mathematical bedrock of digital electronics. The logical connectives ∧\land (AND), ∨\lor (OR), and Β¬\neg (NOT) correspond directly to the fundamental logic gates that are the building blocks of all digital circuits, including processors. The process of simplifying logical expressions using equivalences is identical to the circuit minimization techniques you will study.
      • Databases: The formal query languages for relational databases, such as Relational Calculus, are direct implementations of First-Order Logic. A query is essentially a logical formula defining the set of tuples to be retrieved. Understanding predicates and quantifiers will give you a much deeper insight into how database query engines work.
      • Theory of Computation and Compilers: Formal proofs are central to the theory of computation, used to prove properties of automata, formal languages, and computability. The logical deduction skills you have built here are essential for understanding these proofs. In compiler design, logical rules are used to define language semantics and perform program analysis.

    🎯 Key Points to Remember

    • βœ“ Master the core concepts in Propositional and First-Order Logic before moving to advanced topics
    • βœ“ Practice with previous year questions to understand exam patterns
    • βœ“ Review short notes regularly for quick revision before exams

    Related Topics in Engineering Mathematics

    More Resources

    Why Choose MastersUp?

    🎯

    AI-Powered Plans

    Personalized study schedules based on your exam date and learning pace

    πŸ“š

    15,000+ Questions

    Verified questions with detailed solutions from past papers

    πŸ“Š

    Smart Analytics

    Track your progress with subject-wise performance insights

    πŸ”–

    Bookmark & Revise

    Save important questions for quick revision before exams

    Start Your Free Preparation β†’

    No credit card required β€’ Free forever for basic features