Q
stringlengths
4
3.96k
A
stringlengths
1
3k
Result
stringclasses
4 values
Proposition 33.18. If \( h\left( n\right) = m \), then \( \mathbf{Q} \vdash {\varphi }_{h}\left( {\bar{n},\bar{m}}\right) \) .
Proof. Suppose \( h\left( n\right) = m \), i.e., \( f\left( {g\left( n\right) }\right) = m \) . Let \( k = g\left( n\right) \) . Then\n\n\[ \mathbf{Q} \vdash {\varphi }_{g}\left( {\bar{n},\bar{k}}\right) \]\n\nsince \( {\varphi }_{g} \) represents \( g \), and\n\n\[ \mathbf{Q} \vdash {\varphi }_{f}\left( {\bar{k},\bar{m}}\right) \]\n\nsince \( {\varphi }_{f} \) represents \( f \) . Thus,\n\n\[ \mathbf{Q} \vdash {\varphi }_{g}\left( {\bar{n},\bar{k}}\right) \land {\varphi }_{f}\left( {\bar{k},\bar{m}}\right) \]\n\nand consequently also\n\n\[ \mathbf{Q} \vdash \exists y\left( {{\varphi }_{g}\left( {\bar{n}, y}\right) \land {\varphi }_{f}\left( {y,\bar{m}}\right) }\right) \]\n\ni.e., \( \mathbf{Q} \vdash {\varphi }_{h}\left( {\bar{n},\bar{m}}\right) \) .
Yes
Proposition 33.19. If \( h\left( n\right) = m \), then \( \mathbf{Q} \vdash \forall z\left( {{\varphi }_{h}\left( {\bar{n}, z}\right) \rightarrow z = \bar{m}}\right) \) .
Proof. Suppose \( h\left( n\right) = m \), i.e., \( f\left( {g\left( n\right) }\right) = m \) . Let \( k = g\left( n\right) \) . Then\n\n\[ \mathbf{Q} \vdash \forall y\left( {{\varphi }_{g}\left( {\bar{n}, y}\right) \rightarrow y = \bar{k}}\right) \]\n\nsince \( {\varphi }_{g} \) represents \( g \), and\n\n\[ \mathbf{Q} \vdash \forall z\left( {{\varphi }_{f}\left( {\bar{k}, z}\right) \rightarrow z = \bar{m}}\right) \]\n\nsince \( {\varphi }_{f} \) represents \( f \) . Using just a little bit of logic, we can show that also\n\n\[ \mathbf{Q} \vdash \forall z\left( {\exists y\left( {{\varphi }_{g}\left( {\bar{n}, y}\right) \land {\varphi }_{f}\left( {y, z}\right) }\right) \rightarrow z = \bar{m}}\right) . \]\n\ni.e., \( \mathbf{Q} \vdash \forall y\left( {{\varphi }_{h}\left( {\bar{n}, y}\right) \rightarrow y = \bar{m}}\right) \) .
Yes
Proposition 33.20. If \( {\varphi }_{f}\left( {{y}_{0},\ldots ,{y}_{k - 1}, z}\right) \) represents \( f\left( {{y}_{0},\ldots ,{y}_{k - 1}}\right) \) in \( \mathbf{Q} \), and \( {\varphi }_{{g}_{i}}\left( {{x}_{0},\ldots ,{x}_{l - 1}, y}\right) \) represents \( {g}_{i}\left( {{x}_{0},\ldots ,{x}_{l - 1}}\right) \) in \( \mathbf{Q} \), then\n\n\[ \exists {y}_{0},\ldots \exists {y}_{k - 1}\left( {{\varphi }_{{g}_{0}}\left( {{x}_{0},\ldots ,{x}_{l - 1},{y}_{0}}\right) \land \cdots \land }\right.\n\n\[ {\varphi }_{{g}_{k - 1}}\left( {{x}_{0},\ldots ,{x}_{l - 1},{y}_{k - 1}}\right) \land {\varphi }_{f}\left( {{y}_{0},\ldots ,{y}_{k - 1}, z}\right) ) \]\n\nrepresents\n\n\[ h\left( {{x}_{0},\ldots ,{x}_{l - 1}}\right) = f\left( {{g}_{0}\left( {{x}_{0},\ldots ,{x}_{l - 1}}\right) ,\ldots ,{g}_{k - 1}\left( {{x}_{0},\ldots ,{x}_{l - 1}}\right) }\right) . \]
Proof. Exercise.
No
For every constant symbol a and every natural number \( n \) , \n\n\[ \n\mathbf{Q} \vdash \left( {{a}^{\prime } + \bar{n}}\right) = {\left( a + \bar{n}\right) }^{\prime }. \n\]
Proof. The proof is, as usual, by induction on \( n \) . In the base case, \( n = 0 \), we need to show that \( \mathbf{Q} \) proves \( \left( {{a}^{\prime } + \mathrm{o}}\right) = {\left( a + \mathrm{o}\right) }^{\prime } \) . But we have: \n\n\[ \n\mathbf{Q} \vdash \left( {{a}^{\prime } + \mathrm{o}}\right) = {a}^{\prime }\;\text{ by axiom }{Q}_{4} \n\] \n\n(33.1) \n\n\[ \n\mathbf{Q} \vdash \left( {a + \mathrm{o}}\right) = a\;\text{ by axiom }{Q}_{4} \n\] \n\n(33.2) \n\n\[ \n\mathbf{Q} \vdash {\left( a + \mathrm{o}\right) }^{\prime } = {a}^{\prime }\;\text{by eq. (33.2)} \n\] \n\n(33.3) \n\n\[ \n\mathbf{Q} \vdash \left( {{a}^{\prime } + \mathrm{o}}\right) = {\left( a + \mathrm{o}\right) }^{\prime }\;\text{by eq. (33.1) and eq. (33.3)} \n\] \n\nIn the induction step, we can assume that we have shown that \( \mathbf{Q} \vdash \left( {{a}^{\prime } + \bar{n}}\right) = \) \( {\left( a + \bar{n}\right) }^{\prime } \) . Since \( \overline{n + 1} \) is \( {\bar{n}}^{\prime } \), we need to show that \( \mathbf{Q} \) proves \( \left( {{a}^{\prime } + {\bar{n}}^{\prime }}\right) = {\left( a + {\bar{n}}^{\prime }\right) }^{\prime } \) . We have: \n\n\[ \n\mathbf{Q} \vdash \left( {{a}^{\prime } + {\bar{n}}^{\prime }}\right) = {\left( {a}^{\prime } + \bar{n}\right) }^{\prime }\;\text{ by axiom }{Q}_{5} \n\] \n\n(33.4) \n\n\[ \n\mathbf{Q} \vdash \left( {{a}^{\prime } + {\bar{n}}^{\prime }}\right) = {\left( a + {\bar{n}}^{\prime }\right) }^{\prime }\;\text{inductive hypothesis} \n\] \n\n(33.5) \n\n\[ \n\mathbf{Q} \vdash {\left( {a}^{\prime } + \bar{n}\right) }^{\prime } = {\left( a + {\bar{n}}^{\prime }\right) }^{\prime }\text{by eq. (33.4) and eq. (33.5).} \n\]
Yes
Lemma 33.22. \( \mathbf{Q} \vdash \forall x\neg x < 0 \) .
Proof. We give the proof informally (i.e., only giving hints as to how to construct the formal derivation).\n\nWe have to prove \( \neg a < \) 0 for an arbitrary \( a \) . By the definition of \( < \), we need to prove \( \neg \exists y\left( {{y}^{\prime } + a}\right) = 0 \) in \( \mathbf{Q} \) . We’ll assume \( \exists y\left( {{y}^{\prime } + a}\right) = 0 \) and prove a contradiction. Suppose \( \left( {{b}^{\prime } + a}\right) = \) o. Using \( {Q}_{3} \), we have that \( a = 0 \vee \exists {ya} = {y}^{\prime } \) . We distinguish cases.\n\nCase 1: \( a = \mathrm{o} \) holds. From \( \left( {{b}^{\prime } + a}\right) = \mathrm{o} \), we have \( \left( {{b}^{\prime } + \mathrm{o}}\right) = \mathrm{o} \) . By axiom \( {Q}_{4} \) of \( \mathbf{Q} \), we have \( \left( {{b}^{\prime } + \mathrm{o}}\right) = {b}^{\prime } \), and hence \( {b}^{\prime } = \mathrm{o} \) . But by axiom \( {Q}_{2} \) we also have \( {b}^{\prime } \neq 0 \), a contradiction.\n\nCase 2: For some \( c, a = {c}^{\prime } \) . But then we have \( \left( {{b}^{\prime } + {c}^{\prime }}\right) = \) o. By axiom \( {Q}_{5} \) , we have \( {\left( {b}^{\prime } + c\right) }^{\prime } = 0 \), again contradicting axiom \( {Q}_{2} \) .
Yes
For every natural number \( n \) , \[ \mathbf{Q} \vdash \forall x\left( {x < \overline{n + 1} \rightarrow \left( {x = 0 \vee \cdots \vee x = \bar{n}}\right) }\right) .
Proof. We use induction on \( n \) . Let us consider the base case, when \( n = 0 \) . In that case, we need to show \( a < \overline{1} \rightarrow a = 0 \), for arbitrary \( a \) . Suppose \( a < \overline{1} \) . Then by the defining axiom for \( < \), we have \( \exists y\left( {{y}^{\prime } + a}\right) = {\mathrm{o}}^{\prime } \) (since \( \overline{1} \equiv {\mathrm{o}}^{\prime } \) ). Suppose \( b \) has that property, i.e., we have \( \left( {{b}^{\prime } + a}\right) = {\mathrm{o}}^{\prime } \) . We need to show \( a = \mathrm{o} \) . By axiom \( {Q}_{3} \), we have either \( a = \mathrm{o} \) or that there is a \( c \) such that \( a = {c}^{\prime } \) . In the former case, there is nothing to show. So suppose \( a = {c}^{\prime } \) . Then we have \( \left( {{b}^{\prime } + {c}^{\prime }}\right) = {\mathrm{o}}^{\prime } \) . By axiom \( {Q}_{5} \) of \( \mathbf{Q} \), we have \( {\left( {b}^{\prime } + c\right) }^{\prime } = {\mathrm{o}}^{\prime } \) . By axiom \( {Q}_{1} \), we have \( \left( {{b}^{\prime } + c}\right) = \) 0 . But this means, by axiom \( {Q}_{8} \), that \( c < \) 0, contradicting Lemma 33.22. Now for the inductive step. We prove the case for \( n + 1 \), assuming the case for \( n \) . So suppose \( a < \overline{n + 2} \) . Again using \( {Q}_{3} \) we can distinguish two cases: \( a = \mathrm{o} \) and for some \( b, a = {c}^{\prime } \) . In the first case, \( a = \mathrm{o} \vee \cdots \vee a = \overline{n + 1} \) follows trivially. In the second case, we have \( {c}^{\prime } < \overline{n + 2} \), i.e., \( {c}^{\prime } < {\overline{n + 1}}^{\prime } \) . By axiom \( {Q}_{8} \) , for some \( d,\left( {{d}^{\prime } + {c}^{\prime }}\right) = \overline{n + 1} \) . By axiom \( {Q}_{5},{\left( {d}^{\prime } + c\right) }^{\prime } = \overline{n + 1} \) . By axiom \( {Q}_{1} \) , \( \left( {{d}^{\prime } + c}\right) = \overline{n + 1} \), and so \( c < \overline{n + 1} \) by axiom \( {Q}_{8} \) . By inductive hypothesis, \( c = \mathrm{o} \vee \cdots \vee c = \bar{n} \) . From this, we get \( {c}^{\prime } = {\mathrm{o}}^{\prime } \vee \cdots \vee {c}^{\prime } = {\bar{n}}^{\prime } \) by logic, and so \( a = \overline{1} \vee \cdots \vee a = \overline{n + 1} \) since \( a = {c}^{\prime } \).
Yes
Proposition 33.25. If \( {\varphi }_{g}\left( {x, z, y}\right) \) represents \( g\left( {x, z}\right) \) in \( \mathbf{Q} \), then\n\n\[ \n{\varphi }_{f}\left( {z, y}\right) \equiv {\varphi }_{g}\left( {y, z,\mathrm{o}}\right) \land \forall w\left( {w < y \rightarrow \neg {\varphi }_{g}\left( {w, z,\mathrm{o}}\right) }\right) .\n\]\n\nrepresents \( f\left( z\right) = {\mu x}\left\lbrack {g\left( {x, z}\right) = 0}\right\rbrack \) .
Proof. First we show that if \( f\left( n\right) = m \), then \( \mathbf{Q} \vdash {\varphi }_{f}\left( {\bar{n},\bar{m}}\right) \), i.e.,\n\n\[ \n\mathbf{Q} \vdash {\varphi }_{g}\left( {\bar{m},\bar{n},\mathrm{o}}\right) \land \forall w\left( {w < \bar{m} \rightarrow \neg {\varphi }_{g}\left( {w,\bar{n},\mathrm{o}}\right) }\right) .\n\]\n\nSince \( {\varphi }_{g}\left( {x, z, y}\right) \) represents \( g\left( {x, z}\right) \) and \( g\left( {m, n}\right) = 0 \) if \( f\left( n\right) = m \), we have\n\n\[ \n\mathbf{Q} \vdash {\varphi }_{g}\left( {\bar{m},\bar{n},\mathrm{o}}\right) .\n\]\n\nIf \( f\left( n\right) = m \), then for every \( k < m, g\left( {k, n}\right) \neq 0 \) . So\n\n\[ \n\mathbf{Q} \vdash \neg {\varphi }_{g}\left( {\bar{k},\bar{n},\mathrm{o}}\right) .\n\]\nWe get that\n\n\[ \n\mathbf{Q} \vdash \forall w\left( {w < \bar{m} \rightarrow \neg {\varphi }_{g}\left( {w,\bar{n},\mathrm{o}}\right) }\right) .\n\]\n\n(33.6)\n\nby Lemma 33.22 in case \( m = 0 \) and by Lemma 33.23 otherwise.\n\nNow let’s show that if \( f\left( n\right) = m \), then \( \mathbf{Q} \vdash \forall y\left( {{\varphi }_{f}\left( {\bar{n}, y}\right) \rightarrow y = \bar{m}}\right) \) . We again sketch the argument informally, leaving the formalization to the reader.\n\nSuppose \( {\varphi }_{f}\left( {\bar{n}, b}\right) \) . From this we get (a) \( {\varphi }_{g}\left( {b,\bar{n},\mathrm{o}}\right) \) and (b) \( \forall w(w < b \rightarrow \) \( \left. {\neg {\varphi }_{g}\left( {w,\bar{n},\mathrm{o}}\right) }\right) \) . By Lemma 33.24, \( \left( {b < \bar{m} \vee \bar{m} < b}\right) \vee b = \bar{m} \) . We’ll show that both \( b < \bar{m} \) and \( \bar{m} < b \) leads to a contradiction.\n\nIf \( \bar{m} < b \), then \( \neg {\varphi }_{g}\left( {\bar{m},\bar{n},\mathrm{o}}\right) \) from (b). But \( m = f\left( n\right) \), so \( g\left( {m, n}\right) = 0 \), and so \( \mathbf{Q} \vdash {\varphi }_{g}\left( {\bar{m},\bar{n},\mathrm{o}}\right) \) since \( {\varphi }_{g} \) represents \( g \) . So we have a contradiction.\n\nNow suppose \( b < \bar{m} \) . Then since \( \mathbf{Q} \vdash \forall w\left( {w < \bar{m} \rightarrow \neg {\varphi }_{g}\left( {w,\bar{n},\mathrm{o}}\right) }\right) \) by eq. (33.6), we get \( \neg {\varphi }_{g}\left( {b,\bar{n},\mathrm{o}}\right) \) . This again contradicts (a).
No
Theorem 33.28. A relation is representable in \( \mathbf{Q} \) if and only if it is computable.
Proof. For the forwards direction, suppose \( R\left( {{x}_{0},\ldots ,{x}_{k}}\right) \) is represented by the formula \( {\varphi }_{R}\left( {{x}_{0},\ldots ,{x}_{k}}\right) \) . Here is an algorithm for computing \( R \) : on input \( {n}_{0} \) , \( \ldots ,{n}_{k} \), simultaneously search for a proof of \( {\varphi }_{R}\left( {\overline{{n}_{0}},\ldots ,\overline{{n}_{k}}}\right) \) and a proof of \( \neg {\varphi }_{R}\left( {\overline{{n}_{0}},\ldots ,\overline{{n}_{k}}}\right) \) . By our hypothesis, the search is bound to find one or the other; if it is the first, report \
No
Theorem 33.29. Q is undecidable, i.e., the relation\n\n\[ \n{\operatorname{Prov}}_{\mathbf{Q}}\left( y\right) \Leftrightarrow \operatorname{Sent}\left( y\right) \land \exists x{\operatorname{Prf}}_{\mathbf{Q}}\left( {x, y}\right) \n\]\n\nis not recursive.
Proof. Suppose it were. Then we could solve the halting problem as follows: Given \( e \) and \( n \), we know that \( {\varphi }_{e}\left( n\right) \downarrow \) iff there is an \( s \) such that \( T\left( {e, n, s}\right) \), where \( T \) is Kleene’s predicate from Theorem 27.28. Since \( T \) is primitive recursive it is representable in \( \mathbf{Q} \) by a formula \( {\psi }_{T} \), that is, \( \mathbf{Q} \vdash {\psi }_{T}\left( {\bar{e},\bar{n},\bar{s}}\right) \) iff \( T\left( {e, n, s}\right) \) . If \( \mathbf{Q} \vdash {\psi }_{T}\left( {\bar{e},\bar{n},\bar{s}}\right) \) then also \( \mathbf{Q} \vdash \exists y{\psi }_{T}\left( {\bar{e},\bar{n}, y}\right) \) . If no such \( s \) exists, then \( \mathbf{Q} \vdash \) \( \neg {\psi }_{T}\left( {\bar{e},\bar{n},\bar{s}}\right) \) for every \( s \) . But \( \mathbf{Q} \) is \( \omega \) -consistent, i.e., if \( \mathbf{Q} \vdash \neg \varphi \left( \bar{n}\right) \) for every \( n \in \) \( \mathbb{N} \), then \( \mathbf{Q} \nvdash \exists {y\varphi }\left( y\right) \) . We know this because the axioms of \( \mathbf{Q} \) are true in the standard model \( \mathfrak{N} \) . So, \( \mathbf{Q} \nvdash \exists y{\psi }_{T}\left( {\bar{e},\bar{n}, y}\right) \) . In other words, \( \mathbf{Q} \vdash \exists y{\psi }_{T}\left( {\bar{e},\bar{n}, y}\right) \) iff there is an \( s \) such that \( T\left( {e, n, s}\right) \), i.e., iff \( {\varphi }_{e}\left( n\right) \downarrow \) . From \( e \) and \( n \) we can compute \( {}^{ * }\exists y{\psi }_{T}{\left( \bar{e},\bar{n}, y\right) }^{\# } \), let \( g\left( {e, n}\right) \) be the primitive recursive function which does that. So\n\n\[ \nh\left( {e, n}\right) = \left\{ \begin{array}{ll} 1 & \text{ if }{\operatorname{Prov}}_{\mathbf{Q}}\left( {g\left( {e, n}\right) }\right) \\ 0 & \text{ otherwise. } \end{array}\right. \n\]\n\nThis would show that \( h \) is recursive if \( {\operatorname{Prov}}_{\mathrm{Q}} \) is. But \( h \) is not recursive, by Theorem 27.29, so \( {\operatorname{Prov}}_{\mathbf{Q}} \) cannot be either.
Yes
Corollary 33.30. First-order logic is undecidable.
Proof. If first-order logic were decidable, provability in \( \mathbf{Q} \) would be as well, since \( \mathbf{Q} \vdash \varphi \) iff \( \vdash \omega \rightarrow \varphi \), where \( \omega \) is the conjunction of the axioms of \( \mathbf{Q} \) .
Yes
Theorem 34.1. Q is c.e. but not decidable. In fact, it is a complete c.e. set.
Proof. It is not hard to see that \( \mathbf{Q} \) is c.e., since it is the set of (codes for) sentences \( y \) such that there is a proof \( x \) of \( y \) in \( \mathbf{Q} \) :\n\n\[ Q = \left\{ {y : \exists x{\operatorname{Prf}}_{\mathbf{Q}}\left( {x, y}\right) }\right\} \]\n\nBut we know that \( {\operatorname{Prf}}_{\mathbf{Q}}\left( {x, y}\right) \) is computable (in fact, primitive recursive), and any set that can be written in the above form is c.e.\n\nSaying that it is a complete c.e. set is equivalent to saying that \( K{ \leq }_{m}Q \) , where \( K = \left\{ {x : {\varphi }_{x}\left( x\right) \downarrow }\right\} \) . So let us show that \( K \) is reducible to \( \mathbf{Q} \) . Since Kleene’s predicate \( T\left( {e, x, s}\right) \) is primitive recursive, it is representable in \( \mathbf{Q} \), say, by \( {\varphi }_{T} \) . Then for every \( x \), we have\n\n\[ x \in K \rightarrow \exists {sT}\left( {x, x, s}\right) \]\n\n\[ \rightarrow \exists s\left( {\mathbf{Q} \vdash {\varphi }_{T}\left( {\bar{x},\bar{x},\bar{s}}\right) }\right) \]\n\n\[ \rightarrow \mathbf{Q} \vdash \exists s{\varphi }_{T}\left( {\bar{x},\bar{x}, s}\right) .\n\nConversely, if \( \mathbf{Q} \vdash \exists s{\varphi }_{T}\left( {\bar{x},\bar{x}, s}\right) \), then, in fact, for some natural number \( n \) the formula \( {\varphi }_{T}\left( {\bar{x},\bar{x},\bar{n}}\right) \) must be true. Now, if \( T\left( {x, x, n}\right) \) were false, \( \mathbf{Q} \) would prove \( \neg {\varphi }_{T}\left( {\bar{x},\bar{x},\bar{n}}\right) \), since \( {\varphi }_{T} \) represents \( T \) . But then \( \mathbf{Q} \) proves a false formula, which is a contradiction. So \( T\left( {x, x, n}\right) \) must be true, which implies \( {\varphi }_{x}\left( x\right) \downarrow \).\n\nIn short, we have that for every \( x, x \) is in \( K \) if and only if \( \mathbf{Q} \vdash \exists {sT}\left( {\bar{x},\bar{x}, s}\right) \) So the function \( f \) which takes \( x \) to (a code for) the sentence \( \exists {sT}\left( {\bar{x},\bar{x}, s}\right) \) is a reduction of \( K \) to \( \mathbf{Q} \).
Yes
Theorem 34.3. Let \( \mathbf{T} \) be any \( \omega \) -consistent theory that includes \( \mathbf{Q} \) . Then \( \mathbf{T} \) is not decidable.
Proof. If \( \mathbf{T} \) includes \( \mathbf{Q} \), then \( \mathbf{T} \) represents the computable functions and relations. We need only modify the previous proof. As above, if \( x \in K \), then \( \mathbf{T} \) proves \( \exists s{\varphi }_{T}\left( {\bar{x},\bar{x}, s}\right) \) . Conversely, suppose \( \mathbf{T} \) proves \( \exists s{\varphi }_{T}\left( {\bar{x},\bar{x}, s}\right) \) . Then \( x \) must be in \( K \) : otherwise, there is no halting computation of machine \( x \) on input \( x \) ; since \( {\varphi }_{T} \) represents Kleene’s \( T \) relation, \( \mathbf{T} \) proves \( \neg {\varphi }_{T}\left( {\bar{x},\bar{x},\overline{0}}\right) ,\neg {\varphi }_{T}\left( {\bar{x},\bar{x},\overline{1}}\right) \) , \( \ldots \), making \( \mathbf{T}\omega \) -inconsistent.
Yes
Theorem 34.5. Let \( \mathbf{T} \) be any consistent theory that includes \( \mathbf{Q} \) . Then \( \mathbf{T} \) is not decidable.
Proof. Suppose \( \mathbf{T} \) is a consistent, decidable extension of \( \mathbf{Q} \) . We will obtain a contradiction by using \( \mathbf{T} \) to define a universal computable relation.\n\nLet \( R\left( {x, y}\right) \) hold if and only if\n\n\( x \) codes a formula \( \theta \left( u\right) \), and \( \mathbf{T} \) proves \( \theta \left( \bar{y}\right) \) .\n\nSince we are assuming that \( \mathbf{T} \) is decidable, \( R \) is computable. Let us show that \( R \) is universal. If \( S\left( y\right) \) is any computable relation, then it is representable in \( \mathbf{Q} \) (and hence \( \mathbf{T} \) ) by a formula \( {\theta }_{S}\left( u\right) \) . Then for every \( n \), we have\n\n\[ S\left( \bar{n}\right) \rightarrow T \vdash {\theta }_{S}\left( \bar{n}\right) \]\n\n\[ \rightarrow \;R\left( {{}^{\# }{\theta }_{S}{\left( u\right) }^{\# }, n}\right) \]\n\nand\n\n\[ \neg S\left( \bar{n}\right) \; \rightarrow \;T \vdash \neg {\theta }_{S}\left( \bar{n}\right) \]\n\n\[ \rightarrow T \nvdash {\theta }_{S}\left( \bar{n}\right) \;\text{ (since }\mathbf{T}\text{ is consistent) }\]\n\n\[ \rightarrow \neg R\left( {{}^{\# }{\theta }_{S}{\left( u\right) }^{\# }, n}\right) \text{.} \]\n\nThat is, for every \( y, S\left( y\right) \) is true if and only if \( R\left( {{}^{\# }{\theta }_{S}{\left( u\right) }^{\# }, y}\right) \) is. So \( R \) is universal, and we have the contradiction we were looking for.
Yes
Lemma 34.7. Suppose \( \mathbf{T} \) is axiomatizable. Then \( \mathbf{T} \) is computably enumerable.
Proof. Suppose \( A \) is a computable set of axioms for \( \mathbf{T} \) . To determine if \( \varphi \in T \) , just search for a proof of \( \varphi \) from the axioms.\n\nPut slightly differently, \( \varphi \) is in \( \mathbf{T} \) if and only if there is a finite list of axioms \( {\psi }_{1},\ldots ,{\psi }_{k} \) in \( A \) and a proof of \( \left( {{\psi }_{1} \land \cdots \land {\psi }_{k}}\right) \rightarrow \varphi \) in first-order logic. But we already know that any set with a definition of the form \
No
Lemma 34.8. Suppose a theory \( \mathbf{T} \) is complete and axiomatizable. Then \( \mathbf{T} \) is decidable.
Proof. Suppose \( \mathbf{T} \) is complete and \( A \) is a computable set of axioms. If \( \mathbf{T} \) is inconsistent, it is clearly computable. (Algorithm: \
No
Theorem 34.9. There is no complete, consistent, axiomatizable extension of \( \mathbf{Q} \) .
Proof. We already know that there is no consistent, decidable extension of \( \mathbf{Q} \) . But if \( \mathbf{T} \) is complete and axiomatized, then it is decidable.
Yes
Lemma 34.10. Q and \( \overline{\mathbf{Q}} \) are computably inseparable.
Proof. Suppose \( C \) is a computable set such that \( \mathbf{Q} \subseteq C \) and \( \overline{\mathbf{Q}} \subseteq \bar{C} \) . Let \( R\left( {x, y}\right) \) be the relation\n\n\( x \) codes a formula \( \theta \left( u\right) \) and \( \theta \left( \bar{y}\right) \) is in \( C \) .\n\nWe will show that \( R\left( {x, y}\right) \) is a universal computable relation, yielding a contradiction.\n\nSuppose \( S\left( y\right) \) is computable, represented by \( {\theta }_{S}\left( u\right) \) in \( \mathbf{Q} \) . Then\n\n\[ S\left( \bar{n}\right) \rightarrow \mathbf{Q} \vdash {\theta }_{S}\left( \bar{n}\right) \]\n\n\[ \rightarrow {\theta }_{S}\left( \bar{n}\right) \in C \]\n\nand\n\n\[ \neg S\left( \bar{n}\right) \rightarrow \mathbf{Q} \vdash \neg {\theta }_{S}\left( \bar{n}\right) \]\n\n\[ \rightarrow \;{\theta }_{S}\left( \bar{n}\right) \in \overline{\mathbf{Q}} \]\n\n\[ \rightarrow \;{\theta }_{S}\left( \bar{n}\right) \notin C \]\n\nSo \( S\left( y\right) \) is equivalent to \( R\left( {\# \left( {{\theta }_{S}\left( \bar{u}\right) }\right), y}\right) \) .
Yes
Theorem 34.11. Let \( \mathbf{T} \) be any theory in the language of arithmetic that is consistent with \( \mathbf{Q} \) (i.e., \( \mathbf{T} \cup \mathbf{Q} \) is consistent). Then \( \mathbf{T} \) is undecidable.
Proof. Remember that \( \mathbf{Q} \) has a finite set of axioms, \( {Q}_{1},\ldots ,{Q}_{8} \) . We can even replace these by a single axiom, \( \alpha = {Q}_{1} \land \cdots \land {Q}_{8} \) . Suppose \( \mathbf{T} \) is a decidable theory consistent with \( \mathbf{Q} \) . Let \[ C = \{ \varphi : \mathbf{T} \vdash \alpha \rightarrow \varphi \} \] We show that \( C \) would be a computable separation of \( \mathbf{Q} \) and \( \overline{\mathbf{Q}} \), a contradiction. First, if \( \varphi \) is in \( \mathbf{Q} \), then \( \varphi \) is provable from the axioms of \( \mathbf{Q} \) ; by the deduction theorem, there is a proof of \( \alpha \rightarrow \varphi \) in first-order logic. So \( \varphi \) is in \( C \) . On the other hand, if \( \varphi \) is in \( \overline{\mathbf{Q}} \), then there is a proof of \( \alpha \rightarrow \neg \varphi \) in first-order logic. If \( \mathbf{T} \) also proves \( \alpha \rightarrow \varphi \), then \( \mathbf{T} \) proves \( \neg \alpha \), in which case \( \mathbf{T} \cup \mathbf{Q} \) is inconsistent. But we are assuming \( \mathbf{T} \cup \mathbf{Q} \) is consistent, so \( \mathbf{T} \) does not prove \( \alpha \rightarrow \varphi \), and so \( \varphi \) is not in \( C \) . We’ve shown that if \( \varphi \) is in \( \mathbf{Q} \), then it is in \( C \), and if \( \varphi \) is in \( \overline{\mathbf{Q}} \), then it is in \( \bar{C} \) . So \( C \) is a computable separation, which is the contradiction we were looking for.
Yes
Corollary 34.12. First-order logic for the language of arithmetic (that is, the set \( \{ \varphi \) : \( \varphi \) is provable in first-order logic \( \} \) ) is undecidable.
Proof. First-order logic is the set of consequences of \( \varnothing \), which is consistent with \( \mathbf{Q} \) .
No
Theorem 34.13. Suppose \( \mathbf{T} \) is a theory in a language in which one can interpret the language of arithmetic, in such a way that \( \mathbf{T} \) is consistent with the interpretation of \( \mathbf{Q} \). Then \( \mathbf{T} \) is undecidable. If \( \mathbf{T} \) proves the interpretation of the axioms of \( \mathbf{Q} \), then no consistent extension of \( \mathbf{T} \) is decidable.
The proof is just a small modification of the proof of the last theorem; one could use a counterexample to get a separation of \( \mathbf{Q} \) and \( \overline{\mathbf{Q}} \). One can take \( \mathbf{{ZFC}} \), Zermelo-Fraenkel set theory with the axiom of choice, to be an axiomatic foundation that is powerful enough to carry out a good deal of ordinary mathematics. In ZFC one can define the natural numbers, and via this interpretation, the axioms of \( \mathbf{Q} \) are true. So we have
No
First-order logic for any language with a binary relation symbol is undecidable.
This result extends to any language with two unary function symbols, since one can use these to simulate a binary relation symbol. The results just cited are tight: it turns out that first-order logic for a language with only unary relation symbols and at most one unary function symbol is decidable.
No
Lemma 35.1. Let \( \mathbf{T} \) be any theory extending \( \mathbf{Q} \), and let \( \psi \left( x\right) \) be any formula with only the variable \( x \) free. Then there is a sentence \( \varphi \) such that \( \mathbf{T} \vdash \varphi \leftrightarrow \psi \left( {\ulcorner \varphi \urcorner }\right) \) .
The lemma asserts that given any property \( \psi \left( x\right) \), there is a sentence \( \varphi \) that asserts \
No
Lemma 35.2. Let \( \psi \left( x\right) \) be any formula with one free variable \( x \) . Then there is a sentence \( \varphi \) such that \( \mathbf{Q} \vdash \varphi \leftrightarrow \psi \left( {\ulcorner \varphi \urcorner }\right) \) .
Proof. Given \( \psi \left( x\right) \), let \( \alpha \left( x\right) \) be the formula \( \exists y\left( {{\theta }_{\text{diag }}\left( {x, y}\right) \land \psi \left( y\right) }\right) \) and let \( \varphi \) be its diagonalization, i.e., the formula \( \alpha \left( {\ulcorner \alpha \left( x\right) \urcorner }\right) \).\n\nSince \( {\theta }_{\text{diag }} \) represents diag, and \( \operatorname{diag}\left( {{}^{\# }\alpha {\left( x\right) }^{\# }}\right) = {}^{\# }{\varphi }^{\# },\mathbf{Q} \) can derive\n\n\[{\theta }_{\text{diag }}\left( {\ulcorner \alpha \left( x\right) \urcorner ,\ulcorner \varphi \urcorner }\right)\]\n\n(35.1)\n\n\[ \forall y\left( {{\theta }_{\text{diag }}\left( {\ulcorner \alpha \left( x\right) \urcorner, y}\right) \rightarrow y = \ulcorner \varphi \urcorner }\right) . \]\n\n(35.2)\n\nNow we show that \( \mathbf{Q} \vdash \varphi \leftrightarrow \psi \left( {\ulcorner \varphi \urcorner }\right) \) . We argue informally, using just logic and facts derivable in \( \mathbf{Q} \).\n\nFirst, suppose \( \varphi \), i.e., \( \alpha \left( {\ulcorner \alpha \left( x\right) \urcorner }\right) \) . Going back to the definition of \( \alpha \left( x\right) \), we see that \( \alpha \left( {\ulcorner \alpha \left( x\right) \urcorner }\right) \) just is\n\n\[ \exists y\left( {{\theta }_{\text{diag }}\left( {\ulcorner \alpha \left( x\right) \urcorner, y}\right) \land \psi \left( y\right) }\right) . \]\n\nConsider such a \( y \) . Since \( {\theta }_{\text{diag }}\left( {\ulcorner \alpha \left( x\right) \urcorner, y}\right) \), by eq. (35.2), \( y = \ulcorner \varphi \urcorner \) . So, from \( \psi \left( y\right) \) we have \( \psi \left( {\ulcorner \varphi \urcorner }\right) \).\n\nNow suppose \( \psi \left( {\ulcorner \varphi \urcorner }\right) \) . By eq. (35.1), we have \( {\theta }_{\text{diag }}\left( {\ulcorner \alpha \left( x\right) \urcorner ,\ulcorner \varphi \urcorner }\right) \land \psi \left( {\ulcorner \varphi \urcorner }\right) \) . It follows that \( \exists y\left( {{\theta }_{\text{diag }}\left( {\ulcorner \alpha \left( x\right) \urcorner, y}\right) \land \psi \left( y\right) }\right) \) . But that’s just \( \alpha \left( {\ulcorner \alpha \urcorner }\right) \), i.e., \( \varphi \) .
Yes
Lemma 35.3. If \( \mathbf{T} \) is a consistent, axiomatizable theory extending \( \mathbf{Q} \), then \( \mathbf{T} \nvdash {\gamma }_{\mathbf{T}} \) .
Proof. Suppose \( \mathbf{T} \) derives \( {\gamma }_{\mathbf{T}} \) . Then there is a derivation, and so, for some number \( m \), the relation \( {\operatorname{Prf}}_{T}\left( {m,{}^{\# }{\gamma }_{\mathrm{T}}{}^{\# }}\right) \) holds. But then \( \mathbf{Q} \) derives the sentence \( \mathop{\operatorname{Prf}}\limits_{T}\left( {\overline{m},\ulcorner {\gamma }_{\mathbf{T}}\urcorner }\right) \) . So \( \mathbf{Q} \) derives \( \exists x\mathop{\operatorname{Prf}}\limits_{T}\left( {x,\ulcorner {\gamma }_{\mathbf{T}}\urcorner }\right) \), which is, by definition, \( \mathop{\operatorname{Prov}}\limits_{T}\left( {\ulcorner {\gamma }_{\mathbf{T}}\urcorner }\right) \) . By eq. (35.3), \( \mathbf{Q} \) derives \( \neg {\gamma }_{\mathbf{T}} \), and since \( \mathbf{T} \) extends \( \mathbf{Q} \), so does \( \mathbf{T} \) . We have shown that if \( \mathbf{T} \) derives \( {\gamma }_{\mathbf{T}} \), then it also derives \( \neg {\gamma }_{\mathbf{T}} \), and hence it would be inconsistent.
Yes
Lemma 35.5. If \( \mathbf{T} \) is an \( \omega \) -consistent, axiomatizable theory extending \( \mathbf{Q} \), then \( \mathbf{T} \nvdash \) \( \neg {\gamma }_{\mathrm{T}} \) .
Proof. We show that if \( \mathbf{T} \) derives \( \neg {\gamma }_{\mathbf{T}} \), then it is \( \omega \) -inconsistent. Suppose \( \mathbf{T} \) derives \( \neg {\gamma }_{\mathrm{T}} \) . If \( \mathbf{T} \) is inconsistent, it is \( \omega \) -inconsistent, and we are done. Otherwise, \( \mathbf{T} \) is consistent, so it does not derive \( {\gamma }_{\mathbf{T}} \) by Lemma 35.3. Since there is no derivation of \( {\gamma }_{\mathrm{T}} \) in \( \mathbf{T},\mathbf{Q} \) derives\n\n\[ \neg {\operatorname{Prf}}_{T}\left( {\overline{0},\ulcorner {\gamma }_{\mathbf{T}}\urcorner }\right) ,\neg {\operatorname{Prf}}_{T}\left( {\overline{1},\ulcorner {\gamma }_{\mathbf{T}}\urcorner }\right) ,\neg {\operatorname{Prf}}_{T}\left( {\overline{2},\ulcorner {\gamma }_{\mathbf{T}}\urcorner }\right) ,\ldots \]\n\nand so does T. On the other hand, by eq. (35.3), \( \neg {\gamma }_{\mathbf{T}} \) is equivalent to \( \exists x{\operatorname{Prf}}_{T}\left( {x,\ulcorner {\gamma }_{\mathbf{T}}\urcorner }\right) \) . So \( \mathbf{T} \) is \( \omega \) -inconsistent.
Yes
Theorem 35.6. Let \( \mathbf{T} \) be any \( \omega \) -consistent, axiomatizable theory extending \( \mathbf{Q} \) . Then \( \mathbf{T} \) is not complete.
Proof. If \( \mathbf{T} \) is \( \omega \) -consistent, it is consistent, so \( \mathbf{T} \nvdash {\gamma }_{\mathbf{T}} \) by Lemma 35.3. By Lemma 35.5, \( \mathbf{T} \nvdash \neg {\gamma }_{\mathbf{T}} \) . This means that \( \mathbf{T} \) is incomplete, since it derives neither \( {\gamma }_{\mathrm{T}} \) nor \( \neg {\gamma }_{\mathrm{T}} \).
Yes
Theorem 35.7. Let \( \mathbf{T} \) be any consistent, axiomatizable theory extending \( \mathbf{Q} \) . Then \( \mathbf{T} \) is not complete.
Proof. Recall that \( {\operatorname{Prov}}_{T}\left( y\right) \) is defined as \( \exists x{\operatorname{Prf}}_{T}\left( {x, y}\right) \), where \( {\operatorname{Prf}}_{T}\left( {x, y}\right) \) represents the decidable relation which holds iff \( x \) is the Gödel number of a derivation of the sentence with Gödel number \( y \) . The relation that holds between \( x \) and \( y \) if \( x \) is the Gödel number of a refutation of the sentence with Gödel number \( y \) is also decidable. Let \( \operatorname{not}\left( x\right) \) be the primitive recursive function which does the following: if \( x \) is the code of a formula \( \varphi \), not \( \left( x\right) \) is a code of \( \neg \varphi \) . Then \( {\operatorname{Ref}}_{T}\left( {x, y}\right) \) holds iff \( {\operatorname{Prf}}_{T}\left( {x,\operatorname{not}\left( y\right) }\right) \) . Let \( {\operatorname{Ref}}_{T}\left( {x, y}\right) \) represent it. Then, if \( \mathbf{T} \vdash \neg \varphi \) and \( \delta \) is a corresponding derivation, \( \mathbf{Q} \vdash {\operatorname{Ref}}_{T}\left( {\ulcorner \delta \urcorner ,\ulcorner \varphi \urcorner }\right) \) . We define \( {\operatorname{RProv}}_{T}\left( y\right) \) as\n\n\[ \exists x\left( {{\operatorname{Prf}}_{T}\left( {x, y}\right) \land \forall z\left( {z < x \rightarrow \neg {\operatorname{Ref}}_{T}\left( {z, y}\right) }\right) }\right) . \]\n\nRoughly, \( {\operatorname{RProv}}_{T}\left( y\right) \) says \
Yes
Theorem 35.8. Assuming PA is consistent, then PA does not derive \( {\operatorname{Con}}_{\mathrm{{PA}}} \) .
It is informative to read Gödel's sketch of an argument, since the theorem follows like a good punch line. It goes like this. Let \( {\gamma }_{\mathrm{{PA}}} \) be the Gödel sentence that we constructed in the proof of Theorem 35.6. We have shown \
No
Theorem 35.10. Let \( \mathbf{T} \) be an axiomatizable theory extending \( \mathbf{Q} \), and suppose \( {\operatorname{Prov}}_{T}\left( y\right) \) is a formula satisfying conditions P1-P3 from section 35.7. If \( \mathbf{T} \) derives \( {\operatorname{Prov}}_{T}\left( {\ulcorner \varphi \urcorner }\right) \rightarrow \) \( \varphi \), then in fact \( \mathbf{T} \) derives \( \varphi \) .
Proof of Theorem 35.10. Suppose \( \varphi \) is a sentence such that \( \mathbf{T} \) derives \( {\operatorname{Prov}}_{T}\left( {\ulcorner \varphi \urcorner }\right) \rightarrow \) \( \varphi \) . Let \( \psi \left( y\right) \) be the formula \( {\operatorname{Prov}}_{T}\left( y\right) \rightarrow \varphi \), and use the fixed-point lemma to find a sentence \( \theta \) such that \( \mathbf{T} \) derives \( \theta \leftrightarrow \psi \left( {\ulcorner \theta \urcorner }\right) \) . Then each of the following\n\n## 35.8. LÖB’S THEOREM\n\nis derivable in \( \mathbf{T} \) :\n\n\[ \theta \leftrightarrow \left( {{\operatorname{Prov}}_{T}\left( {\ulcorner \theta \urcorner }\right) \rightarrow \varphi }\right) \]\n\n(35.14)\n\n\( \theta \) is a fixed point of \( \psi \left( y\right) \)\n\n\[ \theta \rightarrow \left( {{\operatorname{Prov}}_{T}\left( {\ulcorner \theta \urcorner }\right) \rightarrow \varphi }\right) \]\n\n(35.15)\n\nfrom eq. (35.14)\n\n\[ {\operatorname{Prov}}_{T}\left( {\ulcorner \theta \rightarrow {\left( {\operatorname{Prov}}_{T}\left( \ulcorner \theta \urcorner \rightarrow \varphi \right) \urcorner \right) }^{\urcorner }}\right) \]\n\n(35.16)\n\nfrom eq. (35.15) by condition P1\n\n\[ {\operatorname{Prov}}_{T}\left( {\ulcorner \theta \urcorner }\right) \rightarrow {\operatorname{Prov}}_{T}\left( {\ulcorner {\operatorname{Prov}}_{T}\left( {\ulcorner \theta \urcorner }\right) \rightarrow \varphi \urcorner }\right) \]\n\n(35.17)\n\n\[ \text{from eq. (35.16) using condition P2} \]\n\n\[ {\operatorname{Prov}}_{T}\left( {\ulcorner \theta \urcorner }\right) \rightarrow \left( {{\operatorname{Prov}}_{T}\left( {\ulcorner {\operatorname{Prov}}_{T}\left( {\ulcorner \theta \urcorner }\right) \urcorner }\right) \rightarrow {\operatorname{Prov}}_{T}\left( {\ulcorner \varphi \urcorner }\right) }\right) \]\n\n(35.18)\n\n\[ \text{from eq. (35.17) using P2 again} \]\n\n\[ {\operatorname{Prov}}_{T}\left( {\ulcorner \theta \urcorner }\right) \rightarrow {\operatorname{Prov}}_{T}\left( {\ulcorner {\operatorname{Prov}}_{T}\left( {\ulcorner \theta \urcorner }\right) \urcorner }\right) \]\n\n(35.19)\n\nby derivability condition P3
Yes
Lemma 35.12. Every computable relation is definable in \( \mathfrak{N} \) .
Proof. It is easy to check that the formula representing a relation in \( \mathbf{Q} \) defines the same relation in \( \mathfrak{N} \) .
No
Lemma 35.13. The halting relation is definable in \( \mathfrak{N} \) .
Proof. Let \( H \) be the halting relation, i.e.,\n\n\[ H = \{ \langle e, x\rangle : \exists {sT}\left( {e, x, s}\right) \} . \]\n\nLet \( {\theta }_{T} \) define \( T \) in \( \mathfrak{N} \) . Then\n\n\[ H = \left\{ {\langle e, x\rangle : \mathfrak{N} \vDash \exists s{\theta }_{T}\left( {\bar{e},\bar{x}, s}\right) }\right\} \]\n\nso \( \exists s{\theta }_{T}\left( {z, x, s}\right) \) defines \( H \) in \( \mathfrak{N} \) .
Yes
The set of true sentences of arithmetic is not definable in arithmetic.
Proof. Suppose \( \theta \left( x\right) \) defined it, i.e., \( \mathfrak{N} \vDash \varphi \) iff \( \mathfrak{N} \vDash \theta \left( {\ulcorner \varphi \urcorner }\right) \) . By the fixed-point lemma, there is a formula \( \varphi \) such that \( \mathbf{Q} \vdash \varphi \leftrightarrow \neg \theta \left( {\ulcorner \varphi \urcorner }\right) \), and hence \( \mathfrak{N} \vDash \varphi \leftrightarrow \) \( \neg \theta \left( {\ulcorner \varphi \urcorner }\right) \) . But then \( \mathfrak{N} \vDash \varphi \) if and only if \( \mathfrak{N} \vDash \neg \theta \left( {\ulcorner \varphi \urcorner }\right) \), which contradicts the fact that \( \theta \left( y\right) \) is supposed to define the set of true statements of arithmetic. \( ▱ \)
Yes
Consider the formula \( \forall z\left( {X\left( z\right) \leftrightarrow \neg Y\left( z\right) }\right) \). It contains no second-order quantifiers, but does contain the second-order variables \( X \) and \( Y \) (here understood to be one-place).
\( \mathfrak{M}, s \vDash \forall z\left( {X\left( z\right) \leftrightarrow \neg Y\left( z\right) }\right) \) whenever the elements of \( s\left( X\right) \) are not elements of \( s\left( Y\right) \), and vice versa, i.e., iff \( s\left( Y\right) = \left| \mathfrak{M}\right| \smallsetminus s\left( X\right) \). So for instance, take \( \left| \mathfrak{M}\right| = \{ 1,2,3\} \). Since no predicate symbols, function symbols, or constant symbols are involved, the domain of \( \mathfrak{M} \) is all that is relevant. Now for \( {s}_{1}\left( X\right) = \{ 1,2\} \) and \( {s}_{1}\left( Y\right) = \{ 3\} \), we have \( \mathfrak{M},{s}_{1} \vDash \forall z\left( {X\left( z\right) \leftrightarrow \neg Y\left( z\right) }\right) \). By contrast, if we have \( {s}_{2}\left( X\right) = \{ 1,2\} \) and \( {s}_{2}\left( Y\right) = \{ 2,3\} ,\mathfrak{M},{s}_{2} \mathrel{\text{\vDash \not{} }} \forall z(X\left( z\right) \leftrightarrow \neg Y\left( z\right) ) \). That’s because there is a \( z \) -variant \( {s}_{2}^{\prime } \) of \( {s}_{2} \) with \( {s}_{2}^{\prime }\left( z\right) = 2 \) where \( \mathfrak{M},{s}_{2}^{\prime } \vDash X\left( z\right) \) (since \( 2 \in {s}_{2}^{\prime }\left( X\right) \) ) but \( \mathfrak{M},{s}_{2}^{\prime } \mathrel{\text{\vDash \not{} }} \neg Y\left( \bar{z}\right) \) (since also \( {s}_{2}^{\prime }\left( z\right) \in {s}_{2}^{\prime }\left( Y\right) \)).
Yes
Example 36.8. \( \mathfrak{M}, s \vDash \exists Y\left( {\exists {yY}\left( y\right) \land \forall z\left( {X\left( z\right) \leftrightarrow \neg Y\left( z\right) }\right) }\right) \) if there is an \( {s}^{\prime }{ \sim }_{Y} \) \( s \) such that \( \mathfrak{M},{s}^{\prime } \vDash \left( {\exists {yY}\left( y\right) \land \forall z\left( {X\left( z\right) \leftrightarrow \neg Y\left( z\right) }\right) }\right) \) .
And that is the case iff \( {s}^{\prime }\left( Y\right) \neq \varnothing \) (so that \( \mathfrak{M},{s}^{\prime } \vDash \exists {yY}\left( y\right) \) ) and, as in the previous example, \( {s}^{\prime }\left( Y\right) = \) \( \left| \mathfrak{M}\right| \backslash {s}^{\prime }\left( X\right) .\; \) In other words \( ,\mathfrak{M}, s \vDash \exists Y\left( {\exists y\;Y\left( y\right) \land \forall z\left( {X\left( z\right) \leftrightarrow \neg Y\left( z\right) }\right) }\right) \; \) iff \( \;\left| \mathfrak{M}\right| \backslash \) \( s\left( X\right) \) is non-empty, i.e., \( s\left( X\right) \neq \left| \mathfrak{M}\right| \) . So, the formula is satisfied, e.g., if \( \left| \mathfrak{M}\right| = \) \( \{ 1,2,3\} \) and \( s\left( X\right) = \{ 1,2\} \), but not if \( s\left( X\right) = \{ 1,2,3\} = \left| \mathfrak{M}\right| \) .
Yes
In first-order logic we can define the identity relation \( {\operatorname{Id}}_{\left| \mathfrak{M}\right| } \) (i.e., \( \{ \langle a, a\rangle : a \in \left| \mathfrak{M}\right| \} \) ) by the formula \( x = y \) . In second-order logic, we can define this relation without \( = \) .
For if \( a \) and \( b \) are the same element of \( \left| \mathfrak{M}\right| \), then they are elements of the same subsets of \( \left| \mathfrak{M}\right| \) (since sets are determined by their elements). Conversely, if \( a \) and \( b \) are different, then they are not elements of the same subsets: e.g., \( a \in \{ a\} \) but \( b \notin \{ a\} \) if \( a \neq b \) . So \
Yes
If \( R \) is a two-place predicate symbol, \( {R}^{\mathfrak{M}} \) is a two-place relation on \( \left| \mathfrak{M}\right| \) . Perhaps somewhat confusingly, we’ll use \( R \) as the predicate symbol for \( R \) and for the relation \( {R}^{\mathfrak{M}} \) itself. The transitive closure \( {R}^{ * } \) of \( R \) is the relation that holds between \( a \) and \( b \) iff for some \( {c}_{1},\ldots ,{c}_{k}, R\left( {a,{c}_{1}}\right), R\left( {{c}_{1},{c}_{2}}\right) \) , \( \ldots, R\left( {{c}_{k}, b}\right) \) holds. This includes the case if \( k = 0 \), i.e., if \( R\left( {a, b}\right) \) holds, so does \( {R}^{ * }\left( {a, b}\right) \) . This means that \( R \subseteq {R}^{ * } \) . In fact, \( {R}^{ * } \) is the smallest relation that includes \( R \) and that is transitive. We can say in second-order logic that \( X \) is a transitive relation that includes \( R \) :
\[ {\psi }_{R}\left( X\right) \equiv \forall x\forall y\left( {R\left( {x, y}\right) \rightarrow X\left( {x, y}\right) }\right) \land \forall x\forall y\forall z\left( {\left( {X\left( {x, y}\right) \land X\left( {y, z}\right) }\right) \rightarrow X\left( {x, z}\right) }\right) . \] The first conjunct says that \( R \subseteq X \) and the second that \( X \) is transitive. To say that \( X \) is the smallest such relation is to say that it is itself included in every relation that includes \( R \) and is transitive. So we can define the transitive closure of \( R \) by the formula \[ {R}^{ * }\left( X\right) \equiv {\psi }_{R}\left( X\right) \land \forall Y\left( {{\psi }_{R}\left( Y\right) \rightarrow \forall x\forall y\left( {X\left( {x, y}\right) \rightarrow Y\left( {x, y}\right) }\right) }\right) . \] We have \( \mathfrak{M}, s \vDash {R}^{ * }\left( X\right) \) iff \( s\left( X\right) = {R}^{ * } \) . The transitive closure of \( R \) cannot be expressed in first-order logic.
Yes
Proposition 36.15. \( \mathfrak{M} \vDash \operatorname{Inf} \) iff \( \left| \mathfrak{M}\right| \) is infinite.
Proof. \( \mathfrak{M} \vDash \) Inf iff \( \mathfrak{M}, s \vDash \forall x\forall y\left( {u\left( x\right) = u\left( y\right) \rightarrow x = y}\right) \land \exists y\forall {xy} \neq u\left( x\right) \) for some \( s \) . If it does, \( s\left( u\right) \) is an injective function, and some \( y \in \left| \mathfrak{M}\right| \) is not in the domain of \( s\left( u\right) \) . Conversely, if there is an injective \( f : \left| \mathfrak{M}\right| \rightarrow \left| \mathfrak{M}\right| \) with \( \operatorname{dom}\left( f\right) \neq \left| \mathfrak{M}\right| \), then \( s\left( u\right) = f \) is such a variable assignment.
Yes
Proposition 36.16. \( \mathfrak{M} \vDash \) Count iff \( \left| \mathfrak{M}\right| \) is enumerable.
Proof. Suppose \( \left| \mathfrak{M}\right| \) is enumerable, and let \( {m}_{0},{m}_{1},\ldots \), be an enumeration. By removing repetions we can guarantee that no \( {m}_{k} \) appears twice. Define \( f\left( {m}_{k}\right) = {m}_{k + 1} \) and let \( s\left( z\right) = {m}_{0} \) and \( s\left( u\right) = f \) . We show that\n\n\[ \mathfrak{M}, s \vDash \forall X\left( {\left( {X\left( z\right) \land \forall x\left( {X\left( x\right) \rightarrow X\left( {u\left( x\right) }\right) }\right) }\right) \rightarrow \forall {xX}\left( x\right) }\right) \]\n\nSuppose \( {s}^{\prime }{ \sim }_{X}s \) is arbitrary, and let \( M = {s}^{\prime }\left( X\right) \) . Suppose further that \( \mathfrak{M},{s}^{\prime } \vDash \) \( \left( {X\left( z\right) \land \forall x\left( {X\left( x\right) \rightarrow X\left( {u\left( x\right) }\right) }\right) }\right) \) . Then \( {s}^{\prime }\left( z\right) \in M \) and whenever \( x \in M \), also \( {s}^{\prime }\left( u\right) \left( x\right) \in M \) . In other words, since \( {s}^{\prime }{ \sim }_{X}s,{m}_{0} \in M \) and if \( x \in M \) then \( f\left( x\right) \in M \), so \( {m}_{0} \in M,{m}_{1} = f\left( {m}_{0}\right) \in M,{m}_{2} = f\left( {f\left( {m}_{0}\right) }\right) \in M \), etc. Thus,\n\n\( M = \left| \mathfrak{M}\right| \), and so \( \mathfrak{M},{s}^{\prime } \vDash \forall {xX}\left( x\right) \) . Since \( {s}^{\prime } \) was an arbitrary \( X \) -variant of \( s \), we are done: \( \mathfrak{M} \vDash \) Count.\n\nNow assume that \( \mathfrak{M} \vDash \) Count, i.e.,\n\n\[ \mathfrak{M}, s \vDash \forall X\left( {\left( {X\left( z\right) \land \forall x\left( {X\left( x\right) \rightarrow X\left( {u\left( x\right) }\right) }\right) }\right) \rightarrow \forall {xX}\left( x\right) }\right) \]\n\nfor some \( s \) . Let \( m = s\left( z\right) \) and \( f = s\left( u\right) \) and consider \( M = \{ m, f\left( m\right), f\left( {f\left( m\right) }\right) ,\ldots \} \) . Let \( {s}^{\prime } \) be the \( X \) -variant of \( s \) with \( s\left( X\right) = M \) . Then\n\n\[ \mathfrak{M},{s}^{\prime } \vDash \left( {X\left( z\right) \land \forall x\left( {X\left( x\right) \rightarrow X\left( {u\left( x\right) }\right) }\right) }\right) \rightarrow \forall {xX}\left( x\right) \]\n\nby assumption. Also, \( \mathfrak{M},{s}^{\prime } \vDash X\left( z\right) \) since \( {s}^{\prime }\left( X\right) = M \ni m = {s}^{\prime }\left( z\right) \), and also \( \mathfrak{M},{s}^{\prime } \vDash \forall x\left( {X\left( x\right) \rightarrow X\left( {u\left( x\right) }\right) }\right) \) since whenever \( x \in M \) also \( f\left( x\right) \in M \) . So, since both antecedent and conditional are satisfied, the consequent must also be: \( \mathfrak{M},{s}^{\prime } \vDash \forall {xX}\left( x\right) \) . But that means that \( M = \left| \mathfrak{M}\right| \), and so \( \left| \mathfrak{M}\right| \) is enumerable since \( M \) is, by definition.
Yes
Theorem 37.1. If \( \mathfrak{M} \vDash {\mathbf{{PA}}}^{2} \) then \( \left| \mathfrak{M}\right| = \left\{ {{\operatorname{Val}}^{\mathfrak{M}}\left( \bar{n}\right) : n \in \mathbb{N}}\right\} \) .
Proof. Let \( N = \left\{ {{\operatorname{Val}}^{\mathfrak{M}}\left( \bar{n}\right) : n \in \mathbb{N}}\right\} \), and suppose \( \mathfrak{M} \vDash {\mathbf{{PA}}}^{2} \) . Of course, for any \( n \in \mathbb{N},{\operatorname{Val}}^{\mathfrak{M}}\left( \bar{n}\right) \in \left| \mathfrak{M}\right| \), so \( N \subseteq \left| \mathfrak{M}\right| \) .\n\nNow for inclusion in the other direction. Consider a variable assignment \( s \) with \( s\left( X\right) = N \) . By assumption,\n\n\[ \mathfrak{M} \vDash \forall X\left( {X\left( \mathrm{o}\right) \land \forall x\left( {X\left( x\right) \rightarrow X\left( {x}^{\prime }\right) }\right) }\right) \rightarrow \forall {xX}\left( x\right) \text{, thus} \]\n\n\[ \mathfrak{M}, s \vDash \left( {X\left( 0\right) \land \forall x\left( {X\left( x\right) \rightarrow X\left( {x}^{\prime }\right) }\right) }\right) \rightarrow \forall {xX}\left( x\right) . \]\n\nConsider the antecedent of this conditional. \( {\operatorname{Val}}^{\mathfrak{M}}\left( 0\right) \in N \), and so \( \mathfrak{M}, s \vDash \) \( X\left( 0\right) \) . The second conjunct, \( \forall x\left( {X\left( x\right) \rightarrow X\left( {x}^{\prime }\right) }\right) \) is also satisfied. For suppose \( x \in N \) . By definition of \( N, x = {\operatorname{Val}}^{\mathfrak{M}}\left( \bar{n}\right) \) for some \( n \) . That gives \( {\prime }^{\mathfrak{M}}\left( x\right) = \) \( {\operatorname{Val}}^{\mathfrak{M}}\left( \overline{n + 1}\right) \in N \) . So, \( {\prime }^{\mathfrak{M}}\left( x\right) \in N \) .\n\nWe have that \( \mathfrak{M}, s \vDash X\left( \mathrm{o}\right) \land \forall x\left( {X\left( x\right) \rightarrow X\left( {x}^{\prime }\right) }\right) \) . Consequently, \( \mathfrak{M}, s \vDash \) \( \forall {xX}\left( x\right) \) . But that means that for every \( x \in \left| \mathfrak{M}\right| \) we have \( x \in s\left( X\right) = N \) . So, \( \left| \mathfrak{M}\right| \subseteq N \) .
Yes
Corollary 37.2. Any two models of \( {\mathbf{{PA}}}^{2} \) are isomorphic.
Proof. By Theorem 37.1, the domain of any model of \( {\mathbf{{PA}}}^{2} \) is exhausted by \( {\operatorname{Val}}^{\mathfrak{M}}\left( \bar{n}\right) \). Any such model is also a model of \( \mathbf{Q} \). By Proposition 24.3, any such model is standard, i.e., isomorphic to \( \mathfrak{N} \).
Yes
Proposition 37.3. Let \( {\mathbf{{PA}}}^{2 + } \) be the second-order theory containing the first two arithmetical axioms (the successor axioms) and the second-order induction axiom. Then \( \leq , + \), and \( \times \) are definable in \( {\mathbf{{PA}}}^{2 + } \) .
Proof. To show that \( \leq \) is definable, we have to find a formula \( {\varphi }_{ \leq }\left( {x, y}\right) \) such that \( \mathfrak{N} \vDash {\varphi }_{ \leq }\left( {\bar{n},\bar{m}}\right) \) iff \( n \leq m \) . Consider the formula\n\n\[ \psi \left( {x, Y}\right) \equiv Y\left( x\right) \land \forall y\left( {Y\left( y\right) \rightarrow Y\left( {y}^{\prime }\right) }\right) \]\n\nClearly, \( \psi \left( {\bar{n}, Y}\right) \) is satisfied by a set \( Y \subseteq \mathbb{N} \) iff \( \{ m : n \leq m\} \subseteq Y \), so we can take \( {\varphi }_{ \leq }\left( {x, y}\right) \equiv \forall Y\left( {\psi \left( {x, Y}\right) \rightarrow Y\left( y\right) }\right) \) .
Yes
Corollary 37.4. \( \mathfrak{M} \vDash {\mathbf{{PA}}}^{2} \) iff \( \mathfrak{M} \vDash {\mathbf{{PA}}}^{2 + } \) .
Proof. Immediate from Proposition 37.3.
No
Theorem 37.5. Second-order logic is undecidable.
Proof. A first-order sentence is valid in first-order logic iff it is valid in second-order logic, and first-order logic is undecidable.
Yes
Theorem 37.6. There is no sound and complete proof system for second-order logic.
Proof. Let \( \varphi \) be a sentence in the language of arithmetic. \( \mathfrak{N} \vDash \varphi \) iff \( {\mathbf{{PA}}}^{2} \vDash \varphi \) . Let \( P \) be the conjunction of the nine axioms of \( {\mathbf{{PA}}}^{2}.{\mathbf{{PA}}}^{2} \vDash \varphi \) iff \( \vDash P \rightarrow \varphi \), i.e., \( \mathfrak{M} \vDash P \rightarrow \varphi \) . Now consider the sentence \( \forall z\forall u\forall {u}^{\prime }\forall {u}^{\prime \prime }\forall L\left( {{P}^{\prime } \rightarrow {\varphi }^{\prime }}\right) \) resulting by replacing o by \( z,1 \) by the one-place function variable \( u, + \) and \( \times \) by the two-place function-variables \( {u}^{\prime } \) and \( {u}^{\prime \prime } \), respectively, and \( < \) by the two-place relation variable \( L \) and universally quantifying. It is a valid sentence of pure second-order logic iff the original sentence was valid iff \( {\mathbf{{PA}}}^{2} \vDash \varphi \) iff \( \mathfrak{N} \vDash \varphi \) . Thus if there were a sound and complete proof system for second-order logic, we could use it to define a computable enumeration \( f : \mathbb{N} \rightarrow \operatorname{Sent}\left( {\mathcal{L}}_{A}\right) \) of the sentences true in \( \mathfrak{N} \) . This function would be representable in \( \mathbf{Q} \) by some first-order formula \( {\psi }_{f}\left( {x, y}\right) \) . Then the formula \( \exists x{\psi }_{f}\left( {x, y}\right) \) would define the set of true first-order sentences of \( \mathfrak{N} \), contradicting Tarski’s Theorem.
Yes
Theorem 37.7. Second-order logic is not compact.
Proof. Recall that\n\n\[ \text{Inf} \equiv \exists u\left( {\forall x\forall y\left( {u\left( x\right) = u\left( y\right) \rightarrow x = y}\right) \land \exists y\forall {xy} \neq u\left( x\right) }\right) \]\n\nis satisfied in a structure iff its domain is infinite. Let \( {\varphi }^{ \geq n} \) be a sentence that asserts that the domain has at least \( n \) elements, e.g.,\n\n\[ {\varphi }^{ \geq n} \equiv \exists {x}_{1}\ldots \exists {x}_{n}\left( {{x}_{1} \neq {x}_{2} \land {x}_{1} \neq {x}_{3} \land \cdots \land {x}_{n - 1} \neq {x}_{n}}\right) .\n\nConsider the set of sentences\n\n\[ \Gamma = \left\{ {\neg \operatorname{Inf},{\varphi }^{ \geq 1},{\varphi }^{ \geq 2},{\varphi }^{ \geq 3},\ldots }\right\} .\n\nIt is finitely satisfiable, since for any finite subset \( {\Gamma }_{0} \subseteq \Gamma \) there is some \( k \) so that \( {\varphi }^{ \geq k} \in \Gamma \) but no \( {\varphi }^{ \geq n} \in \Gamma \) for \( n > k \) . If \( \left| \mathfrak{M}\right| \) has \( k \) elements, \( \mathfrak{M} \vDash {\Gamma }_{0} \) . But, \( \Gamma \) is not satisfiable: if \( \mathfrak{M} \vDash \neg \operatorname{Inf},\left| \mathfrak{M}\right| \) must be finite, say, of size \( k \) . Then \( \mathfrak{M} \mathrel{\text{\vDash \not{} }} {\varphi }^{ \geq k + 1} \) .
Yes
Theorem 37.8. The Löwenheim-Skolem Theorem fails for second-order logic: There are sentences with infinite models but no enumerable models.
Proof. Recall that\n\n\[ \text{Count} \equiv \exists z\exists u\forall X\left( {\left( {X\left( z\right) \land \forall x\left( {X\left( x\right) \rightarrow X\left( {u\left( x\right) }\right) }\right) }\right) \rightarrow \forall {xX}\left( x\right) }\right) \]\n\nis true in a structure \( \mathfrak{M} \) iff \( \left| \mathfrak{M}\right| \) is enumerable, so \( \neg \) Count is true in \( \mathfrak{M} \) iff \( \left| \mathfrak{M}\right| \) is non-enumerable. There are such structures-take any non-enumerable set as the domain, e.g., \( \wp \left( \mathbb{N}\right) \) or \( \mathbb{R} \) . So \( \neg \) Count has infinite models but no enumerable models.
Yes
Theorem 37.9. There are sentences with denumerable but no non-enumerable models.
Proof. Count \( \land \) Inf is true in \( \mathbb{N} \) but not in any structure \( \mathfrak{M} \) with \( \left| \mathfrak{M}\right| \) non-enumerable.
No
Proposition 38.6. The sentence \( \forall X\forall Y\left( {\left( {X \preccurlyeq Y \land Y \preccurlyeq X}\right) \rightarrow X \approx Y}\right) \) is valid.
Proof. The sentence is satisfied in a structure \( \mathfrak{M} \) if, for any subsets \( X \subseteq \left| \mathfrak{M}\right| \) and \( Y \subseteq \left| \mathfrak{M}\right| \), if \( X \preccurlyeq Y \) and \( Y \preccurlyeq X \) then \( X \approx Y \) . But this holds for any sets \( X \) and \( Y \) -it is the Schröder-Bernstein Theorem.
Yes
Proposition 38.11. The sentence\n\n\[ \forall X\forall Y\forall R(\operatorname{Pow}\left( {Y, R, X}\right) \rightarrow \neg \exists u(\forall x\forall y\left( {u\left( x\right) = u\left( y\right) \rightarrow x = y}\right) \land \left. {\forall x\left( {Y\left( x\right) \rightarrow X\left( {u\left( x\right) }\right) }\right) }\right) ) \]\n\nis valid.
The power set of a denumerable set is non-enumerable, and so its cardinality is larger than that of any denumerable set (which is \( {\aleph }_{0} \) ). The size of \( \wp \left( \mathbb{N}\right) \) is called the \
No
Proposition 38.12. If \( \mathbb{R} \preccurlyeq \left| \mathfrak{M}\right| \), then the formula\n\n\[ \n\operatorname{Cont}\left( Y\right) \equiv \exists X\exists R\left( {\left( {{\operatorname{Aleph}}_{0}\left( X\right) \land \operatorname{Pow}\left( {Y, R, X}\right) }\right) \land }\right.\n\]\n\n\[ \n\forall x\forall y\left( {\left( {Y\left( x\right) \land Y\left( y\right) \land \forall {zR}\left( {x, z}\right) \leftrightarrow R\left( {y, z}\right) }\right) \rightarrow x = y}\right) )\n\]\n\nexpresses that \( s\left( Y\right) \approx \mathbb{R} \) .
Proof. Pow \( \left( {Y, R, X}\right) \) expresses that \( s\left( Y\right) s\left( R\right) \) -codes the power set of \( s\left( X\right) \), which \( {\operatorname{Aleph}}_{0}\left( X\right) \) says is countable. So \( s\left( Y\right) \) is at least as large as the power of the continuum, although it may be larger (if multiple elements of \( s\left( Y\right) \) code the same subset of \( X \) ). This is ruled out be the last conjunct, which requires the association between elements of \( s\left( Y\right) \) and subsets of \( s\left( Z\right) \) via \( s\left( R\right) \) to be injective.
Yes
Corollary 39.2. Suppose \( M \) can be reduced to normal form. Then this normal form is unique.
Proof. If \( M \rightarrow {N}_{1} \) and \( M \rightarrow {N}_{2} \), by the previous theorem there is a term \( P \) such that \( {N}_{1} \) and \( {N}_{2} \) both reduce to \( P \) . If \( {N}_{1} \) and \( {N}_{2} \) are both in normal form, this can only happen if \( {N}_{1} \equiv P \equiv {N}_{2} \) .
Yes
Theorem 39.6. If a partial function \( f \) is \( \lambda \) -defined by a lambda term, it is computable.
Proof. Suppose a function \( f \) is \( \lambda \) -defined by a lambda term \( X \) . Let us describe an informal procedure to compute \( f \) . On input \( {m}_{0},\ldots ,{m}_{n - 1} \), write down the term \( X{\bar{m}}_{0}\ldots {\bar{m}}_{n - 1} \) . Build a tree, first writing down all the one-step reductions of the original term; below that, write all the one-step reductions of those (i.e., the two-step reductions of the original term); and keep going. If you ever reach a numeral, return that as the answer; otherwise, the function is undefined. An appeal to Church's thesis tells us that this function is computable. A better way to prove the theorem would be to give a recursive description of this search procedure. For example, one could define a sequence primitive recursive functions and relations, \
No
Theorem 39.7. Every computable partial function is \( \lambda \) -definable.
Proof. Wwe need to show that every partial computable function \( f \) is \( \lambda \) -defined by a lambda term \( F \) . By Kleene’s normal form theorem, it suffices to show that every primitive recursive function is \( \lambda \) -defined by a lambda term, and then that the functions \( \lambda \) -definable are closed under suitable compositions and unbounded search. To show that every primitive recursive function is \( \lambda \) -defined by a lambda term, it suffices to show that the initial functions are \( \lambda \) -definable, and that the partial functions that are \( \lambda \) -definable are closed under composition, primitive recursion, and unbounded search. We will use a more conventional notation to make the rest of the proof more readable. For example, we will write \( M\left( {x, y, z}\right) \) instead of \( {Mxyz} \) . While this is suggestive, you should remember that terms in the untyped lambda calculus do not have associated arities; so, for the same term \( M \), it makes just as much sense to write \( M\left( {x, y}\right) \) and \( M\left( {x, y, z, w}\right) \) . But using this notation indicates that we are treating \( M \) as a function of three variables, and helps make the intentions behind the definitions clearer. In a similar way, we will say \
No
Lemma 39.8. The functions zero, succ, and \( {P}_{i}^{n} \) are \( \lambda \) -definable.
Proof. zero is just \( {\lambda x}.{\lambda y}.y \) .\n\nThe successor function succ, is defined by \( \operatorname{Succ}\left( u\right) = {\lambda x}.{\lambda y}.x\left( {uxy}\right) \) . You should think about why this works; for each numeral \( \bar{n} \), thought of as an iterator, and each function \( f,\operatorname{Succ}\left( {\bar{n}, f}\right) \) is a function that, on input \( y \), applies \( {fn} \) times starting with \( y \), and then applies it once more.\n\nThere is nothing to say about projections: \( {\operatorname{Proj}}_{i}^{n}\left( {{x}_{0},\ldots ,{x}_{n - 1}}\right) = {x}_{i} \) . In other words, by our conventions, \( {\operatorname{Proj}}_{i}^{n} \) is the lambda term \( \lambda {x}_{0}\ldots \lambda {x}_{n - 1}.{x}_{i}.▱ \)
No
Lemma 39.9. The \( \lambda \) -definable functions are closed under composition.
Proof. Suppose \( f \) is defined by composition from \( h,{g}_{0},\ldots ,{g}_{k - 1} \) . Assuming \( h \) , \( {g}_{0},\ldots ,{g}_{k - 1} \) are \( \lambda \) -defined by \( H,{G}_{0},\ldots ,{G}_{k - 1} \), respectively, we need to find a term \( F \) that \( \lambda \) -defines \( f \) . But we can simply define \( F \) by\n\n\[ F\left( {{x}_{0},\ldots ,{x}_{l - 1}}\right) = H\left( {{G}_{0}\left( {{x}_{0},\ldots ,{x}_{l - 1}}\right) ,\ldots ,{G}_{k - 1}\left( {{x}_{0},\ldots ,{x}_{l - 1}}\right) }\right) . \]\n\nIn other words, the language of the lambda calculus is well suited to represent composition.
Yes
Lemma 39.10. There is a lambda term \( D \) such that for each pair of lambda terms \( M \) and \( N, D\left( {M, N}\right) \left( \overline{0}\right) \rightarrow M \) and \( D\left( {M, N}\right) \left( \overline{1}\right) \rightarrow N \) .
Proof. First, define the lambda term \( K \) by\n\n\[ K\left( y\right) = {\lambda x}.y. \]\n\nIn other words, \( K \) is the term \( {\lambda y}.{\lambda x}.y \) . Looking at it differently, for every \( M \) , \( K\left( M\right) \) is a constant function that returns \( M \) on any input.\n\nNow define \( D\left( {x, y, z}\right) \) by \( D\left( {x, y, z}\right) = z\left( {K\left( y\right) }\right) x \) . Then we have\n\n\[ D\left( {M, N,\overline{0}}\right) \rightarrow \overline{0}\left( {K\left( N\right) }\right) M \rightarrow M\text{and} \]\n\n\[ D\left( {M, N,\overline{1}}\right) \rightarrow \overline{1}\left( {K\left( N\right) }\right) M \rightarrow K\left( N\right) M \rightarrow N, \]\n\nas required.
Yes
Lemma 39.12. Suppose \( f\left( {x, y}\right) \) is primitive recursive. Let \( g \) be defined by\n\n\[ g\left( x\right) \simeq {\mu yf}\left( {x, y}\right) . \]\n\nThen \( g \) is \( \lambda \) -definable.
Proof. The idea is roughly as follows. Given \( x \), we will use the fixed-point lambda term \( Y \) to define a function \( {h}_{x}\left( n\right) \) which searches for a \( y \) starting at \( n \) ; then \( g\left( x\right) \) is just \( {h}_{x}\left( 0\right) \) . The function \( {h}_{x} \) can be expressed as the solution of a fixed-point equation:\n\n\[ {h}_{x}\left( n\right) \simeq \left\{ \begin{array}{ll} n & \text{ if }f\left( {x, n}\right) = 0 \\ {h}_{x}\left( {n + 1}\right) & \text{ otherwise. } \end{array}\right. \]\n\nHere are the details. Since \( f \) is primitive recursive, it is \( \lambda \) -defined by some term \( F \) . Remember that we also have a lambda term \( D \), such that \( D\left( {M, N,\overline{0}}\right) \rightarrow \) \( M \) and \( D\left( {M, N,\overline{1}}\right) \rightarrow N \) . Fixing \( x \) for the moment, to \( \lambda \) -define \( {h}_{x} \) we want to find a term \( H \) (depending on \( x \) ) satisfying\n\n\[ H\left( \bar{n}\right) \equiv D\left( {\bar{n}, H\left( {S\left( \bar{n}\right) }\right), F\left( {x,\bar{n}}\right) }\right) . \]\n\nWe can do this using the fixed-point term \( Y \) . First, let \( U \) be the term\n\n\[ {\lambda h}.{\lambda z}.D\left( {z,\left( {h\left( {Sz}\right) }\right), F\left( {x, z}\right) }\right) ,\]\n\nand then let \( H \) be the term \( {YU} \) . Notice that the only free variable in \( H \) is \( x \) . Let us show that \( H \) satisfies the equation above.\n\nBy the definition of \( Y \), we have\n\n\[ H = {YU} \equiv U\left( {YU}\right) = U\left( H\right) \]\n\nIn particular, for each natural number \( n \), we have\n\n\[ H\left( \bar{n}\right) \equiv U\left( {H,\bar{n}}\right) \]\n\n\[ \rightarrow D\left( {\bar{n}, H\left( {S\left( \bar{n}\right) }\right), F\left( {x,\bar{n}}\right) }\right) ,\]\n\nas required. Notice that if you substitute a numeral \( \bar{m} \) for \( x \) in the last line, the expression reduces to \( \bar{n} \) if \( F\left( {\bar{m},\bar{n}}\right) \) reduces to \( \overline{0} \), and it reduces to \( H\left( {S\left( \bar{n}\right) }\right) \) if \( F\left( {\bar{m},\bar{n}}\right) \) reduces to any other numeral.\n\nTo finish off the proof, let \( G \) be \( {\lambda x}.H\left( \overline{0}\right) \) . Then \( {G\lambda } \) -defines \( g \) ; in other words, for every \( m, G\left( \bar{m}\right) \) reduces to reduces to \( \overline{g\left( m\right) } \), if \( g\left( m\right) \) is defined, and has no normal form otherwise.
Yes
Lemma 40.2. A term starts with either a variable or a parenthesis.
Proof. Something counts as a term only if it is constructed according to Definition 40.1. If it is the result of (1), it must be a variable. If it is the result of (2) or (3), it starts with a parenthesis.
Yes
Lemma 40.3. The result of an application starts with either two parentheses or a parenthesis and a variable.
Proof. If \( M \) is the result of an application, it is of the form \( \left( {PQ}\right) \), so it begins with a parenthesis. Since \( P \) is a term, by Lemma 40.2, it begins either with a parenthesis or a variable.
Yes
Proposition 40.5 (Unique Readability). There is a unique formation for each term. In other words, if a term \( M \) is formed by a formation, then it is the only formation that can form this term.
Proof. We prove this by induction on the formation of terms.\n\n1. \( M \) is of the form \( x \), where \( x \) is some variable. Since the results of abstractions and applications always start with parentheses, they cannot have been used to construct \( M \) ; Thus, the formation of \( M \) must be a single step of Definition 40.1(1).\n\n2. \( M \) is of the form \( \left( {{\lambda x}.N}\right) \), where \( x \) is some variable and \( N \) is a term. It could not have been constructed according to Definition 40.1(1), because it is not a single variable. It is not the result of an application, by Lemma 40.3. Thus \( M \) can only be the result of an abstraction on \( N \) . By inductive hypothesis we know that formation of \( N \) is itself unique.\n\n3. \( M \) is of the form \( \left( {PQ}\right) \), where \( P \) and \( Q \) are terms. Since it starts with a parentheses, it cannot also be constructed by Definition 40.1(1). By Lemma 40.2, \( P \) cannot begin with \( \lambda \), so \( \left( {PQ}\right) \) cannot be the result of an abstraction. Now suppose there were another way of constructing \( M \) by application, e.g., it is also of the form \( \left( {{P}^{\prime }{Q}^{\prime }}\right) \) . Then \( P \) is a proper initial segment of \( {P}^{\prime } \) (or vice versa), and this is impossible by Lemma 40.4. So \( P \) and \( Q \) are uniquely determined, and by inductive hypothesis we know that formations of \( P \) and \( Q \) is unique.
Yes
Lemma 40.12. 1. If \( y \neq x \), then \( y \in \mathrm{{FV}}\left( {{\lambda x}.N}\right) \) iff \( y \in \mathrm{{FV}}\left( N\right) \) .
Proof. Exercise.
No
Theorem 40.14. If \( x \notin \mathrm{{FV}}\left( M\right) \), then \( \mathrm{{FV}}\left( {M\left\lbrack {N/x}\right\rbrack }\right) = \mathrm{{FV}}\left( M\right) \), if the left-hand side is defined.
Proof. By induction on the formation of \( M \) .\n\n1. \( M \) is a variable: exercise.\n\n2. \( M \) is of the form \( \left( {PQ}\right) \) : exercise.\n\n3. \( M \) is of the form \( {\lambda y}.P \), and since \( {\lambda y}.P\left\lbrack {N/x}\right\rbrack \) is defined, it has to be \( {\lambda y}.P\left\lbrack {N/x}\right\rbrack \) . Then \( P\left\lbrack {N/x}\right\rbrack \) has to be defined; also, \( x \neq y \) and \( x \notin \mathrm{{FV}}\left( Q\right) \).\n\nThen:\n\n\[ \operatorname{FV}\left( {{\lambda y} \cdot P\left\lbrack {N/x}\right\rbrack }\right) = \]\n\n\[ = \mathrm{{FV}}\left( {{\lambda y}.P\left\lbrack {N/x}\right\rbrack }\right) \;\text{by (4)} \]\n\n\[ = \mathrm{{FV}}\left( {P\left\lbrack {N/x}\right\rbrack }\right) \smallsetminus \{ y\} \;\text{by Definition 40.10(2)} \]\n\n\[ = \mathrm{{FV}}\left( P\right) \smallsetminus \{ y\} \;\text{by inductive hypothesis} \]\n\n\( = \mathrm{{FV}}\left( {{\lambda y}.P}\right) \; \) by Definition 40.10(2)
No
Theorem 40.15. If \( x \in \mathrm{{FV}}\left( M\right) \), then \( \mathrm{{FV}}\left( {M\left\lbrack {N/x}\right\rbrack }\right) = \left( {\mathrm{{FV}}\left( M\right) \smallsetminus \{ x\} }\right) \cup \mathrm{{FV}}\left( N\right) \), provided the left hand is defined.
Proof. By induction on the formation of \( M \).\n\n1. \( M \) is a variable: exercise.\n\n2. \( M \) is of the form \( {PQ} \): Since \( \left( {PQ}\right) \left\lbrack {N/y}\right\rbrack \) is defined, it has to be \( \left( {P\left\lbrack {N/x}\right\rbrack }\right) \left( {Q\left\lbrack {N/x}\right\rbrack }\right) \) with both substitution defined. Also, since \( x \in \mathrm{{FV}}\left( {PQ}\right) \), either \( x \in \) \( \mathrm{{FV}}\left( P\right) \) or \( x \in \mathrm{{FV}}\left( Q\right) \) or both. The rest is left as an exercise.\n\n3. \( M \) is of the form \( {\lambda y} \). P. Since \( {\lambda y}.P\left\lbrack {N/x}\right\rbrack \) is defined, it has to be \( {\lambda y}.P\left\lbrack {N/x}\right\rbrack \), with \( P\left\lbrack {N/x}\right\rbrack \) defined, \( x \neq y \) and \( y \notin \mathrm{{FV}}\left( N\right) \); also, since \( y \in \mathrm{{FV}}\left( {{\lambda x}.P}\right) \), we have \( y \in \mathrm{{FV}}\left( P\right) \) too. Now:\n\n\[ \operatorname{FV}\left( {\left( {{\lambda y}.P}\right) \left\lbrack {N/x}\right\rbrack }\right) = \]\n\n\[ = \mathrm{{FV}}\left( {{\lambda y}.P\left\lbrack {N/x}\right\rbrack }\right) \]\n\n\[ = \operatorname{FV}\left( {P\left\lbrack {N/x}\right\rbrack }\right) \smallsetminus \{ y\} \]\n\n\[ = (\left( {\mathrm{{FV}}\left( P\right) \smallsetminus \{ y\} }\right) \cup \left( {\mathrm{{FV}}\left( N\right) \smallsetminus \{ x\} }\right) \;\text{by inductive hypothesis} \]\n\n\[ = \left( {\mathrm{{FV}}\left( P\right) \smallsetminus \{ x, y\} }\right) \cup \mathrm{{FV}}\left( N\right) \;x \notin \mathrm{{FV}}\left( N\right) \]\n\n\[ = \left( {\mathrm{{FV}}\left( {{\lambda y}.P}\right) \smallsetminus \{ x\} }\right) \cup \mathrm{{FV}}\left( N\right) \]
No
Theorem 40.16. \( x \notin \operatorname{FV}\left( {M\left\lbrack {N/x}\right\rbrack }\right) \), if the right-hand side is defined and \( x \notin \) \( \mathrm{{FV}}\left( N\right) \) .
Proof. Exercise.
No
Theorem 40.17. If \( M\left\lbrack {y/x}\right\rbrack \) is defined and \( y \notin \mathrm{{FV}}\left( M\right) \), then \( M\left\lbrack {y/x}\right\rbrack \left\lbrack {x/y}\right\rbrack = M \) .
Proof. By induction on the formation of \( M \) .\n\n1. \( M \) is a variable \( z \) : Exercise.\n\n2. \( M \) is of the form \( \left( {PQ}\right) \) . Then:\n\n\[ \left( {PQ}\right) \left\lbrack {y/x}\right\rbrack \left\lbrack {x/y}\right\rbrack = \left( {\left( {P\left\lbrack {y/x}\right\rbrack }\right) \left( {Q\left\lbrack {y/x}\right\rbrack }\right) }\right) \left\lbrack {x/y}\right\rbrack \]\n\n\[ = \left( {P\left\lbrack {y/x}\right\rbrack \left\lbrack {x/y}\right\rbrack }\right) \left( {Q\left\lbrack {y/x}\right\rbrack \left\lbrack {x/y}\right\rbrack }\right) \]\n\n\[ = \left( {PQ}\right) \text{by inductive hypothesis} \]\n\n3. \( M \) is of the form \( {\lambda z}.N \) . Because \( {\lambda z}.N\left\lbrack {y/x}\right\rbrack \) is defined, we know that \( z \neq y \) . So:\n\n\[ \left( {{\lambda z}.N}\right) \left\lbrack {y/x}\right\rbrack \left\lbrack {x/y}\right\rbrack \]\n\n\[ = \left( {{\lambda z}.N\left\lbrack {y/x}\right\rbrack }\right) \left\lbrack {x/y}\right\rbrack \]\n\n\[ = {\lambda z}.N\left\lbrack {y/x}\right\rbrack \left\lbrack {x/y}\right\rbrack \]\n\n\[ = {\lambda z}\text{.}N\text{by inductive hypothesis} \]\n
No
Lemma 40.25. If \( P\overset{\alpha }{ \rightarrow }Q \) then \( \mathrm{{FV}}\left( P\right) = \mathrm{{FV}}\left( Q\right) \) .
Proof. By induction on the derivation of \( P\overset{\alpha }{ \rightarrow }Q \) .\n\n1. If the last rule is (4), then \( P \) is of the form \( {\lambda x}.N \) and \( Q \) of the form \( {\lambda y}.N\left\lbrack {y/x}\right\rbrack \), with \( x \neq y, y \notin \mathrm{{FV}}\left( N\right) \) and \( N\left\lbrack {y/x}\right\rbrack \) defined. We distinguish cases according to whether \( x \in \mathrm{{FV}}\left( N\right) \) :\n\na) If \( x \in {FV}\left( N\right) \), then:\n\n\[ \mathrm{{FV}}\left( {{\lambda y}.N\left\lbrack {y/x}\right\rbrack }\right) = \mathrm{{FV}}\left( {N\left\lbrack {y/x}\right\rbrack }\right) \smallsetminus \{ y\} \]\n\n\[ = \left( {\left( {\mathrm{{FV}}\left( N\right) \smallsetminus \{ x\} }\right) \cup \{ y\} }\right) \smallsetminus \{ y\} \;\text{by Theorem 40.15} \]\n\n\[ = \mathrm{{FV}}\left( N\right) \smallsetminus \{ x\} \]\n\n\[ = \mathrm{{FV}}\left( {{\lambda x}.N}\right) \]\n\nb) If \( x \notin {FV}\left( N\right) \), then:\n\n\[ \operatorname{FV}\left( {{\lambda y}.N\left\lbrack {y/x}\right\rbrack }\right) = \operatorname{FVN}\left\lbrack {y/x}\right\rbrack \smallsetminus \{ y\} \]\n\n\[ = \mathrm{{FV}}\left( N\right) \smallsetminus \{ x\} \;\text{by Theorem 40.14} \]\n\n\[ = \mathrm{{FV}}\left( {{\lambda x}.N}\right) \text{.} \]\n\n2. The other three cases are left as exercises.
No
Lemma 40.26. If \( P\overset{\alpha }{ \rightarrow }Q \) then \( Q\overset{\alpha }{ \rightarrow }P \) .
Proof. Induction on the derivation of \( P\overset{\alpha }{ \rightarrow }Q \) .\n\n1. If the last rule is (4), then \( P \) is of the form \( {\lambda x}.N \) and \( Q \) of the form\n\n\( {\lambda y}.N\left\lbrack {y/x}\right\rbrack \), where \( x \neq y, y \notin \mathrm{{FV}}\left( N\right) \) and \( N\left\lbrack {y/x}\right\rbrack \) defined. First, we have \( y \notin \operatorname{FV}\left( {N\left\lbrack {y/x}\right\rbrack }\right) \) by Theorem 40.16. By Theorem 40.17 we have that \( N\left\lbrack {y/x}\right\rbrack \left\lbrack {x/y}\right\rbrack \) is not only defined, but also equal to \( N \) . Then by (4), we have \( {\lambda y}.N\left\lbrack {y/x}\right\rbrack \overset{\alpha }{ \rightarrow }{\lambda x}.N\left\lbrack {y/x}\right\rbrack \left\lbrack {x/y}\right\rbrack = {\lambda x}.N \) .
Yes
Theorem 40.27. \( \\alpha \) -Conversion is an equivalence relation on terms, i.e., it is reflexive, symmetric, and transitive.
Proof. 1. For each term \( M, M \) can be changed to \( M \) by zero changes of bound variables.\n\n2. If \( P \) is \( \\alpha \) -converts to \( Q \) by a series of changes of bound variables, then from \( Q \) we can just inverse these changes (by Lemma 40.26) in opposite order to obtain \( P \).\n\n3. If \( {P\\alpha } \) -converts to \( Q \) by a series of changes of bound variables, and \( Q \) to \( R \) by another series, then we can change \( P \) to \( R \) by first applying the first series and then the second series.
Yes
Theorem 40.28. If \( M\overset{\alpha }{ = }N \), then \( \mathrm{{FV}}\left( M\right) = \mathrm{{FV}}\left( N\right) \) .
Proof. Immediate from Lemma 40.25.
No
Lemma 40.29. If \( R\overset{\alpha }{ = }{R}^{\prime } \) and \( M\left\lbrack {R/y}\right\rbrack \) is defined, then \( M\left\lbrack {{R}^{\prime }/y}\right\rbrack \) is defined and \( \alpha \) -equivalent to \( M\left\lbrack {R/y}\right\rbrack \) .
Proof. Exercise.
No
Theorem 40.30. For any \( M, R \), and \( y \), there exists \( {M}^{\prime } \) such that \( M\overset{\alpha }{ = }{M}^{\prime } \) and \( {M}^{\prime }\left\lbrack {R/y}\right\rbrack \) is defined. Moreover, if there is another pair \( {M}^{\prime \prime }\overset{\alpha }{ = }M \) and \( {R}^{\prime \prime } \) where \( {M}^{\prime \prime }\left\lbrack {{R}^{\prime \prime }/y}\right\rbrack \) is defined and \( {R}^{\prime \prime } \triangleq R \), then \( {M}^{\prime }\left\lbrack {R/y}\right\rbrack \triangleq {M}^{\prime \prime }\left\lbrack {{R}^{\prime \prime }/y}\right\rbrack \) .
Proof. By induction on the formation of \( M \) :\n\n1. \( M \) is a variable \( z \) : Exercise.\n\n2. Suppose \( M \) is of the form \( {\lambda x}.N \) . Select a variable \( z \) other than \( x \) and \( y \) and such that \( z \notin \mathrm{{FV}}\left( N\right) \) and \( z \notin \mathrm{{FV}}\left( R\right) \) . By inductive hypothesis, we there is \( {N}^{\prime } \) such that \( {N}^{\prime }\overset{\alpha }{ = }N \) and \( {N}^{\prime }\left\lbrack {z/x}\right\rbrack \) is defined. Then \( {\lambda x}.N \triangleq {\lambda x}.{N}^{\prime } \) too, by Definition 40.21(1). Now \( {\lambda x}.{N}^{\prime } \triangleq {\lambda z}.{N}^{\prime }\left\lbrack {z/x}\right\rbrack \) by Definition 40.21(4). We can do this because \( z \neq x, z \notin {FV}\left( {N}^{\prime }\right) \) and \( {N}^{\prime }\left\lbrack {z/x}\right\rbrack \) is defined. Finally, \( {\lambda z}.{N}^{\prime }\left\lbrack {z/x}\right\rbrack \left\lbrack {R/y}\right\rbrack \) is defined, because \( z \neq y \) and \( z \notin {FV}\left( R\right) \) .\n\nMoreover, if there is another \( {N}^{\prime \prime } \) and \( {R}^{\prime \prime } \) satisfying the same conditions,\n\n\[ \left( {{\lambda z}.{N}^{\prime \prime }\left\lbrack {z/x}\right\rbrack }\right) \left\lbrack {{R}^{\prime \prime }/y}\right\rbrack = \]\n\n\[ = {\lambda z}.{N}^{\prime \prime }\left\lbrack {z/x}\right\rbrack \left\lbrack {{R}^{\prime \prime }/y}\right\rbrack \]\n\n\[ = {\lambda z}.{N}^{\prime \prime }\left\lbrack {z/x}\right\rbrack \left\lbrack {R/y}\right\rbrack \;\text{ by Lemma 40.29 } \]\n\n\[ = {\lambda z}.{N}^{\prime }\left\lbrack {z/x}\right\rbrack \left\lbrack {R/y}\right\rbrack \;\text{by inductive hypothesis} \]\n\n\[ = \left( {{\lambda z}.{N}^{\prime }\left\lbrack {z/x}\right\rbrack }\right) \left\lbrack {R/y}\right\rbrack \]\n\n3. \( M \) is of the form \( \left( {PQ}\right) \) : Exercise.
No
For any \( M, R \), and \( y \), there exists a pair of \( {M}^{\prime } \) and \( {R}^{\prime } \) such that \( {M}^{\prime } \triangleq M, R \triangleq {R}^{\prime } \) and \( {M}^{\prime }\left\lbrack {{R}^{\prime }/y}\right\rbrack \) is defined. Moreover, if there is another pair \( {M}^{\prime \prime } \triangleq M \) and \( {R}^{\prime \prime } \) with \( {M}^{\prime }\left\lbrack {{R}^{\prime }/y}\right\rbrack \) defined, then \( {M}^{\prime }\left\lbrack {{R}^{\prime }/y}\right\rbrack \triangleq {M}^{\prime \prime }\left\lbrack {{R}^{\prime \prime }/y}\right\rbrack \) .
Immediate from Theorem 40.30.
No
Theorem 40.47. \( M\overset{\text{ ext }}{ = }N \) if and only if \( M\overset{\eta }{ = }N \) .
Proof. First we prove that \( \frac{\eta }{ - } \) is closed under the extensionality rule. That is, ext rule doesn’t add anything to \( \frac{\eta }{ - } \) . We then have \( \frac{\eta }{ - } \) contains \( \frac{ext}{ - } \), and if \( M\overset{ext}{ = }N \) , then \( M\overset{\eta }{ = }N \) .\n\nTo prove \( \frac{\eta }{ = } \) is closed under ext, note that for any \( M = N \) derived by the ext rule, we have \( {Mx}\overset{\eta }{ = }{Nx} \) as premise. Then we have \( {\lambda x}.{Mx}\overset{\eta }{ = }{\lambda x}.{Nx} \) by a rule of \( = \), applying \( \eta \) on both side gives us \( M\overset{\eta }{ = }N \) .\n\nSimilarly we prove that the \( \eta \) rule is contained in \( \overset{\text{ ext }}{ = } \) . For any \( {\lambda x}.{Mx} \) and \( M \) with \( x \notin {FV}\left( M\right) \), we have that \( \left( {{\lambda x}.{Mx}}\right) x\overset{\text{ ext }}{ = }{Mx} \), giving us \( {\lambda x}.{Mx}\overset{\text{ ext }}{ = }M \) by the \( {ext} \) rule.
Yes
Problem 40.6. What is the result of the following substitutions?
1. \( {\lambda y}.x\left( {{\lambda w}.{vwx}}\right) \left\lbrack {\left( {uv}\right) /x}\right\rbrack \)\n2. \( {\lambda y}.x\left( {{\lambda x}.x}\right) \left\lbrack {\left( {{\lambda y}.{xy}}\right) /x}\right\rbrack \)\n3. \( y\left( {{\lambda v}.{xv}}\right) \left\lbrack {\left( {{\lambda y}.{vy}}\right) /x}\right\rbrack \)
No
Problem 40.11. Are the following pairs of terms \( \alpha \) -convertible?
1. \( {\lambda x}.{\lambda y}.x \) and \( {\lambda y}.{\lambda x}.y \)\n2. \( {\lambda x}.{\lambda y}.x \) and \( {\lambda c}.{\lambda b}.a \)\n3. \( {\lambda x}.{\lambda y}.x \) and \( {\lambda c}.{\lambda b}.a \)
No
Theorem 41.2. If a relation \( \overset{X}{ \rightarrow } \) satisfies the Church-Rosser property, and \( \overset{X}{ \rightarrow } \) is the smallest transitive relation containing \( \overset{X}{ \rightarrow } \), then \( \overset{X}{ \rightarrow } \) satisfies the Church-Rosser property too.
Proof. Suppose\n\n\[ \nM\overset{X}{ \rightarrow }{P}_{1}\overset{X}{ \rightarrow }\ldots \overset{X}{ \rightarrow }{P}_{m}\text{and} \]\n\n\[ \nM\overset{X}{ \rightarrow }{Q}_{1}\overset{X}{ \rightarrow }\ldots \overset{X}{ \rightarrow }{Q}_{n} \]\n\nWe will prove the theorem by constructing a grid \( N \) of terms of height is \( m + \) 1 and width \( n + 1 \) . We use \( {N}_{i, j} \) to denote the term in the \( i \) -th row and \( j \) -th column.\n\nWe construct \( N \) in such a way that \( {N}_{i, j}\overset{X}{ \rightarrow }{N}_{i + 1, j} \) and \( {N}_{i, j}\overset{X}{ \rightarrow }{N}_{i, j + 1} \) . It is defined as follows:\n\n\[ \n{N}_{0,0} = M \]\n\n\[ \n{N}_{i,0} = {P}_{i} \]\n\n\[ \n\text{if}1 \leq i \leq m \]\n\n\[ \n{N}_{0, j} = {Q}_{j} \]\n\n\[ \n\text{if}1 \leq j \leq n \]\n\nand otherwise:\n\n\[ \n{N}_{i, j} = R \]\n\nwhere \( R \) is a term such that \( {N}_{i - 1, j}\overset{X}{ \rightarrow }R \) and \( {N}_{i, j - 1}\overset{X}{ \rightarrow }R \) . By the Church-Rosser property of \( \overset{X}{ \rightarrow } \), such a term always exists.\n\nNow we have \( {N}_{m,0}\overset{X}{ \rightarrow }\ldots \overset{X}{ \rightarrow }{N}_{m, n} \) and \( {N}_{0, n}\overset{X}{ \rightarrow }\ldots \overset{X}{ \rightarrow }{N}_{m, n} \) . Note \( {N}_{m,0} \) is \( P \) and \( {N}_{0, n} \) is \( Q \) . By definition of \( \xrightarrow[]{X} \) the theorem follows.
Yes
Theorem 41.4. \( M\overset{\beta }{ \Rightarrow }M \) .
Proof. Exercise.
No
Lemma 41.6. If \( M\overset{\beta }{ \Rightarrow }{M}^{\prime } \) and \( R\overset{\beta }{ \Rightarrow }{R}^{\prime } \), then \( M\left\lbrack {R/y}\right\rbrack \overset{\beta }{ \Rightarrow }{M}^{\prime }\left\lbrack {{R}^{\prime }/y}\right\rbrack \) .
Proof. By induction on the derivation of \( M\overset{\beta }{ \Rightarrow }{M}^{\prime } \) .\n\n1. The last step is (1): Exercise.\n\n2. The last step is (2): Then \( M \) is \( {\lambda x}.N \) and \( {M}^{\prime } \) is \( {\lambda x}.{N}^{\prime } \), where \( N\overset{\beta }{ \Rightarrow }{N}^{\prime } \) . We want to prove that \( \left( {{\lambda x}.N}\right) \left\lbrack {R/y}\right\rbrack \overset{\beta }{ \Rightarrow }\left( {{\lambda x}.{N}^{\prime }}\right) \left\lbrack {{R}^{\prime }/y}\right\rbrack \), i.e., \( {\lambda x}.N\left\lbrack {R/y}\right\rbrack \overset{\beta }{ \Rightarrow } \) \( {\lambda x}.{N}^{\prime }\left\lbrack {R/y}\right\rbrack \) . This follows immediately by (2) and the induction hypothesis.\n\n3. The last step is (3): Exercise.\n\n4. The last step is (4): \( M \) is \( \left( {{\lambda x}.N}\right) Q \) and \( {M}^{\prime } \) is \( {N}^{\prime }\left\lbrack {{Q}^{\prime }/x}\right\rbrack \) . We want to prove that \( \left( {\left( {{\lambda x}.N}\right) Q}\right) \left\lbrack {R/y}\right\rbrack \overset{\beta }{ \Rightarrow }{N}^{\prime }\left\lbrack {{Q}^{\prime }/x}\right\rbrack \left\lbrack {{R}^{\prime }/y}\right\rbrack \), i.e., \( \left( {{\lambda x}.N\left\lbrack {R/y}\right\rbrack }\right) Q\left\lbrack {R/y}\right\rbrack \overset{\beta }{ \Rightarrow } \) \( {N}^{\prime }\left\lbrack {{R}^{\prime }/y}\right\rbrack \left\lbrack {{Q}^{\prime }\left\lbrack {{R}^{\prime }/y}\right\rbrack /x}\right\rbrack \) . This follows by (4) and the induction hypothesis.
No
Lemma 41.7. If \( M\overset{\beta }{ \Rightarrow }{M}^{\prime } \) then \( {M}^{\prime }\overset{\beta }{ \Rightarrow }{M}^{*\beta } \) .
Proof. By induction on the derivation of \( M\overset{\beta }{ \Rightarrow }{M}^{\prime } \) .\n\n1. The last rule is (1): Exercise.\n\n2. The last rule is (2): \( M \) is \( {\lambda x}.N \) and \( {M}^{\prime } \) is \( {\lambda x}.{N}^{\prime } \) with \( N\overset{\beta }{ \Rightarrow }{N}^{\prime } \) . We want to show that \( {\lambda x}.{N}^{\prime }\overset{\beta }{ \Rightarrow }{\left( \lambda x.N\right) }^{*\beta } \), i.e., \( {\lambda x}.{N}^{\prime }\overset{\beta }{ \Rightarrow }{\lambda x}.{N}^{*\beta } \) by eq. (41.2). It follows by (2) and the induction hypothesis.\n\n3. The last rule is (3): \( M \) is \( {PQ} \) and \( {M}^{\prime } \) is \( {P}^{\prime }{Q}^{\prime } \) for some \( P, Q,{P}^{\prime } \) and \( {Q}^{\prime } \), with \( P\overset{\beta }{ \Rightarrow }{P}^{\prime } \) and \( Q\overset{\beta }{ \Rightarrow }{Q}^{\prime } \) . By induction hypothesis, we have \( {P}^{\prime }\overset{\beta }{ \Rightarrow }{P}^{*\beta } \) and \( {Q}^{\prime }\overset{\beta }{ \Rightarrow }{Q}^{*\beta } \).\n\na) If \( P \) is \( {\lambda x}.N \) for some \( x \) and \( N \), then \( {P}^{\prime } \) must be \( {\lambda x}.{N}^{\prime } \) for some \( {N}^{\prime } \) with \( N\overset{\beta }{ \Rightarrow }{N}^{\prime } \) . By induction hypothesis we have \( {N}^{\prime }\overset{\beta }{ \Rightarrow }{N}^{*\beta } \) and \( {Q}^{\prime }\overset{\beta }{ \Rightarrow }{Q}^{*\beta } \) . Then \( \left( {{\lambda x}.{N}^{\prime }}\right) {Q}^{\prime }\overset{\beta }{ \Rightarrow }{N}^{*\beta }\left\lbrack {{Q}^{*\beta }/x}\right\rbrack \) by (4).\n\nb) If \( P \) is not a \( \lambda \) -abstract, then \( {P}^{\prime }{Q}^{\prime }\overset{\beta }{ \Rightarrow }{P}^{*\beta }{Q}^{*\beta } \) by (3), and the righthand side is \( P{Q}^{*\beta } \) by eq. (41.3).\n\n4. The last rule is (4): \( M \) is \( \left( {{\lambda x}.N}\right) Q \) and \( {M}^{\prime } \) is \( {N}^{\prime }\left\lbrack {{Q}^{\prime }/x}\right\rbrack \) for some \( x, N \) , \( Q,{N}^{\prime } \), and \( {Q}^{\prime } \), with \( N\overset{\beta }{ \Rightarrow }{N}^{\prime } \) and \( Q\overset{\beta }{ \Rightarrow }{Q}^{\prime } \) . By induction hypothesis we know \( {N}^{\prime }\overset{\beta }{ \Rightarrow }{N}^{*\beta } \) and \( {Q}^{\prime }\overset{\beta }{ \Rightarrow }{Q}^{*\beta } \) . By Lemma 41.6 we have \( {N}^{\prime }\left\lbrack {{Q}^{\prime }/x}\right\rbrack \overset{\beta }{ \Rightarrow }{N}^{*\beta }\left\lbrack {{Q}^{*\beta }/x}\right\rbrack \), the right-hand side of which is exactly \( {\left( \left( \lambda x.N\right) Q\right) }^{*\beta } \) .
No
Theorem 41.8. \( \overset{\beta }{ \Rightarrow } \) has the Church-Rosser property.
Proof. Immediate from Lemma 41.7.
No
Lemma 41.9. If \( M\overset{\beta }{ \rightarrow }{M}^{\prime } \), then \( M\overset{\beta }{ \Rightarrow }{M}^{\prime } \) .
Proof. If \( M\overset{\beta }{ \rightarrow }{M}^{\prime } \), then \( M \) is \( \left( {{\lambda x}.N}\right) Q,{M}^{\prime } \) is \( N\left\lbrack {Q/x}\right\rbrack \), for some \( x, N \), and \( Q \) . Since \( N\overset{\beta }{ \Rightarrow }N \) and \( Q\overset{\beta }{ \Rightarrow }Q \) by Theorem 41.4, we immediately have \( \left( {{\lambda x}.N}\right) Q\overset{\beta }{ \Rightarrow } \) \( N\left\lbrack {Q/x}\right\rbrack \) by Definition 41.3(4).
Yes
Lemma 41.10. If \( M\overset{\beta }{ \Rightarrow }{M}^{\prime } \), then \( M\xrightarrow[]{\beta }{M}^{\prime } \) .
Proof. By induction on the derivation of \( M\overset{\beta }{ \Rightarrow }{M}^{\prime } \) .\n\n1. The last rule is (1): Then \( M \) and \( {M}^{\prime } \) are just \( x \), and \( x\overset{\beta }{ \rightarrow }x \) .\n\n2. The last rule is (2): \( M \) is \( {\lambda x}.N \) and \( {M}^{\prime } \) is \( {\lambda x}.{N}^{\prime } \) for some \( x, N,{N}^{\prime } \), where \( N\overset{\beta }{ \Rightarrow }{N}^{\prime } \) . By induction hypothesis we have \( N\overset{\beta }{ \rightarrow }{N}^{\prime } \) . Then \( {\lambda x}.N\overset{\beta }{ \rightarrow } \) \( {\lambda x}.{N}^{\prime } \) (by the same series of \( \overset{\beta }{ \rightarrow } \) contractions as \( N\overset{\beta }{ \rightarrow }{N}^{\prime } \) ).\n\n3. The last rule is (3): \( M \) is \( {PQ} \) and \( {M}^{\prime } \) is \( {P}^{\prime }{Q}^{\prime } \) for some \( P, Q,{P}^{\prime },{Q}^{\prime } \), where \( P\overset{\beta }{ \Rightarrow }{P}^{\prime } \) and \( Q\overset{\beta }{ \Rightarrow }{Q}^{\prime } \) . By induction hypothesis we have \( P\overset{\beta }{ \rightarrow }{P}^{\prime } \) and \( Q\overset{\beta }{ \rightarrow }{Q}^{\prime } \) . So \( {PQ}\overset{\beta }{ \rightarrow }{P}^{\prime }{Q}^{\prime } \) by the reduction sequence \( P\overset{\beta }{ \rightarrow }{P}^{\prime } \) followed by the reduction \( Q\xrightarrow[]{\beta }{Q}^{\prime } \) .\n\n4. The last rule is (4): \( M \) is \( \left( {{\lambda x}.N}\right) Q \) and \( {M}^{\prime } \) is \( {N}^{\prime }\left\lbrack {{Q}^{\prime }/x}\right\rbrack \) for some \( x, N \) , \( {M}^{\prime }, Q,{Q}^{\prime } \), where \( N\overset{\beta }{ \Rightarrow }{N}^{\prime } \) and \( Q\overset{\beta }{ \Rightarrow }{Q}^{\prime } \) . By induction hypothesis we get \( Q\overset{\beta }{ \rightarrow }{Q}^{\prime } \) and \( N\overset{\beta }{ \rightarrow }{N}^{\prime } \) . So \( \left( {{\lambda x}.N}\right) Q\overset{\beta }{ \rightarrow }{N}^{\prime }\left\lbrack {{Q}^{\prime }/x}\right\rbrack \) by \( N\overset{\beta }{ \rightarrow }{N}^{\prime } \) followed by \( Q\overset{\beta }{ \rightarrow }{Q}^{\prime } \) and finally contraction of \( \left( {{\lambda x}.{N}^{\prime }}\right) {Q}^{\prime } \) to \( {N}^{\prime }\left\lbrack {{Q}^{\prime }/x}\right\rbrack \) .
Yes
Lemma 41.11. \( \overset{\beta }{ \rightarrow } \) is the smallest transitive relation containing \( \overset{\beta }{ \rightarrow } \) .
Proof. Let \( \overset{X}{ \rightarrow } \) be the smallest transitive relation containing \( \overset{\beta }{ \Rightarrow } \) . \n\n\( \overset{\beta }{ \rightarrow } \subseteq \overset{X}{ \rightarrow } \) : Suppose \( M\overset{\beta }{ \rightarrow }{M}^{\prime } \), i.e., \( M \equiv {M}_{1}\overset{\beta }{ \rightarrow }\ldots \overset{\beta }{ \rightarrow }{M}_{k} \equiv {M}^{\prime } \) . By Lemma 41.9, \( M \equiv {M}_{1}\overset{\beta }{ \Rightarrow }\ldots \overset{\beta }{ \Rightarrow }{M}_{k} \equiv {M}^{\prime } \) . Since is \( \overset{X}{ \rightarrow } \) contains \( \overset{\beta }{ \Rightarrow } \) and is transitive, \( M\overset{X}{ \rightarrow }{M}^{\prime } \) . \n\n\( \overset{X}{ \rightarrow } \subseteq \overset{\beta }{ \rightarrow } \) : Suppose \( M\overset{X}{ \rightarrow }{M}^{\prime } \), i.e., \( M \equiv {M}_{1}\overset{\beta }{ \Rightarrow }\ldots \overset{\beta }{ \Rightarrow }{M}_{k} \equiv {M}^{\prime } \) . By Lemma 41.10, \( M \equiv {M}_{1}\overset{\beta }{ \rightarrow }\ldots \overset{\beta }{ \rightarrow }{M}_{k} \equiv {M}^{\prime } \) . Since \( \overset{\beta }{ \rightarrow } \) is transitive, \( M\overset{\beta }{ \rightarrow } \) . \( {M}^{\prime } \) .
Yes
Theorem 41.12. \( \overset{\beta }{ \rightarrow } \) satisfies the Church-Rosser property.
Proof. Immediate from Theorem 41.2, Theorem 41.8, and Lemma 41.11. 599
No
Theorem 41.14. \( M\overset{\beta \eta }{ \Rightarrow }M \) .
Proof. Exercise.
No
Lemma 41.16. If \( M\overset{\beta \eta }{ \rightarrow }{M}^{\prime } \) and \( R\overset{\beta \eta }{ \rightarrow }{R}^{\prime } \), then \( M\left\lbrack {R/y}\right\rbrack \overset{\beta \eta }{ \rightarrow }{M}^{\prime }\left\lbrack {{R}^{\prime }/y}\right\rbrack \) .
Proof. By induction on the derivation of \( M\overset{\beta \eta }{ \Rightarrow }{M}^{\prime } \) .\n\nThe first four cases are exactly like those in Lemma 41.6. If the last rule is (5), then \( M \) is \( {\lambda x}.{Nx},{M}^{\prime } \) is \( {N}^{\prime } \) for some \( x \) and \( {N}^{\prime } \) where \( x \notin {FV}\left( N\right) \) , and \( N\overset{\beta \eta }{ \Rightarrow }{N}^{\prime } \) . We want to show that \( \left( {{\lambda x}.{Nx}}\right) \left\lbrack {R/y}\right\rbrack \overset{\beta \eta }{ \Rightarrow }{N}^{\prime }\left\lbrack {{R}^{\prime }/y}\right\rbrack \), i.e., \( {\lambda x}.N\left\lbrack {R/y}\right\rbrack x\overset{\beta \eta }{ \rightarrow }{N}^{\prime }\left\lbrack {{R}^{\prime }/y}\right\rbrack \) . It follows by Definition 41.13(5) and the induction hypothesis.
Yes
Lemma 41.17. If \( M\overset{\beta \eta }{ \Rightarrow }{M}^{\prime } \) then \( {M}^{\prime }\overset{\beta \eta }{ \Rightarrow }{M}^{*{\beta \eta }} \) .
Proof. By induction on the derivation of \( M\overset{\beta \eta }{ \Rightarrow }{M}^{\prime } \). The first four cases are like those in Lemma 41.7. If the last rule is (5), then \( M \) is \( {\lambda x}.{Nx} \) and \( {M}^{\prime } \) is \( {N}^{\prime } \) for some \( x, N,{N}^{\prime } \) where \( x \notin {FV}\left( N\right) \) and \( N\overset{\beta \eta }{ \rightarrow }{N}^{\prime } \). We want to show that \( {N}^{\prime }\overset{\beta \eta }{ \rightarrow }{\left( \lambda x.Nx\right) }^{*{\beta \eta }} \), i.e., \( {N}^{\prime }\overset{\beta \eta }{ \rightarrow }{N}^{*{\beta \eta }} \) , which is immediate by induction hypothesis.
Yes
Theorem 41.18. \( \overset{\beta \eta }{ \rightarrow } \) has the Church-Rosser property.
Proof. Immediate from Lemma 41.17.
No
Lemma 41.19. If \( M\xrightarrow[]{\beta \eta }{M}^{\prime } \), then \( M\overset{\beta \eta }{ \Rightarrow }{M}^{\prime } \) .
Proof. By induction on the derivation of \( M\overset{\beta \eta }{ \rightarrow }{M}^{\prime } \) . If \( M\overset{\beta }{ \rightarrow }{M}^{\prime } \) by \( \eta \) -conversion (i.e., Definition 40.43), we use Theorem 41.14. The other cases are as in Lemma 41.9. \( ▱ \)
No
Lemma 41.20. If \( M\overset{\beta \eta }{ \Rightarrow }{M}^{\prime } \), then \( M\xrightarrow[]{\beta \eta }{M}^{\prime } \) .
Proof. Induction on the derivation of \( M\overset{\beta \eta }{ \rightarrow }{M}^{\prime } \) .\n\nIf the last rule is (5), then \( M \) is \( {\lambda x}.{Nx} \) and \( {M}^{\prime } \) is \( {N}^{\prime } \) for some \( x, N,{N}^{\prime } \) where \( x \notin {FV}\left( N\right) \) and \( N\overset{\beta \eta }{ \rightarrow }{N}^{\prime } \) . Thus we can first reduce \( {\lambda x}.{Nx} \) to \( N \) by \( \eta \) -conversion, followed by the series of \( \xrightarrow[]{\beta \eta } \) steps that show that \( N\overset{\beta \eta }{ \rightarrow }{N}^{\prime } \) , which holds by induction hypothesis.
Yes
Lemma 41.21. \( \overset{\beta \eta }{ \rightarrow } \) is the smallest transitive relation containing \( \overset{\beta \eta }{ \rightarrow } \) .
Proof. As in Lemma 41.11
No
Theorem 41.22. \( \xrightarrow[]{\beta \eta } \) satisfies Church-Rosser property.
Proof. By Theorem 41.2, Theorem 41.18 and Lemma 41.21.
No
Proposition 42.3. The successor function succ is \( \lambda \) -definable.
Proof. A term that \( \lambda \) -defines the successor function is\n\n\[ \text{ Succ } \equiv {\lambda a}.{\lambda fx}.f\left( {afx}\right) . \]\n\nSucc is a function that accepts as argument a number \( a \), and evaluates to another function, \( {\lambda fx}.f\left( {afx}\right) \) . That function is not itself a Church numeral. However, if the argument \( a \) is a Church numeral, it reduces to one. Consider:\n\n\[ \left( {{\lambda a}.{\lambda fx}.f\left( {afx}\right) }\right) \bar{n} \rightarrow {\lambda fx}.f\left( {\bar{n}{fx}}\right) . \]\n\nThe embedded term \( \bar{n}{fx} \) is a redex, since \( \bar{n} \) is \( {\lambda fx}.{f}^{n}x \) . So \( \bar{n}{fx} \rightarrow {f}^{n}x \) and so, for the entire term we have\n\n\[ \operatorname{Succ}\bar{n} \rightarrow {\lambda fx} \cdot f\left( {{f}^{n}\left( x\right) }\right) , \]\n\ni.e., \( \overline{n + 1} \) .
Yes
Proposition 42.4. The addition function add is \( \lambda \) -definable.
Proof. Addition is \( \lambda \) -defined by the terms\n\n\[ \text{Add} \equiv {\lambda ab}.{\lambda fx}.{af}\left( {bfx}\right) \]\n\nor, alternatively,\n\n\[ {\operatorname{Add}}^{\prime } \equiv {\lambda ab} \cdot a\operatorname{Succ}b. \]\n\nThe first addition works as follows: Add first accept two numbers \( a \) and \( b \) . The result is a function that accepts \( f \) and \( x \) and returns \( {af}\left( {bfx}\right) \) . If \( a \) and \( b \) are Church numerals \( \bar{n} \) and \( \bar{m} \), this reduces to \( {f}^{n + m}\left( x\right) \), which is identical to \( {f}^{n}\left( {{f}^{m}\left( x\right) }\right) \) . Or, slowly:\n\n\[ \left( {{\lambda ab}.{\lambda fx}.{af}\left( {bfx}\right) }\right) \bar{n}\bar{m} \rightarrow {\lambda fx}.\bar{n}f\left( {\bar{m}{fx}}\right) \]\n\n\[ \rightarrow {\lambda fx} \cdot \bar{n}f\left( {{f}^{m}x}\right) \]\n\n\[ \rightarrow {\lambda fx} \cdot {f}^{n}\left( {{f}^{m}x}\right) \equiv \overline{n + m}. \]\n\nThe second representation of addition Add' works differently: Applied to two Church numerals \( \bar{n} \) and \( \bar{m} \) ,\n\n\[ {\operatorname{Add}}^{\prime }\bar{n}\bar{m} \rightarrow \bar{n}\operatorname{Succ}\bar{m} \]\n\nBut \( \bar{n}{fx} \) always reduces to \( {f}^{n}\left( x\right) \) . So,\n\n\[ \bar{n}\operatorname{Succ}\bar{m} \rightarrow {\operatorname{Succ}}^{n}\left( \bar{m}\right) . \]\n\nAnd since Succ \( \lambda \) -defines the successor function, and the successor function applied \( n \) times to \( m \) gives \( n + m \), this in turn reduces to \( \overline{n + m} \) .
Yes
Proposition 42.5. Multiplication is \( \lambda \) -definable by the term\n\n\[ \n\text{Mult} \equiv {\lambda ab}.{\lambda fx}.a\left( {bf}\right) x \n\]
Proof. To see how this works, suppose we apply Mult to Church numerals \( \bar{n} \) and \( \bar{m} \) : Mult \( \bar{n}\bar{m} \) reduces to \( {\lambda fx}.\bar{n}\left( {\bar{m}f}\right) x \) . The term \( \bar{m}f \) defines a function which applies \( f \) to its argument \( m \) times. Consequently, \( \bar{n}\left( {\bar{m}f}\right) x \) applies the function \
No
Lemma 42.8. The basic primitive recursive functions zero, succ, and projections \( {P}_{i}^{n} \) are \( \lambda \) -definable.
Proof. They are \( \lambda \) -defined by the following terms:\n\n\[ \text{Zero} \equiv {\lambda a}.{\lambda fx}.x \]\n\n\[ \text{Succ} \equiv {\lambda a}.{\lambda fx}.f\left( {afx}\right) \]\n\n\[ {\operatorname{Proj}}_{i}^{n} \equiv \lambda {x}_{0}\ldots {x}_{n - 1}.{x}_{i} \]
Yes
Lemma 42.9. Suppose the \( k \) -ary function \( f \), and \( n \) -ary functions \( {g}_{0},\ldots ,{g}_{k - 1} \), are \( \lambda \) -definable by terms \( F,{G}_{0},\ldots ,{G}_{k} \), and \( h \) is defined from them by composition. Then \( H \) is \( \lambda \) -definable.
Proof. \( h \) can be \( \lambda \) -defined by the term\n\n\[ H \equiv \lambda {x}_{0}\ldots {x}_{n - 1}.F\left( {{G}_{0}{x}_{0}\ldots {x}_{n - 1}}\right) \ldots \left( {{G}_{k - 1}{x}_{0}\ldots {x}_{n - 1}}\right) \]\n\nWe leave verification of this fact as an exercise.
No
Proposition 42.11. Every primitive recursive function is \( \lambda \) -definable.
Proof. By Lemma 42.8, all basic functions are \( \lambda \) -definable, and by Lemma 42.9 and Lemma 42.10, the \( \lambda \) -definable functions are closed under composition and primitive recursion.
Yes
Theorem 42.13. \( Y \) has the property that \( {Yg} \rightarrow g\left( {Yg}\right) \) for any term \( g \) . Thus, \( {Yg} \) is always a fixpoint of \( g \) .
Proof. Let’s abbreviate \( \left( {{\lambda ux}.x\left( {uux}\right) }\right) \) by \( U \), so that \( Y \equiv {UU} \) . Then\n\n\[ \n{Yg} \equiv \left( {{\lambda ux} \cdot x\left( {uux}\right) }\right) {Ug} \n\]\n\n\[ \n\rightarrow \left( {{\lambda x}.x\left( {UUx}\right) }\right) g \n\]\n\n\[ \n\rightarrow g\left( {UUg}\right) \equiv g\left( {Yg}\right) \text{.} \n\]\n\nSince \( g\left( {Yg}\right) \) and \( {Yg} \) both reduce to \( g\left( {Yg}\right), g\left( {Yg}\right) \overset{\beta }{ = }{Yg} \), so \( {Yg} \) is a fixpoint of \( g \) .
Yes
Lemma 42.14. If \( f\left( {{x}_{1},\ldots ,{x}_{k}, y}\right) \) is regular and \( \lambda \) -definable, then \( g \) defined by\n\n\[ g\left( {{x}_{1},\ldots ,{x}_{k}}\right) = {\mu yf}\left( {{x}_{1},\ldots ,{x}_{k}, y}\right) = 0 \]\n\nis also \( \lambda \) -definable.
Proof. Suppose the lambda term \( {F\lambda } \) -defines the regular function \( f\left( {\overrightarrow{x}, y}\right) \) . To \( \lambda \) -define \( h \) we use a search function and a fixpoint combinator:\n\n\[ \text{ Search } \equiv {\lambda g}.{\lambda f}\overrightarrow{x}y\text{. IsZero }\left( {f\overrightarrow{x}y}\right) y(g\overrightarrow{x}\left( {\operatorname{Succ}y}\right) \]\n\n\[ H \equiv \lambda \overrightarrow{x}.\left( {Y\text{ Search }}\right) F\overrightarrow{x}\overline{0}, \]\n\nwhere \( Y \) is any fixpoint combinator. Informally speaking, Search is a self-referencing function: starting with \( y \), test whether \( f\overrightarrow{x}y \) is zero: if so, return \( y \), otherwise call itself with Succ \( y \) . Thus (Y Search) \( F\overline{{n}_{1}}\ldots \overline{{n}_{k}}\overline{0} \) returns the least \( m \) for which \( f\left( {{n}_{1},\ldots ,{n}_{k}, m}\right) = 0 \).\n\nSpecifically, observe that\n\n\[ \text{(Y Search)}F\overline{{n}_{1}}\ldots \overline{{n}_{k}}\bar{m} \rightarrow \bar{m} \]\n\nif \( f\left( {{n}_{1},\ldots ,{n}_{k}, m}\right) = 0 \), or\n\n\[ \rightarrow \text{(YSearch)}F\overline{{n}_{1}}\ldots \overline{{n}_{k}}\overline{m + 1} \]\n\notherwise. Since \( f \) is regular, \( f\left( {{n}_{1},\ldots ,{n}_{k}, y}\right) = 0 \) for some \( y \), and so\n\n\[ \text{(Y Search)}F\overline{{n}_{1}}\ldots \overline{{n}_{k}}\overline{0} \rightarrow \overline{h\left( {{n}_{1},\ldots ,{n}_{k}}\right) }\text{.} \]
Yes