Registry Synced

Propositional Logic

1269 words
6 min read

Reading compass

Now ยท ๐ŸŽฏ Learning Objectives

Propositional Logic

๐ŸŽฏ Learning Objectives

  • Identify propositions and their truth values
  • Use logical connectives: โˆง\land, โˆจ\lor, ยฌ\neg, โ†’\to, โ†”\leftrightarrow
  • Construct and interpret truth tables
  • Determine tautologies, contradictions, and contingencies
  • Prove logical equivalence using truth tables and algebraic manipulation

1.1 Intuition: The Language of Mathematical Reasoning

Logic is the grammar of mathematics. Just as grammar rules tell us which sentences are well-formed, logic rules tell us which arguments are valid. Propositional logic is the simplest form โ€” it deals with whole statements that are either true or false.
๐Ÿ”‘ Key Insight: The truth of a compound statement depends ONLY on the truth values of its parts, not on their meaning.

1.2 Propositions

A proposition (or statement) is a declarative sentence that is either true or false โ€” but not both.
ExampleProposition?Truth Value
"The sky is blue."YesTrue
"2 + 2 = 5."YesFalse
"Please sit down."No (imperative)โ€”
"This statement is false."No (paradox)โ€”
" x>5x > 5 "No (open sentence)Depends on xx

Atomic vs. Compound Propositions

TypeDefinitionExample
AtomicCannot be broken down further"It is raining."
CompoundBuilt from atomic propositions using connectives"It is raining AND it is cold."

1.3 Logical Connectives

NameSymbolRead AsMeaning
Negationยฌp\neg p"not pp "Opposite truth value
Conjunctionpโˆงqp \land q" pp and qq "True iff both true
Disjunctionpโˆจqp \lor q" pp or qq "True iff at least one true (inclusive)
Conditionalpโ†’qp \to q"if pp then qq "False only when pp true and qq false
Biconditionalpโ†”qp \leftrightarrow q" pp iff qq "True when pp and qq have same truth value

Truth Tables

pqยฌppโˆงqpโˆจqpโ†’qpโ†”qTTFTTTTTFFFTFFFTTFTTFFFTFFTT\begin{array}{c|c||c|c|c|c|c} p & q & \neg p & p \land q & p \lor q & p \to q & p \leftrightarrow q \\ \hline T & T & F & T & T & T & T \\ T & F & F & F & T & F & F \\ F & T & T & F & T & T & F \\ F & F & T & F & F & T & T \end{array}

Tricky Case: Implication (pโ†’qp \to q)

