Lecture 3: How to write a proof?
Inference Rules in Action
Common Rules:
- Modus Ponens: \( p \to q, p \therefore q \)
- Modus Tollens: \( p \to q, \neg q \therefore \neg p \)
- Hypothetical Syllogism: \( p \to q, q \to r \therefore p \to r \)
- Simplification: \( p \land q \therefore p \)
Army Command Chain Examples
- "The weather is bad and visibility is low."
- "The unit will advance only if visibility is good."
- "If the unit does not advance, then they will hold position."
- "If they hold position, then reinforcements will arrive."
Let \( p \): "Visibility is good", \( q \): "Weather is bad", \( r \): "Unit advances", \( s \): "Hold position", \( t \): "Reinforcements arrive"
Formal Proof:
- \( \neg p \land q \) (Premise 1)
- \( \neg p \) (Simplification 1)
- \( r \to p \) (Premise 2: 'only if' introduces necessary condition)
- \( \neg r \) (Modus Tollens 2,3)
- \( \neg r \to s \) (Premise 3)
- \( s \) (Modus Ponens 4,5)
- \( s \to t \) (Premise 4)
- \( t \) (Modus Ponens 6,7)
- "Communications are down and the enemy is advancing."
- "The commander will order an attack only if communications are up."
- "If no attack is ordered, then the battalion will retreat."
- "If the battalion retreats, supplies will be safeguarded."
Let \( p \): "Communications are up", \( q \): "Enemy advancing", \( r \): "Commander orders attack", \( s \): "Battalion retreats", \( t \): "Supplies safeguarded"
Formal Proof:
- \( \neg p \land q \) (Premise 1)
- \( \neg p \) (Simplification 1)
- \( r \to p \) (Premise 2)
- \( \neg r \) (Modus Tollens 2,3)
- \( \neg r \to s \) (Premise 3)
- \( s \) (Modus Ponens 4,5)
- \( s \to t \) (Premise 4)
- \( t \) (Modus Ponens 6,7)
- Encoding: Translate natural language to formal logic
- Justification: Each step cites a rule and previous lines
- Validity: Truth-preserving inference rules guarantee correct conclusions
- Clarity: Military examples provide concrete intuition for abstract concepts
Mathematical Induction
Principle: If \( P(n_0) \) is true and \( P(k) \implies P(k+1) \) for all \( k \geq n_0 \), then \( P(n) \) is true for all \( n \geq n_0 \).
Army Formation Example
Formal Setup:
Domain: Natural numbers representing company positions (1, 2, 3, ..., n)
Predicate: \( R(k) \): "Company at position \( k \) receives orders"
Axioms:
- \( R(1) \) ā The first company receives orders
- \( \forall k \in \mathbb{N}, R(k) \to R(k+1) \) ā Relay property
Proof by Mathematical Induction:
Base Case (\( n = 1 \)):
We need to prove \( R(1) \).
Proof: This is given directly as Axiom 1. ā
Inductive Step:
Hypothesis (IH): Assume \( R(k) \) is true for some arbitrary \( k \in \mathbb{N} \).
Goal: Prove \( R(k+1) \).
Proof:
- By IH, we have \( R(k) \)
- From Axiom 2: \( \forall k \in \mathbb{N}, R(k) \to R(k+1) \)
- Universal instantiation: \( R(k) \to R(k+1) \)
- Modus Ponens on (1) and (3): \( R(k+1) \) ā
Conclusion: By mathematical induction, \( \forall n \in \mathbb{N}, R(n) \) is true.
Soldier Count Example
Predicate: \( S(k) \): "The total number of soldiers in the first \( k \) companies equals \( 50k \)"
Goal: Prove \( \forall n \in \mathbb{N}, S(n) \)
Base Case (\( n = 1 \)):
Company 1 has 50 soldiers, so \( S(1) \) holds since \( 50 \times 1 = 50 \). ā
Inductive Step:
IH: Assume \( S(k) \) is true (first \( k \) companies have \( 50k \) soldiers).
Goal: Prove \( S(k+1) \) (first \( k+1 \) companies have \( 50(k+1) \) soldiers).
Proof:
- By IH, first \( k \) companies have \( 50k \) soldiers
- Company \( k+1 \) adds 50 more soldiers
- Total = \( 50k + 50 = 50(k+1) \) soldiers ā
In the inductive step, you cannot use \( \forall n, R(n) \) to prove \( R(k+1) \). You must rely only on the inductive hypothesis \( R(k) \) and the general properties of the system.
Predicate Logic Problems
Quantifiers:
- \( \forall x \, P(x) \): "For all x, P(x) is true"
- \( \exists x \, P(x) \): "There exists x such that P(x) is true"
Problem 3.29: Expressing Predicates Formally
(a) m is a divisor of n:
\( \exists k \in \mathbb{N}, n = m \times k \)
Alternative: \( \exists k \in \mathbb{N}, m \times k = n \)
(b) n is a prime number:
\( n > 1 \land \forall d \in \mathbb{N}, (d \neq 1 \land d \neq n) \to \neg(\exists k \in \mathbb{N}, n = d \times k) \)
Simplified: \( n > 1 \land \forall d(1 < d < n \to \neg(\exists k, n=d \times k)) \)
(c) n is a power of a prime:
\( \exists p \in \mathbb{N}, p > 1 \land \forall d(1 < d < p \to \neg(\exists k, p=d \times k)) \land \exists e \in \mathbb{N}, e \geq 1 \land \exists m \in \mathbb{N}, m^e=n \)
The formalization ensures:
- \( n > 1 \): Excludes 0 and 1
- No divisors between 2 and n-1
- Uses existential quantification for the divisor relationship
š¢ Domain Constraints
The problem restricts us to basic arithmetic operations. This means we cannot use exponentiation directly, but we can define powers through repeated multiplication or find alternative characterizations that avoid powers entirely.
This theorem justifies why "power of a prime" is a well-defined concept in formal logic.
Quick Reference
š Inference Rules
⢠Modus Ponens: \( p \to q, p \therefore q \)
⢠Modus Tollens: \( p \to q, \neg q \therefore \neg p \)
⢠Hypothetical Syllogism: \( p \to q, q \to r \therefore p \to r \)
⢠Simplification: \( p \land q \therefore p \)
š Mathematical Induction
Steps:
1. Base case: Prove P(nā)
2. Inductive step: P(k) ā P(k+1)
3. Conclusion: ān ā„ nā, P(n)
šÆ Predicate Logic
Quantifiers:
⢠āx P(x): "For all x"
⢠āx P(x): "There exists x"
Domain: Nonnegative integers
āļø Military Examples
Orders Flow: Base case + relay = all receive
Chain of Command: Natural induction model
Resource Counting: Additive properties
- ā Can you construct formal proofs using inference rules?
- ā Do you understand how induction proves universal statements?
- ā Can you formalize natural language into predicate logic?
- ā Can you identify when military analogies apply to mathematical concepts?