Theorem 2. Conjugacy of rational relations is decidable.
July 13, 2023
A rational relation is conjugate if every pair of words in the relation are conjugates, i.e., cyclic shifts of each other. We show that checking whether a rational relation is conjugate is decidable.
We assume that the rational relation is given as a rational expression over pairs of words. Every rational expression is effectively equivalent to a sum of sumfree expressions, possibly with an exponential size blow-up. The general problem reduces to determining the conjugacy of sumfree rational expressions. To solve this specific case, we generalise the classical Lyndon-Schützenberger theorem from word combinatorics that equates conjugacy of a pair of words \((u,v)\) and the existence of a word \(z\) (called a witness) such that \(uz=zv\) (or \(zu=vz\)). We give two generalisations of this result. We say that a set of conjugate pairs has a common witness if there is a word that is a witness for every pair in the set. The generalisations are as follows:
If \(G\) is an arbitrary set of conjugate pairs, then \(G^*\) is conjugate if and only if there is a common witness for \(G\). Moreover, a word is a common witness for \(G^*\) if and only if it is a common witness for \(G\).
If \(G_1^*, \ldots, G_k^*\), \(k > 0\) are arbitrary sets of conjugate pairs and \((\alpha_0,\beta_0), \ldots, (\alpha_k,\beta_k)\) are arbitrary pairs of words, then the set of words \[G = (\alpha_0,\beta_0) G_1^* (\alpha_1,\beta_1) \cdots (\alpha_{k-1},\beta_{k-1})G_k^*(\alpha_k,\beta_k)\] is conjugate if, and only if,
either it has a common witness,
or there exists words \(w \sim \alpha_0\ldots \alpha_k\) and \(\rho\) such that each pair generated by \(M\) is conjugate to a word in \(w\rho^*\).
Moreover, the common witnesses of \(G\) are computable in polynomial time from the common witnesses of \(G_1^*, \ldots, G_k^*\).
Further, the set of common witnesses, if it exists, is computable inductively. Using the above results, we give a polynomial-time algorithm for checking the conjugacy of a sumfree expression and an exponential-time procedure for the general problem.
Rational relations ,Finite state transducers ,Conjugacy of words ,Combinatorics of words
Conjugacy of two elements \(u\) and \(v\) in a group can be defined as any of the following equivalent cases:
\(uz = zv\) for some \(z\),
\(u = xy\) and \(v = yx\) for some \(x,y\).
The conjugacy problem asks if a given pair of elements in a finitely presented group (typically infinite) is conjugate. It along with the word and isomorphism problems constitute the classical triad of decision problems on groups identified by Dehn in 1912 [1]. Dehn’s prescient choice turned out to be instrumental not only in mathematics, but also to the theory of semigroups/monoids and automata in computer science. It turns out that the above conditions are equivalent for free monoids (i.e., when \(u,v,z,x,y\) are taken to be words over some finite alphabet). This is the well-known second theorem of Lyndon-Schützenberger. But unlike in the case of groups where condition (1) is taken to be the definition of conjugacy, in the case of monoids condition (2) is taken as the definition of conjugacy. Hence the statement reads the following way.
Theorem 1 (Proposition 1.3.4 of [2]). A pair of nonempty words \((u,v)\) is conjugate if and only if there exists a word \(z\) such that \(uz=zv\). Moreover, \(z \in (xy)^*x\) where \(x\) and \(y\) are such that \(u = xy\) and \(v = yx\).
Conjugacy problem is solvable in polynomial time over free monoids and free groups. We consider a generalisation of the problem to a finitely-presented possibly infinite set of pairs. Let \(A\) be a finite alphabet. A relation \(R \subseteq A^* \times A^*\) over the free monoid \(A^*\) is conjugate if each pair \((u,v)\in R\) is conjugate. Consider the following decision version:
Of particular interest is when \(R\) is automata-definable because of motivations detailed later. First we recall the class of rational relations. The family of rational subsets of a monoid \(M\) is the smallest class containing \(\emptyset\), all singleton subsets of \(M\) and closed under union, product and Kleene closure. A natural way to present a rational subsets of \(M\) is as a rational expression: \(\emptyset, m\in M\) are rational expressions, and if \(E_1, E_2\) are rational expressions then \(E_1\cdot E_2\), \(E_1 + E_2\), and \(E_1^*\) are also rational expressions. A rational relation over \(A^*\) is a rational subset of the product monoid \(A^*\times A^*\). Coincidentally, rational relations are precisely those that are defined by nondeterministic finite state transducers. Checking conjugacy of rational relation is equivalent to checking if the input output pairs of a relation defined by a nondeterministic transducer are conjugates. A rational expression over \(A^\ast \times A^\ast\) is conjugate if the rational relation it represents is conjugate.
Example 1. The rational expression \(E_1= (\epsilon,a)(ab,ba)^*(a,\epsilon)\) denotes the relation \(\{((ab)^na,a(ba)^n) \mid n \geq 0\}\). The expression \(E_2=((a,aa) + (b,\epsilon))^*\) represents \(\{(u,v) \mid\) \(v\) is obtained from \(u\) by duplicating \(a\)’s and discarding \(b\)’s\(\}\). The expression \(E_1\) is conjugate, but \(E_2\) is not.
A strong justification for the above problem comes from the theory of word transducers. Checking a number of properties of word transducers, for instance sequentiality (can the given transducer be input-determinised?) or finite sequentiality (is the given transducer equivalent to a disjoint union of input-deterministic transducers?), bounded edit distance [3] (is the edit distance between the respective outputs of the given transducers bounded?) etc. amounts to checking conjugacy of the rational relations defined by the strongly connected components of the transducer and certain specific properties of the underlying acyclic graph of strongly connected components. Loosely speaking, conjugacy of the relations defined by the strongly connected components imply that the loops of the transducer are pumpable. Likewise, given two functional transducers with identical domain, checking if the output pairs of these transducers are conjugates on all input, reduces to checking conjugacy of the rational relation of output pairs defined by their product automata. A converse result also holds: checking conjugacy of rational relation is equivalent to checking conjugacy of output pairs of two sequential transducer with identical domain by virtue of Nivat’s theorem [3], [4].
Our main result is summarised by the following theorem.
Theorem 2. Conjugacy of rational relations is decidable.
The union operation of rational relations preserves conjugacy, i.e., if \(R_1\) and \(R_2\) are conjugate, then \(R_1 \cup R_2\) is also conjugate. However, conjugacy is not preserved under the product and Kleene closure.
Example 2. Consider \(E_1 = (\mathit{ab},\mathit{ba})\), \(E_2 = (\mathit{ca},\mathit{ac})\) and \(E_3 = (\mathit{ac},\mathit{ca})\), all of which are conjugates. \(E_1 \cdot E_3\) is conjugate but \(E_1 \cdot E_2\) is not. Also \((E_1 + E_3)^\ast\) is conjugate, but \((E_1 + E_2)^\ast\) is not.
Assume that the rational relation is given by a rational expression. Every rational expression is effectively equivalent to a sum of sumfree expressions (called sumfree normal form (SNF)), by inductively rewriting the expression using the identities \((a+b)^*=(a^*b^*)^*\) and \((a+b)\cdot (c+d) = ac+ad+bc+bd\) (see 20). This fact is the rational-expression analogue of the factorisation forest theorem of Simon, a deep result from the theory of finite semigroups [5]. Rewriting a rational expression in SNF may result in an exponential blow-up, both in the number of summands and the size of each summand.
Example 3. For the expression \(E= (a + b)^{n}\) for some \(n >0\), it can be shown that any equivalent expression in SNF will have at least \(2^n\) summands. For \(E' = \$(E\#)^*\), any equivalent SNF expression will have at least one summand of exponential size, and the expression \(E\cdot E'\) in SNF will have exponentially many summands of exponential size.
For proving 2 we only need to decide the conjugacy of a rational relation given by a sumfree expression. The decidability of conjugacy of a sumfree expression hinges on the notion of a common witness of a relation, inherited from Lyndon-Schützenberger’s theorem. A witness of a conjugate pair \((u,v)\) is a word \(z\) such that either \(uz = zv\) (inner witness) or \(zu = vz\) (outer witness). A word \(z\) is a common inner (resp. outer) witness of a relation, if for every pair \((u,v)\) in the relation, \(z\) is an inner witness (resp. outer witness) of \((u,v)\). By 1, if a relation has a common inner witness or common outer witness then it is conjugate. However, the converse is easily shown to be false.
We show that a sumfree rational relation is conjugate if and only if either it has a common witness — either a common inner witness or a common outer witness, but not necessarily both — or there exist words \(u\) and \(v\) such that every pair generated by the relation is a cyclic shift of some word in \(uv^*\). This characterisation of conjugacy is a main contribution of our paper. It is in fact a generalisation of Lyndon-Schützenberger theorem characterising conjugacy of two words.
There are two interesting questions regarding common witnesses:
Is there a common witness for the relation \(R\)?
Given a word \(z\), is it a common witness of \(R\)?
Question II proves to be comparatively more tractable, as it can be reduced to verifying whether the rational relation \(R^\prime = \{(uz,zv) \mid (u,v) \in R\}\) (or, \(R^\prime = \{(zu,vz) \mid (u,v) \in R\}\)) consists of only identical pairs [6]. In fact, the decidability of the twinning property of a transducer is connected to Question II. It is further elaborated in 1.2.
Question I, on the other hand, is more difficult a priori as we do not have a bound on the size of a possible common witness. We provide a decision procedure for Question I. This is another main contribution of the article. Our characterisation of conjugacy via common witness, together with this procedure, yields an algorithm for deciding conjugacy.
In the rest of this section, we give an overview of determining the conjugacy of sumfree expressions. Subsequently, it is argued that decidability follows from two specific questions (1 and 2). Finally, we discuss related works.
A rational expression is sumfree if it does not use the union (i.e., \(+\)). The set of sumfree expressions is formally defined as a hierarchy. Fix a monoid \(\mathbf{M}=(M, \cdot, 1)\). Given a class \(\mathcal{C}\) of expressions over \(\mathbf{M}\), the Kleene closure of \(\mathcal{C}\), denoted as \(\mathcal{K}\mathcal{C}\), is the class of expressions \[\mathcal{K}\mathcal{C}= \mathcal{C}\cup \{ E^* \mid E \in \mathcal{C}\}.\] The monoid closure of \(\mathcal{C}\), denoted as \(\mathcal{M}\mathcal{C}\), is the class of expressions \[\mathcal{M}\mathcal{C}= \mathcal{C}\cup \{ E_1 \cdots E_k \mid E_i \in \mathcal{C}\text{ for each 1\leq i \leq k and k\in\mathbb{N}}\}.\]
Definition 1 (Sumfree Expression). The family \(\mathcal{F}\) of sumfree expressions is defined inductively. Let \(\mathcal{F}_0 = M \cup \{\emptyset\}\) and \(\mathcal{F}_{i+1} = \mathcal{M}\mathcal{K}\mathcal{F}_i \;\) for each \(i\geq 0\). We define \[\mathcal{F}= \bigcup_{i\geq 0} \mathcal{F}_i.\] The star height* of an expression \(E\) is the smallest \(k \in \mathbb{N}\) such that \(E\) belongs to \(\mathcal{F}_k\).*
Over the free monoid \(A^*\), the set of expressions \(\mathcal{F}_0\) is \(A^* \cup \{\emptyset\}\) and \(\mathcal{K}\mathcal{F}_0\) is the set of expressions \(\mathcal{F}_0 \cup \{w^* \mid w \in A^* \}\) (for convenience we assume that \(\emptyset\) is not used in any other expression other than \(\emptyset\) itself). It is not difficult to see that \(\mathcal{M}\mathcal{K}\mathcal{F}_0\) is the set of expressions \(\mathcal{K}\mathcal{F}_0 \cup \{u_1v_1^*u_2v_2^* \cdots u_{k}v_k^*u_{k+1} \mid u_i,v_i \in A^*, k\in \mathbb{N}\}\).
We now proceed to solve the conjugacy of sumfree expressions. We use pairs of lowercase Greek letters \((\alpha,\beta)\) with suitable modifications to denote pairs of words over \(A^* \times A^*\). Clearly \(\emptyset\) and \((\epsilon,\epsilon)\) are conjugates. For an expression of the form \((\alpha,\beta)\), it is straightforward to check conjugacy (see [isconjugate]). Thus, the conjugacy problem is decidable for the class of expressions \(\mathcal{F}_0\).
To show the decidability of the conjugacy problem for the whole family \(\mathcal{F}\), it suffices to show that if the problem is decidable for \(\mathcal{F}_i\), \(i\geq 0\), then it is also decidable for \(\mathcal{K}\mathcal{F}_i\) and \(\mathcal{F}_{i+1}=\mathcal{M}\mathcal{K}\mathcal{F}_i\). Then by induction on \(i\) the decidability extends to the whole family \(\mathcal{F}\).
Assume that conjugacy is decidable for \(\mathcal{F}_i\). Let \(E\) be an expression in \(\mathcal{F}_i\) and hence \(E^* \in \mathcal{K}\mathcal{F}_i\). Since \(L(E) \subseteq L(E^*)\),
If the expression \(E^*\) is conjugate, then \(E\) is conjugate.
Because conjugacy is decidable for \(\mathcal{F}_i\), we can check whether \(E\) is conjugate. Therefore, to show the decidability of conjugacy for \(\mathcal{K}\mathcal{F}_i\), it suffices to show the decidability of the following question.
Question 1 (Conjugacy of Kleene Closures). Given a conjugate sumfree expression \(E\), is \(E^*\) conjugate?
Next, assume that conjugacy is decidable for \(\mathcal{K}\mathcal{F}_i\). Let \(E = (\alpha_0,\beta_0) E_1^* (\alpha_1,\beta_1) \cdots E_k^*(\alpha_k,\beta_k)\) be an expression in \(\mathcal{M}\mathcal{K}\mathcal{F}_i\) where \(E_1^*,\ldots,E_k^*\) are from \(\mathcal{K}\mathcal{F}_i\). Analogous to the case of Kleene closures, \(E\) is conjugate only if \(E_1^*,\ldots,E_k^*\) are conjugate, as the next lemma shows.
Lemma 1. If the expression \(E=(\alpha_0,\beta_0) F^* (\alpha_1,\beta_1)\) is conjugate, then \(F^*\) is conjugate.
Proof. If \(F^*\) is an empty set, then it is conjugate. Otherwise, assume that \((u,v)\) is a nonempty pair that belongs to \(F^*\). Therefore, \((u^\ell,v^\ell)\) for each \(\ell \geq 0\) also belongs to \(F^*\). We can safely assume that \(|u| = |v|\), otherwise each iteration will increase the difference in length between \(u^\ell\) and \(v^\ell\), leading to nonconjugacy of \(E\).
Let \(k = |\alpha_0| + |\beta_0| + |\alpha_1| + |\beta_1|\). Consider the pair \((\alpha_0,\beta_0)(u^\ell,v^\ell)(\alpha_1,\beta_1)\) where \(\ell\) is some value much larger than \(k\), say \(2^k\). Since \(\ell\) is much larger than \(k\) and \((\alpha_0u^\ell \alpha_1,\beta_0v^\ell \beta_1)\) is conjugate, there exist large factors of \(u^\ell\) and \(v^\ell\) that match as shown in Figure 1. Since \(|u| = |v|\), we can infer that \(u\) is a factor of \(vv\), and \(v\) is a factor of \(uu\).
Since \(v\) is an infix of \(uu\), the following holds as shown in Figure 1. There exist words \(x,y,p,\) and \(q\) such that \(v = xy\) and \(u = px = yq\). Since \(|u| = |v|\), length of \(p\) and length of \(y\) are the same, that implies \(p=y\) (since \(u = px = yq)\). Therefore, \(u = yx\). Hence \(u\) and \(v\) are conjugate words. Since the pair \((u,v)\) was arbitrary, \(F^*\) is conjugate. ◻
We can generalize the above lemma to the general form of sumfree expressions.
Corollary 1. If the expression \(E = (\alpha_0,\beta_0) E_1^* (\alpha_1,\beta_1) \cdots (\alpha_{k-1},\beta_{k-1})E_k^*(\alpha_k,\beta_k)\), for \(k > 0\), is conjugate, then each of \(E_1^*, \ldots, E_k^*\) is conjugate.
Proof. If \(E\) is conjugate, then for each \(i \in \{1, \ldots, k\}\), \[(\alpha_0 \cdots \alpha_{i-1},\beta_0 \cdots \beta_{i-1}) E_i^* (\alpha_i \cdots \alpha_k,\beta_i \cdots \beta_k) \subseteq E\] is conjugate. Therefore, from 1 we get that each of \(E_1^*, \ldots, E_k^*\) is conjugate. ◻
Since the conjugacy of \(\mathcal{K}\mathcal{F}_i\) is decidable, we can check whether \(E_1^*, \ldots, E_k^*\) are conjugate expressions. Thus, to show the decidability of \(\mathcal{M}\mathcal{K}\mathcal{F}_i\), it suffices to show the decidability of the following question.
Question 2 (Conjugacy of Monoid Closures). Given conjugate sumfree expressions \(E_1^*, \ldots, E_k^*\), is the expression \(E = (\alpha_0,\beta_0) E_1^* (\alpha_1,\beta_1) \cdots (\alpha_{k-1},\beta_{k-1})E_k^*(\alpha_k,\beta_k)\) conjugate?
We show that 1 and 2 can be effectively answered. The idea is to use the notion of common witness that we mentioned in the beginning (further elaborated in 5).
We present two common witness theorems that address the above questions:
Let \(G\) be an arbitrary set of conjugate pairs. The set \(G^*\) is conjugate if and only if \(G\) has a common witness (6).
Let \(G_1^*, \ldots, G_k^*\), \(k > 0\), be arbitrary sets of conjugate pairs. The set \[G=(\alpha_0,\beta_0) G_1^* (\alpha_1,\beta_1) \cdots (\alpha_{k-1},\beta_{k-1})G_k^*(\alpha_k,\beta_k),\] called a sumfree set, is conjugate if and only if either it has a common witness, or each \(G_i^*\) has a common witness and there exist words \(u,v\) such that each pair of words in \(G\) is a cyclic shift of a word in \(uv^*\). (7).
Remark 1. Note that the assumption of conjugacy of the sets \(G, G_1^*, \ldots, G_k^*\) is not necessary. However, if they are not conjugate then the corresponding sets will neither have a common witness nor be conjugate, and the statements will be vacuously true (Since [Econj] and 1 also hold for arbitrary sets).
[Mj:2] is a generalisation of [Mj:1], and its proof relies on [Mj:1]. Both theorems are generalisations of the Lyndon-Schützenberger theorem.
In the case of rational sumfree expressions of pairs the above theorems are effective. In 7 we show that a common witness of a rational sumfree expression, if exists, is computable in polynomial time in the length of the expression. Finally, we give a decision procedure proving our main theorem (2) in 8.
A problem much related to 6 is the Conjugate Post Correspondence problem: given a finite set of pairs \(G\), does there exist of a pair \((u,v) \in G^*\) such that \(u\) and \(v\) are conjugate? This problem is shown to be undecidable by reduction to the word problem of a special type of semi-Thue systems [7]. In 3, we show that the universal version of this problem — checking if all the pairs in \(G^*\) are conjugate — is decidable.
Distance between two functional transducers are studied in [3]. For a metric \(d\) on words, the distance between two functional transducers \(\mathcal{T}_1,\mathcal{T}_2\) from \(A^*\) to \(B^*\) is given by \[d(\mathcal{T}_1,\mathcal{T}_2) = \begin{cases} \sup \left \{\, d(\mathcal{T}_1(w),\mathcal{T}_2(w)) \,\mid\, w \in \mathit{dom}(\mathcal{T}_1) \,\right \} & \text{ if \mathit{dom}(\mathcal{T}_1) = \mathit{dom}(\mathcal{T}_2)} \\ \infty & \text{ otherwise } \end{cases}\] Two transducers are said to be close if the distance between them is finite (\(<\) \(\infty\)). This allows to compare two transducers beyond their equivalence. One important class of metrics over words is edit distance, in particular Levenshtein edit distance. Levenshtein edit distance between two words is the minimum number of insertions, deletions, and substitutions required to convert one word to another. In the case of edit distances, closeness guarantees that the output of one transducer can be converted to the output of another by doing a bounded number of edits. It is shown that two functional transducers with identical domain are close with respect to Levenshtein edit distance if and only if all the loops in the cartesian product of the transducers are conjugates [3]. Our result gives an algorithm for checking the latter, and hence decidability of closeness of transducers follows.
Rational functions are functions defined by a finite state transducer. A rational function is sequential if it can be realised by a sequential transducer, i.e., those that are deterministic in the input. These were originally called subsequential in the literature by Schützenberger [8]. Sequentiality of rational functions is a decidable property due to a topological characterisation called the twinning property by Choffrut [9].
A transducer \(\mathcal{T}\) from \(A^*\) to \(B^*\) is an automaton over \(A^* \times B^*\). A transition of \(\mathcal{T}\) from state \(p\) to state \(q\) is of the form \((p,(u,v),q)\) where the word \(u \in A^*\) is called the input and the word \(v \in B^*\) is called the output. A path from state \(p\) to \(q\) on an input word \(w\) producing an output word \(x\) is represented as \(p \xrightarrow{w \mid x} q\). The transducer \(\mathcal{T}\) realises the rational relation \(\{ (w,x) \mid q_0 \xrightarrow{w \mid x} q_f\}\) over \(A^* \times B^*\) where \(q_0,q_f\) is an initial and a final state respectively.
The delay between two words \(u\) and \(v\), denoted by \(\mathit{delay}(u,v)\), is the pair \((u',v')\) such that \(u = \ell u'\) and \(v=\ell v'\) where \(\ell\) is the longest common prefix of \(u\) and \(v\).
A transducer with the initial state \(q_0\) is twinning if for all states \(p,q\) and for all words \(w_1,w_2 \in A^*\) and \(x,y,u,v \in B^*\), if \(q_0 \xrightarrow{w_1 \mid x} p \xrightarrow{w_2 \mid u} p\) and \(q_0 \xrightarrow{w_1 \mid y} q \xrightarrow{w_2 \mid v} q\), then \(\mathit{delay}(x,y) = \mathit{delay}(xu,yv)\). This is equivalent to either \(u = v = \epsilon\), or \(u \neq \epsilon \neq v\) and \(u\) and \(v\) are conjugates with \(\mathit{delay}(x,y)\) being a witness of \((u,v)\) (Proposition 6.2 of [10]).
Since the twinning property compares paths with the same input label, an equivalent definition for twinning can be defined on the square of the transducer [11], [12]. The square of a transducer \(\mathcal{T}\), denoted by \(\mathcal{T}^2\), is a cartesian product of \(\mathcal{T}\) by itself, equivalent to the transducer from \(A^*\) into \(B^* \times B^*\). The original definition of twinning has the following equivalent form. Let \(\mathcal{T}\) be a trim transducer. Two states \(p\) and \(q\) of \(\mathcal{T}\) are twinned if whenever \((u,v)\) is a nonempty output pair of a loop in \(\mathcal{T}^2\) rooted at a reachable state \((p,q)\), and for any path from initial state to \((p,q)\) in \(\mathcal{T}^2\) with output \((x,y)\), the following holds: \(\mathit{delay}(x,y) = \mathit{delay}(xu,yv)\), or equivalently, \(\mathit{delay}(x,y)\) is a witness of \((u,v)\). A transducer \(\mathcal{T}\) is twinning if, for any pair of states \(p\) and \(q\) that are reachable in \(\mathcal{T}^2\), the states \(p\) and \(q\) are twinned.
Thus checking twinning property reduces to computing a number of instances of the following problem: decide if a given rational relation \(R\) is conjugate with a given witness \(z\). This is straightforward to check: verify whether the rational relation \(R^\prime = \{(uz,zv) \mid (u,v) \in R\}\) (or, \(R^\prime = \{(zu,vz) \mid (u,v) \in R\}\)) consists of only identical pairs.
Generalisation of the twinning property called weak twinning is used to characterise multi-sequential (also called plurisubsequential or finitely sequential) functions [13] and relations [14]. This property also can be stated as conjugacy of suitably defined rational relations with respect to certain predetermined witnesses, and hence decidable albeit higher complexity.
The results in this paper holds the potential to define more general properties of transducers where the witnesses are not known a priori, for instance determinising approximately.
A generalisation of Lyndon-Schützenberger’s theorem to infinite sets, though with no comparison to ours, is considered in [15], [16], where solutions to the language equation \(XZ=ZY\), where \(X,Y,Z\) are sets of words, are given for special cases. The general solution is still open.
In 2, we revisit the standard tools from combinatorics of words required to state and prove our main theorems. We present the common witness theorems for addressing 1 and 2, along with the proofs of the easier directions in 3. However, the difficult directions require a detailed case analysis, and we complete the proof of common witness theorem for Kleene closure in 4. We prove the common witness and conjugacy theorem of monoid closures in 5 and 6 respectively. We outline the decision procedure for computing the witness in 7, and deciding conjugacy in 8. In 9, we state some future directions and conclude.
In this section, we introduce some preliminary notions and results that we need for the rest of the paper.
Let \(\mathbb{N}\) denote the set \(\{1, 2, \dots\}\). For \(i,j \in \mathbb{N} \cup \{0\}\), define \([i,j]\) as the set \(\{i, i+1, \dots, j\}\) if \(i \le j\), and as \(\{i, i-1, \dots, j\}\) otherwise. Given a word \(u\) and \(k \in \mathbb{N} \cup \{\omega\}\), we denote by \(u^k\) the concatenation of \(u\) with itself \(k\) times. A word \(u\) is called a factor (respectively prefix, suffix) of a word \(v\), if there exist words \(x,y \in A^*\) such that \(v = xuy\) (respectively \(v = uy\), \(v = xu\)). Let \(u[i \cdot\cdot j]\) denote the factor of \(u\) from index \(i\) to \(j\) where \(1 \leq i \leq j \leq |u|\). A cyclic shift of a word \(w=uv\) is a word \(vu\) for some words \(u,v \in A^*\). Let \(\mathit{lshift}_{i}(u)\), denote the word obtained after \(i\) left cyclic shifts of a word \(u\) for \(i \geq 0\). If \(u\) and \(v\) are words such that \(u\) is a prefix of \(v\), the left quotient of \(v\) by \(u\), denoted by \(u^{-1}v\), is the word \(x\) such that \(v = ux\). Similarly, the right quotient of \(v = xu\) by \(u\), denoted as \(vu^{-1}\), is the word \(x\).
Given a set of pairs of words \(G\), let \(\mathit{fst}(G)\) denote the projection of \(G\) onto the first component, i.e., \(\mathit{fst}(G) = \{u \mid (u,v) \in G\}\). Similarly, \(\mathit{snd}(G)\) denote the projection of \(G\) onto the second component, i.e., \(\mathit{snd}(G) = \{v \mid (u,v) \in G\}\).
Two words \(u\) and \(v\) are conjugate if they are cyclic shifts of each other, i.e., there exist words \(x,y\) such that \(u=xy\) and \(v=yx\). We use \(u \sim v\) to denote that \(u\) and \(v\) are conjugate words. Let \(X,Y \subseteq A^*\). We say \(X\) is a conjugate subset of \(Y\), denoted by \(X \mathrel{\mathpalette\subset@sim\relax}Y\), if for every word \(x \in X\) there exists a word \(y \in Y\) such that \(x \sim y\). Also, \(X\) and \(Y\) are conjugate, denoted by \(X \sim Y\), if \(X \mathrel{\mathpalette\subset@sim\relax}Y\) and \(Y \mathrel{\mathpalette\subset@sim\relax}X\).
A word is primitive if it cannot be expressed as a power of any strictly smaller word. For example, \(\mathit{aba}\) is primitive but \(\mathit{abab}\) is not.
A word \(\rho\) is called a primitive root of a word \(u\) if \(u = \rho^n\) for \(n \geq 1\) and \(\rho\) is a primitive word. Every word \(u\) has a unique primitive root, denoted by \(\rho_u\) ([2], Proposition 1.3.1).
The primitive root of a word can be computed in time linear in the length of the word.
Proof. For a word \(w\), find the first nontrivial occurrence of \(w\) in \(ww\), and let the offset be the prefix of \(ww\) before this occurrence. This can be done in linear time using the classical pattern matching algorithm by Knuth-Morris-Pratt [17]. If the length of the offset divides the length of \(w\), the offset is the primitive root of the word \(w\). ◻
Let \(u, v\) be nonempty words such that their primitive roots are distinct, i.e., \(\rho_u \neq \rho_v\). Let \(w = uv\). Then \(\rho_w \neq \rho_u\) and \(\rho_w \neq \rho_v\).
Proof. Consider the word \(w = uv\). We show that \(\rho_w \neq \rho_u\) and \(\rho_w \neq \rho_v\). Assume for contradiction that \(\rho_w = \rho_u\). Then \(uv \in (\rho_u)^*\). Since \(u \in (\rho_u)^*\), it follows that \(v \in (\rho_u)^*\) as well. Since primitive root of a word is unique, we get \(\rho_v = \rho_u\), which contradicts the assumption. By a similar argument, we get \(\rho_w \neq \rho_v\). Therefore, \(\rho_w \neq \rho_u\) and \(\rho_w \neq \rho_v\), which completes the proof. ◻
Let \(u,v\in A^*\) be words such that \(\rho_u \sim \rho_v\) and \(\rho_u \neq \rho_v\). Then any word \[\begin{align} w \in (u+v)^* \end{align}\] in which both \(u\) and \(v\) appear at least once, satisfies \(\rho_{w} \not \sim \rho_u\).
Proof. Suppose, for contradiction, that \(\rho_{w} \sim \rho_u\). Then, we have \(|\rho_{w}| = |\rho_u| = |\rho_{v}|\). Since \(w \in (\rho_{w})^*\) and both \(u\) and \(v\) are factors of \(w\) with lengths divisible by \(|\rho_{w}|\), it follows that \(u, v \in (\rho_{w})^*\). By uniqueness of primitive roots, this implies \(\rho_{u} = \rho_{w} = \rho_{v}\) contradicting \(\rho_{u} \neq \rho_{v}\). ◻
First Theorem of Lyndon-Schützenberger relates primitivity and commutativity.
Theorem 3 ([18], Lemma 3). Two words \(u,v \in A^*\) commute, i.e., \(uv =vu\), if and only if they have the same primitive root.
We lift the notion of primitive root to a pair and a set of pairs as follows.
Definition 2 (Primitive Root of a Set of Pairs). The primitive root of a pair \((u,v)\) is the pair \((\rho_u,\rho_v)\). The primitive root of a set of pairs \(P\), denoted by \(R(P)\), is the set of all primitive roots of each pair in \(P\), i.e., \(R(P) = \{ (\rho_{u},\rho_{v}) \mid (u,v) \in P\} \;.\)
For example, \(\{ (\mathit{ab},\mathit{ba}),(\mathit{bab},\mathit{abb})\}\) is the primitive root of the set \(\{(\mathit{abab},\mathit{baba}),(\mathit{bab},\mathit{abb})\}\).
Recall that a pair of words \((u,v)\) is conjugate if \(v\) can be obtained from \(u\) by cyclic shifts, i.e., there exist words \(x,y\) such that \(u=xy\) and \(v=yx\). For example, \((\mathit{ aaab}, \mathit{aaba})\) is a conjugate pair with \(x=a\) and \(y=aab\). It is not difficult to see that conjugacy relation is an equivalence relation on the set of words.
Deciding if a pair of words is conjugate can be done in linear time.
Proof. Two words \(u\) and \(v\) are conjugate if and only if either \(u=v\) or \(|u| = |v|\) and there is exactly one nontrivial occurence of \(v\) in \(uu\).
If \(u\) and \(v\) are distinct conjugates, then \(u=xy\) and \(v=yx\) for some nonempty words \(x,y\), implying \(uu = xyxy = xvy\), where \(v\) occurs nontrivially in \(uu\) exactly once. Conversely, if \(v\) occurs nontrivially in \(uu\) exactly once and \(|u| = |v|\), then there exist words \(x,y,p\) and \(q\) such that \(v = xy\) and \(u = px = yq\). Since \(|u| = |v|\), we get \(|p|=|y|\). This implies \(p=y\) since \(u = px = yq\). Therefore, \(u = yx\). Hence \(u\) and \(v\) are conjugate words.
Therefore, deciding whether a pair of words \((u,v)\) is conjugate can be done by checking if \(u =v\). If not, verify \(|u| = |v|\) and whether \(v\) occurs in \(uu\) nontrivially exactly once. This can be done in linear time using the Knuth-Morris-Pratt algorithm [17]. ◻
A conjugate pair of words and its primitive root are connected.
If a pair \((u,v)\) is conjugate, then its primitive root \((\rho_u,\rho_v)\) is also conjugate. Moreover, \((u,v) = (\rho_u, \rho_v)^n\) for some \(n \geq 1\).
Below is a fundamental result on words by Fine and Wilf.
Theorem 4 (Theorem 5 of [19]). Two nonempty words \(u\) and \(v\) have the same primitive root if and only if the words \(u^\omega\) and \(v^\omega\) have a common prefix of length \(|u| + |v| - \mathit{gcd}(|u|,|v|)\).
The above theorem can be adapted to yield conjugate primitive roots.
Theorem 5 ([19]). For any two words \(u,v \in A^+\), if \(u^\omega\) and \(v^\omega\) have a common factor of length at least \(|u| + |v| - \mathit{gcd}(|u|,|v|)\), then the primitive roots of \(u\) and \(v\) are conjugates.
The bound \(|u| + |v| - \mathit{gcd}(|u|,|v|)\) is known as the Fine and Wilf index of \(u\) and \(v\).
Definition 3 (Cut). A cut* of a conjugate pair \((u,v)\) is a pair of words \((x,y)\) such that \(u=xy\) and \(v=yx\). Alternatively, we say that \(u\) has a cut at position \(|x|\), or equivalently, \(v\) has a cut at position \(|y|\).*
If either \(x\) or \(y\) is the empty word, then we say the cut is empty. Otherwise the cut is nonempty.
For example, the pair \((\mathit{ aabb}, \mathit{bbaa})\) has a cut \((\mathit{aa},\mathit{bb})\). There can be several cuts for a conjugate pair. For instance, the pair \((\mathit{ abab}, \mathit{baba})\) has cuts \((\mathit{a},\mathit{bab})\) and \((\mathit{aba},\mathit{b})\). Empty cuts are possible only for pair of identical words.
Definition 4 (Matching of a Cut). Let \(u\) and \(v\) be conjugate words, and let \((x,y)\) be a cut of \((u,v)\) with \(|x|=k\). It corresponds to a matching between positions of \(u\) and \(v\), namely the circular permutation given by:
\[\begin{array}{rcl@{}rcl} |x|+1 &\mapsto & 1& 1 & \mapsto &|y|+1\\ |x|+2 &\mapsto &2 & 2 &\mapsto &|y|+2\\ &\vdots&&&\vdots&\\ |x|+|y|&\mapsto &|y| &|x|&\mapsto &|x|+|y| \end{array}\] This terminology is extended to factors of \(u\) an \(v\), namely given a cut \((x,y)\) of \(u\) and \(v\), and factors \(u'\) and \(v'\) of \(u\) and \(v\) respectively, we say \(u'\) and \(v'\) match if the positions of \(u'\) and \(v'\) match according to the above bijection.
If \(u\) and \(v\) are conjugates and one of them is primitive, by [primitiveconjugates], the other is also primitive. A pair \((u,v)\) is primitive if both \(u\) and \(v\) are primitive words. For such pairs, their cuts are also special.
Let \((u,v)\) be a conjugate primitive pair. If \((u,v)\) is distinct, then \((u,v)\) has a unique cut \((x,y)\). If \((u,v)\) is not distinct (i.e, \(u=v\)), the only two possible cuts of \((u,v)\) are \((u,\epsilon)\) and \((\epsilon,v)\).
Proof. By definition, if pair \((u,v)\) is conjugate, then there exist a cut \((x,y)\) such that \(u=xy\) and \(v=yx\). Assume \(u\) and \(v\) are distinct, and hence \(x\) and \(y\) have to be nonempty. It suffices to show that \(x\) and \(y\) are unique if \(u\) and \(v\) are primitive.
For the sake of contradiction, assume that \((x,y)\) is not unique, i.e., there exists a different cut \((x^\prime,y^\prime)\) for \((u,v)\), i.e., \(u = x^\prime y^\prime\), \(v= y^\prime x^\prime\) and \(x^\prime \neq x, y^\prime \neq y\). WLOG, assume that \(|x| > |x^\prime|\). Therefore there exists a nonempty word \(p\) such that \(x = x^\prime p\) and \(y^\prime=py\). Substituting for \(x\) in \(v\), we get \[v = yx = yx^\prime p\] and substituting for \(y^\prime\) in \(v\), we obtain \[v = y^\prime x^\prime = pyx^\prime \;.\] Therefore \(yx^\prime\) and \(p\) commutes. By 3, they have the same primitive root. Since \(p\) and \(yx'\) are nonempty words, \(v\) is a power of some smaller word. Hence \(v\) is not primitive and it is a contradiction.
In the case where \(u=v\) and \(u\) being primitive, two possible cuts are \((u,\epsilon)\) and \((\epsilon,v)\), i.e., the empty cuts. Imagine there is a nonempty cut \((x,y)\). Since \(u=v\), it follows that \(xy=yx\). Using 3, \(u\) and \(v\) are powers of a smaller word and hence not primitive. Therefore, when \(u\) is primitive and \(u=v\), the only possible cuts are the empty cuts. ◻
It is known that a primitive word cannot be equal to any of its nontrivial cyclic shifts, see for instance [20], [21]. We give a reformulation of this fact below. The statement of the lemma is given in a fashion that is suitable for some of the proofs in the rest of the paper.
Lemma 2 (Cut Lemma). Assume \((u,v)\) is a conjugate primitive pair.
If \((u,v)\) is a distinct* pair with the unique cut \((x,y)\), then the following equalities cannot hold for any nonempty words \(x^\prime, x^{\prime\prime}, y^\prime\), \(y^{\prime\prime}\) such that \(x=x^\primex^{\prime\prime}\) and \(y=y^\primey^{\prime\prime}\).*
\(xy = x^{\prime\prime}yx^\prime\)
\(xy = y^{\prime\prime}xy^\prime\)
\(yx = y^{\prime\prime}xy^\prime\)
\(yx = x^{\prime\prime}yx^\prime\)
\(xy = yx\)
In the special case when \(u=v\), there are two empty cuts \((u,\epsilon)\) and \((\epsilon,u)\). In both cases, the equality \(u = u^{\prime\prime}u^\prime\) cannot* hold for any nonempty words \(u^\prime, u^{\prime\prime}\) such that \(u=u^\primeu^{\prime\prime}\).*
Proof. Consider the case when \((u,v)\) is a distinct pair with the unique nonempty cut \((x,y)\). It suffices to show that if any of the equalities hold, there exists a different nonempty cut of the primitive pair \((u,v)\) contradicting [primitive].
In the case of [cuta], the other nonempty cut is \((x^{\prime\prime},yx^\prime)\) since \((xy,yx) = (x^{\prime\prime}yx^\prime,yx^\primex^{\prime\prime})\).
In the case of [cutb], the other nonempty cut is \((y^{\prime\prime}x,y^\prime)\) since \((xy,yx) = (y^{\prime\prime}xy^\prime,y^\primey^{\prime\prime}x)\).
When [cutc] is true, we obtain a different nonempty cut \((xy^\prime,y^{\prime\prime})\) because \((xy,yx) = (xy^\primey^{\prime\prime},y^{\prime\prime}xy^\prime)\).
If [cutd] holds, the other nonempty cut is \((x^\prime,x^{\prime\prime}y)\) since \((xy,yx) = (x^\primex^{\prime\prime}y,x^{\prime\prime}yx^\prime)\).
If [cute] holds, the other nonempty cut is \((y,x)\) since \((xy,yx) = (yx,xy)\) and \(x \neq y\) (since \(u \neq v\)).
Consider the special case when \(u=v\). If the equality \(u = u^{\prime\prime}u^\prime\) holds, then we obtain \(u = u^\primeu^{\prime\prime} = u^{\prime\prime}u^\prime\). Therefore, \(u^\prime\) and \(u^{\prime\prime}\) commutes. Since \(u^\prime\) and \(u^{\prime\prime}\) are nonempty words, \(u\) is a power of some smaller word using 3. Hence \(u\) is not primitive and it is a contradiction. ◻
A consequences of the above lemma is that the cut of the primitive root decides the cuts of its powers.
Let \((u,v)\) is a distinct conjugate primitive pair with the unique cut \((x,y)\). Any cut of the pair \((u^n,v^n)\) for \(n \geq 1\) is of the form \(((xy)^*x,(yx)^*y)\).
Proof. Let \((u^\prime,v^\prime)= (u^n,v^n)\) for some \(n \geq 1\). The lemma is trivially true for \(n = 1\) by the uniqueness of cut of primitive pairs by [primitive].
Consider the case when \(n \geq 2\). Substituting for \(u=xy\) and \(v=yx\) in \(u^\prime\) and \(v^\prime\), \[\begin{align} u^\prime &= \overbrace{u \cdots u}^{n \text{ times}} = xy \cdots xy\\ v^\prime &= v \cdots v = yx \cdots yx \end{align}\] We show that cut in \(u^\prime\) will always be at the end of some \(x\) and all other cases leads to one of Cases [cuta] to [cute] of .
I.e., there exists a cut \((p,q)\) for \((u^\prime, v^\prime)\) such that \(p \in (xy)^+\). Then \[\begin{align} u^\prime &= \overbrace{ xy\cdots xy}^{p}\overbrace{ xy\cdots xy}^{q}\\ v^\prime &= yx \cdots yxyx \cdots yx = qp = \overbrace{ xy\cdots xy}^{q}\overbrace{ xy\cdots xy}^{p} \label{cl:eq1} \end{align}\tag{1}\] Equating the suffixes of \(v^\prime\) of length \(|xy|\) in both side of the 1 , we deduce \(xy = yx\), i.e., \(u = v\). It satisfies Case [cute] of . Hence a contradiction.
We will make a further case analysis: when there is an \(xy\) present before the cut, and when there is an \(xy\) present after the cut (since \(n \geq 2\)).
Suppose the cut in \(u^\prime\) is in the \(i^\text{th}\) \(xy\) for \(i > 1\), i.e., there is an \(xy\) present before the cut.
When the cut is within \(x\), i.e., there exists a cut \((p,q)\) of \((u^\prime, v^\prime)\) such that \(p \in (xy)^+x^\prime\) where \(x^\prime\) is a nonempty proper prefix of \(x\) and \(x=x^\primex^{\prime\prime}\) for some word \(x^{\prime\prime}\). Now, \[\begin{align} u^\prime &=\overbrace{ \cdots x^\primex^{\prime\prime}yx^\prime}^{p}\overbrace{x^{\prime\prime}y \cdots}^{q}\\ v^\prime &= yx^\primex^{\prime\prime} \cdots yx^\primex^{\prime\prime} = qp = \overbrace{x^{\prime\prime}y \cdots}^{q}\overbrace{ \cdots x^\primex^{\prime\prime}yx^\prime}^{p} \label{cl:eq2} \end{align}\tag{2}\] As before, equating the suffixes of \(v^\prime\) of length \(|xy|\) on both sides of 2 , we obtain \[yx = yx^\primex^{\prime\prime} = x^{\prime\prime}yx^\prime\] Here \(x^\prime\) and \(x^{\prime\prime}\) satisfies Case [cutd] of . Hence a contradiction.
When the cut is within \(y\), i.e., there exists a cut \((p,q)\) of \((u^\prime, v^\prime)\) such that \(p \in (xy)^+xy^\prime\) where \(y^\prime\) is a nonempty prefix of \(y\) and \(y=y^\primey^{\prime\prime}\) for some word \(y^{\prime\prime}\). Then, \[\begin{align} u^\prime &=\overbrace{ \cdots xy^\primey^{\prime\prime}xy^\prime}^{p}\overbrace{y^{\prime\prime} \cdots}^{q}\\ v^\prime &= y^\primey^{\prime\prime}x \cdots y^\primey^{\prime\prime}x = qp = \overbrace{y^{\prime\prime} \cdots}^{q}\overbrace{ \cdots xy^\primey^{\prime\prime}xy^\prime}^{p} \label{cl:eq3} \end{align}\tag{3}\] On both sides of the 3 , equating the suffixes of \(v^\prime\) of length \(|xy|\), we get \[yx = y^\primey^{\prime\prime}x = y^{\prime\prime}xy^\prime\] that is Case [cutc] of . Hence a contradiction.
The case when there is an \(xy\) after the cut is symmetric and leads to Cases [cuta] and [cutb] of .
Since we have eliminated all of other cases, the only possible cuts of the pair \((u^\prime,v^\prime)\) are of the form \(((xy)^*x,(yx)^*y)\). ◻
The below lemma gives the relationship between the cuts of two conjugate primitive pairs, particularly when there is a specific combination of these pairs which is conjugate.
Lemma 3 (Equal Length Lemma). Let \((u_1,v_1),(u_2,v_2)\) be two conjugate primitive pairs of equal length (i.e., \(|u_1| = |u_2|\)). If pair \((u_1,v_1)^{\ell_1}(u_2,v_2)^{\ell_2}\) where \(\ell_1 > 2, \ell_2 > \ell_1 + 2\) is conjugate, then there exist cuts \((x_1,y_1)\) of \((u_1,v_1)\) and \((x_2,y_2)\) of \((u_2,v_2)\) such that either \(x_1 = x_2\) or \(y_1 = y_2\).
Proof. Let \((u,v) = (u_1,v_1)^{\ell_1}(u_2,v_2)^{\ell_2}\) such that \(\ell_1 > 2\) and \(\ell_2 > \ell_1 + 2\) suffices. \[\begin{align} u &= \overbrace{u_1 \cdots u_1}^{\ell_1 \text{ times}}\overbrace{u_2u_2 \cdots u_2u_2}^{\ell_2 \text{ times}}\\ v &= v_1 \cdots v_1v_2v_2 \cdots v_2v_2 \end{align}\]
If \((u,v)\) is conjugate, then they have a cut say \((p,q)\). If either \(p\) or \(q\) is empty then both the pairs are identical. In this case, \(u_1=x_1y_1=y_1x_1=v_1\) and \(u_2=x_2y_2=y_2x_2=v_2\). By [primitive], either \(x_1=x_2 = \varepsilon\) or \(y_1=y_2=\varepsilon\). Thus, assume that both \(p\) and \(q\) are nonempty. There are two possibilities for a cut of \((u,v)\): when the cut in \(u\) is within \({u_1}^{\ell_1}u_2\) or it is after \({u_1}^{\ell_1}u_2\).
In both the cases we show that either \(x_1 = x_2\), or \(y_1=y_2\) or both.
In this case, the cut in \(v\) is within the suffix \(v_2^{\ell_1+1}\) since the \(|u_1| = |u_2| = |v_2|\) and \(\ell_2 > \ell_1 + 2\). Substituting \((u_1,v_1)\) and \((u_2,v_2)\) with \((x_1y_1,y_1x_1)\) and \((x_2y_2,y_2x_2)\), \[\begin{align} u &= x_1y_1 \cdots x_1y_1\,x_2y_2 \cdots x_2y_2 = pq\\ v &= y_1x_1 \cdots y_1x_1 \cdots y_2x_2 \underbrace{y_2x_2}_{\text{cut region}} \cdots = qp \end{align}\] Since \(\ell_2 > \ell_1 + 2\), there exist at least one \(y_2x_2\) before the cut in \(v\). We compare the suffixes of \(q\) in both \(u\) and \(v\). Since \(q\) ends with \(x_2y_2\) in \(u\), the cut in \(v\) should be at the end of a \(y_2\) by Case [distinct] of . Note that by Case [same] of , the cut can end after \(x_2\) but then \(u_2=x_2y_2=y_2x_2 = v_2\) and hence either \(x_2 = \varepsilon\) or \(y_2 = \varepsilon\). In both case, we can say that the cut is at the end of a \(y_2\).
Hence \(p\) can be of the form \(x_2\) or \((x_2y_2)^+x_2\) depending upon if the cut in \(v\) is within the last \(y_2x_2\) or not. \[\begin{align} u &= x_1y_1 \cdots x_1y_1x_2y_2 \cdots x_2y_2 = pq\\ v &= \underbrace{y_1x_1 \cdots y_1x_1 \cdots y_2x_2y_2}_{q} \underbrace{x_2 \cdots}_{p} \end{align}\]
Suppose \(p \in (x_2y_2)^+x_2\), then equating the prefixes of \(p\) in \(u\) and \(v\) of length \(|x_2y_2| = |x_1y_1|\) (Since \(|u_1| = |u_2|\)), we obtain \(x_2y_2 = x_1y_1\). Substituting this in \(u\), \[\begin{align} u &= x_1y_1 \cdots x_1y_1x_1y_1 \cdots x_1y_1 = pq\\ v &= \underbrace{y_1x_1 \cdots y_1x_1 \cdots y_2x_2y_2}_{q} \underbrace{x_2y_2 \cdots x_2}_{p} \end{align}\]
Now we compare the prefixes of \(q\) in \(u\) and \(v\). Since \(q\) starts with \(y_1x_1\) in \(v\), from , the cut in \(u\) should be at the end of \(x_1\). Therefore, \(p \in (x_1y_1)^+x_1\) in \(u\). Also, \(p \in (x_2y_2)^+x_2\) in \(v\). Since \(|x_1y_1| = |x_2y_2|\) and \(|x_1|,|x_2| < |x_1y_1|\), we can deduce \(p = (x_1y_1)^{i}x_1 = (x_2y_2)^{i}x_2\) for some \(i\). Hence, \(x_1 = x_2\). Therefore, it implies \(y_1 = y_2\) since \(x_1y_1 = x_2y_2\) and hence, \((u_1,v_1)\) and \((u_2,v_2)\) are identical.
Suppose \(p =x_2\) in \(v\). Here, \(p\) in \(u\) is within the first \(x_1y_1\) since \(|x_1y_1| = |x_2y_2|\). Moreover \(p = x_1\) since the only possible cut in \(u\) will be at the end of \(x_1\) by (comparing the prefixes of \(q\) in \(u\) and \(v\)). Hence \(x_1 = x_2\).
This case is symmetric. For the sake of completeness we prove it.
Substituting \((u_1,v_1)\) and \((u_2,v_2)\) with \((x_1y_1,y_1x_1)\) and \((x_2y_2,y_2x_2)\), \[\begin{align} u &= x_1y_1 \cdots x_1y_1 \cdots x_2y_2 \overbrace{x_2y_2}^{\text{cut region}}\cdots = pq\\ v &= y_1x_1 \cdots y_1x_1y_2x_2 \cdots y_2x_2 = qp \end{align}\]
Note that there is at least one \(x_2y_2\) before the cut. We compare the suffixes of \(p\) in \(u\) and \(v\). Since \(p\) ends with \(y_2x_2\) in \(v\), the cut in \(u\) should be at the end of \(x_2\) by Case [distinct] of . Note that by Case [same] of , the cut can end after \(y_2\) but then \(u_2=x_2y_2=y_2x_2 = v_2\) and hence either \(x_2 = \varepsilon\) or \(y_2 = \varepsilon\). Hence \(q\) is of the form \(y_2\) or \((y_2x_2)^+y_2\) depending upon if the cut in \(u\) is within the last \(x_2y_2\) or not. \[\begin{align} u &= \overbrace{x_1y_1 \cdots x_1y_1 \cdots x_2y_2x_2}^{p}\overbrace{\cdots y_2}^{q}\\ v &= y_1x_1 \cdots y_1x_1y_2x_2 \cdots y_2x_2 = qp \end{align}\]
If \(q \in (y_2x_2)^+y_2\), then comparing the prefixes of \(q\) of length \(|y_2x_2| = |y_1x_1|\) (Since \(|v_1| = |v_2|\)) in \(u\) and \(v\), we obtain \(y_2x_2 = y_1x_1\). Substituting this in \(v\), \[\begin{align} u &= \overbrace{x_1y_1 \cdots x_1y_1 \cdots x_2y_2x_2}^{p}\overbrace{\cdots y_2}^{q}\\ v &= y_1x_1 \cdots y_1x_1y_1x_1 \cdots y_1x_1 = qp \end{align}\]
We compare the prefixes of \(p\) in \(u\) and \(v\). Since \(p\) starts with \(x_1y_1\) in \(u\), the cut in \(v\) should be at the end of \(y_1\) using . Therefore, \(q \in (y_1x_1)^+y_1\) in \(v\) and \(q \in (y_2x_2)^+y_2\) in \(u\). Hence, as before we can deduce that \(y_1 = y_2\). It also implies \(x_1 = x_2\) since \(y_1x_1 = y_2x_2\) and thus \((u_1,v_1)\) and \((u_2,v_2)\) are identical.
If \(q = y_2\). The cut in \(v\) is within first \(y_1x_1\). In fact, \(q=y_1\) since the only possible cut in \(u\) will be at the end of \(y_1\) by (comparing the prefixes of \(p\) in \(u\) and \(v\)). Hence \(y_1 = y_2\). ◻
In this section, it is shown that an infinite set of pairs that is generated by a sumfree set is conjugate if and only if there is a word witnessing its conjugacy.
Recall from 1 that a pair of words \((u,v)\) is conjugate, then there exists a word \(z\) such that \(uz=zv\) where \(u=xy\),\(v=yx\) and \(z \in (xy)^*x\). By symmetry of conjugacy, there also exists a word \(z'\) such that \(z'u=vz'\) where \(z^\prime \in (yx)^*y\). We call \(z\) (resp. \(z'\)) in the above characterisation as an inner witness (resp. outer witness) of the pair \((u,v)\) (since \(z\) is appended to the inner ends).
Given a conjugate pair \((u,v)\), the set of all inner witnesses of \((u,v)\) is \(\{z \mid uz = zv\} = \cup_{\{(x, y )\mid u = xy, v= yx \}} (xy)^\ast x\). Similarly, the set of all outer witnesses of \((u,v)\) is \(\{z \mid zu = vz\} = \cup_{\{(x, y )\mid u = xy, v= yx \}} (yx)^\ast y\).
For example, the pair \((\mathit{aba},\mathit{baa})\) has inner witnesses \((aba)^*a\) and outer witnesses \((baa)^*ba\).
An inner witness of a pair \((u,v)\) is an outer witness of the pair \((v,u)\). We say that a pair of words has a witness if it has either an inner witness or an outer witness.
The following proposition shows that a pair and its primitive root shares the same set of witnesses.
Let \((u,v)\) be a conjugate pair with the primitive root \((\rho_{u}, \rho_{v})\). The following are equivalent for a word \(z\).
\(z\) is an inner (resp. outer) witness of \((u,v)\).
\(z\) is an inner (resp. outer) witness of \((\rho_{u},\rho_{v})\).
Proof. We prove \((1) \iff (2)\) for inner witness. The outer witness case is symmetric.
Assume that \(z\) is an inner witness of \((\rho_u,\rho_v)\). By induction on \(n\), we prove that \(z\) is also an inner witness of \((\rho_u, \rho_v)^n\) for all \(n \geq 1\), i.e., \(\rho_u^nz = z\rho_v^n\). It is true when \(n=1\). For all \(n > 1\), \[\begin{align} \rho_u^nz &= \rho_u^{n-1}\rho_uz\\ &= \rho_u^{n-1}z\rho_v && \text{(Since \rho_uz=z\rho_v)}\\ &= z\rho_v^{n-1}\rho_v && \text{(Inductive Hypothesis)}\\ &= z\rho_v^n \end{align}\] Since \((u,v)\) is a conjugate pair, there exists an integer \(n \geq 1\) such that \((u,v) = (\rho_u, \rho_v)^n\) by [primitiveconjugates]. Hence, \(z\) is also an inner witness for \((u,v)\).
Since \((u,v)\) is conjugate, its primitive root \((\rho_u,\rho_v)\) is conjugate as well by [primitiveconjugates]. Consider the case when \(u \neq v\). It follows that \(\rho_u \neq \rho_v\). According to [primitive], the pair \((\rho_u,\rho_v)\) has a unique cut, denoted as \((x,y)\). From [cutlemmaprop], all cuts of \((u,v)\) are of the form \(((xy)^*x,(yx)^*y)\). From 1, an inner witness of \((u,v)\) belongs to \[((xy)^*x(yx)^*y)^*(xy)^*x = (xy)^*x\] and hence is an inner witness of \((\rho_u,\rho_v)\).
In the case where \(u=v\), it follows that \(\rho_u = \rho_v\). Consequently, any witness \(z\) for the pair \((u,u)\) belongs to the set \(u^*\) that is a subset of \(\rho_u^*\). Thus, \(z\) is also a witness for the pair \((\rho_u,\rho_v)\), since \(\rho_u^*\) consists of witnesses of \((\rho_u,\rho_v)\).
◻
Let \(\rho, \rho_1, \rho_2\) be nonempty primitive words that are pair-wise conjugate, and let \(\alpha\) be an arbitrary word. If \(\rho_1\alpha\rho_2\) is an infix of a word in \(\rho^*\), then \(\alpha\) is an inner witness of \((\rho_1,\rho_2)\), i.e. \(\rho_1\alpha= \alpha\rho_2\).
Proof. Since \((\rho_1,\rho_2)\) are conjugate, there exists a cut \((x,y)\) such that \(\rho_1 = xy\) and \(\rho_2 = yx\). Moreover, since \(\rho \sim \rho_1 \sim \rho_2\), all three words have the same length, say \(p > 0\). Further, since \(\rho \sim \rho_1 = xy\), we have \(\rho^+ = s \rho_1^*t = s(xy)^* t\) for some words \(s,t\) such that \(|st| = p\).
Assume that \(\rho_1\alpha\rho_2\) is an infix of a word \(w \in \rho^+\). By the previous observation \(w=s(xy)^it\) for some sufficiently large \(i>0\). Firstly, assume \(\rho_1 \neq \rho_2\). Then, the cut \((x,y)\) is non-empty and unique by [primitive]. Since \(\rho_1\) and \(\rho_2\) are primitive, by [same] of , neither \(xy\) nor \(yx\) is equal to any of its non-trivial cyclic shifts. Given that \(\rho_1 \alpha\rho_2 = xy \alphayx\) occurs as an infix of \(w\). We do a case analysis. If \(xy \alphayx\) lies entirely within the factor \((xy)^i\) of \(w\), then by , the factor \(xy\) of \(xy \alphayx\) must align exactly with a factor \(xy\) of \(w\), and likewise \(yx\) should match exactly with a factor \(yx\) of \(w\). As a consequence, \(\alpha\in (xy)^*x\) which is an inner witness of \((\rho_1,\rho_2)\).
Next, assume for the sake of contradiction that \(xy \alphayx\) is a factor of \(s(xy)^i\), but not a factor of \((xy)^i\). Hence a suffix of \(s\) is a prefix of \(xy\) (recall that \(|s| \le p = |xy|\)). Since \(\rho \sim xy\) and \(|s| \le p\), \(s\) is an infix of \(xy\). Hence, the prefix \(xy\) of \(\rho_1\alpha\rho_2\) matches with a nontrivial cyclic shift of \(xy\) in \(w\). This contradicts . A symmetric argument rules out the case when \(xy \alphayx\) is a factor of \((xy)^it\), but not a factor of \((xy)^i\).
When \(\rho_1 = \rho_2\), the only cuts possible are empty cuts (i.e., either \(x\) or \(y\) is empty) by [primitive]. Thus \(\rho_1 = \rho_2 = x\), and the previous argument applies directly, and we get \(\alpha\in x^*\), and hence is an inner witness of \((\rho_1,\rho_2)\). ◻
We generalise the notion of a witness of a pair to a set of pairs.
Definition 5 (Common Witness). A word is a common inner witness of a set of pairs \(P\) if it is an inner witness of each pair in \(P\). Similarly, a word is a common outer witness* of \(P\) if it is an outer witness of each pair in \(P\).*
A set of pairs has a common witness* if it has either a common inner witness or a common outer witness. We denote by \(W(P)\) the set of all common witnesses of \(P\).*
The structure of a common witness of a set of pairs is obtained from 1.
Let \(P\) be a set of pairs of words. The following are equivalent.
\(z\) is a common inner witness of \(P\).
There exists a cut \((x,y)\) of each pair \((u,v) \in P\) such that \(z \in \bigcap_{(u,v) \in P}(xy)^*x\).
\(z \in \bigcap_{(u,v) \in P} \bigcup_{\{(x, y)\mid u = xy, v= yx \}}(xy)^*x\)
The statement for common outer witness is analogous.
Proof. Follows from the definition of common witness and 1. ◻
Example 4. Consider the set \(P = \{(\mathit{ab},\mathit{ba}),(\mathit{abab},\mathit{baba})\}\). The pair \((ab,ba)\) has a unique cut \((a,b)\), and the pair \((\mathit{abab},\mathit{baba})\) has two cuts: \((a,bab)\) and \((aba,b)\). The word \(a\) is a common inner witness of \(P\) since \(a\) belongs to both \((ab)^*a\) and \((abab)^*a\) (using the first cut). Similarly, \(aba\) is also a common inner witness of \(P\) since \(aba\) belongs to both \((ab)^*a\) and \((abab)^*aba\) (using the second cut). Notice that \(aba\) is not in the intersection of \((ab)^*a\) and \((abab)^*a\).
[samewitness] connecting witness of a conjugate pair and its root can be lifted to a set of conjugate pairs and its root as follows.
The common witnesses of a set of conjugate pairs \(G\) and its root \(R(G)\) are the same, i.e., a word \(z\) is a common inner (resp. outer) witness of \(G\) iff \(z\) is a common inner (resp. outer) witness of \(R(G)\).
Proof. We prove for common inner witness. The common outer witness case is symmetric. \[\begin{align} z &\text{ is a common inner witness of } G\\ &\iff z \text{ is an inner witness of } (u,v) \text{ for each (u,v) \in G}\\ &\iff z \text{ is an inner witness of } (\rho_u,\rho_v) \text{ for each (u,v) \in G} && \text{ (By \Cref{samewitness})}\\ &\iff z \text{ is a common inner witness of } R(G) \end{align}\] ◻
When a set is not conjugate, clearly it has no common witness. However, even when a set is conjugate, it may have both common inner and outer witnesses, or only common inner witness, or only common outer witness, or neither of them as shown below.
Example 5. Consider the set \(P = \{(\mathit{ab},\mathit{ba}),(\mathit{ac},\mathit{ca}))\}\). The pair \((\mathit{ab},\mathit{ba})\) has inner witnesses \((ab)^*a\) and outer witnesses \((ba)^*b\). Similarly, the pair \((\mathit{ac},\mathit{ca})\) has inner witnesses \((ac)^*a\) and outer witnesses \((ca)^*c\). According to [cwpattern], the set \(P\) has a unique common inner witness \(a = (ab)^*a \cap (ac)^*a\), but it does not have any common outer witness since \((ba)^*b \cap (ca)^*c = \emptyset\).
The set \(\{(\mathit{ab},\mathit{ba}),(\mathit{abab},\mathit{baba})\}\) has both common inner witnesses \[(ab)^*a = (ab)^*a \cap ({(abab)^*aba \cup (abab)^*a})\] and common outer witnesses \[(ba)^*b = {(ba)^*b \cap ({(baba)^*b \cup (baba)^*bab})} \;.\]
However, the set \(\{(\mathit{ab},\mathit{ba}),(\mathit{ba},\mathit{ab})\}\) has no common witnesses since \((ab)^*a \cap (ba)^*b = \emptyset\).
Next we analyse the number of common witnesses a set of pairs can have.
Let \(G\) be a set of conjugate pairs of words. The following are equivalent.
\(G\) has more than one common witness.
\(G\) has infinitely many common witnesses.
\(G\) has infinitely many common inner witnesses.
\(G\) has infinitely many common outer witnesses.
All the pairs in \(G\) have the same primitive root.
Proof. We prove \((1) \Rightarrow(2) \Rightarrow(1)\) and \((1) \Rightarrow(5) \Rightarrow(3),(4) \Rightarrow(1)\).
\((2) \Rightarrow(1)\) and \((3),(4) \Rightarrow(1)\) is obvious. We first show \((5) \Rightarrow(3),(4)\). Since all the pairs in \(G\) have the same primitive root, \(R(G)\) is singleton. Thus, \(R(G)\) has infinitely many common inner as well as common outer witnesses by 1. Since \(G\) and \(R(G)\) have the same witnesses ([samewitnessext]), \(G\) also has infinitely many common inner and common outer witnesses.
Now it remains to show that \((1) \Rightarrow(2)\) and \((1) \Rightarrow(5)\). If the set \(G\) has two common witnesses, namely \(z_1\) and \(z_2\), then according to [samewitnessext], \(z_1\) and \(z_2\) are also common witnesses of \(R(G)\). Let \(R(G) = \{(u_i,v_i) \mid i \in I\}\) where \(I\) is an Index set.
Suppose \(z_1\) and \(z_2\) are two common inner witnesses of \(R(G)\). We choose cuts \((x_i,y_i)\) for each \((u_i,v_i) \in R(G)\) such that both \(z_1\) and \(z_2\) belongs to \(\bigcap_{i \in I}(x_iy_i)^*x_i\). Since \(R(G)\) is a set of primitive pairs, \((x_i,y_i)\) is the unique cut of \((u_i,v_i)\) when \(u_i \neq v_i\) by [primitive]. When \(u_i=v_i\), it has only two empty cuts, namely \((\epsilon, u_i)\) and \((u_i,\epsilon)\) (if \(u_i = v_i\)). The inner witnesses obtained using cut \((\epsilon, u_i)\) is a superset of inner witnesses obtained using \((u_i,\epsilon)\). Hence, we can choose cut \((x_i,y_i) = (\epsilon, u_i)\) for pair \((u_i,v_i)\) when \(u_i = v_i\). Therefore, as stated in [cwpattern], both \(z_1\) and \(z_2\) belongs to \(\bigcap_{i \in I}(x_iy_i)^*x_i\).
Without loss of generality, assume that \(|z_1| < |z_2|\). As depicted in 2, a common factor \(w \in \bigcap_{i \in I}(y_ix_i)^{\geq 1}\) exists for each \(u_i^\omega\) that can be repeated one after another in \(u_i^\omega\) to get longer and longer common inner witnesses.
By symmetry, when \(z_1\) and \(z_2\) are both common outer witnesses of \(R(G)\), we get infinitely many common outer witnesses.
Now, WLOG assume that \(z_1\) is a common inner witness and \(z_2\) is a common outer witness of \(R(G)\), where \(z_1 \neq z_2\). Here also we choose cuts \((x_i,y_i)\) for each \((u_i,v_i) \in R(G)\) such that \(z_1\) belongs to \(\bigcap_{i \in I}(x_iy_i)^*x_i\) and \(z_2\) belongs to \(\bigcap_{i \in I}(y_ix_i)^*y_i\). For each distinct primitive pair in \(R(G)\), there exists a unique cut. However, for identical primitive pairs, we fix a cut based on the values of \(z_1\) and \(z_2\). We consider two cases: either \(z_1, z_2 \neq \epsilon\), or exactly one of \(z_1\) and \(z_2\) is equal to \(\epsilon\). In the case where \(z_1, z_2 \neq \epsilon\), for primitive pairs \((u_i,v_i)\) such that \(u_i = v_i\), we can choose either of the two empty cuts as \((x_i,y_i)\), resulting in \(z_1 \in (x_iy_i)^*x_i\) and \(z_2 \in (y_ix_i)^*y_i\). In the second case, if \(z_1 = \epsilon\), we select the cut \((x_i,y_i) = (\epsilon, u_i)\). This choice ensures that \(z_1 \in (x_iy_i)^*x_i\) and \(z_2 \in (y_ix_i)^*y_i\) (since \(z_2 \neq \epsilon\)). Similarly, if \(z_2 = \epsilon\), we choose the cut \((x_i,y_i) = (u_i, \epsilon)\). Consequently, we can conclude that \(z_1\) belongs to \(\bigcap_{i \in I}(x_iy_i)^*x_i\) and \(z_2\) belongs to \(\bigcap_{i \in I}(y_ix_i)^*y_i\).
As shown in 3, concatenating \(z_1 \cdot z_2 \cdot z_1\) in \(u_i^\omega\), we get one more common inner witness \(z_3\) for \(R(G)\). By the above argument, \(R(G)\) has infinitely many common witnesses. Since witnesses of \(R(G)\) are also witnesses of \(G\) ([samewitnessext]), it implies that \(G\) itself has infinitely many common witnesses. This completes the proof of \((1) \Rightarrow(2)\).
In both the cases, we get that \((x_1y_1)^\omega = (x_2y_2)^\omega = \cdots\) and \((y_1x_1)^\omega = (y_2x_2)^\omega = \cdots\). Hence from Fine and Wilf 4, all \(u_i\)’s has the same primitive root. Similarly, all \(v_i\)’s has the same primitive root. This proves \((1) \Rightarrow(5)\). ◻
Therefore, a set of pairs can have no common witness, a unique common witness, or infinitely many common witnesses.
Corollary 2. For all set of pairs \(G\), if \(W(G) \neq \emptyset\), then one of the following is true.
\(|W(G)|=\infty\) and \(R(G)\) is singleton.
\(|W(G)|=1\) and \(R(G)\) is not singleton.
Lyndon-Schützenberger theorem characterises conjugacy of a pair of words. We generalise the notion in 1 to an infinite set of pairs closed under concatenation. The question we ask is:
“Given an arbitrary set of pairs \(G\), is \(G^*\) conjugate?”
If \(G^*\) has a common witness, then each pair in \(G^*\) has a witness and is conjugate. Hence \(G^*\) is conjugate. We prove the converse, namely, if \(G^*\) is conjugate, then it has a common witness. The below theorem characterises conjugacy of a freely generated set of pairs of words.
Theorem 6 (Common Witness Theorem for Kleene Closure). Let \(G\) be an arbitrary conjugate set of pairs of words. The following are equivalent.
\(G^*\) is conjugate.
\(G^*\) has a common witness \(z\).
\(G\) has a common witness \(z\).
\(R(G)\) has a common witness \(z\).
Proof. We prove \((4) \Rightarrow(3) \Rightarrow(2) \Rightarrow(1) \Rightarrow(4)\). The only nontrivial direction is \((1) \Rightarrow(4)\) that is proved in 4.
Follows from [samewitnessext].
Suppose there exists a common inner witness \(z\) of the set \(G\). Hence \(\forall (u,v) \in G\), \(u z=z v\). Let \((u',v')\) be any arbitrary element from \(G^*\), i.e., \((u',v') = (u_1\cdots u_n,v_1\cdots v_n)\) for some \(n \geq 1\) and \((u_i,v_i) \in G\) for \(1 \leq i \leq n\). By induction on \(n\), we equate \(u'z= zv'\) as follows. Thus, \(z\) is a common inner witness of \(G^*\). The proof for common outer witness is symmetric. \[\begin{align} u'z &= u_1\cdots u_{n-1}u_n z \\ &= u_1\cdots u_{n-1} z v_n && \text{(Since u_n z = z v_n)}\\ &= zv_1\cdots v_{n-1}v_n && \text{(Inductive Hypothesis)}\\ &= zv' \end{align}\]
Follows from 1.
◻
Remark 2. Note that whenever \(G^\ast\) is conjugate even though \(G\) and \(R(G)\) have the same common witnesses, \(G^\ast\) need not be equal to \(R(G)^\ast\). Indeed, \(G^\ast \subseteq R(G)^\ast\).
As a corollary, we get that for any rational expression \(E\), the expression \(E^*\) is conjugate if, and only if, \(E\) has a common witness. Below is an illustration of the common witness theorem for a set of pairs that is not rational.
Example 6. Let \(G= \{(ab^p,b^pa) \mid p \text{ is a prime number}\}\). The word \(a \in \bigcap_{p \in \mathbb{N} \text{, p is a prime}} (ab^p)^*a\) is a common inner witness of the set \(G\). It is also easy to verify that \(G^*\) is conjugate and \(a\) is a common inner witness of \(G^*\).
Next we state the conjugacy theorem for monoid closures, i.e., sumfree sets of the form \[M = (\alpha_0,\beta_0){G_1}^*(\alpha_1,\beta_1){G_2}^*\cdots (\alpha_{k-1},\beta_{k-1}){G_k}^*(\alpha_k,\beta_k), k > 0 \;.\] where \(G_1^*,G_2^*, \ldots, G_k^*\) are arbitrary nonempty sets of conjugate pairs.
Theorem 7. 1[Conjugacy Theorem for Monoid Closure]Let \(M = (\alpha_0,\beta_0)(\prod_{i=1}^{k}G_i^*(\alpha_i,\beta_i))\), \(k \geq 1\), be a sumfree set. \(M\) is conjugate if, and only if, one of the following holds.
\(M\) has a common witness.
For each \(i \in [1,k]\), \(G_i^*\) is conjugate and there exist a primitive word \(\rho\) such that \(\mathit{fst}(G_i^*)\sim \mathit{snd}(G_i^*) \mathrel{\mathpalette\subset@sim\relax}\rho^*\), and there exists a word \(v \sim \alpha_0 \cdots \alpha_k \sim \beta_0 \cdots \beta_k\) such that \(\mathit{fst}(M) \sim \mathit{snd}(M) \mathrel{\mathpalette\subset@sim\relax}v\rho^*\).
We give the proof of the above theorem in 6. Note that the above result does not generalise to arbitrary sets of pairs, in particular, rational sets using sum.
Example 7. \((ab,ba)^* + (baa,aab)^*\) is an infinite conjugate set with no* common witness. Also, it does not satisfy Item \((2)\) of 7.*
Definition 6 (Redux, Singleton Redux). Let \(M\) be the sumfree set \[(\alpha_0,\beta_0){G_1}^*(\alpha_1,\beta_1){G_2}^*\cdots (\alpha_{k-1},\beta_{k-1}){G_k}^*(\alpha_k,\beta_k) \;.\] The redux* of \(M\) is the pair \((\alpha_0\alpha_1\cdots \alpha_k,\beta_0\beta_1\cdots \beta_k)\) obtained by substituting each \(G_i^*\) by the empty pair \((\epsilon, \epsilon)\). A singleton redux of \(M\) is a set obtained by substituting all but one of the \(G_i^*\)’s by the empty pair \((\epsilon, \epsilon)\). They are of the form \((\alpha_0 \cdots \alpha_{i-1},\beta_0 \cdots \beta_{i-1}){G_i}^*(\alpha_i \cdots \alpha_k,\beta_i \cdots \beta_k)\) where \(1 \leq i \leq k\).*
Example 8. Consider the set \(M = (a,a)(\mathit{baa},\mathit{aba})^*(b,a)(\mathit{aab},\mathit{baa})^*(a,b)\). The redux of \(M\) is \((\mathit{aba},\mathit{aab})\), and its singleton reduxes are \((a,a)(\mathit{baa},\mathit{aba})^*(\mathit{ba},\mathit{ab})\) and \((\mathit{ab},\mathit{aa})(\mathit{aab},\mathit{baa})^*(a,b)\).
If a sumfree set has a common witness, it is conjugate. The converse need not be true as illustrated in the below example.
Example 9. Consider the sumfree set \[M = \left( \begin{array}{c}\varepsilon\\ c\end{array}\right) \left( \begin{array}{c}ab\\ ba\end{array}\right)^* \left( \begin{array}{c} c\\ b\end{array}\right) \left( \begin{array}{c}ba\\ ab\end{array}\right)^* \left( \begin{array}{c}b\\ \varepsilon\end{array}\right)\] The set \(M = \{((ab)^nc(ba)^mb,c(ba)^nb(ab)^m) \mid n,m \geq 0\}\) is conjugate and has no common witness. However, \(G_1^* = (ab,ba)^*\) and \(G_2^* = (ba,ab)^*\) is conjugate and there exist a primitive word \(\rho = ab\) such that \(\mathit{fst}(G_i^*)\sim \mathit{snd}(G_i^*) \mathrel{\mathpalette\subset@sim\relax}\rho^*=(ab)^*\), and there exists a word \(v = cb\) (which is a cyclic shift of the redux of \(M\)) such that \(\mathit{fst}(M) \sim \mathit{snd}(M) \mathrel{\mathpalette\subset@sim\relax}v\rho^* = (cb)(ab)^*\).
Note that the \(v\) and \(\rho\) need not be unique. For \(\rho= ba\) and \(v=bc\), it is also true that \(\mathit{fst}(M) \sim \mathit{snd}(M) \mathrel{\mathpalette\subset@sim\relax}v\rho^* = (bc)(ba)^*\).
For sumfree sets of the form \(M = (\alpha_0,\beta_0)G^*(\alpha_1,\beta_1)\) with only one Kleene closure, we show that \(M\) is conjugate iff \(M\) has a common witness. Later, we show that if a general sumfree set has a common witness then that is in the intersection of the common witnesses of the singleton reduxes of the set. Towards this, we need the following definition.
Definition 7 (Prefix Delay, Suffix Delay). If \(u\) and \(v\) are words such that one of them is a prefix of another, we define the prefix delay* between \(u\) and \(v\) as \[[u,v]_L = \begin{cases}u^{-1}v & \text{ if u is a prefix of v}\\ v^{-1}u & \text{ if v is a prefix of u} \end{cases}\] Similarly, the suffix delay of two words \(u\) and \(v\) such that one of them is suffix of another, denoted by \([u,v]_R\), is \(vu^{-1}\) if \(u\) is a suffix of \(v\) and \(uv^{-1}\) if \(v\) is a suffix of \(u\).*
For example, \([abaa,ab]_L = aa = [ab,abaa]_L\).
Following is the common witness theorem for a sumfree set with only one Kleene star, i.e., sets of the form \((\alpha_0,\beta_0)G^*(\alpha_1,\beta_1)\). In short it states that such a set is conjugate if and only if it has a common witness that is determined by the common witnesses of \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\).
Theorem 8. Let \(M= (\alpha_0,\beta_0)G^*(\alpha_1,\beta_1)\) be a sumfree set with nonempty redux. The following are equivalent.
\(M\) is conjugate.
There exist a common witness of \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\).
\(M\) has a common witness.
Furthermore,
If the set \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) has a unique common inner witness, say \(z'\), then \(M\) has a unique common witness \(z = [\alpha_0z',{\beta_0}]_R = [\alpha_1,z'\beta_1]_L\). Moreover, if \(|\alpha_0z'| \geq |\beta_0|\) or equivalently \(|\alpha_1| \leq |z'\beta_1|\), then \(z\) is a common inner witness, otherwise it is a common outer witness.
If the set \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) has a unique common outer witness, say \(z'\), then \(M\) has a unique common witness \(z = [\alpha_0,\beta_0z']_R = [z'\alpha_1,\beta_1]_L\). Moreover, if \(|z'\alpha_1| \geq |\beta_1|\) or equivalently \(|\alpha_0| \leq |\beta_0z'|\), then \(z\) is a common outer witness, otherwise it is a common inner witness.
If \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) has infinitely many common witnesses, then \(M\) is a subset of powers of the primitive root of its redux. Thus, \(M\) has infinitely many common witnesses.
Example 10. Let \(M = (\alpha_0,\beta_0)G^*(\alpha_1,\beta_1)\) be a sumfree set with one Kleene star where \[\left(\begin{matrix}\alpha_0 \\\beta_0 \end{matrix}\right) = \left(\begin{matrix}ab \\b \end{matrix}\right), G =\left\{ \left(\begin{matrix}bab \\ abb \end{matrix}\right)\right\}, \left(\begin{matrix}\alpha_1 \\\beta_1 \end{matrix}\right) = \left(\begin{matrix}b \\ ab \end{matrix}\right).\] The redux of \(M\) is \((\alpha_0\alpha_1,\beta_0\beta_1) = (abb,bab)\). The set \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\} = \{(bab,abb)\} \cup \{(bab,abb)\} = \{(bab,abb)\}\) and, hence it has infinitely many common witnesses. By 8 [Thm7:3], \(M\) is a subset of powers of the primitive root of the redux, i.e., \(M = (abb,bab)^{+}\). Therefore, \(M\) has infinitely many witnesses same as those of \((abb,bab)\).
A singleton redux of a sumfree set is nothing but a sumfree set with only one Kleene star. Given any sumfree set \(M\), if \(M\) is conjugate, each of its singleton reduxes are conjugate. From 8, a singleton redux of \(M\) has a common witness. Further, we prove that \(M\) has a common witness \(z\) iff \(z\) is the common witness of each of its singleton reduxes. The below theorem characterises the common witness of a general sumfree set.
Theorem 9 (Common Witness Theorem for Monoid Closure). Let \(M\) be a sumfree set. The following are equivalent.
\(z\) is a common witness of each singleton redux of \(M\).
\(z\) is a common witness of \(M\).
Example 11. Let \(M = (\alpha_0,\beta_0)G_1^*(\alpha_1,\beta_1)G_2^*(\alpha_2,\beta_2)\) be a sumfree set with two Kleene star where \[\left(\begin{matrix}\alpha_0 \\\beta_0 \end{matrix}\right) = \left(\begin{matrix}b \\a \end{matrix}\right), G_1 =\left\{ \left(\begin{matrix}ac \\ ca \end{matrix}\right)\right\}, \left(\begin{matrix}\alpha_1 \\\beta_1 \end{matrix}\right) = \left(\begin{matrix}ab \\ b \end{matrix}\right), G_2 =\left\{ \left(\begin{matrix}bab \\ bab \end{matrix}\right)\right\}, \left(\begin{matrix}\alpha_2 \\\beta_2 \end{matrix}\right) = \left(\begin{matrix}\epsilon \\ b \end{matrix}\right).\] The redux of \(M\) is \((\alpha_0\alpha_1\alpha_2,\beta_0\beta_1\beta_2) = (bab,abb)\). The set \(M\) has two singleton reduxes, \[M_1 = \left(\begin{matrix}\alpha_0 \\ \beta_0 \end{matrix}\right) G_1^*\left(\begin{matrix}\alpha_1\alpha_2 \\\beta_1\beta_2 \end{matrix}\right) = \left(\begin{matrix}b \\a \end{matrix}\right){\left(\begin{matrix}ac \\ ca \end{matrix}\right)}^*\left(\begin{matrix}ab \\bb \end{matrix}\right)\]
and, \[M_2 = \left(\begin{matrix}\alpha_0\alpha_1 \\ \beta_0\beta_1 \end{matrix}\right) G_2^*\left(\begin{matrix}\alpha_2 \\ \beta_2 \end{matrix}\right) = \left(\begin{matrix}bab \\ab \end{matrix}\right){\left(\begin{matrix}bab \\ bab \end{matrix}\right)}^*\left(\begin{matrix}\epsilon \\b \end{matrix}\right) .\]
The set \(G_1 \cup \{(\alpha_1\alpha_2\alpha_0,\beta_1\beta_2\beta_0)\} = \{(ac,ca)\} \cup \{(abb,bba)\} = \{(ac,ca), (abb,bba)\}\) has a unique common inner witness, say \(z_1 = a = (ac)^*a \cap (abb)^*a\) and no common outer witness since \((ca)^*c \cap (bba)^*bb = \emptyset\). By 8 [Thm7:1], the unique common inner witness of the singleton redux \(M_1\) of \(M\) is \([\alpha_0z_1,\beta_0]_R = [ba,a]_R = b\).
The set \(G_2 \cup \{(\alpha_2\alpha_0\alpha_1,\beta_2\beta_0\beta_1)\} = \{(bab,bab)\}\) has infinitely many common witnesses. Thus the singleton redux \(M_2\) is a subset of powers of the primitive root of the redux using 8 [Thm7:3], i.e., \(M_2 = (bab,abb)^+\). Thus \(M_2\) have infinitely many common inner witnesses \((bab)^*b\) and common outer witnesses \((abb)^*ab\).
By 9, \(M\) has a unique common inner witness \(b \cap (bab)^*b = b\), that equals to the intersection of the common inner witness of its singleton reduxes \(M_1\) and \(M_2\).
The proof of the common witness theorems of singleton redux as well as the monoid closure are given in 5. Finally, using those results we prove the conjugacy theorem for monoid closure (7) in 6
In this section, we prove the direction \((1) \Rightarrow(4)\) of 6 recalled in the following lemma.
Lemma 4. For a set of pairs \(G\), if \(G^*\) is conjugate then \(R(G)\) has a common witness.
We prove the lemma when \(G\) is finite by case analysis and then extend it for a countably infinite set of pairs using a compactness argument. Towards proving this, we need the following auxiliary result proven using . A corollary of the proposition below is that if \(G^*\) is conjugate and \(R(G)\) only consists of pairs of identical length, then \(R(G)\) has a common witness.
Let \(G = \{(u_i,v_i) \mid i \in \{1, \ldots, k\}\}\) be a set of \(k \geq 2\) conjugate pairs such that all pairs in \(R(G)\) are of equal length. If \((u_1,v_1)^*(u_2,v_2)^* \cdots (u_k,v_k)^*\) is conjugate then either \(x_1 = x_2 = \cdots = x_k\) or \(y_1 = y_2 = \cdots = y_k\) where \((x_i,y_i)\) is a cut of the primitive pair \((\rho_{u_i},\rho_{v_i})\) for \(i \in [k]\).
Proof. Proof is by induction on the number of pairs in \(R(G)\).
When \(R(G)\) has only 2 pairs, i.e., let \(R(G) = \{(\rho_{u_1},\rho_{v_1}),(\rho_{u_2},\rho_{v_2})\}\). There exist \(\ell_1,\ell_2\) such that \(\ell_2 > \ell_1 + 2, \ell_1 > 2\) and \((\rho_{u_1},\rho_{v_1})^{l_1} (\rho_{u_2},\rho_{v_2})^{l_2} \in (u_1,v_1)^*(u_2,v_2)^*\) and hence it is conjugate. From we get either \(x_1 = x_2\) or \(y_1 = y_2\).
We also consider the case when \(R(G)\) has exactly 3 pairs, i.e., let \(R(G) = \{(\rho_{u_1},\rho_{v_1}),(\rho_{u_2},\rho_{v_2}), (\rho_{u_3},\rho_{v_3})\}\). For \(i,j\in [3]\), there exists set of pairs \(\{(\rho_{u_i},\rho_{v_i})^{\ell_i}(\rho_{u_{j}},\rho_{v_{j}})^{\ell_{j}} \mid \ell_{j} > \ell_i + 2, \ell_i > 2 \} \subset (u_1,v_1)^*(u_2,v_3)^*(u_{3},v_{3})^*\) that is conjugate. Thus, the pairs \((\rho_{u_i},\rho_{v_i})\) and \((\rho_{u_{j}},\rho_{v_{j}})\) satisfy either \(x_i = x_{j}\) or \(y_i = y_{j}\) by where \((x_i,y_i)\) and \((x_j,y_j)\) are cuts of \((\rho_{u_1},\rho_{v_1})\) \((\rho_{u_j},\rho_{v_j})\) respectively. There are 3 cases.
All pairs in \(R(G)\) are identical. Then there exists cuts \((x_i,y_i)\) for each pair \((\rho_{u_i},\rho_{v_j}) \in R(G)\) for \(i \in [3]\) such that \(x_1 = x_2=x_3 = \varepsilon\). Hence, the proposition holds.
Exactly one pair in \(R(G)\) is identical. Let \((\rho_{u_1},\rho_{v_1})\) and \((\rho_{u_2},\rho_{v_2})\) are distinct pairs with unique nonempty cuts \((x_1,y_1)\) and \((x_2,y_2)\) respectively. By 3, either \(x_1=x_2\) or \(y_1=y_2\). Assume that \(x_1=x_2\) Also, since \((\rho_{u_3},\rho_{v_3})\) is identical pair, either \(\rho_{u_3}=x_i\) or \(\rho_{u_3}=y_i\) for \(i\in [1,2]\). If there exists an \(i \in [1,2]\) such that \(\rho_{u_3}=x_i\), then \(x_1=x_2 = \rho_{u_3} = x_3\) where \((x_3,y_3) = (\rho_{u_3},\varepsilon)\) is a cut of \((\rho_{u_3},\rho_{v_3})\). Suppose for all \(i \in [1,2]\), \(\rho_{u_3}=y_i\), then \(y_1=y_2 = \rho_{u_3} = y_3\) where \((x_3,y_3) = (\varepsilon,\rho_{u_3})\) is a cut of \((\rho_{u_3},\rho_{v_3})\). Hence, the proposition holds.
Exactly one pair in \(R(G)\) is non-identical. WLOG assume that \((\rho_{u_1},\rho_{v_1})\) and \((\rho_{u_3},\rho_{v_3})\) are the identical pairs, \((\rho_{u_2},\rho_{v_2})\) is non-identical with unique nonempty cut \((x_2,y_2)\).
Claim 1. \(\rho_{u_1}=\rho_{u_3}\).
Proof. Consider the pair \((u,v)=(u_1,v_1)^j(u_2,v_2)^{l}(u_3,v_3)^j\) where \(j\) and \(l\) are set such that \(|u_2^l| > 4 \cdot |u_1^j| = 4 \cdot |u_3^j|\). Substituting with their primitive roots, we get \[\begin{align} u &= \overbrace{u_1 \cdots u_1}^{B_1}\overbrace{u_2 \cdots u_2}^{B_2}\overbrace{u_3 \cdots u_3}^{B_3} = \rho_{u_1} \cdots \rho_{u_1}x_2y_2 \cdots x_2y_2 \cdots x_2y_2\rho_{u_3} \cdots \rho_{u_3}\\ v &= v_1 \cdots v_1v_2 \cdots v_2v_3 \cdots v_3 =\rho_{u_1} \cdots \rho_{u_1}y_2x_2 \cdots y_2x_2 \cdots y_2x_2\rho_{u_3} \cdots \rho_{u_3} \end{align}\] Let \(B_1,B_2,B_3\) denote the block of \(u_1\)’s, \(u_2\)’s and \(u_3\)’s. Similarly, \(B_1',B_2',B_3'\) denote the block of \(v_1\)’s, \(v_2\)’s and \(v_3\)’s. Since \((u,v)\) is conjuagte, it has a cut \((p,q)\). We do a case analysis on \(p\).
\(p\) ends within \(B_1(\rho_{u_1})^{-1}\). In this case, \(p\in \rho_{u_1}^*\) by Case [same] of since there exist atleast a factor \(\rho_{u_1}\) of \(q\) in \(u\) to match with the prefix \(\rho_{u_1}\) of \(q\) in \(v\). On further matching \(q\) in \(u\) and \(v\), since \(|\rho_{u_1}|=|x_2y_2| = |y_2x_2| = |\rho_{u_3}|\), we get \(\rho_{u_1}=x_2y_2 = y_2x_2 = \rho_{u_3}\).
\(p\) ends after block \(B_2\rho_{u_3}\). This case is symmetric to the above case, where we get \(q \in \rho_{u_3}^*\) by Case [same] of . On further matching \(p\) in \(u\) and \(v\), since \(|\rho_{u_3}|=|x_2y_2| = |y_2x_2| = |\rho_{u_1}|\), we get \(\rho_{u_3}=x_2y_2 = y_2x_2 = \rho_{u_1}\).
\(p\) ends within \(\rho_{u_1}B_2\rho_{u_3}\). WLOG assume that \(p\) ends within the first half of \(\rho_{u_1}B_2\rho_{u_3}\). Since \(|\rho_{u_1}B_2\rho_{u_3}|/2 > |B_2|/2 \geq 2. |u_1^j|\), on matching \(q\) in \(u\) and \(v\), the prefix \(u_1^j\) of \(v\) matches entirely with block \(B_2\) and there exist at least one factor of \(x_2y_2\) following that. Using , the prefix \(p (u_1^j)\) in \(u\) ends in \(x_2\). Since \(|\rho_{u_1}| = |x_2y_2| = |y_2x_2|\), we get \(\rho_{u_1} = y_2x_2 = x_2y_2\), and this contradicts that \((u_2,v_2)\) is a non-identical pair. Similarly, we get a contradiction when \(p\) ends withing second half of \(\rho_{u_1}B_2\rho_{u_3}\).
◻
Thus, we get \(\rho_{u_1}=\rho_{u_3}\) when exactly one pair in \(R(G)\) is non-identical. Since \((x_2,y_2)\) is the unique nonempty cut of \((u_2,v_2)\), by 3, either \(x_2=\rho_{u_1} = \rho_{u_3}\) or \(y_2 = \rho_{u_1}= \rho_{u_3}\). In either case the proposition holds.
Assume that the statement holds for \(k\) pairs in \(R(G)\), i.e., let \[R(G)= \{(\rho_{u_1},\rho_{v_1}), \ldots, (\rho_{u_k},\rho_{v_k})\}.\] By the induction hypothesis, if \((u_1,v_1)^* \cdots (u_k,v_k)^*\) is conjugate, then either \(x_1=\cdots=x_k \quad \text{or} \quad y_1=\cdots=y_k\). Without loss of generality assume that \(x_1=\cdots=x_k\). We prove that the statement also holds for \(k+1\) pairs.
Let \(G' \supseteq G\) such that \(R(G')=R(G)\cup \{(\rho_{u_{k+1}},\rho_{v_{k+1}})\},\) where \((\rho_{u_{k+1}},\rho_{v_{k+1}})\) is the conjugate primitive root of \((u_{k+1},v_{k+1})\in G'\) and has the same length as the pairs in \(R(G)\). Assume that \((u_1,v_1)^*\cdots (u_k,v_k)^*(u_{k+1},v_{k+1})^*\) is conjugate. Then for every \(i\in[k]\) there exists a set of pairs \[\{(\rho_{u_i},\rho_{v_i})^{\ell_i}(\rho_{u_{k+1}},\rho_{v_{k+1}})^{\ell_{k+1}} \mid \ell_{k+1}>\ell_i+2,\;\ell_i>2 \} \subseteq (u_1,v_1)^*\cdots (u_k,v_k)^*(u_{k+1},v_{k+1})^*\] that is conjugate. Hence, by , for every \(i\in[k]\) the pairs \((\rho_{u_i},\rho_{v_i})\) and \((\rho_{u_{k+1}},\rho_{v_{k+1}})\) satisfy either \[x_i=x_{k+1} \quad\text{or}\quad y_i=y_{k+1},\] where \((x_i,y_i)\) and \((x_{k+1},y_{k+1})\) are cuts of \((\rho_{u_i},\rho_{v_i})\) and \((\rho_{u_{k+1}},\rho_{v_{k+1}})\) respectively.
We partition \(R(G)\) into two sets: \(I=\{(\rho,\rho')\inR(G)\mid \rho=\rho'\}\) containing all identical pairs, and \(J=R(G)\setminus I\) containing all non-identical pairs. We distinguish the following cases.
If \(J=\emptyset\), then all pairs in \(R(G)\) are identical. Hence there exist cuts \((x_i,y_i)\) such that \[x_1=\cdots=x_k=\varepsilon .\] If \((\rho_{u_{k+1}},\rho_{v_{k+1}})\) is also identical, we can take \(x_{k+1}=\varepsilon\) and the statement follows.
If \((\rho_{u_{k+1}},\rho_{v_{k+1}})\) is non-identical, it has a unique nonempty cut \((x_{k+1},y_{k+1})\). By 3 together with 1, for all \(i,j\in[k]\) either \[x_{k+1}=\rho_{u_i}=\rho_{u_j} \quad\text{or}\quad y_{k+1}=\rho_{u_i}=\rho_{u_j}.\] Thus \[\rho_{u_1}=\cdots=\rho_{u_k}=x_{k+1} \quad\text{or}\quad \rho_{u_1}=\cdots=\rho_{u_k}=y_{k+1},\] and the proposition holds.
Suppose \(J\neq\emptyset\).
If \(I=\emptyset\), then every pair in \(R(G)\) is non-identical and has a unique nonempty cut \((x_i,y_i)\) for \(i\in[k]\). If \((\rho_{u_{k+1}},\rho_{v_{k+1}})\) is also non-identical with unique cut \((x_{k+1},y_{k+1})\), then by 3 either \(x_i=x_{k+1}\) for some \(i\in[k]\) or \(y_i=y_{k+1}\) for all \(i\in[k]\). In the former case we obtain \(x_1=\cdots=x_k=x_{k+1}\) by the induction hypothesis, and in the latter case \(y_1=\cdots=y_k=y_{k+1}\).
If \((\rho_{u_{k+1}},\rho_{v_{k+1}})\) is identical, then 3 implies that either \(x_i=\rho_{u_{k+1}}\) for some \(i\in[k]\) or \(y_i=\rho_{u_{k+1}}\) for all \(i\in[k]\). Using the induction hypothesis we again obtain the desired equality.
Suppose both \(I\) and \(J\) are nonempty. Without loss of generality let \[I=\{(\rho_{u_1},\rho_{v_1}),\ldots,(\rho_{u_{j-1}},\rho_{v_{j-1}})\} \text{ and }\] \[J=\{(\rho_{u_j},\rho_{v_j}),\ldots,(\rho_{u_k},\rho_{v_k})\}\] for some \(1<j\le k\). Each pair in \(J\) is non-identical and hence has a unique nonempty cut.
By the induction hypothesis we obtain \[\label{eq:IJ} \rho_{u_1}=\cdots=\rho_{u_{j-1}}=x_j=\cdots=x_k .\tag{4}\]
If \((\rho_{u_{k+1}},\rho_{v_{k+1}})\) is non-identical with cut \((x_{k+1},y_{k+1})\), then applying the base case for three pairs yields either \[\rho_{u_1}=x_i=x_{k+1} \quad\text{for some } i\in\{j,\ldots,k\}, \text{ or}\] \[\rho_{u_1}=y_i=y_{k+1} \quad\text{for all } i\in\{j,\ldots,k\}.\] Using 4 we obtain the desired equality of all \(x\)’s or all \(y\)’s.
If \((\rho_{u_{k+1}},\rho_{v_{k+1}})\) is identical, then 3 implies that either \(x_i=\rho_{u_{k+1}}\) for some \(i\in\{j,\ldots,k\}\) or \(y_i=\rho_{u_{k+1}}\) for all such \(i\). Combining this with 4 and 1 again yields the required equality.
◻
The common witness theorem for a finite set is a straightforward corollary of the below lemma.
Lemma 5. Let \(G = \{(u_i,v_i) \mid 1\leq i \leq k\}\) be a finite set of \(k \in \mathbb{N}\) pairs. If the set \((u_1,v_1)^*(u_2,v_2)^* \cdots (u_k,v_k)^*\) is conjugate then \(R(G)\) as well \(G\) has a common witness.
Proof. When \(k= 1\), \(G\) has only one pair \((u,v)\) and by assumption it is conjugate. By 1, \((u,v)\) has a witness. From [samewitness], we obtain that the witnesses of \(R(G) = \{(\rho_{u},\rho_{v})\}\) are same as that of \((u,v)\).
Next we assume that \(k >1\). Let \(\approx\) be the equivalence relation on \(G\) whereby \((u,v) \approx (u^\prime,v^\prime)\) if \(\rho_{u} \sim \rho_{u^\prime}\), i.e., the primitive roots of the pairs are conjugates. Assume that \(\approx\) has \(d\) equivalence classes. Clearly \(1 \leq d \leq k\). We do a cases analysis on whether \(d=1\) or otherwise.
If \(\approx\) has only one equivalence class, then the primitive roots of all the pairs in \(G\) are conjugates. Consequently, their lengths are identical. Since \((u_1,v_1)^* \cdots (u_k,v_k)^*\) is conjugate and all the pairs in \(R(G)\) have identical lengths, by [eqlengthprimitivescorr], \(R(G)\) has a common witness.
Now we assume that \(d > 1\). Choose \(d\) pairs \((u_1, v_1), (u_2, v_2), \ldots, (u_d, v_d)\) from each equivalence class. We construct a pair \((u,v) \in (u_1,v_1)^*(u_2,v_2)^* \cdots (u_d,v_d)^* \subseteq (u_1,v_1)^* \cdots (u_k,v_k)^*\) and show that \((u,v)\) is conjugate only if \(R(G)\) has a common witness.
Let \(m\) be the least common multiple of \(|u_1|, \ldots, |u_d|\). Let \(\ell_{ij} = |u_i| + |u_j| - \mathit{gcd}(|u_i|,|u_j|) > 0\) for \(1 \leq i,j \leq d\) and \(i \neq j\). Let \(\ell = \max \;\{\ell_{ij} \mid 1 \leq i,j \leq d, i \neq j\}\). Let \(N\) be a multiple of \(m\) that is \(> 2\ell\).
Let \((u,v) = (u_1,v_1)^{j_1}(u_2,v_2)^{j_2} \cdots (u_d,v_d)^{j_d}\) such that \(j_1, \ldots, j_d > 2\) and \(|u_i^{j_i}| = N\) for each \(1 \leq i \leq d\). \[\begin{align} u &= \overbrace{u_1 \cdots u_1}^{N}\overbrace{u_2 \cdots u_2}^{N} \cdots \overbrace{u_d \cdots u_d}^{N}\\ v &= v_1 \cdots v_1\,v_2 \cdots v_2\, \cdots v_d \cdots v_d \end{align}\]
Since \((u,v)\) is conjugate, it has a cut, say \((p,q)\). Substituting each pair in \((u,v)\) with their primitive roots, we get \[\begin{align} u &= \rho_{u_1} \cdots \rho_{u_1}\rho_{u_2} \cdots \rho_{u_2} \cdots \rho_{u_d} \cdots \rho_{u_d} = pq\\ v &= \rho_{v_1} \cdots \rho_{v_1}\rho_{v_2} \cdots \rho_{v_2} \cdots \rho_{v_d} \cdots \rho_{v_d} = qp \end{align}\] Let \((x_i,y_i)\) be a cut of \((\rho_{u_i},\rho_{v_i})\) for \(1 \leq i \leq d\).
Let \(B_1, B_2, \ldots, B_d\) represent the blocks in \(u\), and let \(B_1^\prime, B_2^\prime, \ldots, B_d^\prime\) represent the blocks in \(v\).
The cut in \(u\) can be either within the first block \(B_1\), or the last block \(B_d\), or anywhere between the first and the last blocks in \(u\). We do a case analysis on all the possible cuts \((p,q)\) of \((u,v)\) and show that there exists a common witness of \(R(G)\) in each of the cases. We can assume that both \(p\) and \(q\) are nonempty. When either \(p\) or \(q\) is empty, then all pairs \((u_i,v_i)\) in \((u,v)\) are identical, and hence either \(x_1 = \cdots = x_d = \varepsilon\) or \(y_1 = \cdots =y_d= \varepsilon\).
We make a further case analysis depending upon if the cut is within the first half or the second half of the first block.
Suppose the cut in \(u\) is within the first half of the block, i.e., \(p\) is of length at most \(N/2\). In this case, since the length of each block are equal, the cut in \(v\) is within the second half of the last block \(B_d^\prime\), i.e., \(p\) is a suffix of \(v\) of length at most \(N/2\). \[\begin{align} u &= \overbrace{\rho_{u_1} \cdots}^{p}\overbrace{\cdots \rho_{u_1}\rho_{u_2} \cdots \rho_{u_2} \cdots \rho_{u_d} \cdots \rho_{u_d}}^{q}\\ v &= \underbrace{\rho_{v_1} \cdots \cdots \rho_{v_1}\rho_{v_2} \cdots \rho_{v_2} \cdots \rho_{v_d} \cdots}_{q} \underbrace{\cdots \rho_{v_d}}_{p} \end{align}\] We obtain \(q = p^{-1}(B_1B_2 \cdots B_d) = (B_1^\prime B_2^\prime \cdots B_d^\prime)p^{-1} \;.\)
Claim 2. The following holds for each \(1 \leq i \leq d\).
\(B_i\) is of the form \(pq_i\) and \(B_i^\prime\) is of the form \(q_ip\), and
\(p\) is of the form \((x_iy_i)^{m_i}x_i\) and \(q_i\) is of the form \((y_ix_i)^{m_i}y_i\) for some \(m_i \geq 0\).
Proof. Proof is by induction on \(i\).
Base Case: when \(i=1\). We compare the prefixes of \(q\) in \(u\) and \(v\). Since \(|p| \leq N/2\), the prefix of \(q\) in \(u\) must begin within the first block \(B_1\). Also, there must be at least one occurrence of the factor \(\rho_{u_1} = x_1y_1\) following the cut. Since \(q\) in \(v\) starts with \(\rho_{v_1} = y_1x_1\), the cut should be at the end of \(x_1\) by Case [distinct] of . Note that by Case [same] of , the cut can end after \(y_1\) but then \(\rho_{u_1}=x_1y_1=y_1x_1 = \rho_{v_1}\) and hence either \(x_1 = \varepsilon\) or \(y_1 = \varepsilon\). Hence, in both case, we get \(p=(x_1y_1)^{m_1}x_1\) for some integer \(m_1 \geq 0\). Consequently, the prefix of \(q\) in the block \(B_1\), denoted as \(q_1\), is of the form \(y_1(x_1y_1)^{n_1}\), for some \(n_1 > 0\). After matching \(q_1\) in \(v\), we observe that a factor equal to \(p\) appears in the suffix of the block \(B_1^\prime\), as shown below. \[\begin{align} u &= \overbrace{(x_1y_1)^{m_1}x_1}^{p}\overbrace{y_1(x_1y_1)^{n_1}}^{q_1}\overbrace{\rho_{u_2} \cdots \rho_{u_2} \cdots \rho_{u_d} \cdots \rho_{u_d}}^{{q_1}^{-1}q}\\ v &= \underbrace{y_1(x_1y_1)^{n_1}}_{q_1}\underbrace{(x_1y_1)^{m_1}x_1}_{=p}\rho_{v_2} \cdots \rho_{v_2} \cdots \rho_{v_d} \cdots \rho_{v_d} = qp \end{align}\]
Inductive Case: Assume the claim is true for first \(i\) blocks where \(1 \leq i < k\). \[\begin{align} u &= \overbrace{(x_1y_1)^{m_1}x_1}^{p}\overbrace{y_1(x_1y_1)^{n_1}}^{q_1}\cdots \overbrace{(x_iy_i)^{m_i}x_i}^{p}\overbrace{y_i(x_iy_i)^{n_i}}^{q_i}\overbrace{\rho_{u_{i+1}} \cdots \rho_{u_{i+1}} \cdots \rho_{u_d} \cdots \rho_{u_d}}^{q^{\prime\prime} = (q_1p \cdots q_{i-1}pq_i)^{-1}q} = pq\\ v &= \underbrace{y_1(x_1y_1)^{n_1}}_{q_1}\underbrace{(x_1y_1)^{m_1}x_1}_{p}\cdots \underbrace{y_i(x_iy_i)^{n_i}}_{q_i}\underbrace{(x_iy_i)^{m_i}x_i}_{p}\rho_{v_{i+1}} \cdots \rho_{v_{i+1}} \cdots \rho_{v_d} \cdots \rho_{v_d} = qp \end{align}\] Let \(q^{\prime\prime}\) denote the remaining suffix of \(q\) in \(u\) after the \(i\)-th block \(B_i\). We obtain \(q^{\prime\prime} = (q_1p \cdots q_{i-1}pq_i)^{-1}q\). By comparing the prefixes of \(q^{\prime\prime}\) in \(u\) and \(v\), we get that the suffix of the block \(B_i^\prime\) in \(v\), that is equal to \(p\), matches within the first half of the block \(B_{i+1}\) in \(u\) since \(|p| < N/2\). Moreover, the matching should end at \(x_{i+1}\) by Case [distinct] of . Note that by Case [same] of , the matching can end after \(y_{i+1}\) but then \(\rho_{v_{i+1}}=y_{i+1}x_{i+1}=x_{i+1}y_{i+1} = \rho_{u_{i+1}}\) and hence either \(x_{i+1} = \varepsilon\) or \(y_{i+1} = \varepsilon\). Hence, \(p = (x_{i+1}y_{i+1})^{m_{i+1}}x_{i+1}\) for some integer \(m_{i+1} \geq 0\). Consequently, the remaining suffix of the block \(B_{i+1}\), denoted by \(q_{i+1}\), is of the form \((y_{i+1}x_{i+1})^{n_{i+1}}y_{i+1}\) for some integer \(n_{i+1} > 0\). After matching \(q_{i+1}\) in \(B_{i+1}^\prime\), we observe that a factor equal to \(p\) appears in the suffix of the block \(B_{i+1}^\prime\). Hence, \(B_{i+1} = pq_{i+1}\) and \(B_{i+1}^\prime = q_{i+1}p\).
◻
From the above claim, it follows that \(q = q_1pq_2p \cdots pq_d\) and \[p = (x_1y_1)^{m_1}x_1 = (x_2y_2)^{m_2}x_2 = \cdots = (x_dy_d)^{m_d}x_d\] for \(m_1, \ldots, m_d \geq 0\).
From 3, the above equation holds for any two pairs between the equivalence classes. By [cwpattern], we obtain \(p\) is a common inner witness of \(R(G)\).
Next we assume the cut in \(u\) is in the second half of \(B_1\). We compare the prefixes of \(q\) in \(u\) and \(v\) and deduce that there exist a common factor of length at least \(N/2 > \ell > \ell_{12}\) between block \(B_1^\prime\) and block \(B_2\). From 5, \(\rho_{v_1}\) is conjugate to \(\rho_{u_{2}}\), that is in turn is conjugate to \(\rho_{v_{2}}\). From transitivity of conjugacy, \(\rho_{v_1}\) is conjugate to \(\rho_{v_2}\), which contradicts the fact that \((u_1,v_1)\) and \((u_2,v_2)\) belong to different equivalence classes. Hence cut in second half of \(B_1\) is not possible.
We make a further case analysis depending upon if the cut in \(u\) is in the first half or second half of the last block \(B_d\). The proof is symmetric to that of the previous case. In particular, when the cut is in the second half of the last block, \[q = (y_1x_1)^{m_1}y_1 = (y_2x_2)^{m_2}y_2 = \cdots = (y_dx_d)^{m_d}y_d \;.\] By 3 and [cwpattern], \(q\) is a common outer witness of \(R(G)\).
WLOG, assume that the cut in \(u\) is within the first half of the block \(B_j\). In this case the cut in \(v\) will be within the second half of the block \(B_{d-j+1}\). \[\begin{align} u &= \overbrace{\rho_{u_1} \cdots \rho_{u_1} \cdots \rho_{u_j} \cdots}^{p}\overbrace{\cdots \rho_{u_j} \cdots \cdots \cdots \cdots \rho_{u_d} \cdots \rho_{u_d}}^{q}\\ v &= \underbrace{\rho_{v_1} \cdots \rho_{v_1} \cdots \cdots \cdots \rho_{v_{d-j+1}} \cdots}_{q}\underbrace{\cdots \rho_{v_{d-j+1}} \cdots \rho_{u_d} \cdots \rho_{u_d}}_{p} \end{align}\] By matching \(q\) in \(u\) and \(v\), we get \(\rho_{v_1}\) and \(\rho_{u_j}\) shares a common factor of length at least \(N/2 > \ell > \ell_{1j}\) and hence they are conjugates to each other by 5. Since \(\rho_{u_j}\) is conjugate to \(\rho_{v_j}\), by transitivity of conjugacy we obtain \(\rho_{v_1}\) and \(\rho_{v_j}\) are conjugates. This contradicts the fact that \((u_1,v_1)\) and \((u_j,v_j)\) belongs to different equivalence classes. Hence cut in \(B_j\) where \(1 < j < d\) is not possible.
Claim 3. Let \((u_i,v_i)\) and \((u_j,v_j)\) be two pairs in different equivalence class where \(i,j \in [d]\). Let \((x_i,y_i)\) and \((x_j,y_j)\) be a cut of the primitive root of \((u_i,v_i)\) and \((u_j,v_j)\) respecively. The following holds.
If \((x_iy_i)^{m_i}x_i = (x_jy_j)^{m_j}x_j\), then for any pair \((u_{j'},v_{j'})\) that belongs to the same equivalence class as \((u_j,v_j)\), \((x_iy_i)^{m_i}x_i = (x_{j'}y_{j'})^{m_j}x_{j'}\) with \((x_{j'},y_{j'})\) being a cut of the primitive root of \((u_{j'},v_{j'})\).
If \((y_ix_i)^{m_i}y_i = (y_jx_j)^{m_j}y_j\), then for any pair \((u_{j'},v_{j'})\) that belongs to the same equivalence class as \((u_j,v_j)\), \((y_ix_i)^{m_i}y_i = (y_{j'}x_{j'})^{m_j}y_{j'}\) with \((x_{j'},y_{j'})\) being a cut of the primitive root of \((u_{j'},v_{j'})\).
Proof. We prove Item 1. The proof of Item 2 is symmetric.
For contradiction, assume that \((x_iy_i)^{m_i}x_i = (x_jy_j)^{m_j}x_j \neq (x_{j'}y_{j'})^{m_j}x_{j'}\). Construct a pair \((\bar{u},\bar{v})\) similar to \((u,v)\) by keeping only the pairs \((u_i,v_i), (u_j,v_j)\) and \((u_{j'},v_{j'})\) such that the total length of each pairs are equal to \(N\). WLOG, assume, \(i < j < j'\) \[\bar{u} = \overbrace{u_{i} \cdots u_{i}}^{N} \overbrace{u_{j} \cdots u_{j}}^{N} \overbrace{u_{j'} \cdots u_{j'}}^{N}\] \[\bar{v} = v_{i} \cdots v_{i} v_{j} \cdots v_{j} v_{j'} \cdots v_{j'}\]
Since \((\bar{u},\bar{v}) \subseteq (u_1,v_1)^* \cdots (u_k,v_k)^*\), it is conjugate with a cut. After doing a case analysis on the cut, we get three possible cases.
There exist integers \(n_{i}, n_{j}, n_{j'} \geq 0\) such that \((x_{i}y_{i})^{n_{i}}x_{i} = (x_{j}y_{j})^{n_{j}}x_{j} = (x_{j'}y_{j'})^{n_{j'}}x_{j'}\) .
Both \(n_{i} = m_i\) and \(n_{j} = m_j\). Otherwise if either \(n_{i} \neq m_i\) or \(n_{j} \neq m_j\), then the set of pairs \(\{(u_{i},v_{i}), (u_{j},v_{j})\}\) has more than one common witness. By [infmanycwcorr], they have infinitely many common witnessess and their primitive roots are the same. This condradicts that \((u_i,v_i)\) and \((u_j,v_j)\) are in different equivalence class. Since \((u_j,v_j)\) and \((u_{j'},v_{j'})\) belongs to the same equivalence class, \(|x_{j}y_{j}| = |x_{j'}y_{j'}|\). Hence , we get \(n_{j'} = n_j = m_j\). Thus, \((x_iy_i)^{m_i}x_i = (x_jy_j)^{m_j}x_j = (x_{j'}y_{j'})^{m_j}x_{j'}\)
There exist integers \(n_{i}, n_{j}, n_{j'} \geq 0\) such that \((y_{i}x_{i})^{n_{i}}y_{i} = (y_{j}x_{j})^{n_{j}}y_{j} = (y_{j'}x_{j'})^{n_{j'}}y_{j'}\)
Since \((x_{i}y_{i})^{m_i}x_{i} = (x_{j}y_{j})^{m_j}x_{j}\), we get there is more than one common witness for the set of pairs \(\{(u_{i},v_{i}), (u_{j},v_{j})\}\) and from [infmanycwcorr], we get they have infinitely many common witnesses. Thus the primitive roots are the same, and condradicts that \((u_i,v_i)\) and \((u_j,v_j)\) are in different equivalence class.
The block of \(u_{i}\)’s, \(u_{j}\)’s and \(u_{j'}\)’s share a common factor of length atleast at least \(N/2 \geq \ell\) and via 5, we get their primitive roots are conjugates to each other. This contradicts that \((u_i,v_i)\) and \((u_j,v_j)\) are in different equivalence class.
◻
Hence, for a finite set of pairs \(G\), \((u_1,v_1)^* \cdots (u_k,v_k)^*\) is conjugate only if \(R(G)\) has a common witness. By [samewitnessext], we also conclude that \(G\) has a common witness. ◻
Hence, we proved 4 for the finite case.
We now extend 4 from a finite set to an infinite set of pairs.
Lemma 6 (Compactness Theorem). Let \(G\) be an infinite set of pairs. If every finite subset of \(G\) has a common witness, then \(G\) has a common witness.
Proof. From [infmanycwcorr], if a set has a witness, it has exactly one common witness or infinitely many common witnesses. Given that every finite subset of \(G\) has a common witness, there are two possible cases: a finite subset of \(G\) with a unique witness exists, or every finite subset of \(G\) has infinitely many witnesses.
Assume that there exists a finite subset \(G_f\) of \(G\) with exactly one common witness, say \(z\). We claim that \(z\) is a common witness of \(G\) as well. By assumption, the finite set \(G_f \cup \{(u,v)\}\) has a common witness, for any pair \((u,v) \in G\). Moreover, the witness for this set must be \(z\); otherwise, it contradicts the uniqueness of the witness of \(G_f\). This implies that \(z\) is a witness for any pair in \(G\). Hence \(z\) is a common witness of \(G\).
Next we assume that every finite subset of \(G\) has infinitely many common witnesses. Take any pair \((u_i,v_i)\) and \((u_j,v_j)\) from \(G\). The set \(\{(u_i,v_i),(u_j,v_j)\}\) is a finite set with infinitely many witnesses by assumption. Therefore, from [infmanycwcorr], both \((u_i,v_i)\) and \((u_j,v_j)\) have the same primitive root. Since primitive roots are unique, the primitive root of every pair in \(G\) is the same. From [samewitness], the witnesses of the primitive root is same as that of the witnesses of each pair in \(G\). Hence, \(G\) has a common witness.
◻
The proof of 4 is a straightforward corollary of the . If \(G^*\) is conjugate, then the closure of every finite subset of \(G\) is also conjugate. Using 5, every finite subset of \(G\) has a common witness. Using , \(G\) has a common witness. From [samewitnessext], we conclude that \(R(G)\) has a common witness.
This concludes the proof of Common Witness Theorem (6).
In this section, we prove the equivalence between conjugacy and the presence of a common witness in sumfree sets. We begin by proving 8 for sumfree sets that contain only one Kleene star. Subsequently, we establish 9 that extends the result to general sumfree sets.
We prove 8 by showing \((1) \Rightarrow(2) \Rightarrow(3) \Rightarrow(1)\). In this subsection, we assume that the sumfree set has a nonempty redux as stated in 8. It is trivial that \((3) \Rightarrow(1)\).
Now we proceed to prove \((1) \Rightarrow(2)\), namely, if a sumfree set \(M =(\alpha_0,\beta_0)G^*(\alpha_1,\beta_1)\) is conjugate, then there exists a common witness of \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\). We first prove this direction when \(G\) is just a singleton set and later generalise it to any arbitrary set of pairs \(G\).
If a set \(M = (\alpha_0,\beta_0)(u,v)^*(\alpha_1,\beta_1)\) is conjugate then the set \(\{(u,v), (\alpha_1\alpha_0,\beta_1\beta_0)\}\) has a common witness.
Proof. Since \(M\) is conjugate, \((u,v)\) is also conjugate by 1. Consider the pair \((u^\prime,v^\prime) = (\alpha_0,\beta_0)(u,v)^{4n}(\alpha_1,\beta_1)\) where \(n|u| \geq 2 \cdot \textit{(length of the redux of M)}\). Let \((x,y)\) denote a cut of the primitive root of the conjugate pair \((u,v)\).
We now examine the possible cuts, say \((p,q)\), of \((u^\prime,v^\prime)\) and show that in each case, a common witness of \(\{(u,v), (\alpha_1\alpha_0,\beta_1\beta_0)\}\) exists.
Then \(p = \alpha_0^\prime\) is a prefix of \(\alpha_0\) and \(\alpha_0=\alpha_0^\prime\alpha_0^{\prime\prime}\) for some word \(\alpha_0^{\prime\prime}\). Substituting \((u,v)\) with powers of \((xy,yx)\), \[\begin{align} u^\prime &= \overbrace{\alpha_0^\prime}^{p}\overbrace{\alpha_0^{\prime\prime}xy\cdots xy \alpha_1}^{q}\\ v^\prime &= \beta_0 yx \cdots yx \beta_1 \end{align}\] Comparing prefixes of \(q\) in \(u^\prime\) and \(v^\prime\), we obtain three possible cases for \(\beta_0\).
\(\beta_0\) is a proper prefix of \(\alpha_0^{\prime\prime}\): After matching \(\beta_0\) with the prefix of \(q\) in \(u^\prime\), we find that the remaining suffix of \(\alpha_0^{\prime\prime}\) matches with the prefix of the block \(yx \cdots yx\) in \(v^\prime\). Since the total length of the block \(yx \cdots yx\) is greater than \(4|\alpha_0|\), it follows that \(\alpha_0^{\prime\prime}\) must end within the first half of the block. Furthermore, using Cases [cuta], [cutb], [cute] and [same] of , it should end after a \(y\) since there exists an \(xy\) after \(\alpha_0^{\prime\prime}\) in \(u^\prime\). Thus, we can express \(\alpha_0^{\prime\prime}\) as \[\alpha_0^{\prime\prime} = \beta_0 (yx)^m y \label{sing:eq1}\tag{5}\] for some integer \(m \geq 0\). Continuing to match \(q\) in \(u^\prime\) and \(v^\prime\), we obtain \[\begin{align} u^\prime &= \alpha_0^\prime\alpha_0^{\prime\prime}\overbrace{xy \cdots x}^{=}(yx)^{m}y{\alpha_1} = pq\\ v^\prime &= \underbrace{\beta_0 (yx)^{m}y}_{\alpha_0^{\prime\prime}}\underbrace{xy \cdots x}_{=}\beta_1 = qp = \alpha_0^{\prime\prime}\overbrace{xy \cdots x}^{=}(yx)^{m}y{\alpha_1} \alpha_0^\prime \label{singleton:eq1} \end{align}\tag{6}\] By equating the sets for \(v^\prime\) on both sides of 6 , we get \[\beta_1 = (yx)^{m}y\alpha_1\alpha_0^\prime \;. \label{sing:eq2}\tag{7}\] Concatenating 5 and 7 , we obtain \[(yx)^{m}y\alpha_1\alpha_0 =\beta_1\beta_0(yx)^{m}y \;.\] From 1, we get \((yx)^m y\) is a outer witness for \((\alpha_1\alpha_0, \beta_1\beta_0)\), and it is also a outer witness of \((u,v)\) using [samewitness]. Therefore, \((yx)^m y\) is a common outer witness of \(\{(u,v), (\alpha_1\alpha_0, \beta_1\beta_0)\}\).
The case when \(\beta_0 = \alpha_0^{\prime\prime}\): \[\begin{align} u^\prime &= \alpha_0^\prime\alpha_0^{\prime\prime}\overbrace{xy \cdots xy}^{=}{\alpha_1} = pq\\ v^\prime &= \underbrace{\beta_0}_{\alpha_0^{\prime\prime}}\underbrace{yx \cdots yx}_{=}\beta_1 = qp = \alpha_0^{\prime\prime}\overbrace{xy \cdots xy}^{=}{\alpha_1} \alpha_0^\prime \label{singleton:eq2} \end{align}\tag{8}\] Equating \(v^\prime\) on both sides of the 8 , we get that \(xy=yx\) and \[\beta_1 = {\alpha_1} \alpha_0^\prime \;. \label{sing:eq3}\tag{9}\] Appending the equation \(\beta_0 = \alpha_0^{\prime\prime}\) to 9 , we get \(\alpha_1\alpha_0 = \beta_1\beta_0\) . Hence \((\alpha_1\alpha_0,\beta_1\beta_0)\) is conjuagte with \(\varepsilon\) as a witness. Since \(xy=yx\), we can also deduce that \((u,v)\) is an identical pair with \(\varepsilon\) as a witness. Therefore, \(\varepsilon\) is a common witness of \(\{(u,v), (\alpha_1\alpha_0,\beta_1\beta_0)\}\).
\(\alpha_0^{\prime\prime}\) is a proper prefix of \(\beta_0\): Since the total length of block \(xy \cdots xy\) is at least 4\(|\beta_0|\), it follows that \(\beta_0\) must end within the first half of the block of \(xy\). Moreover, it should end after an \(x\) by Cases [cutc], [cutd], [cute] and [same] of since there is at least one \(yx\) after \(\beta_0\) in \(v^\prime\). Therefore, \[\beta_0 = \alpha_0^{\prime\prime}(xy)^{m}x \label{sing:4}\tag{10}\] for some integer \(m \geq 0\). Continuing with the analysis, we have: \[\begin{align} u^\prime &= \alpha_0^\prime\overbrace{\alpha_0^{\prime\prime}(xy)^{m}x}^{\beta_0}\overbrace{yx \cdots y}^{=}{\alpha_1} = pq\\ v^\prime &= \beta_0\underbrace{yx \cdots y}_{=}(xy)^{m}x\beta_1 = qp = \overbrace{\alpha_0^{\prime\prime}(xy)^{m}x}^{\beta_0}\overbrace{yx \cdots y}^{=}{\alpha_1} \alpha_0^\prime \label{singleton:eq3} \end{align}\tag{11}\] By equating the sets for \(v^\prime\) on both sides of 11 , we get \[(xy)^{m}x\beta_1 = {\alpha_1} \alpha_0^\prime \;. \label{sing:5}\tag{12}\] Concatenating 10 and 12 , we obtain \[\alpha_1\alpha_0(xy)^{m}x = (xy)^{m}x \beta_1\beta_0 \;.\] From 1, we get \((xy)^m x\) is an inner witness of \((\alpha_1\alpha_0,\beta_1\beta_0)\), and it is also an inner witness for \((u,v)\) using [samewitness]. Thus, \((xy)^m x\) is a common inner witness of \(\{(u,v), (\alpha_1\alpha_0,\beta_1\beta_0)\}\).
Then \(p\) ends within the block of \((u,v)\)’s. There are two cases based on whether the cut in \(u^\prime\) is within the first half or the second half of the block of \((u,v) \cdots (u,v)\).
When \(p\) ends within the first half of the block of \((u,v)\)’s: \[\begin{align} u^\prime &= \alpha_0 \overbrace{xy \cdots xy}^{\text{cut region}}\overbrace{xy\cdots xy}^{\geq 2n \text{ times}}\alpha_1 = pq\\ v^\prime &= \beta_0yx \cdots yxyx\cdots yx\beta_1 =qp \end{align}\] We compare the prefixes of \(q\) in \(u^\prime\) and \(v^\prime\). Since the length of the remaining half of the block of \(xy\)’s is still greater than \(2n|u| > 2 |\beta_0|\), it follows that \(\beta_0\) in \(v^\prime\) matches within the block of \(xy\)’s in \(u^\prime\) and there is at least one \(xy\) occurring after it. Moreover, it ends after an \(x\) by Cases [cutc], [cutd], [cute] and [same] of , as there is at least one \(yx\) in \(v^\prime\) after \(\beta_0\). Therefore, \[p\beta_0 = \alpha_0 (xy)^{m}x \label{sing:eq6}\tag{13}\] for some integer \(m \geq 0\). \[\begin{align} u^\prime &= \overbrace{\alpha_0(xy)^{m}x}^{p\beta_0}\overbrace{yx\cdots y}^{=}\alpha_1 = pq\\ v^\prime &= \beta_0\underbrace{yx \cdots y}_{=}(xy)^{m}x\beta_1 = qp = \beta_0\overbrace{yx\cdots y}^{=}\alpha_1p \label{singleton:eq4} \end{align}\tag{14}\] By equating the sets for \(v^\prime\) on both sides of 14 , we get \[\begin{align} (xy)^{m}x\beta_1 = \alpha_1p ~ & \Rightarrow~ (xy)^{m}x\beta_1\beta_0 = \alpha_1p\beta_0 &&\text{(Appending \beta_0)}\\ & \Rightarrow~ (xy)^{m}x\beta_1\beta_0 = \alpha_1\alpha_0(xy)^{m}x &&\text{(Substituting \Cref{sing:eq6})} \end{align}\]
Therefore we obtain, \[\alpha_1\alpha_0(xy)^{m}x = (xy)^{m}x\beta_1\beta_0 \;.\] From 1, \((xy)^m x\) is an inner witness of \((\alpha_1\alpha_0,\beta_1\beta_0)\), and it is also an inner witness for \((u,v)\) using [samewitness]. Therefore, \((xy)^m x\) is a common inner witness of \(\{(u,v), (\alpha_1\alpha_0,\beta_1\beta_0)\}\).
When \(p\) ends within the second half of the block of \((u,v)\)’s: \[\begin{align} u^\prime &= \alpha_0 \overbrace{xy \cdots xy}^{\geq 2n \text{ times}}\overbrace{xy\cdots xy}^{\text{cut region}}\alpha_1 = pq\\ v^\prime &= \beta_0yx \cdots yxyx\cdots yx\beta_1 = qp \end{align}\] We compare the suffixes of \(p\) in \(u^\prime\) and \(v^\prime\). Since the suffix of \(p\) within the block \(xy\) is still greater than \(2n|u| > 2 |\beta_1|\), it follows that the suffix \(\beta_1\) in \(v^\prime\) matches within the block of \(xy\)’s in \(u^\prime\) and there is at least one \(xy\) occurring before it. Moreover, it starts with a \(y\) by Cases [cutc], [cutd], [cute] and [same] of since there is at least one \(yx\) before \(\beta_1\). Hence, \[\beta_1q = (yx)^{m}y\alpha_1 \label{sing:eq8}\tag{15}\] for some integer \(m \geq 0\). \[\begin{align} u^\prime &= \alpha_0\overbrace{xy\cdots x}^{=}\overbrace{(yx)^{m}y\alpha_1}^{\beta_1q} = pq\\ v^\prime &= \beta_0(yx)^{m}y\underbrace{xy \cdots x}_{=}\beta_1 = qp = q\alpha_0\overbrace{xy\cdots x}^{=}\beta_1 \label{singleton:eq5} \end{align}\tag{16}\] By equating \(v^\prime\) on both sides of the 16 , we get \[\begin{align} \beta_0(yx)^{m}y = q\alpha_0 ~ & \Rightarrow~ \beta_1\beta_0(yx)^{m}y = \beta_1q\alpha_0 &&\text{(Concatenating \beta_1 on the left side)}\\ & \Rightarrow~ \beta_1\beta_0(yx)^{m}y = (yx)^{m}y\alpha_1\alpha_0 &&\text{(Substituting \Cref{sing:eq8})} \end{align}\] Therefore, we obtain \[(yx)^{m}y\alpha_1\alpha_0 =\beta_1\beta_0(yx)^{m}y \;.\] From 1, we get \((yx)^m y\) is an outer witness of \((\alpha_1\alpha_0,\beta_1\beta_0)\), and it is also an outer witness for \((u,v)\) using [samewitness]. Therefore, \((yx)^{m}y\) is a common outer witness of \(\{(u,v), (\alpha_1\alpha_0,\beta_1\beta_0)\}\).
Then \(q = \alpha_1^{\prime\prime}\) is a suffix of \(\alpha_1\) and \(\alpha_1=\alpha_1^\prime\alpha_1^{\prime\prime}\) for some word \(\alpha_1^\prime\). \[\begin{align} u^\prime &= \overbrace{\alpha_0xy\cdots xy \alpha_1^\prime}^{p}\overbrace{\alpha_1^{\prime\prime}}^{q}\\ v^\prime &= \beta_0 yx \cdots yx \beta_1 \end{align}\] This case is symmetric to Case 1, where the cut in \(u^\prime\) is within \(\alpha_0\).
Thus, the pair \((u',v') \in M\) is conjugate only if there exist a common witness for the set \(\{(u,v),(\alpha_1\alpha_0,\beta_1\beta_0)\}\). ◻
Now we extend the above proposition to an arbitrary set \(G\).
Lemma 7. If a set \(M= (\alpha_0,\beta_0)G^*(\alpha_1,\beta_1)\) is conjugate then one of the following is true:
\(|\mathcal{W}(G)|=\infty\) and \(R(G) \cup \{(\alpha_1\alpha_0, \beta_1\beta_0)\})\) has a common witness.
\(|\mathcal{W}(G)|=1\) and there exists a pair \((u,v) \in G\) such that \(W(G)=W(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\})=W(\{(u,v),(\alpha_1\alpha_0,\beta_1\beta_0)\}\).
Proof. Since \(M\) is conjugate, \(G^*\) is conjugate by 1. Further, \(G^*\) is conjugate iff \(G\) has a common witness by 6. The set \(G\) has two possibilities: it either has a unique common witness or infinitely many common witnesses using [infmanycwcorr].
Assume that \(G\) has infinitely many common witnesses. From [infmanycwcorr], each pair in \(G\) have the same primitive root, say \((\rho,\rho^\prime)\). The common witnesses of \(G\) are the same as that of the witnesses of \((\rho,\rho^\prime)\) using [samewitnessext]. Since \(M\) is conjugate, \((\alpha_0,\beta_0){(\rho^n,{\rho^\prime}^n)}^*(\alpha_1,\beta_1)\) is conjugate for some \(n \geq 1\). From [monomialcut], there exists a common witness of \(\{(\rho^n,{\rho^\prime}^n), (\alpha_1\alpha_0,\beta_1\beta_0)\}\). Furthermore, the witness of \((\rho,\rho^\prime)\) is the same as the witness of \((\rho^n,{\rho^\prime}^n)\) by [samewitness]. Therefore, we can conclude that there exists a common witness of \(\{(\rho,\rho^\prime),(\alpha_1\alpha_0,\beta_1\beta_0)\}\), and thus of \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\).
Next we assume that \(G\) has a unique common witness. WLOG, assume that \(G\) has a unique common inner witness \(z\). It suffices to show that \(z\) is an inner witness of \((\alpha_1\alpha_0,\beta_1\beta_0)\). Every pair in \(G^*\) has a common witness with \((\alpha_1\alpha_0,\beta_1\beta_0)\) using [monomialcut]. If there exists a pair \((u,v)\) in \(G^*\) such that \(\{(u,v), (\alpha_1\alpha_0,\beta_1\beta_0)\}\) has infinitely many common witnesses, then both \((u,v)\) and \((\alpha_1\alpha_0,\beta_1\beta_0)\) have the same primitive root by [infmanycwcorr]. Since \(z\) is an inner witness of \((u,v)\), \(z\) is an inner witness of its primitive root, and thus also an inner witness of \((\alpha_1\alpha_0,\beta_1\beta_0)\) using [samewitness]. Suppose instead that every pair in \(G^*\) has a unique common witness with \((\alpha_1\alpha_0,\beta_1\beta_0)\). Since \(G\) has a unique common inner witness \(z\), there exists two distinct pairs \((u,v)\) and \((u',v')\) of length greater than \(z\) such that \(z\) is the unique common inner witness for the set \(\{(u,v),(u',v')\}\). These pairs can be expressed as \((u,v) = (zr,rz)\) and \((u',v') = (zr',r'z)\), where \(r \neq r'\). Consider the following three pairs formed using \((u,v)\) and \((u',v')\): \[(u_1,v_1) = (u'uu,v'vv) = (zr'zrzr,r'zrzrz),\] \[(u_2,v_2) = (uu'u,vv'v) = (zrzr'zr,rzr'zrz),\] \[(u_3,v_3) = (uuu',vvv') = (zrzrzr',rzrzr'z).\] For \(1 \leq i,j \leq 3\) with \(i \neq j\), the following properties hold:
\(|(u_i,v_i)| = |(u_j,v_j)|\).
\(|(\rho_{u_i},\rho_{v_i})| = |(\rho_{u_j},\rho_{v_j})|\). Since \(u_i\) and \(u_j\) (resp. \(v_i\) and \(v_j\)) are conjugates, their primitive roots are conjugates, and hence are of equal length, i.e., \(|\rho_{u_i}| = |\rho_{u_j}|\) (resp. \(|\rho_{v_i}| = |\rho_{v_j}|\)).
\((u_i,v_i) \neq (u_j,v_j)\). Otherwise, if \(u_i= u_j\) (or \(v_i=v_j\)), it would follow that \(r'zr=rzr'\) (or, \(r'zrzr=rzrzr'\)), implying that \(r'\) is a outer witness of \((zr,rz) = (u,v)\). Since \(r'\) is also an outer witness of \((u',v') = (zr',r'z)\), it contradicts the assumption that \(z\) is a unique common witness of the set \(\{(u,v),(u',v')\}\). Hence, \(u_i\neq u_j\) and \(v_i \neq v_j\).
\((\rho_{u_i},\rho_{v_i}) \neq (\rho_{u_j},\rho_{v_j})\). Since \(u_i \neq u_j\) (resp. \(v_i \neq v_j\)) and \(|(\rho_{u_i}| = |\rho_{u_j}|\) (resp. \(|\rho_{v_i}| = |\rho_{v_j})|)\), we get that \(\rho_{u_i} \neq \rho_{u_j}\) (resp. \(\rho_{v_i} \neq \rho_{v_j})\).
Let \((x_i,y_i)\) be the cut of \((\rho_{u_i},\rho_{v_i})\) for \(1 \leq i \leq 3\). The set \(\{(u_1,v_1),(u_2,v_2), (u_3,v_3)\}\) has a unique common witness, otherwise their primitive roots will be same by [infmanycwcorr] which is a contradiction. Since \(z\) is an inner witness of each \((u_i,v_i)\) , \(z\) is the unique common inner witnesss of \(\{(u_1,v_1),(u_2,v_2), (u_3,v_3)\}\) , and thus of \(\{(\rho_{u_1},\rho_{v_1}), (\rho_{u_2},\rho_{v_2}), (\rho_{u_2},\rho_{v_2})\}\) by [samewitnessext]. Since \((u_1,v_1)^*(u_2,v_2)^*(u_3,v_3)^* \subset G^*\) is conjugate and \(|(\rho_{u_1},\rho_{v_1})| = |(\rho_{u_2},\rho_{v_2})| = |(\rho_{u_3},\rho_{v_3})|\), \(z=x_1 =x_2 = x_3\) using [eqlengthprimitivescorr].
By assumption, each pair \((u_i,v_i)\) has a unique common witness with \((\alpha_1\alpha_0,\beta_0\beta_1)\). Thus, at least two of these three pairs, say \((u_i,v_i)\) and \((u_j,v_j)\), either both have unique common inner witnesses with \((\alpha_1\alpha_0,\beta_1\beta_0)\), or both have unique common outer witnesses with \((\alpha_1\alpha_0,\beta_1\beta_0)\). Assume that the set \(\{(u_i,v_i),(\alpha_1\alpha_0,\beta_1\beta_0)\}\) and \(\{(u_j,v_j),(\alpha_1\alpha_0,\beta_1\beta_0)\}\) both has a unique common inner witness, say \(z_i\) and \(z_j\) respectively. Let \((\alpha,\beta)\) be the primitive root of \((\alpha_1\alpha_0,\beta_1\beta_0)\). There exists integers \(m_i,m_j,n_i,n_j \in \mathbb{N}\) such that \[z_i = (x_iy_i)^{m_i}x_i = (\alpha\beta)^{n_i}\alpha\] \[z_j = (x_jy_j)^{m_j}x_j = (\alpha\beta)^{n_j}\alpha\] Suppose both \(m_i, m_j \geq 1\), then \(x_iy_i\) and \(x_jy_j\) are both equal length prefixes of \((\alpha\beta)^*\alpha\), and hence \(x_iy_i = x_jy_j\), which contradicts that \(\rho_{u_i} \neq \rho_{u_j}\). Hence, we get that either \(m_i = 0\) or \(m_j = 0\). WLOG, assume that \(m_i=0\), i.e., \(x_i = (\alpha\beta)^{n_i}\alpha\) and since \(z = x_i = x_j\), we get \(z \in (\alpha\beta)^*\alpha\), and hence is an inner witness of \((\alpha_1\alpha_0,\beta_1\beta_0)\). Infact, \(z\) is the unique common inner witness of \((u_i,v_i)\) and \((\alpha_1\alpha_0,\beta_1\beta_0)\). Since \(z\) (the unique common inner witness of \(G\)) is also an inner witness of \((\alpha_1\alpha_0,\beta_1\beta_0)\), we get that \(z\) is a common inner witness of \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\).
The case where the set \(\{(u_i,v_i),(\alpha_1\alpha_0,\beta_1\beta_0)\}\) and \(\{(u_j,v_j),(\alpha_1\alpha_0,\beta_1\beta_0)\}\) both has a unique common outer witness is invalid and leads to a contradaction, since we get \(y_i\) and \(y_j\) are equal length prefixes of \((\beta\alpha)^*\beta\), and hence \(y_i = y_j\). This contradicts \(\rho_{u_i} \neq \rho_{u_j}\) since \(x_i = x_j\). ◻
The remaining direction to prove is \((2) \Rightarrow(3)\) in 8. This direction states that if there exists a common witness for both \(G\) and \((\alpha_1\alpha_0,\beta_1\beta_0)\) for a given set \(M = (\alpha_0,\beta_0)G^*(\alpha_1,\beta_1)\), then \(M\) has a common witness. It is a straightforward corollary of the below lemma.
Lemma 8. Let \(M = (\alpha_0,\beta_0)G^*(\alpha_1,\beta_1)\) be a sumfree set with nonempty redux. If there exists a common witness \(z'\) for \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\), then one of the following cases is true:
If \(z'\) is a unique common inner witness, then \(M\) has a unique common witness \(z = [\alpha_0z',{\beta_0}]_R = [\alpha_1,z'\beta_1]_L\). Moreover, if \(|\alpha_0z'| \geq |\beta_0|\) or equivalently \(|\alpha_1| \leq |z'\beta_1|\), then \(z\) is a common inner witness, otherwise it is a common outer witness.
If \(z'\) is a unique common outer witness, then \(M\) has a unique common witness \(z = [\alpha_0,\beta_0z']_R = [z'\alpha_1,\beta_1]_L\). Moreover, if \(|z'\alpha_1| \geq |\beta_1|\) or equivalently \(|\alpha_0| \leq |\beta_0z'|\), then \(z\) is a common outer witness, otherwise it is a common inner witness.
If \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) have infinitely many common witnesses, then \(M\) is a subset of powers of the primitive root of its redux. Thus, \(M\) has infinitely many witnesses.
Proof. There are two cases to consider depending upon if \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) has a common inner or outer witness.
The following equations hold: \[\begin{align} \alpha_1\alpha_0 z' &= z' \beta_1\beta_0 \label{g1monomialwitness:eq1}\\ u z' &= z' v \text{ ~for any pair } (u,v) \in G^* \end{align}\tag{17}\] We claim that \(z = [\alpha_0z',\beta_0]_R = [\alpha_1,z'\beta_1]_L\) is a common witness for \(M\). There are two cases depending upon whether \(\beta_0\) is a suffix of \(\alpha_0z'\) or vice-versa in 17 .
When \(\beta_0\) is a suffix of \(\alpha_0z'\) or equivalently, when \(\alpha_1\) is a prefix of \(z'\beta_1\). We get \(z = \alpha_0z' {\beta_0}^{-1}= \alpha_1^{-1}z'\beta_1\), or equivalently \(\alpha_0z' =z\beta_0\) and \(\alpha_1z = z'\beta_1\). We show that \(z\) is a common inner witness for \(M\).
For any \((u,v) \in G^*\), \[\begin{align} \alpha_0u\alpha_1 z &= \alpha_0uz'\beta_1 &&\text{(Substituting \alpha_1z = z'\beta_1)}\\ &=\alpha_0z'v\beta_1 &&\text{(z' is an inner witness of (u,v))}\\ &=z\beta_0v\beta_1 &&\text{(Substituting \alpha_0z' =z\beta_0)} \end{align}\]
When \(\alpha_0z'\) is a suffix of \(\beta_0\) or equivalently \(z'\beta_1\) is a prefix of \(\alpha_1\). We get \(z = \beta_0(\alpha_0z')^{-1} = (z'\beta_1)^{-1}\alpha_1\), or equivalently \(\alpha_1=z'\beta_1z\) and \(z\alpha_0z' = \beta_0\). We show that \(z\) is a common outer witness for \(M\).
For any \((u,v) \in G^*\), \[\begin{align} z\alpha_0u\alpha_1 &= z\alpha_0uz'\beta_1z &&\text{(Substituting \alpha_1=z'\beta_1z)}\\ &= z\alpha_0z'v\beta_1z &&\text{(z' is an inner witness of (u,v))}\\ &= \beta_0v\beta_1z &&\text{(Substituting z\alpha_0z' = \beta_0)} \end{align}\]
Therefore, the following equations hold: \[\begin{align} z' \alpha_1\alpha_0 &= \beta_1\beta_0 z' \label{g1monomialwitness:eq2}\\ z' u &= v z' \text{ ~for any pair } (u,v) \in G^* \end{align}\tag{18}\] We claim that \(z = [\alpha_0,\beta_0z']_R = [z'\alpha_1,\beta_1]_L\) is a witness for \(M\). There are two cases depending upon if \(\alpha_0\) is a suffix of \(\beta_0z'\) or vice-versa in 18 .
When \(\alpha_0\) is a suffix of \(\beta_0z'\) or equivalently, \(\beta_1\) is a prefix of \(z'\alpha_1\). We get \(z = \beta_0z' \alpha_0^{-1} = \beta_1^{-1}z'\alpha_1\), or equivalently \(z\alpha_0=\beta_0z'\) and \(z'\alpha_1 =\beta_1z\). We show that \(z\) is a common outer witness for \(M\).
For any \((u,v) \in G^*\), \[\begin{align} z\alpha_0u\alpha_1 &= \beta_0z'u\alpha_1 &&\text{(Substituting z\alpha_0=\beta_0z')}\\ &=\beta_0vz'\alpha_1 &&\text{(z' is an outer witness of (u,v))}\\ &=\beta_0v\beta_1z &&\text{(Substituting z'\alpha_1 =\beta_1z)} \end{align}\]
If \(\beta_0z'\) is a suffix of \(\alpha_0\) or equivalently, \(z'\alpha_1\) is a prefix of \(\beta_1\). Therefore, \(z = \alpha_0(\beta_0z')^{-1} = (z'\alpha_1)^{-1}\beta_1\), or equivalently \(\alpha_0=z\beta_0z'\) and \(z'\alpha_1z=\beta_1\). We show that \(z\) is a common inner witness for \(M\).
For any \((u,v) \in G^*\), \[\begin{align} \alpha_0u\alpha_1z &= z\beta_0z'u\alpha_1z &&\text{(Substituting \alpha_0=z\beta_0z')}\\ &=z\beta_0vz'\alpha_1z &&\text{(z' is an outer witness of (u,v))}\\ &=z\beta_0v\beta_1 &&\text{(Substituting z'\alpha_1z=\beta_1)} \end{align}\]
Therefore, if there exists a common witness \(z'\) for \(G\) and \((\alpha_1\alpha_0,\beta_1\beta_0)\), then there also exists a common witness \(z\) for \(M\). Furthermore, since the redux remains constant in the word equation that relates the common witness of \(M\) and those of \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) , each distinct common witness of \(M\) corresponds to a distinct common witness of \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\), and vice-versa. Consequently, if \(z'\) is the unique common witness for \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) then \(z\) is the unique common witness of \(M\), and conversely.
Suppose the set \(G \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) has infinitely many witnesses. According to [infmanycwcorr], all the pairs in that set have the same primitive root, let us say \((\rho,\rho^\prime)\). Therefore, \(G^*(\alpha_1,\beta_1)(\alpha_0,\beta_0)\) is a subset of powers of \((\rho,\rho^\prime)\) and is conjugate. Since \(M\) is a cyclic shift of \(G^*(\alpha_1,\beta_1)(\alpha_0,\beta_0)\) and is also conjugate, it is also a subset of powers of a primitive root, let us say \((\rho_m,\rho_m^\prime)\), that is a cyclic shift of \((\rho,\rho^\prime)\). Moreover, \(\alpha_1\) (resp. \(\beta_1\)) is an inner (resp. outer) witness of \((\rho,\rho_m)\) (resp. \((\rho^\prime,\rho_m^\prime)\)). We observe that \((\rho_m,\rho_m^\prime)\) is the primitive root of the redux of \(M\). Hence, \(M\) is a subset of powers of the primitive root of its redux. ◻
We prove 9 in this subsection.
Lemma 9. Given a sumfree set \(M = (\alpha_0,\beta_0){G_1}^*(\alpha_1,\beta_1) \cdots (\alpha_{k-1},\beta_{k-1}){G_k}^*(\alpha_k,\beta_k)\). The following are equivalent.
\(z\) is a common inner (resp. outer) witness of \(M\).
\(z\) is a common inner (resp. outer) witness of each of its singleton redux.
Proof. Let \(M = (\alpha_0,\beta_0){G_1}^*(\alpha_1,\beta_1) \cdots (\alpha_{k-1},\beta_{k-1}){G_k}^*(\alpha_k,\beta_k)\) be a sumfree set. For \(i \in \{1, \ldots, k\}\), let \(M_i\) denote the singleton redux of \(M\) keeping only the Kleene star \(G_i^*\), i.e., \[M_i = (\alpha_0 \cdots \alpha_{i-1},\beta_0 \cdots \beta_{i-1})G_i^*(\alpha_i \cdots \alpha_k,\beta_i \cdots \beta_k)\] The proof of \((1) \Rightarrow(2)\) is trivial, i.e., if \(z\) is a common witness of \(M\), then \(z\) is also a common witness of \(M_i \subseteq M\).
We prove \((2) \Rightarrow(1)\). WLOG, assume that \(z\) is a common inner witness of each \(M_i\)’s. If the redux is an empty pair \((\varepsilon,\varepsilon)\), then \(M = {G_1}^*{G_2}^*\cdots {G_k}^*\). It is easy to prove that \(z\) is a common inner witness of \(M\) by showing that for any arbitrary pair \((u_i,v_i) \in G_i^*\), \(u_1 u_2 \cdots u_k z = z v_1v_2 \cdots v_k\). Proof by induction on \(k\). \[\begin{align} u_1 \cdots u_{k-1}u_k z &= u_1 \cdots u_{k-1}z v_k &&\text{(Since u_kz = zv_k)}\\ &=z v_1 \cdots v_{k-1} v_k &&\text{(By Induction Hypothesis)} \end{align}\]
Now, assume that the redux is nonempty. Since each \(M_i\) has a common witness, there exist a common witness, say \(z_i\), for \(G_i \cup \{(\alpha_i \cdots \alpha_k\alpha_0\cdots \alpha_{i-1},\beta_i \cdots \beta_k\beta_0\cdots \beta_{i-1})\}\) by 8. There are 3 possible cases for \(z_i\).
\(z_i\) is a unique common inner witness. Therefore, for any pair \((u_i,v_i) \in G_i^*\), \[\begin{align} u_i z_i &= z_i v_i\\ \alpha_i \cdots \alpha_k\alpha_0\cdots \alpha_{i-1}z_i &= z_i\beta_i \cdots \beta_k\beta_0\cdots \beta_{i-1}\\ z=\alpha_0 \cdots \alpha_{i-1}z_i(\beta_0 \cdots \beta_{i-1})^{-1} &= (\alpha_i \cdots \alpha_k)^{-1}z_i\beta_i \cdots \beta_k \text{ (By \Cref{g1monomialwitness} \ref{Thm7:1})} \label{z95m32i46w} \end{align}\tag{19}\]
\(z_i\) is a unique common outer witness. Therefore, for any pair \((u_i,v_i) \in G_i^*\), \[\begin{align} z_i u_i &= v_i z_i\\ z_i\alpha_i \cdots \alpha_k\alpha_0\cdots \alpha_{i-1} &= \beta_i \cdots \beta_k\beta_0\cdots \beta_{i-1}z_i\\ z = \alpha_0\cdots \alpha_{i-1}(\beta_0 \cdots \beta_{i-1}z_i)^{-1} &= (z_i\alpha_i \cdots \alpha_k)^{-1}\beta_i \cdots \beta_k \text{ (By \Cref{g1monomialwitness} \ref{Thm7:2})} \label{z95m32o46w} \end{align}\tag{20}\]
When \(G_i \cup \{(\alpha_i \cdots \alpha_k\alpha_0\cdots \alpha_{i-1},\beta_i \cdots \beta_k\beta_0\cdots \beta_{i-1})\}\) has infinitely many witnesses, by [infmanycwcorr], it is a set of powers of the same primitive root say \((\rho_i,\rho_i^\prime)\). Therefore \(z_i\) belongs to witnesses of \((\rho_i,\rho_i^\prime)\). From 8 [Thm7:3], the set \(M_i\) reduces to a set of powers of the primitive root of the redux \((\alpha_0 \cdots \alpha_k,\beta_0 \cdots \beta_k)\), say \((\rho,\rho^\prime)\). Note that \(\alpha_i \cdots \alpha_k\) (resp. \(\alpha_0 \cdots \alpha_{i-1}\)) is an inner (resp. outer) witness of \((\rho_i,\rho)\). Similarly \(\beta_i \cdots \beta_k\) (resp. \(\beta_0 \cdots \beta_{i-1}\)) is an inner (resp. outer) witness of \((\rho_i^\prime,\rho^\prime)\).
We show that \(z\) is a common inner witness of \(M\), i.e., for any arbitrary pair \((u_i,v _i) \in G_i^*\) (possibly empty), we prove \(\alpha_0u_1\alpha_1u_2\alpha_2 \cdots \alpha_{k-1}u_k\alpha_kz =z\beta_0v_1\beta_1v_2\beta_2 \cdots \beta_{k-1}v_k\beta_k\). The proof is by induction on the number of singleton reduxes, \(0 \leq i \leq k\).
When \(i=0\), it is vacuously true since \(z\) is a witness of the redux.
Assume for induction that it is true for the first \(i-1\) singleton reduxes, i.e., \[\alpha_0u_1\alpha_1u_2\alpha_2 \cdots u_{i-1}\alpha_{i-1} \cdots \alpha_{k}z =z\beta_0v_1\beta_1v_2\beta_2 \cdots v_{i-1}\beta_{i-1}\cdots\beta_{k} \;.\] We prove it for the first \(i\) singleton reduxes, i.e., we show \[\alpha_0u_1\alpha_1u_2\alpha_2 \cdots u_{i-1}\alpha_{i-1}u_{i}\alpha_{i} \cdots \alpha_{k}z =z\beta_0v_1\beta_1v_2\beta_2 \cdots v_{i-1}\beta_{i-1}v_{i}\beta_{i}\cdots\beta_{k} \;.\] There are 3 possible cases for the common witness \(z_i\) of \(G_i \cup \{(\alpha_i \cdots \alpha_k\alpha_0\cdots \alpha_{i-1},\beta_i \cdots \beta_k\beta_0\cdots \beta_{i-1})\}\).
When \(z_i\) is a unique common inner witness. From 19 , \(z = (\alpha_i \cdots \alpha_k)^{-1}z_i\beta_i \cdots \beta_k\). \[\begin{align} \alpha_0&u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}u_i \alpha_i \alpha_{i+1} \cdots \alpha_k z\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}u_iz_i\beta_i \cdots \beta_k &&\text{ (Subs. z)}\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}z_iv_i\beta_i \cdots \beta_k &&\text{ (u_iz_i = z_iv_i)}\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}\alpha_i \cdots \alpha_kz(\beta_i \cdots \beta_k)^{-1}v_i \beta_i \cdots \beta_k &&\text{ (Subs. z_i)}\\ &= z\beta_0v_1\beta_1 \cdots v_{i-1}\beta_{i-1}\beta_i \cdots \beta_k (\beta_i \cdots \beta_k)^{-1}v_i \beta_i \cdots \beta_k &&\text{ (Inductive Hypothesis)}\\ &= z\beta_0v_1\beta_1 \cdots v_{i-1}\beta_{i-1}v_i \beta_i \cdots \beta_k &&\text{ (Simplifying)} \end{align}\]
When \(z_i\) is a unique outer witness. By 20 , \(z = (z_i\alpha_i \cdots \alpha_k)^{-1}\beta_i \cdots \beta_k\). \[\begin{align} \alpha_0 &u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}u_i \alpha_i \alpha_{i+1} \cdots \alpha_k z\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}u_i \alpha_i \alpha_{i+1} \cdots \alpha_k(z_i\alpha_i \cdots \alpha_k)^{-1}\beta_i \cdots \beta_k &&\text{(Subs. z)}\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}u_i z_i^{-1}\beta_i \cdots \beta_k &&\text{(Simplifying)}\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}{z_i}^{-1}v_i\beta_i \cdots \beta_k &&\text{(u_i = {z_i}^{-1}v_iz_i)}\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}\alpha_i \cdots \alpha_kz(\beta_i \cdots \beta_k)^{-1}v_i \beta_i \cdots \beta_k &&\text{(Subs. z_i^{-1})}\\ &= z\beta_0v_1\beta_1 \cdots v_{i-1}\beta_{i-1}\beta_i \cdots \beta_k (\beta_i \cdots \beta_k)^{-1}v_i \beta_i \cdots \beta_k &&\text{(Inductive Hypothesis)}\\ &= z\beta_0v_1\beta_1 \cdots v_{i-1}\beta_{i-1}v_i \beta_i \cdots \beta_k &&\text{(Simplifying)} \end{align}\]
When \(z_i\) is a witness of the primitive root \((\rho_i,\rho_i^\prime)\) of \(G_i \cup \{(\alpha_i \cdots \alpha_k\alpha_0\cdots \alpha_{i-1},\beta_i \cdots \beta_k\beta_0\cdots \beta_{i-1})\}\) (The case where \(G_i \cup \{(\alpha_i \cdots \alpha_k\alpha_0\cdots \alpha_{i-1},\beta_i \cdots \beta_k\beta_0\cdots \beta_{i-1})\}\) have infinitely many witnesses). Here \((u_i,v_i)\) is some \(m^\mathit{th}\) power of \((\rho_i,\rho_i^\prime)\). Since \(z\) is a witness of a singleton redux, it is also a witness of the redux \((\alpha_0 \cdots \alpha_k,\beta_0 \cdots \beta_k)\), and hence a witness of its primitive root \((\rho,\rho^\prime)\). We also know that \(\alpha_i \cdots \alpha_k\) is an inner witness of \((\rho_i,\rho)\) and \(\beta_i \cdots \beta_k\) is an inner witness of \((\rho_i^\prime,\rho^\prime)\). \[\begin{align} \alpha_0 &u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}u_i \alpha_i \alpha_{i+1} \cdots \alpha_k z\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1}(\rho_i)^{m} \alpha_i \alpha_{i+1} \cdots \alpha_k z &&\text{(Subs. u_i)}\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1} \alpha_i \alpha_{i+1} \cdots \alpha_k(\rho)^{m} z &&\text{(\alpha_i \cdots \alpha_k is an i.w. of (\rho_i,\rho))}\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1} \alpha_i \alpha_{i+1} \cdots \alpha_kz (\rho^\prime)^{m} &&\text{(z is a witness of (\rho,\rho^\prime))}\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1} \alpha_i \alpha_{i+1} \cdots \alpha_kz (\beta_i \cdots \beta_k)^{-1}({\rho_i}^\prime)^{m}\beta_i \cdots \beta_k &&\text{(\beta_i \cdots \beta_k is an i.w. of (\rho_i^\prime,\rho^\prime))}\\ &= \alpha_0 u_1\alpha_1 \cdots u_{i-1}\alpha_{i-1} \alpha_i \alpha_{i+1} \cdots \alpha_kz (\beta_i \cdots \beta_k)^{-1}v_i\beta_i \cdots \beta_k &&\text{(Subs. v_i = (\rho_i^\prime)^{m})}\\ &= z\beta_0v_1\beta_1 \cdots v_{i-1}\beta_{i-1}\beta_i \cdots \beta_k (\beta_i \cdots \beta_k)^{-1}v_i \beta_i \cdots \beta_k &&\text{(Inductive Hypothesis)}\\ &= z\beta_0v_1\beta_1 \cdots v_{i-1}\beta_{i-1}v_i \beta_i \cdots \beta_k &&\text{(Simplifying)} \end{align}\]
Thus \(z\) is a common inner witness of \(M\). ◻
The entire section is devoted to the proof of 7.
The proof of \((\Longleftarrow)\) direction of 7 is straightforward. For Item (1), if \(M\) has a common witness, then there exist a witness for every pair of words produced by \(M\) and hence \(M\) is conjugate. For Item (2), since each \(G_i^*\) is conjugate for \(i \in [1,k]\) and \(\alpha_0 \cdots \alpha_k \sim \beta_0 \cdots \beta_k\), we get that \(M\) produces pairs of words of equal length. Moreover, each pair of words in \(M\) is a cyclic shift of \(v\rho^i\) for some \(i \geq 0\), and hence it is conjugate.
We prove the \((\Longrightarrow)\) direction in 7 in the rest of the section. The case when \(M\) is of the form \((\alpha_0,\beta_0)G_1^*(\alpha_1,\beta_1)\) holds already from 8. We now assume that \(k \geq 2\).
Since \(M\) is conjugate, each \(G_i^*\) for \(i \in [1,k]\) is conjugate by 1. Using 6, we get that each \(G_i\) has a common witness. From [infmanycwcorr], either \(|\mathcal{W}(G_i^*)|=\infty\) or \(|\mathcal{W}(G_i^*)|=1\).
First, we show that when the redux of \(M\) is empty, \(M\) has a common witness. If the redux of \(M\) is empty, then each singleton redux of \(M\) is of the form \(G_i^*, i \in [1,k]\) and \(M= G_1^* G_2^* \cdots G_k^*\). We define \(P= \bigcup_{i=1}^{k}P_i\) where
\(P_i = \{(\rho_i^{n_i},\rho_i'^{n_i})\}\) if \(|\mathcal{W}(G_i^*)|=\infty\), where \(\{(\rho_i,\rho_i')\}=R(G_i^*)\) and \(n_i>0\) is such that \((\rho_i^{n_i},\rho_i'^{n_i}) \in G_i^*\), and
\(P_i= \{(u_{1},v_{1}), (u_{2},v_{2})\}\) if \(|\mathcal{W}(G_i^*)|=1\), where \((u_1,v_1),(u_2,v_2)\in G_i^*\) are such that \(\mathcal{W}(\{(u_1,v_1),(u_2,v_2)\}) = \mathcal{W}(G_i^*)\).
Observe that \[\begin{align} \prod_{i=1}^{k}\left(\prod_{p \in P_i}p^*\right ) \subseteq M \end{align}\] is conjugate. By 5, the set \(P\) has a common witness \(z\). Therefore \(z\) is a common witness for each of the \(G_i^*\) by construction and [samewitness]. Therefore, \(z\) is a common witness for each of the singleton redux namely \(G_i^*\) for \(i\in [1,k]\). By virtue of 9, \(M\) has a common witness. Thus if redux of \(M\) is empty \(M\) has a common witness.
Henceforth we assume that the redux of \(M\) is nonempty. Let \[\begin{align} C=|\alpha_0\alpha_1 \cdots \alpha_k| = |\beta_0\beta_1 \cdots \beta_k|. \end{align}\]
Definition 8 (Canonical Pair). A pair \((u',v') \in M\) is canonical* if it is of the form: \[\begin{align} (u, v) &= (\alpha_0,\beta_0)(u_1,v_1)^{j_1} (\alpha_1,\beta_1)(u_2,v_2)^{j_2} \cdots (u_k,v_k)^{j_k}(\alpha_k,\beta_k) \end{align}\] where \((u_i,v_i) \in G_i^*\) and \(j_i \in \mathbb{N}\), for \(i\in[1,k]\), satisfies the following conditions.*
Let \(i\in [1,k]\). Then,
\((u_i,v_i) = (\rho_i^n, \rho_i'^n)\) if \(|W(G_i^*)|=\infty\), where \(R(G_i) = \{(\rho_i, \rho_i')\}\) and \(n \geq 1\) is such that \((\rho_i^n, \rho_i'^n) \in G_i^*\), and
\((u_i,v_i) = (u,v) \in G_i^*\) if \(|W(G_i^*)|=1\), where \((u,v) \in G_i^*\) is such that \[\begin{align} W(\{(u,v) , (\alpha_i \cdots \alpha_k \alpha_1 \cdots \alpha_{i-1}, \beta_i \cdots \beta_k \beta_1 \cdots \beta_{i-1})\})&=W(G_i^*) \end{align}\] guaranteed by 7.
If \(|W(G_i^*)| =1\) for some \(i\in [1,k]\), then \(\rho_{u_j} \not\sim \rho_{u_l}\) for some \(j,l \in [1,k]\).
We next establish the existence of canonical pairs.
Lemma 10. Let \(\rho\) be a primitive word. If \(|W(G_i^*)| = 1\), then there exists a pair \((u_i, v_i) \in G_i^*\) such that \(\rho_{u_i} \not\sim \rho\) and \(W(\{(u_i,v_i), (\alpha_i \cdots \alpha_k \alpha_0 \cdots \alpha_{i-1}, \beta_i \cdots \beta_k \beta_0 \cdots \beta_{i-1})\})=W(G_i^*)\).
Proof. Assume that \(G_i^*\) has a unique common witness and let \(\rho\) be an arbitrary primitive word.
Let \(p=(\alpha_i \cdots \alpha_k \alpha_0 \cdots \alpha_{i-1},\; \beta_i \cdots \beta_k \beta_0 \cdots \beta_{i-1})\). Since \(|W(G_i^*)|=1\), there exist at least two pairs \((u_1,v_1), (u_2,v_2) \in G_i^*\) such that \(\rho_{u_1} \neq \rho_{u_2}\). Hence, by [prop:comb], we can construct three pairs in \(G_i^*\) that have pairwise distinct primitive roots. Therefore, there exist two pairs \((u_1,v_1), (u_2,v_2) \in G_i^*\) that have primitive roots different from that of \(p\). Therefore any two pairs from the set \(\{(u_1,v_1), (u_2,v_2), p\}\) has a unique common witness by 2. Moreover, by 7, \[\begin{align} W(\{(u_1,v_1), p\})=W( \{(u_2,v_2),p\})=W(G_i^*). \end{align}\] If either \(\rho_{u_1} \not\sim \rho\) or \(\rho_{u_2} \not\sim \rho\), then we choose the corresponding pair as \((u_i,v_i)\), and hence the claim follows. Otherwise, assume that \(\rho_{u_1} \sim \rho\sim \rho_{u_2}\).
Next consider the words \((u_3,v_3) = (u_1u_2, v_1v_2)\) and \((u_4,v_4) = (u_3u_1, v_3v_1)\). By [prop:nontriv-concat2], we deduce that \(\rho_{u_3} \not \sim \rho\) and \(\rho_{u_4} \not \sim \rho\). If \(\rho_{u_3}\) differs from the primitive root of \(\mathit{fst}(p)\), then \(W(\{(u_3,v_3),p\} = W(G_i^*)\) and \(\rho_{u_3} \not \sim \rho\). Hence the word \((u_i,v_i) = (u_3,v_3)\) satisfies the claim. Otherwise, \(\rho_{u_3}\) is the primitive root of \(\mathit{fst}(p)\). By [prop:comb], \(\rho_{u_3} \not \in \{\rho_{u_1},\rho_{u_2}\}\) since \(\rho_{u_1}\neq \rho_{u_2}\). By applying [prop:comb] again, we get \(\rho_{u_4} \neq \rho_{u_3}\). Hence, the primitive roots of \(u_4\) and \(\mathit{fst}(p)\) differ. Thus, \((u_i,v_i) = (u_4,v_4)\) satisfies the claim. ◻
Corollary 3. If \(M\) is conjugate then there exists a canonical pair in \(M\).
Proof. We construct a canonical pair \((u,v)\) in \(M\) by choosing, for each \(i \in [1,k]\), a pair \((u_i,v_i) \in G_i^*\) satisfying Item \(1\) of 8. Item \(1.(a)\) holds trivially, while Item \(1.(b)\) follows from 7. It remains to verify Item \(2\) in 8. If \(|W(G_i^*)|=\infty\) for every \(i \in [1,k]\), then Item \(2\) is vacuously satisfied. Otherwise, suppose that there exists an index \(i \in [1,k]\) such that \(|W(G_i^*)|=1\). If there exists \(j\neq i \in [1,k]\)such that \(\rho_{u_i} \not\sim \rho_{u_j}\), then we are done. Otherwise, using 10 we choose a pair \((u_i',v_i')\in G_i^*\) that satisfies \(\rho_{u_i'} \not\sim \rho_{u_i}\) and Item \(1.(b)\). ◻
Definition 9 (Differentially-Pumped Pair).
A Differentially-Pumped Pair* is a canonical pair of the form \[\begin{align} (u, v) &= (\alpha_0,\beta_0)(u_1,v_1)^{j_1} (\alpha_1,\beta_1)(u_2,v_2)^{j_2} \cdots (u_k,v_k)^{j_k}(\alpha_k,\beta_k) \end{align}\] where \(j_1 > 2k \cdot \max(C,\ell)\) where \(\ell = 2\cdot \max\{|u_i| \mid i \in [1,k]\}\), and \(j_2,\ldots, j_k\) obeys*
\[\label{eq:diffpump} 2 \cdot (|u_1^{j_1}| + |u_2^{j_2}| + \cdots + |u_{i-1}^{j_{i-1}}| + C) < |u_i^{j_i}|.\qquad{(1)}\]
Observe that \(\ell > |u_i| + |u_j| - \mathit{gcd}(|u_i|,|u_j|) > 0\) (Fine & Wilf index between \(u_i\) and \(u_j\)) for \(i,j \in [1,k]\).
Since \(M\) is conjugate, a differentialy-pumped pair \((u,v) \in M\) is conjugate and has a cut, say \((p,q)\). Towards proving 7, we do a case analysis on the cut depending whether the cut \((p,q)\) is short or long (defined below).
Definition 10 (Short & Long Cuts). Let \((u, v) \in M\) be the differentially pumped pair from 9. Let \((p,q)\) be a cut of \((u,v)\). We say \(p\) is short* if the prefix \(p\beta_0\) of \(u\) is a prefix of \(\alpha_0u_1^{j_1-1}\) as shown below.*
\[\begin{align} u &= \overbrace{\alpha_0\,u_1 \cdots }^{p\beta_0} \overbrace{\cdots u_1 \, \alpha_1\, u_2\cdots u_2 \, \alpha_2 \cdots u_k \cdots u_k \,\alpha_k}^{\beta_0^{-1}q}\\ v &= \underbrace{\beta_0\,v_1 \cdots \cdots v_1 \, \beta_1 \,v_2 \cdots v_2 \, \beta_2 \, \cdots v_k \cdots}_{q} \underbrace{\cdots v_k \, \beta_k}_{p} \end{align}\]
Similarly, \(q\) is short* if the prefix \(q\alpha_0\) of \(v\) is a prefix of \(\beta_0v_1^{j_1-1}\). The cut \((p,q)\) is short if either \(p\) or \(q\) is short. When \(p,q\) or the cut \((p,q)\) is not short, they are long.*
Definition 11 (Blocks of a Canonical Pair). Given a differentially-pumped pair from Definition, \(B_1, B_2, \ldots, B_k\) represent the factors of \(u_1^{j_1}\)s, \(u_2^{j_2}\), \(\ldots u_k^{j_k}\) respectively in \(u\). Likewise \(B_1^\prime, B_2^\prime, \ldots, B_k^\prime\) represent the factors \(v_1^{j_1}\), \(v_2^{j_2}\), \(\ldots v_k^{j_k}\) respectively in \(v\).
\[\begin{align} u &= \alpha_0\,\overbrace{u_1 \cdots u_1}^{j_1 \text{ times }}\alpha_1\overbrace{u_2 \cdots u_2}^{j_2 \text{ times }}\alpha_2 \cdots \overbrace{u_k \cdots u_k}^{j_k \text{ times }}\alpha_k &&= \alpha_0\,\overbrace{x_1y_1 \cdots x_1y_1}^{B_1} \, \alpha_1\, \overbrace{x_2y_2 \cdots x_2y_2}^{B_2} \, \alpha_2 \cdots \overbrace{x_ky_k \cdots x_ky_k}^{B_k} \,\alpha_k\\ v &= \beta_0\,v_1 \cdots v_1 \, \beta_1 \,v_2 \cdots v_2 \, \beta_2 \, \cdots v_k \cdots v_k \, \beta_k &&= \beta_0\,y_1x_1 \cdots y_1x_1 \, \beta_1 \,y_2x_2 \cdots y_2x_2 \, \beta_2 \, \cdots y_kx_k \cdots y_kx_k \, \beta_k \end{align}\]
Also, let \((x_i,y_i)\) denote a cut of \((\rho_{u_i},\rho_{v_i})\) for each \(i \in [1,k]\).
In the next two subsections, we prove that whenever a differentially-pumped pair has a short cut, \(M\) has a common witness (See [prop:short]). Otherwise, if it has a long cut then we show that there exist words \(v, \rho\) such that \(\mathit{fst}(G_i^*) \mathrel{\mathpalette\subset@sim\relax}\rho^*\) for all \(i \in [1,k]\), and \(\mathit{fst}(M) \sim \mathit{snd}(M) \mathrel{\mathpalette\subset@sim\relax}v\rho^*\) where either \(v= \epsilon\) or \(v \sim \alpha_0 \cdots \alpha_k\) (See [prop:long]). As a consequence, 7 follows.
In this subsection, we prove that whenever a differentially-pumped pair has a short cut, then \(M\) has a common witness.
Assume that \(M\) is conjugate and let \((u,v) \in M\) be a differentially-pumped pair from 9. If \((u,v)\) has a short cut then \(M\) has a common witness.
First, we prove some preparatory lemmas.
Lemma 11. Assume that \((u,v)\) from 9 has a short cut \((p,q)\) such that \(p\) is short. Then the following conditions hold.
Let \(w_1 = [\alpha_0,p\beta_0]_L\). If \(\alpha_0\) is a prefix of \(p\beta_0\), then \(w_1\) is an inner witness of \((u_1,v_1)\), and \(B_1=w_1q_1\) and \(B_1'=q_1w_1\) for some word \(q_1\). Otherwise, \(p\beta_0\) is a prefix of \(\alpha_0\) and \(w_1\) is an outer witness of \((u_1,v_1)\), and \(B_1 = q_1w_1\) and \(B_1' = w_1q_1\) for some word \(q_1\).
For \(i\in [2,k]\),
if \(w_{i-1}\) is an inner witness of \((u_{i-1},v_{i-1})\), then \(w_i = [\alpha_{i-1},w_{i-1}\beta_{i-1}]_L\) satisfies the following: If \(\alpha_{i-1}\) is a prefix of \(w_{i-1}\beta_{i-1}\), then \(w_i\) is an inner witness of \((u_i,v_i)\), and \(B_i = w_iq_i\) and \(B_i' = q_i w_i\) for some word \(q_i\). Otherwise, \(w_{i-1}\beta_{i-1}\) is a prefix of \(\alpha_{i-1}\) and \(w_i\) is an outer witness of \((u_i,v_i)\), and \(B_i = q_iw_i\) and \(B_i' = w_i q_i\) for some word \(q_i\).
If \(w_{i-1}\) is an outer witness of \((u_{i-1},v_{i-1})\), then \(w_i = [w_{i-1}\alpha_{i-1},\beta_{i-1}]_L\) satisfies the following: If \(w_{i-1}\alpha_{i-1}\) is a prefix of \(\beta_{i-1}\), then \(w_i\) is an inner witness of \((u_i,v_i)\), and \(B_i = w_i q_i\) and \(B_i' = q_i w_i\) for some word \(q_i\). Otherwise, \(\beta_{i-1}\) is a prefix of \(w_{i-1}\alpha_{i-1}\) and \(w_i\) is an outer witness of \((u_i,v_i)\), and \(B_i = q_iw_i\) and \(B_i' = w_i q_i\) for some word \(q_i\).
If \(w_k\) is an inner witness of \((u_k,v_k)\), then \(w_1=[\alpha_{k}\alpha_0,w_{k}\beta_{k}\beta_0]_L\). Moreover, if \(w_1\) is an inner witness \((u_1,v_1)\), then \(w_1 = (\alpha_{k}\alpha_0)^{-1}w_{k}\beta_{k}\beta_0\), and \(w_1 = (w_{k}\beta_{k}\beta_0)^{-1}\alpha_{k}\alpha_0\) otherwise. If \(w_k\) is an outer witness of \((u_k,v_k)\), then \(w_1 = [w_k\alpha_{k}\alpha_0,\beta_{k}\beta_0]_L\). Moreover, if \(w_1\) is an inner witness \((u_1,v_1)\), then \(w_1 = (w_k\alpha_{k}\alpha_0)^{-1}\beta_{k}\beta_0\), and \(w_1 = (\beta_{k}\beta_0)^{-1}w_k\alpha_{k}\alpha_0\) otherwise.
Proof. . Let \(w_1 = [\alpha_0,p\beta_0]_L\). There are two cases: either \(\alpha_0\) is a prefix of \(p\beta_0\), or \(p\beta_0\) is a prefix of \(\alpha_0\). In either case, we show that \(w_1\) is a witness of \((u_1,v_1)\).
\(\alpha_0\) is a prefix of \(p\beta_0\): We show that \(w_1\) is an inner witness of \((u_1,v_1)\), and there exists a word \(q_1\) such that \(B_1 = w_1q_1\) and \(B_1' = q_1w_1\).
Since \(\alpha_0\) is a prefix of \(p\beta_0\) and \(p\) is short, \(w_1 = \alpha_0^{-1}p\beta_0\) is a prefix of \(B_1(u_1)^{-1}\) in \(u\). We match \((p \beta_0)^{-1}u\) with \(\beta_0^{-1}vp^{-1}\). Since \(\beta_0^{-1}vp^{-1}\) starts with \(y_1x_1\) and since there is at least one factor \(x_1y_1\) following \(p\beta_0\), either \(w_1 \in (x_1y_1)^*x_1\) (by Case [distinct] of ) or \(w_1 \in (x_1y_1)^*\) and \(x_1y_1 = y_1x_1\) (by [same] of ). In the former case, \(w_1\) is an inner witness of \((x_1y_1,y_1x_1) = (\rho_{u_1},\rho_{v_1})\) and hence is also an inner witness of \((u_1,v_1)\) by [samewitness]. Similarly, when \(w_1 \in (x_1y_1)^*\) and \(x_1y_1 = y_1x_1\), we get \(w_1\) is an inner witness of \((x_1y_1,y_1x_1)\) as well as \((u_1,v_1)\).
Let \(q_1 = w_1^{-1}B_1\). Clearly, \(q_1\) is of the form \((y_1x_1)^*y_1\) or \((x_1y_1=y_1x_1)^*\). In both cases, after matching \(q_1\) in block \(B_1'\) of \(v\), we observe that a factor equal to \(w_1\) appears in the suffix of the block of \(B_1'\), i.e., \(B_1' = q_1w_1\) (as shown below). \[\begin{align} u &= \overbrace{\alpha_0\,\overbrace{x_1y_1 \cdots x_1}^{w_1}}^{p\beta_0} \overbrace{\cdots x_1y_1}^{q_1} \, \alpha_1\, x_2y_2 \cdots x_2y_2 \, \alpha_2 \cdots x_ky_k \cdots x_ky_k \,\alpha_k\\ v &= \beta_0\,\underbrace{y_1x_1 \cdots y_1}_{q_1} \underbrace{x_1 \cdots y_1x_1}_{w_1} \, \beta_1 \,y_2x_2 \cdots y_2x_2 \, \beta_2 \, \cdots y_kx_k \cdots \cdots y_kx_k \, \beta_k \end{align}\]
When \(p\beta_0\) is a prefix of \(\alpha_0\): We show that \(w_1\) is an outer witness of \((u_1,v_1)\), and there exists a word \(q_1\) such that \(B_1 = q_1w_1\) and \(B_1' = w_1q_1\).
Since \(p\beta_0\) is a prefix of \(\alpha_0\) and \(|\alpha_0| \leq C < j_1\) , \(|w_1| = |(p\beta_0)^{-1}\alpha_0|<|v_1^{j_1}|\). Therefore \(w_1\) is a prefix of \(B_1'(v_1)^{-1}\) in \(v\). On matching \((p \beta_0)^{-1}u\) and \(\beta_0^{-1}vp^{-1}\), since the block \(B_1\) in \(u\) starts with \(x_1y_1\) and since there is at least one factor \(y_1x_1\) in \(B_1'\) after matching \(w_1\), either \(w_1 \in (y_1x_1)^*y_1\) (by Case [distinct] of ) or \(w_1 \in (y_1x_1)^*\) and \(x_1y_1 = y_1x_1\) (by [same] of ). In the former case, \(w_1\) is an outer witness of \((x_1y_1,y_1x_1) = (\rho_{u_1},\rho_{v_1})\) and hence is also an outer witness of \((u_1,v_1)\) by [samewitness]. When \(w_1 \in (y_1x_1)^*\), we get \(x_1y_1 = y_1x_1\) and hence \(w_1\) is an outer witness of \((x_1y_1,y_1x_1)\) as well as \((u_1,v_1)\).
Let \(q_1= (w_1)^{-1}B_1'\). As in the case above, \(q_1 \in (x_1y_1)^*x_1\) or \(q_1 \in (x_1y_1=y_1x_1)^*\). In both cases, after matching \(q_1\) in block \(B_1\) of \(u\), a factor equal to \(w_1\) appears in the suffix of the block of \(B_1\), i.e., \(B_1 = q_1w_1\) (as shown below).
\[\begin{align} u &= \overbrace{\alpha_0}^{p\beta_0w_1}\overbrace{x_1y_1 \cdots x_1}^{q_1}\overbrace{y_1\cdots x_1y_1}^{w_1} \, \alpha_1\, x_2y_2 \cdots x_2y_2 \, \alpha_2 \cdots x_ky_k \cdots x_ky_k \,\alpha_k\\ v &= \beta_0\,\,\,\underbrace{y_1x_1 \cdots y_1}_{w_1} \underbrace{x_1 \cdots y_1x_1}_{q_1} \, \beta_1 \,y_2x_2 \cdots y_2x_2 \, \beta_2 \, \cdots y_kx_k \cdots \cdots y_kx_k \, \beta_k \end{align}\]
.Proof by induction on \(i\in [2,k]\). The base case and the inductive step are identical. Hence we treat only the inductive step.
WLOG assume that \(w_{i-1}\) is an inner witness of \((u_{i-1},v_{i-1})\). The case where \(w_{i-1}\) is an outer witness of \((u_{i-1},v_{i-1})\) is symmetric. In this case, \(B_{i-1} = w_{i-1}q_{i-1}\) and \(B_{i-1}' = q_{i-1}w_{i-1}\) (as shown below). Moreover, \(|w_{i-1}| \leq |u_{i-1}^{j_{i-1}}|\).
\[\begin{align} u &= \cdots \alpha_{i-2}\overbrace{x_{i-1}y_{i-1} \cdots x_{i-1}}^{w_{i-1}} \overbrace{\cdots x_{i-1}y_{i-1}}^{q_{i-1}} \, \alpha_{i-1}\, x_iy_i \cdots x_iy_i \cdots \\ v &= \cdots \beta_{i-2}\underbrace{y_{i-1}x_{i-1} \cdots }_{q_{i-1}} \underbrace{x_{i-1} \cdots y_{i-1}x_{i-1}}_{w_{i-1}} \, \beta_{i-1} \,y_ix_i \cdots y_ix_i \cdots \end{align}\]
On matching further, there are two cases for \(w_i = [\alpha_{i-1},w_{i-1}\beta_{i-1}]_L\) as follows.
When \(\alpha_{i-1}\) is a prefix of \(w_{i-1}\beta_{i-1}\): Here, \(w_i = (\alpha_{i-1})^{-1}w_{i-1}\beta_{i-1}\) begins at the block \(B_i\) in \(u\) as depicted in 4. Since \(|w_i| \leq |w_{i-1}\beta_{i-1}| \leq |u_{i-1}^{j_{i-1}}| + C < |u_i^{j_i}|/2\), \(w_i\) ends within block \(B_i\) and there exists at least one \(x_iy_i\) in \(B_i\) immediately following \(w_i\). Let \(B_i = w_i q_i\) for some word \(q_i\). On further matching \(q\) in \(u\) and \(v\), since the block \(B_i'\) in \(v\) starts with \(y_ix_i\) and since \(q_i\) consists at least one factor \(x_1y_1\), either \(w_i \in (x_iy_i)^*x_i\) (by Case [distinct] of ) or \(w_i \in (x_iy_i)^*\) and \(x_iy_i=y_ix_i\) (by [same] of ). In the former case, \(w_i\) is an inner witness of \((x_iy_i,y_ix_i) = (\rho_{u_i},\rho_{v_i})\) and hence also an inner witness of \((u_i,v_i)\) by [samewitness]. When \(w_i \in (x_iy_i)^*\), we get \(x_iy_i = y_ix_i\) and hence \(w_i\) is an inner witness of \((x_iy_i,y_ix_i)\) as well as \((u_i,v_i)\).
Since \(B_i = w_iq_i\), after matching \(q_i\) in block \(B_i'\) of \(v\), we observe that a factor equal to \(w_i\) appears in the suffix of the block of \(B_i'\), i.e., \(B_i' = q_iw_i\) (as shown below).
None
Figure 4: \(w_i\) when \(w_{i-1}\) is an inner witness and \(\alpha_{i-1}\) is a prefix of \(w_{i-1}\beta_{i-1}\).
When \(w_{i-1}\beta_{i-1}\) is a prefix of \(\alpha_{i-1}\): Here, \(w_i = (w_{i-1}\beta_{i-1})^{-1}\alpha_{i-1}\) begins at the block \(B_i'\) in \(v\). Since \(|w_i| \leq |\alpha_{i-1}| \leq C < |u_i^{j_i}|/2\), \(w_i\) ends within block \(B_i'\) and there exists at least one \(y_ix_i\) in \(B_i'\) immediately following \(w_i\). Let \(B_i' = w_i q_i\) for some word \(q_i\). On further matching \(q\) in \(u\) and \(v\), since the block \(B_i\) in \(u\) starts with \(x_iy_i\) and since \(q_i\) contains at least one \(y_ix_i\), either \(w_i \in (y_ix_i)^*y_i\) (by Case [distinct] of ) or \(w_i \in (y_ix_i)^*\) and \(x_iy_i = y_ix_i\) (by [same] of ). In the former case, \(w_i\) is an outer witness of \((x_iy_i,y_ix_i) = (\rho_{u_i},\rho_{v_i})\) and hence also an outer witness of \((u_i,v_i)\) by [samewitness]. When \(w_i \in (y_ix_i)^*\), we get \(x_iy_i = y_ix_i\) and hence \(w_i\) is an outer witness of \((x_iy_i,y_ix_i)\) as well as \((u_i,v_i)\).
Since \(B_i' = w_iq_i\), after matching \(q_i\) in block \(B_i\) of \(u\), a factor equal to \(w_i\) appears in the suffix of the block of \(B_i\), i.e., \(B_i = q_iw_i\) (as shown below).
None
Figure 5: \(w_i\) when \(w_{i-1}\) is an inner witness and \(w_{i-1}\beta_{i-1}\) is a prefix of \(\alpha_{i-1}\).
Thus, the claim holds for \(i \in \{2, \ldots, k\}\).
. We prove the case when both \(w_1\) and \(w_k\) are inner witnesses of \((u_1,v_1)\) and \((u_k,v_k)\) respectively (as
shown below). All other cases are symmetric.
\[\begin{align} u &= \overbrace{\alpha_0\,\overbrace{x_1y_1 \cdots x_1}^{w_1}}^{p\beta_0} \overbrace{\cdots x_1y_1}^{q_1} \, \alpha_1\, x_2y_2 \cdots x_2y_2 \, \alpha_2 \cdots \overbrace{x_ky_k \cdots x_k}^{w_k}\overbrace{\cdots x_ky_k}^{q_k} \,\alpha_k\\ v &= \beta_0\,\underbrace{y_1x_1 \cdots y_1}_{q_1} \underbrace{x_1 \cdots y_1x_1}_{w_1} \, \beta_1 \,y_2x_2 \cdots y_2x_2 \, \beta_2 \, \cdots \underbrace{y_kx_k \cdots}_{q_k}\underbrace{x_k \cdots y_kx_k}_{w_k} \, \beta_k \end{align}\]
We get that \[\begin{align} w_k\beta_k &= \alpha_kp &&\text{ (By matching u and v)}\\ w_k\beta_k\beta_0 &= \alpha_kp\beta_0 &&\text{ (Appending \beta_0)}\\ &= \alpha_k\alpha_0w_1. &&\text{ (Subs. p\beta_0 = \alpha_0w_1)} \qedhere \end{align}\] ◻
Lemma 12. For each \(i\in [1,k]\), let \(w_i\) be the witness of \((u_i,v_i)\) given by 11. Then for each \(j\in [1,k]\) such that \(j>i\), the following holds.
If \(w_{i}\) is an inner witness of \((u_{i},v_{i})\), then \(w_j = [\alpha_i \cdots \alpha_{j-1}, w_i\beta_i \cdots \beta_{j-1}]_L\). More precisely, if \(w_j\) is an inner witness of \((u_j,v_j)\), then \(w_j = (\alpha_i \cdots \alpha_{j-1})^{-1}w_i\beta_i \cdots \beta_{j-1}\), otherwise \(w_j = (w_i\beta_i \cdots \beta_{j-1})^{-1}\alpha_i \cdots \alpha_{j-1}\).
If \(w_{i}\) is an outer witness of \((u_{i},v_{i})\), then \(w_j = [w_i\alpha_i \cdots \alpha_{j-1}, \beta_i \cdots \beta_{j-1}]_L\). More precisely, if \(w_j\) is an inner witness of \((u_j,v_j)\), then \(w_j = (w_i\alpha_i \cdots \alpha_{j-1})^{-1}\beta_i \cdots \beta_{j-1}\), otherwise \(w_j = (\beta_i \cdots \beta_{j-1})^{-1}w_i\alpha_i \cdots \alpha_{j-1}\).
Proof. Proof by induction on \(j-i\). Base case is when \(j = i+1\) and the claim holds by 11. WLOG assume \(w_i\) is an inner witness of \((u_i,v_i)\) and the case 1. holds for \(j\) with \(i < j < k\), and we show that it also holds for \(j+1\). There are two cases:
When \(w_j\) is an inner witness of \((u_j,v_j)\): \(w_j = (\alpha_i \cdots \alpha_{j-1})^{-1}w_i\beta_i \cdots \beta_{j-1}\) (by inductive hypothesis). From 11, we get that \(w_{j+1}\) is a witness of \((u_{j+1},v_{j+1})\) and \[\begin{align} w_{j+1} &= [\alpha_j,w_j\beta_j]_L && \text{(By \Cref{claimblock})}\\ &=[\alpha_j,(\alpha_i \cdots \alpha_{j-1})^{-1}w_i\beta_i \cdots \beta_{j-1}\beta_j]_L && \text{(Subs. w_j)}\\ &=[\alpha_i \cdots \alpha_{j-1}\alpha_j,w_i\beta_i \cdots \beta_{j-1}\beta_j]_L &&\text{(Since [u,v]_L = [wu,wv]_L for all w)} \end{align}\] If \(w_{j+1}\) is an inner witness of \((u_{j+1},v_{j+1})\), then \[\begin{align} w_{j+1}&= (\alpha_j)^{-1}w_j\beta_j\\ &= (\alpha_j)^{-1}(\alpha_i \cdots \alpha_{j-1})^{-1}w_i\beta_i \cdots \beta_{j-1}\beta_j &&\text{ (Subs. w_j by I.H.)}\\ &=(\alpha_i \cdots \alpha_{j-1}\alpha_j)^{-1}w_i\beta_i \cdots \beta_{j-1}\beta_j \end{align}\] Similarly, if \(w_{j+1}\) is an outer witness of \((u_{j+1},v_{j+1})\), then \[\begin{align} w_{j+1}&= (w_j\beta_j)^{-1}\alpha_j\\ &= ((\alpha_i \cdots \alpha_{j-1})^{-1}w_i\beta_i \cdots \beta_{j-1}\beta_j)^{-1}\alpha_j &&\text{ (Subs. w_j by I.H.)}\\ &=(w_i\beta_i \cdots \beta_{j-1}\beta_j)^{-1}\alpha_i \cdots \alpha_{j-1}\alpha_j \end{align}\]
When \(w_j\) is an outer witness: \(w_j = (w_i\beta_i \cdots \beta_{j-1})^{-1}\alpha_i \cdots \alpha_{j-1}\) (by inductive hypothesis). From 11, we get that \(w_{j+1}\) is a witness of \((u_{j+1},v_{j+1})\) and \[\begin{align} w_{j+1} &= [w_j\alpha_j,\beta_j]_L && \text{(By \Cref{claimblock})}\\ &=[(w_i\beta_i \cdots \beta_{j-1})^{-1}(\alpha_i \cdots \alpha_{j-1})\alpha_j,\beta_j]_L && \text{(Subs. w_j)}\\ &=[\alpha_i \cdots \alpha_{j-1}\alpha_j,w_i\beta_i \cdots \beta_{j-1}\beta_j]_L &&\text{([u,v]_L = [wu,wv]_L for all w)} \end{align}\] If \(w_{j+1}\) is an inner witness of \((u_{j+1},v_{j+1})\), then \[\begin{align} w_{j+1}&= (w_j\alpha_j)^{-1}\beta_j\\ &= ((w_i\beta_i \cdots \beta_{j-1})^{-1}\alpha_i \cdots \alpha_{j-1}\alpha_j)^{-1}\beta_j &&\text{ (Subs. w_j by I.H.)}\\ &=(\alpha_i \cdots \alpha_{j-1}\alpha_j)^{-1}w_i\beta_i \cdots \beta_{j-1}\beta_j \end{align}\] Similarly, if \(w_{j+1}\) is an outer witness of \((u_{j+1},v_{j+1})\), we can show that \(w_{j+1} = (w_i\beta_i \cdots \beta_{j-1}\beta_j)^{-1}\alpha_i \cdots \alpha_{j-1}\alpha_j\).
The case where \(w_i\) is an outer witness of \((u_i,v_i)\) is symmetric. ◻
Lemma 13. For each \(i\in [1,k]\), let \(w_i\) be the witness of \((u_i,v_i)\) given by 11. For each \(i \in [1,k]\), if \(w_i\) is an inner (resp. outer) witness of \((u_i,v_i)\), then \(w_i\) is also an inner (resp. outer) witness of \((\alpha_i \cdots \alpha_k\alpha_0 \cdots \alpha_{i-1},\beta_i \cdots \beta_k\beta_0 \cdots \beta_{i-1}).\)
Proof. WLOG assume that \(w_i\) is an inner witness of \((u_i,v_i)\). The other case is symmetric. Using 12, \[w_k = [\alpha_i \cdots \alpha_{k-1},w_i\beta_i \cdots \beta_{k-1}]_L,\] \[\label{eq:cl6:1} w_i = (\alpha_1 \cdots \alpha_{i-1})^{-1}w_1\beta_1\cdots \beta_{i-1}\tag{21}\]
We perform a case analysis on whether \(w_1\) and \(w_k\) are inner/outer witnesses. Assume that \(w_1\) is as inner witness of \((u_1,v_1)\) and \(w_k\) is an outer witness of \((u_k,v_k)\). Hence, \[\label{eq:cl6:2} w_k = (w_i\beta_i \cdots \beta_{k-1})^{-1}\alpha_i \cdots \alpha_{k-1}\tag{22}\] Using Item 3 of 11, we get that \[\label{eq:cl6:3} w_1 = (w_k\alpha_k\alpha_0)^{-1}\beta_k\beta_0.\tag{23}\] Therefore, \[\begin{align} w_i &=(\alpha_1 \cdots \alpha_{i-1})^{-1}w_1\beta_1\cdots \beta_{i-1} &&\text{ (Using \Cref{eq:cl6:1}}\\ &=(\alpha_1 \cdots \alpha_{i-1})^{-1}(w_k\alpha_k\alpha_0)^{-1}\beta_k\beta_0\beta_1\cdots \beta_{i-1} &&\text{ (Subs. \Cref{eq:cl6:3}}\\ &=(w_k\alpha_k\alpha_0\alpha_1 \cdots \alpha_{i-1})^{-1}\beta_k\beta_0\beta_1\cdots \beta_{i-1}\\ &=((w_i\beta_i \cdots \beta_{k-1})^{-1}\alpha_i \cdots \alpha_{k-1}\alpha_k\alpha_0\alpha_1 \cdots \alpha_{i-1})^{-1}\beta_k\beta_0\beta_1\cdots \beta_{i-1} &&\text{ (Subs. \Cref{eq:cl6:2}}\\ &=(\alpha_i \cdots \alpha_{k-1}\alpha_k\alpha_0\alpha_1 \cdots \alpha_{i-1})^{-1}w_i\beta_i \cdots \beta_{k-1}\beta_k\beta_0\beta_1\cdots \beta_{i-1} \end{align}\] Hence \(w_i\) is also an inner witness of \((\alpha_i \cdots \alpha_k\alpha_0 \cdots \alpha_{i-1},\beta_i \cdots \beta_k\beta_0 \cdots \beta_{i-1})\). All other cases for \(w_1\) and \(w_k\) are analogous. ◻
Lemma 14. Assume that \(M\) is conjugate and a differentially-pumped pair in \(M\) has a short cut. If any two singleton reduxes of \(M\) have unique common witnesses, then they are identical. Moreover, either both are inner, or both are outer witnesses.
Proof. Let \[\begin{align} M_i &= (\alpha_0 \cdots \alpha_{i-1}, \beta_0 \cdots \beta_{i-1})G_i^*(\alpha_i \cdots \alpha_k,\beta_i \cdots \beta_k)\\ M_j &= (\alpha_0 \cdots \alpha_{j-1}, \beta_0 \cdots \beta_{j-1})G_j^*(\alpha_j \cdots \alpha_k,\beta_j \cdots \beta_k) \end{align}\] be two singleton reduxes with unique common witnesses \(c_i\) and \(c_j\) respectively. Using 8, we get that the set \(G_i \cup \{(\alpha_i \cdots \alpha_k\alpha_0 \cdots \alpha_{i-1}, \beta_i \cdots \beta_k\alpha_0 \cdots \beta_{i-1})\}\) has a unique common witness, say \(z_i\). Moreover, by construction, \(z_i\) is also the unique common witness of the pairs \((u_i,v_i)\) used in the canonical pair from 9 and \((\alpha_i \cdots \alpha_k\alpha_0 \cdots \alpha_{i-1}, \beta_i \cdots \beta_k\beta_0 \cdots \beta_{i-1})\). Analogously, let \(z_j\) be the unique common witness of the set \(G_j \cup \{(\alpha_j \cdots \alpha_k\alpha_0 \cdots \alpha_{j-1}, \beta_j \cdots \beta_k\alpha_0 \cdots \beta_{j-1})\}\) and \(\{(u_j,v_j),(\alpha_j \cdots \alpha_k\alpha_0 \cdots \alpha_{j-1}, \beta_j \cdots \beta_k\alpha_0 \cdots \beta_{j-1})\}\) where \((u_j,v_j)\) is from 9. From 12, \(z_i=w_i\) and \(z_j =w_j\). WLOG assume that \(i < j\). There are four cases depending on whether \(w_i\) and \(w_j\) is an inner or outer witness.
When \(w_i\) and \(w_j\) are inner witnesses: By 12, \(w_j = (\alpha_i \cdots \alpha_{j-1})^{-1}w_i\beta_i \cdots \beta_{j-1}\). By 8, \(c_i = [\alpha_0 \cdots \alpha_{i-1}w_i,\beta_0 \cdots \beta_{i-1}]_R\) and \(c_j = [\alpha_0 \cdots \alpha_{j-1}w_j,\beta_0 \cdots \beta_{j-1}]_R\). Assume that \(c_j\) is a common inner witness. We show that \(c_i=c_j\) and it is also an inner witness. \[\begin{align} c_j &= [\alpha_0 \cdots \alpha_{j-1}w_j,\beta_0 \cdots \beta_{j-1}]_R\\ &=\alpha_0 \cdots \alpha_{j-1}w_j(\beta_0 \cdots \beta_{j-1})^{-1} &&\text{(By \Cref{g1monomialwitness})}\\ &= \alpha_0 \cdots \alpha_{j-1}(\alpha_i \cdots \alpha_{j-1})^{-1}w_i\beta_i \cdots \beta_{j-1}(\beta_0 \cdots \beta_{j-1})^{-1} && \text{ (Subs. w_j) }\\ &= \alpha_0 \cdots \alpha_{i-1}w_i(\beta_0 \cdots \beta_{i-1})^{-1} && \text{ (Simplifying) }\\ &= [\alpha_0 \cdots \alpha_{i-1}w_i,\beta_0 \cdots \beta_{i-1}]_R\\ &= c_i \end{align}\] We also deduce that \(c_i\) is also a common inner witness by 8. Similarly, we can show that when \(c_j\) is a common outer witness of \(M_j\), then \(c_i=c_j\) is also a common outer witness of \(M_i\).
When \(w_i\) and \(w_j\) is a unique common outer witness: the case the similar to above.
When \(w_i\) is a unique common inner witness and \(w_j\) is a unique common outer witness: By 12, \(w_j = (w_i\beta_i \cdots \beta_{j-1})^{-1}\alpha_i \cdots \alpha_{j-1}\) . By 8, \(c_i = [\alpha_0 \cdots \alpha_{i-1}w_i,\beta_0 \cdots \beta_{i-1}]_R\) and \(c_j = [\alpha_0 \cdots \alpha_{j-1},\beta_0 \cdots \beta_{j-1}w_j]_R\). Assume that \(c_j\) is a common inner witness. We show that \(c_i=c_j\) and it is also an inner witness. \[\begin{align} c_j &= [\alpha_0 \cdots \alpha_{j-1},\beta_0 \cdots \beta_{j-1}w_j]_R\\ &=\alpha_0 \cdots \alpha_{j-1}(\beta_0 \cdots \beta_{j-1}w_j)^{-1} &&\text{(By \Cref{g1monomialwitness})}\\ &=\alpha_0 \cdots \alpha_{j-1}(\beta_0 \cdots \beta_{j-1}(w_i\beta_i \cdots \beta_{j-1})^{-1}\alpha_i \cdots \alpha_{j-1})^{-1} && \text{ (Subs. w_j) }\\ &=\alpha_0 \cdots \alpha_{j-1}(\beta_0 \cdots \beta_{i-1}(w_i)^{-1}\alpha_i \cdots \alpha_{j-1})^{-1} && \text{ (Simplifying) }\\ &=\alpha_0 \cdots \alpha_{i-1}(\beta_0 \cdots \beta_{i-1}(w_i)^{-1})^{-1}\\ &=\alpha_0 \cdots \alpha_{i-1}w_i(\beta_0 \cdots \beta_{i-1})^{-1}\\ &=[\alpha_0 \cdots \alpha_{i-1}w_i,\beta_0 \cdots \beta_{i-1}]_R\\ &=c_i \end{align}\] We also deduce that \(c_i\) is also a common inner witness by 8. Similarly, we can show that when \(c_j\) is a common outer witness of \(M_j\), \(c_i=c_j\) is also a common outer witness of \(M_i\).
When \(w_i\) is a unique common outer witness and \(w_j\) is a unique common inner witness: the case is similar to above.
◻
Proof of [prop:short]. Now we prove that \(M\) has a common witness. Let \(M_i\) for \(i\in [1,k]\) denote the singleton redux of \(M\) obtained from \(M\) by substituting all but \(G_i^*\) by \((\varepsilon,\varepsilon)\). Since \(M\) is conjugate, each of its singleton redux, \(M_i\) for \(i \in [1,k]\) is also conjugate. By 8, each \(M_i\) has a common witness.
Since the redux of \(M\) is nonempty, if a singleton redux has infinitely many common witnesses, then it is a subset of powers of the primitive root of the redux by 8[Thm7:3]. Hence, any witness for the primitive root of the redux is a witness for that singleton redux of \(M\). If all singleton reduxes have infinitely many witnesses, they are all subsets of powers of the primitive root. Hence, all of them share a common witness, and by 9 \(M\) has a common witness.
Otherwise assume that there exists a singleton redux with a unique common witness. By 14, if any two singleton reduxes have unique witnesses, then they are the same. Thus, all singleton reduxes with unique witnesses share a unique witness; Let it be \(z\). Since \(z\) is also a witness for the redux. By [samewitness], it is a witness for any power of the primitive root of the redux. Therefore, \(z\) is also a witness for all singleton reduxes with infinitely many witnesses by 8[Thm7:3]. Hence, \(z\) is a common witness of each singleton reduxes of \(M\). By virtue of 9, \(M\) has a common witness when \(p\) is short. ◻
In this subsection we prove the following
Assume that \(M\) is conjugate. Whenever a differentially-pumped pair of \(M\) has a long cut, then \[M \subseteq (\alpha_0,\beta_0)(\rho_1,\rho_1')^* (\alpha_{1},\beta_{1}) \cdots (\rho_k,\rho_k')^*(\alpha_k,\beta_k)\] such that \(\rho_i\sim \rho_i' \sim \rho_j \sim \rho_j'\) for all \(i,j\in [1,k]\). Let \(\bar{\alpha} = \alpha_1, \ldots, \alpha_{k-1}, \alpha_k\alpha_0\), \(\bar{\beta} = \beta_1, \ldots, \beta_{k-1}, \beta_k\beta_0\). Let \(\bar{\varrho}\) and \(\bar{\varrho}'\) denote the sequence of pairs \[\begin{align} \bar{\varrho} &=(\rho_1,\rho_2), \ldots, (\rho_{k-1},\rho_k), (\rho_k,\rho_1)\\ \bar{\varrho}' &=(\rho'_1,\rho'_2), \ldots, (\rho'_{k-1},\rho'_k), (\rho'_k,\rho'_1). \end{align}\] Then, one of the following holds.
For each \(i\in [1,k]\), \((\bar{\alpha})_i\) and \((\bar{\beta})_i\)are inner witnesses of \((\bar{\varrho})_i\) and \((\bar{\varrho}')_i\) respectively, and we have \[\mathit{fst}(M) \sim \mathit{snd}(M) \mathrel{\mathpalette\subset@sim\relax}\rho_i^* \sim \rho_i'^*\] for each for each \(i\in [1,k]\).
There is a unique \(i\in [1,k]\) such that \((\bar{\alpha})_i\) is not an inner witness of \((\bar{\varrho})_i\) and there is a unique \(j\in [1,k]\) such that \((\bar{\beta})_j\) is not an inner witness of \((\bar{\varrho}')_i\), and we have \[\begin{align} \mathit{fst}(M) &\sim \mathit{snd}(M) \mathrel{\mathpalette\subset@sim\relax}\alpha_i\dots \alpha_k\alpha_0 \dots a_{i-1}\rho_i^* \sim \beta_j\dots \beta_k\beta_0 \dots \beta_{j-1}{\rho_j'}^*. \end{align}\]
Towards this, we first show that each \(G_i^*\), for \(i \in [1,k]\), have infinitely many witnesses and hence \(G_i^* \subseteq (\rho_i,\rho_i')^*\) for some conjugate primitive pair \((\rho_i,\rho_i')\) for \(i\in [1,k]\). Moreover, for all \(i,j \in [1,k]\), \(\rho_i \sim \rho_i' \sim \rho_j \sim \rho_j'\).
Lemma 15. Assume that a differentially-pumped pair \((u,v)\) from 9 has a long cut. Then the primitive roots of pairs \((u_i,v_i)\) for \(i \in [1,k]\) in \((u,v)\) are conjugate, i.e.,
\[\label{eq:rhoconjugate} \rho_{u_1} \sim \rho_{v_1} \sim \rho_{u_2} \sim \rho_{v_2} \cdots \sim \rho_{u_k} \sim \rho_{v_k}.\qquad{(2)}\]
Proof. There are three cases for a long cut \((p,q)\) in \((u,v)\):
The cut \(p\) in \(u\) ends in the second half of the block \(B_i\) for \(1 \leq i < k\).
The cut \(p\) in \(u\) ends after the block \(B_{i-1}\) and before the second half of the block \(B_i\) for \(1 < i \leq k\).
The cut \(p\) in \(u\) ends in the second half of the block \(B_k\).
Note that whenever the cut \(p\) in \(u\) ends in the first half of block \(B_1\), or ends after the block \(B_k\), either \(p\) or \(q\) is short. Since \(p\) and \(q\) are long, \(|p\beta_0| > |\alpha_0u_1^{j_1-1}| \geq|u_1^{j_1-1}| \geq 2k \cdot \max(C,\ell)\) (since \(j_1 > 2k \cdot \max(C,\ell)\)). Therefore \[\begin{align} \label{eq:124p124} |p| > 2k \cdot \max(C,\ell) - |\beta_0|. \end{align}\tag{24}\]
For \(i \in [1,k]\), let \(B_i^f\) and \(B_i^s\) represent the first and second halves of the block \(B_i\), respectively. Similarly, let \(B_i'^f\) and \(B_i'^s\) represent the first and second halves of the block \(B_i'\), respectively. Clearly, \(|B_i^f| = |B_i'^f|\) and \(|B_i^s| = |B_i'^s|\). Since \(|B_1| > 2k \cdot \max(C,\ell)\) \(|B_1^f|\), we have \(|B_1^s| \geq k \cdot max(C,\ell)\). Similarly, from ?? , we get that for each \(i \in [2,k]\), \[|B_1| + |B_2| + \cdots |B_{i-1}| + C \leq |B_i^f| = |B_i^s|\] \[\begin{align} u' &= \alpha_0\,\overbrace{u_1 \cdots }^{B_1^f} \overbrace{\cdots u_1}^{B_1^s}\alpha_1\overbrace{u_2 \cdots}^{B_2^f}\overbrace{\cdots u_2}^{B_2^s}\alpha_2 \cdots \overbrace{u_k \cdots}^{B_k^f}\overbrace{\cdots u_k}^{B_k^s}\alpha_k \\ v' &= \beta_0\,\underbrace{v_1 \cdots }_{B_1'^f} \underbrace{\cdots v_1}_{B_1'^s} \beta_1 \underbrace{v_2 \cdots}_{B_2'^f}\underbrace{\cdots v_2}_{B_2'^s} \beta_2 \, \cdots \underbrace{v_k \cdots}_{B_k'^f}\underbrace{\cdots v_k}_{B_k'^s} \beta_k \end{align}\] We now show that, in all the above cases for long cut, ?? holds.
When the cut \(p\) in \(u\) ends in \(B_i^s\) for \(1 \leq i < k\):
\[\begin{align} u &= \overbrace{\alpha_0 \cdots B_i^f B_i^s}^{p} \alpha_i \cdots B_{k}\alpha_k\\ v &= \beta_0 \cdots {B_i'^f}{B_i'^s} \beta_i \cdots {B_k'^f}\underbrace{B_k'^s\beta_k}_{p} \end{align}\]
Since \(|p| < |\alpha_0B_1 \cdots \alpha_{i-1}B_i| < |B_1| + \cdots + |B_{i}| + C < |B_k'^s|\), \(p\) in \(v\) is matched/contained in \(B_k'^s\beta_k\). The length of each block \(B_j\) for \(j \in [1,i]\) in \(u\) is at least \(\ell\). Therefore, by virtue of 5, \(\rho_{u_j} \sim \rho_{v_k}\). Hence, for all \(j \in [1,i]\), \[\label{eqcase1:1} \rho_{v_j} \sim \rho_{u_j} \sim \rho_{v_k} \sim \rho_{u_k}.\tag{25}\] Now, on matching the suffixes of \(q\) in \(u\) and \(v\), we get that a prefix of \(B_k\) of length \(|p(\beta_k)^{-1}| - |\alpha_k|\) matches with suffix of \(B_{k-1}'\beta_{k-1}\). Hence, there exists a common factor between blocks \(B_k\) and \(B_{k-1}'\) of length atleast \[\begin{align} |p(\beta_k)^{-1}| - |\alpha_k| - |\beta_{k-1}| &= |p| - |\beta_k|-|\alpha_k| - |\beta_{k-1}| \\ &\geq 2k \cdot \max(C,\ell) - |\beta_0|- |\beta_k|-|\alpha_k| - |\beta_{k-1}| && (\text{By \Cref{eq:124p124}})\\ &\geq 2k \cdot \max(C,\ell) - 2C\\ &\geq 2(k-1) \cdot \max(C,\ell) \\ &> \ell. \end{align}\] By 5, we get that \(\rho_{v_k} \sim \rho_{u_k} \sim \rho_{v_{k-1}} \sim \rho_{u_{k-1}}\). Continuing inductively, for all \(j \in [i+1,k]\), we get that there exists a common factor between blocks \(B_j\) and \(B_{j-1}'\) of length atleast \[\begin{align} |p(\beta_k)^{-1}| - \sum_{n \in [j, \ldots, k]} |\alpha_n| - \sum_{n \in [j-1, \ldots, k-1]}|\beta_{n}| &=|p| -|\beta_k|- \sum_{n \in [j, \ldots, k]} |\alpha_n| - \sum_{n \in [j-1, k-1]}|\beta_{n}| \\ &\geq 2k \cdot \max(C,\ell) - 2C \\ &\geq 2(k-1) \cdot \max(C,\ell) \\ &> \ell. \end{align}\] Hence, for \(j \in [i+1,k]\), by 5, we deduce that \[\label{eq:case1:2} \rho_{u_k} \sim \rho_{v_{k-1}} \sim \rho_{u_{k-1}} \cdots \sim \rho_{v_{i+1}} \sim \rho_{u_{i+1}}.\tag{26}\] By combining Equations 25 and 26 , we get that ?? holds.
When the cut \(p\) in \(u\) ends after the block \(B_{i-1}\) and before the block \(B_i^s\) for some \(1 < i \leq k\):
\[\begin{align} u &= \overbrace{\alpha_0 \cdots{B_{i-1}}\alpha_{i-1}{B_i^f}}^{p}\overbrace{{B_i^s} \alpha_i\cdots \alpha_k}^{q} \\ v &= \beta_0 \cdots {B_{i-1}'} \beta_{i-1} {B_i'^f}{B_i'^s} \beta_i \cdots \beta_k \end{align}\]
In this case, while comparing the prefixes of \(q\) in \(u\) and \(v\), since \(|B_i^f|,|B_i^s| > |B_1| + \cdots |B_{i-1}| + C = |B_1'| + \cdots |B_{i-1}'| + C\), the prefix \(\beta_0 B_1' \cdots B_{i-1}'\beta_{i-1}\) of \(q\) in \(v\) is matched within the block \(B_i\). Since length of each block \(B_j'\) for \(j \in [1,i-1]\) is at least \(\ell\), by virtue of 5, \(\rho_{v_j} \sim \rho_{u_i}\). Therefore, for all \(j \in [1,i-1]\) \[\label{eqcase3:1} \rho_{u_j} \sim \rho_{v_j} \sim \rho_{v_i} \sim \rho_{u_i}.\tag{27}\]
On further matching \(q\) in \(v\) and \(u\) , there exists a suffix of the block \(B_i'\) of length at least \[\begin{align} |\beta_0 B_1' \cdots B_{i-1}'\beta_{i-1}B_i'| - |\alpha_{i-1}B_i| &= |\beta_0 B_1' \cdots B_{i-1}'\beta_{i-1}| - |\alpha_{i-1}| \\ &\geq |B_1'| - |\alpha_{i-1}| &&(\text{Since i \geq 2})\\ &\geq 2k\max(C,\ell) - |\alpha_{i-1}| \end{align}\] to match with \(\alpha_iB_{i+1}\). Hence, \(B_i'\) and \(B_{i+1}\) share a common factor of length atleast \[\begin{align} 2k\max(C,\ell) - |\alpha_{i-1}| - |\alpha_{i}| &\geq 2k\max(C,\ell) - C \\ &\geq 2(k-1)\max(C,\ell)\\ &> \ell. \end{align}\] From 5, we get that \(\rho_{u_i} \sim \rho_{v_i} \sim \rho_{u_{i+1}} \sim \rho_{v_{i+1}}\).
Continuing inductively, for all \(j \in [i, k-1]\), we get that blocks \(B_j'\) and \(B_{j+1}\) share a common factor of length atleast \[2k \max(C,\ell) - \sum_{n \in [i-1, j]}|\alpha_n| - \sum_{n \in [i, j-1]}|\beta_{n}| \geq 2(k-1) \cdot \max(C,\ell) > \ell.\]
From 5, we get that \(\rho_{v_j} \sim \rho_{u_{j+1}}\) for \(j \in [i, k-1]\). By transitivity of conjugacy, we get \[\label{eqcase3:2} \rho_{u_i} \sim \rho_{v_i} \sim \rho_{v_{i+1}} \sim \rho_{v_{i+1}} \sim \cdots \sim \rho_{u_k} \sim \rho_{v_k}.\tag{28}\] Combining Equations 27 and 28 , we get that ?? holds.
The cut \(p\) in \(u\) ends within \(B_k^s\): \[\begin{align} u &= \overbrace{\alpha_0\,{B_1^f} {B_1^s}\alpha_1{B_2^f}{B_2^s}\alpha_2 \cdots {B_k^f}{B_k^s}}^{p}\overbrace{\alpha_k^{\phantom{f}}}^{q} \\ v &= \beta_0\,{B_1'^f} {B_1'^s} \beta_1 {B_2'^f}{B_2'^s} \beta_2 \, \cdots{B_k'^f}{B_k'^s} \beta_k \end{align}\]
Since \(q\) is not short, \(|q\alpha_0| > |\beta_0v_1^{j_1-1}| \geq |v_1^{j_1-1}| \geq 2k\max(C,\ell)\) (since \(j_1 > 2k \cdot \max(C,\ell))\). Also, by assumption, \(|q| \leq |B_k'^s\alpha_k|\). While matching the \(q\) in \(u\) and \(v\), there exists a maximal \(i \in [1,k-1]\), such that \(\beta_0B_1' \cdots B_i'^f\) is a proper prefix of \(q\) in \(v\). Since \(|B_j'^f|\) for \(j \in [1,i]\) is atleast \(\geq k\max(C,\ell) > \ell\), and \(|B_j'^f|\) is matched within the block \(B_k\), by virtue of 5, \(\rho_{v_j} \sim \rho_{u_k}\). Therefore, for all \(j \in [1,i]\) \[\label{eqcase4:1} \rho_{u_j} \sim \rho_{v_j} \sim \rho_{v_k} \sim \rho_{u_k}.\tag{29}\]
If \(i = k-1\), then we are done. Otherwise, assume that \(i \leq k-2\). Now, matching the prefix of \(p\) in \(u\) and \(v\), we get that a suffix of block \(B_{i+1}\) of length atleast \[\begin{align} |\alpha_0 \cdots B_i\alpha_iB_{i+1}| - |q^{-1}(\beta_0B_1' \cdots B_{i+1}'\beta_{i+1})| &= |q| - (|\alpha_0 \cdots \alpha_i| - |\beta_0 \cdots \beta_{i+1}|) \\ &\geq |q|-C \\ &\geq 2k\max(C,\ell) \\ &> \ell \end{align}\] matches with block \(B_{i+2}'\), and hence \(\rho_{u_{i+1}} \sim \rho_{v_{i+2}}\) by 5. Continuing inductively, we get for \(j \in [(i+1),(k-1)]\), block \(B_{j}\) and \(B_{j+1}'\) shares a common factor of length atleast \(2(k-1)\max(C,\ell) > \ell\), and by 5, \[\label{eqcase4:2} \rho_{v_j} \sim \rho_{u_{j}} \sim \rho_{v_{j+1}} \sim \rho_{u_{j+1}}.\tag{30}\] Combining Equations 29 and 30 , we get that ?? holds.
◻
As a consequence of 15, we get the following.
Corollary 4. Assume that \(M\) is conjugate. Whenever a differentially-pumped pair in \(M\) has a long cut, each Kleene closure \(G_i^*\) of \(M\), for \(i \in [1,k]\), has infinitely many common witnesses. Moreover, \[\label{eq:Mform} M \subseteq (\alpha_0,\beta_0)(\rho_1,\rho_1')^* (\alpha_{1},\beta_{1}) \cdots (\rho_k,\rho_k')^*(\alpha_k,\beta_k).\qquad{(3)}\] for some \(\rho_1 \sim \rho_1' \sim \cdots \rho_k \sim \rho_k'\).
Proof. By virtue of Item 3 of 8, if there exists \(G_i^*\), for some \(i\in[1,k]\), with a unique common witness, then every differentially pumped pair \((u,v)\) constructed satisfies \(\rho_{u_j} \not \sim \rho_{u_{\ell}}\) for some \(j,\ell \in [1,k], j \neq \ell\). Therefore, if a a differentially-pumped pair in \(M\) has a long cut, each Kleene closure \(G_i^*\) has infinitely many witnesses, and therefore \(G_i^* \subseteq (\rho_i,\rho_i')^*\) for some primitive pair \((\rho_i,\rho_i')\). Since by 15, \(\rho_i \sim \rho_j\) for all \(i,j\in[1,k]\) the claim follows. ◻
Therefore, in the long cut case, \[\label{jeugkhqt} M \subseteq (\alpha_0,\beta_0)(\rho_1,\rho_1')^* \cdots (\alpha_{k-1},\beta_{k-1})(\rho_k,\rho_k')^*(\alpha_k,\beta_k).\tag{31}\] such that \(\rho_1 \sim \rho_1' \sim \cdots \rho_k \sim \rho_k'\). Hence, \(|\rho_1| = \cdots = |\rho_k| = |\rho'_1| = \cdots = |\rho'_k|\), and let \(d\) denote this common length where \(d= |\rho_1| = \cdots = |\rho_k|\). We use the following shorthand for the rest of the section.
Definition 12. Let \(\bar{\alpha} = \alpha_1, \ldots, \alpha_{k-1}, \alpha_k\alpha_0\) and \(\bar{\beta} = \beta_1, \ldots, \beta_{k-1}, \beta_k\beta_0\). Let \(\bar{\varrho}\) and \(\bar{\varrho}'\) denote the sequence of pairs \[\begin{align} \bar{\varrho} &=(\rho_1,\rho_2), \ldots, (\rho_{k-1},\rho_k), (\rho_k,\rho_1)\\ \bar{\varrho}' &=(\rho'_1,\rho'_2), \ldots, (\rho'_{k-1},\rho'_k), (\rho'_k,\rho'_1) \end{align}\]
Definition 13 (\(d\)-near). Assume that \((u,v) \in M\) is conjugate with a cut \((x,y)\). We say \(\alpha\in \bar{\alpha}\) and \(\beta\in \bar{\beta}\) overlap if some position of \(\alpha\) matches (recall 4) with some position of \(\beta\) w.r.t. the cut \((x,y)\). Note that if \(\alpha\) and \(\beta\) do not overlap, then the nearest positions according to the matching are either the first position of \(\alpha\) and the last position of \(\beta\) or vice versa. We say \(\alpha\) and \(\beta\) are \(d\)-near* w.r.t. the cut \((x,y)\) for some \(d \in \mathbb{N}\) if either they overlap or there are at most \(d\)-many positions between their nearest positions.*
For a sequence of words \(\bar{s} = s_1, s_2, \cdots, s_n\), we denote by \((\bar{s})_i\), for \(i \in [1,n]\), as the \(i\)-th word \(s_i\) in the sequence.
Lemma 16. Assume that a differentially-pumped pair \((u,v)\) from 9 has a long cut \((p,q)\), and let \(d = |\rho_1| = \cdots = |\rho_k|\). Then precisely one of the following is true.
None of the pairs \(((\bar{\alpha})_i,(\bar{\beta})_j)\) for \(i, j\in[1,k]\) are \(d\)-near. In this case, the word \((\bar{\alpha})_i\) is an inner witness of the pair \((\bar{\varrho})_i\), and the word \((\bar{\beta})_i\) is an inner witness of \((\bar{\varrho}')_i\) for each \(i\in [1,k]\).
There exist a unique pair \(((\bar{\alpha})_i,(\bar{\beta})_j)\) for some \(i\neq j\in[1,k]\) that are \(d\)-near w.r.t. the cut \((p,q)\). Moreover, \((\bar{\alpha})_l\) is an inner witness of the pair \((\bar{\varrho})_l\) for each \(l\in [1,k]\setminus \{i\}\), and \((\bar{\beta})_l\) is an inner witness of the pair \((\bar{\varrho}')_l\) for each \(l \in [1,k]\setminus \{j\}\).
Proof. In the definition of \((u,v)\), recall that \(\ell = 2\cdot \max\{|u_i| \mid i \in [1,k]\} \geq 2\cdot d\).
Firstly, we prove that in the long cut \((p,q)\) of \((u,v)\) there is at most one pair \((\bar{\alpha})_i\) and \((\bar{\beta})_j\) for some \(i,j \in [1,k]\) that are \(d\)-near.
Assume there exist \(i,{i'}, j, {j'} \in [1,k]\) such that \((\bar{\alpha})_i\) and \((\bar{\beta})_j\), as well as, \((\bar{\alpha})_{i'}\) and \((\bar{\beta})_{j'}\) are \(d\)-near. By definition of the pair \((u,v)\), we have \(i=i'\) if and only if \(j=j'\) since a word in \(\bar{\alpha}\) can be \(d\)-near with at most one word in \(\bar{\beta}\) and vice-versa. Hence, assume for the sake of contradiction that \(i \neq i'\) and \(j \neq j'\).
We claim that \(i \neq j\) and \(i' \neq j'\). For the sake of contradiction assume that \(i=j\), i.e., \((\bar{\alpha})_i\) and \((\bar{\beta})_i\) are \(d\)-near. We do a case analysis. When \(i=k\), i.e., when \((\bar{\alpha})_k = \alpha_k\alpha_0\) and \((\bar{\beta})_k = \beta_k\beta_0\) are \(d\)-near then either \(p\) or \(q\) is short since \(\min(|p|,|q|) \leq \max(|\alpha_k\alpha_0|, |\beta_k\beta_0|) + d\). Therefore, \[\begin{align} \min(|p\beta_0|,|q\alpha_0|) &\leq 2C +d \\ &< 2C + \ell\\ &<2k\cdot \max(C,\ell) &&\text{(Since k \geq 2)} \end{align}\]
contradicting the assumption that the cut is long. Next assume that \(i \neq k\). In this case, note that \((\bar{\alpha})_i = \alpha_i\) and \((\bar{\beta})_i = \beta_i\). Since \(\alpha_i\) and \(\beta_i\) are \(d\)-near, matching the suffix \(\alpha_iB_{i+1}\alpha_{i+1} \cdots \alpha_{k-1}B_k\alpha_k\) with \(\beta_iB'_{i+1}\beta_{i+1} \cdots \beta_{k-1}B'_k\beta_k\), we get a suffix of length \(d + \sum_{l=i}^{k}|\alpha_l| - \sum_{l=i}^{k}|\beta_l| \leq d+ C\) either in \(u\) or \(v\) to be matched with the prefix of the other. Thus, \(\min(|p|,|q|) \leq C + d\), and hence \(\min(|p\beta_0|,|q\alpha_0|) \leq 2C + d < 2k\cdot \max(C,\ell)\). Hence, either \(p\) or \(q\) is short, contradicting the assumption that the cut is long. Therefore, we conclude that \(i \neq j\). By a similar argument \(i' \neq j'\).
WLOG we can assume that \(i <i'\). We have two cases: either \(j<j'\) or \(j'<j\). Assume \(j <j'\). Since \((\bar{\alpha})_i\) and \((\bar{\beta})_j\), as well as, \((\bar{\alpha})_{i'}\) and \((\bar{\beta})_{j'}\) are \(d\)-near, by matching the infix of \(u\) and \(v\) defined by \((\bar{\alpha})_i, (\bar{\alpha})_{i'}\) and \((\bar{\beta})_j, (\bar{\beta})_{j'}\), namely \((\bar{\alpha})_iB_{i+1} \cdots B_{i'}(\bar{\alpha})_{i'}\) and \((\bar{\beta})_jB_{j+1}' \cdots B'_{j'}(\bar{\beta})_{j'}\), we note that \[\label{ijeq} \left | \, |(\bar{\alpha})_iB_{i+1} \cdots B_{i'}(\bar{\alpha})_{i'}| - |(\bar{\beta})_jB'_{j+1} \cdots B'_{j'}(\bar{\beta})_{j'}| \, \right | \leq C + 2\cdot d\tag{32}\] If \(i' > j'\), then \(|B_{i'}| > 2 \cdot (|B'_1| + \cdots + |B'_{j'}| + C)\) by definition of pair \((u,v)\). Hence, \[\begin{align} \left | \, |(\bar{\alpha})_iB_{i+1} \cdots B_{i'}(\bar{\alpha})_{i'}| - |(\bar{\beta})_jB'_{j+1} \cdots B'_{j'}(\bar{\beta})_{j'}| \, \right | \geq 1/2\cdot |B_{i'}| > k\cdot \max(C,\ell) > C+2 \cdot d. \end{align}\] Therefore, contradicting 32 . Similarly, the case when \(j' > i'\) also contradicts 32 . Thus, the case of \(j < j'\) leads to a contradiction.
Next assume that \(j' <j\). Observe that \((\bar{\alpha})_iB_{i+1} \cdots B_{i'}(\bar{\alpha})_{i'}\) and \((\bar{\beta})_jB'_{j+1} \cdots B'_k(\bar{\beta})_k B'_1 \cdots B'_{j'}(\bar{\beta})_{j'}\) (or equivalently the factors \((\bar{\alpha})_{i'}B_{i'+1} \cdots B_k(\bar{\alpha})_k B_1 \cdots B_{i}(\bar{\alpha})_{i}\) and \((\bar{\beta})_{j'}B'_{j'+1} \cdots B'_{j}(\bar{\beta})_{j}\)) are the factors defined by \((\bar{\alpha})_i, (\bar{\alpha})_{i'}\) in \(u\) and \((\bar{\beta})_j, (\bar{\beta})_{j'}\) in \(v\)). Let \(d'=\left | \, |(\bar{\alpha})_iB_{i+1} \cdots B_{i'}(\bar{\alpha})_{i'}| - |(\bar{\beta})_jB'_{j+1} \cdots B'_k(\bar{\beta})_k B'_1 \cdots B'_{j'}(\bar{\beta})_{j'}|\, \right |\). Since \((\bar{\alpha})_i\) and \((\bar{\beta})_j\), as well as, \((\bar{\alpha})_{i'}\) and \((\bar{\beta})_{j'}\) are \(d\)-near, \[\label{i39jeq} d' \leq C + 2\cdot d.\tag{33}\] If \(i'\neq k\), then \(|B'_{k}| > 2 \cdot (|B_1| + \cdots + |B_{i'}| + C)\). Hence, \(d' \geq 1/2\cdot |B'_{k}| > C + 2\cdot d\). Therefore, contradicting 33 . The case when \(i' = k\) is symmetric to the above case by considering the factors \((\bar{\alpha})_k B_1 \cdots B_{i}(\bar{\alpha})_{i}\) and \((\bar{\beta})_{j'}B'_{j'+1} \cdots B'_{j}(\bar{\beta})_{j}\) defined by \((\bar{\alpha})_i, (\bar{\alpha})_{i'}\) in \(u\) and \((\bar{\beta})_j, (\bar{\beta})_{j'}\) in \(v\).
Therefore, there does not exist \(i,i',j,j' \in [1,k]\), \((i,j) \neq (i',j')\), such that \((\bar{\alpha})_i\) and \((\bar{\beta})_j\), as well as, \((\bar{\alpha})_i'\) and \((\bar{\beta})_j'\) are \(d\)-near, i.e., there exists at most one pair \((i,j)\) such that \((\bar{\alpha})_i\) and \((\bar{\beta})_j\) are \(d\)-near. Moreover, \(i \neq j\).
For some \(i \in [1,k]\), assume that \((\bar{\alpha})_i \in \bar{\alpha}\) is not \(d\)-near with any word in \(\bar{\beta}\). This implies that in the matching of \(u\) and \(v\) w.r.t. the cut \((p,q)\), the factor \(\rho_i (\bar{\alpha})_i \rho_{i+1}\) (with \(\rho_{i+1} = \rho_1\) when \(i=k\)) is matched within some block of \(\rho_j'^*\) for some \(j \in [1,k]\). Since \(\rho_i \sim \rho_{i+1} \sim \rho_j'\), it follows from [prop:iwredux] that \((\bar{\alpha})_i\) is an inner witness of \((\bar{\rho})_i = (\rho_i,\rho_{i+1})\). Similarly, for any \(i \in [1,k]\), if \((\bar{\beta})_i \in \bar{\beta}\) is not \(d\)-near with any word in \(\bar{\alpha}\), then \((\bar{\beta})_i\) is an inner witness of \((\bar{\rho'})_i = (\rho'_i,\rho'_{i+1})\) (with \(\rho'_{i+1} = \rho'_1\) when \(i=k\)). Hence, the claim is proved. ◻
Lemma 17. Let \(1\leq i < j \leq k\). Assume that \((\bar{\alpha})_\ell\) is an inner witness of \((\bar{\rho})_\ell = (\rho_{\ell},\rho_{\ell+1})\) (with \(\rho_{\ell+1}= \rho_1\) when \(\ell=k\)), for all \(\ell \in [i,j]\). Then, \((\bar{\alpha})_i \cdots (\bar{\alpha})_j\) is an inner witness of \((\mathit{fst}((\bar{\rho})_i),\mathit{snd}((\bar{\rho})_j)\), and moreover, \[\begin{align} \rho_i^*(\bar{\alpha})_i \rho_{i+1}^*(\bar{\alpha})_{i+1} \cdots (\bar{\alpha})_{j}\rho^*_{j+1} &= \rho_i^*(\bar{\alpha})_i \cdots (\bar{\alpha})_j\\ &= (\bar{\alpha})_i \cdots (\bar{\alpha})_j \rho_{j+1}^*. \end{align}\]
Further, if \(1 \leq j < i \leq k\) and \((\bar{\alpha})_\ell\) is an inner witness of \((\bar{\rho})_\ell = (\rho_{\ell},\rho_{\ell+1})\) (with \(\rho_{\ell+1}= \rho_1\) when \(\ell=k\)), for all \(\ell \in [i,k] \cup [1, j]\), then \((\bar{\alpha})_i \cdots (\bar{\alpha})_k(\bar{\alpha})_1\cdots (\bar{\alpha})_j\) is an inner witness of \((\mathit{fst}((\bar{\rho})_i),\mathit{snd}((\bar{\rho})_j)\), and moreover, \[\begin{align} \rho_i^*(\bar{\alpha})_i \rho_{i+1}\cdots (\bar{\alpha})_{k}\rho^*_{1}(\bar{\alpha})_1 \rho_{2}\cdots (\bar{\alpha})_{j}\rho^*_{j+1} &= \rho_i^*(\bar{\alpha})_i \cdots (\bar{\alpha})_k(\bar{\alpha})_{1} \cdots (\bar{\alpha})_j\\ &= (\bar{\alpha})_i \cdots (\bar{\alpha})_k(\bar{\alpha})_{1} \cdots (\bar{\alpha})_j \rho_{j+1}^*. \end{align}\]
Proof. Since by assumption \(\;\rho_\ell^{n}(\bar{\alpha})_\ell = (\bar{\alpha})_\ell\rho_{\ell+1}^{n}\) for all \(\ell \in [i,j]\) and \(\forall n\geq 0\), we have \[\begin{align} \rho_i^*(\bar{\alpha})_i \rho_{i+1}^*(\bar{\alpha})_{i+1}\cdots (\bar{\alpha})_{j-1}\rho^*_{j}(\bar{\alpha})_{j}\rho^*_{j+1} &=\rho_i^*(\bar{\alpha})_i \rho_{i+1}^*(\bar{\alpha})_{i+1}\cdots(\bar{\alpha})_{j-1}\rho^*_{j}(\bar{\alpha})_{j}\\ &=\rho_i^*(\bar{\alpha})_i \rho_{i+1}^*(\bar{\alpha})_{i+1}\cdots \rho^*_{j-1} (\bar{\alpha})_{j-1}(\bar{\alpha})_{j}\\ &=\rho_i^*(\bar{\alpha})_i \cdots (\bar{\alpha})_{j} && (\text{By induction on the interval [i,j]}) \end{align}\] By an analogous argument, \[\begin{align} \rho_i^*(\bar{\alpha})_i \rho_{i+1}^*(\bar{\alpha})_{i+1}\cdots (\bar{\alpha})_{j-1}\rho^*_{j}(\bar{\alpha})_{j}\rho^*_{j+1} &=(\bar{\alpha})_i \cdots (\bar{\alpha})_{j}\rho_{j+1}^*. \end{align}\] From the above, we infer that \((\bar{\alpha})_i \cdots (\bar{\alpha})_{j}\) is an inner witness of the pair \((\rho_i, \rho_{j+1})=(\mathit{fst}((\bar{\rho})_i),\mathit{snd}((\bar{\rho})_j)\).
Next assume that \(1 \leq j \leq i \leq k\) and \((\bar{\alpha})_\ell\) is an inner witness of \((\bar{\rho})_\ell = (\rho_{\ell},\rho_{\ell+1})\) (with \(\rho_{\ell+1}= \rho_1\) when \(\ell=k\)), for all \(\ell \in [i,k] \cup [1, j]\). By the above observation, \[\begin{align} \rho_i^*(\bar{\alpha})_i \rho_{i+1}\cdots (\bar{\alpha})_{k}\rho^*_{1} &=(\bar{\alpha})_i \cdots (\bar{\alpha})_{k}\rho_{1}^*\\ &=\rho_{i}^*(\bar{\alpha})_i \cdots (\bar{\alpha})_{k}\label{eq:97} \end{align}\tag{34}\] \[\begin{align} \rho_1^*(\bar{\alpha})_1 \rho_{2}\cdots (\bar{\alpha})_{j}\rho^*_{j+1} &=(\bar{\alpha})_1 \cdots (\bar{\alpha})_{j}\rho_{j+1}^*\\ &=\rho_{1}^*(\bar{\alpha})_1 \cdots (\bar{\alpha})_{j} \label{eq:99} \end{align}\tag{35}\] From the above equations, we get that \[\begin{align} \rho_i^*(\bar{\alpha})_i \rho_{i+1}\cdots (\bar{\alpha})_{k}\rho^*_{1}(\bar{\alpha})_1 \rho_{2}\cdots (\bar{\alpha})_{j}\rho^*_{j+1} &= \rho_i^*(\bar{\alpha})_i \rho_{i+1}\cdots (\bar{\alpha})_{k}\rho^*_{1}(\bar{\alpha})_1 \cdots (\bar{\alpha})_{j} &&\text{(Using \Cref{eq:99})}\\ &= \rho_{i}^*(\bar{\alpha})_i \cdots (\bar{\alpha})_{k}(\bar{\alpha})_1 \cdots (\bar{\alpha})_{j} &&\text{(Using \Cref{eq:97})}\\ &=(\bar{\alpha})_i \cdots (\bar{\alpha})_{k}(\bar{\alpha})_1 \cdots (\bar{\alpha})_{j}\rho_{j+1}^* &&\text{(Similarly)} \end{align}\]
From the above, we infer that \((\bar{\alpha})_i \cdots (\bar{\alpha})_{k}(\bar{\alpha})_1 \cdots (\bar{\alpha})_{j}\) is an inner-witness of the pair \((\rho_i, \rho_{j+1})=(\mathit{fst}((\bar{\rho})_i),\mathit{snd}((\bar{\rho})_j)\). ◻
Proof of [prop:long]. From 4, we get that \(M \subseteq (\alpha_0,\beta_0)(\rho_1,\rho_1')^* (\alpha_{1},\beta_{1}) \cdots (\rho_k,\rho_k')^*(\alpha_k,\beta_k)\) for some \(\rho_1 \sim \rho_1' \sim \cdots \rho_k \sim \rho_k'\). By virtue of 16, there are two cases.
Case 1: When the word \((\bar{\alpha})_i\) is an inner witness of \((\bar{\rho})_i\) for each \(i \in [1,k]\). Notice that by 17, \((\bar{\alpha})_1 \cdots (\bar{\alpha})_{k}\) is an inner witness of \((\rho_1,\rho_1)\), and hence \((\bar{\alpha})_1 \cdots (\bar{\alpha})_{k} \in \rho_1^*\) . We show that \(\mathit{fst}(M)\) is a cyclic shift of \(\rho_1^*\) as follows. \[\begin{align} \mathit{fst}(M) &\subseteq \alpha_0\rho_1^*\alpha_1\rho^*_2\alpha_2 \cdots \rho^*_k\alpha_k\\ &\sim \rho_1^*\alpha_1\rho^*_2\alpha_2 \cdots \rho^*_k\alpha_k\alpha_0\\ &= \rho_1^*(\bar{\alpha})_1\rho^*_2(\bar{\alpha})_2 \cdots \rho^*_k(\bar{\alpha})_k\\ &= \rho_1^*(\bar{\alpha})_1(\bar{\alpha})_2 \cdots(\bar{\alpha})_k &&\text{(By \Cref{interval:associative})}\\ &\subseteq \rho_1^*. &&\text{(Since (\bar{\alpha})_1 \cdots (\bar{\alpha})_{k} is an i.w of (\rho_1,\rho_1)) } \end{align}\] By a similar argument, we show that \(\mathit{snd}(M) \mathrel{\mathpalette\subset@sim\relax}\rho_1'^*\). Therefore, since \(M\) is conjugate, \(M \mathrel{\mathpalette\subset@sim\relax}(\rho_1,\rho_1')^*\) and hence has a common witness. Moreover, since \(\rho_1' \sim \rho_1\), \(\mathit{fst}(M)\) and \(\mathit{snd}(M)\) are cyclic shifts of \(\rho_1^*\).
Case 2: When there exists a unique pair \((i,j)\), \(i\neq j\in[1,k]\), such that for all \(l\in [1,k]\setminus \{i\}\), \((\bar{\alpha})_l\) is an inner witness of the pair \((\bar{\varrho})_l\), and for all \(l \in [1,k]\setminus \{j\}\), \((\bar{\beta})_l\) is an inner witness of the pair \((\bar{\varrho}')_l\). \[\begin{align} \mathit{fst}(M) &\subseteq \alpha_0\rho_1^*\alpha_1\rho^*_2\alpha_2 \cdots \rho^*_k\alpha_k\\ &\sim \rho_1^*\alpha_1\rho^*_2\alpha_2 \cdots \rho^*_k\alpha_k\alpha_0\\ &= \rho_1^*(\bar{\alpha})_1\rho^*_2(\bar{\alpha})_2 \cdots \rho^*_k(\bar{\alpha})_k\\ &\sim (\bar{\alpha})_i\rho_{i+1}^* \cdots (\bar{\alpha})_k \rho_{1}^* (\bar{\alpha})_1 \cdots (\bar{\alpha})_{i-1}\rho^*_i\\ &= (\bar{\alpha})_i \cdots (\bar{\alpha})_k(\bar{\alpha})_1 \cdots (\bar{\alpha})_{i-1}\rho^*_i &&\text{(By \Cref{interval:associative})} \end{align}\]
Therefore, we have \(\mathit{fst}(M) \sim \mathit{snd}(M) \mathrel{\mathpalette\subset@sim\relax}(\bar{\alpha})_i \cdots (\bar{\alpha})_k(\bar{\alpha})_1 \cdots (\bar{\alpha})_{i-1}(\rho_i)^*\). By an analogous argument, \(\mathit{fst}(M) \sim \mathit{snd}(M) \mathrel{\mathpalette\subset@sim\relax}(\bar{\beta})_j \cdots (\bar{\beta})_k(\bar{\beta})_1 \cdots (\bar{\beta})_{j-1}(\rho_j')^*\), and the claim follows. ◻
In this section, we give a decision procedure to compute the common witness of a sumfree expression, if it exists. A sumfree expression can have no common witness, a unique common witness, or infinitely many common witnesses. Thus, the set of common witnesses (abbreviated as the witness set) is either empty, singleton, or infinite. Whenever there are infinitely many common witnesses for an expression, the witnesses are the same as those of its primitive root ([infmanycwcorr]). In that case we compute the primitive root as their finite representation.
The following proposition shows that there is a bound to the size of the unique common witness of two conjugate pairs if it exists, which aids in computing the common witness of two pairs in linear time.
If two conjugate primitive pairs \((u_1,v_1)\) and \((u_2,v_2)\) have a unique common witness \(z\), then \(|z| \leq 2 \cdot \max(|u_1|,|u_2|)\).
Proof. Let \(z\) be a common inner witness. Therefore, \(z = (x_1y_1)^{n_1}x_1 = (x_2y_2)^{n_2}x_2\) for some \(n_1,n_2 \geq 0\) where \((x_i,y_i)\) is a cut of the primitive pair \((u_i,v_i)\) for \(i \in \{1,2\}\). We claim either \(n_1\) or \(n_2\) is less than \(2\). Suppose not, i.e., \(n_1 \geq 2\) and \(n_2 \geq 2\). Thus \(u_1^\omega\) and \(u_2^\omega\) share a common prefix of length at least \(|u_1| + |u_2|\). From 4, they have the same primitive root. It implies that \(x_1y_1 = x_2y_2\) since \(u_1\) and \(u_2\) are primitive words. Since \((x_1y_1)^{n_1}x_1 = (x_2y_2)^{n_2}x_2\), \(x_1y_1 = x_2y_2\) and \(|x_1|,|x_2| < |x_1y_1|\), we obtain \(n_1 = n_2\), and hence, \(x_1 = x_2\). This implies \(y_1 = y_2\) and hence, \(y_1x_1 = y_2x_2\). Both \((u_1,v_1)\) and \((u_2,v_2)\) are the same word; thus, they have infinitely many common witnesses, that is a contradiction. Hence \(|z| \leq 2 \cdot \mathit{max}\{|u_1|,|u_2|\}\).
The case for common outer witness is symmetric. ◻
The above proposition holds true for any two conjugate pairs (not necessarily primitive) by [samewitnessext].
The witness set of two conjugate pairs can be computed in linear time.
Proof. Since the common witness for a set and its primitive root are the same ([samewitnessext]), we compute the witness set for the primitive roots of the given two conjugate pairs. We can compute the primitive roots in linear time by [computeroot]. Let \(G = \{(u_1,v_1), (u_2,v_2)\}\) be the set of primitive roots of the given conjugate pairs and let \((x_i,y_i)\) be the cut of \((u_i,v_i)\) for \(i \in \{1,2\}\). The cut of the primitive pair \((u_i,v_i)\) can be computed in linear time by finding the first nontrivial occurrence of \(v_i\) in \(u_iu_i\).
One of the following possibilities holds true for \(G\): it has no common witness, a unique common witness, or infinitely many common witnesses. The following algorithm outlines the computation of the witness set of \(G\):
Check if the primitive pairs are identical, i.e., verify if \(u_1 = u_2\) and \(v_1 = v_2\). If yes, then \(G\) has infinitely many common witnesses by [infmanycwcorr]. The witness is finitely represented by the primitive pair \((u_1,v_1)\). This step takes linear time w.r.t. the length of the primitive pairs.
If the pairs are not identical, then check if \(G\) has a unique common witness using [witlengthG] as follows: WLOG assume that \(|u_1| > |u_2|\). According to [witlengthG], if a unique common witness exists for \(G\), its length is at most \(2 \cdot \max(|u_1|,|u_2|) = 2 \cdot |u_1|\). Thus, it suffices to check whether \((x_1y_1)^\omega\) and \((x_2y_2)^\omega\) share equal prefixes of length \(|x_1|\) or \(|x_1y_1x_1|\), that also end in \(x_2\). If it is satisfied, then \(G\) has a unique common witness. This step can be performed in linear time w.r.t. the length of the primitive pairs.
If none of the above holds, then \(G\) has no common witness.
The overall complexity of the algorithm is linear w.r.t the length of the primitive roots of the given pairs. ◻
The witness set of a sumfree expression is equal to the intersection of witness sets of each of its singleton reduxes. So first, we show how to compute the witness set of a sumfree expression with only one Kleene star, in effect the witness set of a singleton redux. Using this procedure, we show how to compute the witness set of a general sumfree expression.
Lemma 18. Let \(M= (\alpha_0,\beta_0)E^*(\alpha_1,\beta_1)\) be a sumfree expression. Given the witness set of \(E\), we can compute the witness set of \(M\) in time \(\mathcal{O}(m + n)\) where \(m\) is the size of the expression \(M\), and \(n\) is the size of the witness of \(E\).
Proof. If redux of \(M\) is empty, then the witness set of \(M\) is same as the witness set of \(E\) by 6. Now assume that \(M\) has a nonempty redux. From 8, \(M\) has a common witness iff \(E \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) has a common witness. The common witness of \(M\) is computed from the common witness of \(E\) and \((\alpha_1\alpha_0,\beta_1\beta_0)\).
The idea is to check if a common witness exists for \(E \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) using 7. If it exists, using that we compute the common witness for \(M\). There are two possibilities for common witnesses of \(E\):
\(E\) has a unique common inner (resp. outer) witness \(z\). By [gmonomialcut:2] of 7, it suffices to check if \(z\) is a common inner (resp. outer) witness of \((\alpha_1\alpha_0,\beta_1\beta_0)\). This can be checked in \(\mathcal{O}(m+n)\) time using 1. If so, \(z\) is the common witness of \(E \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\). Now compute the common witness of \(M\) using 8[Thm7:1] (resp. 8[Thm7:2]). This can be computed in \(\mathcal{O}(m+n)\) time. Otherwise, \(E \cup \{(\alpha_1\alpha_0,\beta_1\beta_0)\}\) has no common witness and hence, \(M\) has no common witness by 8.
\(E\) has infinitely many common witnesses. In this case, the witnesses of \(E\) are the same as that of its primitive root, say \((\rho,\rho^\prime)\). From [gmonomialcut:1] of 7, it suffices to check if \((\rho,\rho^\prime)\) and \((\alpha_1\alpha_0,\beta_1\beta_0)\) has a common witness. For this, first check if the primitive root of \((\alpha_1\alpha_0,\beta_1\beta_0)\) is equal to \((\rho,\rho^\prime)\). This step takes time \(\mathcal{O}(m +n)\). We have two cases:
If \((\alpha_1\alpha_0,\beta_1\beta_0)\) have same primitive root as that of \(E\), then \(E\) and \((\alpha_1\alpha_0,\beta_1\beta_0)\) have infinitely many common witnesses by [infmanycwcorr]. In this case, \(M\) is a set of powers of the primitive root of the redux by 8[Thm7:3]. Thus \(M\) has infinitely many witnesses. Compute the primitive root of its redux using [computeroot]. This step takes \(\mathcal{O}(m)\) time.
Otherwise, compute the unique common witness of \((\rho,\rho^\prime)\) and \((\alpha_1\alpha_0,\beta_1\beta_0)\) if it exists using [existswitness]. If so, we are back to Case 1; else \(M\) has no common witness. This step takes \(\mathcal{O}(m+n)\) time.
◻
Using the above algorithm, we compute the common witness of a general sumfree expression as follows.
Lemma 19. Let \(M\) be a sumfree expression. Given the witness set of each Kleene star in \(M\), we can compute the witness set of \(M\) in time \(\mathcal{O}(m \cdot (m+n))\) where \(m\) is the size of the expression and \(n\) is the maximum size among the given witnesses.
Proof. From 9, the witness set of \(M\) is the intersection of the witness sets of its singleton reduxes. Check if each singleton redux of \(M\) has a common witness and compute it using 18. This step takes \(\mathcal{O}(m \cdot (m+n))\). If there is a singleton redux with no common witness, then \(M\) has no common witness by 9.
Assume that \(M\) has a nonempty redux. The algorithm is as follows. Firstly, check if the redux of \(M\) is conjugate using [isconjugate] (in time \(\mathcal{O}(m)\)). If yes, then compute the primitive root of the redux, say \((\rho_m,\rho_m^\prime)\), using [computeroot] (in time \(\mathcal{O}(m)\)). Otherwise, \(M\) has no common witness. There are two cases depending on whether all singleton redux has infinitely many witnesses.
If all the singleton reduxes have infinitely many witnesses, then \(M\) is a set of powers of the primitive root of the redux \((\rho_m,\rho_m^\prime)\) by 8[Thm7:3]. Thus, \(M\) has infinitely many common witnesses.
If there exists a singleton redux with a unique common witness, say \(z\), then for all other singleton reduxes of \(M\) with a unique witness \(z^\prime\), check if \(z = z^\prime\) (for all other singleton reduxes \(z\) is already a witness by virtue of being a witness of the redux of \(M\)). If so, \(z\) is the unique common witness of \(M\); otherwise \(M\) has no common witness.
This takes \(\mathcal{O}(mn + m)\) time. Consider the case where the redux of \(M\) is empty. Let \(M\) be of the form \(E_1^*E_2^* \cdots E_k^*\). We iterate over \(i \in \{1,\ldots, k-1\}\).
If both \(E_i\) and \(E_{i+1}\) has infinitely many witnesses, then the witness set of \(E_i^*\) and \(E_{i+1}^*\) is finitely represented by their primitive roots. Check if the primitive roots are the same. If yes, continue the procedure for \(i=i+1\). Otherwise, check and compute the common witness, say \(z\), of the primitive roots if exists using [existswitness] (in time \(\mathcal{O}(n)\)). If not, then \(M\) has no common witness. Otherwise, check if \(z\) is a common witness of all singleton reduxes \(E_{i+2}^*, \ldots, E_k^*\) (This can be done in \(\mathcal{O}(n)\) for each singleton redux — If a singleton redux has a unique witness then check if it is equal to \(z\). Otherwise, if it has infinitely many witness, then it is represented by a primitive root. It suffices to check if \(z\) is a witness of that primitive root).
If either one of \(E_i\) and \(E_{i+1}\) has a unique witness, say \(z\), then check if \(z\) is a common witness of all singleton reduxes \(E_{i+2}^*, \ldots, E_k^*\) .
This step takes \(\mathcal{O}(mn + n)\) time. Overall, it takes \(\mathcal{O}(m \cdot (m+n))\). ◻
Given a sumfree expression \(M\), we compute its witness set bottom-up. We start from the innermost Kleene star. It is a pair of words \((u,v)\). First, we check if \((u,v)\) is conjugate using [isconjugate]. If yes, then there are infinitely many common witnesses for \((u,v)^*\), namely the witnesses of its primitive root, otherwise \(M\) has no witness. This step can be done in a time linear in the length of \((u,v)\). Now we recursively use 19 to compute the common witness of the expression under the Kleene star in each level. If there is no common witness for any level of Kleene star expression, then \(M\) is not conjugate.
To find out the complexity of the decision procedure, it suffices to estimate the maximum length of a witness involved in the computation.
We claim that if a sumfree expression \(M\) is conjugate, then there exists a witness of length linear in size of \(M\). If \(M\) has infinitely many witnesses, from [infmanycwcorr], \(M\) is a set of powers of a primitive root. Therefore, there exists a witness of length that is less than that of the length of the primitive root. Next, suppose \(M\) has a unique common witness. In that case, there exists a subexpression \(E_i^*\) such that \(E_i^*\) has a unique common witness, and all Kleene star appearing in \(E_i\) has infinitely many witnesses. Thus, all of them have a common witness of length at most \(|E_i|\). Therefore, there is a singleton redux \(M_i\) of \(E_i^*\) that has a unique witness \(z_i\). The size of \(z_i\) is linear in \(M_i\) and the size of the witnesses of subexpressions of \(E_i\). Both are upper bounded by size of \(M\). Furthermore, the common witnesses for all subsequent levels is unique (if it exists) and its length is bounded by \(|M|\).
Since the size of the common witness of \(M\) is linear in \(|M|\), by 19, the overall complexity of computing a common witness of a sumfree expression is \(\mathcal{O}(h \cdot m^2)\) where \(h\) is the star height of \(M\) and \(m\) is the length of the expression.
Given a sumfree expression \(E=(\alpha_0,\beta_0)E_1^*(\alpha_1,\beta_1)\dots E_k^*(\alpha_k,\beta_k)\), \(k\geq 1\), the following algorithms decides whether \(E\) is conjugate.
Check whether \(E\) has a common witness using the algorithm described in Section 7. If there exists a common witness, then output YES.
Otherwise, verify the following conditions. If any of them fails, output NO.
\(\alpha_0\dots \alpha_k \sim \beta_0\dots \beta_k\).
For \(i\in [1,k]\), each \(E_i^*\) is conjugate and moreover it has a primitive root \((\rho_i,\rho_i')\).
\(\rho_i \sim \rho_j\) for all \(i,j \in [1,k]\).
Let \(\bar{\alpha}=(\alpha_1,\ldots, \alpha_{k-1},\alpha_k\alpha_0)\) and \(\bar{\varrho} =(\rho_1,\rho_2), \ldots, (\rho_{k-1},\rho_k), (\rho_k,\rho_1)\). Then, there is at most one element \(i\in[1,k]\) such that \((\bar{\alpha})_i\) is not an inner witness of \((\bar{\varrho})_i\).
Let \(\bar{\beta}=(\beta_1,\ldots, \beta_{k-1},\beta_k\alpha_0)\) and \(\bar{\varrho}' =(\rho'_1,\rho'_2), \ldots, (\rho'_{k-1},\rho'_k), (\rho'_k,\rho'_1)\). Then there is at most one element \(j\in[1,k]\) such that \((\bar{\beta})_j\) is not an inner witness of \((\bar{\varrho}')_j\).
If \(i\) and \(j\) do not exist in steps (d) and (e), then output YES.
Otherwise, output YES if the below expression is conjugate. \[\begin{align} \left(\begin{array}{c} \alpha_i\dots \alpha_k\alpha_0\dots \alpha_{i-1} \\ \beta_j\dots \beta_k\beta_0\dots \beta_{j-1} \end{array}\right)\left(\begin{array}{c} \rho_i \\ \rho_j' \end{array}\right)^* \end{align}\] Note that the above expression is conjugate iff the set \(\{(\alpha_i\dots \alpha_k\alpha_0\dots \alpha_{i-1},\beta_j\dots \beta_k\beta_0\dots \beta_{j-1}), (\rho_i,\rho_j')\}\) has a common witness.
In all other cases, Output NO.
The correctness of the above algorithm follows from 7 and [prop:long]. In the above algorithm, Steps \(1\), \(2.(b)\), and \(4\) amounts to computing the common witness of a sumfree expression, and therefore is in polynomial time. Now, Steps \(2.(a)\) and \(2.(c)\) is checking conjugacy of two words, which is in linear time. Steps \(2.(d)\) and \(2.(e)\) are in linear time. Therefore, the algorithm runs in polynomial time.
It is shown that the conjugacy problem of a rational relation is decidable. The current decision procedure proceeds through the analysis of rational expressions. In its essence, it is analogous to the boundedness checking of distance automata using factorisation trees [22], though explicit use of factorisation trees are avoided using sumfree rational expressions instead. An obvious question is the existence of an automata-theoretic proof. Factorisation forests remain the primary tool to settle boundedness questions on automata and by that standard the proof approach taken in this paper is natural and quite possibly the most intuitive.
Computing a witness of a given sumfree expression, if one exists, can be done in polynomial time. However, converting a rational expression into a sum of sumfree expressions may result in an exponential blowup. Thus, the algorithm presented in the paper is of exponential time. It remains to find the precise complexity of this problem.
It is natural to look at the conjugacy problem of more general classes, for instance functions definable by a deterministic two-way transducers (regular functions [23]), or by two-way pebble automata (polyregular functions [24]).
Lemma 20. Every rational expression \(E\) can be converted to one in sumfree normal form \(E'\) in exponential time. Moreover, \(|E'| \leq 2^{2 \cdot |E|}\).
Proof. Let \(E\) be a rational expression over the monoid \(\mathbf{M}\). We assume that the rational expression \(E\) is given as a tree \(e\). We take the size of \(e\), denoted as \(|e|\), to be the number of nodes in the tree. We inductively define a tree \(e’\) that has the same language as the sumfree normal form of the expression \(E\) and furthermore, as shown in 6, it is in the shape of a right-comb with the internal nodes of the spine labelled with \(+\)’s (and the leaf of the spine is labelled with \(\emptyset\)) and the pendant left subtrees attached to the spine are sumfree. We call \(e'\) as the SNF tree of \(e\).
We obtain an equivalent sumfree normal form expression and its expression tree \(e'\) by induction on the structure of \(E\). We prove the following invariant along with the construction of \(e’\).
Claim 4. \(|e’| \leq 2^{2|e|}\)
The following definition is used in the analysis below. Let \(N(e’)\) denote the number of summands in \(e’\), i.e., \(N(e’)\) is the number of nodes in the spine of the comb, or equivalently, 1 more than the number of nodes labelled with \(‘+’\) in \(e’\). Hence \(N(e’) \leq |e’|\).
When \(E\) is \(\emptyset\) or \(m\in M\), then \(E\) is already sumfree. The tree \(e\) corresponds to a tree with a single node. We take \(e’\) to be the tree with 3 nodes in SNF with the left subtree of the root being \(e\). Hence \(|e’| = 3\) and the claim holds.
Assume that \(G\) and \(H\) are rational expressions with expression trees \(g\) and \(h\) respectively. Let \(g’\) and \(h’\) denote their SNF trees. By induction hypothesis, \(G \equiv \alpha_1 + \cdots + \alpha_k\) and \(F \equiv \beta_1 + \cdots + \beta_\ell\) such that \(\alpha_i, \beta_j\), \(1\leq i \leq k\), \(1 \leq j \leq \ell\), are sumfree expressions. Also, \(|g’| \leq 2^{2|g|}\) and \(|h’| \leq 2^{2|h|}\).
If \(E = G + H\), then by substituting for \(G\) and \(H\), we get an equivalent expression of the desired form. This step takes constant time. To obtain \(e’\) we replace the leaf of the spine of \(g’\) with the root of \(h’\). Clearly, \[\begin{align} |e’| &= |g’| + |h’| - 1\\ &\leq 2^{2|g|} + 2^{2|h|} - 1\\ &\leq 2^{2(|g|+|h|+1)}\\ &= 2^{2|e|}. \end{align}\]
If \(E = G\cdot H\), then by substituting \(G\) and \(H\) we get \(E \equiv (\alpha_1 + \cdots + \alpha_k) \cdot (\beta_1 + \cdots + \beta_\ell)\). Distributing the monoid operation over the union, we get \(E \equiv (\alpha_1\beta_1 + \cdots + \alpha_1\beta_\ell) + \cdots + (\alpha_k\beta_1 + \cdots + \alpha_k\beta_\ell)\), that is in the required form. This step takes time quadratic in the maximum among the length of the SNF expressions \(G\) and \(H\).
Assume there are \(p\)-many (resp. \(q\)-many) pendant subtrees attached to the spine of \(g’\) (resp. \(h’\)). The tree \(e’\) is a right-comb with \(pq\)-many pendant subtrees where each subtree is obtained by the pairwise concatenation of pendant subtrees from \(g’\) and \(h’\) respectively. Clearly, \(N(e’) = N(g’)N(h’) - 1\). \[\begin{align} |e’| &\leq N(g’)N(h’) + |g’|N(h’) + |h’|N(g’) + N(g’)N(h’)\\ &\leq 4|g’||h’|\\ &\leq 4 \cdot 2^{2|g|}2^{2|h|}\\ &\leq 2^{2(|g| + |h| + 1)}\\ &= 2^{2|e|}. \end{align}\]
Finally, if \(E = G^*\), then by repeatedly applying the rational identity \((X+Y)^* = (X^* Y^*)^*\), where \(X,Y\) are rational expressions, we get \(E = G^* \equiv (\alpha_1 + \alpha_2 + \cdots + \alpha_k)^* = (\alpha_1^*\alpha_2^* \cdots \alpha_k^*)^*\). This step takes linear time w.r.t. the length of the SNF epression \(G\).
We obtain the tree \(g’\) corresponding to \(g\), and construct a new tree \(h\) from \(g’\) as follows.
Add an intermediate node labelled with \(*\) between each pendant subtree and the spine of \(g’\).
Replace each \(+\) labelled nodes in the spine with concatenation.
Replace \(\emptyset\) in the leaf of spine with epsilon.
Add a new root node labelled with \(*\).
Now, \(e’\) is obtained by attaching \(h\) as the left subtree of a right-comb in the desired form. Clearly \(N(e’) = 1\). \[\begin{align} |e’| &\leq |g’|+N(g’)+3\\ &\leq |g’|+|g’|+3\\ &\leq 2 \cdot 2^{2|g|}+3\\ &= 2^{2|g|+1}+3\\ &\leq 2 \cdot 2^{2|g|+1} &&\text{(Since |g| \geq 1, 2^{2|g|+1} \geq 8)}\\ &= 2^{2(|g|+1)}\\ &= 2^{2|e|} \end{align}\]
Hence proved that the upper bound on the size of the SNF expression is exponential in the size of the given expression.
Each step of constructing an SNF expression takes polynomial time in the length of its constituent SNF expressions. Therefore, any rational expression can be converted to an equivalent sumfree normal form in exponential time. ◻
We thank the participants of Autoboz 2025 (Grenaa, Denmark) for identifying a missing case in the conjugacy theorem for monoid closure (Item 2 of Theorem 7).↩︎