Examples of inductive property definitions:

The first two examples are based on the inductive definition of full binary tree, and the last two on the inductive definition of regular expressions in the  Inductive Definition Examples file.

  1. Height of a full binary tree:

h (.) = 0

h (T) = 1 + max (h(L), h(R))

  1. number of nodes in a full binary tree:

n (.) = 1

n (T) = 1 + n(L) + n(R)

  1. Number of characters in a regular expression:

n (empty set) = 0

n (empty str) = 1

n (char) = 1

n ( (A) ) = 2 + n(A)

n ( A+B ) = 1 + n(A) + n(B)

n ( AB ) = n(A) + n(B)

n ( A* ) = 1 + n(A)

  1. Depth of Regular Expression Parse Tree

d (empty set) = 1

d (empty str) = 1

d (char) = 2 // first is "char", second is the particular symbol

d ( (A) ) = 1 + d (A)

d ( A+B ) = 1 + max (d(A), d(B))

d ( AB ) = 1 + max (d(A), d(B))

d ( A* ) = 1 + d (A)