encyclopegia.org

Structural induction

Structural induction is a proof method that is used in mathematical logic (e.g., in the proof of Łoś' theorem), computer science, graph theory, and some other mathematical fields. It is a generalization of mathematical induction over natural numbers and can be further generalized to arbitrary Noetherian induction. Structural recursion is a recursion method bearing the same relationship to structural induction as ordinary recursion bears to ordinary mathematical induction. Structural induction is used to prove that some proposition holds for all of some sort of recursively defined structure, such as formulas, lists, or trees. A well-founded partial order is defined on the structures ("subformula" for formulas, "sublist" for lists, and "subtree" for trees). The structural induction proof is a proof that the proposition holds for all the minimal structures and that if it holds for the immediate substructures of a certain structure , then it must hold for also. (Formally speaking, this then satisfies the premises of an axiom of well-founded induction, which asserts that these two conditions are sufficient for the proposition to hold for all .) A structurally recursive function uses the same idea to define a recursive function: "base cases" handle each minimal structure and a rule for recursion.…

Structural induction is a proof method that is used in mathematical logic (e.g., in the proof of Łoś' theorem), computer science, graph theory, and some other mathematical fields. It is a generalization of mathematical induction over natural numbers and can be further generalized to arbitrary Noetherian induction. Structural recursion is a recursion method bearing the same relationship to structural induction as ordinary recursion bears to ordinary mathematical induction. Structural induction is used to prove that some proposition holds for all of some sort of recursively defined structure, such as formulas, lists, or trees. A well-founded partial order is defined on the structures ("subformula" for formulas, "sublist" for lists, and "subtree" for trees). The structural induction proof is a proof that the proposition holds for all the minimal structures and that if it holds for the immediate substructures of a certain structure , then it must hold for also. (Formally speaking, this then satisfies the premises of an axiom of well-founded induction, which asserts that these two conditions are sufficient for the proposition to hold for all .) A structurally recursive function uses the same idea to define a recursive function: "base cases" handle each minimal structure and a rule for recursion. Structural recursion is usually proved correct by structural induction; in particularly easy cases, the inductive step is often left out. The length and ++ functions in the example below are structurally recursive. For example, if the structures are lists, one usually introduces the partial order " p+q+1 \leq (2^g-1) + (2^h-1) + 1 \leq 2^h+2^h-1 = 2^{1+h}-1, i.e. the whole tree satisfies the property. In case , the whole tree extends over generations and shows persons by similar reasoning, i.e. the whole tree satisfies the property in this case also. Hence, by structural induction, each ancestor tree satisfies the property. As another, more formal example, consider the following property of lists : \text{EQ:} \quad \operatorname{len}(L +\!+\ M) = \operatorname{len}(L) + \operatorname{len}(M) Here denotes the list concatenation operation, the list length, and and are lists. In order to prove this, we need definitions for length and for the concatenation operation. Let denote a list whose head (first element) is and whose tail (list of remaining elements) is , and let denote the empty list. The definitions for length and the concatenation operation are: \begin{array}{ll} \text{LEN1:} & \operatorname{len}([\ ]) = 0 \\ \text{LEN2:} & \operatorname{len}(h:t) = 1 + \operatorname{len}(t) \\ & \\ \text{APP1:} & [\ ] +\!+\ list = list \\ \text{APP2:} & (h:t) +\!+\ list = h : (t +\!+\ list) \end{array} Our proposition is that is true for all lists when is . We want to show that is true for all lists . We will prove this by structural induction on lists. First we will prove that is true; that is, is true for all lists when happens to be the empty list . Consider : \begin{array}{rll} \operatorname{len}(L +\!+\ M) &= \operatorname{len}([\ ] +\!+\ M) \\ &= \operatorname{len}(M) & (\text{by APP1})\\ &= 0 + \operatorname{len}(M) \\ &= \operatorname{len}([\ ]) + \operatorname{len}(M) & (\text{by LEN1})\\ &= \operatorname{len}(L) + \operatorname{len}(M) \\ \end{array} So this part of the theorem is proved; is true for all , when is , because the left-hand side and the right-hand side are equal. Next, consider any nonempty list . Since is nonempty, it has a head item, , and a tail list, , so we can express it as . The induction hypothesis is that is true for all values of when is : \text{HYP:} \quad \operatorname{len}(xs +\!+\ M) = \operatorname{len}(xs) + \operatorname{len}(M) We would like to show that if this is the case, then is also true for all values of when . We proceed as before: \begin{array}{rll} \operatorname{len}(L) + \operatorname{len}(M) &= \operatorname{len}(x:xs) + \operatorname{len}(M) \\ &= 1 + \operatorname{len}(xs) + \operatorname{len}(M) & (\text{by LEN2}) \\ &= 1 + \operatorname{len}(xs +\!+\ M) & (\text{by HYP}) \\ &= \operatorname{len}(x: (xs +\!+\ M)) & (\text{by LEN2}) \\ &= \operatorname{len}((x:xs) +\!+\ M) & (\text{by APP2}) \\ &= \operatorname{len}(L +\!+\ M) \end{array} Thus, from structural induction, we obtain that is true for all lists . ==Well-ordering== Just as standard mathematical induction is equivalent to the well-ordering principle, structural induction is also equivalent to a well-ordering principle. If the set of all structures of a certain kind admits a well-founded partial order, then every nonempty subset must have a minimal element. (This is the definition of "well-founded".) The significance of the lemma in this context is that it allows us to deduce that if there are any counterexamples to the theorem we want to prove, then there must be a minimal counterexample. If we can show the existence of the minimal counterexample implies an even smaller counterexample, we have a contradiction (since the minimal counterexample isn't minimal) and so the set of counterexamples must be empty. As an example of this type of argument, consider the set of all binary trees. We will show that the number of leaves in a full binary tree is one more than the number of interior nodes. Suppose there is a counterexample; then there must exist one with the minimal possible number of interior nodes. This counterexample, , has interior nodes and leaves, where . Moreover, must be nontrivial, because the trivial tree has and and is therefore not a counterexample. therefore has at least one leaf whose parent node is an interior node. Delete this leaf and its parent from the tree, promoting the leaf's sibling node to the position formerly occupied by its parent. This reduces both and by 1, so the new tree also has and is therefore a smaller counterexample. But by hypothesis, was already the smallest counterexample; therefore, the supposition that there were any counterexamples to begin with must have been false. The partial ordering implied by 'smaller' here is the one that says that whenever has fewer nodes than . ==See also== Coinduction Initial algebra Loop invariant, analog for loops ==References== Early publications about structural induction include: Rózsa Péter, Über die Verallgemeinerung der Theorie der rekursiven Funktionen für abstrakte Mengen geeigneter Struktur als Definitionsbereiche, Symposium International, Varsovie septembre (1959) (On the generalization of the theory of recursive functions for abstract quantities with suitable structures as domains) .

References

No reference rows published for this article.

Cite this article

MLA

"Structural induction." encyclopegia.org, 2026, https://encyclopegia.org/wiki/structural-induction. Accessed 24 November 2026.

Chicago

"Structural induction." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/structural-induction.

APA

encyclopegia.org. (2026). Structural induction. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/structural-induction

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1375758618 · 0.5 · snapshot enwiki-001375758618

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.