Skip to main content
⚡ Calmops

Introduction to Propositional Logic: The Foundation of Logical Reasoning

Introduction

Propositional logic, also known as sentential logic or statement logic, is the branch of logic that studies ways of combining or altering statements to form more complex statements, and the logical relationships between these statements. It serves as the foundation for mathematical reasoning, computer science, philosophy, and artificial intelligence.

At its core, propositional logic deals with propositions—statements that can be definitively classified as either true or false—and the logical operations that can be performed on them. Unlike everyday language, which is often ambiguous and context-dependent, propositional logic provides a precise, formal system for reasoning about truth and falsehood.

Understanding propositional logic is essential for:

  • Computer Science: Programming, algorithm design, circuit design, and artificial intelligence
  • Mathematics: Constructing proofs and understanding mathematical reasoning
  • Philosophy: Analyzing arguments and understanding the nature of truth
  • Everyday Reasoning: Making clear, logical arguments and avoiding fallacies

This comprehensive guide will introduce you to the fundamental concepts of propositional logic, from basic propositions to complex logical arguments.

What is a Proposition?

Definition

A proposition is a declarative statement that is either true or false, but not both. Propositions are the basic building blocks of propositional logic.

Examples of Propositions

Valid Propositions (have definite truth values):

  • “Paris is the capital of France.” (True)
  • “2 + 2 = 5” (False)
  • “The Earth is flat.” (False)
  • “All humans are mortal.” (True)
  • “It is raining in London right now.” (True or False, depending on the actual weather)

Not Propositions (cannot be classified as true or false):

  • “What time is it?” (Question)
  • “Close the door!” (Command)
  • “This sentence is false.” (Paradox - cannot be consistently assigned a truth value)
  • “x + 5 = 10” (Open sentence - truth depends on the value of x)
  • “She is tall.” (Vague - no clear criterion for truth)

Simple vs. Compound Propositions

Simple (Atomic) Propositions:

  • Cannot be broken down into simpler propositions
  • Examples: “It is raining,” “John is tall,” “5 > 3”

Compound (Molecular) Propositions:

  • Formed by combining simple propositions using logical operators
  • Examples: “It is raining AND it is cold,” “Either John is tall OR Mary is short”

Propositional Variables and Symbols

In propositional logic, we use letters (usually lowercase p, q, r, s, etc.) to represent propositions. This abstraction allows us to focus on the logical structure independent of the specific content.

Examples:

  • Let p = “It is raining”
  • Let q = “The ground is wet”
  • Let r = “I will bring an umbrella”

Using these variables, we can construct complex logical statements and analyze their truth values systematically.

Logical Operators (Connectives)

Logical operators combine or modify propositions to create compound propositions. Here are the fundamental logical operators:

1. Negation (NOT) - ¬ or ~

Symbol: ¬p or ~p or ¬p

Meaning: “Not p” or “It is not the case that p”

Truth Table:

p ¬p
T F
F T

Examples:

  • If p = “It is raining,” then ¬p = “It is not raining”
  • If p = “5 > 3” (True), then ¬p = “5 ≤ 3” (False)

Properties:

  • Negation reverses the truth value
  • Double negation returns to the original: ¬(¬p) ≡ p

2. Conjunction (AND) - ∧

Symbol: p ∧ q

Meaning: “p and q” (both p and q)

Truth Table:

p q p ∧ q
T T T
T F F
F T F
F F F

Key Point: A conjunction is true only when both components are true.

Examples:

  • “It is raining AND it is cold”
  • “5 > 3 AND 2 is even” (True ∧ True = True)
  • “5 > 3 AND 2 is odd” (True ∧ False = False)

