The rule induction principle [0170]
- February 8, 2025
- Jon Sterling
We have been dancing around the relationship between sets of syntactic rules over a set X the subsets of X that they carve out by means of derivations. Rule induction is the principle that allows us to prove that these two perspectives are equivalent.
Theorem Rule induction [0171]
- February 8, 2025
- Jon Sterling
Let \mathcal {R} be a set of syntactic rules over a set X. Let X_{\mathcal {R}}\subseteq X be the subset containing just those x\in X such that there exists a derivation of x in \mathcal {R}.
Then X_{\mathcal {R}} is closed under each of the rules in \mathcal {R} and it is moreover the smallest such subset of X. In other words, X_{\mathcal {R}}\in \mathrm {Cl}_{\mathcal {R}} and if S\in \mathrm {Cl}_{\mathcal {R}} then X_{\mathcal {R}}\subseteq S. Equivalently, X_{\mathcal {R}} = \bigcap \mathrm {Cl}_{\mathcal {R}}.
Proof.
- February 8, 2025
- Jon Sterling
We first check that X_{\mathcal {R}} lies in \mathrm {Cl}_{\mathcal {R}}. We first fix a rule in \mathcal {R}:
\displaystyle \frac {\displaystyle u_1\quad \ldots \quad u_n}{\displaystyle \quad v\quad }We must show that X_{\mathcal {R}} satisfies the closure condition described by the rule depicted above. For that, we assume that u_1,\ldots ,u_n lie in X_{\mathcal {R}} and we need to verify that v lies in X_{\mathcal {R}}. By definition, we therefore have \scriptstyle \frac {\scriptstyle \vdots }{\scriptstyle u_i} derivations of each u_i and we need to find a derivation of v. We do this by combining the assumed derivations using the rule as follows to obtain a derivation of v:
\displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle \vdots }{\displaystyle \quad u_1\quad } \quad \ldots \quad \displaystyle \frac {\displaystyle \vdots }{\displaystyle \quad u_n\quad } }{\displaystyle \quad v\quad }We have therefore shown that X_{\mathcal {R}}\in \mathrm {Cl}_{\mathcal {R}}.
For the remainder of the proof, we fix any S\in \mathcal {Cl}_{\mathcal {R}} to check that X_{\mathcal {R}}\subseteq S. In other words, we must prove:
For all x: X such that x has a derivation in \mathcal {R}, we have x\in S.
But the above can be rephrased as follows:
For all derivations d generated by \mathcal {R}, the conclusion of d lies in S.
As every derivation has a (maximum) height, we can further rephrase the goal in terms that will be amenable to the use of mathematical induction.
For all n\in \mathbb {N}, the conclusion of any derivation with height less than or equal to n lies in S.
We now proceed by induction.
- In the base case, we must show that the conclusion of any derivation d with height less than or equal to 0 lies in S. But any derivation has height at least 1, so this is vacuous.
In the inductive step, we suppose that the conclusion of every derivation of height less than or equal to n lies in S; we must prove that the conclusion of every derivation of height less than or equal to n+1 lies in S.
To that end, consider a derivation of height less than or equal to n+1 with conclusion v, which we might depict below as follows:
\displaystyle \frac {\displaystyle \frac {\vdots }{u_1}\quad \ldots \quad \frac {\vdots }{u_n} }{\displaystyle \quad v\quad }Such a derivation must come from a rule of the following form in \mathcal {R}:
\displaystyle \frac {\displaystyle u_1\quad \ldots \quad u_n}{\displaystyle \quad v\quad }We need to show that v lies in S. Naturally, all the subderivations of u_i depicted above have height less than or equal to n; therefore, our inductive hypothesis ensures that each u_i lies in S.
The rule \scriptstyle \frac {\scriptstyle u_1\quad \ldots \quad u_n}{\scriptstyle v} specifies a closure condition, and because S\in \mathrm {Cl}_{\mathcal {R}} we know that S is closed under it. Recalling the closure condition induced by a rule, we can immediately conclude v\in S from u_1,\ldots ,u_n\in S.
By virtue of Theorem [0171], we are justified in referring to X_{\mathcal {R}} as the subset of X inductively defined by \mathcal {R}.
Example Application of rule induction [0173]
- February 8, 2025
- Jon Sterling
We recall the formal language over \Sigma ={\mathopen {}\left \{a,b\right \}\mathclose {}} presented in Example [016Y] by the following rule set \mathcal {R}:
\displaystyle \frac {\displaystyle }{\displaystyle \quad \epsilon \quad } \quad \displaystyle \frac {\displaystyle u}{\displaystyle \quad aub\quad } \quad \displaystyle \frac {\displaystyle u}{\displaystyle \quad bua\quad } \quad \displaystyle \frac {\displaystyle u\quad v}{\displaystyle \quad uv\quad }For any string u\in {\mathopen {}\left \{a,b\right \}\mathclose {}}^\star , let P(u) be the property that u contains the same number of a and b symbols. Then for all u\in \Sigma ^\star _{\mathcal {R}}, we have P(u).
Proof.
- February 8, 2025
- Jon Sterling
We proceed by rule induction, letting S = {\mathopen {}\left \{u\,\middle \vert \,P(u)\right \}\mathclose {}}. In particular, we need only show that S is closed under each of the rules:
- We note that the empty string has the same (zero) number of a and b symbols.
- Adding both an a and a b to a given string in whatever location preserves the relationship between the number of a and b symbols.
- If u has n copies of a and b each and v has m copies of a and b each, then the concatenation uv has m+n copies of a and b each.
Therefore S\in \mathrm {Cl}_{\mathcal {R}} and thus \Sigma ^\star _{\mathcal {R}}\subseteq S.