From: Thomas Walker Lynch Date: Mon, 3 Feb 2025 09:43:25 +0000 (+0000) Subject: . X-Git-Url: https://git.reasoningtechnology.com/style/rt_dark_doc.css?a=commitdiff_plain;h=b8139713e4e5d8480925017717b6b5c262362889;p=Ariadne . --- diff --git "a/developer/document\360\237\226\211/diagonalization.tex" "b/developer/document\360\237\226\211/diagonalization.tex" index 45e2486..679a937 100644 --- "a/developer/document\360\237\226\211/diagonalization.tex" +++ "b/developer/document\360\237\226\211/diagonalization.tex" @@ -1,3 +1,4 @@ +% Copyright (C) 2025 Thomas Walker Lynch \documentclass{article} \usepackage[english,iso]{isodate} \usepackage{booktabs} @@ -17,7 +18,9 @@ \author{Thomas Walker Lynch} \date{\today} % Automatically inserts today's date (or specify manually) - +\usepackage{fancyhdr} +\pagestyle{fancy} +\fancyfoot[C]{\copyright~2025 Thomas} \begin{document} @@ -27,19 +30,19 @@ [Reference some Cantor works, Kleene book.] - In the year 1891, Georg Cantor gave us an algorithm for constructing an exception to a given enumeration of numbers. The algorithm has three phases, initial setup, iteration, and finalization. + In the year 1891, Georg Cantor gave us an algorithm for constructing an exception to a proposed exhaustive enumeration of numbers. The algorithm has three phases, initial setup, iteration, and finalization. - The initial setup requires using the inverse of a 'representation function' to express each number in the enumeration as a 'representation', which must be a sequence of symbols. A table is then constructed such that each representation is placed on a row, while each symbol of the representation is placed in a column. For a not too long bounded enumeration the table can be explicitly constructed; otherwise the table is described using mathematical abstraction. + The initial setup requires using the inverse of a 'representation function' to express each number in the enumeration as a sequence of symbols called its 'representation'. A table is then constructed such that each representation is placed on a row, while each symbol of the representation is placed in a column. For a not too long bounded enumeration the table can be explicitly constructed; otherwise the table is described using mathematical abstraction. - After the initial setup, a step by step algorithm instructs the construction of a symbol sequence not to be found in the table. This 'exception sequence' is to be constructed symbol by symbol. It is possible that the exception sequence is given an symbol sequence prefix, but for now we will consider the case of no such prefix. + After the initial setup, a step by step algorithm instructs the construction of a symbol sequence not to be found in the table. This 'exception sequence' is to be constructed symbol by symbol. It is possible that the exception sequence is commense with a fixed symbol sequence prefix, but for now we will consider the case of no such prefix. - Starting at iteration step 0, the algorithm reads the first symbol on the diagonal, i.e. the one located at row \(0\) and column \(0\). This symbol is given to a 'symbool altering function'. This function is given a single symbool and returns a different symbol. The new symbol output from the symbol altering function is appended to the exception sequence. In some formulations of the algorithm, the exception sequence might not be empty, but for our purposes in this section, we will assume that the initial exception sequence is empty, so in step \(0\) it is given a first symbol, and this symbol is different than the symbol found for the row \(0\) symbol sequence first symbol. Continuing in this manner, at step \(n\) the symbol appended to the exception sequence will differ at symbol \(n\) from the row \(n\) sequence symbol \(n\). Thus by inductive reasoning this algorithm will produce a symbol sequence not found in the table. + Starting at iteration step 0, the algorithm reads the first symbol on the diagonal, i.e. the one located at row \(0\) and column \(0\). This symbol is given to a 'symbol altering function'. This function is given a single symbol and returns a different symbol. The new symbol output from the symbol altering function is appended to the exception sequence. In some formulations of the algorithm, the exception sequence might not be empty, but for our purposes in this section, we will assume that the initial exception sequence is empty, so in step \(0\) it is given a first symbol, and this symbol is different than the symbol found for the row \(0\) symbol sequence first symbol. Continuing in this manner, at step \(n\) the symbol appended to the exception sequence will differ at symbol \(n\) from the row \(n\) sequence symbol \(n\). Thus by inductive reasoning this algorithm will produce a symbol sequence not found in the table. This method is called the 'Diagonal Method' because all the row \(n\) sequence symbol \(n\)symbols are found along the primary diagonal of the table, Finally, given that each symbol sequence, according to the representation function, represents a distinct number, the conclusion of the inductive phase implies that the exception sequence represents a distinct number from those found in the rows of the table. The one to one constraint placed on the representation function can be relaxed, as the rows of the table actually need not be distinct. Rather the only true requirement is that the exception sequence be different than all the rows. - Cantor's algorithm is often introduced with demonstration shows that an enumeration of numbers with fraction digits, say of the form \(1.xxxxx...\) fails to be exhaustive, proving that the set of real numbers between 1 and 2 is uncountable. However, a more structured presentation of the method would first apply Cantor’s algorithm to the \textbf{sequence of Natural Numbers}, where it should fail to produce an exception. Hence in this section we will examine the an exhaustive enumeration of the binary Arabic representation symbol sequences for the \textbf{Natural Numbers},and demonstrate that the construction of a sequence from the diagonal fails to be exceptional. + Cantor's algorithm is often introduced with demonstration shows that an enumeration of numbers with fraction digits, say of the form \(1.xxxxx...\) fails to be exhaustive, proving that the set of real numbers between 1 and 2 is uncountable. However, a more structured presentation of the method would first apply Cantor’s algorithm to the \textbf{sequence of Natural Numbers} to demonstrate what a failure to produce an exception looks like. Hence in this section we will examine the an exhaustive enumeration of the binary Arabic representation symbol sequences for the \textbf{Natural Numbers},and demonstrate that the construction of a sequence from the diagonal fails to be exceptional. The table below illustrates an enumeration of the \textbf{Natural Numbers} in binary form. \textbf{Zero is included} in this definition so that arithmetic retains an additive identity. The bits on the diagonal are given to a symbol altering function and appended to an initially empty exception sequence, in a step by step manner. @@ -72,11 +75,11 @@ The number of symbols used to represent a number in Arabic representation, i.e. the length of a number, is logarithmically proportional to the value of the number being represented. This can be seen in the table above by noting the location of the leftmost bit in each row of the table, and how it only slowly occupies a more leftward digit position when walking down the table. In contrast, the diagonal grows in length linearly when stepping down the table. Consequently, once the diagonal departs from the length of a represented number, it will be forevermore in the land of zero symbols. - For a binary string, there is exactly one digit local modification function that will change the value of the represented number each time it is called, and that is the function that exchanges the \(0\) symbol for the \(1\), and vice versa, i.e. does a bit flip. If a number representation has a \(0\) in bit position \( i \), then flipping that bit will add \( 2^i \) to the number, thus producing a different number. Conversely, if a number representation has a \( 1 \) in bit position \( i \), flipping the bit will subtract \( 2^i \). + For a binary string, the only function that always alters a bit, is the bit flip function. When given a \(0\) it returns a \(1\), and when given a \(1\) it urns a \(0\). If a number representation has a \(0\) in bit position \( i \), then flipping that bit will add \( 2^i \) to the number, thus producing a different number. Conversely, if a number representation has a \( 1 \) in bit position \( i \), flipping the bit will subtract \( 2^i \). In either case, the resulting number is different than the given number. - Thus, it seems that we have all the prerequisites necessary for constructing an exception number, as we have an enumeration of the numbers, digit by digit, in a table. We have a definition for the diagonal, and we have a function that produces a number that is unique to the table discovered thus far as we walk down it step by step. It would seem then, by induction, we should be able to produce an exception to the enumeration of natural numbers, while this exception will be a string of one and zero symbols. + Thus, it seems that we have all the prerequisites necessary for constructing an exception number, as we have an enumeration of the numbers, digit by digit, in a table. We have a definition for the diagonal, and we have a function that produces a number that is unique to the table discovered thus far, as we walk down it step by step. It would seem then, by induction, we should be able to produce an exception to the enumeration of Natural Numbers. - For step \(0\) the initial case, on row 0, the column zero digit is \(0\) so that is flipped to to get \(1\). As Cantor promised, this makes the diagonal different from the number in row zero; however, this exception number prefix is identical to the number in the next row, row 1. Stepping down to row 1, we rectify this problem by flipping the row 1 column 1 bit, and appending that to the exception number, yielding an exception number prefix of \(11\). The diagonal prefix is now indeed different from the row 0 number, and different from the row 1 number, but alas, it is now identical to the row 3 number. So as we proceed step by step we find the following values: + For step \(0\) the initial case, on row \(0\), the column zero digit is \(0\) so that is flipped to to get \(1\). As Cantor promised, this makes the diagonal different from the number in row zero; however, this exception number prefix is identical to the number in the next row, row 1. Stepping down to row 1, we rectify this problem by flipping the row 1 column 1 bit, and appending that to the exception number, yielding an exception number prefix of \(11\). The diagonal prefix is now indeed different from the row \(0\) number, and different from the row 1 number, but alas, it is now identical to the row 3 number. So as we proceed step by step we find the following values: \begin{table}[H] @@ -102,11 +105,11 @@ In the English language, text symbols are conventionally written from left to right. In contrast when writing sequences of digit symbols, English writers shift directions from right to left. In Arabic both text characters and number symbols are written from right to left. We have middle aged translators to blame for the inconsistency in English, as they insisted on left to right writing, while being fearful of provoking the God of Arithmetic by also reversing the sequences of digit symbols. Fortunately, Cantor's method is agnostic to the direction the symbol sequences are written. As we described it here, it only depends upon the row and column indexes being incremented. The symbols in the table could have been listed either left going or right going. That we can apply this algorithm to numbers is due to the properties of the number representation mapping. - In the binary Arabic notation for Natural numbers, the bit weights are \(2^j\) where \(j\) is the sequence index for the bit, starting from zero. If we instead use a negative power in the weights, \(2^{-j}\), without changing the table, the representations will be for the numbers between 0 and 1. And if we want a fraction in normal form, we can prepend a \(1\) to both the row sequences and the initial exception sequence, and without changing the table, numbers will range from 1 to 2. However, if we accept that an unbounded sequence of one symbols, \(.11111...)\) is equivalent to a carry, \(1.00...\) then the Arabic representation for fractions fails to place symbol sequences into one to one correspondence with numbers. Thus applying Cantor's method to fractions requires an additional reasoning step that explains the effect, if any, of this recurrent wrinkle in the representation function mapping. We will come back to this in a later section. + In the binary Arabic notation for Natural Numbers, the bit weights are \(2^j\) where \(j\) is the sequence index for the bit, starting from zero. If we instead use a negative power in the weights, \(2^{-j}\), without changing the table, the representations will be for the numbers between 0 and 1. And if we want a fraction in normal form, we can prepend a \(1\) to both the row sequences and the initial exception sequence, and without changing the table, numbers will range from 1 to 2. However, if we accept that an unbounded sequence of one symbols, \(.11111...)\) is equivalent to a carry, \(1.00...\) then the Arabic representation for fractions fails to place symbol sequences into one to one correspondence with numbers. Thus applying Cantor's method to fractions requires an additional reasoning step that explains the effect, if any, of this recurrent wrinkle in the representation function mapping. We will come back to this in a later section. \section{The Index Tree Iterator} - An Index Tree is an infinite graph. Each node has an unbounded number of children, and there is an unbounded number of levels in the tree. Each node has a label that consists of a sequence of Natural Numbers. The root node is an empty sequence. The unbounded number of children of the root node each has as a label a sequence with a single Natural number. The next level down, the node sequences are two numbers long. Etc. + An Index Tree is an infinite graph. Each node has an unbounded number of children, and there is an unbounded number of levels in the tree. Each node has a label that consists of a sequence of Natural Numbers. The root node is an empty sequence. The unbounded number of children of the root node each has as a label a sequence with a single Natural Number. The next level down, the node sequences are two numbers long. Etc. \begin{figure}[H] \centering @@ -129,7 +132,7 @@ \[n = x + y\] - Accordingly, when \(n\) is zero, \(x\) and \(y\) must be \(0\). When \(n\) is a larger number, \(x\) will be range from \(0\) to \(n\), while \(y\) takes on the value \(n - x\). Due to both the diagonal index and the shell having to be numerated, this will take \(t^2\) number of steps, each step visiting a single pair, and t is the step index. And it must be this way because the area of the triangle that results from adding multiple diagonals is size \(1/2 x^2\). + Accordingly, when \(n = 0\), \(x\) and \(y\) must be \(0\). When \(n\) is a non-zero number, \(x\) will range from \(0\) to \(n\), while \(y\) takes on the value \(n - x\) at each step. Due to both the diagonal index and the shell having to be numerated, this will take \(t^2\) number of steps, each step visiting a single pair, and t is the step index. And it must be this way because the area of the triangle that results from adding multiple diagonals is size \(1/2 x^2\). Another approach is to enumerate in rectangular shells, with the following traversal function: @@ -197,7 +200,7 @@ \label{tab:swapped_natural_numbers} \end{table} - This is a table of Natural Numbers. For example, \(F_0(0)\) is the Natural number returned by \(F_0\) when it is passed the Natural Number of \(0\). \(F_0(1)\) is the Natural Number returned by the function \(F_0\) when passed the Natural Number \(1\) etc. Hence, the columns enumerate the Natural Numbers, while each row represents a function of the Natural Numbers. As no definition has been given for the functions, the table is an abstraction for any enumeration of functions over the Natural Numbers. + This is a table of Natural Numbers. For example, \(F_0(0)\) is the Natural Number returned by \(F_0\) when it is passed the Natural Number of \(0\). \(F_0(1)\) is the Natural Number returned by the function \(F_0\) when passed the Natural Number \(1\) etc. Hence, the columns enumerate the Natural Numbers, while each row represents a function of the Natural Numbers. As no definition has been given for the functions, the table is an abstraction for any enumeration of functions over the Natural Numbers. In the table of the prior section, we each entry in the table was a symbol among the alphabet of binary digit symbols, namely \({0,1}\). For this table we will speak more generally of having a Natural Number per table entry. Hence we generalize our symbol altering function to be a Natural Number altering function. And as promised earlier we will allow for some arithmetic, namely we will allow the operation of Natural Number addition. Accordingly, we can add any Natural Number other than zero to \(F_i(j)\) to create a new function that has a different value at this point. Likewise, if \(F_i(j)\) is nonzero, we can add any Natural Number that is less than \(F_i(j)\) to create a new function that is different than \(F_i(j)\). @@ -219,9 +222,9 @@ \label{tab:exception_prefixes} \end{table} - The first prefix of the Exception Function differs from the row \(0\) function for the domain value of \(0\), but does this function appear further in the table? We can't really know as we never said specifically what the functions in the table are. The second prefix of the Exception Function prefix differs from the row \(1\) function for the domain value of \(1\), and from the row \(0\) prefix by for the domain value of \(0\), but we are no closer to knowing if this function appears lower in the table, as will be the case for all the prefixes, as none of these help us know that the unspecified F functions in the enumeration actually are. + The first prefix of the Exception Function differs from the row \(0\) function, \(F_0\) for the domain value of \(0\), but we can not determine whether this function occurs later in the table since the functions \(F_n\) are unspecified. The next Exception Function prefix differs from the row \(1\) function, \(F_1\) for the domain value of \(1\), and still differs from \(0\) function for the domain value of \(0\), but we are no closer to knowing if this function appears lower in the table, as will be the case for all the prefixes, because none of these help us know the definitions of the unspecified \(F_n\) functions further on in the table. Each time we determine an exception it simply pushes the question if it matches other functions further down the table. - Perhaps it will help us understand this technique better if start with a specific proposal for an enumeration of the functions over Natural Numbers. As it so happens, we already have such a proposal in the previous section, because a sequence of Natural Numbers is a function of the sequence index, staring at index 0. So for example, in row 4 of the Diagonal Enumeration of Index Labels, we see the sequence \([0 1 0]\) This is the function \(F(0) = 0, F(1) = 1, F(2) = 0\). It follows, since the Index Tree iterator visits every node in the Index Tree, that it also enumerates every sequence of Natural numbers, and thus enumerates every function of Natural Numbers. + Perhaps specific proposal for an enumeration of the functions over Natural Numbers would better help us understand Cantor's technique. As it so happens, we already have such a proposal in the previous section, because a sequence of Natural Numbers is a function of the sequence index, staring at index 0. So for example, in row 4 of the Diagonal Enumeration of Index Labels, we see the sequence \([0 1 0]\) This is the function \(F(0) = 0, F(1) = 1, F(2) = 0\). It follows, since the Index Tree iterator visits every node in the Index Tree, that it also enumerates every sequence of Natural Numbers, and thus enumerates every function of Natural Numbers. \begin{table}[H] \centering @@ -252,7 +255,7 @@ \end{table} - Here the row \(0\)function has no domain, nor range. It is the null function. The row 1 function has only \(0\) in its domain, and the function defined at that point is \(0\). Looking further down the table for another example, row \(10\) is defined for the domain \({0, 1, 2}\) with \(F(0)=0, F(1)=1, and F(2)=0\). Coverage of the domain indeed grows very slowly, but any bound chosen for the domain will eventually be passed. With an unbounded table, the domain is unbounded. Furthermore as every node in the Index Tree is eventually traversed, for an unbounded function, all single argument Functions over the Natural Numbers will be found in the table. + Here the row \(0\) function has no domain, nor range. It is the null function. The row 1 function has only \(0\) in its domain, and the function defined at that point is \(0\). Looking further down the table for another example, row \(10\) is defined for the domain \({0, 1, 2}\) with \(F(0)=0\), \(F(1)=1\), and \(F(2)=0\). Coverage of the domain indeed grows very slowly, but any bound chosen for the domain will eventually be passed. With an unbounded table, the domain is unbounded. Furthermore as every node in the Index Tree is eventually traversed, for an unbounded function, all single argument Functions over the Natural Numbers will be found in the table. We find a similar situation as for the enumeration of Natural Numbers in that the diagonal grows faster than the sequences. Each diagonal calls for descent from the prior diagonal, and this increases the length of the sequences by one. However, each diagonal grows exponentially in length, and is then enumerated, essentially folding it down the table. Consequently the increasing length of 1 is seen exponentially further down the table. This means the maximum sequence length is growing logarithmically. Where as when we enumerated the Natural Numbers this caused the diagonal to fill with zeros, here the diagonal is going to fill with null values due to the domain not being defined. @@ -274,7 +277,7 @@ \label{tab:exception_prefixes} \end{table} - Note, row \(0\) exception function is found in row \(1\) of the table. The row \(1\) exception function is found in row 4 of the table. The next prefix if found in row \(8\). In general the \(n\)th prefix is found in row \(2^n\). Hence the diagonal method fails to create an exception to this enumeration of the Functions over the Natural Numbers. + Note, the row \(0\) exception function prefix is found in row \(1\) of the table. The row \(1\) exception function prefix is found in row 2 of the table. The row \(2\) prefix is found in row \(4\). In general the \(n\)th prefix is found in row \(2^n\). Hence the diagonal method fails to create an exception to this enumeration of the functions over the Natural Numbers.