Properties:

  • Commutative: p ∧ q ≡ q ∧ p
  • Associative: (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
  • Idempotent: p ∧ p ≡ p

3. Disjunction (OR) - ∨

Symbol: p ∨ q

Meaning: “p or q” (at least one of p or q, possibly both)

Truth Table:

p q p ∨ q
T T T
T F T
F T T
F F F

Key Point: A disjunction is true when at least one component is true. This is inclusive OR (allows both to be true).

Examples:

  • “I will study math OR physics” (could study both)
  • “5 > 3 OR 2 is even” (True ∨ True = True)
  • “5 < 3 OR 2 is odd” (False ∨ False = False)

Properties:

  • Commutative: p ∨ q ≡ q ∨ p
  • Associative: (p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
  • Idempotent: p ∨ p ≡ p

Note: In everyday language, “or” is sometimes exclusive (one or the other, but not both). In logic, we use ∨ for inclusive OR and ⊕ for exclusive OR (XOR).

4. Exclusive OR (XOR) - ⊕

Symbol: p ⊕ q

Meaning: “Either p or q, but not both”

Truth Table:

p q p ⊕ q
T T F
T F T
F T T
F F F

Examples:

  • “Either you pass OR you fail” (exclusive - can’t be both)
  • “The light is ON XOR OFF”

Equivalent Expression: p ⊕ q ≡ (p ∨ q) ∧ ¬(p ∧ q)

5. Implication (Conditional) - → or ⊃

Symbol: p → q

Meaning: “If p, then q” or “p implies q”

Components:

  • p is called the antecedent or hypothesis
  • q is called the consequent or conclusion

Truth Table:

p q p → q
T T T
T F F
F T T
F F T

Key Point: An implication is false only when the antecedent is true and the consequent is false. When the antecedent is false, the implication is vacuously true regardless of the consequent.

Examples:

  • “If it rains, then the ground is wet”
  • “If 2 + 2 = 5, then pigs can fly” (True, because the hypothesis is false)

Important Variations:

  • Converse: q → p (switching antecedent and consequent)
  • Inverse: ¬p → ¬q (negating both parts)
  • Contrapositive: ¬q → ¬p (switching and negating)

Note: A statement and its contrapositive are logically equivalent, but a statement and its converse are NOT necessarily equivalent.

Equivalent Expressions:

  • p → q ≡ ¬p ∨ q
  • p → q ≡ ¬(p ∧ ¬q)

6. Biconditional (If and Only If) - ↔ or ≡

Symbol: p ↔ q

Meaning: “p if and only if q” (often abbreviated as “p iff q”)

Truth Table:

p q p ↔ q
T T T
T F F
F T F
F F T

Key Point: A biconditional is true when both propositions have the same truth value (both true or both false).

Examples:

  • “A triangle is equilateral if and only if all its sides are equal”
  • “x = 0 if and only if x² = 0 and x ≥ 0”

Equivalent Expression: p ↔ q ≡ (p → q) ∧ (q → p)

Meaning: The biconditional means both implications hold:

  • If p, then q (p → q)
  • If q, then p (q → p)

Order of Operations (Precedence)

Just like arithmetic has order of operations (PEMDAS), propositional logic has precedence rules:

  1. ¬ (Negation) - highest precedence
  2. (Conjunction)
  3. (Disjunction)
  4. (Implication)
  5. (Biconditional) - lowest precedence

Example:

  • p ∧ q ∨ r means (p ∧ q) ∨ r, not p ∧ (q ∨ r)
  • ¬p ∧ q means (¬p) ∧ q, not ¬(p ∧ q)

Best Practice: Use parentheses to make your meaning clear, even when not strictly necessary.

Truth Tables

Truth tables are a systematic method for determining the truth value of compound propositions for all possible combinations of truth values of their components.

How to Construct Truth Tables

Steps:

  1. Identify all propositional variables (p, q, r, etc.)
  2. Determine the number of rows needed: 2ⁿ where n is the number of variables
  3. List all possible combinations of truth values for the variables
  4. Add columns for each sub-expression and the final expression
  5. Calculate truth values systematically from innermost to outermost operations

Example: Truth Table for (p ∧ q) → r

p q r p ∧ q (p ∧ q) → r
T T T T T
T T F T F
T F T F T
T F F F T
F T T F T
F T F F T
F F T F T
F F F F T

Example: Truth Table for ¬(p ∨ q) ↔ (¬p ∧ ¬q) (De Morgan’s Law)

p q p ∨ q ¬(p ∨ q) ¬p ¬q ¬p ∧ ¬q ¬(p ∨ q) ↔ (¬p ∧ ¬q)
T T T F F F F T
T F T F F T F T
F T T F T F F T
F F F T T T T T

The final column is all true, showing these expressions are logically equivalent.

Types of Propositions

Based on their truth tables, compound propositions can be classified into three categories:

1. Tautology

A tautology is a proposition that is always true, regardless of the truth values of its components.

Examples:

  • p ∨ ¬p (Law of Excluded Middle)
  • ¬(p ∧ ¬p) (Law of Non-Contradiction)
  • (p ∧ q) → p
  • p → (p ∨ q)

Truth Table Example for p ∨ ¬p:

p ¬p p ∨ ¬p
T F T
F T T

2. Contradiction

A contradiction is a proposition that is always false, regardless of the truth values of its components.

Examples:

  • p ∧ ¬p
  • (p → q) ∧ (p ∧ ¬q)

Truth Table Example for p ∧ ¬p:

p ¬p p ∧ ¬p
T F F
F T F

3. Contingency

A contingency is a proposition that is neither a tautology nor a contradiction—its truth value depends on the truth values of its components.

Examples:

  • p ∧ q
  • p → q
  • (p ∨ q) ∧ r

Most practical propositions are contingencies.

Logical Equivalence

Two propositions are logically equivalent if they have the same truth value in every possible case—that is, they have identical truth tables.

Notation: p ≡ q or p ⇔ q

Important Logical Equivalences

Identity Laws:

  • p ∧ T ≡ p
  • p ∨ F ≡ p

Domination Laws:

  • p ∨ T ≡ T
  • p ∧ F ≡ F

Idempotent Laws:

  • p ∨ p ≡ p
  • p ∧ p ≡ p

Double Negation Law:

  • ¬(¬p) ≡ p

Commutative Laws:

  • p ∨ q ≡ q ∨ p
  • p ∧ q ≡ q ∧ p

Associative Laws:

  • (p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
  • (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)

Distributive Laws:

  • p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)
  • p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)

De Morgan’s Laws:

  • ¬(p ∧ q) ≡ ¬p ∨ ¬q
  • ¬(p ∨ q) ≡ ¬p ∧ ¬q

Absorption Laws:

  • p ∨ (p ∧ q) ≡ p
  • p ∧ (p ∨ q) ≡ p

Negation Laws:

  • p ∨ ¬p ≡ T (Law of Excluded Middle)
  • p ∧ ¬p ≡ F (Law of Non-Contradiction)

Implication Equivalences:

  • p → q ≡ ¬p ∨ q
  • p → q ≡ ¬q → ¬p (Contrapositive)
  • ¬(p → q) ≡ p ∧ ¬q

Biconditional Equivalences:

  • p ↔ q ≡ (p → q) ∧ (q → p)
  • p ↔ q ≡ (p ∧ q) ∨ (¬p ∧ ¬q)

Using Equivalences to Simplify Expressions

Example: Simplify ¬(p ∨ ¬q) ∨ (¬p ∧ ¬q)

Solution:

¬(p ∨ ¬q) ∨ (¬p ∧ ¬q)
≡ (¬p ∧ ¬(¬q)) ∨ (¬p ∧ ¬q)    [De Morgan's Law]
≡ (¬p ∧ q) ∨ (¬p ∧ ¬q)        [Double Negation]
≡ ¬p ∧ (q ∨ ¬q)               [Distributive Law]
≡ ¬p ∧ T                       [Excluded Middle]
≡ ¬p                           [Identity Law]

Arguments and Validity

An argument in propositional logic consists of:

  • Premises: Propositions assumed to be true
  • Conclusion: Proposition that supposedly follows from the premises

Valid Arguments

An argument is valid if whenever all the premises are true, the conclusion must also be true. Validity is about the logical structure, not the truth of the premises or conclusion.

Format:

Premise 1: p₁
Premise 2: p₂
...
Premise n: pₙ
─────────────
Conclusion: q

The argument is valid if (p₁ ∧ p₂ ∧ … ∧ pₙ) → q is a tautology.

Common Valid Argument Forms

1. Modus Ponens (Affirming the Antecedent):

p → q
p
─────
∴ q

Example:

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

2. Modus Tollens (Denying the Consequent):

p → q
¬q
─────
∴ ¬p

Example:

  • If it rains, the ground gets wet. (p → q)
  • The ground is not wet. (¬q)
  • Therefore, it is not raining. (¬p)

3. Hypothetical Syllogism (Chain Rule):

p → q
q → r
─────
∴ p → r

Example:

  • If I study, I will pass. (p → q)
  • If I pass, I will graduate. (q → r)
  • Therefore, if I study, I will graduate. (p → r)

4. Disjunctive Syllogism:

p ∨ q
¬p
─────
∴ q

Example:

  • Either it’s raining or it’s sunny. (p ∨ q)
  • It’s not raining. (¬p)
  • Therefore, it’s sunny. (q)

5. Addition:

p
─────
∴ p ∨ q

6. Simplification:

p ∧ q
─────
∴ p

7. Conjunction:

p
q
─────
∴ p ∧ q

8. Resolution:

p ∨ q
¬p ∨ r
─────
∴ q ∨ r

Common Invalid Argument Forms (Fallacies)

1. Affirming the Consequent (Invalid!):

p → q
q
─────
∴ p  [INVALID]

Example:

  • If it rains, the ground gets wet. (p → q)
  • The ground is wet. (q)
  • Therefore, it rained. (p) [FALSE! Could be from sprinklers]

2. Denying the Antecedent (Invalid!):

p → q
¬p
─────
∴ ¬q  [INVALID]

Example:

  • If it rains, the ground gets wet. (p → q)
  • It’s not raining. (¬p)
  • Therefore, the ground is not wet. (¬q) [FALSE! Could be wet from sprinklers]

Normal Forms

Conjunctive Normal Form (CNF)

A proposition is in CNF if it is a conjunction of disjunctions (AND of ORs).

Form: (p ∨ q ∨ r) ∧ (¬p ∨ s) ∧ (q ∨ ¬s ∨ t)

Use: Important in automated theorem proving and satisfiability problems (SAT).

Disjunctive Normal Form (DNF)

A proposition is in DNF if it is a disjunction of conjunctions (OR of ANDs).

Form: (p ∧ q ∧ r) ∨ (¬p ∧ s) ∨ (q ∧ ¬s ∧ t)

Use: Can be read directly from truth tables.

Theorem: Every proposition can be expressed in both CNF and DNF.

Applications of Propositional Logic

1. Computer Science

Boolean Algebra:

  • Foundation of digital circuit design
  • TRUE and FALSE correspond to 1 and 0
  • Logical gates (AND, OR, NOT, NAND, NOR, XOR)

Programming:

  • Conditional statements (if-then-else)
  • Boolean expressions
  • Loop conditions
  • Input validation

Database Queries:

  • SQL WHERE clauses use propositional logic
  • Combining conditions with AND, OR, NOT

Artificial Intelligence:

  • Knowledge representation
  • Expert systems
  • Automated reasoning
  • Satisfiability (SAT) solvers

2. Mathematics

Proof Techniques:

  • Direct proof
  • Proof by contradiction
  • Proof by contrapositive
  • Mathematical induction

Set Theory:

  • Set operations correspond to logical operations
  • ∩ (intersection) ↔ ∧ (AND)
  • ∪ (union) ↔ ∨ (OR)
  • Complement ↔ ¬ (NOT)

3. Philosophy

Argument Analysis:

  • Identifying valid and invalid arguments
  • Detecting logical fallacies
  • Understanding philosophical reasoning

Epistemology:

  • Nature of truth and knowledge
  • Logical consistency of belief systems

4. Everyday Reasoning

Critical Thinking:

  • Evaluating arguments in news, advertising, debates
  • Identifying logical fallacies
  • Making clear, structured arguments

Decision Making:

  • Breaking down complex decisions
  • Identifying necessary and sufficient conditions
  • Evaluating options systematically

Practice Problems

Problem 1: Determine Truth Values

Given:

  • p = “It is raining” (True)
  • q = “The ground is wet” (True)
  • r = “I have an umbrella” (False)

Evaluate:

  1. p ∧ q
  2. p → r
  3. ¬r ∨ q
  4. (p ∧ ¬r) → q

Solutions:

  1. T ∧ T = T
  2. T → F = F
  3. T ∨ T = T
  4. (T ∧ T) → T = T → T = T

Problem 2: Create Truth Table

Create a truth table for: (p → q) ↔ (¬p ∨ q)

Solution:

p q p → q ¬p ¬p ∨ q (p → q) ↔ (¬p ∨ q)
T T T F T T
T F F F F T
F T T T T T
F F T T T T

The final column is all T, confirming these expressions are logically equivalent.

Problem 3: Simplify Expression

Simplify: (p ∧ q) ∨ (p ∧ ¬q)

Solution:

(p ∧ q) ∨ (p ∧ ¬q)
≡ p ∧ (q ∨ ¬q)        [Distributive Law]
≡ p ∧ T               [Excluded Middle]
≡ p                   [Identity Law]

Problem 4: Determine Validity

Is this argument valid?

If I study, I will pass the exam.
I passed the exam.
Therefore, I studied.

Solution:

Symbolically:
p → q
q
─────
∴ p

This is Affirming the Consequent, which is a logical fallacy. The argument is INVALID.

Counter-example: You could have passed without studying (lucky guessing, easy exam, etc.).

Problem 5: Find Contrapositive

What is the contrapositive of: “If it is sunny, then I will go to the beach”?

Solution:

  • Original: p → q (If sunny, then beach)
  • Contrapositive: ¬q → ¬p

Answer: “If I do not go to the beach, then it is not sunny.”

Note: The contrapositive is logically equivalent to the original statement.

Common Mistakes to Avoid

  1. Confusing implication with causation: p → q doesn’t mean p causes q
  2. Misunderstanding vacuous truth: False → anything is always true
  3. Confusing converse with contrapositive: Only contrapositive is equivalent
  4. Confusing inclusive and exclusive OR: Logic uses inclusive OR by default
  5. Incorrect negation of compound statements: Use De Morgan’s Laws
  6. Assuming truth of statements from validity: Valid argument can have false conclusion if premises are false

Tips for Mastering Propositional Logic

  1. Practice constructing truth tables for various expressions
  2. Memorize fundamental equivalences and argument forms
  3. Work through proofs step by step using equivalences
  4. Translate everyday statements into logical notation
  5. Check your work by creating truth tables
  6. Look for patterns in logical structures
  7. Practice identifying fallacies in real-world arguments
  8. Use software tools like truth table generators for verification
  9. Study worked examples before attempting problems
  10. Teach others to solidify your understanding

Resources for Further Learning

Books

  • Introduction to Logic by Irving M. Copi and Carl Cohen
  • A Concise Introduction to Logic by Patrick J. Hurley
  • Logic: The Laws of Truth by Nicholas J.J. Smith
  • forall x: An Introduction to Formal Logic by P.D. Magnus (free online)

Online Resources

  • Khan Academy: Logic and Reasoning
  • Coursera: Introduction to Mathematical Thinking
  • MIT OpenCourseWare: Mathematics for Computer Science
  • Stanford Encyclopedia of Philosophy: Propositional Logic
  • Truth Table Generator - Stanford

Practice Tools

  • Truth table generators
  • Logic proof checkers
  • Symbolic logic practice websites
  • Logic puzzle books and websites

Conclusion

Propositional logic provides a rigorous foundation for reasoning about truth and falsehood. By understanding propositions, logical operators, truth tables, and argument forms, you develop the ability to:

  • Analyze arguments systematically
  • Identify logical fallacies
  • Construct valid proofs
  • Write precise programs and algorithms
  • Think more clearly and critically

While propositional logic has limitations (it cannot express statements about quantities or relationships within propositions), it serves as the essential building block for more advanced logical systems, including predicate logic and modal logic.

The key to mastering propositional logic is practice. Start with simple expressions, work through truth tables, and gradually tackle more complex problems. As you become more comfortable with the formal notation and reasoning techniques, you’ll find these skills invaluable not just in mathematics and computer science, but in clear thinking across all domains.

Remember: Logic is a tool for clear thinking. Like any tool, it becomes more powerful and intuitive with regular use. Keep practicing, stay curious, and enjoy the precision and clarity that logical reasoning brings to your thinking!


What aspects of propositional logic do you find most interesting or challenging? Share your thoughts and questions in the comments below!

Comments