Structural induction follows the grammar

Structural induction is induction over how an object is built rather than over an integer index. First state the recursive definition. Prove the claim for every base object. Then, for each constructor, assume the claim for that constructor's immediate subobjects and prove it for the constructed object.


The hypothesis applies only to subobjects explicitly supplied by the constructor. A proof is incomplete if it checks a familiar example but omits a grammar alternative, such as a binary constructor with two recursive children.

Expressions are built from variables and from E+E. What must a structural proof check first?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A full binary tree is either a leaf or Node(left,right). Which hypothesis is available in the Node case?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

For full binary trees, suppose leaves(left)=internal(left)+1 and the same holds for right. What follows for Node(left,right)?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors