Philosophy of Logic

Philosophy of Logic

Content Overview

  1. 1. Introduction to Logic
    1. 1.1 What is Logic?
    2. 1.2 Philosophy of Logic
      1. Syntax vs Semantics
    3. 1.3 Model Theory
    4. 1.4 Godel’s Incompleteness Theorems
      1. Summary:
  2. 2. Importance of Logic
    1. 2.1 Philosophy: Analyzing Arguments, Metaphysics, Ethics
    2. 2.2 Mathematics: Proofs, Theorems, Formal Systems
    3. 2.3 Computer Science: Algorithms, Programming, Verification
    4. 2.4 Artificial Intelligence: Automated Reasoning, Knowledge Representation
      1. Summary:
  3. 3. Basic Concepts
    1. 3.1 Propositions
    2. 3.2 Arguments
    3. 3.3 Validity
    4. 3.4 Soundness
    5. 3.5 Logical Equivalence
  4. 4. Historical Overview of Logic
    1. 4.1 Aristotle (384–322 BCE)
    2. 4.2 George Boole (1815–1864)
    3. 4.3 Gottlob Frege (1848–1925)
    4. 4.4 Bertrand Russell & Alfred North Whitehead (1872–1970, 1861–1947)
    5. 4.5 Kurt Gödel (1906–1978)
      1. Summary:
  5. 5. Types of Logic
    1. 5.1 Classical Logic
      1. 5.1.1 Propositional Logic
      2. 5.1.2 Predicate Logic (First-Order Logic)
      3. 5.1.3 Syllogistic Logic (Aristotle)
    2. 5.2 Non-Classical Logic
      1. 5.2.1 Modal Logic
      2. 5.2.2 Intuitionistic Logic
      3. 5.2.3 Fuzzy Logic
      4. 5.2.4 Paraconsistent Logic
      5. 5.2.5 Temporal Logic
    3. 5.3 Meta-Logic (Study of Logic Itself)
      1. 5.3.1 Syntax
      2. 5.3.2 Semantics
      3. 5.3.3 Proof Theory
      4. 5.3.4 Model Theory
      5. 5.3.5 Gödel’s Incompleteness Theorems
      6. Summary of Types of Logic
  6. 6. Logical Operators & Connectives
    1. What are Logical Operators?
    2. 6.1 Negation (¬P)
    3. 6.2 Conjunction (P ∧ Q)
    4. 6.3 Disjunction (P ∨ Q)
    5. 6.4 Implication (P → Q)
    6. 6.5 Biconditional (P ↔ Q)
    7. 6.6 Exclusive OR (XOR)
    8. 6.7 Truth Tables
    9. Example of Logical Reasoning Using Operators
    10. Real Life Examples
    11. Complete Operator Summary
    12. Why Logical Operators Are Important
  7. 7. Reasoning & Inference
    1. 7.1 Inference (Main Node)
      1. 7.1.1 Deductive Reasoning (General → Specific)
      2. 7.1.2 Inductive Reasoning (Specific → General)
      3. 7.1.3 Abductive Reasoning (Best Explanation)
    2. 7.2 Rules of Inference
      1. 7.2.1 Modus Ponens (If P → Q, P ⊢ Q)
      2. 7.2.2 Modus Tollens (If P → Q, ¬Q ⊢ ¬P)
      3. 7.2.3 Hypothetical Syllogism (P → Q, Q → R ⊢ P → R)
      4. 7.2.4 Disjunctive Syllogism (P ∨ Q, ¬P ⊢ Q)
      5. 7.2.5 Conjunction (P, Q ⊢ P ∧ Q)
      6. 7.2.6 Simplification (P ∧ Q ⊢ P)
      7. 7.2.7 Addition (P ⊢ P ∨ Q)
      8. 7.2.8 Resolution
      9. 7.2.9 Constructive Dilemma
      10. 7.2.10 Destructive Dilemma
    3. 7.3 Predicate Logic Inference
      1. 7.3.1 Universal Instantiation (∀x P(x) ⊢ P(a))
      2. 7.3.2 Existential Instantiation (∃x P(x) ⊢ P(a))
      3. 7.3.3 Universal Generalization (P(a) ⊢ ∀x P(x))
      4. 7.3.4 Existential Generalization (P(a) ⊢ ∃x P(x))
      5. Summary (Reasoning & Inference)
  8. 8. Proof Techniques
    1. 8.1 Direct Proof
    2. 8.2 Proof by Contradiction
    3. 8.3 Proof by Contrapositive
    4. 8.4 Proof by Mathematical Induction
  9. 9. Logical Truth & Consequence
    1. 9.1 Logical Truth
    2. 9.2 Logical Consequence
  10. 10. Applications of Logic
    1. 10.1 Mathematics
    2. 10.2 Computer Science
    3. 10.3 Artificial Intelligence
    4. 10.4 Philosophy
  11. 11. Advanced & Specialized Topics
    1. 11.1 Non-Monotonic Logic
    2. 11.2 Higher-Order Logic
    3. 11.3 Proof Assistants & Formal Verification
    4. 11.4 Logical Paradoxes
    5. 11.5 Decision Theory & Logic
    6. 11.6 Applications in Natural Language Semantics
      1. Summary

