Bidimensional linear recursive sequences and universality of unambiguous register automata
BBidimensional linear recursive sequences anduniversality of unambiguous register automata
Corentin Barloy ! École Normale Supérieure de Paris, PSL, France
Lorenzo Clemente ! University of Warsaw, Poland
Abstract
We study the universality and inclusion problems for register automata over equality data ( A , =).We show that the universality L ( B ) = (Σ × A ) ∗ and inclusion problems L ( A ) ⊆ L ( B ) can be solvedwith complexity when both automata are without guessing and B is unambiguous,improving on the currently best-known upper bound by Mottet and Quaas. Whenthe number of registers of both automata is fixed, we obtain a lower EXPTIME complexity, alsoimproving the
EXPSPACE upper bound from Mottet and Quaas for fixed number of registers. Wereduce inclusion to universality, and then we reduce universality to the problem of counting thenumber of orbits of runs of the automaton. We show that the orbit-counting function satisfiesa system of bidimensional linear recursive equations with polynomial coefficients (linrec), whichgeneralises analogous recurrences for the Stirling numbers of the second kind, and then we show thatuniversality reduces to the zeroness problem for linrec sequences. While such a counting approachis classical and has successfully been applied to unambiguous finite automata and grammars overfinite alphabets, its application to register automata over infinite alphabets is novel.We provide two algorithms to decide the zeroness problem for bidimensional linear recursivesequences arising from orbit-counting functions. Both algorithms rely on techniques from linearnon-commutative algebra. The first algorithm performs variable elimination and has elementarycomplexity. The second algorithm is a refined version of the first one and it relies on the computationof the Hermite normal form of matrices over a skew polynomial field. The second algorithm yieldsan
EXPTIME decision procedure for the zeroness problem of linrec sequences, which in turn yieldsthe claimed bounds for the universality and inclusion problems of register automata.
Theory of computation - Automata over infinite objects.
Keywords and phrases unambiguous register automata, universality and inclusion problems, multi-dimensional linear recurrence sequences.
Digital Object Identifier
Funding
Corentin Barloy : Partially supported by the Polish NCN grant 2017/26/D/ST6/00201.
Lorenzo Clemente : Partially supported by the Polish NCN grant 2017/26/D/ST6/00201.
Acknowledgements
We would like to thank Daniel Robertz for kindly providing us with the
LDA package for Maple 16. © Corentin Barloy and Lorenzo Clemente;licensed under Creative Commons License CC-BY 4.042nd Conference on Very Important Topics (CVIT 2016).Editors: John Q. Open and Joan R. Access; Article No. 23; pp. 23:1–23:38Leibniz International Proceedings in InformaticsSchloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany a r X i v : . [ c s . F L ] J a n Register automata.
Register automata extend finite automata with finitely many registersholding values from an infinite data domain A which can be compared against the dataappearing in the input. The study of register automata arises naturally in automata theoryas a conservative generalisation of finite automata over finite alphabets Σ to richer but well-behaved classes of infinite alphabets. The seminal work of Kaminski and Francez introduced finite-memory automata as the study of register automata over the data domain ( A , =)consisting of an infinite set A and the equality relation [29]. The recent book [4] studiesautomata theory over other data domains such as ( Q , ≤ ), and more generally homogeneous[36] or even ω -categorical relational structures. Another motivation for the study of registerautomata comes from the area of database theory: XML documents can naturally be modelledas finite unranked trees where data values from an infinite alphabet are necessary to modelthe attribute values of the document (c.f. [41] and the survey [47]).The central verification question for register automata is the inclusion problem , which,for two given automata A, B , asks whether L ( A ) ⊆ L ( B ). In full generality the problem isundecidable and this holds already in the special case of the universality problem L ( B ) =(Σ × A ) ∗ [41, Theorem 5.1], when B has only two registers [4, Theorem 1.8] (or even justone register in the more powerful model with guessing [4, Exercise 9], i.e., non-deterministicreassignment in the terminology of [30]). One way to obtain decidability is to restrict theautomaton B . One such restriction requires that B is deterministic : Since deterministicregister automata are effectively closed under complementation, the inclusion problem reducesto non-emptiness of L ( A ) ∩ (Σ × A ) ∗ \ L ( B ), which can be checked in PSPACE . Another,incomparable, restriction demands that B has only one register: In this case the problembecomes decidable [29, Appendix A] and non-primitive recursive [22, Theorem 5.2]. Unambiguity.
Unambiguous automata are a natural class of automata intermediate betweendeterministic and nondeterministic automata. An automaton is unambiguous if there is atmost one accepting run on every input word. Unambiguity has often been used to generalisedecidability results for deterministic automata at the price of a usually modest additionalcomplexity. For instance, the universality problem for deterministic finite automata (which is
PSPACE -complete in general [52]) is NL -complete, while for the unambiguous variant it is in PTIME [51, Corollary 4.7], and even in NC [55]. An even more dramatic example is providedby universality of context-free grammars, which is undecidable in general [28, Theorem 9.22], PTIME -complete for deterministic context-free grammars, and decidable for unambiguouscontext-free grammars [45, Theorem 5.5] (even in
PSPACE [15, Theorem 10]). (The moregeneral equivalence problem is decidable for deterministic context-free grammars [48], but itis currently an open problem whether equivalence is decidable for unambiguous context-freegrammars, as well as for the more general multiplicity equivalence of context-free grammars[33].) Other applications of unambiguity for universality and inclusion problems in automatatheory include Büchi automata [7, 2], probabilistic automata [21], Parikh automata [9, 5],vector addition systems [20], and several others (c.f. also [18, 19]). Decidability even holds for the so-called “two-window register automata”, which combined with therestriction in [29] demanding that the last data value read must always be stored in some register boilsdown to a slightly more general class of “1 -register automata”. orentin Barloy and Lorenzo Clemente 23:3 Number sequences and the counting approach.
The universality problem for a languageover finite words L ⊆ Σ ∗ is equivalent to whether its associated word counting function f L ( n ) := | L ∩ Σ n | equals | Σ | n for every n . The most classical way of exploiting unambiguityof a computation model A (finite automaton, context-free grammar, . . . ) is to use the factthat it yields a bijection between the recognised language L ( A ) and the set of acceptingruns. In this way, f L ( n ) is also the number of accepting runs of length n , and for the latterrecursive descriptions usually exist. When the class of number sequences to which f L belongscontains | Σ | n and is closed under difference, this is equivalent to the zeroness problem for g ( n ) := | Σ | n − f L ( n ), which amounts to decide whether g = 0. This approach has beenpioneered by Chomsky and Schützenberger [14] who have shown that the generating function g L ( x ) = P ∞ n =0 f L ( n ) · x n associated to an unambiguous context-free language L is algebraic(c.f. [8]). A similar observation by Stearns and Hunt [51] shows that g L ( x ) is rational [50,Chapter 4], when L is regular, and more recently by Bostan et al. [5] who have shown that g L ( x ) is holonomic [49] when L is recognised by an unambiguous Parikh automaton. Sincethe zeroness problem for rational, algebraic, and holonomic generating functions is decidable,one obtains decidability of the corresponding universality problems. Unambiguous register automata.
Returning to register automata, Mottet and Quaashave recently shown that the inclusion problem in the case where B is an unambiguousregister automaton over equality data (without guessing) can be decided in ,and in EXPSPACE when the numbers of registers of B is fixed [37, Theorem 1]. Note thatalready decidability is interesting, since unambiguous register automata without guessingare not closed under complement in the class of nondeterministic register automata withoutguessing [30, Example 4], and thus the classical approach via complementing B fails forregister automata . (In fact, even for finite automata complementation of unambiguousfinite automata cannot lead to a PTIME universality algorithm, thanks to Raskin’s recentsuper-polynomial lower-bound for the complementation problem for unambiguous finiteautomata in the class of non-deterministic finite automata [44]). Mottet and Quaas obtaintheir result by showing that inclusion can be decided by checking a reachability property ofa suitable graph of triply-exponential size obtained by taking the product of A and B , andthen applying the standard NL algorithm for reachability in directed graphs. Our contributions.
In view of the widespread success of the counting approach to un-ambiguous models of computation, one may wonder whether it can be applied to registerautomata as well. This is the topic of our paper. A naïve counting approach for registerautomata immediately runs into trouble since there are infinitely many data words of length n . The natural remedy is to use the fact that A n , albeit infinite, is orbit-finite [4, Sec. 3.2],which is a crucial notion generalising finiteness to the realm of relational structures used tomodel data. In this way, we naturally count the number of orbits of words/runs of a givenlength, which in the context of model theory is sometimes known as the Ryll-Nardzewskifunction [46]. For example, in the case of equality data ( A , =), the number of orbits of wordsof length n is the well-known Bell number B ( n ), and for ( Q , ≤ ) one obtains the ordered Bellnumbers (a.k.a. Fubini numbers ); c.f. Cameron’s book for more examples [11, Ch. 7]. In the more general class of register automata with guessing, an unproved conjecture proposed byColcombet states that unambiguous register automata with guessing are effectively closed undercomplement [19, Theorem 12], implying decidability of the universality and containment problems forunambiguous register automata with guessing and, a posteriori, unambiguous register automata withoutguessing as considered in this paper. No published proof of this conjecture has appeared as of yet.
C V I T 2 0 1 6
When considering orbits of runs, the run length n seems insufficient to obtain recurrenceequations. To this end, we also consider the number of distinct data values k that appearon the word labelling the run. For instance, in the case of equality data, the correspondingorbit-counting function is the well-known sequence of Stirling numbers of the second kind S ( n, k ) : Q N , which satisfies S (0 ,
0) = 1, S ( m,
0) = S (0 , m ) = 0 for m ≥
1, and S ( n, k ) = S ( n − , k −
1) + k · S ( n − , k ) , for n, k ≥ . (1)These intuitions lead us to define the class of bidimensional linear recursive sequences withpolynomial coefficients (linrec; c.f. (2)) which are a class of number sequences in Q N satisfyinga system of shift equations with polynomial coefficients generalising (1). Linrec are sufficientlygeneral to model the orbit-counting functions of register automata and yet amenable toalgorithmic analysis. Our first result is a complexity upper bound for the zeroness problemfor a class of linrec sequences which suffices to model register automata. ▶ Theorem 1.
The zeroness problem for linrec sequences with univariate polynomial coeffi-cients from Q [ k ] is in EXPTIME . This is obtained by modelling linrec equations as systems of linear equations with skewpolynomial coefficients (introduced by Ore [43]) and then using complexity bounds on thecomputation of the Hermite normal form of skew polynomial matrices by Giesbrecht andKim [26]. Our second result is a reduction of the universality and inclusion problems tothe zeroness problem of a system of linrec equations of exponential size. Together withTheorem 1, this yields improved upper bounds on the former problems. ▶ Theorem 2.
The universality L ( B ) = (Σ × A ) ∗ and the inclusion problem L ( A ) ⊆ L ( B ) for register automata A, B without guessing with B unambiguous are in , andin EXPTIME for a fixed number of registers of
A, B . The same holds for the equivalenceproblem L ( A ) = L ( B ) when both automata are unambiguous. The rest of the paper is organised as follows. In Sec. 2, we introduce linrec sequences(c.f. Appendix A.3 for a comparison with well known sequence families from the literaturesuch as the C-recursive, P-recursive, and the more recent polyrec sequences [10]). In Sec. 3,we introduce unambiguous register automata and we present an efficient reduction of theinclusion (and thus equivalence) problem to the universality problem, which allows us toconcentrate on the latter in the rest of the paper. In Sec. 4, we present a reduction of theuniversality problem to the zeroness problem for linrec. In Sec. 5, we show with a simpleargument based on elimination that the zeroness problem for linrec is decidable, and inSec. 6 we derive a complexity upper bound using non-commutative linear algebra. Finally,in Sec. 7 we conclude with further work and an intriguing conjecture. Full proofs, additionaldefinitions, and examples are provided in Appendices A–E.
Notation.
Let N , Z , and Q be the set of non-negative integers, resp., rationals. The height of an integer k ∈ Z is | k | ∞ = | k | , and for a rational number a ∈ Q uniquely written as a = pq with p ∈ Z , q ∈ N co-prime we define | a | ∞ = max {| p | ∞ , | q | ∞ } . Let Q [ n, k ] denote the ringof bivariate polynomials. The (combined) degree deg P of P = P i,j a ij n i k j ∈ Q [ n, k ] is themaximum i + j s.t. a ij ̸ = 0 and the height | P | ∞ is max i,j | a ij | ∞ . For a nonempty set A and n ∈ N , let A n be the set of sequences of elements from A of length n , In particular, A = { ε } contains only the empty sequence ε . Let A ∗ = S n ∈ N A n be the set of all finite sequencesover A . We use the soft-Oh notation ˜ O ( f ( n )) to denote S c ≥ O ( f ( n ) · log c f ( n )). orentin Barloy and Lorenzo Clemente 23:5 Let f ( n, k ) : Q N be a bidimensional sequence. For L ∈ N , the first L -section of f is theone-dimensional sequence f ( L, k ) : Q N obtained by fixing its first component to L ; the second L -section f ( n, L ) is defined similarly. The two shift operators ∂ , ∂ : Q N → Q N are( ∂ f )( n, k ) = f ( n + 1 , k ) and ( ∂ f )( n, k ) = f ( n, k + 1) , for all n, k ≥ . An affine operator is a formal expression of the form A = p + p · ∂ + p · ∂ where p , p , p ∈ Q [ n, k ] are bivariate polynomials over n, k with rational coefficients. Let { f , . . . , f m } be a set of variables denoting bidimensional sequences . A system of linear shiftequations over f , . . . , f m consists of m equations of the form ∂ ∂ f = A , · f + · · · + A ,m · f m , ... ∂ ∂ f m = A m, · f + · · · + A m,m · f m , (2)where the A i,j ’s are affine operators. A bidimensional sequence f : Q N is linear recursive oforder m , degree d , and height h (abbreviated, linrec) if the following two conditions hold:1) there are auxiliary bidimensional sequences f , . . . , f m : Q N which together with f = f satisfy a system of linear shift equations as in (2) where the polynomial coefficients have(combined) degree ≤ d and height ≤ h .2) for every 1 ≤ i ≤ m there are constants denoted f i (0 , ≥ , f i ( ≥ , ∈ Q s.t. f i (0 , k ) = f i (0 , ≥
1) and f i ( n,
0) = f i ( ≥ ,
0) for every n, k ≥ f (0 , , . . . , f m (0 , PTIME . ▶ Lemma 3.
The values f i ( n, k ) ’s are computable in deterministic time ˜ O ( m · n · k ) . In the following we will use the following effective closure under section. ▶ Lemma 4. If f : Q N is linrec of order ≤ m , degree ≤ d , and height ≤ h , then its L -sections f ( L, k ) , f ( n, L ) : Q N are linrec of order ≤ m · ( L + 3) , degree ≤ d , and height ≤ h · L d . We are interested in the following central algorithmic problem for linrec.
Zeroness problem . Input:
A system of linrec equations (2) together with all initial conditions.
Output:
Is it the case that f = 0?In Sec. 4 we use linrec sequences to model the orbit-counting functions of register automata,which we introduce next. We consider register automata over the relational structure ( A , =) consisting of a countableset A equipped with equality as the only relational symbol. Let ¯ a = a · · · a n ∈ A n bea finite sequence of n data values. An ¯ a -automorphism of A is a bijection α : A → A We abuse notation and silently identify variables denoting sequences with the sequences they denote.
C V I T 2 0 1 6 s.t. α ( a i ) = a i for every 1 ≤ i ≤ n , which is extended pointwise to ¯ a ∈ A n and to L ⊆ A ∗ .For ¯ b, ¯ c ∈ A n , we write ¯ b ∼ ¯ a ¯ c whenever there is an ¯ a -automorphism α s.t. α (¯ b ) = ¯ c .The ¯ a -orbit of ¯ b is the equivalence class [¯ b ] ¯ a = { ¯ c ∈ A n | ¯ b ∼ ¯ a ¯ c } , and the set of ¯ a -orbits of sequences in L ⊆ A ∗ is orbits ¯ a ( L ) = { [¯ b ] ¯ a | ¯ b ∈ L } . In the special case when¯ a = ε is the empty tuple, we just speak about automorphism α and orbit [¯ b ]. A set X is orbit-finite if orbits ( X ) is a finite set [4, Sec. 3.2]. All definitions above extend to A ⊥ := A ∪ {⊥} with ⊥ ̸∈ A in the expected way. A constraint φ is a quantifier-free formula generated by φ, ψ :: ≡ x = ⊥ | x = y | φ ∨ ψ | φ ∧ ψ | ¬ φ , where x, y are variablesand ⊥ is a special constant denoting an undefined value. The semantics of a constraint φ ( x , . . . , x n ) with n free variables x , . . . , x n is the set of tuples of n elements which satisfies: (cid:74) φ (cid:75) = { a , . . . , a n ∈ A n ⊥ | A ⊥ , x : a , . . . , x n : a n | = φ } . A register automaton of dimension d ∈ N is a tuple A = ( d, Σ , L , L I , L F , −→ ) where d is the number of registers, Σ is a finitealphabet, L is a finite set of control locations , of which we distinguish those which are initial L I ⊆ L , resp., final L F ⊆ L , and “ −→ ” is a set of rules of the form p σ,φ −−→ q , where p, q ∈ L are control locations, σ ∈ Σ is an input symbol from the finite alphabet, and φ ( x , . . . , x d , y, x ′ , . . . , x ′ d ) is a constraint relating the current register values x i ’s, the currentinput symbol (represented by the variable y ), and the next register values of x ′ i ’s. ▶ Example 5.
Let A over | Σ | = 1 have one register x , and four control locations p, q, r, s ,of which p is initial and s is final. The transitions are p x = ⊥∧ x ′ = y −−−−−−−→ q , p x = ⊥∧ x ′ = y −−−−−−−→ r , q x ̸ = y ∧ x ′ = x −−−−−−−→ q , q x = y ∧ x ′ = x −−−−−−−→ s , r x = y ∧ x ′ = x −−−−−−−→ r , and r x ̸ = y ∧ x ′ = x −−−−−−−→ s . The automaton accepts allwords of the form a ( A \ { a } ) ∗ a or aa ∗ ( A \ { a } ) with a ∈ A .A register automaton is orbitised if every constraint φ appearing in some transition thereofdenotes an orbit (cid:74) φ (cid:75) ∈ orbits ( A · d +1 ⊥ ). For example, when d = 1 the constraint φ ≡ x = x ′ is not orbitised, however (cid:74) φ (cid:75) = (cid:74) φ (cid:75) ∪ (cid:74) φ (cid:75) splits into two disjoint orbits for the orbitisedconstraints φ ≡ x = x ′ ∧ x = y and φ ≡ x = x ′ ∧ x ̸ = y . The automaton from Example 5is orbitised. Every register automaton can be transformed in orbitised form by replacingevery transition p σ,φ −−→ q with exponentially many transitions p σ,φ −−−→ q, . . . , p σ,φ n −−−→ q , foreach orbit (cid:74) φ i (cid:75) of (cid:74) φ (cid:75) ⊆ A · d +1 ⊥ .A register valuation is a tuple of (possibly undefined) values ¯ a = ( a , . . . , a d ) ∈ A d ⊥ . A configuration is a pair ( p, ¯ a ), where p ∈ L is a control location and ¯ a ∈ A d ⊥ is a registervaluation; it is initial if p ∈ L I is initial and all registers are initially undefined ¯ a = ( ⊥ , . . . , ⊥ ),and it is final whenever p ∈ L F is so. The semantics of a register automaton A is the infinitetransition system (cid:74) A (cid:75) = ( C, C I , C F , −→ ) where C is the set of configurations, of which C I , C F ⊆ C are the initial, resp., final ones, and −→ ⊆ C × (Σ × A ) × C is the set of alltransitions of the form( p, ¯ a ) σ,a −−→ ( q, ¯ a ′ ) , with σ ∈ Σ , a ∈ A , and ¯ a, ¯ a ′ ∈ A d ⊥ , s.t. there exists a rule p σ,φ −−→ q where satisfying the constraint A ⊥ , ¯ x : ¯ a, y : a, ¯ x ′ : ¯ a ′ | = φ .A data word is a sequence w = ( σ , a ) · · · ( σ n , a n ) ∈ (Σ × A ) ∗ . A run over a data word w starting at c ∈ C and ending at c n ∈ C is a sequence π of transitions of (cid:74) A (cid:75) of the form π = c σ ,a −−−→ c σ ,a −−−→ · · · σ n ,a n −−−−→ c n . We denote with
Runs ( c ; w ; c n ) the set of runs over w starting at c and ending in c n , and with Runs ( C I ; w ; c n ) the set of initial runs , i.e., thoseruns over w starting at some initial configuration c ∈ C I and ending in c n . The run π is Since ( A , =) is a homogeneous relational structure, and thus it admits quantifier elimination, we wouldobtain the same expressive power if we would consider more general first-order formulas instead. orentin Barloy and Lorenzo Clemente 23:7 accepting if c n ∈ C F . The language L ( A, c ) recognised from configuration c ∈ C is the setof data words labelling some accepting run starting at c ; the language recognised from aset of configurations D ⊆ C is L ( A, D ) = S c ∈ D L ( A, c ), and the language recognised by theregister automaton A is L ( A ) = L ( A, C I ). Similarly, the backward language L R ( A, c ) is theset of words labelling some run starting at an initial configuration and ending at c . Thus, wealso have L ( A ) = L R ( A, C F ). A register automaton is deterministic if for every input wordthere exists at most one initial run, and unambiguous if for every input word there is at mostone initial and accepting run. A register automaton is without guessing if, for every initialrun ( p, ⊥ d ) w −→ ( q, ¯ a ) every non- ⊥ data value in ¯ a occurs in the input w , written ¯ a ⊆ w . Inthe rest of the paper we will study exclusively automata without guessing. A deterministicautomaton is unambiguous and without guessing. These semantic properties can be decidedin PSPACE with simple reachability analyses (c.f. [19]). ▶ Example 6.
The automaton from Example 5 is unambiguous and without guessing. Anexample of language which can only be recognised by ambiguous register automata is the setof words where the same data value appears two times L = { u · a · v · a · w | a ∈ A ; u, v, w ∈ A ∗ } . ▶ Lemma 7. If A is an unambiguous register automaton, then there is a bijection betweenthe language it recognises L ( A ) = L ( A, C I ) = L R ( A, C F ) and the set of runs starting at someinitial configuration in C I and ending at some final configuration in C F . We are interested in the following decision problem.
Inclusion problem . Input:
Two register automata
A, B over the same input alphabet Σ.
Output:
Is it the case that L ( A ) ⊆ L ( B )?The universality problem asks L ( A ) = (Σ × A ) ∗ , and the equivalence problem L ( A ) = L ( B ).In general, universality reduces to equivalence, which in turn reduces to inclusion. In ourcontext, inclusion reduces to universality and thus all three problems are equivalent. ▶ Lemma 8.
Let A and B be two register automata. The inclusion problem L ( A ) ⊆ L ( B ) with A orbitised and without guessing reduces in PTIME to the case where A is deterministic. The reduction preserves whether B is 1)unambiguous, 2) without guessing, and 3) orbitised. The inclusion problem L ( A ) ⊆ L ( B ) with A deterministic reduces in PTIME to theuniversality problem for some register automaton C . If B is unambiguous, then so is C .If B is without guessing, then so is C . If A and B are orbitised, then so is C . We reduce universality of unambiguous register automata without guessing to zeronessof bidimensional linrec sequences with univariate polynomial coefficients. The width ofa sequence of data values ¯ a = a · · · a n ∈ A n is a = |{ a , . . . , a n }| , for a word w =( σ , a ) · · · ( σ n , a n ) ∈ (Σ × A ) ∗ we set w = a · · · a n ), and for a run π over w we set π = w . Let the Ryll-Nardzewski function G p, ¯ a ( n, k ) of a configuration ( p, ¯ a ) ∈ C = L × A d ⊥ count the number of ¯ a -orbits of initial runs of length n and width k ending in ( p, ¯ a ): G p, ¯ a ( n, k ) = |{ [ π ] ¯ a | w ∈ (Σ × A ) n , π ∈ Runs ( C I ; w ; p, ¯ a ) , w = k }| . (3) C V I T 2 0 1 6
Figure 1
Last-step decomposition. ▶ Lemma 9.
Let ¯ a, ¯ b ∈ A d ⊥ . If [¯ a ] = [¯ b ] , then G p, ¯ a ( n, k ) = G p, ¯ b ( n, k ) for every n, k ≥ . We thus overload the notation and write G p, [¯ a ] instead of G p, ¯ a . Since A d ⊥ is orbit-finite,this yields finitely many variables G p, [¯ a ] ’s. By slightly abusing notation, let G C F ( n, k ) = P [( p, ¯ a )] ∈ orbits ( C F ) G p, [¯ a ] ( n, k ) be the sum of the Ryll-Nardzewski function over all orbitsof accepting configurations. When the automaton is unambiguous, thanks to Lemma 7, G C F ( n, k ) is also the number of orbits of accepted words of length n and width k . ▶ Lemma 10.
Let A be an unambiguous register automaton w/o guessing over Σ and let S Σ ( n, k ) be the number of orbits of all words of length n and width k . We have L ( A ) = ( A × A ) ∗ if, and only if, ∀ n, k ∈ N · G C F ( n, k ) = S Σ ( n, k ) . In other words, universality of A reduces to zeroness of G := S Σ − G C F . The sequence S Σ islinrec since it satisfies the recurrence in Figure 2 with initial conditions S Σ (0 ,
0) = 1 and S Σ ( n + 1 ,
0) = S Σ (0 , k + 1) = 0 for n, k ≥
0. We show that all the sequences of the form G p, [¯ a ] are also linrec and thus also G will be linrec. We perform a last-step decomposition ofan initial run; c.f. Figure 1. Starting from some initial configuration ( p , ⊥ d ), the automatonhas read a word w of length n − p, ¯ a ). Then, the automaton reads the lastletter ( σ, a ) and goes to ( p ′ , ¯ a ′ ) via the transition t = ( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ). The question is in howmany distinct ways can an orbit of the run over w be extended into an orbit of the run over w · ( σ, a ). We distinguish three cases. I : Assume that a appears in register ¯ a i = a . Since the automaton is without guessing, a ∈ w has appeared earlier in the input word and ¯ a ′ ⊆ ¯ a (ignoring ⊥ ’s). Thus, each ¯ a -orbit ofruns [ p , ⊥ d w −→ p, ¯ a ] ¯ a yields, via the fixed t , an ¯ a ′ -orbit of runs [ p , ⊥ d w −→ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ] ¯ a ′ of the same width in just one way. II : Assume that a is globally fresh a ̸∈ w , and thus in particular a ̸∈ ¯ a since the automatonis without guessing. Each ¯ a -orbit of runs [ p , ⊥ d w −→ p, ¯ a ] ¯ a of width w yields, via thefixed t , a single ¯ a ′ -orbit of runs [ p , ⊥ d w −→ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ] ¯ a ′ of width w · a ) = w + 1. III : Assume that a ∈ w is not globally fresh, but it does not appear in any register a ̸∈ ¯ a .Since the automaton is without guessing, every value in ¯ a appears in w . Consequently, a can be any of the w distinct values in w , with the exception of a values. Each¯ a -orbit of runs [ p , ⊥ w −→ p, ¯ a ] ¯ a of width w yields w − a ≥ a ′ -orbits of runs[ p , ⊥ d w −→ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ] ¯ a ′ of the same width.(As expected, we do not need unambiguity at this point, since we are counting orbits ofruns.) We obtain the equations in Figure 2, where the sums range over orbits of transitions.This set of equations is finite since there are finitely many orbits [¯ a ] ∈ orbits ( A d ⊥ ) of registervaluations, and moreover we can effectively represent each orbit by a constraint [4, Ch. 4].Strictly speaking, the equations are not linrec due to the “max” operator, however they caneasily be transformed to linrec by considering G p, [¯ a ] ( n, K ) separately for 1 ≤ K < d ; in theinterest of clarity, we omit the full linrec expansion. The initial condition is G p, [¯ a ] (0 ,
0) = 1 if p ∈ I initial, and G p, [¯ a ] (0 ,
0) = 0 otherwise. The two 0-sections satisfy G p, [¯ a ] ( n + 1 ,
0) = 0 for n ≥ G p, [¯ a ] (0 , k + 1) = 0for k ≥ ▶ Lemma 11.
The sequences G p, [¯ a ] ’s satisfy the system of equations in Figure 2. orentin Barloy and Lorenzo Clemente 23:9 G p ′ , [¯ a ′ ] ( n + 1 , k + 1) = X [ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ]: a ∈ ¯ a G p, [¯ a ] ( n, k + 1) | {z } I + X [ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ]: a ̸∈ ¯ a G p, [¯ a ] ( n, k ) | {z } II + max( k + 1 − a ] , · G p, [¯ a ] ( n, k + 1) | {z } III ,S Σ ( n + 1 , k + 1) = | Σ | · S Σ ( n, k ) + | Σ | · ( k + 1) · S Σ ( n, k + 1) ,G ( n, k ) = S Σ ( n, k ) − X [ p, ¯ a ] ∈ orbits ( C F ) G p, [¯ a ] ( n, k ) . Figure 2
Linrec automata equations. ▶ Example 12.
The equations corresponding to the automaton in Example 5 are as follows.(Since the automaton is orbitised, we can omit the orbit.) We have G p (0 ,
0) = 1, G q (0 ,
0) = G r (0 ,
0) = G s (0 ,
0) = 0 and for n, k ≥ G p ( n + 1 , k + 1) = 0 ,G q ( n + 1 , k + 1) = G p ( n, k ) | {z } II + ( k + 1) · G p ( n, k + 1) | {z } III + G q ( n, k ) | {z } II + k · G q ( n, k + 1) | {z } III ,G r ( n + 1 , k + 1) = G p ( n, k ) | {z } II + ( k + 1) · G p ( n, k + 1) | {z } III + G r ( n, k + 1) | {z } I ,G s ( n + 1 , k + 1) = G q ( n, k + 1) | {z } I + G r ( n, k ) | {z } II + k · G r ( n, k + 1) | {z } III . ▶ Lemma 13.
Let A be an unambiguous register automaton over equality atoms withoutguessing with d registers and ℓ control locations. The universality problem for A reduces tothe zeroness problem of the linrec sequence G defined by the system of equations in Figure 2containing O ( ℓ · d · log d ) variables and equations and constructible in PSPACE . If A is alreadyorbitised, then the system of equations has size O ( ℓ ) . In this section, we present an algorithm to solve the zeroness problem of bidimensional linrecsequences with univariate polynomial coefficients, which is sufficient for linrec sequencesfrom Figure 2. We first give a general presentation on elimination for bivariate polynomialcoefficients, and then we use the univariate assumption to obtain a decision procedure. Wemodel the non-commutative operators appearing in the definition of linrec sequences (2) withOre polynomials (a.k.a. skew polynomials) [43] . Let R be a (not necessarily commutative)ring and σ an automorphism of R . The ring of (shift) skew polynomials R [ ∂ ; σ ] is definedas the ring of polynomials but where the multiplication operation satisfies the followingcommutation rule: For a coefficient a ∈ R and the unknown ∂ , we have ∂ · a = σ ( a ) · ∂. The general definition of the Ore polynomial ring R [ ∂ ; σ, δ ] uses an additional component δ : R → R inorder to model differential operators. We present a simplified version which is enough for our purposes. C V I T 2 0 1 6 (The usual ring of polynomials is recovered when σ is the identity.) The multiplicationextends to monomials as a∂ k · b∂ l = aσ k ( b ) · ∂ k + l and to the whole ring by distributivity. The degree of a skew monomial a · ∂ k is k , and the degree deg P of a skew polynomial P is themaximum of the degrees of its monomials. The degree function satisfies the expected identitiesdeg( P · Q ) = deg P + deg Q and deg( P + Q ) ≤ max(deg P, deg Q ). A skew polynomial is monic if the coefficient of its monomial of highest degree is 1. The crucial and only propertythat we need in this section is that skew polynomial rings admit a Euclidean pseudo-divisionalgorithm, which in turns allows one to find common left multiples. A skew polynomial ring R [ ∂ ; σ ] has pseudo-division if for any two skew polynomials A, B ∈ R [ ∂ ; σ ] with deg A ≥ deg B there is a coefficient a ∈ R and skew polynomials Q, R ∈ R [ ∂ ; σ ] s.t. a · A = P · B + Q anddeg Q < deg B . We say that a ring R has the common left multiple ( CLM ) property if forevery a, b ̸ = 0, there exists c, d ̸ = 0 such that c · a = d · b . ▶ Theorem 14 (c.f. [42, Sec. 1]) . If R has the CLM property, then 1) R [ ∂ ; σ ] has a pseudo-division, and 2) R [ ∂ ; σ ] also has the CLM property.
The most important instances of skew polynomials are the first and second Weyl algebras : W = Q [ n, k ][ ∂ ; σ ] and W = W [ ∂ ; σ ] = Q [ n, k ][ ∂ ; σ ][ ∂ ; σ ] , (4)where Q [ n, k ] is the ring of bivariate polynomials, and the shifts satisfy σ ( p ( n, k )) := p ( n + 1 , k ) and σ (cid:0)P i p i ( n, k ) ∂ i (cid:1) := P i p i ( n, k + 1) ∂ i . Skew polynomials in W act onbidimensional sequences f : Q N by interpreting ∂ and ∂ as the two shifts. A linrec systemof equations (2) can thus be interpreted as a system of linear equations with variables f , . . . , f m and coefficients in W . ▶ Example 15.
Continuing our running Example 12, we obtain the following linear systemof equations with W coefficients: ∂ ∂ · G p = 0 , − (1 + ( k + 1) ∂ ) · G p +( ∂ ∂ − k∂ − · G q = 0 , − (1 + ( k + 1) ∂ ) · G p +( ∂ ∂ − ∂ ) · G r = 0 , − ∂ · G q − (1 + k∂ ) · G r + ∂ ∂ · G s = 0 , ( ∂ ∂ − ( k + 1) ∂ − · S = 0 ,G s − S + G = 0 . Since W = N [ n, k ] is commutative, it obviously has the CLM property. By two applicationsof Theorem 14, we have (see Appendix D.1 for
CLM examples): ▶ Corollary 16.
The two Weyl algebras W and W have the CLM property.
A (linear) cancelling relation ( CR ) for a bidimensional sequence f : Q N is a linearequation of the form p i ∗ ,j ∗ ( n, k ) · ∂ i ∗ ∂ j ∗ f = X ( i,j ) < lex ( i ∗ ,j ∗ ) p i,j ( n, k ) · ∂ i ∂ j f, ( CR -2)where p i ∗ ,j ∗ ( n, k ) , p i,j ( n, k ) ∈ Q [ n, k ] are bivariate polynomial coefficients and < lex is thelexicographic ordering. Cancelling relations for a one-dimensional sequence g : Q N are definedanalogously (we use the second variable k as the index for convenience): q j ∗ ( k ) · ∂ j ∗ g = X ≤ j The zeroness problem for a bidimensional linrec sequence f : Q N of order ≤ m and univariate polynomial coefficients in Q [ k ] admitting some cancelling relation ( CR -2) with leading coefficient p i ∗ ,j ∗ ( k ) ∈ Q [ k ] of degree ≤ e and height ≤ h s.t. each of the one-dimensional sections f ( M, k ) ∈ Q N for ≤ M ≤ i ∗ also admits some cancelling relation ( CR -1) of ∂ -degree ≤ d with leading polynomial coefficients of degrees ≤ e and height ≤ h isdecidable in deterministic time ˜ O ( p ( m, i ∗ , j ∗ , d, e, h )) for some polynomial p . Elimination already yields decidability with elementary complexity for the zeronessproblem and thus for the universality/equivalence/inclusion problems of unambiguous registerautomata without guessing. ▶ Theorem 18. The zeroness problem for linrec sequences with univariate polynomialcoefficients from Q [ k ] (or from Q [ n ] ) is decidable. ▶ Example 19. Continuing our running Example 15, we subsequently eliminate G p , G s , G r , G q , S finally obtaining (c.f. Example 34 in Appendix D.2 for details) G ( n + 4 , k + 4) = ( k + 3) · G ( n + 3 , k + 4) + G ( n + 3 , k + 3) + − ( k + 2) · G ( n + 2 , k + 4) − G ( n + 2 , k + 3) . (5)As expected, all coefficients are polynomials in Q [ k ] and in particular they do not involvethe variable n . Moreover, we note that the relation above is monic , in the sense that thelexicographically leading term G ( n + 4 , k + 4) has coefficient 1 (c.f. Sec. 7). (C.f. Example 35for elimination in a two-register automaton and Example 36 for a one-register automatonaccepting all words of length ≥ In this section we present an EXPTIME algorithm to solve the zeroness problem and weapply this result to register automata. We compute the Hermite normal form ( HNF ) of thematrix with skew polynomial coefficients associated to (2) in order to do elimination in amore efficient way. The complexity bounds provided by Giesbrecht and Kim [26] on thecomputation of the HNF lead to the following bounds for cancelling relations; c.f. Appendix Efor further details and full proofs. ▶ Lemma 20. A linrec sequence f ∈ Q N of order ≤ m , degree ≤ d , and height ≤ h admits acancelling relation ( CR -2) with the orders i ∗ , j ∗ and the degree of p i ∗ ,j ∗ polynomially bounded,and with height | p i ∗ ,j ∗ | ∞ exponentially bounded. Similarly, its one-dimensional sections f (0 , k ) , . . . , f ( i ∗ , k ) ∈ Q N also admit cancelling relations ( CR -1) of polynomially boundedorders and degree, and exponentially bounded height. This allows us to prove below the EXPTIME upper-bound for zeroness of Theorem 1, andthe algorithm for inclusion of Theorem 2. Proof of Theorem 1. Thanks to the bounds from Lemma 20, i ∗ , j ∗ are polynomially bounded;we can find a polynomial bound d on the ∂ -degrees of the cancelling relations R , . . . , R i ∗ C V I T 2 0 1 6 for the sections f (0 , k ) , . . . , f ( i ∗ , k ), respectively; we can find a polynomial bound e on thedegrees of p i ∗ ,j ∗ ( k ) and the leading polynomial coefficients of the R i ’s; and an exponentialbound h on | p i ∗ ,j ∗ | ∞ and the heights of the leading polynomial coefficients of the R i ’s. Wethus obtain an EXPTIME algorithm by Lemma 17. ◀ This yields the announced upper-bounds for the inclusion problem for register automata. Proof of Theorem 2. For the universality problem L ( B ) = (Σ × A ) ∗ , let d be the numberof registers and ℓ the number of control locations of B . By Lemma 13, the universalityproblem reduces in PSPACE to zeroness of a linrec system with polynomial coefficients in Q [ k ]containing O ( ℓ · d · log d ) variables G p, [¯ a ] and the same number of equations. By Theorem 1, weget a algorithm. When the numbers of registers d is fixed, we get an EXPTIME algorithm. For the inclusion problem L ( A ) ⊆ L ( B ), we first orbitise A into an equivalentorbitised register automaton without guessing A ′ . A close inspection of the two constructionsleading to C in the proof of Lemma 8 reveal that transitions in C are either transitions from A ′ (and thus already orbitised), or pairs of a transition in B together with a transition in A ′ ,the second of which is already orbitised. It follows that orbitising C incurs in an exponentialblow-up w.r.t. the number of registers of B , but only polynomial w.r.t. the number of registersof A ′ (and thus of A ), since the A ′ -part in C is already orbitised. Consequently, we canwrite (in PSPACE ) a system of linrec equations for the universality problem of C of sizeexponential in the number of registers of A and of B . By reasoning as in the first part ofthe proof, we obtain a EXPTIME algorithm for the universality problem of C , and thus a algorithm for the original inclusion problem L ( A ) ⊆ L ( B ). If both the numberof registers of A and of B is fixed, we get an EXPTIME algorithm. The equivalence problem L ( A ) = L ( B ) with both automata A, B unambiguous reduces to two inclusion problems. ◀ We say that P = P i,j p i,j ( n, k ) · ∂ i ∂ j is monic if p i ∗ ,j ∗ = 1 where ( i ∗ , j ∗ ) is the lexicograph-ically largest pair ( i, j ) s.t. p i,j ̸ = 0. The cancelling relation ( CR -2) in our examples (5), (10),(11), (15) happens to be monic in this sense. ▶ Conjecture 21 (Monicity conjecture) . There always exists a monic cancelling relation ( CR -2) for linrec systems obtained from automata equations in Figure 2, and similarly fortheir sections ( CR -1) . Conjecture 21 has important algorithmic consequences. The exponential complexity inTheorem 1 comes from the exponential growth of the rational number coefficients (heights) inthe HNF . This is due to the use of Lemma 17, whose complexity depends on the maximal root ofthe leading polynomial p i ∗ ,j ∗ ( n, k ) from ( CR -2). If Conjecture 21 holds, then p i ∗ ,j ∗ ( n, k ) = 1,Lemma 17 would yield a PTIME algorithm for zeroness, and consequently all complexities inTheorem 2, would drop by one exponential. This provides ample motivation to investigatethe monicity conjecture.In order to obtain the lower EXPTIME complexity for L ( A ) ⊆ L ( B ) in Theorem 2 wehave to fix the number of registers in both automata A and B . The EXPSPACE upper boundof Mottet and Quaas [37] holds already when only the number of registers of B is fixed, whilewe only obtain a upper bound in this case. It is left for future work whether thecounting approach can yield better bounds without fixing the number of registers of A .The fact that the automata are non-guessing is crucial in each of the cases I , II , and III of the equations in Figure 2 in order to correctly count the number of orbits of runs. orentin Barloy and Lorenzo Clemente 23:13 For automata with guessing from the fact that the current input a is stored in a register wecannot deduce that a actually appeared previously in the input word w , and thus our currentparametrisation in terms of length and width does not lead to a recursive characterisation.in the last-step decomposition since we need to know that all values in ¯ a Finally, it is also left for further work to extend the counting approach to other datadomains such as total order atoms, random graph atoms, etc. . . , and, more generally, toarbitrary homogeneous and ω -categorical atoms under suitable computability assumptions(c.f. [16]), and to other models of computation such as register pushdown automata [13, 39]. C V I T 2 0 1 6 References Ronald Alter and K.K Kubota. Prime and prime power divisibility of Catalan numbers. Journal of Combinatorial Theory, Series A , 15(3):243 – 256, 1973. Christel Baier, Stefan Kiefer, Joachim Klein, Sascha Klüppelholz, David Müller, and JamesWorrell. Markov Chains and Unambiguous Büchi Automata. In Swarat Chaudhuri and AzadehFarzan, editors, Proc. of CAV’16 , pages 23–42, Cham, 2016. Springer International Publishing. M. Benedikt, T. Duff, A. Sharad, and J. Worrell. Polynomial automata: Zeroness andapplications. In Proc. of LICS’17 , pages 1–12, June 2017. doi:10.1109/LICS.2017.8005101 . Mikołaj Bojańczyk. Slightly Infinite Sets . 2019. URL: . Alin Bostan, Arnaud Carayol, Florent Koechlin, and Cyril Nicaud. Weakly-UnambiguousParikh Automata and Their Link to Holonomic Series. In Artur Czumaj, Anuj Dawar, andEmanuela Merelli, editors, Proc. of ICALP’20 , volume 168 of LIPIcs , pages 114:1–114:16,Dagstuhl, Germany, 2020. Schloss Dagstuhl–Leibniz-Zentrum für Informatik. Alin Bostan, Frédéric Chyzak, Bruno Salvy, and Ziming Li. Fast computation of common leftmultiples of linear ordinary differential operators. In Proc. of ISAAC’12 , pages 99–106, NewYork, NY, USA, 2012. ACM. Nicolas Bousquet and Christof Löding. Equivalence and inclusion problem for stronglyunambiguous büchi automata. In Adrian-Horia Dediu, Henning Fernau, and Carlos Martín-Vide, editors, Proc. of LATA’10 , pages 118–129, Berlin, Heidelberg, 2010. Springer BerlinHeidelberg. Mireille Bousquet-Mélou. Algebraic generating functions in enumerative combinatorics andcontext-free languages. In Volker Diekert and Bruno Durand, editors, Proc. of STACS’05 ,pages 18–35, Berlin, Heidelberg, 2005. Springer Berlin Heidelberg. Michaël Cadilhac, Alain Finkel, and Pierre McKenzie. Unambiguous constrained automata.In Hsu-Chun Yen and Oscar H. Ibarra, editors, Proc. of DLT’12 , volume 7410 of LNCS , pages239–250. Springer Berlin Heidelberg, 2012. Michaël Cadilhac, Filip Mazowiecki, Charles Paperman, Michał Pilipczuk, and Géraud Sén-izergues. On Polynomial Recursive Sequences. In Artur Czumaj, Anuj Dawar, and EmanuelaMerelli, editors, Proc. of ICALP’20 , volume 168 of LIPIcs , pages 117:1–117:17, Dagstuhl,Germany, 2020. Schloss Dagstuhl–Leibniz-Zentrum für Informatik. Peter J. Cameron. Notes on Counting: An Introduction to Enumerative Combinatorics .Australian Mathematical Society Lecture Series. Cambridge University Press, 1 edition, 2017. Giusi Castiglione and Paolo Massazza. On a class of languages with holonomic generatingfunctions. Theoretical Computer Science , 658:74–84, 2017. Edward Y. C. Cheng and Michael Kaminski. Context-free languages over infinite alphabets. Acta Inf. , 35(3):245–267, 1998. N. Chomsky and M. P. Schützenberger. The algebraic theory of context-free languages. InP. Braffort and D. Hirschberg, editors, Computer Programming and Formal Systems , volume 35of Studies in Logic and the Foundations of Mathematics , pages 118–161. Elsevier, 1963. Lorenzo Clemente. On the complexity of the universality and inclusion problems for unambigu-ous context-free grammars. In Laurent Fribourg and Matthias Heizmann, editors, Proceedings8th International Workshop on Verification and Program Transformation and 7th Workshopon Horn Clauses for Verification and Synthesis, Dublin, Ireland, 25-26th April 2020, volume320 of EPTCS , pages 29–43. Open Publishing Association, 2020. doi:10.4204/EPTCS.320.2 . Lorenzo Clemente and Slawomir Lasota. Reachability analysis of first-order definable pushdownsystems. In Stephan Kreutzer, editor, Proc. of CSL’15 , volume 41 of LIPIcs , pages 244–259,Dagstuhl, 2015. P. M. Cohn. Skew Fields: Theory of General Division Rings , volume 57 of Encyclopedia ofMathematics and its Applications . Cambridge University Press, 1995. orentin Barloy and Lorenzo Clemente 23:15 Thomas Colcombet. Forms of Determinism for Automata (Invited Talk). In Christoph Dürrand Thomas Wilke, editors, Proc. of STACS’12 , volume 14 of LIPIcs , pages 1–23, Dagstuhl,Germany, 2012. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik. Thomas Colcombet. Unambiguity in automata theory. In Jeffrey Shallit and AlexanderOkhotin, editors, Descriptional Complexity of Formal Systems , pages 3–18, Cham, 2015.Springer International Publishing. Wojciech Czerwiński, Diego Figueira, and Piotr Hofman. Universality Problem for Unambigu-ous VASS. In Igor Konnov and Laura Kovács, editors, Proc. of CONCUR’20 , volume 171 of LIPIcs , pages 36:1–36:15, Dagstuhl, Germany, 2020. Schloss Dagstuhl–Leibniz-Zentrum fürInformatik. Laure Daviaud, Marcin Jurdzinski, Ranko Lazic, Filip Mazowiecki, Guillermo A. Pérez, andJames Worrell. When is Containment Decidable for Probabilistic Automatal. In IoannisChatzigiannakis, Christos Kaklamanis, Dániel Marx, and Donald Sannella, editors, Proc.of ICALP’18 , volume 107 of LIPIcs , pages 121:1–121:14, Dagstuhl, Germany, 2018. SchlossDagstuhl–Leibniz-Zentrum fuer Informatik. Stéphane Demri and Ranko Lazić. LTL with the freeze quantifier and register automata. ACMTrans. Comput. Logic , 10(3):16:1–16:30, April 2009. Philippe Flajolet, Stefan Gerhold, and Bruno Salvy. On the non-holonomic character oflogarithms, powers, and the nth prime function. Electr. J. Comb. , 11(2), 2005. Stefan Gerhold. On some non-holonomic sequences. Electr. J. Comb. , 11(1), 2004. M. Giesbrecht. Factoring in skew-polynomial rings over finite fields. Journal of SymbolicComputation , 26(4):463–486, 1998. URL: , doi:https://doi.org/10.1006/jsco.1998.0224 . Mark Giesbrecht and Myung Sub Kim. Computing the Hermite form of a matrix of Orepolynomials. Journal of Algebra , 376:341–362, 2013. Vesa Halava, Tero Harju, Mika Hirvensalo, and Juhani Karhumäki. Skolem’s problem - on theborder between decidability and undecidability, 2005. John Hopcroft, Rajeev Motwani, and Jeffrey Ullman. Introduction to Automata Theory,Languages, and Computation . Addison-Wesley, 2000. Michael Kaminski and Nissim Francez. Finite-memory automata. Theoretical ComputerScience , 134(2):329–363, 1994. Michael Kaminski and Daniel Zeitlin. Finite-memory automata with non-deterministic re-assignment. International Journal of Foundations of Computer Science , 21(05):741–760,2010. Ravindran Kannan and Achim Bachem. Polynomial algorithms for computing the Smith andHermite normal forms of an integer matrix. SIAM Journal on Computing , 8(4):499–507, 1979. Martin Klazar. Bell numbers, their relatives, and algebraic differential equations. Journal of Combinatorial Theory, Series A , 102(1):63–87, 2003. URL: , doi:https://doi.org/10.1016/S0097-3165(03)00014-1 . Werner Kuich. On the multiplicity equivalence problem for context-free grammars. In Proceedings of the Colloquium in Honor of Arto Salomaa on Results and Trends in TheoreticalComputer Science , pages 232—250, Berlin, Heidelberg, 1994. Springer-Verlag. George Labahn, Vincent Neiger, and Wei Zhou. Fast, deterministic computation of the Hermitenormal form and determinant of a polynomial matrix. Journal of Complexity , 42:44–71, 2017. Leonard Lipshitz. D-finite power series. Journal of Algebra , 122(2):353–373, 1989. Dugald Macpherson. A survey of homogeneous structures. Discrete Math. , 311(15):1599–1634,August 2011. Antoine Mottet and Karin Quaas. The containment problem for unambiguous registerautomata and unambiguous timed automata. Theory of Computing Systems , 2020. doi:10.1007/s00224-020-09997-2 . C V I T 2 0 1 6 T. Mulders and A. Storjohann. On lattice reduction for polynomial matrices. Journal ofSymbolic Computation , 35(4):377–401, 2003. A.S. Murawski, S.J. Ramsay, and N. Tzevelekos. Reachability in pushdown register automata. Journal of Computer and System Sciences , 87:58–83, 2017. Vincent Neiger, Johan Rosenkilde, and Grigory Solomatov. Computing Popov and Hermiteforms of rectangular polynomial matrices. In Proc. of ISAAC’18 , pages 295—302, New York,NY, USA, 2018. ACM. Frank Neven, Thomas Schwentick, and Victor Vianu. Finite state machines for strings overinfinite alphabets. ACM Trans. Comput. Logic , 5(3):403—435, July 2004. Oystein Ore. Linear equations in non-commutative fields. Annals of Mathematics , 32(3):463–477, 1931. URL: . Oystein Ore. Theory of non-commutative polynomials. Annals of Mathematics , 34(3):480–508,1933. URL: . Mikhail Raskin. A Superpolynomial Lower Bound for the Size of Non-Deterministic Com-plement of an Unambiguous Automaton. In Ioannis Chatzigiannakis, Christos Kaklamanis,Dániel Marx, and Donald Sannella, editors, Proc. of ICALP’18 , volume 107 of LIPIcs , pages138:1–138:11, Dagstuhl, Germany, 2018. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik. Arto Salomaa and Marti Soittola. Automata-theoretic aspects of formal power series . Textsand Monographs in Computer Science. Springer, 1978. James Schmerl. A decidable ℵ -categorical theory with a non-recursive Ryll-Nardzewskifunction. Fundamenta Mathematicae , 98(2):121–125, 1978. Luc Segoufin. Automata and logics for words and trees over an infinite alphabet. In ZoltánÉsik, editor, Computer Science Logic , volume 4207 of LNCS , pages 41–57. Springer BerlinHeidelberg, 2006. Géraud Sénizergues. The equivalence problem for deterministic pushdown automata is decidable.In Pierpaolo Degano, Roberto Gorrieri, and Alberto Marchetti-Spaccamela, editors, Proc. ofICALP’97 , pages 671–681, Berlin, Heidelberg, 1997. Springer Berlin Heidelberg. Richard P. Stanley. Differentiably finite power series. European Journal of Combinatorics ,1(2):175–188, 1980. Richard P. Stanley. Enumerative Combinatorics . The Wadsworth & Brooks/Cole MathematicsSeries 1. Springer, 1 edition, 1986. R. Stearns and H. Hunt. On the equivalence and containment problems for unambiguousregular expressions, grammars, and automata. In Proc. of SFCS’81 , pages 74–81, Washington,DC, USA, 1981. IEEE Computer Society. URL: http://dx.doi.org/10.1109/SFCS.1981.29 , doi:10.1109/SFCS.1981.29 . L. J. Stockmeyer and A. R. Meyer. Word problems requiring exponential time (preliminaryreport). In Proc. of STOC’73 , pages 1–9, New York, NY, USA, 1973. ACM. Wen-Guey Tzeng. A polynomial-time algorithm for the equivalence of probabilistic automata. SIAM J. Comput. , 21(2):216–227, April 1992. G. Villard. Computing Popov and Hermite forms of polynomial matrices. In Proc. of ISAAC’96 ,pages 250—258, New York, NY, USA, 1996. Association for Computing Machinery. Tzeng Wen-Guey. On path equivalence of nondeterministic finite automata. InformationProcessing Letters , 58(1):43–46, 1996. A Additional material for Sec. 2A.1 One-dimensional linear recursive sequences Let f ( n ) : Q N be a one-dimensional sequence. The shift operator ∂ : Q N → Q N is defined as( ∂f )( n ) = f ( n + 1) for every n ∈ N . A one-dimensional sequence f is linear recursive (linrec) orentin Barloy and Lorenzo Clemente 23:17 if there are auxiliary sequences f = f , f , . . . , f m : Q N satisfying a system of equations ofthe form ∂f = p , · f + · · · + p ,m · f m , ... ∂f m = p m, · f + · · · + p m,m · f m , (6)where the p i,j ∈ Q [ n ] are univariate polynomials. The order of a linrec sequence is thesmallest m s.t. it admits a description as above. Allowing terms on the r.h.s. of the form p ∈ Q [ n ] does not increase the expressiveness power since univariate polynomials are alreadylinrec and thus p could be replaced by introducing an auxiliary variable for it. If we fix theinitial conditions f (0) , . . . , f m (0), then the system above has unique solution, and we canmoreover compute all the values f i ( n )’s by unfolding the definition. Amongst innumerableothers, the Fibonacci sequence ∂ f = ∂f + f is linrec (even constant recursive) since wecan introduce an auxiliary sequence g and write ∂f = f + g and ∂g = f . An exampleusing non-constant polynomial coefficients is provided by the number t ( n ) of involutions of { , . . . , n } (a.k.a. telephone numbers ) since ∂ t = ∂t + ( n + 1) · t ; by introducing an auxiliarysequence s ( n ), we have a linrec system ∂t = t + n · s and ∂s = t . A.2 Examples of bidimensional linrec sequences There is a wealth of examples of linrec sequences. The power sequence n k is bidimensionallinrec since for n, k ≥ n k = n · n k − and the two sections 0 k and n are certainlyconstant after the first element. The sequence of binomial coefficients (cid:0) nk (cid:1) is linrec since (cid:0) nk (cid:1) = (cid:0) n − k − (cid:1) + (cid:0) n − k (cid:1) for n, k ≥ (cid:0) n (cid:1) = 1 for n ≥ (cid:0) k (cid:1) = 0 for k ≥ 1. The Stirling numbers of the first kind s ( n, k ) are linrec since s ( n, k ) = s ( n − , k − − ( n − · s ( n − , k ) for n, k ≥ s ( n, 0) = s (0 , k ) = 0 areconstant for n, k ≥ 1. Similar recurrences appear for the Stirling numbers of the second kind S ( n, k ) (as remarked in the introduction), the Eulerian numbers A ( n, k ) = ( n − k ) · A ( n − , m − k +1) · A ( n − , m ) the triangle numbers T ( n, k ) = k · T ( n − , k − k · T ( n − , k ),and many more.As an additional example, consider the Bell numbers B ( n ), which count the numberof non-empty partitions of a set of n elements. Notice that B ( n ) is not linrec, in fact noteven P-recursive [32, 24]. The well-known relationship B ( n ) = P nk =0 S ( n, k ) suggests toconsider the partial sums C ( n, k ) = P k − i =0 S ( n, k ). We have C ( n, 0) = 0 and C ( n + 1 , k + 1) = S ( n, k ) + C ( n + 1 , k ), thus C is linrec and B ( n ) = C ( n + 1 , n + 1) is its diagonal (shifted byone). A.3 Comparison with other classes of sequences Linrec vs. C-recursive. A sequence f : Q N d is C-recursive if it satisfies a recursion as in (2)where the affine operators A i,j are restricted to be of the form c i,j, + c i,j, ∂ + c i,j, ∂ forsome constants c i,j, , c i,j, , c i,j, ∈ Q . Thus bidimensional C-recursive sequences are linrecby definition. Since the asymptotic growth of a 1-dimensional C-recursive sequence f ( n ) is O ( r n ) for some constant r ∈ Q , the sequence n ! = n · ( n − PTIME [51, 53]. ▶ Lemma 22. The zeroness problem for a one-dimensional C-recursive sequence can besolved in PTIME . C V I T 2 0 1 6 Proof. It is well-known that a one-dimensional C-recursive sequence f of order m representedas in (6) where the p i,j ’s are rational numbers in Q , can be transformed into a single recurrence ∂ m f = c · ∂ f + · · · + c m − · ∂ m − f, where c , · · · , c m − ∈ Q . C.f. the proof of [27, Lemma 1] relying on the Cayley-Hamiltontheorem, or the more recent proof of [10, Proposition 1] relying on a linear independenceargument. It follows that f = 0 if, and only if, f ( n ) = 0 for 0 ≤ n ≤ m − 1. The lattercondition can be checked in PTIME by Lemma 3. ◀ Linrec vs. P-recursive. In dimension one, linrec sequences are a special case of P-recursivesequences [49]. The latter class can be defined as those sequences f : Q N satisfying a linearequation of the form p k ( n ) f ( n ) + p k − ( n ) f ( n − 1) + · · · + p ( n ) f ( n − k ) = 0 for every n ≥ k , where p k ( n ) , . . . , p ( n ) ∈ Q [ n ]. Thus linrec corresponds to P-recursive with leadingpolynomial coefficient p k ( i ) = 1. The inclusion is strict. The Catalan numbers C ( n ) areP-recursive since they satisfy ( n + 2) · C ( n + 1) = (4 n + 2) · C ( n ) for every n ≥ 0. However,they are not linrec, and in fact not even polyrec (a more general class, c.f. below), since 1) by[10, Theorem 6] polyrec (and thus linrec) sequences are ultimately periodic modulo everysufficiently large prime, and 2) C ( n ) is not ultimately periodic modulo any prime p [1].In dimension two, linrec and P-recursive sequences [35] are incomparable. The sequence f ( m, n ) = m n is linrec since f ( m + 1 , n + 1) = ( m + 1) · f ( m + 1 , n ), f ( m, 0) = 1, and f (0 , n + 1) = 0. The diagonal of f is thus f ( n, n ) = n n . Since P-recursive sequences areclosed under taking diagonals [35, Theorem 3.8] and n n is not P-recursive [23, Section 1,page 5], it follows that m n is not P-recursive either (as a two-dimensional sequence). Linrec vs. polyrec A one-dimensional sequence f : Q N is polynomial recursive (polyrec)if it satisfies a system of equations as in (6) where the rhs’ are polynomial expressions in Q [ f ( n ) , . . . , f m ( n )] [10, Definition 3] . In dimension one, the class of linrec sequences isstrictly included in the class of polyrec sequences. Consider the sequence f ( n ) = 2 n . Onthe one hand, it is polyrec since f ( n + 1) = f ( n ) . On the other hand, it is not linrec, andin fact not even P-recursive, since a P-recursive sequence g ( n ) has growth rate O (( n !) c ) forsome constant c ∈ N [35, Proposition 3.11]. To the best of our knowledge, polyrec sequencesin higher dimension have not been studied yet. A.4 Zeroness problem Zeroness of one-dimensional C-recursive sequences is decidable in NC [53] (and thus inpolylogarithmic space); we recalled a simple argument leading to a PTIME algorithm inLemma 22. Zeroness of one-dimensional P-recursive sequences is decidable (c.f. [12] and thecorrections in [5, Section 5]). Zeroness of one-dimensional polyrec sequences is decidable,and in fact the more general zeroness problem for polynomial automata is decidable withnon-primitive recursive complexity [3] (polyrec sequences correspond to polynomial automataover a unary alphabet Σ = { a } ). Since polynomial coefficients can already be defined in this formalism, we would obtain the same classby allowing more general expressions in Q [ n ][ f ( n ) , . . . , f m ( n )]. orentin Barloy and Lorenzo Clemente 23:19 A.5 Proofs for Sec. 2 ▶ Lemma 4. If f : Q N is linrec of order ≤ m , degree ≤ d , and height ≤ h , then its L -sections f ( L, k ) , f ( n, L ) : Q N are linrec of order ≤ m · ( L + 3) , degree ≤ d , and height ≤ h · L d . Proof. We prove the lemma for the L -section f L ( n ) defined as f ( n, L ). Let the auxili-ary sequences be f = f , . . . , f m as in (2), and fix the initial conditions f j (0 , ≥ , f j ( ≥ , , f j (0 , ∈ Q for every 1 ≤ j ≤ m . Let f Kj ( n ) be a new variable denoting the K -section f j ( n, K ), for every 1 ≤ j ≤ m and 0 ≤ K ≤ L . We show by induction on K that all the f Kj ’s are linrec. In the base case K = 0, f j ( n ) is linrec by setting f j (0) = f j (0 , ∈ Q and ∂ f j ( n ) = f j ( n + 1 , 0) = f j ( ≥ , ∈ Q . Notice that, strictly speaking, the latter is not alegal linrec equation since constants are allowed only in the base case and not in (6) (whichare linear systems and not affine ones). To this end, we introduce an extra variable g j ( n )and we define g j (0) = f j ( ≥ , ∈ Q , and we have the linrec equations ∂ f j ( n ) = g j ( n ) ,∂ g j ( n ) = g j ( n ) . For the inductive step, we write ∂ f M +1 j ( n ) = ∂ ∂ f j ( n, M )= X i ( p i ( n, M ) + p i ( n, M ) · ∂ + p i ( n, M ) · ∂ ) f i ( n, M )= X i (cid:0) ( p i ( n, M ) + p i ( n, M ) · ∂ ) f Mi ( n ) + p i ( n, M ) · f M +1 i ( n ) (cid:1) . By induction, each f Mi is one-dimensional linrec, and we can thus adjoin their correspondingsystems of equations. We have introduced m · ( L + 1) new variables f Lj ’s and m variables g j ’s (thus m + m · ( L + 1) + m = m · ( L + 3) in total), and the same number of additionalequations. The initial condition for the new variables f Mj is f Mj (0) = f j (0 , M ), which can becomputed in PTIME by Lemma 3. Moreover every polynomial coefficient appears already inthe original system, but with the second parameter fixed to some 0 ≤ M ≤ L . Therefore thedegree does not increase and the height is bounded by h · L d . ◀ B Proofs for Sec. 3 ▶ Lemma 8. Let A and B be two register automata. The inclusion problem L ( A ) ⊆ L ( B ) with A orbitised and without guessing reduces in PTIME to the case where A is deterministic. The reduction preserves whether B is 1)unambiguous, 2) without guessing, and 3) orbitised. The inclusion problem L ( A ) ⊆ L ( B ) with A deterministic reduces in PTIME to theuniversality problem for some register automaton C . If B is unambiguous, then so is C .If B is without guessing, then so is C . If A and B are orbitised, then so is C . The two reductions in Lemma 8 are sufficiently generic to be useful also in other contexts.For instance, in the context of nondeterministic finite automata they imply that the inclusionproblem L ( A ) ⊆ L ( B ) with A nondeterministic and B unambiguous reduces in PTIME tothe universality problem of an unambiguous finite automaton. Since the latter problem isin PTIME [51, Corollary 4.7], the inclusion problem is in PTIME as well. Notice that wedidn’t assume that A is unambiguous, as it is often done in analogous circumstances [51], [5,Section 5]. A similar reduction has recently been used in the context of inclusion problems C V I T 2 0 1 6 between context-free grammars and finite automata [15, Sec. 3.1] In the context of registerautomata, the results of [37] do not make any unambiguity assumption on A . Proof. Consider two register automata A and B over finite alphabet Σ with transitionrelations −→ A , resp., −→ B . We assume w.l.o.g. that they have the same number of registers.Regarding the first point, consider the new finite alphabet Σ ′ = −→ A which equals exactlythe set of transition rules of A . Let h : Σ ′ → Σ be the surjective homomorphism allowingus to recover the original letter and defined as h ( p σ,φ −−→ q ) = σ ; We extend h to a functionˆ h : (Σ ′ × A ) → (Σ × A ) by preserving the data value ˆ h ( t, a ) = ( h ( t ) , a ). Consider theautomaton A ′ obtained from A by replacing every transition rule t = ( p σ,φ −−→ A q ) of A with p t,φ −−→ A ′ q . Since A ′ has the same set of control locations and number of transitions as A , it isclearly of polynomial size. Since A is without guessing and orbitised, φ uniquely determinesthe next register contents given the current configuration and input ( σ, a ). Thus the onlysource of nondeterminism in A resides in the fact that there may be several transitions overthe same σ . This nondeterminism is removed in A ′ , since σ is replaced by the transition t itself. Consequently, A ′ is deterministic.Consider the automaton B ′ obtained from B by replacing every transition rule p σ,φ −−→ B q with all transitions of the form p t,φ −−→ B ′ q s.t. h ( t ) = σ . Clearly, B ′ has the same controllocations as B and number of transitions O ( |−→ A | · |−→ B | ). Moreover, if B is orbitised,then so it is B ′ Thus B ′ is of polynomial size and by definition L ( B ′ ) = ˆ h − ( L ( B )) and L ( B ) = ˆ h ( L ( B ′ )). The correctness of the reduction follows from the following claims. ▷ Claim. L ( A ) ⊆ L ( B ) if, and only if, L ( A ′ ) ⊆ L ( B ′ ). Proof of the claim. For the “only if” direction, assume L ( A ) ⊆ L ( B ) and let w ∈ L ( A ′ ).By the definition of A ′ , ˆ h ( w ) ∈ L ( A ), and thus ˆ h ( w ) ∈ L ( B ) by assumption. It follows that w ∈ ˆ h − ( L ( B )) = L ( B ′ ), as required.For the “if” direction, assume L ( A ′ ) ⊆ L ( B ′ ) and let w = ( σ , a ) · · · ( σ n , a n ) ∈ L ( A ).Let the corresponding accepting run in A be π = ( p , ¯ a ) σ ,a −−−→ · · · σ n ,a n −−−−→ ( p n , ¯ a n ) . induced by the sequence of transitions t = ( p σ ,φ −−−→ p ) , . . . , t n = ( p n − σ n ,φ n −−−−→ p n ). Bythe definition of A ′ , ρ := ( t , a ) · · · ( t n , a n ) ∈ L ( A ′ ), and thus ρ ∈ L ( B ′ ) by assumption. Bydefinition of B ′ , w = ˆ h ( ρ ) ∈ ˆ h ( L ( B ′ )) = L ( B ), as required. ◀▷ Claim. If B is unambiguous, then so it is B ′ . Proof of the claim. If there are two distinct accepting runs in B ′ over the same inputword w ∈ (Σ ′ × A ) ∗ , then applying ˆ h yields two distinct accepting runs in B over ˆ h ( w ) ∈ (Σ × A ) ∗ . ◀▷ Claim. If B is without guessing, then so it is B ′ . Proof of the claim. If there is a reachable transition in (cid:74) B ′ (cid:75) of the form ( p, ¯ a ) t,a −−→ ( q, ¯ a ′ )s.t. some fresh a ′ i occurs in ¯ a ′ , then the same holds for ( p, ¯ a ) h ( t ) ,a −−−−→ ( q, ¯ a ′ ) in (cid:74) B (cid:75) . ◀ We now show the second point, and we thus assume that A is deterministic. By pureset-theoretic manipulations, we have L ( A ) ⊆ L ( B ) iff L ( B ) ∪ L ( A ) c = ( A × A ) ∗ iff ( L ( B ) ∩ L ( A )) ∪ L ( A ) c = ( A × A ) ∗ , orentin Barloy and Lorenzo Clemente 23:21 where L ( A ) c denotes ( A × A ) ∗ \ L ( A ). It suffices to observe that 1) L ( A ) c is recognisable by adeterministic (and thus unambiguous and without guessing) register automaton constructiblein PTIME , 2) L ( B ) ∩ L ( A ) is recognisable by an unambiguous and without guessing automatonof polynomial size (since A is deterministic and B unambiguous and without guessing), and3) the disjoint union of two unambiguous and without guessing languages is unambiguous andwithout guessing, and the complexity is again polynomial. We thus take as C any unambiguousand without guessing automaton of polynomial size s.t. L ( C ) = ( L ( B ) ∩ L ( A )) ∪ L ( A ) c .Finally, if A and B are orbitised, then C is also orbitised. ◀ C Proofs for Sec. 4 ▶ Lemma 9. Let ¯ a, ¯ b ∈ A d ⊥ . If [¯ a ] = [¯ b ] , then G p, ¯ a ( n, k ) = G p, ¯ b ( n, k ) for every n, k ≥ . Proof. Let R p, ¯ a ( n, k ) be the set whose cardinality is counted by G p, ¯ a ( n, k ): R p, ¯ a ( n, k ) = { [ π ] ¯ a | w ∈ (Σ × A ) n , π ∈ Runs ( C I ; w ; p, ¯ a ) , w = k } . (7)Let α : A → A be an automorphism s.t. α (¯ a ) = ¯ b . We claim that there exists a bijectivefunction from R p, ¯ a ( n, k ) to R p, ¯ b ( n, k ). Consider the function f that maps ¯ a -orbits of runs to¯ b -orbits of runs defined as f ([ π ] ¯ a ) = [ α ( π )] α (¯ a ) = [ α ( π )] ¯ b . Since runs π ∈ R p, ¯ a ( n, k ) are ¯ a -supported and f preserves the length of the run andthe width of the data word labelling it, f has the right type f : R p, ¯ a ( n, k ) → R p, ¯ b ( n, k ).We claim that f is injective on R p, ¯ a ( n, k ). Towards a contradiction, assume [ π ] ¯ a ̸ = [ ρ ] ¯ a but [ α ( π )] ¯ b = [ α ( ρ )] ¯ b . There exists a ¯ b -automorphism β : A → A s.t. β ( α ( π )) = α ( ρ ).Consequently, α − ( β ( α ( π ))) = ρ maps π to ρ . Moreover, α − βα is an ¯ a -automorphism since α − ( β ( α (¯ a ))) = α − ( β (¯ b )) (def. of α )= α − (¯ b ) ( β is a ¯ b -automorphism)= ¯ a (def. of α ) . It follows that [ π ] ¯ a = [ ρ ] ¯ a , which is a contradiction. Thus, f is injective. By a symmetricargument, there exists also an injective function g : R p, ¯ b ( n, k ) → R p, ¯ a ( n, k ). ◀▶ Lemma 11. The sequences G p, [¯ a ] ’s satisfy the system of equations in Figure 2. Proof. We show that G p, [¯ a ] ( n, k ) counts the number of orbits of initial runs over words oflength n and width k ending in a configuration in the orbit ( p, [¯ a ]). Let S p, ¯ a ( n, k ) be the setof initial runs ending in ( p, ¯ a ) over words w of length n and width k : S p, ¯ a ( n, k ) = { π | w ∈ (Σ × A ) n , π ∈ Runs ( C I ; w ; p, ¯ a ) , w = k } . (8)We have R p, ¯ a ( n, k ) = orbits ¯ a ( S p, ¯ a ( n, k )) = { [ π ] ¯ a | π ∈ S p, ¯ a ( n, k ) } . We observe the following C V I T 2 0 1 6 decomposition for n, k ≥ S p ′ , ¯ a ′ ( n + 1 , k + 1) = [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) ,a ∈ ¯ a { π · t | π ∈ S p, ¯ a ( n, k + 1) } | {z } I ∪ [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) ,a ̸∈ ¯ a { π · t | π ∈ S p, ¯ a ( n, k ) , a ̸∈ π } | {z } II ∪ [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) ,a ̸∈ ¯ a { π · t | π ∈ S p, ¯ a ( n, k + 1) , a ∈ π } | {z } III , where the three unions marked by I , II , III are mutually disjoint. When we pass to their¯ a ′ -orbits, we also get a disjoint union of orbits: R p ′ , ¯ a ′ ( n + 1 , k + 1) = [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) ,a ∈ ¯ a { [ π · t ] ¯ a ′ | π ∈ S p, ¯ a ( n, k + 1) } ∪ [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) ,a ̸∈ ¯ a { [ π · t ] ¯ a ′ | π ∈ S p, ¯ a ( n, k ) , a ̸∈ π } ∪ [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) ,a ̸∈ ¯ a { [ π · t ] ¯ a ′ | π ∈ S p, ¯ a ( n, k + 1) , a ∈ π } . By taking cardinalities on both sides, we get | R p ′ , ¯ a ′ ( n + 1 , k + 1) | = (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) ,a ∈ ¯ a { [ π · t ] ¯ a ′ | π ∈ S p, ¯ a ( n, k + 1) } | {z } R I t (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) + (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) ,a ̸∈ ¯ a { [ π · t ] ¯ a ′ | π ∈ S p, ¯ a ( n, k ) , a ̸∈ π } | {z } R II t (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) + (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) ,a ̸∈ ¯ a { [ π · t ] ¯ a ′ | π ∈ S p, ¯ a ( n, k + 1) , a ∈ π } | {z } R III t (cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12)(cid:12) . ▷ Claim 23. Fix two transitions t = ( p , ¯ a σ ,a −−−→ p ′ , ¯ a ′ ) and t = ( p , ¯ a σ ,a −−−→ p ′ , ¯ a ′ ). If R I t ∩ R I t ̸ = ∅ then [ t ] = [ t ]. Proof of the claim. Let [ π · t ] ¯ a ′ = [ π · t ] ¯ a ′ for two runs π ∈ S p , ¯ a ( n − , k ) and π ∈ S p , ¯ a ( n − , k ). There exists an (¯ a ′ -)automorphism α s.t. α ( π · t ) = π · t . Inparticular, α ( t ) = t , i.e., [ t ] = [ t ] as required. ◀ The claim above implies that the R I t ’s are disjoint for distinct orbits [ t ]’s, and similarly for orentin Barloy and Lorenzo Clemente 23:23 R II t and R III t . We thus obtain the equations | R p ′ , ¯ a ′ ( n + 1 , k + 1) | = X [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ )]: a ∈ ¯ a | { [ π · t ] ¯ a ′ | π ∈ S p, ¯ a ( n, k + 1) } | {z } R I t | + X [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ )]: a ̸∈ ¯ a | { [ π · t ] ¯ a ′ | π ∈ S p, ¯ a ( n, k ) , a ̸∈ π } | {z } R II t | + X [ t =( p, ¯ a σ,a −−→ p ′ , ¯ a ′ )]: a ̸∈ ¯ a | { [ π · t ] ¯ a ′ | π ∈ S p, ¯ a ( n, k + 1) , a ∈ π } | {z } R III t | . ▷ Claim 24. The set of orbits R I t is in bijection with the set of orbits R p, ¯ a ( n, k + 1) = { [ π ] ¯ a | π ∈ S p, ¯ a ( n, k + 1) } . Proof of the claim. Indeed, consider the mapping f : R I t → R p, ¯ a ( n, k + 1) defined as f ([ π · t ] ¯ a ′ ) = [ π ] ¯ a with t = ( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) . First of all f is well-defined as a function: Assume [ π · t ] ¯ a ′ = [ π · t ] ¯ a ′ for two paths π , π both ending in configuration ( p, ¯ a ). There exists an ¯ a ′ -automorphism α s.t. α ( π · t ) = π · t .In particular, α ( π ) = π and since π , π end up in the same configuration ( p, ¯ a ), α (¯ a ) = ¯ a .Thus α is in fact a ¯ a -automorphism and [ π ] ¯ a = [ π ] ¯ a as required. Secondly, f is of theright type since [ π ] ¯ a ∈ R p, ¯ a ( n, k + 1): π · t is a run over a word w · a of width k + 1 andthus π is a run over a word w also of width k + 1 because a ∈ ¯ a , implying a ∈ w since theautomaton is non-guessing. We argue that f is a bijection. First of all, f is injective: If f ([ π · t ] ¯ a ′ ) = f ([ π · t ] ¯ a ′ ), then by definition of f we have [ π ] ¯ a = [ π ] ¯ a . There exists an¯ a -automorphism α s.t. α ( π ) = π . Since the automaton is without guessing, ¯ a ′ ⊆ ¯ a , andthus α is also an ¯ a ′ -automorphism. Since α ( t ) = t (due to the fact that a ∈ ¯ a and thus α ( a ) = a ), α ( π · t ) = π · t and thus [ π · t ] ¯ a ′ = [ π · t ] ¯ a ′ as required.The mapping f is also surjective. Indeed, let [ π ] ¯ a ∈ R p, ¯ a ( n, k + 1). Thus π ends inconfiguration ( p, ¯ a ) and therefore π · t is a run. Consequently, [ π · t ] ¯ a ′ ∈ R I t . This is enoughsince, by the definition of f , [ π ] ¯ a = f ([ π · t ] ¯ a ′ ). ◀▷ Claim 25. The set of orbits R II t is in bijection with the set of orbits R p, ¯ a ( n, k ) = { [ π ] ¯ a | π ∈ S p, ¯ a ( n, k ) } . Proof of the claim. Consider the mapping f ([ π · t ] ¯ a ′ ) = [ π ] ¯ a , with t = ( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) . First of all, f is well-defined as a function, and the argument is as in the previous point.Secondly, f has the right type. If π · t is a run over a word w · a of width k + 1, then π is a run over w of width k since a ̸∈ w . Thus f is indeed a mapping from R II to R p, ¯ a ( n, k ). We argue that f is bijective. First of all, f is injective. Consider ¯ a ′ -orbit of runs[ π · t ] ¯ a ′ , [ π · t ] ¯ a ′ ∈ R II with a ̸∈ π ∪ π . If f ([ π · t ] ¯ a ′ ) = f ([ π · t ] ¯ a ′ ), then by definitionof f we have [ π ] ¯ a = [ π ] ¯ a . There exists an ¯ a -automorphism α s.t. α ( π ) = π . Since a ̸∈ π ∪ π , there is an automorphism β s.t. β agrees with α on every data value in π (in particular, β ( π ) = π and β (¯ a ) = ¯ a ), and β ( a ) = a . Since the automaton is withoutguessing, ¯ a ′ ⊆ ¯ a ∪ { a } . Thus, β is a ¯ a ′ -automorphism and β ( π · t ) = β ( π ) · β ( t ) = π · t ,i.e., [ π · t ] ¯ a ′ = [ π · t ] ¯ a ′ as required. The mapping f is surjective by an argument as in theproof of Claim 24. ◀ C V I T 2 0 1 6 ▷ Claim 26. The set of orbits R III t with k + 1 ≥ a is in bijection with k + 1 − a disjointcopies of the set of orbits R p, ¯ a ( n, k + 1) = { [ π ] ¯ a | π ∈ S p, ¯ a ( n, k + 1) } , and it is empty if otherwise k + 1 < a . Proof of the claim. If k + 1 < a , then clearly since the automaton is non-guessing it couldnot have stored more distinct data values a in the register than the number of distinctdata values k + 1 in the input, and thus R III t = ∅ in this case. In the following, thus assume k + 1 ≥ a . Let w = a · · · a n ∈ A n be the sequence of data values labelling the run π ,and consider the non-contiguous subsequence D π = a i · · · a i k +1 − a of w consisting of the k + 1 − a distinct elements in w \ ¯ a in their order of appearance in w (and thus in π ).Consider the function f defined as f ([ π · t ] ¯ a ′ ) = ( j, [ π ] ¯ a ) with t = ( p, ¯ a σ,a −−→ p ′ , ¯ a ′ ) , where a ̸∈ ¯ a equals the unique a i j ∈ D π . First of all, f is well-defined as a function:Assume ([ π · t ] ¯ a ′ , ( j , [ π ] ¯ a )) , ([ π · t ] ¯ a ′ , ( j , [ π ] ¯ a )) ∈ f with [ π · t ] ¯ a ′ = [ π · t ] ¯ a ′ . There is an¯ a ′ -automorphism α s.t. α ( π · t ) = π · t . In particular, α ( π ) = π and α ( t ) = t , which alsoimplies α ( a ) = a . From α ( π ) = π , we even have that α is a ¯ a -automorphism, and thus[ π ] ¯ a = [ π ] ¯ a . We now argue that j = j . Assume a appears in position j in D π and inposition j in D π . Assume by way of contradiction that j ̸ = j . We have that α ( a ) = a appears in position j in α ( D π ) = D α ( π ) = D π , i.e., a also appears in position j in D π .This is a contradiction, since all elements in D π are distinct. Thus f is indeed a mappingfrom R III to { , . . . , k + 1 − a } × R p, ¯ a ( n, k + 1).We argue that f is bijective. First of all, f is injective. Consider ¯ a ′ -orbit of runs[ π · t ] ¯ a ′ , [ π · t ] ¯ a ′ ∈ R III t with a ̸∈ ¯ a, a ∈ π , a ∈ π . Assume f ([ π · t ] ¯ a ′ ) = f ([ π · t ] ¯ a ′ ). Bythe definition of f , we have [ π ] ¯ a = [ π ] ¯ a , and a occurs in the same position j in D π , resp., D π . Consequently α ( a ) occurs at position j in α ( D π ) = D α ( π ) = D π , and thus α ( a ) = a .There exists an ¯ a -automorphism α s.t. α ( π ) = π . Since the automaton is without guessing,¯ a ′ ⊆ ¯ a ∪ { a } , and thus α is even an ¯ a ′ -automorphism. This means [ π ] ¯ a ′ = [ π ] ¯ a ′ and α ( t ) = t ,and thus [ π · t ] ¯ a ′ = [ π · t ] ¯ a ′ as required. The mapping f is surjective by an argumentanalogous as in the proof of Claim 24. ◀ Thanks to Claims 24–26, we obtain the equations | R p ′ , ¯ a ′ ( n + 1 , k + 1) | = X [ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ]: a ∈ ¯ a | R p, ¯ a ( n, k + 1) | + X [ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ]: a ̸∈ ¯ a | R p, ¯ a ( n, k ) | + X [ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ]: a ̸∈ ¯ a |{ , . . . , k + 1 − a } × R p, ¯ a ( n, k + 1) | . By recalling the definition G p, ¯ a ( n + 1 , k + 1) = | R p, ¯ a ( n + 1 , k + 1) | , we obtain, as required, G p ′ , ¯ a ′ ( n + 1 , k + 1) = X [ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ]: a ∈ ¯ a G p, ¯ a ( n, k + 1) + X [ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ]: a ̸∈ ¯ a ( G p, ¯ a ( n, k ) + max { k + 1 − a, } · G p, ¯ a ( n, k + 1)) . ◀ orentin Barloy and Lorenzo Clemente 23:25 ▶ Lemma 13. Let A be an unambiguous register automaton over equality atoms withoutguessing with d registers and ℓ control locations. The universality problem for A reduces tothe zeroness problem of the linrec sequence G defined by the system of equations in Figure 2containing O ( ℓ · d · log d ) variables and equations and constructible in PSPACE . If A is alreadyorbitised, then the system of equations has size O ( ℓ ) . Proof. We can effectively enumerate all orbits of transitions [ p, ¯ a σ,a −−→ p ′ , ¯ a ′ ] by enumeratingall the exponentially many constraints up to logical equivalence [4, Ch. 4], which can be donein PSPACE since this is the complexity of first-order logic over the equality relation. Recallthat the Bell number B ( n ) counts the number of non-empty partitions of a set of n elements.The system in Figure 2 contains ℓ · B ( d ) + 2 = O ( ℓ · d · log d ) equations and variables. ◀ D Proofs and additional material for Sec. 5 ▶ Theorem 14 (c.f. [42, Sec. 1]) . If R has the CLM property, then 1) R [ ∂ ; σ ] has a pseudo-division, and 2) R [ ∂ ; σ ] also has the CLM property. Proof. We adapt a proof by Giesbrecht given in the case when R is a field, for which thereeven is a least common left multiple [25, Sec. 2] (c.f. also [43, Sec. 2]). We consider the moregeneral case where R is a ring, in which case we will not have any minimality guarantee forthe common left multiple.We first prove that R [ ∂ ; σ ] has pseudo-division. Let consider the nonzero skew polynomials A = a m · ∂ m + · · · + a and B = b n · ∂ n + · · · + b where m ≥ n . Let R = A . The leading term of B is b n · ∂ n and thus the leading termof ∂ m − n · B is ∂ m − n · b n · ∂ n = σ m − n ( b n ) · ∂ m . Since R is CLM , there are a ′ and b ′ s.t. a ′ · a m = b ′ · σ m − n ( b n ). Therefore, R := a ′ · R − b ′ · ∂ m − n · B has degree strictly lessthan m := m = deg R . We repeat this operation obtaining a sequence of remainders: a ′ · R = b ′ · ∂ m − n · B + R ,a ′ · R = b ′ · ∂ m − n · B + R , ... a ′ k − · R k − = b ′ k − · ∂ m k − − n · B + R k ,a ′ k · R k = b ′ k · ∂ m k − n · B + R k +1 , where m i := deg R i , R i +1 := a ′ i · R i − b ′ i · ∂ m i − n , and the degrees satisfy m > m > · · · >m k > n > m k +1 . By defining a = a ′ k a ′ k − · · · a ′ ∈ R , taking as quotient the skew polynomial P = b ′ k · ∂ m k − n + a ′ k b ′ k − · ∂ m k − − n + · · · + a ′ k a ′ k − · · · a ′ b ′ · ∂ m − n ∈ R [ ∂ ; σ ]and as a remainder Q = R k +1 we have, as required, deg Q < m and a · A = P · B + Q. We now show that R [ ∂ ; σ ] has the CLM property. To this end, let A , A ∈ R [ ∂ ; σ ] withdeg A ≥ deg A be given. We apply the pseudo-division algorithm above to obtain the C V I T 2 0 1 6 sequence a · A = Q · A + A ,a · A = Q · A + A , ... a k − · A k − = Q k − · A k − + A k ,a k − · A k − = Q k − · A k + A k +1 , with a , . . . , a k − ∈ R , A k +1 = 0, and the degrees of the A i ’s are strictly decreasing:deg A > deg A > · · · > deg A k . Consider the following two sequences of skew polynomials S = 1 , S = 0 , S i = a i − · S i − − Q i − · S i − , and T = 0 , T = 1 , T i = a i − · T i − − Q i − · T i − . It can easily be verified that S i · A + T i · A = A i for every 0 ≤ i ≤ k + 1: The base cases i = 0 and i = 1 are clear; inductively, we have S i A + T i A = ( a i − · S i − − Q i − · S i − ) A + ( a i − · T i − − Q i − · T i − ) A == a i − ( S i − A + T i − A ) − Q i − ( S i − A + T i − A ) == a i − A i − − Q i − A i − = A i . In particular, at the end S k +1 · A + T k +1 · A = 0, as required.It remains to check that S k +1 is nonzero. We show the stronger property that deg S i =deg A − deg A i − for every 3 ≤ i ≤ k + 1. The base case i = 3 is clear. For the inductivestep, notice that deg Q i − = deg A i − − deg A i − > 0. Thus deg( Q i − · S i − ) = deg A i − − deg A i − + deg A − deg A i − = deg A − deg A i − . Moreover, deg( a i − · S i − ) = deg S i − =deg A − deg A i − < deg A − deg A i − . Thus, deg S i = deg( Q i − · S i − ) = deg A − deg A i − ,as required. ◀▶ Lemma 17. The zeroness problem for a bidimensional linrec sequence f : Q N of order ≤ m and univariate polynomial coefficients in Q [ k ] admitting some cancelling relation ( CR -2) with leading coefficient p i ∗ ,j ∗ ( k ) ∈ Q [ k ] of degree ≤ e and height ≤ h s.t. each of the one-dimensional sections f ( M, k ) ∈ Q N for ≤ M ≤ i ∗ also admits some cancelling relation ( CR -1) of ∂ -degree ≤ d with leading polynomial coefficients of degrees ≤ e and height ≤ h isdecidable in deterministic time ˜ O ( p ( m, i ∗ , j ∗ , d, e, h )) for some polynomial p . Proof. We recall Lagrange’s classical bound on the roots of univariate polynomials. ▶ Theorem 27 (Lagrange, 1769) . The roots of a complex polynomial p ( z ) = P di =0 a i · z i ofdegree d are bounded by P ≤ i ≤ d − | a i || a n | . In particular, the maximal root of a polynomial p ( k ) ∈ Q [ k ] with integral coefficients is at most d · max i | a i | . By Theorem 27, the largest root of the leading polynomial coefficient p i ∗ ,j ∗ ( k ) is ≤ k p i ∗ ,j ∗ ·| p i ∗ ,j ∗ | ∞ < e · h and similarly the roots of all the leading polynomial coefficientsof the cancelling relations for the sections f (0 , n ) , . . . , f ( i ∗ , n ) are < e · h . In the following,let K = 2 + j ∗ + e · h. orentin Barloy and Lorenzo Clemente 23:27 ▷ Claim 28. The one-dimensional section f ( n, L ) ∈ Q N for a fixed L ≥ f (0 , L ) = f (1 , L ) = · · · = f ( m · ( L + 3) , L ) = 0. Proof of the claim. The “only if” direction is obvious. By Lemma 4, for any fixed L ∈ N the 1-dimensional L -section f ( n, L ) is linrec of order ≤ m · ( L + 3). In fact, it is C-recursiveof the same order since the coefficients do not depend on n and are thus constants. It followsthat if f (0 , L ) = f (1 , L ) = · · · = f ( m · ( L + 3) , L ) = 0, then in fact f ( n, L ) = 0 for every n ∈ N (c.f. the proof of Lemma 22). ◀▷ Claim 29. The one-dimensional section f ( M, k ) ∈ Q N for a fixed 0 ≤ M ≤ i ∗ is identicallyzero if, and only if, f ( M, 0) = f ( M, 1) = · · · = f ( M, d + e · h ) = 0. Proof of the claim. The “only if” direction is obvious. By assumption, f ( M, k ) admits acancelling relation ( CR -1) of ∂ -degree ℓ ∗ ≤ d and leading polynomial coefficient q ℓ ∗ ( k ) ofdegree ≤ e and height ≤ h . By Theorem 27, the roots of q ℓ ∗ ( k ) are bounded by O ( e · h ).It follows that if f ( M, 0) = f ( M, 1) = · · · = f ( M, d + e · h ) = 0 then f ( M, n ) is identicallyzero. ◀▷ Claim 30. f = 0 if, and only if, all the one-dimensional sections f ( n, , . . . , f ( n, K ) , f (0 , k ) , . . . , f ( i ∗ , k ) ∈ Q N are identically zero. Proof of the claim. The “only if” direction is obvious. For the “if” direction, assume all thesections above are identically zero as one-dimensional sequences. By way of contradiction,let ( n, k ) be the pair of indices which is minimal for the lexicographic order s.t. f ( n, k ) ̸ = 0.By assumption, we necessarily have n > i ∗ and k > K . By ( CR -2) we have p i ∗ ,j ∗ ( k − j ∗ ) · f ( n, k ) = X ( i,j ) < lex ( i ∗ ,j ∗ ) p i,j ( n − i ∗ , k − j ∗ ) · f ( n − ( i ∗ − i ) , k − ( j ∗ − k )) . Since k > K , k − j ∗ > K − j ∗ ≥ e · h , we have p i ∗ ,j ∗ ( k − j ∗ ) ̸ = 0 since the largest root of p i ∗ ,j ∗ is ≤ e · h . Consequently, there exists ( i, j ) < lex ( i ∗ , j ∗ ) s.t. f ( n − ( i ∗ − i ) , k − ( j ∗ − k )) ̸ = 0,which contradicts the minimality of ( n, k ). ◀ By putting together the three claims above it follows that f is identically zero if, and only if, f is zero on the set of inputs { , . . . , m · ( K + 3) } × { , . . . , K } ∪ { , . . . , i ∗ } × { , . . . , d + e · h } . Let N = 1 + max { m · ( K + 3) , i ∗ } and K ′ = 1 + max { K, d + e · h } . The condition abovecan be verified by computing O ( N · K ′ ) values for f ( n, k ), each of which can be done indeterministic time ˜ O ( m · N · K ′ ) thanks to Lemma 3, together yielding ˜ O ( m · N · ( K ′ ) )which is ˜ O ( p ( m, i ∗ , j ∗ , d, e, h )) for a suitable polynomial p . ◀▶ Theorem 18. The zeroness problem for linrec sequences with univariate polynomialcoefficients from Q [ k ] (or from Q [ n ] ) is decidable. Proof. We interpret the system of equations (2) as the following linear system of equationswith coefficients P i,j ∈ W . P , · f + · · · + P ,m · f m = 0 , ... P m, · f + · · · + P m,m · f m = 0 . (9) C V I T 2 0 1 6 The idea is to eliminate all variables f m , . . . , f from (9) until a CR for f remains. W.l.o.g. Weshow how to remove the last variable f m . The skew polynomial coefficients of f m in equations1 , . . . , m are P ,m , . . . , P m,m ∈ W . By m applications of Corollary 16, we can find leftmultipliers Q , . . . , Q m ∈ W s.t. Q · P ,m = Q · P ,m = · · · = Q m · P m,m . We obtain thenew system not containing f m ( Q P , − Q m P m, ) · f + · · · +( Q P ,m − − Q m P m,m − ) · f m − = 0 , ...( Q m − P m − , − Q m P m, ) · f + · · · +( Q m − P m − ,m − − Q m P m,m − ) · f m − = 0 . After eliminating all the other variables f m − , . . . , f in the same way, we are finally leftwith an equation R · f = 0 with R ∈ W . Thanks to a linear independence-argument thatwill be presented in Lemma 37, the operator R is not zero. (Notice that the univariateassumption is not necessary to carry over the elimination procedure and obtain a cancellingrelation.) Notice that the polynomial coefficients in R are univariate polynomials in Q [ k ].Let p i ∗ ,j ∗ ( k ) be leading polynomial coefficient of R when put in the form ( CR -2). By ananalogous elimination argument we can find cancelling relations R , . . . , R i ∗ for each of theone-dimensional sections f ∗ (0 , k ) , . . . , f ( i ∗ , k ) ∈ Q N (which are effectively one-dimensionallinrec sequences by Lemma 4) respectively. We then conclude by Lemma 17. ◀ The elimination algorithm presented so far suffices to decide the universality, inclusion,and equivalence problems for unambiguous register automata without guessing. ▶ Corollary 31. The universality and equivalence problems for unambiguous register automatawithout guessing are decidable. The inclusion problem L ( A ) ⊆ L ( B ) for register automatawithout guessing is decidable when B is unambiguous. Notice that in the inclusion problem L ( A ) ⊆ L ( B ) we do not assume that A is unambiguous. Proof. By Lemma 8, inclusion and equivalence reduce to universality. By Lemma 10, theuniversality problem reduces to the zeroness problem of the sequence G from Figure 2, whichis linrec by its definition and Lemma 11. Since the polynomial coefficients in Figure 2 areunivariate, we can decide zeroness of G by Theorem 18. ◀ D.1 CLM examples In this section we illustrate the CLM property with two examples, the first for W and thesecond for W . ▶ Example 32. We give an example of application of the CLM property in W . Considerthe two polynomials F = ∂ − ( k + 1) ∂ and F = − ∂ + ∂ . Since k and ∂ commute, F · F = F · F and the multipliers have degree 2. The CLM algorithm finds multipliers ofdegree 1:1 · F = ( − · F + F with F = − k∂ ,k · F = ∂ · F + F with F = k∂ , · F = ( − · F . We have s = 1 , s = 0 , s = 1 , s = − ∂ , s = − ∂ + 1 and t = 0 , t = 1 , t = 1 , t = − k + ∂ , t = − k + ∂ + 1. We can thus verify that s · F = − t · F . orentin Barloy and Lorenzo Clemente 23:29 ▶ Example 33. We give an example of CLM property in W . Consider the skew polynomials G = ( − ∂ + ∂ ) ∂ and G = ( ∂ − k∂ ) ∂ − ∂ . Since ∂ G = ( ∂ − ( k + 1) ∂ ) ∂ − ∂ ∂ ,thanks to Example 32 we have( ∂ − k − · G = ( − ∂ + 1) ∂ · G + G , with G = ( − ∂ + ∂ ) ∂ , which gives the first pseudo-division. Analogously, since ( − ∂ + 1) · ( ∂ − k∂ ) = ( ∂ − k ) · ( − ∂ + ∂ ), we have the second and third pseudo-divisions( − ∂ + 1) · G = ( ∂ − k ) · G + G , with G = ∂ − ∂ , · G = − ∂ · G . We thus have s = 1 , s = 0 , s = ∂ − k − , s = − ( ∂ − k ) · ( ∂ − k − , s = ( ∂ − k − − ∂ · ( ∂ − k ) · ( ∂ − k − 1) = ( ∂ − k − − ( ∂ − k − · ( ∂ − k − ∂ and t = 0 , t = 1 , t = − ( − ∂ + 1) ∂ , t = ( − ∂ + 1) + ( ∂ − k ) · ( − ∂ + 1) ∂ , t = − ( − ∂ +1) ∂ + ∂ · (( − ∂ + 1) + ( ∂ − k ) · ( − ∂ + 1) ∂ ) = ( ∂ − k − · ( − ∂ + 1) ∂ . One can checkthat s · G = − t · G . D.2 CR examples In this section we present detailed examples of CR . ▶ Example 34. We continue our running Example 15. Recall the starting equations: ∂ ∂ · G p = 0 , − (1 + ( k + 1) ∂ ) · G p +( ∂ ∂ − k∂ − · G q = 0 , − (1 + ( k + 1) ∂ ) · G p +( ∂ ∂ − ∂ ) · G r = 0 , − ∂ · G q − (1 + k∂ ) · G r + ∂ ∂ · G s = 0 , ( ∂ ∂ − ( k + 1) ∂ − · S = 0 ,G s − S + G = 0 . In order to eliminate G p , we need to find a common left multiple of a = ∂ ∂ and b =1 + ( k + 1) ∂ , i.e., we need to find skew polynomials c, d s.t. c · a = d · b . It can be verifiedthat taking c = 1 + ( k + 2) ∂ and d = ∂ ∂ fits the bill. We thus remove the first equationand left-multiply by d the second and third equations (with S = S for simplicity from nowon): ( ∂ ∂ − ( k + 1) ∂ ∂ − ∂ ∂ ) | {z } a · G q = 0 , +( ∂ ∂ − ∂ ∂ ) · G r = 0 , − ∂ |{z} b · G q − (1 + k∂ ) · G r + ∂ ∂ · G s = 0 , ( ∂ ∂ − ( k + 1) ∂ − · S = 0 ,G s − S + G = 0 . We now remove G q . Since its coefficient b = ∂ in the third equation is already a multipleof its coefficient a = ∂ ∂ − ( k + 1) ∂ ∂ − ∂ ∂ in the first equation, it suffices to remove C V I T 2 0 1 6 the first equation and left-multiply the third equation by “ ∂ ∂ − ( k + 1) ∂ ∂ − ∂ ”:( ∂ ∂ − ∂ ∂ ) | {z } a · G r = 0 , − ( ∂ ∂ − ( k + 1) ∂ ∂ − ∂ )(1 + k∂ ) | {z } b · G r +( ∂ ∂ − ( k + 1) ∂ ∂ − ∂ ) ∂ ∂ · G s = 0 , ( ∂ ∂ − ( k + 1) ∂ − · S = 0 ,G s − S + G = 0 . We now remove G r , and thus we need to find a CLM of a = ∂ ∂ − ∂ ∂ = ( ∂ − ∂ ∂ and b = ( ∂ ∂ − ( k + 1) ∂ ∂ − ∂ )(1 + k∂ ) = ( ∂ ∂ − ( k + 1) ∂ − k∂ ) ∂ . It can bechecked that for d = ( ∂ − ∂ there exists some c (whose exact value is not relevant here)s.t. c · a = d · b . We can thus remove the first equation and left-multiply the second one by d : ( ∂ − ∂ ( ∂ ∂ − ( k + 1) ∂ ∂ − ∂ ) ∂ ∂ | {z } a · G s = 0 , ( ∂ ∂ − ( k + 1) ∂ − · S = 0 ,G s − S + G = 0 . We can now immediately remove G s by left-multiplying the last equation by its coefficient a in the first equation: ( ∂ ∂ − ( k + 1) ∂ − | {z } b · S = 0 , ( ∂ − ∂ ( ∂ ∂ − ( k + 1) ∂ ∂ − ∂ ) ∂ ∂ | {z } a · ( − S + G ) = 0 . In order to finish it remains to remove S . The general approach is to find a CLM of a and b , but we would like to avoid performing too many calculations here. Since b · S = 0, wealso have b ∂ ∂ · S = 0 (since ∂ ∂ · S is just a shifted version of S , and since a can bewritten as a = ( ∂ − ∂ ( ∂ ∂ − ( k + 1) ∂ − ∂ ∂ = ( ∂ − ∂ · b · ∂ ∂ , it follows that a · S = 0 and we immediately have( ∂ − ∂ ( ∂ ∂ − ( k + 1) ∂ − ∂ ∂ | {z } a · G = 0 . Since a can be expanded to (as a sum of products). a = ( ∂ − ∂ ( ∂ ∂ − ( k + 1) ∂ − ∂ ∂ == ( ∂ ∂ − ( k + 3) ∂ − ∂ ( ∂ − ∂ == ∂ ∂ − ( k + 3) ∂ ∂ − ∂ ∂ − ∂ ∂ + ( k + 3) ∂ ∂ + ∂ ∂ == ∂ ∂ − ( k + 4) ∂ ∂ − ∂ ∂ + ( k + 3) ∂ ∂ + ∂ ∂ , the sought cancelling relation for G , obtained by expanding the equation above, is G ( n + 4 , k + 4) = ( k + 4) · G ( n + 3 , k + 4) + G ( n + 3 , k + 3) + − ( k + 3) · G ( n + 2 , k + 4) − G ( n + 2 , k + 3) . orentin Barloy and Lorenzo Clemente 23:31 ▶ Example 35. We show a CR example coming from a two-register deterministic automaton.There are three control locations p, q, r , which are all accepting and p is initial. When goingfrom p to q the automaton stores the input in its first register x . When going from q to r ,the automaton checks that the input is different from what is stored in x and stores it in x . Then the automaton goes from r to r itself by reading an input y different from bothregisters, x ′ = x and x ′ = y . In this way the automaton accepts all words s.t. any threeconsecutive data values are pairwise distinct. We have the counting equations: G p ( n + 1 , k + 1) = 0 ,G q ( n + 1 , k + 1) = G p ( n, k ) + ( k + 1) · G q ( n, k + 1) ,G r ( n + 1 , k + 1) = G q ( n, k ) + k · G q ( n, k + 1) + G r ( n, k ) + ( k − · G r ( n, k + 1) ,G ( n, k ) = S ( n, k ) − G p ( n, k ) − G q ( n, k ) − G r ( n, k ) . We find the following CR : G ( n + 4 , k + 3) = (2 k + 4) · G ( n + 3 , k + 3) + 2 · G ( n + 3 , k + 2) + − ( k + 4 k + 3) · G ( n + 2 , k + 3) + − (2 k + 3) · G ( n + 2 , k + 2) − G ( n + 2 , k + 1) . (10)In the last example we consider an automaton which is almost universal. ▶ Example 36. Consider the following register automaton A with one register x with unaryfinite alphabet | Σ | = 1. There are four control locations p, q, r, s of which p is initial and s isfinal. The automaton accepts all words of length ≥ p x = ⊥∧ x ′ = ⊥ −−−−−−−→ p , p x = ⊥∧ x ′ = y −−−−−−−→ q , p x = ⊥∧ x ′ = y −−−−−−−→ r , q x = y ∧ x ′ = x −−−−−−−→ s , r x ̸ = y ∧ x ′ = x −−−−−−−→ s . Equations: G p ( n + 1 , k + 1) = G p ( n, k ) + ( k + 1) · G p ( n, k + 1) ,G q ( n + 1 , k + 1) = G p ( n, k ) + ( k + 1) · G p ( n, k + 1) = G p ( n + 1 , k + 1) ,G r ( n + 1 , k + 1) = G p ( n, k ) + ( k + 1) · G p ( n, k + 1) = G p ( n + 1 , k + 1) ,G s ( n + 1 , k + 1) = G q ( n, k + 1) + G r ( n, k ) + k · G r ( n, k + 1) == ( k + 2) G p ( n, k + 1) + G p ( n, k ) ,G ( n, k ) = S ( n, k ) − G s ( n, k ) . We find the following CR : G ( n + 3 , k + 3) = G ( n + 2 , k + 2) + ( k + 3) · G ( n + 2 , k + 3) . (11)Thanks to the relationship above, we manually check that G (2 , 0) = G (2 , 1) = G (2 , 2) = 0,we can conclude that G ( n, k ) = 0 for every n, k ≥ 2. Indeed, the automaton accepts allwords of length ≥ E Hermite forms In this section we present an elimination algorithm based on the computation of the Hermitenormal form for matrices of skew polynomials. An easy but important observation in orderto get good bounds is that the first Weyl algebra W = Q [ k ][ ∂ ; σ ] from Sec. 5 is in factisomorphic to the (commutative) ring of bivariate polynomials Q [ k, ∂ ]. In places where we C V I T 2 0 1 6 need to obtain good complexity bounds, we will use W ′ instead of W and W ′ instead of W , where W ′ = Q [ k, ∂ ] and W ′ = W ′ [ ∂ ; σ ] = Q [ k, ∂ ][ ∂ ; σ ] . (12)A skew polynomial P ∈ W (or W ′ ) can be written in a unique way as a finite sum P i,j,k a i,j,k z i ∂ j ∂ k with a i,j,k ∈ Q . We define deg z P as the largest i s.t. a i,j,k ̸ = 0 forsome j, k ; deg ∂ and deg ∂ are defined similarly. The combined degree deg ∂ + ∂ P is thelargest j + k s.t. a i,j,k ̸ = 0 for some i , and similarly for deg z + ∂ . The height of P is | P | ∞ = max i,j,k | a i,j,k | ∞ . Rational skew fields. The improved elimination algorithm does not work in the skewpolynomial ring, but in its rational field extension. To this end we need to introduce skewfields. A skew field F is a field where multiplication is not necessarily commutative [17].(Skew fields are sometimes called division rings since they are noncommutative rings wheremultiplicative inverses exist.) In the same way as the ring of polynomials F [ x ] over a field F can be extended to a rational polynomial field F ( x ), a skew polynomial ring F [ ∂ ; σ ] over askew field F can be extended to a rational skew field F ( ∂ ; σ ). Its elements are formal fractions PQ = Q − P quotiented by Q − P ∼ S − R if there exist A, B ∈ F [ ∂ ; σ ] s.t. A · P = B · R and A · Q = B · S . Given P, Q, R, S ∈ F [ ∂ ; σ ] s.t. S · Q = Q · S and S · P = P · S for some P , S , Q ∈ F [ ∂ ; σ ], we can define the operations: PQ + RS = S · P + Q · RS · Q , PQ · RS = P RS Q , (cid:18) PQ (cid:19) − = QP . It was shown by O. Ore that this yields a well-defined skew field structure to F ( ∂ ; σ ) andthat unique reduced representations PQ exist [42] . In our context, we define the skew fields F ( W ′ ) = Q ( k, ∂ ) and F ( W ′ ) = F ( W ′ )( ∂ ; σ ) = Q ( k, ∂ )( ∂ ; σ ) (13)associated to the corresponding iterated Weyl algebras W ′ and W ′ . Note that F ( W ′ ) is infact just a rational (commutative) field of bivariate polynomials. For R = PQ ∈ F ( W ′ ) or F ( W ′ ) written in reduced form, we define | R | ∞ = max {| P | ∞ , | Q | ∞ } . Non-commutative linear algebra. Let F be a skew field. We denote by F n × m the ringof matrices A with n rows and m columns with entries in F , equipped with the usualmatrix operations “+” and “ · ”. The height of A ∈ F n × m is | A | ∞ = max i,j | A i,j | ∞ . The left F -module spanned by the rows of A = ( u , . . . , u n ) is the set of vectors in F n of the form a · u + · · · + a n · v n for some a , . . . , a n ∈ F . The rank of A is the dimension of the left F -module spanned by its rows. In other words, the rank of A is the largest integer r s.t. wecan extract r rows u i , . . . , u i r that are free: for every a , . . . , a r ∈ F , a · u i + · · · + a k · u i k = 0implies a = · · · = a k = 0. A square matrix A ∈ F n × n is non-singular if there exists a matrix B such that A · B = I , where I ∈ F n × n is the identity matrix.The following lemma implies that matrices arising from linrec systems have full rank.We used this lemma to justify why the elimination algorithm in the proof of Theorem 18successfully produces a non-zero CR . Actually, Ore considered formal quotients of the form P Q − , but we found it more convenient to workin the symmetric definition. orentin Barloy and Lorenzo Clemente 23:33 ▶ Lemma 37. Let A ∈ W = Q [ n, k ][ ∂ ; σ ][ ∂ ; σ ] n × n be a matrix of skew polynomialss.t. the combined degree deg ∂ + ∂ A i,i of the diagonal entries is strictly larger than thecombined degree deg ∂ + ∂ A j,i of every other entry j ̸ = i in the same column i . Then A hasrank n . Indeed, the combined degree of diagonal entries ∂ ∂ in a system of linrec equations (2) is 2,while every other entry has the form p ( n, k ), p ( n, k ) · ∂ , or p ( n, k ) · ∂ with p ( n, k ) ∈ Q [ n, k ]and thus has combined degree 1. Proof. We denote by A i the i th row of A . By contradiction, assume A does not have fullrank. There exist rows A i , . . . , A i k and nonzero coefficients P , · · · , P k ∈ W such that: P i · A i + · · · + P i k · A i k = 0 . Let j = i . Since deg ∂ + ∂ A i ,i > deg ∂ + ∂ A i r ,i for r ≥ 2, there is an index j suchthat deg ∂ + ∂ P j > deg ∂ + ∂ P j . By repeating this process, we have a sequence of indices j , . . . , j k +1 such thatdeg ∂ + ∂ P j k +1 > deg ∂ + ∂ P j k > · · · > deg ∂ + ∂ P j . This is a contradiction because there are only k different P i ’s. ◀ Hermite normal forms. Let A ∈ F [ ∂ ; σ ] n × n be a skew polynomial square matrix. Letdeg ∂ A = max i,j deg ∂ A i,j . We say that A is unimodular if it is invertible in F ( ∂ ; σ ) n × n andmoreover the inverse matrix A − has coefficients already in the skew polynomial ring F [ ∂ ; σ ].We say that A of rank r is in Hermite form if a) exactly its first r rows are non-zero, andthe first (leading) non-zero entry in each row satisfies the following conditions: b.1) it is amonic skew polynomial (its leading coefficient is 1 ∈ F ), b.2) all entries below it are zero, andb.3) all entries above it have strictly lower degree. (In particular, a matrix in Hermite formis upper triangular.) The Hermite normal form ( HNF ) of a skew polynomial matrix A offull rank n is the (unique) matrix H ∈ F [ ∂ ; σ ] n × n in Hermite form which can be obtained byapplying a (also unique) unimodular transformation U ∈ F [ ∂ ; σ ] n × n as H = U · A . Existenceof U (and thus of H ) has been shown in [26, Theorem 2.4], and uniqueness in [26, Theorem2.5]. The Hermite form H yields directly a cancelling relationship ( CR -2) for the n -th linrecvariable f n , as we show in the following example. (By reordering the equations, we can getan analogous relationship for f .) ▶ Example 38. Consider the following system of linrec equations: (cid:26) ( ∂ − ∂ · G r − ∂ · G s = 0 , − ( k∂ + 1) · G r + ∂ ∂ · G s = 0 . In matrix form we have (cid:18) ( ∂ − ∂ − ∂ − k∂ − ∂ ∂ (cid:19)| {z } A ∈ W × · (cid:18) G r G s (cid:19)| {z } x = 0 . (14)The matrix A above is not in Hermite form; one reason is that ( ∂ − ∂ is not monic asa polynomial in W (because its leading coefficient is ∂ − ̸ = 1); another reason is that C V I T 2 0 1 6 the entry − k∂ − H = U · A of A is H = k∂ − − ∂ ) ∂ ∂ − ∂ − ∂ − ( k +1) ∂ ! . This allows us to immediately obtain a cancelling relation for the variable G s correspondingto the last row. Going back to our initial matrix equation A · x = 0, we have U Ax = Hx = 0where x = ( G r G s ) T , yielding (cid:18) ∂ − ∂ − ∂ − ( k + 1) ∂ (cid:19) · G s = 0 . By clearing out the denominator (an ordinary bivariate polynomial from Q [ k, ∂ ]), we obtain(( ∂ − ∂ − ( k + 1)) · ∂ − ∂ ) · G s = ( ∂ ∂ − ∂ ∂ − ( k + 1) ∂ − ∂ ) · G s = 0 (15)yielding the sought cancelling relation for G s not mentioning any other sequence: G s ( k + 2 , n + 2) = G s ( n + 1 , k + 2) + ( k + 1) · G s ( n, k + 2) + G s ( n, k + 1) . In order to bound the complexity of the Hermite form H in our case of interest, wewill use results from [26], instantiated in the special case of Ore shift polynomials. Theseresults generalise to skew polynomials analogous complexity bounds for the HNF over integermatrices Z n × n [31] and integer univariate polynomial matrices Z [ z ] n × n [54, 38, 34, 40]. ▶ Theorem 39. Let A ∈ F [ ∂ ; σ ] n × n of full rank n with HNF H = U · A ∈ F [ ∂ ; σ ] n × n . P i deg ∂ H i,i ≤ n · deg ∂ A [26, Theorem 4.7, point (a)]. In particular, deg ∂ H ≤ n · deg ∂ A. (16) For A ∈ F [ z ][ ∂ ; σ ] n × n and H ∈ F ( z )[ ∂ ; σ ] n × n [26, Theorem 5.6, point (a)], deg z H = O ( n · deg z A · deg ∂ A ) (17) For A ∈ Z [ z ][ ∂ ; σ ] n × n and H ∈ Q ( z )[ ∂ ; σ ] n × n we have [26, Corollary 5.9], log | H | ∞ = ˜ O ( n · deg z A · (deg ∂ A + log | A | ∞ )) . (18)We lift the results of Theorem 39 from univariate polynomial rings F [ z ] , Z [ z ] to the bivariatepolynomial rings F [ k, ∂ ] , Z [ k, ∂ ] that we need in our complexity analysis by noticing thatthe latter behave like the former if we replace deg z with deg k + ∂ . The formal result that weneed is the following. ▶ Lemma 40. Let A be an invertible matrix in Z [ k, ∂ ] n × n . Then deg k + ∂ A − ≤ n · deg k + ∂ A and log | A − | ∞ ≤ n (1 + log | A | ∞ + log deg k + ∂ A ) . Proof. By Cramer’s formula, every coefficient of A − is the quotient of the determinantof a submatrix of A and the determinant of A . By Lipschitz’ formula we have det( A ) = P σ sign( σ ) A ,σ · · · A n,σ , where sign( σ ) ∈ {− , } and σ ranges over all permutations of { , . . . , n } . Then we can bound the size of the determinant ◀ The two bounds in Lemma 41 below are obtained from the last two bounds in Theorem 39by inspecting the proofs in [26] and using the the bounds on inversion of matrices of bivariatepolynomials from Lemma 40. orentin Barloy and Lorenzo Clemente 23:35 ▶ Lemma 41. 1. For A ∈ F [ k, ∂ ][ ∂ ; σ ] n × n and H ∈ F ( k, ∂ )[ ∂ ; σ ] n × n , deg k + ∂ H = O ( n · deg k + ∂ A · deg ∂ A ) (19) For A ∈ Z [ k, ∂ ][ ∂ ; σ ] n × n and H ∈ Q ( k, ∂ )[ ∂ ; σ ] n × n we have log | H | ∞ = ˜ O ( n · deg k + ∂ A · (deg ∂ A + log | A | ∞ )) . (20)Putting everything together, the bounds from point 1. of Theorem 39 and the two boundsfrom Lemma 41 yield the following corollary. ▶ Corollary 42. Let A ∈ ( W ′ ) m × m = Q [ k, ∂ ][ ∂ ; σ ] m × m of full rank m with HNF H = U · A ∈ Q ( k, ∂ )[ ∂ ; σ ] m × m . We have: deg ∂ H ≤ n · deg ∂ A, deg k + ∂ H = O ( n · deg k + ∂ A · deg ∂ A ) , log | H | ∞ = ˜ O ( m · deg ∂ A · (deg k + ∂ A + log | A | ∞ )) . Thus, the degrees of the HNF are polynomially bounded, and the heights are exponentiallybounded. The bounds from Corollary 42 yield the complexity upper-bound on the zeronessproblem that we are after. ▶ Lemma 20. A linrec sequence f ∈ Q N of order ≤ m , degree ≤ d , and height ≤ h admits acancelling relation ( CR -2) with the orders i ∗ , j ∗ and the degree of p i ∗ ,j ∗ polynomially bounded,and with height | p i ∗ ,j ∗ | ∞ exponentially bounded. Similarly, its one-dimensional sections f (0 , k ) , . . . , f ( i ∗ , k ) ∈ Q N also admit cancelling relations ( CR -1) of polynomially boundedorders and degree, and exponentially bounded height. Proof. Let f be a linrec sequence of order ≤ m , degree ≤ d , and height ≤ h . Sincedeg ∂ = deg ∂ = 1 in A from linrec, thanks to Corollary 42 the Hermite form H hasdeg ∂ H ≤ m , deg k + ∂ H is polynomially bounded (and thus deg k H and deg ∂ H as well),and | H | ∞ is exponentially bounded. Thanks to the fact that the Hermite form is triangular,we can immediately extract from H · x = 0 the existence of a cancelling relation ( CR -2) for f where i ∗ , j ∗ are polynomially bounded, the degree of p i ∗ ,j ∗ is polynomially bounded, andthe height of | p i ∗ ,j ∗ | ∞ is exponentially bounded.Moreover, consider the one-dimensional sections f (0 , k ) , . . . , f ( i ∗ , k ) ∈ Q N . By Lemma 4,they are linrec of order ≤ m · ( i ∗ + 3), degree ≤ d , and height ≤ h · ( i ∗ ) d , and thus there areassociated matrices A , . . . , A i ∗ of the appropriate dimensions ≤ ( m · ( i ∗ + 3)) × ( m · ( i ∗ + 3))with coefficients in Q [ k ][ ∂ ; σ ]. The bounds from Corollary 42 can be applied to this case aswell and we obtain for each 0 ≤ i ≤ i ∗ a cancelling relation ( CR -1) R i with leading polynomialcoefficient q i,ℓ ∗ i ( k ) where ℓ ∗ i is polynomially bounded, its degree in k is polynomially bounded,and the height (cid:12)(cid:12) q i,ℓ ∗ i (cid:12)(cid:12) ∞ is exponentially bounded. ◀ E.1 Extended example We conclude this section with an extended example showing how to compute the Hermiteform of a skew polynomial matrix, thus illustrating the techniques of Giesbrecht and Kim[26] leading to Theorem 39. We apply the algorithm on our running example. For n ∈ N ,denote with F [ ∂ ; σ ] n the semiring of skew polynomials of degree at most n with coefficients inthe field F . Let ϕ n : F [ ∂ ; σ ] n → F n +1 be the bijection that associates to a skew polynomial ofdegree ≤ n the vector of its coefficients, starting from the one of highest degree. For instance, ϕ (5 · ∂ + 4 · ∂ + 7) = (0 , , , , , . C V I T 2 0 1 6 The m -Sylvester matrix of a skew polynomial P ∈ F [ ∂ ; σ ] n − m of degree ≤ n − m is thematrix S mn ( P ) ∈ F ( m +1) × ( n +1) defined by S mn ( P ) = ϕ n ( ∂ m P ) ϕ n ( ∂ m − P )... ϕ n ( ∂ P ) . (21)For example, for P = 5 · ∂ + 4 · ∂ + 7 we have S ( P ) = ϕ ( ∂ P ) ϕ ( ∂ P ) ϕ ( ∂ P ) = . The next lemma shows that sufficiently large Sylvester matrices can be used to expressproduct of polynomials in terms of products of matrices. This crucial idea allows oneto transform problems on skew polynomials in F [ ∂, σ ] to linear algebra problems in theunderlying field (or just semiring) F . ▶ Lemma 43 (c.f. [6, Sec. 1, eq. (1)]) . Let P, Q ∈ F [ ∂ ; σ ] and n, m ∈ N s.t. deg P ≤ m and deg Q ≤ n − deg P . Then, ϕ n ( Q · P ) = ϕ m ( Q ) · S mn ( P ) . We extend both ϕ n and S mn to skew polynomial matrices in F [ ∂ ; σ ] k × kn by point-wise applica-tion and then merging all the obtained matrices into a single one. ▶ Example 44. For instance, ϕ ( A ) with A ∈ Q [ k ][ ∂ ; σ ][ ∂ ; σ ] × from (14) equals ϕ ( A ) = ϕ (cid:18) ( ∂ − ∂ − ∂ − k∂ − ∂ ∂ (cid:19) = (cid:18) ϕ (( ∂ − ∂ ) ϕ ( − ∂ ) ϕ ( − k∂ − ϕ ( ∂ ∂ ) (cid:19) = (cid:18) ∂ − − − k − ∂ (cid:19) ∈ Q [ k ][ ∂ ; σ ] × and thus S ( A ) ∈ Q [ k ][ ∂ ; σ ] × is S ( A ) = S (cid:18) ( ∂ − ∂ − ∂ − k∂ − ∂ ∂ (cid:19) == (cid:18) S (( ∂ − ∂ ) S ( − ∂ ) S ( − k∂ − S ( ∂ ∂ ) (cid:19) == (cid:18) ϕ ( ∂ ( ∂ − ∂ ) ϕ (( ∂ − ∂ ) (cid:19) (cid:18) ϕ ( ∂ ( − ∂ )) ϕ ( − ∂ ) (cid:19)(cid:18) ϕ ( ∂ ( − k∂ − ϕ ( − k∂ − (cid:19) (cid:18) ϕ ( ∂ ∂ ∂ ) ϕ ( ∂ ∂ ) (cid:19) == (cid:18) ( ∂ − ∂ − (cid:19) (cid:18) ( − − (cid:19)(cid:18) ( − ( k + 1) − − k − (cid:19) (cid:18) ( ∂ ∂ (cid:19) == ∂ − − ∂ − − − ( k + 1) − ∂ − k − ∂ . orentin Barloy and Lorenzo Clemente 23:37 By definition of the Hermite form, we have that H = U · A . By (16) every degree of skewpolynomials appearing therein is bounded by n · deg A . Hence setting ρ = n · deg A , we havethe following matrix equation with coefficients in F : ϕ ρ + d ( H ) = ϕ ρ ( U ) · S ρρ + d ( A ) . The diagonal degree vector of the Hermite form for A is the unique vector d s.t. d i =deg H i,i . The algorithm will guess such a vector, and it can detect whether the guess wascorrect or not. If it is the right one, then H and U can be computed. ▶ Example 45. The correct diagonal degree vector for our running example is (0 , H = U · A of the 2 × A from our running example has theform H = (cid:18) H H H (cid:19) , U = (cid:18) U U U U (cid:19) ∈ Q [ k ][ ∂ ; σ ][ ∂ ; σ ] × where H , H ∈ Q [ k ][ ∂ ; σ ][ ∂ ; σ ] are monic skew polynomials of degree respectively 0and 2 and H , U , U , U , U ∈ Q [ k ][ ∂ ; σ ][ ∂ ; σ ] are skew polynomials of degree 1. Itfollows that ϕ ( H ) = (cid:18) ϕ ( H ) ϕ ( H )0 ϕ ( H ) (cid:19) == (cid:18) ϕ (1) ϕ ( a ∂ + a )0 ϕ ( ∂ + a ∂ + a ) (cid:19) == (cid:18) a a a a (cid:19) ∈ Q [ k ][ ∂ ; σ ] × . Similarly, ϕ ( U ) = (cid:18) ϕ ( U ) ϕ ( U ) ϕ ( U ) ϕ ( U ) (cid:19) = (cid:18) ϕ ( u ∂ + u ) ϕ ( u ∂ + u ) ϕ ( u ∂ + u ) ϕ ( u ∂ + u ) (cid:19) == (cid:18) u u u u u u u u (cid:19) ∈ Q [ k ][ ∂ ; σ ] × . By putting the pieces together, we obtain the following matrix equation with entries in Q [ k ][ ∂ ; σ ] (cid:18) a a a a (cid:19)| {z } ϕ ( H ) = (cid:18) u u u u u u u u (cid:19)| {z } ϕ ( U ) · ∂ − − ∂ − − − ( k + 1) − ∂ − k − ∂ | {z } S ( A ) . It is shown in [26, Theorem 5.2] that if we guessed the diagonal degree vector right,then we can remove columns from ϕ ρ + d ( H ) corresponding to under-determined entries, andcorresponding columns in S ρρ + d ( A ), in order to obtain two matrices ˜ A and ˜ H such that: C V I T 2 0 1 6 ˜ H is only made of 0’s and 1’s.˜ A is a square matrix.The matrix equation T ˜ A = ˜ H of unknown T (of the same dimensions as ϕ ρ ( U )) has aunique solution. In particular, ˜ A has full rank and hence is invertible. ▶ Example 46. The reduced system ˜ H = ϕ ( U ) · ˜ A in our running example is obtained byremoving columns 5 , ϕ ( H ) and correspondingly from S ( A ): (cid:18) (cid:19)| {z } ˜ H = (cid:18) u u u u u u u u (cid:19)| {z } ϕ ( U ) · ∂ − − ∂ − − ( k + 1) − ∂ − k − | {z } ˜ A . Now the obtained ˜ A is invertible. Hence we can determine U thanks to the equation ϕ ( U ) = ˜ H ˜ A − . ▶ Example 47. In the example, we obtain T = − k∂ − − k +1 ∂ − ∂ − ( k +1) ∂ + ∂ − ∂ − ( k +1) 1 ∂ − ∂ − ( k +1) ∂ ! , yielding the Hermite form: H = T · A = − k∂ − − k +1 ∂ − ∂ − ( k +1) ∂ + ∂ − ∂ − ( k +1) 1 ∂ − ∂ − ( k +1) ∂ ! · (cid:18) ( ∂ − ∂ − ∂ − k∂ − ∂ ∂ (cid:19) = k∂ − − ∂ ) ∂ ∂ − ∂ − ∂ − ( k +1) ∂ ! ..