Manuscript Offprint
arXiv:2611.06562Mortality Is Undecidable for Integer Matrices
Abstract
The matrix mortality problem asks whether a given finite family of matrices can be multiplied, in any order and with possible repetition, to get the zero matrix. It is one of the most basic decision problems about matrix products, and it arises naturally in the study of switched linear systems and of finite automata. Mortality is trivially decidable in dimension one and has been known to be undecidable for integer matrices in dimensions three and higher since 1970; only the problem in dimension 2 is left open. We resolve this problem by proving that mortality is undecidable for families of 5,799 distinct integer matrices. All but one of the matrices are fixed and nonsingular, with determinants for a single fixed prime . The input affects only the remaining rank-one matrix, which encodes this input into its kernel.
Our proof encodes the computation of a fixed universal machine into products of matrices. We represent each configuration of the computation by a single rational number, which we identify with a line through the origin in , and each nonsingular matrix carries out a small piece of one computation step. The main difficulty is that the matrices may be multiplied in any order, so we design them to check their own work: a “wrong” step puts a factor of a prime number into the denominator of the rational number corresponding to the current computation step, where no later matrix can remove it. As a result, products of these matrices can go from one encoded configuration to another only by following a valid computation. The rank-one matrix then turns the question of whether the machine halts into the question of whether some product equals zero. A companion formalization in the Lean proof assistant verifies the complete reduction.
† Email: tquartz@uwaterloo.ca ‡ Email: i3shevch@uwaterloo.ca § Email: hans.desterck@uwaterloo.ca ¶ Email: j.liu@uwaterloo.ca
Contents
Part I. Main results and technical overview 1
1 Introduction and main result 1
2 Overview of the proof 2
3 Rank-one conversion of reachability into mortality 3
4 From two counters to a reversed one-counter program 4
4.1 The fixed universal two-counter machine ..... 4
4.2 Prime-exponent simulation by a one-counter program ..... 5
4.3 Reachability from a fixed configuration ..... 5
5 Encoding configurations and enforcing control with matrices 6
5.1 Periodic counter encoding and digit checks ..... 7
5.2 State encoding and matrix generators ..... 7
5.3 Conditions for preserving program reachability ..... 8
6 Implementing the arithmetic instructions with matrices 9
6.1 Increment and congruence tests using digit scans ..... 9
6.2 Division by comparing period lengths ..... 10
6.3 Contractions by block removal and output recovery ..... 10
6.4 Correct updates and residue bound ..... 11
7 Completing the proof of the main result 12
Part II. Detailed proofs and constructions 13
A Proof of the rank-one conversion lemma 13
B The fixed machine and reversed program 13
C Valuations, scans, and elementary instruction modules 16
D Contraction instruction modules 23
E Generator count and padding to an exact family size 29
F Related decidability and membership results 30
G Formal verification 31
H Conclusion and open problems 31
I AI methodology 32
ii
Part I. Main results and technical overview
In dimension one, mortality is decidable by checking whether the family contains zero, and in dimensions three and higher it has been known to be undecidable since 1970 [Pat70]. The two-dimensional case has remained open [BB99, Section 1], [BB02, Open Problem 1]. Partial results establish decidability for families of two rational matrices [BB02, Theorem 4], for finite rational families containing at most one nonsingular matrix [Hec19, Theorem 1], and for integer families in which every matrix has determinant in [NR08]. Appendix F surveys further results.
A major difficulty in proving undecidability for matrix mortality is figuring out how to encode computation with matrix multiplications. Since given matrices can be multiplied in any order and used arbitrarily often, when they represent transitions of a machine there is nothing which forces a product to follow a legal execution; yet, we somehow need to distinguish between zero and non-zero products in relation to whether the machine halts or not. For dimension two, we have the additional difficulty that there are no spare coordinates for bookkeeping. This is related to the fact that one-dimensional subspaces of are determined by a single rational number, and so corresponding machine configurations must be packed into one number. Yet another difficulty is imposed on us by the fact that if a collection of nonsingular matrices all have integer entries and determinant one, then there is an algorithm to decide whether a product of their fractional linear transformations maps one given rational point to another [PS19, Theorem 14]. As such, we must be careful to ensure that not all of the matrices in our construction have determinants equal to one.
We resolve the two-dimensional case by proving that mortality is undecidable for integer matrices, in the following strong form. Write to denote the matrices with entries in , and and for the column space and the kernel of .
Theorem 1.1 (Mortality with one variable matrix). There exist a prime , a fixed finite family of nonsingular matrices with determinants in , and a fixed rational line such that no algorithm decides, given a nonzero rank-one matrix with , whether is mortal.
Corollary 1.2. The family in Theorem 1.1 can be chosen to have exactly 5,798 distinct matrices. Consequently, mortality is undecidable for families of exactly 5,799 two-by-two integer matrices.
All but one of these matrices are fixed in advance, and the input enters only through the “kernel line” of , whose image is the fixed line . The hardness of mortality in dimension two thus resides in the choice of one rational line. In contrast, the membership of a prescribed nonsingular matrix in the products of nonsingular integer matrices is decidable [PS17a, Theorem 2.1]. In Appendix F we explain why that algorithm does not apply to a prescribed line. In our construction we represent the configurations of a fixed program by rational lines, and build “checks” for this program’s control states and arithmetic updates into certain matrix actions. These checks ensure that a product of the nonsingular matrices can map one encoded configuration to another only if the program can reach the second configuration from the first. The arbitrary-looking number 5,799 in Theorem 1.2 is the size of the family of matrices our construction produces from one particular universal machine, and it is not optimized. Section 2 gives an overview of the construction. Part II contains the detailed proofs and generator tables, followed by a description of a companion formal verification.
2 Overview of the proof
To prove Theorem 1.1, we start from the undecidable halting problem for a fixed two-counter machine (Theorem 4.1). Figure 1 shows the three equivalences that connect this problem to matrix mortality. We first express this halting problem as reachability in a fixed arithmetic program , then implement with a fixed matrix family . The reduction is completed by appending a rank-one matrix to the family . The figure also keeps track of what remains fixed and what depends on the input .

