Closures Again

Chapter 6: Mathematical Induction

Learning objectives

  • Describe the closure of a set under an operation as a stage-by-stage construction
  • Prove that the constructed closure is the smallest closed set containing the seed
  • Compute transitive, reflexive, and symmetric closures of a relation
  • Use induction on the stage index to prove properties of the closure

In §5.4 a closure was defined "from outside" — the smallest set with a property, computed as an intersection of all closed sets containing the seed. That definition is correct but it tells you nothing about how to actually build the closure. Induction unlocks a constructive definition "from inside": start with the seed AA, apply the operation once to get a new layer, apply it to the new layer to get another, and so on. The union of all layers is the closure. Once you have the construction, induction on the layer index becomes the proof tool for everything: every element of the closure has a finite construction history, and you can reason about it the way you reason about natural numbers.

The inductive construction

Let ASA \subseteq S and let :S×SS\star : S \times S \to S be a binary operation. Define a sequence of sets stage by stage:

A0=A,An+1=An{ab:a,bAn}.A_0 = A,\qquad A_{n+1} = A_n \cup \{a \star b : a, b \in A_n\}.

The closure of AA under \star is

A=n=0An.\overline{A} = \bigcup_{n=0}^{\infty} A_n.

Each AnA_n is a finite (or at least bounded) approximation; the union gathers them all. An element xx belongs to A\overline{A} exactly when there is some finite stage nn where xAnx \in A_n.

Mapping ArrowsInteractive figure — enable JavaScript to interact.

Transitive closure of a relation

Let RS×SR \subseteq S \times S. Define R1=RR^1 = R and Rn+1=RnRR^{n+1} = R^n \circ R where \circ is relational composition: (a,b)RnR(a, b) \in R^n \circ R iff there exists cc with (a,c)Rn(a, c) \in R^n and (c,b)R(c, b) \in R. The transitive closure of RR is

R+=n=1Rn.R^+ = \bigcup_{n=1}^{\infty} R^n.

The pair (a,b)Rn(a, b) \in R^n means there is a path of length nn from aa to bb stepping along arrows of RR. Thus R+R^+ is the relation "bb is reachable from aa by following RR for one or more steps." The reflexive-transitive closure RR^* adds the identity pairs (a,a)(a, a) to allow zero-step paths.

Why it really is the smallest closed set

Two facts together pin down A\overline{A} as the smallest set containing AA and closed under \star:

(i) A\overline{A} is closed. If a,bAa, b \in \overline{A}, then aAma \in A_m and bAnb \in A_n for some m,nm, n. Let N=max(m,n)N = \max(m, n). Both belong to ANA_N (since the AiA_i are nested), so abAN+1Aa \star b \in A_{N+1} \subseteq \overline{A}.

(ii) Any closed CC containing AA also contains A\overline{A}. Prove by induction on nn that AnCA_n \subseteq C. Base n=0n = 0: A0=ACA_0 = A \subseteq C. Step: if AnCA_n \subseteq C, then for any a,bAna, b \in A_n we have a,bCa, b \in C, so abCa \star b \in C (since CC is closed). Thus An+1CA_{n+1} \subseteq C. Taking the union, AC\overline{A} \subseteq C. \blacksquare

Pause and think: consider A={2}Z+A = {2} \subseteq \mathbb{Z}^+ under addition. What is A0,A1,A2A_0, A_1, A_2? Find a stage nn at which 10An10 \in A_n but 10An110 \notin A_{n-1}.

Try it

  • Predict: closure of {3}{3} under addition in Z+\mathbb{Z}^+. Compute A0,A1,A2A_0, A_1, A_2 and conjecture the full closure.
  • Predict the transitive closure of R={(1,2),(2,3),(3,4)}R = {(1, 2), (2, 3), (3, 4)} on {1,2,3,4}{1, 2, 3, 4}. Compute R1,R2,R3R^1, R^2, R^3 explicitly.
  • Is Z\mathbb{Z} closed under subtraction? Under division? For each, decide and give a concrete witness.
  • On paper, draw a small relation on {1,2,3,4}{1, 2, 3, 4} as an arrow diagram (the widget above can hold the base relation RR). Compute R1,R2,R3R^1, R^2, R^3 stage by stage by listing the pairs that appear at each step, then union them for R+R^+. Predict which new pairs each stage adds before checking.

A trap to watch for

It is tempting to assume that some single stage ANA_N already equals the entire closure. That is generally false when AA is infinite or the operation produces infinitely many new elements. For example, with A={1}A = {1} under addition, A1={1,2}A_1 = {1, 2}, A2={1,2,3,4}A_2 = {1, 2, 3, 4}, A3={1,2,,8}A_3 = {1, 2, \ldots, 8}. No single AnA_n equals Z+\mathbb{Z}^+; the closure is the union of all stages. Conversely, if the operation produces no genuinely new elements at some stage (i.e., An+1=AnA_{n+1} = A_n), then the sequence has stabilised and AnA_n is the closure. Always check whether the construction stabilises before claiming a finite description.

Code ChallengeInteractive figure — enable JavaScript to interact.

What you now know

You can describe a closure constructively as a union of stages, prove it equals the smallest closed set containing the seed, and use induction on the stage index to verify properties of every element of the closure. You can compute small transitive and reflexive closures by hand. This is also the structural template behind "generated by" in algebra, recursive CTE in databases, and Warshall's algorithm in graph theory — all variations on the same idea: iterate the operation until nothing new appears, then bundle the work into a single proof by induction on stage.

References

  • Velleman, D. J. (2019). How to Prove It: A Structured Approach (3rd ed.). Cambridge University Press, §6.5.
  • Cormen, T. H., Leiserson, C. E., Rivest, R. L., Stein, C. (2009). Introduction to Algorithms (3rd ed.). MIT Press, ch. 25 (all-pairs shortest paths / Warshall).
  • Hammack, R. H. (2018). Book of Proof (3rd ed.). Virginia Commonwealth University, ch. 11.
  • Graham, R. L., Knuth, D. E., Patashnik, O. (1994). Concrete Mathematics (2nd ed.). Addison-Wesley, ch. 1.
  • Pierce, B. C., et al. (2018). Software Foundations, Vol. 1: Logical Foundations. Online, ch. "Relations."

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.