1. Introduction to Logic

Logic is the study of reasoning how we think clearly and make correct arguments. It helps us know if what we believe or say actually makes sense.

1.1 What is Logic?

Logic is like a toolbox for your brain that shows you how to think in the right order and check if your reasoning is correct.

Study of reasoning and argumentation:
Logic teaches you how to reason correctly and make arguments that others can follow.

Distinguish valid vs invalid reasoning:
Logic helps you see the difference between:

  • Valid reasoning: Conclusion follows the rules and is guaranteed to be true if premises are true.
  • Invalid reasoning: Conclusion does not follow from the premises, so it might be wrong.

Example (classic one):

  • Premise 1: All humans are mortal.
  • Premise 2: Socrates is a human.
  • Conclusion: Therefore, Socrates is mortal.

This is valid reasoning, because if the premises are true, the conclusion must be true.

Another example:

  • If it rains, the ground gets wet.
  • It is raining.
  • Therefore, the ground is wet.

Even in daily life, logic helps you make sense of cause and effect.

1.2 Philosophy of Logic

The philosophy of logic asks big questions about thinking itself. It studies:

  • Nature of logical truth: What makes a statement always true?
    Example: “If it rains, then it rains.” This is true no matter what.
  • Logical necessity: Some things must be true by logic, not just by facts.
    Example: “All bachelors are unmarried.” It cannot be false.
  • Foundations of reasoning: What rules make reasoning work?What makes some arguments effective while others fail?

Syntax vs Semantics

Logic has two sides: structure and meaning.

  • Syntax: The rules for writing formulas correctly. Think of it like grammar in language.
    Example: (P ∧ Q) → R is correct syntax; ∧ P → Q R) is wrong.
  • Semantics: The meaning or truth of formulas. It tells us whether a statement is true or false.
    Example: P ∧ Q is true only when both P and Q are true.

1.3 Model Theory

Model theory is the study of different “worlds” or interpretations where logical statements are true. Think of it as checking if a story makes sense in all possible situations.

Example:

  • Statement: “All birds can fly.”
  • Model 1: Only typical birds → True
  • Model 2: Includes penguins → False

Model theory shows how logic works across all situations.

1.4 Godel’s Incompleteness Theorems

Kurt Gödel showed that in any sufficiently powerful system that includes arithmetic:

  • There are true statements that cannot be proved inside the system.
  • The system cannot prove its own consistency.

Simply put: Even math and logic have limits. Not all truths can be reached by strictly following rules—some lie beyond what formal proofs can establish.

Summary:

  • Logic = thinking clearly and correctly.
  • Syntax = correct form; Semantics = correct meaning.
  • Model theory = does the logic work in all situations?
  • Gödel = shows there are limits even in perfect logic systems.

2. Importance of Logic

Logic is not just theory—it is practical in many fields. Learning logic helps you think clearly, solve problems, and create systems that work reliably.

2.1 Philosophy: Analyzing Arguments, Metaphysics, Ethics

Logic is the foundation of philosophical thinking. Philosophers use logic to analyze arguments, test ideas, and explore deep questions about existence and morality.

