Inductive definitions [016N]
- February 7, 2025
- Jon Sterling
Axioms and rules [016O]
- February 7, 2025
- Jon Sterling
In many cases, a subset is defined implicitly by describing the rules that you must follow in order to construct an element of it.
Example Informal rules for constructing naturals [016Q]
- February 7, 2025
- Jon Sterling
For example, consider the set of natural numbers \mathbb {N} viewed as a subset of the reals \mathbb {R}; this could be described by the following rules of construction:
- 0 is a natural number.
- If x is a natural number, then x+1 is also a natural number.
The set of natural numbers is then described as the smallest subset of \mathbb {R} that obeys these rules, i.e. the intersection of all the subsets of \mathbb {R} that contain 0 and are closed under the successor function x \mapsto x+1.
This is the same process as we saw when constructing inductively defined functions, where we first defined the equational rules we wanted the function to follow as a closure condition on a relation and then we defined the function as the smallest relation satisfying the closure condition.
Example Inductive definition of the naturals via closure conditions [016R]
- February 7, 2025
- Jon Sterling
In Example [016Q] we described the rules for constructing natural numbers in plain English. Formally, the two rules above would be understood each as a subset of \mathcal {P}{\mathopen {}\left (\mathbb {R}\right )\mathclose {}}.
\begin {aligned} \mathsf {ZeroClosed},\mathsf {SuccClosed} &\subseteq \mathcal {P}{\mathopen {}\left (\mathbb {R}\right )\mathclose {}} \\ S\in \mathsf {ZeroClosed} &\Leftrightarrow 0\in S\\ S\in \mathsf {SuccClosed} &\Leftrightarrow \forall x\in S\mathpunct {.} x+1\in S \end {aligned}Then natural numbers would be defined to be the smallest subset of \mathbb {R} that lies both in \mathsf {ZeroClosed} and \mathsf {SuccClosed}:
\mathbb {N} = \bigcap {\mathopen {}\left \{S\subseteq \mathbb {R}\,\middle \vert \,S\in \mathsf {ZeroClosed}\cap \mathsf {SuccClosed}\right \}\mathclose {}}Warning Closure conditions must be closed under intersection [0172]
- February 8, 2025
- Jon Sterling
In general, for the definition of \mathbb {N}\subseteq \mathbb {R} in Example [016R] to work, the subsets of \pow {X} must themselves be closed under intersection: otherwise, taking the big intersection to get the smallest subset “closed under the rules” might not work because the intersection might no longer be closed under the rules. So, for example, you need to check that if you have a family of subsets X_i\subseteq \mathbb {R}, then if each X_i\in \mathsf {SuccClosed} we also have \bigcap _i X_i\in \mathsf {SuccClosed}. But this is nearly always obvious for closure conditions encountered in practice.
Syntactic description of rules [016P]
- February 7, 2025
- Jon Sterling
The plain-English description of rules of construction that we saw in Example [016Q] are a bit lengthy to read and write; by contrast, the more precise depiction of rules as subsets of the powerset that we saw in Example [016R] is perhaps overly formal and obfuscated. For this reason, computer scientists and logicians have developed an alternative notation for describing rules of construction that involves drawing things above and below horizontal lines (these are not fractions!).
Definition Syntactic rule [016S]
- February 7, 2025
- Jon Sterling
The basic form of a rule that describes a subset of a set X is as follows:
\frac { u_1 \quad \ldots \quad u_n }{ v }The plain English meaning of the rule is: If u_1 through u_n are elements of the subset that I am defining, then so is v. In such a rule, the items on top of the horizontal line are called premises or antecedents or hypotheses, and the item on the bottom of the horizontal line is called the conclusion. When a rule has no premises, it is called an axiom.
Example Syntactic rules for forming natural numbers [016T]
- February 7, 2025
- Jon Sterling
We can translate the plain-English description of the natural numbers into the syntactic form specified by Definition [016S]. In particular, the rules expression closure under zero and successor are rendered as follows:
\displaystyle \frac {\displaystyle }{\displaystyle \quad 0\quad } \qquad \displaystyle \frac {\displaystyle x}{\displaystyle \quad x+1\quad }The above are to be understood as syntactic rules describing a subset of \mathbb {R}. The first rule is an axiom in the sense of our definition, because it has no premises.
Definition The closure condition denoted by a syntactic rule [016U]
- February 7, 2025
- Jon Sterling
A syntactic rule like \scriptstyle \frac {\scriptstyle u_1\quad \ldots \quad u_n}{\scriptstyle v} on a set X denotes a closure condition on subsets of X, i.e. a subset of the powerset \mathcal {P}{\mathopen {}\left (X\right )\mathclose {}}. In particular, the meaning of this rule is the following subset of \mathcal {P}{\mathopen {}\left (X\right )\mathclose {}}:
{\mathopen {}\left \{S\subseteq X\,\middle \vert \, u_1,\ldots ,u_n\in S\implies v\in S \right \}\mathclose {}}When \mathcal {R} is a set of rules over X, we will write \mathrm {Cl}_{\mathcal {R}}\subseteq \mathcal {P}{\mathopen {}\left (X\right )\mathclose {}} for the intersection of the closure conditions denoted by each rule in \mathcal {R}. This is, in other words, the set of subsets of X that lie in the closure condition for each rule r\in \mathcal {R}.
In light of Definition [016U], we see that the closure conditions denoted by the syntactic rules for the naturals in Example [016T] are precisely those specified in Example [016R].
Definition Derivations [016X]
- February 7, 2025
- Jon Sterling
In the presence of a set \mathcal {R} of syntactic rules describing a subset of X, a derivation that a particular element u lies in that subset is given by a finite tree with vertices labelled by elements of X such that:
- the root of the tree is u;
- each vertex of the tree is the conclusion of a rule whose premises are the children of the node
- each leaf of the tree is an axiom.
Viewing a tree as growing upwards from the root, we have the following derivation for 3\in \mathbb {N} in when \mathcal {R} is the two rules from Example [016T]:
\displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle }{\displaystyle \quad 0\quad } }{\displaystyle \quad 1\quad } }{\displaystyle \quad 2\quad } }{\displaystyle \quad 3\quad }We recall the definition of a formal language:
Definition Formal language [016M]
- February 7, 2025
- Jon Sterling
Because a formal language is nothing more than a subset, we can define them by rules of construction—either in the form of plain English rules, closure conditions, or syntactic rules. We will focus on the use of syntactic rules and their relationship to the closure conditions they denote.
Definition Syntactic presentation of a formal language [016W]
- February 7, 2025
- Jon Sterling
A syntactic presentation of a formal language over an alphabet \Sigma is defined to be a set of syntactic rules over the set of strings \Sigma ^\star .
Example A syntactic presentation of a formal language [016Y]
- February 8, 2025
- Jon Sterling
We can present an example formal language over the alphabet \Sigma = {\mathopen {}\left \{a,b\right \}\mathclose {}} by a set of rules:
\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 }The string abaabb can be generated from these rules in at least two ways by means of the following derivations:
\displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle }{\displaystyle \quad \epsilon \quad } }{\displaystyle \quad ab\quad } \quad \displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle }{\displaystyle \quad \epsilon \quad } }{\displaystyle \quad ab\quad } }{\displaystyle \quad aabb\quad } }{\displaystyle \quad abaabb\quad } \qquad \displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle }{\displaystyle \quad \epsilon \quad } }{\displaystyle \quad ba\quad } \quad \displaystyle \frac {\displaystyle \displaystyle \frac {\displaystyle }{\displaystyle \quad \epsilon \quad } }{\displaystyle \quad ab\quad } }{\displaystyle \quad baab\quad } }{\displaystyle \quad abaabb\quad }On the other hand, there is no derivation for the string abaab.
Example Revisiting reflexive-transitive closure [016Z]
- February 8, 2025
- Jon Sterling
Let R\colon X\mathbin {\nrightarrow } X be a binary relation on a set X. In Lecture 14 we saw that the reflexive-transitive closure of R can be defined in two equivalent ways:
- Concretely: it can be defined to be the smallest relation closed under all finite paths in R, viewed as a directed graph.
- Abstractly: it is the smallest preorder containing R as a subrelation.
There is a “middle ground” between the most concrete and abstract ways of looking at reflexive-transitive closure: we can present it by means of syntactic rules whose induced closure conditions isolate the “set of preorders containing R as a subrelation”.
We first add the following rules over X\times X that correspond to the laws of a preorder.
\displaystyle \frac {\displaystyle }{\displaystyle \quad (x,x)\quad } \quad \displaystyle \frac {\displaystyle (x,y)\quad (y,z)}{\displaystyle \quad (x,z)\quad }Finally, we add the following rule for any x,y\in X such that x\mathrel {R}y:
\displaystyle \frac {\displaystyle }{\displaystyle \quad (x,y)\quad } \quad (x\mathrel {R}y)To be very clear, this last rule only applies when x\mathrel {R}y. This is called a side condition.
In order to see that the rules described in Example [016Z] actually define the reflexive transitive closure in the sense that a pair (x,y) has a derivation if and only if there is a path from x to y, we will need the rule induction theorem, which is the topic of the rest of this lecture.