Figure 1: The three equivalences proving Theorem 1.1, established by Theorem 4.3, Theorem 5.5 with Theorem 6.1, and Theorem 3.1, respectively. Beneath each step of the proof, we list the fixed objects and the object that varies with the input .
From the machine to a one-counter program (Section 4). We first encode 's two counters in a single integer using prime factorization, which will later be represented by a rational number. The two counter values are the exponents of 2 and 3 in the prime factorization of the number , and we translate their increments, decrements, and zero tests into arithmetic updates and tests on . The simulation starts from , representing 's initial state and counter values . However, our reduction requires a fixed starting configuration corresponding to the fixed image of the matrix in Theorem 1.1. Running the simulation backwards (i.e., reversing the transitions) would move the input into the target, but the counter may have different values when halts on different inputs. We therefore add a routine at the halt state that reduces the counter to zero, allowing every halting computation to reach the same endpoint . Reversing the resulting transitions gives the one-counter program , with this common endpoint as its fixed “source” and the simulation’s original starting configuration as its “target”. This target is reachable exactly when halts on input (Theorem 4.3).
From the program to projective reachability (Sections 5 and 6). Building on the one-counter program from Section 4, we construct matrices that simulate its instructions. We represent each configuration of the program by a rational number corresponding to a rational line, on which the matrices act. For a prime number , we store the counter value in a rational number whose base- digits, starting from the lowest, repeat the block ; the number of zeros records . A matrix can delete the lowest digit of a number, and each such matrix is built to expect a particular digit: if the actual digit is different, a factor of appears in the denominator and marks the error. Deleting the zeros of one block and then its final 1 returns to , so the matrices can read and test the counter without changing it. To record the state as well, we shift the number by an integer that depends on the state , and call the result the configuration code . The shifts are chosen so that the residue of the code modulo reveals the state; as a result, a matrix intended for one state rejects a configuration in any other state. One instruction may require several matrix multiplications, so we implement it by a finite graph whose vertices record its intermediate stages. Each edge supplies a single matrix that removes the shift for its source state, performs the prescribed arithmetic operations and digit deletion, and adds the shift for its destination state, as in (5.2). Loops in the graph let the number of multiplications depend on , using the same fixed matrices. A path from the source of to the target then gives a matrix product mapping the encoded source to the encoded target .
From projective reachability to mortality (Section 3). The matrices in are nonsingular, so their products cannot be zero. We therefore add a rank-one integer matrix , choosing its image to be the fixed rational line represented by a rational number and its kernel to be the line represented by a rational number . For a product of matrices from , suppose sends the line onto ker . Then since maps the plane onto and also maps ker to zero, we have . Conversely, Theorem 3.1 shows that any zero product of matrices from yields a product of matrices from satisfying (here, we are identifying and with the lines they are representing). Thus is mortal exactly when halts on input . This keeps and fixed and places the input entirely in the kernel of , as required by Theorem 1.1.
The most delicate step in this whole scheme is the converse of the second equivalence in Figure 1: a product of matrices from must be able to “connect” two encoded configurations only by following a valid computation of . Since every matrix in can be used at any step, the instruction graphs alone do not restrict a product. We need to construct the matrices so that a wrong state or digit choice prevents any further product from from reaching an encoded target (Theorems 5.2 and 5.4). A product may still pass these checks while repeating an operation the wrong number of times. Section 6 checks whether these repetitions give the required arithmetic update and ensures that a product cannot switch instructions to avoid the tests. Thus every product from connecting encoded configurations corresponds to a valid computation of (Theorems 5.5 and 6.1).
3 Rank-one conversion of reachability into mortality
We begin with the last equivalence in Figure 1. The points of the rational projective line correspond exactly to the one-dimensional subspaces of . For arbitrary rational numbers with , the vectors and span the same line, which we represent by . The single line not represented by any rational number in this way, which is spanned by , is taken to be represented by . Denote by the nonsingular rational matrices. A matrix sends to and therefore acts by , with and any zero denominator interpreted as .
We call the matrices in a finite family its generators. In a product , the matrix acts first. We write for the set of all finite products, including the identity, and for products of positive length. Given together with source and target points , the question of exact projective reachability asks whether for some product .
A nonzero rank-one matrix , with column vector spanning a line and row vector having the line as the kernel, has image and kernel . If a product sends to , then maps onto , maps onto , and annihilates , so . This is because , and exactly when . Conversely, every zero product over contains , since the other generators are invertible, and the identity applied between consecutive occurrences of , with allowed, expresses the product as times scalars , one of which must vanish. The lemma below restates the outer-product reduction of [CHHN14, Lemma 6 and Proposition 4] in projective form (see also [BB02, Lemma 2], and [PS17b, Proposition 12] for nonsingular integer generators with determinant ). This rank-one conversion is also used in the NP-hardness reduction in [JK20, proof of Theorem 4]. The full proof of the lemma is given in Appendix A.
Lemma 3.1 (Rank-one conversion). Let be finite, and let be rational lines. Choose a nonzero integer column spanning and a nonzero integer row with kernel , and set . Then is a nonzero integer matrix of rank one, with image and kernel , and
To prove Theorem 1.1, we need a fixed family and source , with only the target varying. The following theorem constructs targets reachable from exactly when halts from , for . The machine is specified in Section 4 and the proof of the result is given in Section 7.
Theorem 3.2 (Fixed-family projective reachability). There exist a fixed prime , a fixed finite family with determinants in , a fixed point , and a computable sequence in such that
Given Theorem 3.2, applying Theorem 3.1 with the source and target yields a computable rank-one matrix with fixed image such that is mortal exactly when halts, which proves Theorem 1.1 (Section 7). The rest of Part I proves Theorem 3.2.
4 From two counters to a reversed one-counter program
This section describes the proof of the first equivalence in Figure 1: a fixed universal two-counter machine U is simulated by a one-counter program whose single counter stores both counters as prime exponents, and the program is reversed so that its starting configuration is fixed and only its target configuration depends on the input.
4.1 The fixed universal two-counter machine
A configuration of the two-counter machine is a triple , where is the current state and, for each , denotes the value currently stored in counter . The machine has initial state and halt state , which has no outgoing instruction and hence no outgoing edge. Each state apart from has one of the following instructions, which acts on only one selected counter and leaves the other counter unchanged.
(1) Increment. The instruction replaces by and moves the machine to a specified destination state . For example, incrementing the first counter gives .
(2) Conditional decrement. The instruction specifies two (possibly the same) destination states, for the zero branch and for the positive branch. If , the machine moves to without changing either counter. If , it replaces by and moves to . For example, a conditional decrement of the first counter gives when , and when .
We start from the two-counter simulator of Ivanov, Pelz, and Verlan [IPV14, Section 3], detailed in [Iva15, Section 5.2 and appendix], which simulates Korec's universal register machine [Kor96, Main Theorem (b2), Definition 2.3(v)]. We obtain by merging states in repeated routines of this simulator, without changing whether it halts (Appendix B.1). The following proposition is proved in Appendix B.2.
Proposition 4.1 (Fixed two-counter machine). For the fixed machine , there is no algorithm that, given , decides whether halts from .
4.2 Prime-exponent simulation by a one-counter program
We encode both counters in a single nonnegative integer using the prime-exponent simulation [Min67]. For a prime , let denote the exponent of in the positive integer . Setting , we interpret and as the values of counters zero and one, respectively.
Definition 4.2. A one-counter arithmetic program (or simply a program when the meaning is unambiguous) is a finite directed graph, allowing loops and multiple outgoing edges, whose edges are labelled by partial maps . A configuration consists of a program state and a counter value . An edge permits the step exactly when is defined. We write when a finite, possibly empty sequence of these steps reaches state with counter value exactly .
We first construct a one-counter arithmetic program on the states of , initialized at to simulate from , since and . Each transition of becomes an edge in . We describe the updates using , so an update gives . The following three cases specify the one-counter updates and their domains.
(1) Increments. An increment of counter zero or one multiplies by two or three, respectively. This increases the corresponding prime exponent by one and leaves the other unchanged.
(2) Zero branches. The zero branch of a conditional decrement leaves unchanged. For counter zero, it is defined when , equivalently . For counter one, it is defined when , equivalently .
(3) Positive branches. For counter zero, the positive branch applies when . For counter one, it applies when . Division reduces the corresponding prime exponent by one, while multiplication by five changes neither exponent because five is coprime to two and three. We include this factor so that both updates increase . The reversal of these instructions multiply by or , which we call contractions.
4.3 Reachability from a fixed configuration
The starting configuration of depends on the input, but the fixed source line im requires a fixed starting configuration (Theorems 1.1 and 3.1). Reversing the transitions would put the input in the target configuration. Since the counter may have different values at , we first arrange for all halting computations to reach the same final configuration.
(1) Create a common final configuration. We add the loop , for , to as the only outgoing edge at . This enables every halting computation to reach .
(2) Reverse the transitions. We construct by replacing each edge of with . Each edge map is injective on its domain, so its inverse is defined on its range. Table 1 lists the inverse updates and their domains in .
Table 1: Instructions of and the edges of they reverse, with and fixed and . Decrements refer to positive branches. Tests are identities on their domains.
| Instruction of | Partial update | Forward map in | Edge of |
|---|---|---|---|
| Inc | Cleanup | ||
| Test | when | the same | Zero branch |
| Div | Increment counter zero | ||
| Div | Increment counter one | ||
| Con | Decrement counter zero | ||
| Con | Decrement counter one |
The following theorem connects this construction back to : starting from , reaches exactly when halts on input . This result establishes the first equivalence in Figure 1. Its full proof is given in Appendix B.3.
Theorem 4.3. There is a fixed one-counter arithmetic program using the instructions in Table 1 such that, for every ,
Proof sketch. Under the encoding and , simulates the instructions of before cleanup, reproducing its counter changes, state transitions, and branch conditions. Thus , started at , reaches exactly when halts on input . Cleanup then reduces the counter until we get the configuration . Since cleanup is available only at , it cannot make a nonhalting input reach this configuration. The inverse updates defining are defined exactly on the ranges of the forward updates, so every path of reverses to a valid path of , and vice versa. Therefore, the fixed program reaches from its fixed starting configuration exactly when halts on input .
5 Encoding configurations and enforcing control with matrices
We represent each configuration of by a rational point representing its state and counter value. Since matrices can be multiplied in any order, we must ensure that a product maps one encoded configuration to another only when can reach the second configuration from the first one. We organize the matrix operations for each instruction in a finite directed graph, called an instruction module. Each edge contributes one matrix to , and loops allow the number of multiplications to depend on the counter value. This section defines the encoding, the edge matrices, and the requirements for each module. Section 6 constructs the modules and verifies these requirements.
Definition 5.1. An instruction module (or module) for a program edge is a finite directed graph with entry and exit , which may coincide. The program states and are called boundaries. All other vertices are intermediate states, distinct from all program states and from the intermediate states of every other module. Each edge starts at or an intermediate state and ends at or an intermediate state.
5.1 Periodic counter encoding and digit checks
We encode the counter value by the rational number , called the unary code whose base- digits periodically repeat the block , where is prime. The zeros record , and reading a full period returns the same code. We read digits starting with the coefficient of . Writing separates the first digit from the remaining digits represented by . We call the digit deletion map for , since applying it removes and leaves . For the block , the first digits contribute , while the remaining digits repeat the same block. Thus , giving . A matrix word can also choose the wrong digit. To detect this, define
Every unary code lies in because does not divide its denominator . For a reduced fraction , we compute its residue as modulo . Applying gives , where the new factor cancels exactly when . Otherwise, remains in the reduced denominator and the result lies in the error set . Every matrix in will keep points of in , preventing any return to an encoded configuration. The following lemma states this digit check.
Lemma 5.2. Each digit deletion maps into itself. For , we have if and only if .
We use this digit check in the two operations described below:
(1) Scan to a marker. We call the expected digit the marker. A marker scan applies zero or more times, then to delete this marker. For , it stays in only by deleting all initial zeros and then a digit matching modulo . Thus the input fixes the scan length, including the marker deletion. For example, applying to reads 001 and returns to . Using after only one enters , since the next digit is zero.
(2) Guess a length. For division and contraction instructions in Table 1, a word chooses a positive number of zeros to delete, applies , and then proceeds without deleting the marker. On input , every choice passes the digit checks and leaves zeros before the marker. We call a guess because the word chooses it before checking whether it is correct for the instruction. For example, division by requires the proposed output to satisfy , but the digit checks only verify that the deleted digits are zeros.
5.2 State encoding and matrix generators
Recording the state. The unary code records the counter value. We encode the graph state by adding an integer chosen for that state to . We choose these shifts so that applying a matrix intended for another state fails the digit check and sends the value into . Unary codes have residue zero or one, but intermediate values in can have other residues, including after incorrect guesses. We reserve the six residue representatives . Let count all program and private intermediate states in the instruction graphs. We index these states, also called phases, by , choose a prime , and define the shifts and configuration encoding by
During an instruction, we write the current point as , where is the local value obtained by removing the state shift. The arithmetic acts on this value, which need not be a unary code. If has residue in , adding places the residue of in the block . Since , these blocks are disjoint modulo . The block therefore identifies the state , and subtracting its shift gives the residue of the local value .
Changing the counter code. Correct digit deletions let us read a unary code, but do not change its period length. To change the counter value, we therefore need additional maps, which we call auxiliary maps. We use , where and . For , this gives , so these maps can change the denominator by a multiple of the numerator. The following lemma shows that these maps and the state shifts keep points of in , so they cannot undo a failed digit check. Its proof is in Appendix C.1.
Lemma 5.3. Integer translations and the maps preserve and bijectively. Moreover, for every .
Constructing each generator. For an edge , we remove the shift using so that the arithmetic acts on the local value . The arithmetic constructions may need to modify this value before or after deleting a digit, so we allow an auxiliary map on each side of , where .
We choose so that the arithmetic before deletion preserves the residue tested by on . After deletion, makes any further arithmetic change needed by the edge, and adds the shift for the destination state. Here and , and either auxiliary map may be the identity. Since the rightmost factor acts first, these operations give
We include the product in (5.2) in as one integer matrix with determinant . Its factors are not supplied separately, so a word cannot apply the arithmetic maps while skipping the digit check.
Suppose the current local value lies in and has residue in . A generator intended for another state removes the wrong shift, leaving a residue outside that cannot match its expected digit . The map preserves this residue, so sends the point into , where the remaining factors keep it. The following lemma states these state and digit checks and is proved in Appendix C.1.
Lemma 5.4. Every generator in (5.2) preserves . Suppose its input is with and , where . Its output can lie in only if and .
5.3 Conditions for preserving program reachability
We now state what each module must satisfy so that matrix words between encoded configurations follow valid computations of . For a module implementing and each , consider paths from its entry state with encoded input , whose local value is the unary code . A path remains in if its input and the value after every generator application lie in . It completes an instruction if it has positive length and stops at the next program boundary it reaches. Each module must satisfy the following three conditions.
(1) Residues. Every local value along a path remaining in must have residue in , including after incorrect guesses. This keeps the state checks valid, so an incorrect arithmetic guess cannot let a word use a generator intended for another state to bypass the remaining tests.
(2) Input and output. For each allowed input , we require at least one path that completes the instruction while staying in . Every such path must give the correct local output . For any other input, no path may complete the instruction without entering .
(3) Effective construction. We must be able to construct the finite graph and edge-matrix formulas independently of and before choosing . The formulas may contain , but must give computable matrix entries once it is chosen. Thus one finite matrix family works for every .
Theorem 5.5. Suppose each instruction occurrence of a finite program has a module satisfying the three requirements of Section 5.3 for every prime . After listing all phases and choosing one prime , their generators form a finite set with determinants such that, for all program configurations and ,
Proof sketch. Each allowed step has a matrix word taking to . Joining these words implements the whole computation. Conversely, suppose for a word over . The point cannot enter along this word, since every generator preserves and the target point lies outside . The residue requirement keeps local residues in , so even an incorrect arithmetic guess cannot make the value pass a check for another state. Each instruction's private intermediate states therefore prevent switching instructions to escape the remaining tests. The input and output requirement ensures that each completed instruction has an allowed input and the correct output. Since encodes the program state , the word cannot finish halfway through an instruction. Its completed instructions therefore give .
6 Implementing the arithmetic instructions with matrices
A word can pass the state and digit checks of Section 5 while guessing the wrong number of zeros to delete. The six instruction modules in Table 1 include arithmetic tests that reject such guesses before an instruction finishes. By (5.2), each edge gives one integer matrix in with determinant . It removes the shift for q, applies the digit deletion with its auxiliary maps, and adds the shift for r. The auxiliary maps are not supplied separately. The arithmetic calculations use local values with the state shift removed. Appendices C and D give the full generator formulas.
6.1 Increment and congruence tests using digit scans
Increment. To increment the counter, we insert one zero after its marker. The map changes the period of from to . Scanning through the marker rotates the new zero to the front, giving
For an increment instruction from to , a private state records that has already been applied. Both entry generators apply . One deletes a zero and moves to , while the other deletes the marker and moves directly to when . At , a zero deletion stays there and a marker deletion moves to . The digit checks force all zeros to be deleted before the marker. For example, the loop at uses the integer matrix
For , the loop sends to , keeping state when the next digit is zero and entering otherwise. The state shifts cancel along the path, so (6.1) gives a word satisfying . All local values reached in have residue zero or one, keeping the state checks valid (Theorem C.1).
Congruence tests. For , we need to check whether without changing the counter. A scan of returns , while its private states record the number of zeros modulo . At the marker, an exit is available exactly when the recorded count lies in . Otherwise, another zero deletion tries to remove the marker and enters , while the state checks prevent using another state's marker exit (Theorem C.2).
6.2 Division by comparing period lengths
For , where , the output must satisfy , so we must divide the unary period length by . The three steps below guess an output, compare period lengths, and recover . We then describe the corresponding matrix products.
Guessing the output by deleting zeros. A word chooses a positive number of zeros to delete. An exit generator deletes the last chosen zero and applies . With , the deletions alone rotate the period to , giving , rather than . The first deletion rejects , but any passes the digit checks. Thus is a guess whose proposed output still has to satisfy .
Comparing period lengths by counting markers. Applying gives . Powers of alone in its expansion produce ones separated by zeros. When , the first contribution from coincides with the next marker after ones, producing two. We therefore check for marker-one scans followed by a marker-two scan. Each scan reads up to the next nonzero digit, so the private states only count markers, without knowing . Before the marker-two scan, we apply , which preserves the next nonzero residue, and negate after that scan to prepare for recovery. Theorem C.3 proves that, for , this comparison accepts exactly when .
For example, take and . The zero checks permit all three guesses . Choosing rotates 0001 to 0100, proposing . After applying , the first nonzero digits are , so the comparison accepts. The other two guesses give . After two marker-one scans, the next scan expects two but encounters another one and enters .
Recovering the unary code for the output. Passing the comparison verifies , but we still need its unary code for the next instruction. Applying after the comparison's final negation gives finite copies of . Deleting copies leaves , representing one block, and makes it repeat. Division by two needs no additional scan, while division by three needs one.
For a division instruction from to , the zero-deletion loop at a private state uses the matrix . Its exit to the first comparison state uses , combining the final zero deletion and in one generator as in (5.2). A one-deletion guess goes directly from to , while longer guesses pass through . In either case, the intermediate shifts cancel to give . Thus different guesses give different words over the same fixed generators. The comparison and recovery matrices then check the guess and produce the output (Theorems C.4 and C.5). Any word completing this module while remaining in must satisfy and
6.3 Contractions by block removal and output recovery
The contractions and map to and , respectively. We first check using the comparison with . This time, some incorrect guesses pass, and even a correct guess leaves an extra block and marker. The four steps below reject these errors and recover the required unary output.
Comparing the guessed and input period lengths. We use the same generator pattern as the comparison in Section 6.2, with private states for five marker-one scans followed by a marker-two scan. Deleting zeros proposes , with intended choice . The test counts markers without comparing the gaps between them. For , an incorrect guess can also give five ones followed by two, but with different gaps.
Rejecting incorrect splits that pass the comparison. Applying to a correct comparison output gives four finite copies of . We remove two copies for and one for . The first marker-one scan also rejects every incorrect guess that passed the comparison. After the leading zeros, it encounters residue 3, 4, or -1 instead of one, so the deletion enters (Theorem D.1). Applying to the remaining copies gives a periodic code with zero blocks of lengths and the required output or (Theorem D.2).
For example, on input , the guess proposes . It passes the initial comparison even though , but the following marker-one scan encounters residue three and rejects it. The correct guess gives and four finite copies of the digit one. For , deleting two copies leaves two ones, which recodes as the period . This contains the required output block of one zero, but the next instruction needs the unary period 01.
Guessing the deletions needed to recover the output. Scanning only rotates the two blocks, so we must also change the encoding. For , where , a marker-one scan brings the longer block to the front, giving . We want the denominator , so we must remove its interior powers. We make further guesses, each deleting a nonempty zero prefix and applying . The deletions lower the numerator's exponent, and adds times this negative numerator to the denominator, subtracting the selected power. Choosing each deletion length to be removes exactly the interior terms. A scan to the marker , followed by two applications of , then gives .
Checking the recovery guesses with marker scans. Zero checks do not establish that the selected powers were present. Wrong lengths subtract at least one absent power, leaving a negative coefficient before the final power . For , Theorem D.3 shows that the resulting candidate has at most markers equal to one before a residue 2 or -1. Thus marker-one scans reject every incorrect candidate. For the correct unary code, each scan reads one period and returns the same value.
For a contraction instruction from to , each recovery guess uses the same zero-deletion loop and exit construction as above, with in place of . If is the last validation state, the final exit uses , deleting that scan's marker and moving to program state . The state checks prevent a word remaining in from skipping the preceding scans to use this exit. Producing a candidate output therefore does not complete the instruction. Starting from a unary input, a word can complete the module while remaining in only on an input , and then
6.4 Correct updates and residue bound
An incorrect guess may pass several digit checks before it is rejected. To apply Theorem 5.5, the intervening local values must still have residues in , so the word cannot switch instructions to bypass the remaining tests.
Proposition 6.1. Every instruction in Table 1 has a finite module satisfying the three requirements of Section 5.3, for every prime . Its graph and edge-matrix formulas can be constructed independently of the input counter and before choosing p.
Proof sketch. For each allowed update , the intended guesses and scans give a path from to . Conversely, division's comparison forces the correct guess, and recovery returns its unary code. For contractions, the extra scan rejects false splits, and the final scans reject incorrect recovery lengths. Hence every completed instruction has an allowed input and the correct output. The appendix calculations show that local residues remain in after every generator application along a path remaining in , including after incorrect guesses. This keeps the state checks valid. The same finite graphs and edge formulas work for every prime . Only loop repetitions depend on the counter. The detailed proof is in Appendix D.3.
7 Completing the proof of the main result
Let be the total number of distinct program states and private intermediate states in the instruction graphs, and choose a prime satisfying . Theorems 5.5 and 6.1 give a finite family of integer matrices with determinants that ensures that whenever moves from configuration to configuration in one step, there is a product of matrices from that maps the code to the code . Joining these products gives a matrix product for any finite computation of . Conversely, Theorem 5.5 shows that, if a product of matrices from satisfies , then can reach from by a finite sequence of allowed steps. Since the instruction graphs, edge formulas, and prime are fixed independently of , the same family works for every input. Using the state indices from Section 5.2, set and . These points encode the fixed starting configuration and computable target configuration of in Theorem 4.3, so only depends on . We now prove the main result.
Proof of Theorem 3.2. For every ,
The first equivalence follows from Theorem 4.3 and the second from Theorem 5.5, proving (3.2). ☐
Proof of Theorem 1.1. We encode the target line represented by as the kernel of a rank-one matrix with fixed image. Let be a fixed nonzero integer column spanning the line represented by . Write with and , and set . Then has image , and its kernel is the target line because . By Theorems 3.1 and 3.2, is mortal if and only if halts from . Since is computable, this reduces the undecidable halting problem in Theorem 4.1 to mortality with . The matrix need not preserve , because Theorem 3.1 extracts a nonsingular word from every zero product and the simulation checks apply to that word (Theorem A.1).
Proof of Theorem 1.2. Table 3 lists 5,798 nonsingular generators, but different entries may represent the same matrix, so . To make the count exact, we reserve unused states before choosing . Theorem E.1 then adds matrices of determinant on these states until the family has exactly 5,798 distinct matrices. Since the added matrices check unused states, the first such matrix in a word starting from an encoded configuration sends the value into . All nonsingular generators preserve , so the additions leave reachability unchanged. With this choice of and , the preceding rank-one construction adds the singular matrix , giving exactly 5,799 distinct matrices.
Part II. Detailed proofs and constructions
A Proof of the rank-one conversion lemma
Proof of Theorem 3.1. Clearing denominators gives the required integer and , and has the stated rank, image, and kernel. For every , we have , so gives a zero product, including when . Conversely, every zero product contains , since the other generators are invertible. Remove the invertible factors before the first and after the last occurrence of . Repeated use of the same identity expresses the remaining product as multiplied by the scalars for the products between consecutive occurrences of . Since , at least one of these scalars is zero, so the corresponding satisfies .
Remark A.1. The rank-one matrix in the proof of Theorem 1.1 need not preserve the error set of Section 5.1. That requirement applies only to the nonsingular simulation matrices. Even when a zero product contains many copies of , Theorem 3.1 extracts a product of nonsingular generators to which Theorem 5.5 applies.
B The fixed machine and reversed program
We obtain by merging states in repeated routines of the two-counter simulator of Ivanov, Pelz, and Verlan [IPV14, Section 3]. This preserves whether the machine halts from the same initial counter values and reduces the generator count. We use the increment and conditional-decrement instructions defined in Section 4, following Ivanov's deterministic register-machine model [Iva15, Section 2.2, pp. 28–29].
B.1 State identifications in the two-counter simulator
The machine has states , initial state , and halt state . Its instruction list [Iva15, appendix, pp. 128–129] contains 92 increments of counter zero, 73 increments of counter one, 80 conditional decrements of counter zero, and 32 conditional decrements of counter one. We identify the states listed in Table 2.
Table 2: Each row lists three states of that are merged into one. State numbers abbreviate their labels, and all unlisted states remain distinct. Here and denote an increment and a conditional decrement of counter . Entries in the third column correspond in order to the states in the first.
| States to identify | Operation | Positive/increment destinations | Zero destination |
|---|---|---|---|
| 45, 150, 270 | 46, 151, 271 | 1 | |
| 46, 151, 271 | 45, 150, 270 | — | |
| 200, 230, 256 | 201, 231, 257 | 258 | |
| 201, 231, 257 | 200, 230, 256 | — |
Let map each state of to its merged state, with one merged state for each row of Table 2 and every unlisted state left unchanged. To construct , we replace each transition of by
, keeping its counter operation and branch condition. The initial state and halt state are not merged with any other state.
Lemma B.1. The machine is well defined. For every , it halts from exactly when does. Its instruction counts are
where and count increments and conditional decrements of counter c.
Proof. The states in each merged group have the same instruction type and selected counter. Their corresponding destinations also map to the same state under , so each merged state has one well-defined instruction. Start both machines at with the same counter values. Whenever is at and is at , with , they perform the same counter operation, choose the same branch when a test is required, and reach states related by . Induction preserves this relation after every step. Since only maps to the halt state, the two machines either both run forever or halt after the same number of steps. Each row of the table replaces three instructions by one. The two increment rows therefore remove four increments of counter zero, and the two decrement rows remove four conditional decrements of counter one, giving Equation (B.1).
B.2 Undecidability of halting from an encoded input
Proof of Theorem 4.1. Korec's fixed register machine is universal [Kor96, Main Theorem (b2), p. 268]. A register machine and its input can therefore be encoded computably into the initial register values of . In Korec's definition, after encoding the input, followed by a total computable output decoder computes the same partial function as the encoded machine [Kor96, Definition 2.3(v) and the following paragraph, pp. 275–276]. Since the decoder is defined on every output, the decoded result exists exactly when reaches its designated halt state. Equality of the partial functions therefore means that reaches that state exactly when the encoded machine halts.
The two-counter machine simulates [IPV14, Section 3], using the prime-exponent encoding of [Min67]. The construction is detailed in [Iva15, Section 5.2, pp. 98–99]. If are the initial values of the registers of , then starts with in counter zero and zero in counter one, where the are fixed distinct primes. Counter one holds intermediate results. Each simulated instruction is implemented by a terminating arithmetic routine that returns counter one to zero. Thus reaches its unique halt state exactly when reaches its designated halt state. Composing the input encodings gives a computable reduction from the halting problem for register machines to whether halts from . By Theorem B.1, the same equivalence holds for .
B.3 Proof of the program equivalence theorem
Proof of Theorem 4.3. Fix . We interpret a configuration of as the configuration of . In particular, represents .
Simulating the instructions of . Let and put , , and . In , the edges simulating increments of counters zero and one multiply by two or three, increasing or , respectively, by one and leaving the other exponent unchanged. Both are defined for every .
In , the zero branch of a conditional decrement leaves unchanged and is defined when for counter zero or for counter one, exactly when the selected counter has value zero. Otherwise, the positive branch multiplies by or , respectively. Since five is coprime to two and three, these give and , or and . Both positive branches keep a positive integer, so remains nonnegative. For each conditional decrement, exactly one of its two branches is defined. Each edge has the same destination state as the corresponding branch in .
Together with the increment cases, these checks show that exactly one outgoing edge of is defined whenever , and it represents the step prescribed by . Induction on the number of steps therefore shows that every finite path of from containing no cleanup step represents a finite computation of from , and each such computation of has a corresponding path of .
Reaching a common final configuration. The only outgoing edge of at is cleanup, for . If halts, reaches some , and exactly cleanup steps reach , including zero steps when . Conversely, any path of from to has a first visit to . Its prefix up to that visit contains no cleanup step and therefore represents a halting computation of . We have proved
Checking the inverse maps and their domains. Each inverse must be defined exactly on the range of its forward map, so that can reverse only steps that could take. We check that the edge maps of are injective and that their inverses are the corresponding instructions in Table 1. In the following formulas, . Cleanup maps to , so its range is all of and its inverse is . A zero branch is the identity on its domain, so reversing it gives the same test, or . In , the edges simulating increments of counters zero and one send the one-counter value to and , respectively. Each map is injective, with range exactly the domain of or , and these division instructions recover .
For the edge of simulating a positive decrement of counter zero, the allowed inputs are exactly . Then , so multiplying by gives the new one-counter value . The edge simulating a positive decrement of counter one has allowed inputs . Multiplying by gives the same output . Both maps are injective, and both have range exactly the nonnegative integers congruent to four modulo five. Their inverses are therefore and , with the domains stated in the table.
Reversing paths and fixing the starting configuration. The domain checks above show that each edge reverses precisely the allowed steps of . Reversing the order of a finite path of therefore gives a valid path of , and conversely. Several reversed edges may be available at one configuration, but each still reverses an allowed step of . Together with the cleanup equivalence above, this proves (4.1). The states, edge maps, and domains of depend only on the fixed machine . Thus and its starting configuration are fixed. Only the target configuration depends on , and the map is computable.
C Valuations, scans, and elementary instruction modules
This appendix proves Theorems 5.2 to 5.5 and gives the arithmetic calculations and generator tables for increments, congruence tests, and division. The arithmetic formulas use local values, with the state shifts removed. Each table entry denotes one matrix from (5.2), with id denoting the identity. Throughout, is prime. When applying Theorem 5.4, we also require , where counts all program and intermediate states. The intermediate states are private to their modules, as in Theorem 5.1. When two stages of one instruction meet at an intermediate state, the first must leave the local value in the form required by the second.
Several auxiliary operations on one side of a digit deletion can be combined into one allowed map, since . In particular, negation is .
C.1 Encoding and program reachability
For a block of integer digits with , write , where represents the remaining digits. We read the digits in increasing order of their powers of . For a periodically repeated block , write for its rational code. The remainder is again , giving . Deleting its first digit rotates the block, since , and a full scan gives . These algebraic identities also hold for negative digits.
We use the valuation to count initial zeros and detect failed checks. For nonzero rational , let be the exponent of in its numerator minus that in its denominator, and set . Thus . The denominator of is coprime to , so . For rational and integers , write when . For rational , we use and . For nonzero with different valuations, the second relation is an equality. Indeed, after factoring out the smaller power of , exactly one remaining term is divisible by . The point belongs to but has no assigned valuation.
Proof of Theorem 5.2. If , subtracting an integer leaves its valuation unchanged, so . Also . For , the quotient lies in exactly when , equivalently when .
Write for a marker scan with , counting the final marker deletion in its length. For nonzero , the first zero deletions remain in and leave . We call its residue the leading residue of . The final deletion remains in exactly when has this residue. A completed scan that remains in therefore has length . Applying earlier or once more enters . At , leaves the value unchanged and every such enters .
Proof of Theorem 5.3. For , the denominator has residue one, so and . Its inverse is , which also maps into . Integer translations and their inverses do the same. Thus each map sends onto . Since each is a bijection of , it also sends the complement onto itself. This includes the poles of the maps and the point .
Proof of Theorem 5.4. Each factor in (5.2) maps into by Theorems 5.2 and 5.3. For the input in the lemma, removing the shift for gives . Since preserves residues, deletion stays in exactly when , or equivalently . These two integers lie in the residue blocks for and . The blocks are disjoint because , so , and their distinct representatives then give . Otherwise deletion sends the point into , where the remaining maps keep it.
Proof of Theorem 5.5. We use the residue, input and output, and effective construction requirements stated in Section 5.3.
Constructing one matrix family. The effective construction requirement lets us construct the finite instruction graphs and their edge formulas before choosing . Use distinct intermediate states for different instruction modules, but keep the same program state labels wherever their boundaries meet. Let be the total number of states and index them by . Choose a prime with and evaluate each edge formula (5.2). All its factors have integer entries. Its shift matrices have determinant one, its digit-deletion matrix has determinant , and its auxiliary matrices have determinants in . Thus every edge gives an integer matrix with determinant . Let be the finite set of these matrices. Several edges may give the same matrix, so we will not assume that a factor in a matrix word identifies a unique edge.
The blocks for state indices are disjoint modulo . If has residue in , then has residue in the block for . In particular, the configuration encoding is injective. Indeed, first gives from the disjoint blocks, since each unary code has residue zero or one. Cancelling the equal shifts gives , and and then give .
Implementing a program computation. For an allowed step , the input and output requirement in Section 5.3 gives a positive-length path through its module that remains in and has local output . The intermediate shifts cancel between consecutive edge matrices, so the product for this path maps to . Concatenating these products along a finite program path proves the forward implication in (5.3). A program path of length zero is implemented by the identity matrix, which belongs to .
Following an arbitrary matrix word. For the converse, first let have positive length and satisfy . Set and for , so that . These are the points acted on by the matrices, rather than the local values obtained by removing a state shift. Every lies in . Otherwise, preservation of by Theorem 5.4 would force all subsequent values, including , into . For each factor , choose an edge whose matrix equals . Such an edge exists by the definition of .
We identify program steps successively along this word. Suppose the first factors implement a program path ending at , so , and . Initially this holds with , , and . Since has residue zero or one, Theorem 5.4 forces the chosen edge for to leave and check the matching digit. An edge leaving a program boundary starts a module with entry state .
Suppose the edges selected so far have followed this module to an intermediate state , with current point and local value . Integer translations preserve , so , and all earlier local values on this module path also lie in . The residue requirement in Section 5.3 therefore gives for some , including when the path contains an incorrect arithmetic guess. If , the next value is in , so Theorem 5.4 forces the chosen edge for to leave with the matching digit. Since is private to the current module, this edge belongs to the same module. This proves inductively that the chosen edges stay in that module until the next program boundary or the end of the word. The residue requirement is used only after the preceding edges have been shown to form a path in the module.
When a positive-length segment first reaches a program boundary , it completes the current instruction in the sense of Section 5.3. The input and output requirement gives and local output . Hence this segment implements the allowed program step , and we repeat the argument from the resulting encoded configuration. This also covers instructions with the same entry and exit, since completion is defined by the first return to a program boundary after a positive number of edges. At least one matrix factor is used per completed instruction, so the procedure identifies finitely many program steps followed, possibly, by a final unfinished instruction. None of this reasoning requires the chosen edge for a matrix factor to be unique.
Identifying the final configuration. The word cannot end inside an unfinished instruction. If it did, for a private intermediate state and a local value with residue in , by the residue requirement. Its residue would lie in the block for . But lies in the block for the program state , which is disjoint from the block for . Thus the entire word splits into completed, allowed instruction steps. Injectivity of the configuration encoding identifies the last state and counter as , proving the reverse implication in (5.3) for nonempty words.
If the word is empty, . The same injectivity argument gives , and the program path of length zero establishes the reverse implication in this case as well.
C.2 The increment module
Implementing
Every generator in remains available, including those of other instructions.
(a) Intended traversals