Examples:

Ethics:

  • Argument: All humans should avoid harming others.
  • Stealing harms people.
  • Therefore, humans should not steal.

Logic helps ensure the conclusion follows from the premises and avoids contradictions in moral reasoning.

Metaphysics:

  • Argument: Everything that exists has a cause.
  • The universe exists.
  • Therefore, the universe has a cause.

Logic allows philosophers to structure reasoning about abstract concepts.

2.2 Mathematics: Proofs, Theorems, Formal Systems

Logic is the backbone of mathematics. Every theorem or formula relies on rigorous logical reasoning.

Examples:

Simple Proof:

  • Claim: The sum of two even numbers is even.
  • Proof: Let the numbers be 2a and 2b (where a,b are integers). Their sum = 2a + 2b = 2(a+b). 2(a+b) is divisible by 2 → even

Formal Systems:
Mathematicians use axioms + logical rules to build large systems of knowledge. Logic ensures no contradictions appear.

Logic in math guarantees that every step in a proof is valid.

2.3 Computer Science: Algorithms, Programming, Verification

Logic is essential in computer science because computers need precise, unambiguous instructions.

Examples:

  • Algorithms: Logic helps create step-by-step procedures to solve problems.
    Example: Searching for a name in a list:
  • If list is empty → Stop
  • If name found → Return position
  • Else → Move to next item
  • Programming: Conditional statements use logic:
  If the age is 18 or older, it displays “You can vote”; otherwise, it shows “You cannot vote.”

This is logic applied in code: “If P then Q, else R”.

  • Verification: Logic ensures software behaves correctly. Tools called formal verification systems check programs against logical rules to prevent bugs.

2.4 Artificial Intelligence: Automated Reasoning, Knowledge Representation

Logic is the brain of AI systems. AI needs rules to make decisions, learn patterns, and solve problems.

Examples:

  • Expert Systems: AI uses “if-then” rules like a human expert.
  • Rule: If patient has fever ∧ cough → possible flu
  • Rule: If patient has fever ∧ rash → possible measles
  • Automated Reasoning: AI can derive conclusions automatically.
  • All cats are mammals
  • Whiskers is a cat
  • AI concludes: Whiskers is a mammal
  • Knowledge Representation: Logic structures knowledge so AI can understand relationships.
  • Concept hierarchy: Animal → Mammal → Cat
  • Logic helps AI answer: “Is Whiskers an Animal?” → Yes

Summary:

  • Philosophy: Logic helps think clearly, analyze arguments, and explore deep questions.
  • Mathematics: Logic builds proofs and ensures every theorem is valid.
  • Computer Science: Logic powers algorithms, programming, and software verification.
  • Artificial Intelligence: Logic helps AI reason, learn, and make decisions automatically.

3. Basic Concepts

Logic has some core building blocks that you must understand before moving forward. These are like the letters and words of the language of reasoning.

3.1 Propositions

A proposition is a statement that can be evaluated as either true or false. Think of it as a fact that can be checked.

Examples:

  • “It is raining.” True or False depending on the weather.
  • “2 + 2 = 4.” True
  • “The moon is made of cheese.” False

Note: Questions, commands, or opinions like “What time is it?” Commands like “Close the door” are not propositions because they cannot be judged as true or false.

3.2 Arguments

An argument is a set of propositions (premises) meant to support a conclusion. Logic studies whether the conclusion really follows from the premises.

Example:

  • Premise 1: All humans are mortal.
  • Premise 2: Socrates is a human.
  • Conclusion: Socrates is mortal.

Here, the premises support the conclusion, forming a valid argument.

3.3 Validity

An argument is considered valid when its conclusion necessarily follows from its premises, meaning that if the premises are true, the conclusion cannot be false. It’s about structure, not truth. Even if the premises are false, the argument can be valid if the logic works.

Example:

  • Premise 1: All cats are dogs. (False)
  • Premise 2: Felix is a cat.
  • Conclusion: Felix is a dog. Valid (structure correct, premises just happen to be false)

3.4 Soundness

A sound argument is both logically valid and based on true premises. Sound arguments are always correct in real life.

