CS 637: Mathematics-II

How to write a proof?

Lecture 3: How to write a proof?

Inference Rules in Action

Def 1Inference Rules
Rules that allow us to derive new statements from existing premises. Each rule preserves truth - if premises are true, conclusion must be true.

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

Ex 1Military Orders Transmission
Premises:
  1. "The weather is bad and visibility is low."
  2. "The unit will advance only if visibility is good."
  3. "If the unit does not advance, then they will hold position."
  4. "If they hold position, then reinforcements will arrive."
Propositional Encoding:
Let \( p \): "Visibility is good", \( q \): "Weather is bad", \( r \): "Unit advances", \( s \): "Hold position", \( t \): "Reinforcements arrive"

Formal Proof:
  1. \( \neg p \land q \) (Premise 1)
  2. \( \neg p \) (Simplification 1)
  3. \( r \to p \) (Premise 2: 'only if' introduces necessary condition)
  4. \( \neg r \) (Modus Tollens 2,3)
  5. \( \neg r \to s \) (Premise 3)
  6. \( s \) (Modus Ponens 4,5)
  7. \( s \to t \) (Premise 4)
  8. \( t \) (Modus Ponens 6,7)
Conclusion: \( t \) is true. Valid argument - reinforcements will arrive.
Ex 2Communications Breakdown
Premises:
  1. "Communications are down and the enemy is advancing."
  2. "The commander will order an attack only if communications are up."
  3. "If no attack is ordered, then the battalion will retreat."
  4. "If the battalion retreats, supplies will be safeguarded."
Propositional Encoding:
Let \( p \): "Communications are up", \( q \): "Enemy advancing", \( r \): "Commander orders attack", \( s \): "Battalion retreats", \( t \): "Supplies safeguarded"

Formal Proof:
  1. \( \neg p \land q \) (Premise 1)
  2. \( \neg p \) (Simplification 1)
  3. \( r \to p \) (Premise 2)
  4. \( \neg r \) (Modus Tollens 2,3)
  5. \( \neg r \to s \) (Premise 3)
  6. \( s \) (Modus Ponens 4,5)
  7. \( s \to t \) (Premise 4)
  8. \( t \) (Modus Ponens 6,7)
Conclusion: \( t \) is true. Valid argument - supplies will be safeguarded.
Proof Structure Key Elements of Formal Proofs:
  • 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

Def 2Mathematical Induction
A proof technique for showing that a statement \( P(n) \) is true for all natural numbers \( n \geq n_0 \).

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 \).
Theorem 1Well-Ordering Principle
Every non-empty set of positive integers has a smallest element. This principle is equivalent to mathematical induction and forms its foundation.

Army Formation Example

Ex 3Order Transmission in Battalion
Problem: A battalion consists of companies arranged in a line. Each company has a commander. If the first company's commander can communicate orders to their company, and each commander can relay orders to the next company's commander, then all companies will receive orders.

Formal Setup:
Domain: Natural numbers representing company positions (1, 2, 3, ..., n)
Predicate: \( R(k) \): "Company at position \( k \) receives orders"
Axioms:
  1. \( R(1) \) — The first company receives orders
  2. \( \forall k \in \mathbb{N}, R(k) \to R(k+1) \) — Relay property
Goal: Prove \( \forall n \in \mathbb{N}, R(n) \)
Theorem 2All Companies Receive Orders
\( \forall n \in \mathbb{N}, R(n) \) is true.

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:
  1. By IH, we have \( R(k) \)
  2. From Axiom 2: \( \forall k \in \mathbb{N}, R(k) \to R(k+1) \)
  3. Universal instantiation: \( R(k) \to R(k+1) \)
  4. 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

Ex 4Total Soldiers in Battalion
Context: Each company has exactly 50 soldiers. Prove the total number of soldiers in \( n \) companies.

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:
  1. By IH, first \( k \) companies have \( 50k \) soldiers
  2. Company \( k+1 \) adds 50 more soldiers
  3. Total = \( 50k + 50 = 50(k+1) \) soldiers āœ“
Induction Intuition Military Analogy: Like a chain of command where orders flow from commander to commander, induction shows how a property propagates through an infinite sequence. The base case is the "first commander" and the inductive step shows "each commander can pass orders to the next."
Common Pitfall Don't Assume the Conclusion!
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

Def 3Predicate Logic
Extends propositional logic by allowing statements about objects and their properties using quantifiers and predicates.

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"
Domain: Nonnegative integers \( \mathbb{N} = \{0, 1, 2, \dots\} \)

Problem 3.29: Expressing Predicates Formally

Ex 5Formalizing Mathematical Concepts
Express each predicate using only addition, multiplication, equality, and nonnegative integer constants (no exponentiation).

(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 \)
Prime Definition Prime Number: A number greater than 1 that has no divisors other than 1 and itself.

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.

Theorem 3Fundamental Theorem of Arithmetic
Every integer greater than 1 can be expressed uniquely as a product of prime powers.

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

Study Tips Mastery Checklist:
  • āœ“ 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?
Theorem 4From Logic to Proof
This lecture bridges propositional logic with predicate logic and proof techniques. Inference rules provide the tools for constructing valid arguments, mathematical induction proves properties of infinite sets, and predicate logic allows us to formalize complex mathematical concepts. Military examples provide concrete intuition for abstract mathematical principles.
šŸ