(b) Example

Displayed periods, least significant digit first
(c) Incorrect choice

Figure 2: The increment module of Theorem C.1. (a) Entry , private intermediate state , and exit , with each edge labelled by the maps composed in its generator. (b) The local periods for , least significant digit first. (c) A generator with the wrong state or digit sends the point into , which every generator preserves.
Proposition C.1. A module implements exactly on the unary codes. It has four listed generators.
Proof. The map adds one zero after the unary marker, giving with period . Scanning through its marker gives (6.1), including . For an instruction from boundary to boundary , reserve a private intermediate state and supply exactly these four generators (Figure 2).
For , the generator leaves the local value at . To complete the instruction while remaining in , a word must make more zero deletions before taking the marker exit . For , the direct generator completes the increment immediately. These scans complete the instruction while remaining in for every , with output . The local residues stay in , and preserves residues, so the state and digit checks reject any generator with the wrong state or expected digit.
C.3 Congruence-test modules
The next construction tests the counter value by scanning a complete unary period without changing the code. Its intermediate states record the number of deleted zeros modulo d. The state for remainder zero is still an intermediate state, so counting a multiple of d zeros cannot finish the instruction before the marker is deleted.
Lemma C.2. Fix an integer and a set . A finite module implements , the identity on precisely the unary inputs satisfying . It has listed generators. Here is one when and zero otherwise.
Proof. For an instruction from boundary to boundary , reserve private intermediate states , where records that the number of deleted zeros is congruent to modulo . Indices are reduced modulo . Supply exactly the following generators.
For , after zero deletions, , the state is and the local value is . At , this value has residue 1, so the next deletion must remove the marker. The marker exit exists exactly when and returns by the full-period identity in Appendix C.1. For , the direct marker generator completes the test exactly when . Otherwise, no first step remains in . If a required marker exit is absent, an attempted zero deletion enters .
Every local value along a path remaining in V has residue 0 or 1, so the state and digit checks reject generators for other states or digits. A full scan exists for every permitted input, and every path completing the instruction while remaining in V has unchanged output. □
C.4 Length comparison and intermediate codes
We prove the length comparison from Section 6, with for division and for contractions, including its intermediate output and the residue bounds for incorrect guesses. Starting from , choose zero deletions and set and . The required period relation is equivalent to .
To retain the lengths needed for recovery, define the intermediate code
(C.3) for . It represents the period , whose zero blocks have lengths . The code determines both lengths, since its valuation gives and the formula is injective in for fixed . The intended split will be stored as .
The comparison uses and its inverse . Their denominators have residue one, so both preserve valuations and leading residues on nonzero elements of . For the calculation, we rescale the local value as . A marker scan of length , including its final deletion, acts by and becomes
The marker contributes the constant independently of the scan length, and acts by . Multiplication by shifts digit positions by one without changing the order of nonzero digits. Thus, for nonzero , a completed marker scan that stays in has length .
After the guessed zero deletions, the local value is . Applying gives
The following procedure tests whether exactly k markers equal to one precede the first marker equal to two. Its application of before the marker-two scan preserves the next leading residue.
Lemma C.3. Let be prime, , and . Choose , put and , and start from . Delete zeros and apply . Then perform marker-one scans, apply , perform a marker-two scan, and negate. This procedure completes without entering exactly when or and . For , its output is . Every local value reached before a rejecting deletion or the final marker-two deletion has residue in , including those of rejected choices of .
Proof. We use (C.5) to locate the first digit two and count the preceding ones. The scan rule (C.4) then determines which guesses pass the comparison. We find the initial digits of by congruences modulo powers of p. For every integer , the geometric identity gives
Indeed, the omitted rational remainder has valuation at least . Each term on the right consists of an initial followed by factors selected from and . The second exponent is the original unary period length. Products containing only give coefficient 1 at exponents . The term gives another coefficient 1 at exponent . All other products involving that factor have exponent at least , where the two possible orders of one factor and one factor both contribute.
The first coefficient 2 occurs at the least exponent receiving more than one contribution. If for an integer , this exponent is . It is preceded by nonzero coefficients, all equal to 1.
If for an integer , the first coefficient 2 occurs at exponent . Before it, the multiples of and the exponent give coefficients equal to 1. Through the first coefficient 2, these coefficients are at most 2, so these congruences identify them with the initial digits without carries. This classification uses no later coefficients.
Each marker-one scan removes the next digit 1. The subsequent preserves the valuation and leading residue, so the marker-two scan finishes without entering E exactly when those k digits are followed by the first 2. In the divisible case this requires , giving . In the other case it requires . Among , the latter case is possible only for k = 5 and h = 1. Thus the choices completing the comparison are exactly
These counts also show that every rejected choice meets a residue 1 or 2 at its first unsuccessful marker deletion. The preceding values between deletions have residues 0, 1, or 2.
On , the first nonzero digits of occur at exponents , so each marker-one scan has length . Set . If is the rescaled value after such scans, the recurrence gives
In the coordinate , the map acts as . Since , it sends to , whose valuation is and leading residue is 2. The final scan therefore also has length . Its negated output satisfies . Using gives . Applying also gives , the case of the recovery identity (C.9) below.
We also need the initial digits remaining on the exceptional five-scan branch. The rejection argument in Theorem D.1 uses these digits to determine the leading residue of its output. Suppose and put . The first five digits 1 occur at exponents . The fifth marker is at exponent 4Q, so the five scans have total length 4Q. After these, the next contributions are and , and all remaining terms have exponent at least . The same congruence, followed by deletion of those five digits, therefore gives the value before as
where .
To recover a unary output from the intermediate code, we use
for and integers . This follows by substitution in (C.3) and summing the finite geometric series. The result encodes finite copies of , and a marker-one scan removes one copy. For division, . Removing copies leaves , which sends to .
C.5 Division by two
Apply Theorem C.3 with . Its accepted output is , so (C.9) gives , which encodes the single finite block . A second returns . Write , so . The comparison's final generator normally applies after the marker-two deletion to produce . Replacing that map by also applies to the resulting , giving within the same generator.
Lemma C.4. A module implements precisely , for , on the unary codes. It has ten listed generators.
Proof. For boundaries , reserve private intermediate states . The state is used while choosing the prefix length, and for the two marker-one scans, and for the final marker-two scan. Supply the following ten generators.
On input , let be the chosen number of zero deletions. The direct edge chooses , while longer choices pass through . In either case, the generator entering combines the last zero deletion with . The marker exits and complete the two marker-one scans. The latter also applies before the marker-two scan at . Its exit combines the marker deletion and recovery map in one generator.
For , set . By Theorem C.3, the comparison completes while remaining in exactly when , equivalently . The recovery calculation above then gives output . For every such input, choosing gives a path completing the instruction while remaining in .
At , the first zero deletion fails. A prefix longer than meets residue 1 and also fails. Lemma C.3 rejects every other incorrect guess and gives local residues in before the rejecting deletion. The correct scans have the same residue bound until the final generator returns a unary code, whose residue is zero or one. Thus the state and digit checks remain valid even for incorrect guesses, preventing a word from switching instructions to avoid their rejection.
C.6 Division by three
A successful comparison with k = 3 leaves two finite blocks after applying T, so recovery needs one additional marker scan.
Lemma C.5. A module implements precisely , for , on the unary codes. It has fourteen listed generators.
Proof. For boundaries , reserve private intermediate states . The state is used while choosing the prefix length, the for the three marker-one scans, for the marker-two scan, and for the additional recovery scan. Supply the following generators.
The entry edges choose a nonempty zero prefix as in division by two. Let be its length and, for , set . The marker exits through count three markers equal to one. The last of these, , also applies before the marker-two scan. The exit then combines the marker-two deletion with , a permitted auxiliary map that applies after the comparison's final negation. By Theorem C.3, a path remaining in first reaches exactly when , hence , and arrives with value . At the first zero deletion fails, and a prefix longer than fails at the unary marker. The common comparison excludes all remaining incorrect guesses before arrival at , since .
By (C.9), the value on first arrival at represents two finite copies of . The loop at deletes the zeros of the first copy, and the exit deletes its marker and applies to the remaining block. Thus , followed by . The common comparison supplies the residue bounds before that arrival, and preserves residues. During the final scan the local residues are 0 or 1, so the state and digit checks remain valid throughout. Choosing gives a path completing the instruction while remaining in for every , and every such path has the stated output.
D Contraction instruction modules
This appendix gives the matrix constructions for the contraction instructions in Table 1. We first reject incorrect splits and remove finite blocks, then recover the required unary output. We use the local values and generator-table conventions of Appendix C, together with the rescaled value and maps from Appendix C.4. The arithmetic calculations hold for every prime . When applying the state checks in Theorem 5.4 to unrestricted matrix words, we also require , where counts all program and intermediate states. The tables describe the intended graph paths, which these checks enforce. Stages of one instruction may share an intermediate state at a specified join, but intermediate states of different instruction modules remain distinct.
D.1 Comparison and block removal
For local input with , choose a zero prefix of length , and put and . The comparison in Theorem C.3 with permits both the intended choice and the incorrect choices . We will reject the latter when removing the first finite block. Let be the entry state and the private intermediate state where block removal begins. Write for the comparison's output after negation. Its last generator also applies , so the local value at is .
Lemma D.1. For the chosen prefix length , a path from with local input to remaining in exists exactly when or . Every such path has local output . If , then and the input is . If , then is nonzero and its leading residue is 4, 3, or -1, according as , , or .
Along every path remaining in , the local input and the local value after each generator have residues in . This includes and values arising from incorrect guesses before rejection.
Proof. Lemma C.3 with gives exactly these two cases for completing the comparison in . On , its output is and .
For the additional branch, put , so . By (C.8), the rescaled local value after the five marker-one scans is , where . Applying changes this rescaled value to , which has valuation and leading residue two. The local value has valuation , so the marker-two scan deletes zeros and then the marker. Its length is therefore , and negation gives . Multiplying by yields
(D.1)
Since has residue one, the leading residue of is 4 when , when , and 3 when . These are the cases , , and , respectively. In particular, , so and . None of these leading residues is zero or one when .
By Theorem C.3, the local residues before the final marker-two deletion belong to . An incorrect candidate has residue zero if , and otherwise has its leading residue 3, 4, or . The correct candidate has residue zero or one. Finally, preserves the residue of every , and the valuation and leading residue when . Thus the final generator also gives a local residue in .
Comparison generators. We now give the graph and its sixteen listed generators. Reserve distinct private intermediate states . The state is used while choosing the prefix length, for the th marker-one scan, and for the marker-two scan. The row indexed by supplies eight of the sixteen edges.
| Zero deletion | Next stage | Range |
|---|---|---|
| [ , g; 0; id, id] | [ , ; 0; id, T] | |
| [g, g; 0; id, id] | [g, ; 0; id, T] | |
| [u_i, u_i; 0; id, id] | [u_i, u_{i+1}; 1; id, id] | 1 ≤ i < 5, |
| [u_5, u_5; 0; id, id] | [u_5, w; 1; id, T^{-1}] | |
| [w, w; 0; id, id] | [w, h_1; 2; id, TN] |
(D.2)
The direct edge chooses , while longer guesses pass through . Each edge entering deletes the last guessed zero and then applies . At , the first deletion enters , and any choice also enters when it tries to delete the unary code's marker as a zero. The auxiliary map is from Section 5.2 and is part of the last generator.
Removing finite blocks. For the correct candidate, encodes four finite copies of , as in (C.9). A marker-one scan removes one copy and rejects an incorrect candidate when it reaches its first nonzero digit. Reserve a private intermediate output state . The following two listed generators remove one copy and apply to the remaining finite blocks.
Alternatively, reserve one further private intermediate state and supply these four listed generators for two successive block-removal scans.
The state is where unary recovery begins. Reaching it does not yet complete the contraction instruction.
Proposition D.2. Adjoining (D.3) to (D.2) gives eighteen listed generators for . Adjoining (D.4) instead gives twenty listed generators for . In either case, a path from with local input to remaining in exists exactly when for some , and every such path has the stated local output.
Proof. A path in (D.2) that reaches performs a nonempty guessed prefix, five marker-one scans, and a marker-two scan. If it remains in , Lemma D.1 classifies its local value . For an incorrect candidate this value has leading residue 3, 4, or -1. Taking the marker-one exit while the residue is still zero enters . After deleting all the initial zeros, both another zero deletion and the marker-one exit enter . Thus no incorrect candidate can reach while remaining in , and its local residues before rejection belong to .
On the correct split, the local value at is . By (C.9), this value encodes the finite word consisting of four copies of . A marker-one scan removes its first copy, with exactly a zero deletions. In the single-scan table, the final therefore recodes the three remaining copies as . In the double-scan table, the first scan leaves those three copies at . The second scan removes one more copy, and its final gives . Neither branch deletes the last copy, so all these values remain nonzero. Every correct scan has local residues in , including , when each block consists only of its marker.
These residue bounds also let us apply Theorem 5.4. Once a word enters this instruction's private intermediate states, it cannot use a generator for another state to skip the remaining tests while staying in . Conversely, choosing reaches the asserted output for every .
D.2 Recovering the unary output
The preceding block-removal construction reaches recovery with , where . We now recover the unary code , as described in Section 6.3, and prove that the final scans reject every incorrect recovery guess.
Put and . A marker-one scan brings the longer zero block to the front. It has length and gives
We aim to subtract from , leaving . A guessed zero prefix followed by subtracts one power of p, so we make m - 1 such guesses and then check them.
Put and . As long as the local values remain in , write for the rescaled value after the th guessed prefix and the following application of , and put . We show that
and that the choices whose deletions remain in are exactly . Here is the remaining exponent in the rescaled value . The length of the th guessed prefix is .
Initially, has residue one. After any guesses with positive exponents, the denominator in (D.5) still has residue one. Before the th guess, the local value therefore has leading zeros and leading residue -1. A nonempty zero prefix can lower the exponent to any with . The following preserves this valuation and leading residue. On the rescaled value , it acts as , adding the negative numerator to the denominator. Thus the two operations give
Induction proves (D.5) and the stated exponent bounds. Conversely, every sequence within those bounds is obtained by deleting zeros at its th guess.
After the last guess, collect the remaining nonconstant terms of the denominator in
The denominator is now . The scan to the marker has length and sends the rescaled value to . The first application of turns this rescaled value into , and the second gives . Their composition is the permitted map . We apply successive marker-one scans to the candidate local value .
Lemma D.3. Let , , and be integers. For the candidate local value , where and is defined in (D.6), all marker-one scans finish without entering exactly when for , or equivalently when each guessed prefix has length . The accepted local value is , and each scan preserves it.
Throughout the recovery procedure, the local values at the input and after every generator application along a path remaining in , including those reached by incorrect guesses before rejection, have residues in .
Proof. If every guessed exponent is divisible by , their allowed range and strict ordering force . Then and , so the candidate local value is and every marker-one scan preserves it.
Rejecting incorrect recovery guesses. For an incorrect guess, cancel matching positive and negative powers in , and let be the remaining negative term of least exponent. Such a term exists because the allowed range contains exactly positive multiples of , and the guesses are distinct. In particular, and .
Since , the finite geometric identity gives
Below , only the surviving terms , , and the product of two terms can contribute. Among exponents below , the coefficients at and are at most one and two, respectively. Products of positive terms have exponents divisible by , so they cannot contribute at , since . Any other product containing a negative term has larger exponent. The coefficient at is therefore . With there are no carries before .
Passing from to the local value lowers all exponents by one without changing these coefficients. Each successful marker-one scan removes the next zeros and coefficient one. At a coefficient two or minus one, both another zero deletion and the marker-one exit enter . There are at most positive multiples of below , so at most coefficients one can precede rejection. The marker-one scans therefore reject every incorrect candidate.
Residues during recovery. During the initial scan of , the local residues are zero or one. The guessed prefixes and following scan to the marker have only zero and minus one before that marker exit, by (D.5). The coefficient argument gives only local residues zero, one, two, or minus one during the final marker-one scans. The nonzero coefficient at prevents an incorrect candidate from becoming zero before rejection. Thus all required local residues are in the stated set. When , we have , and the inequalities force .
Recovery generators. Let be the intermediate state joining the block-removal and recovery stages of this instruction. Every local value entering from block removal along a path remaining in has the form . Let be the exit state, where the unary output is produced. The initial scan starts at , which has only that scan's outgoing edges. Reserve further private intermediate states . For the table only, write and . Supply exactly the following edges.
| Zero deletion | Next stage | Range |
|---|---|---|
| $1\leq i | ||
(D.8)
Each guessing exit deletes the last zero of its prefix before applying . Hence every guess is nonempty, even if its loop is unused, and every positive prefix length can be attempted.
Proposition D.4. For and , the construction (D.8) has a path from to with local input that remains in . Every such path gives local output . After the global choice , the same conclusion holds for unrestricted matrix words, with completion at their first arrival at . The construction has listed generators.
Proof. An entry-to-exit path in the listed graph performs the first scan, the nonempty guesses, the scan to the marker , and the marker-one scans in that order. Lemma D.3 shows that a path remaining in reaches the output only when each guessed prefix has length , and gives the residue bounds, including those of incorrect candidates. Choosing supplies a path reaching while remaining in for every , and the lemma gives the asserted output for every such path. Once , these residue bounds let Theorem 5.4 enforce the state and digit checks along an unrestricted matrix word. They cover incorrect guesses as well, so a word remaining in cannot leave this construction to bypass the remaining tests. Any such word reaching must therefore follow the listed stages until its first arrival there.
D.3 Assembly and verification
Corollary D.5. The updates and in Table 1 have modules satisfying the three requirements of Section 5.3 for every prime , with respectively thirty and thirty-two listed generators.
Proof. Join the twenty-generator construction of Theorem D.2 to recovery with , and its eighteen-generator construction to recovery with . For each and , the two stages give . Thus the first stage produces exactly the intermediate code required by recovery, and the final unary code records the output of .
Identify the private output state of the first stage with the entry state of recovery, retaining only the recovery scan's outgoing edges there and keeping all other intermediate states distinct. By Theorem D.2, a path remaining in can first reach this shared state only with the displayed intermediate code. Subsequent zero deletions change that form, but their arithmetic and residue bounds are covered by the recovery proof. The shared state remains private, so reaching it does not complete the instruction. Theorem D.4 then gives the exact unary output and a path completing the instruction while remaining in for every input in the domain.
The residue bounds and the guarantees for inputs and outputs verify the corresponding requirements in Section 5.3. The finite tables of permitted generators can be constructed independently of and before choosing , which verifies the effective construction requirement. The numbers of listed generators are and .
Proof of Theorem 6.1. Fix a prime . For each instruction occurrence , take a separate copy of its module from Appendix C or Theorem D.5. Label its entry and exit by and , and give all other states distinct private labels. Only and are program boundaries. Completion means reaching the next boundary after a positive number of edges, including when . We verify the three requirements of Section 5.3 for graph paths starting at the entry state with local input , for every .
Inputs and outputs. For increment, congruence tests, and division, Theorems C.1, C.2, C.4 and C.5 give exactly the domains and outputs in Table 1. For contractions, Theorem D.5 gives the assembled modules with the private joins specified in its proof. In each case, the cited proofs give a path completing the instruction while remaining in for every allowed input, and show that every such completed path has an allowed input and the prescribed unary output.
Residues along every prefix. The residue requirement concerns every prefix remaining in , even after an incorrect guess or when the path never completes. For increment and congruence tests, all local residues lie in by Theorems C.1 and C.2. For division, Theorem C.3 gives residues in before the comparison's final exit. After that exit, the composed maps give either the unary output or finite blocks whose remaining scan has residues zero and one, as proved in Theorems C.4 and C.5. For contractions, Theorems D.1 and D.2 place the comparison and block-removal residues in , including those of incorrect candidates before rejection. The recovery residues lie in by Theorem D.3. These are all subsets of . The bounds concern local values after complete generator applications. They also apply across the private joins, since the preceding stage supplies the input family required by the next stage, as established in the proof of Theorem D.5.
Effective construction. Each cited construction supplies a finite graph and a list of edge formulas of the form (5.2). The parameters of a test and the scan counts are fixed by the instruction. Different counter values use different paths in these fixed graphs, including different numbers of loop repetitions. Neither the graph nor its formulas depend on . The auxiliary maps and their compositions have the permitted form, as verified in the constructions, and the formulas give computable matrix entries once is chosen. All the local calculations and residue bounds hold for every prime with the same graphs and formulas. This verifies all three requirements and proves the proposition.
E Generator count and padding to an exact family size
We prove Theorem 1.2 by first counting the listed generators. If some entries represent the same matrix, we add extra matrices to reach the required family size. This padding preserves reachability between encoded configurations and is independent of the machine input .
E.1 Counting the listed generators
The instruction counts of are given in Equation (B.1). Translating these instructions into and reversing its edges gives the instructions of . An increment of counter zero contributes one instruction, and an increment of counter one contributes one instruction. Each conditional decrement contributes two instructions of . Its positive branch gives or , according to the selected counter, and its zero branch gives a congruence test. For counters zero and one, the tests have parameters and , respectively. By Theorem C.2, each test module has listed generators, giving five and seven. The cleanup edge reverses to one instruction of , implemented by four listed generators (Theorem C.1). The division and contraction counts in Table 3 come from Theorems C.4, C.5 and D.5.
Table 3: Numbers of listed generators. Distinct table entries may represent the same matrix.
| Instruction or construction step | Number | Listed generators per occurrence | Total |
|---|---|---|---|
| Increment counter 0 | 88 | 10 | 880 |
| Increment counter 1 | 73 | 14 | 1,022 |
| Conditional decrement counter 0 | 80 | 30 + 5 | 2,800 |
| Conditional decrement counter 1 | 28 | 32 + 7 | 1,092 |
| Reversed cleanup | 1 | 4 | 4 |
| Listed nonsingular generators | 5,798 | ||
| Rank-one conversion | 1 | 1 | 1 |
| Total listed generators | 5,799 |
E.2 Padding to exactly 5,798 distinct matrices
Lemma E.1 (Exact cardinality). The fixed program in Theorem 4.3 can be implemented by exactly 5,798 distinct nonsingular integer matrices of determinant or , for one fixed prime , without changing reachability between its encoded configurations.
Proof. Let count the program and intermediate states in the original instruction graphs, indexed by . Reserve unused state indices , then choose a prime . This separates all residue blocks as required by Section 5.2 and leaves room for any needed additions before we know how many original matrices are distinct. With fixed, compute the original generators and remove duplicates. Let be the number of distinct matrices. On of the reserved state indices , add
These matrices have determinant and are pairwise distinct because their upper-right entries differ. To distinguish from every original generator, consider . Since has residue zero, every original generator sends this point into by Theorem 5.4, because it is intended for a state other than . In contrast, , so cannot equal an original generator. The same lemma shows that each maps into itself.
We now show that adding these matrices creates no new reachability between encoded configurations. Consider a word that starts from an encoded program configuration and contains a padding matrix. Let be its first padding matrix. The preceding prefix uses only original generators. If it has entered , it stays there. Otherwise, the induction in Appendix C.1 shows that this prefix follows the original instruction graphs. The residue requirement of Section 5.3 keeps each local residue in , and the input and output requirement gives a unary code at each program boundary, allowing the induction to continue. Thus the current point is for an original state and with residue in , even if the prefix ends halfway through an instruction. Since , the state check sends this point into when is applied. Every subsequent original or padding matrix keeps it there, so the word cannot end at an encoded configuration. Conversely, every original word remains available. Reachability is therefore unchanged, and the enlarged family has exactly 5,798 distinct matrices. All choices depend only on the fixed program , not on the machine input .
F Related decidability and membership results
For unrestricted mortality, rational and integer entries give equivalent decision problems. Clearing each generator's denominators multiplies every product by a nonzero scalar, preserving zero products without adding generators. For two-by-two integer matrices, mortality is NP-hard when determinants lie in [BHP12] and NP-complete when they lie in [JK20, Theorem 4]. For comparison with our generator count, undecidability is known for six three-by-three integer matrices [Nea15, Corollary 12].
Prescribing a target matrix gives a different question from prescribing a target line. For a finite family of nonsingular two-by-two integer matrices and a given nonsingular integer matrix , it is decidable whether [PS17a, Theorem 2.1]. For our family , a product of length has determinant of absolute value , so equality with requires . This leaves at most one possible length and finitely many words to check. Requiring , as in Theorem 3.2, instead specifies only the image of one line. It does not determine , so no such length bound follows.
Mortality has also been studied for finite automata whose transitions carry rational two-by-two matrix labels. Here the automaton restricts which sequences of matrices may be multiplied. An algorithm can decide whether the automaton accepts a zero product, provided every transition on a directed cycle is labelled by a product of integer matrices of determinant , rational scalar matrices, and [DPS24, Definition 6.2 and Theorem 8.1].
All words over can be represented by an automaton with one initial and accepting state and a loop for each generator. Every loop is a directed cycle, so every generator would have to satisfy the restriction above. A nonsingular product of the permitted matrices cannot contain a singular factor. It is therefore a nonzero rational scalar multiple of an integer matrix of determinant , so its determinant has absolute value equal to a rational square. Each generator in instead has determinant of absolute value , which is not a rational square. The mortality theorem therefore does not apply directly to this automaton. This argument does not exclude other presentations satisfying its hypothesis.
G Formal verification
A companion Lean 4 formalization is available at github.com/j49liu/matrix_mortality_lean. It constructs the concrete family used in the proof: 5,798 distinct nonsingular integer matrices, each with determinant 51,859 or -51,859, and one rank-one integer matrix computed from the input. Lean proves that the rank-one matrix always has the same image line, that the resulting family has exactly 5,799 distinct matrices, and that it is mortal exactly when a fixed universal machine halts on the corresponding input. It also states the final undecidability result with the rank-one matrix itself as the input, matching Theorem 1.1.
The main danger in the reduction is that the matrices may be multiplied in any order, rather than in the order of a legal computation. The formalization therefore proves the converse for every matrix word: no wrong control state, digit, scan length, or arithmetic guess can carry one encoded configuration to another. It also proves the rank-one conversion for an arbitrary zero product, without assuming that the rank-one matrix occurs only twice or in prescribed positions. These checks rule out unintended products that could otherwise create a false mortality witness.
To obtain unconditional undecidability, the development starts from a kernel-checked universal machine, proves that the complete map from machine inputs to matrix families is primitive recursive, and derives the required prime system from formal Mertens and Chebyshev estimates. Formalization made two previously implicit obligations explicit: the connection to a proved undecidable halting problem and the existence of the number-theoretic prime layout. Both are now proved in Lean. Lean checks every theorem in the development; none is left unproved or assumed as a project-specific axiom.The paper's mathematical arguments remain self-contained and do not rely on any formalized results that are not stated in the paper.
H Conclusion and open problems
We have proved that matrix mortality is undecidable for integer matrices, even when all but one matrix are fixed in advance. The fixed nonsingular matrices implement the same program for every input, while the input changes only the kernel of a rank-one matrix whose image stays fixed. Thus, deciding whether a product from a fixed matrix family sends one fixed line to a given target line is already undecidable. The construction enforces the program through the matrix actions themselves, without restricting the order in which the matrices may be multiplied or how often they may be used.
The distinction between reaching a target line and producing a specified matrix is important here. Requiring a product to send one line to another leaves its action on the remaining directions unspecified. By comparison, deciding whether a given nonsingular matrix is a product of a finite family of nonsingular integer matrices is decidable. Appendix F explains this distinction and its relation to existing decidability results. Our theorem establishes undecidability for one fixed family of nonsingular matrices. It does not classify which fixed families admit an algorithm for deciding reachability between rational lines.
The construction gives an explicit bound of 5,799 distinct matrices, whereas mortality is decidable for families of two rational matrices [BB02, Theorem 4]. Determining how many matrices are needed for undecidability is therefore a natural next question. There are two versions of this question that should be distinguished. One allows every matrix in the family to vary with the input. The other retains the restrictions proved here, with a fixed nonsingular family and only the kernel of one rank-one matrix varying. Our bound applies to this second, more restricted setting, but we do not determine the smallest family size in either setting or whether those sizes coincide.
A further question concerns the determinants of the nonsingular matrices. Our construction works for every sufficiently large prime , with the required size depending on the number of states that must receive separate residue blocks. Can mortality remain undecidable when these determinants are restricted to , while the nonsingular family and the image of the rank-one matrix remain fixed? The present construction does not answer this question, since its state checks require more residue classes than are available modulo two. A different way to distinguish states might also allow fewer intermediate states and fewer generators. Any such simplification would still need to prevent a matrix word from switching instructions to avoid a test, including after an incorrect arithmetic guess.
I AI methodology
We used OpenAI Codex and Claude Code for mathematical research, proof development, manuscript preparation, and Lean 4 formalization. The investigation began in July 2026, when the authors used GPT-5.6-Sol to systematically investigate this problem. This earlier investigation produced a large archive of partial results, but did not resolve the problem. The final proof architecture was selected by the authors and developed iteratively with AI assistance. OpenAI Codex with GPT-5.6-Sol was also used to generate a Lean formalization of the proofs. The authors substantially reworked the exposition into its current form, reviewed the correspondence between the formalization and the mathematical statements, checked the arguments and references, and revised the manuscript. The authors take full responsibility for the correctness, originality, and integrity of the submission.
References
[BB99] Olivier Bournez and Michael Branicky. On matrix mortality in low dimensions. In Vincent D. Blondel, Eduardo D. Sontag, Mathukumalli Vidyasagar, and Jan C. Willems, editors, Open Problems in Mathematical Systems and Control Theory, Communications and Control Engineering, pages 67–69. Springer, London, 1999.
[BB02] Olivier Bournez and Michael S. Branicky. The mortality problem for matrices of low dimensions. Theory of Computing Systems, 35(4):433–448, 2002.
[BHP12] Paul C. Bell, Mika Hirvensalo, and Igor Potapov. Mortality for matrices is NP-hard. In Branislav Rovan, Vladimiro Sassone, and Peter Widmayer, editors, Mathematical Foundations of Computer Science 2012, volume 7464 of Lecture Notes in Computer Science, pages 148–159, Berlin, Heidelberg, 2012. Springer.
[CHHN14] Julien Cassaigne, Vesa Halava, Tero Harju, and François Nicolas. Tighter undecidability bounds for matrix mortality, zero-in-the-corner problems, and more. arXiv:1404.0644, 2014.
[DPS24] Volker Diekert, Igor Potapov, and Pavel Semukhin. Decidability of membership problems for flat rational subsets of GL(2, Q) and singular matrices. SIAM Journal on Computing, 53(6):1663–1708, 2024.
[EB02] Magnus Egerstedt and Vincent D. Blondel. How hard is it to control switched systems? In Proceedings of the 2002 American Control Conference, volume 3, pages 1869–1873. IEEE, 2002.
[Hec19] Christopher Carl Heckman. The 2 × 2 matrix mortality problem and invertible matrices. arXiv:1912.09991, 2019.
[IPV14] Sergiu Ivanov, Elisabeth Pelz, and Sergey Verlan. Small universal non-deterministic Petri nets with inhibitor arcs. In Helmut Jürgensen, Juhani Karhumäki, and Alexander Okhotin, editors, Descriptive Complexity of Formal Systems, volume 8614 of Lecture Notes in Computer Science, pages 186–197, Cham, 2014. Springer.
[Iva15] Sergiu Ivanov. On the Power and Universality of Biologically-inspired Models of Computation. PhD thesis, Université Paris-Est, 2015.
[JK20] Stefan Jaax and Stefan Kiefer. On affine reachability problems. In Javier Esparza and Daniel Král', editors, 45th International Symposium on Mathematical Foundations of Computer Science (MFCS 2020), volume 170 of Leibniz International Proceedings in Informatics, pages 48:1–48:14, Dagstuhl, Germany, 2020. Schloss Dagstuhl–Leibniz-Zentrum für Informatik.
[Kor96] Ivan Korec. Small universal register machines. Theoretical Computer Science, 168(2):267–301, 1996.
[KR25] Stefan Kiefer and Andrew Ryzhikov. The complexity of reachability problems in strongly connected finite automata. In Paweł Gawrychowski, Filip Mazowiecki, and Michał Skrzypczak, editors, 50th International Symposium on Mathematical Foundations of Computer Science (MFCS 2025), volume 345 of Leibniz International Proceedings in Informatics, pages 62:1–62:19, Dagstuhl, Germany, 2025. Schloss Dagstuhl–Leibniz-Zentrum für Informatik.
[Min67] Marvin L. Minsky. Computation: Finite and Infinite Machines. Prentice-Hall, Englewood Cliffs, NJ, 1967.
[Nea15] Turlough Neary. Undecidability in binary tag systems and the Post correspondence problem for five pairs of words. In Ernst W. Mayr and Nicolas Ollinger, editors, 32nd International Symposium on Theoretical Aspects of Computer Science (STACS 2015), volume 30 of Leibniz International Proceedings in Informatics, pages 649–661, Dagstuhl, Germany, 2015. Schloss Dagstuhl–Leibniz-Zentrum für Informatik.
[NR08] Claudia Nuccio and Emanuele Rodaro. Mortality problem for 2 × 2 integer matrices. In Viliam Geffert, Juhani Karhumäki, Alberto Bertoni, Bart Preneel, Pavol Návrat, and Mária Bieliková, editors, SOFSEM 2008: Theory and Practice of Computer Science, volume 4910 of Lecture Notes in Computer Science, pages 400–405, Berlin, Heidelberg, 2008. Springer.
[Pat70] Michael S. Paterson. Unsolvability in 3 × 3 matrices. Studies in Applied Mathematics, 49(1):105–107, 1970.
[PS17a] Igor Potapov and Pavel Semukhin. Decidability of the membership problem for 2 × 2 integer matrices. In Philip N. Klein, editor, Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 170–186, Philadelphia, PA, 2017. Society for Industrial and Applied Mathematics.
[PS17b] Igor Potapov and Pavel Semukhin. Membership problem in GL(2, Z) extended by singular matrices. In Kim G. Larsen, Hans L. Bodlaender, and Jean-François Raskin, editors, 42nd International Symposium on Mathematical Foundations of Computer Science (MFCS 2017), volume 83 of Leibniz International Proceedings in Informatics, pages 44:1–44:13, Dagstuhl, Germany, 2017. Schloss Dagstuhl-Leibniz-Zentrum für Informatik.
[PS19] Igor Potapov and Pavel Semukhin. Vector and scalar reachability problems in SL(2, Z). Journal of Computer and System Sciences, 100:30–43, 2019.