Example:

  • Premise 1: All humans are mortal. True
  • Premise 2: Socrates is human. True
  • Conclusion: Socrates is mortal. True & valid → Sound

3.5 Logical Equivalence

Two statements are logically equivalent if they are always true or false in the same situations.

“If it rains, the ground becomes wet” is logically equivalent to saying, “If the ground is dry, then it did not rain.”

4. Historical Overview of Logic

Logic has a rich history, evolving over thousands of years. Knowing history helps understand why modern logic exists.

4.1 Aristotle (384–322 BCE)

  • Father of formal logic.
  • Created syllogistic logic: combining premises to reach conclusions.

Example:

  • All men are mortal.
  • Socrates is a man.
  • Therefore, Socrates is mortal.

Aristotle laid the foundation for deductive reasoning.

4.2 George Boole (1815–1864)

  • Created Boolean Algebra, which is logic using 0 and 1 (true/false).
  • Basis of digital electronics and computers.

Example:
AND (∧), OR (∨), NOT (¬) operations in computers come from Boole.

4.3 Gottlob Frege (1848–1925)

Founder of modern predicate logic. Introduced variables and quantifiers like ∀ (“for all”) and ∃ (“there exists”).

Example:
Statement: “All humans are mortal.” Symbolically: ∀x (Human(x) → Mortal(x))

Frege allowed expressing complex reasoning mathematically.

4.4 Bertrand Russell & Alfred North Whitehead (1872–1970, 1861–1947)

  • Wrote Principia Mathematica, trying to reduce all of mathematics to logic.
  • Showed how math and logic are deeply connected.

4.5 Kurt Gödel (1906–1978)

  • Proved Incompleteness Theorems:
  • Some truths in math cannot be proved.
  • No system can prove its own consistency.

Gödel showed limits of logic and formal systems, even in perfect reasoning systems.

Summary:

  • Propositions: statements true/false
  • Arguments: premises supporting a conclusion
  • Validity: correct logical structure
  • Soundness: valid + true premises
  • Logical equivalence: statements with same truth in all cases
  • Historical roots: Aristotle → Boole → Frege → Russell/Whitehead → Gödel

5. Types of Logic

Logic is not just one kind it has different types depending on what you want to reason about. We can classify them into Classical Logic, Non-Classical Logic, and Meta-Logic.

5.1 Classical Logic

Classical logic is the traditional form of reasoning, based on true/false statements.

5.1.1 Propositional Logic

Deals with simple statements (propositions) and logical connectives like AND, OR, NOT.

Connectives:

  • AND (∧): It is true only when both statements are true.
  • OR (∨): A statement is true if at least one of the conditions is true.
  • NOT (¬): True if the statement is false

Example:

  • P: It is raining
  • Q: The ground is wet
  • P ∧ Q → True if both P and Q are true
  • P ∨ Q is true if at least one of the statements is true.
  • ¬P is true when it is not raining.

5.1.2 Predicate Logic (First-Order Logic)

Extends propositional logic with variables and quantifiers (like ∀ “for all” and ∃ “there exists”). Allows reasoning about objects and their properties.

Example:

  • Statement: “All humans are mortal.”
  • Symbolically: ∀x (Human(x) → Mortal(x))
  • Meaning: Every human being is mortal.
  • Statement: “Some cats are black.”
  • Symbolically: ∃x (Cat(x) ∧ Black(x))
  • Meaning: There exists at least one cat that is black

5.1.3 Syllogistic Logic (Aristotle)

Combines two premises to reach a conclusion.

Example:

  • All men are mortal.
  • Socrates is a man.
  • Therefore, Socrates is mortal

This is classical deductive reasoning and the foundation of logic.

5.2 Non-Classical Logic

Non-classical logic modifies or extends classical rules to handle situations classical logic cannot handle.

5.2.1 Modal Logic

Deals with possibility (◇) and necessity (□).

Example:

Useful in philosophy, computer science, and AI.

5.2.2 Intuitionistic Logic

Rejects the law of excluded middle (P ∨ ¬P). Focuses on constructive proofs (you must explicitly construct an example to prove it).

