Proof by Induction

Proof by Induction consists of:

  • Base Case: show that solution holds for
  • Inductive Case:
    1. Assume that it holds for .
    2. Substitute to confirm it also holds for .
Link to original

In the frame of this module, for any property of natural numbers () to prove it is sufficient to show:

  • Base Case:
  • Induction Step:

Structural Induction

We denote an empty list by , and a non-empty list by where is the head element and is the tail of the list.

To prove a property holds for every list, it is sufficient to prove:

  • Base Case:
  • Induction Step: .

More generally, if we are working with finite labelled trees and we want to prove a property for those trees, it is sufficient to show:

  • Base Case:
  • Induction Step: for each tree constructor (with arguments):

Example: to prove a property holds for all integer expressions in SIMP:

  1. Base Case: prove for all , prove for all locations .
  2. Induction Step: for all integer expressions , and operators : Prove that and implies .

Application of Structural Induction Principle

For example, we want to prove the property “the semantics of SIMP guarantees that for any integer expression appearing in a program working on a memory , if uses locations that are defined in then the value of is defined”.

Or otherwise, for any configuration where is any arbitrary control stack and is also arbitrary, there is a configuration such that .

We have to prove where is:

This is proved by induction on the structure of :

  • Base Case: if is a number or then the transitions for constants and locations prove
  • Induction Step: assume and hold, we have to prove .

Inductive Definitions

We can also use induction to define subsets of a given set . We will write inductive definitions using axioms (representing the base case) and rules (representing the induction step).

A axiom is an element of . A rule is a pair where:

  • is a non-empty subset of called the hypotheses of the rule.
  • is an element of called the conclusion of the rule.

The subset of inductively defined by a collection of axioms and rules consists of those such that:

  • there are and a rule such that and .

To show that an element of is in it is sufficient to show that is an axiom, or that there is a proof: Where the leaves are axioms and for each non-leaf node , there is a rule . This proof is usually written:

Examples of Inductive Definitions

  1. Natural Numbers Axiom: Rule: Usually written as:
  2. Evaluation relation for integer expressions in SIMP Notation: means evaluates to in state . Axioms: Rule:

Rule Induction

We can write a principle of induction for this kind of inductive definition, called rule induction.

Principle of Rule Induction Let be a set defined by induction with axioms and rules . To show that holds for all , it is sufficient to prove:

  • Base Case:
  • Induction Step:

Example: each integer expression in SIMP has a unique value under the evaluation relation Basis: trivial since numbers have unique values Induction Step: for non-atomic expressions, we remark that the value of an arithmetic expression is uniquely determined by the values of its arguments, which are unique by the induction hypotheses

Special Principle of Rule Induction In some cases, we are only interested in proving a property for a subset of the inductive set defined by . Then we can use a special case of the principle of rule induction, which says that to prove that a property holds for all the elements of , it is sufficient to show that:

  • Basis:
  • Induction Step: for all such that ,