The implication "if pp then qq" is vacuously true when pp is false. This often confuses beginners. Example: "If it rains (pp), then I'll take an umbrella (qq)."
  • It rains and I take umbrella: Tโ†’T=TT \to T = T (kept promise)
  • It rains and I don't take umbrella: Tโ†’F=FT \to F = F (broke promise)
  • No rain and I take umbrella: Fโ†’T=TF \to T = T (still true โ€” didn't break anything)
  • No rain and I don't take umbrella: Fโ†’F=TF \to F = T (also true)

1.4 Tautologies, Contradictions, Contingencies

TypeDefinitionExample
TautologyAlways truepโˆจยฌpp \lor \neg p (law of excluded middle)
ContradictionAlways falsepโˆงยฌpp \land \neg p
ContingencyNeitherpโˆงqp \land q

Proving a Tautology

To show pโˆจยฌpp \lor \neg p is a tautology:
pยฌppโˆจยฌpTFTFTT\begin{array}{c|c|c} p & \neg p & p \lor \neg p \\ \hline T & F & T \\ F & T & T \end{array}
All entries in the result column are TT โ†’ it's a tautology.

1.5 Logical Equivalence

Two statements are logically equivalent (โ‰ก\equiv) if they have the same truth value for all assignments.

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
Proof by truth table:
pqยฌ(pโˆงq)ยฌpโˆจยฌqยฌ(pโˆจq)ยฌpโˆงยฌqTTFFFFTFTTFFFTTTFFFFTTTT\begin{array}{c|c|c|c|c|c|c} p & q & \neg(p \land q) & \neg p \lor \neg q & \neg(p \lor q) & \neg p \land \neg q \\ \hline T & T & F & F & F & F \\ T & F & T & T & F & F \\ F & T & T & T & F & F \\ F & F & T & T & T & T \end{array}
Columns 3=4 and 5=6, proving both equivalences.

Other Key Equivalences

NameLaw
Commutativitypโˆงqโ‰กqโˆงpp \land q \equiv q \land p ; pโˆจqโ‰กqโˆจpp \lor q \equiv q \lor p
Associativity(pโˆงq)โˆงrโ‰กpโˆง(qโˆงr)(p \land q) \land r \equiv p \land (q \land r)
Distributivitypโˆง(qโˆจr)โ‰ก(pโˆงq)โˆจ(pโˆงr)p \land (q \lor r) \equiv (p \land q) \lor (p \land r)
IdentitypโˆงTโ‰กpp \land T \equiv p ; pโˆจFโ‰กpp \lor F \equiv p
DominationpโˆจTโ‰กTp \lor T \equiv T ; pโˆงFโ‰กFp \land F \equiv F
Double negationยฌ(ยฌp)โ‰กp\neg(\neg p) \equiv p
Implicationpโ†’qโ‰กยฌpโˆจqp \to q \equiv \neg p \lor q
Contrapositivepโ†’qโ‰กยฌqโ†’ยฌpp \to q \equiv \neg q \to \neg p
Biconditionalpโ†”qโ‰ก(pโ†’q)โˆง(qโ†’p)p \leftrightarrow q \equiv (p \to q) \land (q \to p)
For pโ†’qp \to q:
NameFormExample
Originalpโ†’qp \to qIf it rains, I'll take umbrella
Converseqโ†’pq \to pIf I take umbrella, it rains
Inverseยฌpโ†’ยฌq\neg p \to \neg qIf no rain, I won't take umbrella
Contrapositiveยฌqโ†’ยฌp\neg q \to \neg pIf no umbrella, no rain
Important: Original and contrapositive are logically equivalent. Converse and inverse are not equivalent to the original.

๐Ÿ“Š Formula Summary

EquivalenceRule
Implicationpโ†’qโ‰กยฌpโˆจqp \to q \equiv \neg p \lor q
Contrapositivepโ†’qโ‰กยฌqโ†’ยฌpp \to q \equiv \neg q \to \neg p
De Morgan (AND)ยฌ(pโˆงq)โ‰กยฌpโˆจยฌq\neg(p \land q) \equiv \neg p \lor \neg q
De Morgan (OR)ยฌ(pโˆจq)โ‰กยฌpโˆงยฌq\neg(p \lor q) \equiv \neg p \land \neg q
Distributivepโˆง(qโˆจr)โ‰ก(pโˆงq)โˆจ(pโˆงr)p \land (q \lor r) \equiv (p \land q) \lor (p \land r)

โœ… Practice Questions

Q1: Is (pโ†’q)โˆง(qโ†’r)โ†’(pโ†’r)(p \to q) \land (q \to r) \to (p \to r) a tautology?
Solution
This is hypothetical syllogism, a famous tautology. Proof: construct truth table. The only way to make it false would require pโ†’qp \to q true, qโ†’rq \to r true, and pโ†’rp \to r false. pโ†’rp \to r false requires p=T,r=Fp=T, r=F. Then pโ†’qp \to q true with p=Tp=T requires q=Tq=T. Then qโ†’rq \to r with q=T,r=Fq=T, r=F gives FF. Contradiction. So it's always true. Q2: Prove ยฌ(pโ†’q)โ‰กpโˆงยฌq\neg(p \to q) \equiv p \land \neg q. Solution
pโ†’qโ‰กยฌpโˆจqp \to q \equiv \neg p \lor q, so ยฌ(pโ†’q)โ‰กยฌ(ยฌpโˆจq)โ‰กpโˆงยฌq\neg(p \to q) \equiv \neg(\neg p \lor q) \equiv p \land \neg q (by De Morgan and double negation). Q3: Write the contrapositive of: "If a number is divisible by 6, then it is divisible by 2 and 3." Solution
Contrapositive: "If a number is NOT divisible by 2 OR NOT divisible by 3, then it is NOT divisible by 6." Q4: Use truth tables to prove pโ†’(qโ†’r)โ‰ก(pโˆงq)โ†’rp \to (q \to r) \equiv (p \land q) \to r. Solution
>pqrqโ†’rpโ†’(qโ†’r)pโˆงq(pโˆงq)โ†’rTTTTTTTTTFFFTFTFTTTFTTFFTTFTFTTTTFTFTFFTFTFFTTTFTFFFTTFT>> \begin{array}{c|c|c|c|c|c} p & q & r & q \to r & p \to (q \to r) & p \land q & (p \land q) \to r \\ \hline T & T & T & T & T & T & T \\ T & T & F & F & F & T & F \\ T & F & T & T & T & F & T \\ T & F & F & T & T & F & T \\ F & T & T & T & T & F & T \\ F & T & F & F & T & F & T \\ F & F & T & T & T & F & T \\ F & F & F & T & T & F & T \end{array} >
Columns 5 and 7 match exactly. Q5: Simplify ยฌ(pโˆจยฌq)\neg(p \lor \neg q). Solution
ยฌ(pโˆจยฌq)โ‰กยฌpโˆงยฌ(ยฌq)โ‰กยฌpโˆงq\neg(p \lor \neg q) \equiv \neg p \land \neg(\neg q) \equiv \neg p \land q Join Discord NextPredicate Logic
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.