Example:

  • In classical logic, a statement must be either true or false—for example, either “There is life on Mars” or “There is no life on Mars.”
  • Intuitionistic logic: We cannot claim it true until we construct evidence.

5.2.3 Fuzzy Logic

Truth is not just true or false, but can be partial (degrees of truth).

Example:
“It is hot today” → 70% true if it’s warm, 30% false if not very hot.

Widely used in AI, temperature control, and smart systems.

5.2.4 Paraconsistent Logic

Allows contradictions without collapsing the system.

Example:
“The light is on” and “The light is not on” form a contradiction.

In classical logic, contradiction breaks everything; paraconsistent logic handles it.

5.2.5 Temporal Logic

Deals with time-based reasoning (always, eventually, before, after).

Example:

  • “It will eventually rain”
  • “If it rains today, the ground will be wet tomorrow.” is a conditional statement expressing that rain leads to a wet ground the next day.

Important in computer programs, scheduling, and AI planning.

5.3 Meta-Logic (Study of Logic Itself)

Meta-logic is the study of how logic works, its rules, structure, and limits.

5.3.1 Syntax

Rules for writing well-formed formulas (correct logical sentences).

Example: (P ∧ Q) → R is correct syntax; ∧ P → Q R) is incorrect.

5.3.2 Semantics

Deals with meaning and truth values of statements.

Example: (P \land Q) is true only when both (P) and (Q) are true.

5.3.3 Proof Theory

Studies rules for deduction and how to derive conclusions from premises.

Example: Modus Ponens: P → Q, P ⊢ Q

5.3.4 Model Theory

Studies interpretations of logical systems, checking whether statements are true under different “models.”

Example:
“All birds can fly.” True in a model of typical birds, false if penguins are included.

5.3.5 Gödel’s Incompleteness Theorems

Already discussed in previous sections, applies here as a meta-logical concept:

  • Some truths cannot be proven within the system they belong to.
  • No system can prove its own consistency.

Summary of Types of Logic

  • Classical Logic: Propositions, predicates, syllogisms → True/False reasoning
  • Non-Classical Logic: Handles possibilities, uncertainty, time, contradictions
  • Meta-Logic: Studies logic itself, syntax, semantics, proofs, and limits

By mastering these concepts, you gain an understanding of the major forms of logic, from Aristotle’s ideas to modern AI applications.

6. Logical Operators & Connectives

What are Logical Operators?

Logical operators (also called logical connectives) are symbols used to combine or modify logical statements (propositions).

A proposition is a statement that can be identified as either true or false.

Examples of propositions:

  • “The sky is blue.” (True)
  • “2 + 2 = 5.” (False)

Logical operators help us build more complex statements from simple ones.

Example:

  • P = “It is raining”
  • Q = “I take an umbrella”

We can combine them: P ∧ Q → It is raining AND I take an umbrella.

6.1 Negation (¬P)

Negation is the operation that flips the truth value of a statement.

  • If P is true → ¬P is false
  • If P is false → ¬P is true

Symbol: ¬

Example:

  • P = “The door is open”
  • ¬P = “The door is NOT open”
  • If P = True → ¬P = False
  • If P = False → ¬P = True

Truth Table:

P¬P
TrueFalse
FalseTrue

6.2 Conjunction (P ∧ Q)

Conjunction means AND. The statement is true only when both parts are true.

Symbol: ∧

Example:

  • P = “It is raining”
  • Q = “I have an umbrella”
  • P ∧ Q represents a logical AND statement, for example: “It is raining AND I have an umbrella.”

Truth Table:

PQP ∧ Q
TTT
TFF
FTF
FFF

Meaning: Both must be true.

6.3 Disjunction (P ∨ Q)

Disjunction means OR. It is true if at least one statement is true.

Symbol: ∨

Example:

  • P = “I will study”
  • Q = “I will watch TV”
  • P ∨ Q = “I will study OR watch TV”

Truth Table:

PQP ∨ Q
TTT
TFT
FTT
FFF

Meaning: Only false when both are false.

6.4 Implication (P → Q)

Implication means: IF P THEN Q

Symbol: →

Example:

  • P = “It rains”
  • Q = “The ground gets wet”
  • P → Q = “If it rains, then the ground gets wet” is a conditional (if–then) statement expressing that rain leads to a wet ground.

Truth Table:

PQP → Q
TTT
TFF
FTT
FFT

Important idea: If the condition (P) is false, the implication is considered true.

Simple Example:
“If I study, I will pass.” If I did not study, the statement is not considered false.

6.5 Biconditional (P ↔ Q)

Biconditional means: P if and only if Q

Symbol: ↔

This means both directions must be true:

  • P → Q
  • AND Q → P

Example:

  • P = “A number is even”
  • Q represents the statement “The number is divisible by 2.”
  • P ↔ Q: A number is even exactly when it can be divided by 2 without any remainder.

Truth Table:

PQP ↔ Q
TTT
TFF
FTF
FFT

Meaning: True when both statements have same truth value.

6.6 Exclusive OR (XOR)

Definition: Exclusive OR means only one is true, not both.

Symbol often written as: ⊕ or XOR

Example:

  • P = “I will drink tea”
  • Q = “I will drink coffee”
  • XOR means: I drink tea OR coffee but not both.

Truth Table:

PQP XOR Q
TTF
TFT
FTT
FFF

Meaning: True only when exactly one statement is true.

6.7 Truth Tables

A truth table is a table used to show the truth value of logical expressions for all possible cases.

It helps us:

  • analyze logic
  • test arguments
  • check equivalence
  • verify logical rules

Example: Expression: ¬P ∨ Q

Truth Table:

PQ¬P¬P ∨ Q
TTFT
TFFF
FTTT
FFTT

Example of Logical Reasoning Using Operators

  • P = “It rains”
  • Q = “Road is wet”
  • Rule: P → Q

If P is known to be true, then by applying Modus Ponens, Q must also be true.

Real Life Examples

Computer Programming:

if user_logged_in AND user_is_admin:
    allow_access

Uses AND (∧) logic.

Digital Circuits:
Computers use:

  • AND gates
  • OR gates
  • NOT gates

These are physical versions of logical operators.

Complete Operator Summary

OperatorSymbolMeaning
Negation¬NOT
Conjunction∧AND
Disjunction∨OR
Implication→IF…THEN
Biconditional↔IF AND ONLY IF
XOR⊕Only one true

Why Logical Operators Are Important

They are the foundation of:

  • reasoning
  • mathematics
  • computer science
  • artificial intelligence
  • programming
  • digital electronics
  • formal proofs

Without them logic cannot work.

7. Reasoning & Inference

Reasoning is the process of drawing conclusions from given premises or evidence.In logic, reasoning is formalized as inference.

7.1 Inference (Main Node)

Inference is the act of deriving new statements from known statements using rules of reasoning. There are three primary kinds of inference.

7.1.1 Deductive Reasoning (General → Specific)

Starts from general rules and derives specific conclusions that are guaranteed to be true if premises are true.

Example:

  • All humans are mortal. (General)
  • Socrates is a human.
  • Conclusion: Socrates is mortal.

Deductive reasoning gives certainty, not probability.

7.1.2 Inductive Reasoning (Specific → General)

Starts from specific observations and forms general rules, which are probable, not guaranteed.

Example:

  • Observation 1: Swan 1 is white
  • Observation 2: Swan 2 is white
  • Conclusion: All swans are white (probable but not guaranteed)

Induction is common in science and research.

7.1.3 Abductive Reasoning (Best Explanation)

Starts from an observation and finds the most likely explanation.

Example:

  • Observation: The ground is wet.
  • Possible explanations: It rained, someone watered the garden, a pipe burst.
  • Best explanation: It probably rained

Abduction is used in diagnosis, AI, detective work.

7.2 Rules of Inference

Rules of inference are patterns of reasoning that guarantee valid conclusions. These are core tools for reasoning in logic and proofs.

7.2.1 Modus Ponens (If P → Q, P ⊢ Q)

If the statement “P implies Q” is true and P holds, then Q necessarily follows.

Example:

  • If it rains, the ground gets wet. (P → Q)
  • It is raining. (P)
  • Therefore, the ground is wet. (Q)

7.2.2 Modus Tollens (If P → Q, ¬Q ⊢ ¬P)

If “P implies Q” and Q is false, then P must be false.

Example:

  • If it rains, the ground gets wet. (P → Q)
  • The ground is not wet. (¬Q)
  • Therefore, it did not rain. (¬P)

7.2.3 Hypothetical Syllogism (P → Q, Q → R ⊢ P → R)

Chain reasoning: If P implies Q and Q implies R, then P implies R.

Example:

  • If it rains, the ground gets wet. (P → Q)
  • If the ground becomes wet, then the plants will grow (Q → R).
  • Therefore, if it rains, the plants grow. (P → R)

7.2.4 Disjunctive Syllogism (P ∨ Q, ¬P ⊢ Q)

If at least one statement is true and one is false, the other must be true.

Example:

  • Today is Saturday or Sunday. (P ∨ Q)
  • Today is not Saturday. (¬P)
  • Therefore, today is Sunday. (Q)

7.2.5 Conjunction (P, Q ⊢ P ∧ Q)

If P is true and Q is true, then “P AND Q” is true.

Example:

  • P: It is raining.
  • Q: I have an umbrella.
  • Conclusion: It is raining AND I have an umbrella.

7.2.6 Simplification (P ∧ Q ⊢ P)

From a conjunction, either individual statement can be logically inferred.

Example:

  • P ∧ Q means both statements are true at the same time, for example: “It is raining AND it is cold.”
  • Therefore, it is raining.

7.2.7 Addition (P ⊢ P ∨ Q)

If P is true, then “P OR Q” is also true.

Example:

  • P: It is raining.
  • Therefore, it is raining OR it is sunny.

7.2.8 Resolution

A rule to combine disjunctions to simplify arguments, often used in AI.

Example:
(P ∨ Q), (¬P ∨ R) ⊢ (Q ∨ R)

7.2.9 Constructive Dilemma

Definition: Combines conditional statements with disjunctions.

Example:
(P → Q) ∧ (R → S), P ∨ R ⊢ Q ∨ S

7.2.10 Destructive Dilemma

Definition: Combines conditional statements with negation and disjunctions.

Example:
(P → Q) ∧ (R → S), ¬Q ∨ ¬S ⊢ ¬P ∨ ¬R

7.3 Predicate Logic Inference

In predicate logic, we apply inference to quantified statements.

7.3.1 Universal Instantiation (∀x P(x) ⊢ P(a))

From a statement true for all objects, we can infer it is true for a specific object.

Example:

  • ∀x (Human(x) → Mortal(x))
  • For Socrates: Human(Socrates) → Mortal(Socrates)

7.3.2 Existential Instantiation (∃x P(x) ⊢ P(a))

From a statement that something exists, pick a specific example.

Example:

  • ∃x (Cat(x) ∧ Black(x)) → There is a cat, say Felix, that is black

7.3.3 Universal Generalization (P(a) ⊢ ∀x P(x))

If something is true for an arbitrary element, it is true for all.

Example:
If a randomly chosen human is mortal, and the choice is arbitrary, we can infer all humans are mortal

7.3.4 Existential Generalization (P(a) ⊢ ∃x P(x))

If a statement is true for a specific object, then something exists for which it is true.

Example:
Felix is a black cat → There exists a black cat

Summary (Reasoning & Inference)

  • Inference: Drawing conclusions from premises.
  • Types of reasoning: Deductive (certain), Inductive (probable), Abductive (best explanation)
  • Rules of Inference: Modus Ponens, Modus Tollens, Hypothetical & Disjunctive Syllogisms, etc.
  • Predicate logic inference: involves working with statements that use quantifiers like “for all” (∀) and “there exists” (∃), applying rules such as universal instantiation, existential instantiation, and generalization.

Mastering these makes you proficient in reasoning, proof writing, and AI/logical problem solving.

8. Proof Techniques

A proof is a sequence of logical steps used to demonstrate that a statement is true.Different techniques exist depending on the problem.

8.1 Direct Proof

Start with assumptions and logically derive the conclusion step by step.

Example:

  • Statement: If a number n is even, then n² is also even.
  • Proof: Let n = 2k (even). Then n² = (2k)² = 4k² = 2(2k²) → even

8.2 Proof by Contradiction

Assume the contrary of the statement you want to prove and demonstrate that it results in a contradiction.

Example:

  • Statement: √2 is irrational.
  • Proof: Assume √2 is rational → √2 = p/q → leads to both p and q being even → contradiction

8.3 Proof by Contrapositive

To prove “If P implies Q,” you can instead prove the equivalent statement: “If not Q, then not P.”

Example:

  • Statement: If the square of a number n is even, then n is also even.
  • Contrapositive: Instead of proving a statement directly, one can show that if n is odd, then n² is also odd, which is often a simpler approach.

8.4 Proof by Mathematical Induction

Definition: Prove a statement for all natural numbers using Base Case + Inductive Step.

Example:

  • Statement: The sum of the first n natural numbers is given by ( n(n+1)/2 ).
  • Base case: n=1 → 1 = 1(1+1)/2
  • Inductive step: Assume true for n=k, prove for n=k+1 → works

9. Logical Truth & Consequence

9.1 Logical Truth

A statement true in all possible interpretations.

Example:

  • “If it rains, then it rains.”
  • “P ∨ ¬P” (Law of excluded middle)

9.2 Logical Consequence

A conclusion is necessarily true when the premises are true.

Example:

  • Premises: Every human is mortal, and Socrates is a human.
  • Conclusion: Socrates is mortal

Logical truth is absolute, while logical consequence depends on premises.

10. Applications of Logic

Logic is used everywhere in reasoning, science, and AI.

10.1 Mathematics

Uses:

  • Proving theorems
  • Building formal systems
  • Checking consistency of axioms

Example:
Pythagorean theorem, proofs of number theory statements

10.2 Computer Science

Uses:

  • Algorithms and programming
  • Software verification
  • Database queries and logic programming

Example:
Boolean logic in circuits can be applied as: “If the user is an admin, then access is granted.”

10.3 Artificial Intelligence

Uses:

  • Expert systems
  • Automated reasoning
  • Knowledge representation

Example:
AI medical diagnosis: If symptoms X and Y, then disease Z

10.4 Philosophy

Uses:

  • Ethics: reasoning about moral principles
  • Epistemology: analyzing knowledge claims
  • Metaphysics: reasoning about existence and reality

11. Advanced & Specialized Topics

For expert-level logic and research.

11.1 Non-Monotonic Logic

Reasoning when knowledge changes (not all conclusions remain valid).

Example:

  • Typically, birds are able to fly; since Tweety is a bird, it is assumed that Tweety can fly.
  • However, given that Tweety is a penguin, it follows that Tweety cannot fly.

11.2 Higher-Order Logic

Logic that allows quantifying over predicates and functions, not just objects.

Example:
∀P ∃x P(x) → statements about properties, not just individuals

11.3 Proof Assistants & Formal Verification

Software that checks proofs automatically.

Examples: Coq, Lean → used in software and hardware verification

11.4 Logical Paradoxes

Examples:

  • Russell’s Paradox: Bertrand Russell described a paradox involving the “set of all sets that do not contain themselves,” known as Russell’s Paradox.
  • Liar Paradox: “This statement is false.”

Shows limits of naive logic systems

11.5 Decision Theory & Logic

Applying logic to make rational decisions under uncertainty

Example:
Expected utility: If action A has 70% chance of benefit X, take it

11.6 Applications in Natural Language Semantics

Using logic to analyze meaning in language.

Example:
“Every student passed” → ∀x(Student(x) → Passed(x))

Helps in computational linguistics and AI understanding of language

Summary

  • Proof Techniques: Ways to show statements are true (Direct, Contradiction, Contrapositive, Induction)
  • Logical Truth & Consequence: Absolute truth vs truth following premises
  • Applications: Math, CS, AI, philosophy
  • Advanced Topics: Non-monotonic logic, higher-order logic, proof assistants, paradoxes, decision theory, language

After mastering this, you can reason, prove, and apply logic professionally, including AI, math, and philosophy.

Scroll to Top