## On equations and first-order theory of one-relator monoids

Albert Garreta, ∗ Robert D. Gray †

April 15, 2021

## Abstract

We investigate systems of equations and the first-order theory of one-relator monoids. We describe a family F of one-relator monoids of the form x A | w ' 1 y where for each monoid M in F , the longstanding open problem of decidability of word equations with length constraints reduces to the Diophantine problem (i.e. decidability of systems of equations) in M . We achieve this result by finding an interpretation in M of a free monoid, using only systems of equations together with length relations. It follows that each monoid in F has undecidable positive AE-theory, hence in particular it has undecidable firstorder theory. The family F includes many one-relator monoids with torsion x A | w n ' 1 y ( n ą 1). In contrast, all one-relator groups with torsion are hyperbolic, and all hyperbolic groups are known to have decidable Diophantine problem. We further describe a different class of one-relator monoids with decidable Diophantine problem.

## 1 Introduction

Two important longstanding open algorithmic problems in algebra are the decidability of the conjugacy problem for one-relator groups, and of the word problem for one-relator monoids. Each of these problems is a special case of the much more general and open question of whether the Diophantine problem (decidability of systems of equations) is decidable in onerelator groups, or in one-relator monoids. A positive answer to any of these would give a positive resolution to one (or both) of the open questions about the word and conjugacy problems mentioned above. On the other hand, if the Diophantine problem turns out to be undecidable for one-relator monoids or one-relator groups, then this would give a natural undecidable decision problem for these classes, which could lead to further undecidability results for these classes that would then have the potential to shed new light on fundamental questions like the word and conjugacy problems.

The Diophantine problem for one-relator groups has recently received attention in the literature, with positive results obtained for solvable Baumslag-Solitar groups BS p 1 , n q '

∗ Albert Garreta, Department of Mathematics, University of the Basque Country, 48080 Bilbao, Spain, albert.garreta@ehu.eus ,

† Robert D. Gray, School of Mathematics, University of East Anglia, Norwich NR4 7TJ, England, UK, Robert.D.Gray@uea.ac.uk

----------------

2010 Mathematics Subject Classification. 20M05, 20F70, 20F05, 20F10, 03B25

Key words and phrases. one-relator monoids, Diophantine problem, first-order theory, word equations with length constraints.

x a, b | a ´ 1 ba ' b n y ( n P Z ); see [39] (in the same paper the authors also solve the problem for wreath products of the form A /wreathproduct Z , where A is a finitely generated abelian group). The aim of this paper is to initiate the study of Diophantine problems (and related model-theoretic questions) for one-relator monoids. We shall obtain both positive and negative (undecidability) results, and will also establish a close connection between these problems and the problem of solving word equations with length constraints, which is a longstanding open problem in computer science.

Our main result describes a family of one-relator monoids F such that for any M P F it is possible to reduce decidability of word equations with length constraints -a longstanding open problem in computer science- to the Diophantine problem in M . We further prove decidability of the Diophantine problem for a certain class of one-relator monoids. As a corollary we obtain undecidability of the positive AE -theory (hence of the first-order theory) of any one-relator monoid belonging to F . To the best of our knowledge, this provides the first examples of one-relator monoids with undecidable positive AE-theory (with coefficients), excluding the free monoid. Other examples of one-relator monoids with undecidable firstorder theory with coefficients can be found in Theorem 1 of [38].

Equations in monoids and groups have been widely studied during the past decades, being of interest in several areas, ranging from computer science to group and model theory. For a detailed account of the history, motivation and key results in this area we refer the reader to the survey articles [22, 36, 41, 62]. By the Diophantine problem we mean the algorithmic problem of determining if any given system of equations has a solution or not. Two classical results due to Makanin show that the Diophantine problem is decidable in any free monoid [48] and in any free group [49]. Based on Makanin's algorithm, Razborov [59] provided a powerful description of the sets of solutions to systems of equations in free groups via what were later called Makanin-Razaborov diagrams. This played a key part in the solution to the Tarski problems [40, 64] regarding groups elementary equivalent to a free group.

In subsequent years new decidability algorithms and descriptions of solutions have appeared: in [57] Plandowski describes a polynomial space algorithm for deciding word equations based on a compression technique. In [34] Jeż shows that word equations can be solved in non-deterministic linear space, and in [15] it is proved that the solution set of a word equation is an EDT0L language (in particular, it is an indexed language), furthermore this set can be computed in polynomial space [23]. More recently, in [66] Sela presents the first in a sequence of papers devoted to investigating the structure of sets of solutions to systems of equations over a free semigroup via a Makanin-Razborov diagram analogue. Diophantine problems have been extensively considered also in different classes of groups and monoids, see e.g. [14, 20, 21, 23, 24, 29, 44, 44, 63]. For us the most relevant result in this direction is the decidability of the Diophantine problem in hyperbolic groups [16, 61].

A variation relevant to the present paper is the problem of word equations with length constraints (in short, WELCs). This consist of a (system of) word equation(s) together with finitely many linear inequalities involving the length of solutions (see Subsection 2.1 for a formal definition). The problem of determining whether WELCs are decidable has been open for decades now and is of major interest in computer science. Some partial cases and variations have been successfully studied in [13, 17, 18, 27, 43]. As hinted at in [17], extending word equations with constraints that involve some type of length relation or letter-counting seems to always lead to undecidability. Indeed, many problems closely related to WELCs are

undecidable, as shown in some of the previous references.

WELCs are of interest in industry where they are applied for program verification, code debugging, security analysis, document spanning, etc. A WELC is a particular instance of a so-called Satisfibility Modulo Theory (SMT) problem, which, roughly speaking, is a satisfiability problem for a first order sentence that combines different types of formulas from different languages (such as the language of monoids, which allows to write word equations, and the language of Presburger arithmetic, which allows to write linear integer equations and inequalities). In practice, such problems are usually tackled by so-called SMT solvers, which are programs that rely on different heuristics for solving certain types of SMT problems (different SMT solvers support different possible languages and fragments of a theory). Usually, SMT solvers are desgined to be fast and usable in real life, which in turn means that often they are not complete i.e. it is not guaranteed that the solver will be able to correctly solve a given input. We refer to [8, 19] for further information on general SMT solvers and their applications. There exists a variety of fast SMT solvers which can handle in particular word equations with rational constraints and length constraints [1, 6, 7, 10, 26, 67, 69] (we stress again that these programs are not complete, i.e. they cannot successfully solve any input problem).

A further point of interest is that WELCs are reducible to the problem of solving systems of integer-coefficient polynomial equations in Z [53]. Thus a proof of undecidability of WELCs would provide a new solution to Hilbert's 10th Problem, which states that equations in the ring Z are undecidable [52].

We would like to emphasize how the Diophantine problem generalizes and contains many well-known and studied algorithmic problems. Notably, and as already mentioned, both the word problem and the conjugacy problem are particular cases of the Diophantine problem (see [3, 4, 54, 55, 56, 70, 71] for definitions and results regarding the conjugacy problem in monoids). Moreover, the left and right divisibility problems in monoids, as well as decidability of Green's orders ď Ρ and ď Λ are particular instances of the Diophantine problem. Thus proving that the latter is decidable in some specific group or monoid implies that any of the previously mentioned problems are decidable. Conversely, undecidability of any of the mentioned problems implies undecidability of the Diophantine problem. In a similar vein, systems of equations are particular instances of positive AE -formulas, which in turn are first-order formulas. Hence similar considerations hold for the problem of decidability of the positive AE -theory, or of the first-order theory, of a monoid or group.

There are several natural classes of one-relator monoids for which the word problem has been shown to be decidable. Specifically, Adjan [2] showed that all one-relator monoids defined by presentations of the form x A | w ' 1 y have decidable word problem. Monoid presentations where all of the relations are of the form w ' 1 are commonly called special presentations. Adjan solved the word problem for special one-relator monoids by showing that the group of units of such a monoid is a one-relator group, and then reducing the word problem of such a monoid to the word problem of its group of units. Then decidability of the word problem for the special one-relator monoid follows from Magnus's theorem. Similarly, in [70] Zhang proves that the conjugacy problem is decidable in the monoid x A w | ' y 1 provided it is decidable in the group of units of the monoid. Other results where an algorithmic problem in a monoid is reduced to the group of units can be found in [47, 71]. These results immediately suggest the following question: Can the Diophantine problem of a special one-relator monoid

be reduced to the Diophantine problem in its group of units? Notice that by Proposition 3.32, a positive answer to this question would imply that the Diophantine problem is decidable in all special one-relator monoids with torsion. Note that it follows from the main result of [42] that a one-relator monoid of the form x A u | ' y 1 has torsion (that is, has a non-identity element of finite order) if and only if u ' w k for some k ě 2. Moreover, as we will prove in this paper, a positive answer to this question would imply decidability of WELCs (see Corollary C).

A modern approach to finite special monoid presentations using techniques from the theory of string rewriting systems is given by Zhang in [71]. Zhang's methods will play an important role in the results we prove in this paper for special one-relator monoids.

We shall now explain the main results of the paper in more detail. Before doing so, we first need to give some background notions.

Given any one-relator monoid presentation of the form x A | r ' 1 , y defining a monoid M , there is a unique decomposition of the word r ' r r 1 2 . . . r k such that each r i belongs to A ` ' A ˚ zt 1 , u each of the words r i represents an invertible element of M , and no proper non-empty prefix of r i is invertible, for all 1 ď i ď k . The words r i p 1 ď i ď k q in this decomposition are called the minimal invertible pieces of r . Adjan [2] gives an algorithm for computing this decomposition for any one-relator special monoid. Minimal invertible pieces are a key concept for relating a special monoid with its group of units.The key idea used in Adjan's algorithm for computing the minimal invertible pieces is the following fact:

( : ) If α, β, γ P A ˚ are words such that αβ and βγ both represent invertible elements of the monoid M then all of the words α β , and γ also represent invertible elements of M .

This is because αβ being invertible implies β is left invertible, while βγ being invertible implies β is right invertible, hence β is invertible, from which it then quickly also follows that α and γ are also invertible. We say that the words αβ and βγ overlap in the word β . Adjan's algorithm begins with the defining relator word r from the presentation x A r | ' 1 y which clearly represents an invertible element of M (since r ' 1 in M ) and first considers overlaps that r has with itself. If there are overlaps then applying ( ) this gives rise to new : shorter words that we know are invertible, and then the process is repeated with these words and is iterated until no further overlaps are discovered. We refer the reader to [42, Section 1] for a detailed description of the this overlap algorithm. We will not need full details of the algorithm here, but we will use the key fact ( : ) above about overlaps when giving examples to which our main results apply. Let us illustrate this now with an example.

Example 1.1. Let M be the one-relator monoid x a, b | abcdcdabab ' 1 . y Since ab is both a prefix and a suffix of the defining relator word abcdcdabab , applying the fact ( ) : above about overlaps with αβ ' abcdcdabab ' βγ where β ' ab it it follows that the words β ' ab , γ ' cdcdabab , and α ' abcdcdab are all invertible. Then overlapping the invertible word ab with the invertible word abcdcdab it follows from ( : ) that cdcdab and abcdcd are both invertible. Then overlapping the invertible words cdcdab and abcdcd we deduce that cd is invertible. This shows that this monoid presentation can be written as x a, b | p ab qp cd qp cd qp ab qp ab q ' 1 y where the parentheses indicate a decomposition of the defining relator into invertible pieces ab and cd . Moreover, since ab and cd do not overlap with themselves, or each other, the Adjan algorithm will not compute any smaller invertible pieces and hence this is the decomposition

of the relator into minimal invertible pieces. In particular t ab, cd u is the set of minimal invertible pieces of the relator in this example.

For all the concrete examples of one-relator monoids that we give in this paper, the decomposition of the defining relator into minimal invertible pieces can be computed by repeated application of ( : ) in exactly the same manner as in Example 1.1. In each case, we shall refer to this as the decomposition into minimal invertible pieces computed by the Adjan overlap algorithm.

Given a set S and a tuple of nonnegative integers /vector λ ' p λ s | s P S q , by | ¨ | /vector λ we denote the /vector λ -weighted word-length in S ˚ defined as

$$| w | _ { \vec { \lambda } } = _ { \text{def} } \sum _ { s \in S } \lambda _ { s } | w | _ { s }, \ \ ( w \in S ^ { * } ),$$

where | w | s denotes the number of occurrences of the letter s in w . By L /vector λ we denote the /vector λ -length relation defined as L /vector λ p w,u q if and only if | w | /vector λ ď | u | /vector λ . Note that if λ s ' 1 for all s P S then | ¨ | /vector λ and L /vector λ are just the standard word length and the standard length relation, which we denote simply as | ¨ | and L , respectively. Hence L p u, v q holds if and only if | u | ď | v | , for any two words u, v P S ˚ . The tuple p S , , ˚ ¨ 1 , ' , L /vector λ q refers to the free monoid S ˚ equipped with the relation L /vector λ . This is the natural structure on which to write systems of word equations with ( /vector λ -weighted) length constraints. See Subsection 2.1 for further details.

The main tool we use for reducing one problem to another is that of interpretability by systems of equations or by positive existential formulas (Definition 2.3). This is nothing more than the usual notion of interpretability [32, 51] restricting all formulas to be systems of equations or disjunctions of systems of equations, respectively.

Among other results, in this paper we prove the following.

Theorem A (Theorems 3.23 and 3.26) . Let M be the one-relator monoid x A r | ' y 1 . Write r ' r r 1 2 . . . r k such that r i P A ` for all i ' 1 , . . . , k , each of the words r i represents an invertible element of M , and no proper non-empty prefix of r i is invertible, for all 1 ď i ď k . Set ∆ ' t r i | 1 ď i ď k u , so ∆ is the set of minimal invertible pieces of the relator r . Suppose that:

(C1) no word from ∆ is a proper subword of any other word from ∆ , and

(C2) there exist distinct words γ, δ P ∆ with a common first letter a .

Then there exists a free monoid D of finite rank n ě 2 and a tuple of positive integer weights /vector λ ' p λ , . . . , λ 1 n q such that the free monoid with weighted length relation p S, , ¨ 1 , L /vector λ q is interpretable in M by systems of equations. Consequently, the problem of solving systems of word equations with weighted length constraints is reducible to the problem of solving systems of equations in M .

If additionally to (C1) and (C2) we have:

(C3) no word in ∆ starts with a 2 , then the above result holds with L /vector λ being the standard length relation L , i.e. L p u, v q if and only if | u | ď | v | , for u, v P D . Consequently, in this case, the problem of solving systems of word equations with length constraints is reducible to the problem of solving systems of equations in M .

Example 1.2. We now give several examples to which Theorem A applies. For each of these examples the decomposition into minimal invertible pieces can be computed using Adjan overlap algorithm in the same way as in Example 1.1.

Some examples of monoids satisfying conditions (C1), (C2) and (C3) are x a, b, c | p ab qp ac qp ab q ' 1 y and x a, b, c | pp ab qp ac qp ab qq n ' y 1 for n ě 1, where we indicate the minimal invertible pieces with parentheses. In all these examples the set of minimal invertible pieces is ∆ ' t ab, ac u . Indeed, considering overlaps of the defining relator word pp ab qp ac qp ab qq n with itself implies that p ab qp ac qp ab q is invertible, and then overlapping this word with itself we deduce that ab and ac are both invertible. Since this pair of words do not overlap with themselves, or each other, it follows that these are the minimal invertible pieces. This set of words ∆ ' t ab, ac u clearly satisfies conditions (C1), (C2) and (C3).

In the two-generated case we have examples satisfying all of (C1), (C2) and (C3) such as

$$\left \langle a, b \left | \, ( a b a b b ) ( a b a a b b ) ( a b a b b ) = 1 \right \rangle$$

and

$$\langle a, b \, | \, ( ( a b a ^ { n } b ^ { n + 1 } ) ( a b a ^ { n + 1 } b ^ { n + 1 } ) ( a b a ^ { n } b ^ { n + 1 } ) ) ^ { m } = 1 \rangle,$$

for all n, m ě 1, where again we identify the decomposition into minimal invertible pieces using parentheses. For this second family of examples, by overlapping the relator word with itself we deduce that p aba n b n ` 1 qp aba n ` 1 b n ` 1 qp aba n b n ` 1 q is invertible and hence overlapping this word with itself we deduce that each of aba n b n ` 1 and aba n ` 1 b n ` 1 is an invertible word. Since this pair of words do not overlap with themselves or with each other, it follows that the set of minimal invertible pieces for this example is ∆ ' t aba n b n ` 1 , aba n ` 1 b n ` 1 u . It is then straightforward to verify that this set of words satisfies conditions (C1), (C2) and (C3).

Dropping (C3) there are simpler two-generated examples which satisfy both (C1) and (C2) e.g. x a, b | pp aab qp abb qp aab qq n ' 1 y ( n ě 1) with set of minimal invertible pieces t aab, abb u . As seen in these examples, the family of one-relator monoids satisfying conditions (C1), (C2), and (C3) includes many one-relator monoids with torsion x A | w n ' 1 , y n ą 1, which by Proposition 3.32 have hyperbolic group of units and hyperbolic undirected Cayley graph. We stress again that one-relator groups with torsion are hyperbolic and thus have decidable Diophantine problem [16, 61].

In another direction we prove the following result, which can be used to obtain many examples of special one-relator monoids with decidable Diophantine problem, as described in Section 4.

Theorem B (Theorem 3.1) . Let M ' x A | w ' 1 y and suppose that every letter in w is invertible in M . Let G ' x B | w ' 1 y where B Ď A is the set of letters that appear in w . Then G is a one-relator group, and if the Diophantine problem is decidable in G then it is decidable in M .

Comparing Theorem B with Theorem A, in both results we decompose the defining relator r ' r r 1 2 . . . r k into words r i that are invertible in M . Theorem A is the case where all the words r i have size one, i.e. they are single letters, in which case the theorem shows a reduction of the Diophantine problem of M to its group of units.

In Section 4 we provide some examples of monoids satisfying the hypotheses of Theorem B, as well as a list of questions and open problems.

An immediate consequence of Theorem A is the following

Corollary C. If word equations with length constraints are undecidable, then so is the Diophantine problem in any one-relator monoid of the form x A | w ' 1 y satisfying conditions (C1), (C2) and (C3). On the other hand, proving that the Diophantine problem is decidable in some of these monoids would imply that word equations with length constraints are decidable. In particular, if the Diophantine problem is decidable for all one-relator monoids with torsion x A | w n ' 1 y , with n ą 1 , then this would imply that word equations with length constraints are decidable.

In addition to the Diophantine problem, we also obtain results about the decidability of the first-order theory, and more precisely of the positive AE -theory, of some one-relator monoids. The first-order theory with coefficients of a free nonabelian semigroup was shown to be undecidable by Quine [58] (all free structures in this paragraph are implicitly assumed to be nonabelian). Quine's result was strengthened in [25, 50] by proving that the positive AE -theory with coefficients of a free semigroup is undecidable. This contrasts with the aforementioned decidability result of Makanin for systems of equations, and also with the fact that the first-order theory of free groups is decidable as part of the solution to Tarski problems [40]. A consequence of Theorem A is the following

Theorem D (Theorem 3.25) . Let M be a monoid with presentation x A | w ' y 1 for some set A and some word w P A ˚ satisfying the conditions (C1) and (C2) of Theorem A. Then the positive AE -theory with coefficients of M is undecidable. In particular, the first-order theory with coefficients of M is undecidable.

The paper is organized as follows: in Section 2.1 we provide all the necessary background regarding equations, first-order theory, and tools for obtaining reductions of one algorithmic problem to another. Section 3 contains the main results of the paper. Section 3 finishes with a small subsection where we obtain results regarding the hyperbolicity of the group of units and of the Cayley graph of some one-relator monoids. Finally, in Section 4 we present examples and applications of our results, and we provide a list of open questions.

## 2 Preliminaries

In this section we provide the necessary background definitions and results from model and semigroup theory that will be needed in this article. In Subsections 2.1 and 2.2 we shall state the model-theoretic definitions for general structures, although throughout the paper these will be used only on monoids, or on monoids with some extra function or relation such as a length relation. Further background on model theory can be found in [32, 51]. See [5] for notions of computational and complexity theory, [33] for semigroup and monoid theory background, and [46] for notions in combinatorial group theory.

## 2.1 Equations, first-order theory, and other problems

We follow Sections 1.1. and 1.3 from [32]. We fix X and A to denote a finite set of variables and a finite set of constants, respectively.

We describe structures by tuples S ' p U, f 1 , f 2 , . . . , r 1 , r 2 , . . . , c 1 , c 2 , . . . q , where U is the domain of the structure, the f i are function symbols, the r i are relation symbols, and the c i are constant symbols. The equality relation ' is always assumed to be one of the relations of

S and is usually omitted from the list r , . . . 1 The tuple p f , f 1 2 , . . . , r 1 , r 2 , . . . , c 1 , c 2 , . . . q is the language (or signature) of S . We make the convention that this tuple is implicitly enlarged with as many elements from U as needed. These extra elements are called coefficients (or parameters ). Sometimes we identify the whole structure with its domain. For example, we denote the free monoid generated by A simply by A ˚ , omitting any reference to the concatenation operation ¨ or the identity element 1 or the equality relation ' .

An equation in a structure S with language L is an atomic formula in the language L with coefficients. Recall that an atomic formula is one that makes no use of quantifiers, conjunctions, disjunctions, or negations. Thus an equation in S is a formula constructed using only variables, constant elements from U (because we allow the use of coefficients by convention), functions f i , and a single relation r i . For example if S is a monoid generated by A then an equation in S is a formal expression of the form w 1 p X,A q ' w 2 p X,A q , where w 1 p X,A q and w 2 p X,A q are words in p A Y X q ˚ . A solution to such equation is a map f : X Ñ S such that w 1 p f p X ,A q q ' w 2 p f p X ,A q q is true in S . By w f X ,A i p p q q we refer to the word obtained from w i after replacing each variable x P X by the word f p x q . A system of equations in S is a conjunction of equations in S . Alternatively one can define equations as formulas of the form D x 1 . . . D x φ x , . . . , x n p 1 n q where φ is an atomic formula as above on variables x , . . . , x 1 n , with the relation in φ being equality. We use these two formulations interchangeably.

Equations in a free monoid A ˚ receive the special name of word equations . One can consider equations in more complicated structures, such as the structure p A , , ˚ ¨ 1 , ' , L q obtained from the free monoid A ˚ (which we identify with the tuple p A , , ˚ ¨ 1 , 'q ) by adding the length relation L defined by the rule L p u, v q if and only if | u | ď | v | , for all u, v P A ˚ , where | ¨ | denotes length of words and 1 is the identity element. A system of equations in p A , , ˚ ¨ 1 , ' , L q is called a system of word equations with length constraints . This is a system of word equations Σ together with a finite conjunction C of formal expressions of the form L p w , w 1 2 q , each called a length constraint , where w , w 1 2 P p X Y A q ˚ . A map f : X Ñ A ˚ is a solution to such system if it is a solution to Σ and | w 1 p f p X ,A q q| ď | w 2 p f p X ,A q q| for each length constraint L p w , w 1 2 q appearing in C .

Alternatively to the length constraint one can consider the more general notion of weighted length constraint , which we define now. Let /vector k ' p k a | a P A q be a tuple of natural numbers, one for each constant a P A . Then by | ¨ | /vector k we denote the map | ¨ | /vector k : A ˚ Ñ N defined by

$$| h | _ { \vec { k } } = \sum _ { a \in A } k _ { s } n _ { a } ( a ),$$

where n a p h q is the number of times that the letter s appears in h . We call | ¨ | /vector k the /vector k -weighted length function of A ˚ . We further let L /vector k denote the relation in A ˚ defined by the rule L /vector k p h, g q if and only if | h | /vector k ď | g | /vector k , and call L /vector k the /vector k -weighted length relation in A ˚ . Note that if /vector k consists solely of 1's then | ¨ | is the usual length of words | ¨ | and L is the length relation L

/vector k /vector k . The Diophantine problem in a structure S , denoted D p S q , refers to the algorithmic problem of determining if a given system of equations in S (with coefficients belonging to a fixed computable set) has a solution. One says that D p S q is decidable if there exists an algorithm (i.e. a Turing machine [5]) that performs such task.

Given two algorithmic problems P 1 and P 2 , we say that P 1 is reducible to P 2 if there exists an algorithm that solves P 1 using an oracle for the problem P 2 (i.e. a black-box algorithm that 'magically' solves P 2 -see Definition 3.4 in [5]). Thus in this case if P 1 is unsolvable

then so is P 2 : indeed, if P 2 was solvable then replacing the oracle in the definition above by an algorithm that solves P 2 would yield an algorithm that solves P 1 , a contradiction. As an example, D p Z q is undecidable for Z the ring of integers (this is the answer to Hilbert's 10th problem [52]), and hence D p M q is undecidable for any structure M such that D p Z q is reducible to D p M q .

Let L be some language. A positive AE -sentence in L is a first-order sentence of the form

$$\forall x _ { 1 } \dots \forall x _ { n } \exists y _ { 1 } \dots \exists y _ { m } \psi ( x _ { 1 }, \dots, x _ { n }, y _ { 1 }, \dots, y _ { m } )$$

where ψ is a quantifier-free formula without negations on the language L . The positive AE -theory of a structure S is the set of all positive AE -sentences in the language of S that are true in S . Analogously to the Diophantine problem, the positive AE -theory of S is said to be decidable if there exists and algorithm that, given a positive AE -sentence, decides whether or not it holds in S .

One can generalize the notions in the paragraph above by replacing positive AE -sentences by any family of first-order sentences Φ. In particular, if Φ is the set of all first-order sentences then one speaks of the first-order theory , or the elementary theory , of a structure. It is important to note that if the first-order theory is decidable then so is the Diophantine problem, the positive AE -theory, the positive universal theory (identity checking), etc.

## 2.2 Reductions and interpretability

In this subsection we introduce the notion of interpretability with respect to some class of formulas. This is a powerful tool which, in particular, implies reducibility of the decision problem for such class of formulas. It is nothing else than the classical model-theoretical notion of interpretability [32, 51], with the modification that formulas are required to be of some specific form (such as systems of equations). We follow Section 1.3 of [51] (alternatively, see Sections 2.1 and 5.3 of [32]).

Definition 2.1. Let M be a structure, n a natural number, and Φ a set of formulas in the language of M . A subset S Ď M n is called definable in M by formulas in Φ (in short, Φ-definable) if there exists a formula

$$\Sigma _ { S } ( x _ { 1 }, \dots, x _ { n }, y _ { 1 }, \dots, y _ { k } ) \in \Phi,$$

with free variables p x , . . . , x 1 n , y 1 , . . . , y k q ' p /vector x, /vector y q , such that for any /vector m P M n , one has that /vector m P S if and only if there exists /vector y 0 P M k such that Σ S p /vector m, y 0 q is true in M . In this case Σ S is said to define S in M .

We will make use of the following two classes of formulas Φ:

- 1. Systems of equations. In this case we replace the prefix Φ ´ by e-, speaking of edefinability.
- 2. Disjunctions of systems of equations. In this case we speak of PE-definability. See below for an explanation of this terminology.

Remark 2.2. It is well known that any disjunction of systems of equations is equivalent to a positive existential sentence with coefficients (hence the name PE -definability), i.e. formulas that can be constructed using only existential quantifiers, conjunctions, disjunctions, variables, and coefficents from the structure.

For example, the set of all elements that commute with a given element m P M is defined by the equation xm ' mx . Likewise, the set of all elements of M that are squares is defined by the equation x ' y 2 . The set of all elements that commute with m or are a square is defined by the PE-formula p xm ' mx q \_ p x ' y 2 q .

Observe that, by definition, e-interpretability and PE-interpretability allow the use of any coefficients in the domain of the structures at hand.

Definition 2.3. Let A and M be two structures and let Φ be a family of formulas in the language of M . Let further A and M be the domains of A and of M , respectively. Then A is called interpretable in M by formulas Φ (in short, Φ-interpretable) if there exists n P N , a subset S Ď M n and a bijective 1 map, called interpreting map, φ : S Ñ A , such that:

## 1. S is Φ-definable in M .

- 2. For every function f ' f p x , . . . , x 1 n q in the language of A , the preimage by φ of the graph of f , i.e. the set tp s , . . . , s 1 k , s k ` 1 q P S k ` 1 | φ s p k ` 1 q ' f p φ s p 1 q , . . . , φ p s k qqu Ď M n k p ` q 1 , is Φ-definable in M .
- 3. Similarly, for every relation r of A (including the equality relation ' ), the preimage by φ of the graph of r is Φ-definable in M .

Similarly as before, if Φ consists of all systems of equations in the language of M then we speak of e-interpretability, and if Φ consists of all disjunctions of systems of equations we speak of PE -interpretability. Note that a PE -interpretation is, in particular, an e-interpretation.

The next two results are fundamental and they constitute the main reason we use interpretability in this paper. These are standard results whose proofs follow immediately from the Reduction Theorem 5.3.2 in [32] and Remark 3 after it (alternatively, see Lemma 2.7 of [28]).

Proposition 2.4 (Interpretability is transitive) . Interpretability is a transitive relation. That is, given three structures M ,M , 1 2 and M 3 , if M 1 is e- or PE -interpretable in M 2 and M 2 is e or PE -interpretable in M 3 , then M 1 is e- or PE -interpretable in M 3 , respectively.

Proposition 2.5 (Reduction of problems) . Let M 1 and M 2 be two structures on languages L 1 and L 2 , respectively. Assume M 1 is e-interpretable or PE-interpretable in M 2 . Then the Diophantine problem in M 1 is reducible to the Diophantine problem in M 2 . As a consequence, if the second problem is decidable, then so is the first.

Similarly, the problem of deciding if any given first-order formula in the language L 1 holds in M 1 is reducible to the problem of deciding if any given formula in the language L 2 holds in M 2 . Consequently, if the first-order theory of M 2 is decidable then so is the first-order theory of M 1 . The same statement holds when replacing first-order theory by positive AE -theory.

1 The most general formulation of interpretability uses onto maps instead of bijective maps. Since only bijective maps appear in the interpretations of this paper, we have chosen to use this more restricted version of interpretability. This is similar to the approach followed in Section 1.3 of [51]. For the definition of interpretability with onto maps see Section 5.4 of [32] or Section 1.3 of [51].

## 2.3 Monoid presentations and rewriting systems

Let A be a non-empty alphabet. In this paper we will use ' to denote graphical equality, that is, for two words w , w 1 2 P A ˚ , the expression w 1 ' w 2 means w 1 and w 2 are equal as word in A ˚ . A rewriting system R over A is a subset of A ˚ ˆ A ˚ . We call x A R | y a monoid presentation . This monoid presentation is said to be finite if both A and R are finite, and infinite otherwise. The elements of R are called rewrite rules of the rewriting system, and they are called the defining relations of the presentation. A rewrite rule p u, v q P R is often written as u ' v when writing the presentation x A R | y . For u, v P A ˚ we write u Ñ R v if there are words α, β P A ˚ and a rewrite rule p l, r q in R such that u ' αlβ and v ' αrβ . Let Ñ ˚ R denote the reflexive transitive closure of Ñ R , and let Ø ˚ R denote the reflexive transitive symmetric closure of Ñ R . The monoid defined by the presentation x A | R y is the set A ˚ { Ø ˚ R of equivalence classes of the equivalence relation Ø ˚ R with multiplication defined by p w 1 { Ø ˚ R q¨p w 2 { Ø ˚ R q ' w w 1 2 { Ø ˚ R for all w , w 1 2 P A ˚ . When the set of rewrite rules is clear from context, we shall omit the subscript R and simply write Ñ Ñ , ˚ and Ø ˚ . A word u is called reduced if no rewrite rule can be applied to it, that is, there is no word v with u Ñ v . A rewriting system R is called Noetherian if there is no infinite chain of words u i P A ˚ with u i Ñ u i ` 1 for all i ě 1. The rewriting system system is called confluent if whenever u Ñ ˚ u 1 and u Ñ ˚ u 2 there is a word v P A ˚ such that u 1 Ñ ˚ v and u 2 Ñ ˚ v . A complete rewriting system is one that is both Noetherian and confluent. If R is a complete rewriting system then each Ø ˚ -class contains a unique reduced word. It follows that if R is a complete rewriting system over an alphabet A then the set of reduced words of this system provides a set normal forms (that is, unique representatives) for the elements of the monoid M defined by the presentation x A | R y . In this situation we call x A | R y a complete presentation defining the monoid M . We say that a word is reduced with respect the complete presentation x A R | y if it is a reduced word with respect to the complete rewriting system R . If in addition either A or R is infinite then this is called an infinite complete presentation .

## 3 One-relator monoids

Our interest in this section is in the Diophantine problem for one-relator monoids with presentation x A w | ' y 1 . Throughout this section M will denote the one-relator monoid defined by the one-relator presentation x A | w ' 1 . y We shall see how this problem relates to other known difficult decidability problems. Before exploring those links we first observe one situation where the Diophantine problem is decidable.

Theorem 3.1. Let M ' x A | w ' 1 y and suppose that every letter in w is invertible in M . Let G ' x B | w ' 1 y where B Ď A is the set of letters that appear in w . Then G is a one-relator group, and if the Diophantine problem is decidable in G then it is decidable in M .

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00098v2-figure-17ace777-bd0e-44d1-9d4f-7ec60dbb3393.jpg)

Proof. The monoid M is isomorphic to the moniod free product G C ˚ ˚ where C ' A B z . Both G and C ˚ satisfy Assumption 17 from [21] (a cancellativity condition which satisfied by any group and any free monoid) and Assumption 18 from [21] (decidability of the Diophantine problem). Hence applying [21, Theorem 19] (taking C σ to be just t U ,V σ σ u ) we obtain that the Diophantine problem of M is decidable.

Example 3.2. As an easy example of an application of the previous theorem, we see that the Diophantine problem is decidable in the monoid M ' x a, b, c, d | aba ' 1 . y Indeed, the monoid G ' x a, b | aba ' y 1 is the infinite cyclic group. To see this, since a ba p q ' 1 it follows that a is right invertible in the monoid with right inverse ba , and since p ab a q ' 1 it follows that a is left invertible with left inverse ab . Hence a is invertible in the monoid M with inverse ab ' ba (because ab ' ab aba p q ' p aba ba q ' ba ). Letting a ´ 1 denote the inverse of a in this monoid we have b ' a ´ 2 . Hence G is the infinite cyclic group generated by a . The argument above shows that each letter that appears in aba is invertible in M , and the group G ' x a, b | aba ' 1 y has decidable Diophantine problem (since all free groups do). Hence the hypotheses of Theorem 3.1 are satisfied and we conclude that the Diophantine problem is decidable in the monoid M .

Some more complicated examples to which Theorem 3.1 applies will be discussed in Section 4.

The following lemma will be key later when studying systems of equations in some onerelator monoids (Section 3). A definition of weighted length relation can be found in Subsection 2.1.

Lemma 3.3. Let M be a monoid, let C ' x c 0 y be an infinite one-generated submonoid of M , and let D be a free rankn submonoid of M freely generated by a set t d , . . . , d 1 n u Ď M . Assume that both monoids C and D are e-interpretable in M with interpreting map the identity map. Assume also that for each i ' 1 , . . . , n there exists k i P N such that c k i d i ' 1 . Then the free monoid with weighted length relation p D, , ¨ 1 , ' , L /vector k q is e-interpretable in M , where /vector k ' p k , . . . , k 1 n q , and ¨ is the usual concatenation operation.

Proof. Since the free monoid D is e-interpretable in M , it suffices to show that so is the relation L /vector k . Let Σ C p x, /vector y q and Σ D p z, /vector w q be two systems of equations e-interpreting C and D in M , so that an element h P M belongs to C (respectively D ) if and only if Σ C p h, /vector y q (resp. Σ D p h, /vector w q ) has a solution /vector y 0 (resp. /vector w 0 ) in M . Take arbitrary elements c P C and d P D . Then c ' c t 0 for some t P N , and d ' d i 1 . . . d i r for some d i j . Now,

$$c d = \begin{cases} \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \   \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \ \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \ \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \,
c d = \begin{cases} \quad \, t - | d | _ { \vec { k } } \quad & \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \end{cases} \\ \quad c d = \begin{cases} \quad \, t - | d | _ { \vec { k } } \quad & \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, \quad \, = \quad \, \, \,$$

where in the last two cases /lscript is the minimum number such that | d i 1 . . . d i /lscript ` 1 | /vector k ą t (we have /lscript ă r ), and in the last case s is some number such that 0 ă s ă k i /lscript ` 1 . It follows that if t ě | d | /vector k then cd P C . The other implication is true as well: if we had cd P C and t ă | d | /vector k then cd ' c s 0 d i /lscript ` 1 . . . d /lscript r ' c r 0 for some r, s ě 0 and some 0 ă /lscript ă r . Let d 1 ' d i /lscript ` 1 . . . d /lscript r and let p ' | d 1 | /vector k . Note that s ă p . Then 1 ' c p 0 d 1 ' c p ´ s 0 c s 0 d 1 ' c p ´ ` s r 0 , contradicting the assumption that x c 0 y is infinite.

We have proved that cd P C if and only if | c | ' t ě | d | /vector k . Due to the e-definability of C , this in turn occurs if and only if Σ C p cd, /vector y q has a solution /vector y 0 . Moreover, the second case of (1) and the infiniteness of x c 0 y indicate that t ' | d | /vector k if and only if cd ' 1. Hence given two elements d , d 1 2 P D we have that | d 1 | /vector k ď | d 2 | /vector k if and only if there exists an element c P C

such that cd 2 ' 1 (this ensures | c | ' | d 2 | /vector k ) and Σ C p cd , /vector 1 y q has a solution /vector y 0 (this ensures | d 1 | /vector k ď | | c ). Overall, | d 1 | /vector k ď | d 2 | /vector k if and only if the following system of equations has a solution x , /vector 0 y , /vector 0 z 0 :

$$\begin{cases} \Sigma _ { C } ( x, \vec { y } ), & \\ \Sigma _ { C } ( x d _ { 1 }, \vec { z } ), & ( 2 ) \\ x d _ { 2 } = 1 \end{cases} \\ \text{length relation} \, L _ { \vec { z } } \text{ is } e \text{-interpretable in } M. & \quad \Box$$

.

It follows that the /vector k -weighted length relation L /vector k is e-interpretable in M

Example 3.4. The above result can be applied to the monoid with presentation

$$\langle a, b _ { 1 }, \dots, b _ { n } \ | \ a b _ { 1 } = 1, a b _ { 2 } = 1, \dots, a b _ { n } = 1 \rangle,$$

for any n ą 1, thus we recover the reduction from Example 21 in [21].

Let ∆ ' t α i p i P I qu Ď A ` be the set of minimal invertible pieces of the defining relator w . So the word w uniquely decomposes as

$$w \equiv \alpha _ { i _ { 1 } } \alpha _ { i _ { 2 } } \dots \alpha _ { i _ { k } }$$

where each α i j P ∆, and each of these words is invertible in M and has no proper nonempty prefix which is invertible in M . As mentioned in the introduction, we call the α i j the minimal invertible pieces of w . In [2] Adjan gives an algorithm for computing the minimal invertible pieces of the defining relator of a one-relator special monoid. In particular, every letter appearing in the relator represents an invertible element of the monoid if and only if all the minimal invertible pieces have size one, and this can be decided using Adjan's algorithm. Hence Adjan's algorithm can be used to test whether the hypothesis of Theorem 3.1 above are satisfied. This algorithm was discussed in Section 1, see Example 1.1 and the paragraph preceding it. As mentioned there, a good description of Adjan's algorithm can be found in [42, Section 1].

Þ

Since each piece α i is minimal invertible, none of them is a prefix of another piece α j , and so ∆ is a prefix code. Hence the submonoid of A ˚ generated by ∆ is free. We shall denote it ∆ ˚ . Let B ' t b i | i P I u be an alphabet in bijective correspondence with ∆. Let φ : ∆ ˚ Ñ B ˚ be the unique homomorphism extending α i Ñ b i for i P I . It follows from Adjan's results [2] that the group of units G of M is isomorphic to the monoid defined by the monoid presentation

$$\left \langle B \, \right | \phi ( w ) = 1 \right \rangle = \left \langle B \, \right | b _ { i _ { 1 } } b _ { i _ { 2 } } \dots b _ { i _ { k } } = 1 \right \rangle.$$

Theorem 3.5 ([71], Proposition 3.2) . The infinite monoid presentation

$$\left \langle A \left | \, u = v \, \colon u, v \in \Delta ^ { * }, v < _ { s h } u \ \ & \ \phi ( u ) = _ { G } \phi ( v ) \right \rangle$$

is an infinite complete presentation defining the monoid M .

In the above theorem ď sh denotes shortlex ordering, and φ u p q ' G φ v p q means that φ u p q and φ v p q both represent the same element in the group of units G . For the rest of this section, when we say a word w is reduced we mean that it is reduced with respect to the above infinite

complete presentation (4). Our aim is to show that for a wide class of special one-relator monoids, if we could solve equations for those monoids then that would imply a solution to equation solving with length constraints in free monoids -which is a longstanding open problem; see [13, 17, 18, 27, 43]. Of course, not every special one-relator monoid encodes equation solving with length constraints since, for instance, we have seen above that equations can be solved over the bicyclic monoid. So we will need some conditions on the monoid. We give conditions in terms of certain combinatorial properties on the set of minimal invertible pieces ∆. We suppose that the following conditions are satisfied:

- (C1) No word from ∆ is a proper subword of any other word from ∆.

(C2) There exist distinct words γ, δ P ∆ with a common initial letter a P A .

These conditions are easily satisfied and can be used to construct a wide variety of examples as we shall see in the next section. Note, for instance, if all the words from ∆ have the same length, then condition (C1) will be satisfied. In particular there are one-relator monoids with torsion whose minimal invertible pieces satisfy these properties. A concrete example is given by the family monoids

$$\left \langle a, b, c \, \left | \, ( ( a b ) ( a c ) ( a b ) ) ^ { k } = 1 \right \rangle,$$

for k ą 1 where, as we already proved in Example 1.2 above, the set of minimal invertible pieces is t ab, ac u . This gives many examples of special one-relator monoids with hyperbolic undirected Cayley graphs which satisfy the conditions (C1)-(C2). Applications to examples like this will be discussed below.

For the rest of this section let M be the one-relator monoid defined by the monoid presentation

$$\left \langle A \, \left | \, r = 1 \right \rangle$$

where we suppose that conditions (C1)-(C2) are satisfied, and we let a be a common initial letter of two distinct words from ∆

Throughout the rest of the section we denote the projection of a word w P A ˚ onto M by r w s , so r w s is the element of M represented by the word w .

We now give a series of important technical lemmas. We begin with the following observation:

Remark 3.6. The letter a us not invertible in M . Indeed, there are two distinct words δ, γ P ∆ having a as their first letter. Since δ and γ are subwords of w which are invertible in M , and they minimal with this property, if a was invertible then we would have a ' γ ' δ . This would contradict the fact that γ and δ are distinct words. Hence, a cannot be invertible.

Lemma 3.7. Suppose that (C1) and (C2) are both satisfied, and let a be a common initial letter of two distinct words from ∆ . Then for every reduced word w P A ˚ , and every positive integer i ą 0 , if a w i ' 1 then w has no prefix in ∆ .

Proof. Since a w i ' 1 it follows that a w i is not reduced and since w is assumed to be reduced it follows that we can write

$$a ^ { i } w \equiv a ^ { j } \alpha _ { 1 } \dots \alpha _ { t } w ^ { \prime \prime }$$

where 0 ď j ă i , w 2 is a suffix of w , α .. . α 1 k is the left hand side of a rewrite rule from (4), and each α i P ∆. Since a is not invertible and w is reduced, we have α 1 ' a w k 1 where k ' i ´ j ą 0, and w 1 is a non-empty prefix of w . Suppose, seeking a contradiction, that w ' βw 2 with β P ∆. Note that since w 1 is a suffix of α 1 , where α 1 is invertible, it follows that w 1 is left invertible. Now, if w 1 were a prefix of β it would follow that w 1 is also right invertible and hence invertible. But then since α 1 and w 1 are both invertible it would follow that a k is invertible and hence a is invertible, which is a contradiction by Remark 3.6. Therefore we must have that β is a prefix of w 1 , but then β P ∆ is a proper subword of α 1 ' a w k 1 P ∆, and this contradicts (C1). This completes the proof of the lemma.

Lemma 3.8 ([71], Lemma 3.1 and Lemma 3.6) . If u , u 1 2 P ∆ ˚ then r u 1 s ' r u 2 s in M if and only if r φ u p 1 qs ' r φ u p 2 qs in the one-relator group G .

Lemma 3.9. Let δ and γ be two distinct words in ∆ . Then r δ s ‰ r γ s in M .

Proof. Since the words δ and γ are distinct it follows that φ δ p q and φ γ p q are distinct letters of B . This implies that | B | ě 2. If | B | ě 3 then it follows from Magnus' Freiheitssatz [46, Theorem 5.1] that φ δ p q and φ γ p q represent distinct elements of the group G and hence r δ s ‰ r γ s in M , by the previous Lemma 3.8.

Now suppose that | B | ' 2. Set c ' φ δ p q and d ' φ γ p q . If c ' d in G then cd ´ 1 ' 1 in G . Since | B | ' 2 and c ' d it follows that the group G has torsion, and hence by [46, Theorem 5.2] the defining relator in the presentation of G must be a proper power. Then it follows from Newman's spelling theorem [46, Theorem 5.5] that cd ´ 1 contains a subword of the defining relator (which uses no inverse of c or d ), or the inverse of such a subword, with length at least 2. This is clearly impossible and thus completes the proof.

Lemma 3.10 ([71], Lemma 3.3) . Let u P A ˚ be reduced. If r u s is invertible then u P ∆ ˚ .

We are interested in right inverses of powers of the element a . These elements clearly form a submonoid of M . The following result shows that the set of reduced words representing elements in this submonoid themselves form a submonoid of the free monoid A ˚ .

Lemma 3.11. Let i, j P N . Let u, v P A ˚ be reduced words such that a u i ' 1 and a v j ' 1 . Then uv is a reduced word such that a i ` j uv ' 1 .

Proof. We just need to prove that uv is a reduced word. By Lemma 3.7 the word v does not have any prefix in ∆. If uv were reducible then it would follow that there is a non-empty suffix u 1 of u , and a non-empty prefix v 1 of v , such that u v 1 1 P ∆. But then u 1 is left invertible, since u is left invertible, and right invertible, since u v 1 1 is right invertible. This contradicts u v 1 1 P ∆.

Let F be the set of all reduced words β such that a β i ' 1 for some i P N with i ą 0, together with the empty word 1.

Remark 3.12. Note that by definition all the words in F Ď A ˚ are reduced words with respect to the complete presentation for M defined in Theorem 3.5. It follows from Lemma 3.11 that for any words w 1 , w 2 from the set F the concatenation of these two words w w 1 2 is again a word in the set F and hence in particular w w 1 2 is again a reduced word (since all the words in F are reduced words). Therefore, F is a submonoid of the free monoid A ˚ , and all of the words in F are reduced words with respect to the complete presentation for M .

We shall now prove that F is a free submonoid of A ˚ . For this it will be useful to recall some standard results about submonoids of free monoids. Recall from [45, Subsection 1.2] that given a submonoid P of A ˚ there is a unique set B that generates P and is minimal with respect to set-theoretic inclusion; it is the set

$$( P \langle 1 \rangle ) \langle ( P \langle 1 \rangle ) ^ { 2 }.$$

The following nice characterisation of free subsemigroups of free semigroups, from Lothaire, will be useful for us; see [45, Proposition 1.2.3].

Lemma 3.13. A submonoid P of A ˚ is free if and only if for any word w P A ˚ , one has w P P whenever there exist p, q P P such that pw,wq P P.

## Lemma 3.14. F is a free submonoid of A ˚ .

Proof. Suppose that w P A ˚ is such that there exist p, q P F such that pw,wq P F . By Lemma 3.13, we need to show that w P F . Since w is a subword of a reduced word (for example, pw ), it is reduced. By assumption there are i, j ě 1 such that a p i ' 1 and a pw j ' 1. If i ' j then w ' 1 and since w is reduced it is the empty word and this belongs to F . If i ă j then a j ´ i w ' 1 and so w P F . Otherwise, if i ą j then it would follow that w ' a k for some k ą 0. But then a pw j ' 1 implies a pa j k ' 1. This last equality implies that a is invertible, contradicting (C2) and the definition of ∆. In all cases w P F so this completes the proof of the lemma.

Lemma 3.15. Let w P A ˚ be arbitrary. Write w ' w w 1 2 where w 1 is the longest prefix of w which is invertible. Suppose that w 1 may be obtained from w by a single application of a relation from the presentation. Write w 1 ' w w 1 1 1 2 where w 1 1 is the longest invertible prefix of w 1 . Then w 1 ' w 1 1 in M . This implies that for any pair of words u , v , if u ' v in M then the longest invertible prefix of u is equal to 1 in M if and only if the longest invertible prefix of v is equal to 1 in M .

Proof. We consider where the relation is applied to the word w ' w w 1 2 . If the relation is applied within either w 1 or w 2 the result is immediate, so suppose otherwise. Let δ 1 . . . δ m P ∆ be the subword of ˚ w to which the relation is being applied. If there is a non-empty suffix u 1 of w 1 , and a non-empty prefix u 2 of w 2 such that u u 1 2 ' δ r for some r , then since u 1 is left invertible since it is a suffix of w 1 , and u 1 is right invertible since it is a prefix of δ r , it would follow that u 1 is invertible, which would contradict the fact that δ r has no proper prefix which is invertible. So we must have w 1 ' αδ 1 . . . δ r , and w 2 ' δ r ` 1 . . . δ m β , but then w δ 1 1 . . . δ m is a prefix of w which is invertible and is longer than w 1 , contradicting the definition of w 1 .

Let m P N be the maximum value m such that there is a minimal invertible piece α P ∆ such that a m is a prefix of α . We define a finite set of words X in the following way. For each 1 ď j ď m and for every piece a β j P ∆ (where β might begin with a ) let η be the reduced word representing the inverse of a β j and add the word βη to the set X .

Lemma 3.16. Every word in the set X is reduced.

Proof. Let a β j P ∆ and let η be a reduced word representing the inverse of a β j . We claim that βη is a reduced word as a consequence of assumption (C1). Indeed, suppose for a contradiction that βη is not reduced. It follows from Lemma 3.10 that η P ∆ . Then there ˚ is a rewrite rule from (4) which can be applied to the word βη . Let λ be the left hand side of such a rule noting that λ P ∆ . Since ` β and η are both reduced words we can write λ ' β η 2 1 where β 2 and η 1 are both non-empty, with β ' β β 1 2 and η ' η η 1 2 . Let α 1 P ∆ be the prefix of λ which belongs to ∆. Let α 2 P ∆ be the prefix of η which belongs to ∆. Since α 1 cannot be a subword of β since by (C1) it is not a subword of a β j P ∆ it follows that α 1 ' α α 1 1 2 1 where α 2 1 is a non-empty prefix of η . But since η is invertible this would imply that α 2 1 is invertible and thus α 1 1 is invertible, contradicting the fact that α 1 P ∆ is a minimal invertible piece. This is a contradiction, and we conclude that βη is indeed a reduced word.

Thus X is a finite set of reduced words, each of which is the right inverse of some a j with 1 ď j ď m . Note also that X is a finite subset of the free monoid F .

Lemma 3.17. Let i P N and w P A ˚ be a reduced word such that a w i ' 1 in M . Then there is an integer 0 ă j ď i , with j ď m , and a non-empty prefix w 1 of w such that w 1 P X and a w j 1 ' 1 in M . Moreover, with the same value of j , there is a decomposition

## a w i ' a a w w k j 1 2

where k ` j ' i , w ' w w 1 2 and a w j 1 P ∆ . In particular, if no word in ∆ begins with a 2 then w can be written as w ' w w ... w 1 2 i such that aw l ' 1 for all 1 ď l ď i .

Proof. Let i P N and w P A ˚ be a reduced word such that a w i ' 1 in M . Since a w i is not reduced it follows that the left hand side λ of one of the relations from (4) arises as a subword of a w i . In particular λ is a non-empty word with λ P ∆ . Since ˚ a is not invertible, no word from ∆ is a subword of a i , and since w is reduced, λ is not a subword of w . It follows that there is a prefix λ 1 of λ such that, λ 1 ' a w j 1 P ∆ with j ą 0 and where w 1 is a non-empty prefix of w . Thus we have the decomposition a w i ' a a w w k j 1 2

where k ` j ' i , w ' w w 1 2 and a w j 1 P ∆.

If k ' 0 then i ' j and a w i ' a w j ' 1. So we can write a w j ' p a w j 1 qp w 2 q and since p a w j 1 qp w 2 q ' 1 it follows that in M we have w ' βη where β ' w 1 , η ' w 2 , where η is equal to the inverse of a β j in M (note a β j is invertible because it belongs to ∆). Thus in this case the reduced word w belongs to the set X , as required.

Now suppose that k ą 0. Consider the longest invertible prefix of the word a w j . It is certainly non-empty since a w j 1 is invertible. Set v ' red p a w j q . Then we have a v k ' 1 with k ą 0 and v a reduced word. It follows from Lemma 3.7 that v cannot begin with a word from ∆. Hence v has no invertible prefix. Now by the last part of Lemma 3.15, since v ' a w j in M , it follows that the longest invertible prefix p of a w j is equal to 1 in M . So now we can write

$$a ^ { i } w \equiv a ^ { k } a ^ { j } w _ { 1 } w _ { 2 }$$

where k ` j ' i , w ' w w 1 2 and p ' a w j 1 ' 1 in M , and a w j 1 has prefix a w j 1 P ∆. It then follows that in M we have w 1 ' βη where β ' w 1 and η is equal to the inverse of a w j 1 in M . Also, w 1 is a reduced word because w is reduced. It follows that w 1 P X , as required. This completes the proof of the lemma.

## Lemma 3.18. X is a finite generating set for the monoid F .

Proof. Let i P N and w P A ˚ be a reduced word such that a w i ' 1 in M . It follows from Lemma 3.17 that there is an integer 0 ă j ď i , with j ď m , and a non-empty prefix w 1 of w such that w 1 P X and a w j 1 ' 1 in M . The lemma now follows by induction.

Let B be the unique subset of F that generates F and is minimal with respect to settheoretic inclusion, that is B is equal to the set

$$( F \langle 1 \rangle ) \langle ( F \langle 1 \rangle ) ^ { 2 }.$$

Since X Ď F is a finite generating set for F it follows that B Ď X .

Lemma 3.19. The basis B has size at least two. Thus the submonoid F of A ˚ is a free monoid of rank at least two.

Proof. By assumption (C2) there are distinct words γ, δ P ∆ with common initial letter a P A . Write γ ' aγ 1 and δ ' aδ 1 . Note that either γ 1 or δ 1 can begin with the letter a . By Lemma 3.9 the words γ and δ represent different elements of the monoid M . This in turn implies that r γ 1 s ‰ r δ 1 s . Let p aγ 1 q ´ 1 be a reduced word representing the inverse of aγ 1 in M , and let p aδ 1 q ´ 1 be a reduced word representing the inverse of aδ 1 in M . In particular p aγ 1 q ´ 1 , p aδ 1 q ´ 1 P ∆ . Then by definition we have ˚ γ 2 ' γ 1 p aγ 1 q ´ 1 P X and δ 2 ' δ 1 p aδ 1 q ´ 1 P X , and both of these words are reduced words. Suppose, seeking a contradiction, that F is a free monoid of rank 1. It follows that there is a word ν P A ` such that each of γ 2 and δ 2 is, in A ` , equal to some power of the word ν . But this would imply that γ 1 is a prefix of δ 1 , or vice versa. Suppose without loss of generality γ 1 is a proper prefix of δ 1 . Then aγ 1 is a proper prefix of aδ 1 . But this contradicts condition (C1) since both of these words belong to ∆. This completes the proof of the lemma.

Þ

The free submonoid F of the free monoid A ˚ defined above may also naturally be viewed as a free submonoid of the monoid M . This is because, as explained in Remark 3.12, all the words in F are reduced words and the concatenation of any two words from F is again a reduced word. In particular, since distinct reduced words represent distinct elements of M , the map r¨s : A ˚ Ñ M defined by w Ñ r w s induces an embedding r¨s : F ã Ñ M . Thus we have identified a free submonoid of M of rank at least two, namely the image r F s of F under this embedding.

Lemma 3.20. Let w P A ˚ be a word. If a w i ' 1 and a w j ' 1 then i ' j .

Proof. Seeking a contradiction suppose that a w i ' a w j ' 1 with j ă i . Then a i ´ j ' a i ´ j a w j ' a w i ' 1. But this contradicts the fact that a is not invertible.

Þ

Define a mapping ω : F Ñ Z ě 1 where w Ñ i if and only if a w i ' 1. This is a welldefined mapping by the previous lemma. Also, it is easy to see that ω is a homomorphism to p Z , `q . The mapping ω assigns a weight to every element of the free monoid F . Abusing the notation, we also use ω to denote the map ω : r F s Ñ Z ě 1 defined by ω pr w sq ' ω w p q . This is well defined by the comments preceding Lemma 3.20.

The following result is now an immediate consequence of the previous results proved in this section.

Lemma 3.21. Let w P A ˚ be a non-empty reduced word with w P F , and suppose that a w i ' 1 with i ě 1 . Then the word w can be written uniquely as

$$w \equiv w _ { 1 } w _ { 2 } \dots w _ { k }$$

where w j P B for all 1 ď j ď k , and

$$\omega ( w _ { 1 } ) + \omega ( w _ { 2 } ) + \dots + \omega ( w _ { k } ) = i.$$

In the special case that ∆ contains no word beginning with a 2 then ω w p j q ' 1 for all 1 ď j ď k , i.e. the statement above holds with k ' i .

Note that in particular condition (C1) is satisfied if all the pieces have the same length. We note that Adjan [2] gives an algorithm for computing the set ∆ by analysing overlaps of the relator with itself.

The following lemma will allow us to express membership in t a u ˚ in terms of equations.

Lemma 3.22. Let u P A ˚ be reduced. Then u P t a u ˚ if and only if r ua s ' r au s in M .

Proof. Clearly if u P t a u ˚ then r ua s ' r au s in M .

For the converse, suppose that u P A ˚ is such that r ua s ' r au s in M . Since a is right invertible and a is not invertible, it follows that for all δ P ∆ the last letter of δ is not equal to a . (Note this is true for all δ P ∆ including those δ in ∆ where δ does not begin with the letter a .)

Seeking a contradiction, suppose that u R t a u ˚ and write u ' u a 1 y where u 1 P A ` and the last letter of u 1 is not equal to a , and y ě 0. Consider red p ua q ' red p u a 1 y ` 1 q . Since for every rewrite rule α ' β from (4) neither α nor β ends in the letter a , it follows that red p ua q ' w a 1 y ` 1 where w 1 does not end in the letter a .

In contrast, consider red p au q ' red p au a 1 y q . Reasoning in the same way as in the previous paragraph red p au q ' w a 2 y where w 2 does not end in the letter a (note it may start with the letter a ). In particular this implies that red p ua q ı red p au q which implies r ua s ‰ r au s . This contradicts our original assumption, and completes the proof of the lemma.

The main result we shall prove in this section is the following.

Theorem 3.23. Let M ' x A r | ' y 1 and let ∆ Ď A ˚ be the set of minimal invertible pieces of r . Suppose that:

- (C1) no word from ∆ is a proper subword of any other word from ∆ , and
- (C2) there exist distinct words γ, δ P ∆ with a common first letter.

Then there exists a free submonoid D of M of finite rank n ě 2 and a tuple of weights /vector λ ' p λ , . . . , λ 1 n q such that the free monoid with weighted length relation p D, , ¨ 1 , L /vector λ q is interpretable in M by systems of equations and one coefficient.

Proof. Let F be the free monoid from our previous arguments (see Remark 3.12), and consider the embedding r F s of F in M via the map rs : A ˚ Ñ M (see the discussion above Lemma 3.20). Let /vector ω be the tuple p ω w p 1 q , . . . , ω p w n qq where w , . . . , w 1 n freely generate F and ω : F Ñ Z ě 1

is the homomorphism defined after Lemma 3.20, so that a ω w p i q w i ' 1 for all i (by Lemma 3.21). Recall that ω also then defines a map ω : r F s Ñ Z ě 1 .

We claim that a generates an infinite submonoid of M . Indeed, if it did not, we would have a k ' a k ` /lscript for some k, /lscript ě 0. Since a is right invertible (due to condition (C2)), this implies that a /lscript ' 1, from where it follows that a is invertible, a contradiction. This proves the claim.

By Lemma 3.22 the submonoid x a y is interpretable in M by the equation ax ' xa (Lemma 3.22). Since r F s ' t x P M a x | t ' 1 for some t P N zt 0 uu , it follows that r F s is e-interpretable in M by the system of two equations ay ' ya, yx ' 1.

The following two results follow immediately from the above Theorem 3.23 and from Proposition 2.5 regarding reducibility of decision problems.

Corollary 3.24. Let M be a monoid satisfying the hypothesis of Theorem 3.23. Then there exists a free monoid with a weighted length relation p D, , ¨ 1 , L /vector ω q such that the Diophantine problem in p D, , ¨ 1 , L /vector ω q is reducible to the Diophantine problem in M . In particular, if the latter is decidable, then systems of word equations with /vector ω -weighted length constraints are decidable as well.

Theorem 3.25. Any one-relator monoid of the form x A | w ' y 1 satisfying conditions (C1) and (C2) has undecidable positive AE -theory with coefficient. In particular, its first-order theory with coefficients is undecidable.

Proof. It is an immediate consequence of Theorem 3.23, of the fact that the AE -theory with coefficients of free monoids is undecidable [25, 50] and of reducibility of theories (Proposition 2.5).

If we add to Theorem 3.23 the extra condition that no word in ∆ starts with a 2 , then the same result holds with all weights being 1, i.e. /vector λ ' p 1 , . . . , 1 . q In this case L /vector λ is the standard length relation L :

Theorem 3.26. Let M ' x A r | ' y 1 and let ∆ Ď A ˚ be the set of minimal invertible pieces of r . Suppose that:

- (C1) no word from ∆ is a proper subword of any other word from ∆ ,
- (C2) there exist distinct words γ, δ P ∆ with a common first letter, say a ,

(C3) no word in ∆ starts with a 2 .

Then there exists a free monoid D of finite rank n ě 2 such that the free monoid with length relation p D, , ¨ 1 , ' , L q is interpretable in M by systems of equations.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00098v2-figure-52d7406e-33b2-4a29-8c92-6d89f39671ad.jpg)

Proof. The proof works in the same way as in Theorem 3.23, with the addition that the last part of Lemma 3.21 now ensures that ω w p i q ' 1 for all i ' 1 , . . . , n . Then /vector ω ' p 1 , . . . , 1 q and p D, , ¨ 1 , L /vector ω q ' p D, , ¨ 1 , ' , L q , where p D, , ¨ 1 , L /vector ω q is the free monoid with weighted length relation given by Theorem 3.23. Hence p D, , ¨ 1 , ' , L q is interpretable in M by systems of equations and one coefficient.

We obtain an analogue of Corollary 3.24

Corollary 3.27. Let M be a monoid satisfying the hypothesis of Theorem 3.26. Then there exists a free monoid with (non-weighted) length relation p D, , ¨ 1 , ' , L q such that the Diophantine problem in p D, , ¨ 1 , ' , L q is reducible to the Diophantine problem in M . In particular, if the latter is decidable, then systems of word equations with length constraints are decidable as well.

We further prove that the monoids from Theorems 3.23 and 3.26 naturally embed the monoids from Example 3.4.

Theorem 3.28. Let M ' x A r | ' y 1 and let ∆ Ď A ˚ be the set of minimal invertible pieces of r . Suppose conditions (C1), (C2), (C3) are satisfied, i.e.:

- (C1) no word from ∆ is a proper subword of any other word from ∆ ,
- (C2) there exist distinct words γ, δ P ∆ with a common first letter, say a ,

(C3) no word in ∆ starts with a 2 .

Let

$$\Sigma _ { a } = \{ w \in A ^ { * } \, \colon \, w \text{ is reduced and } [ a w ] = 1 \, \}.$$

Then

- (i) Σ a is a finite set with | Σ a | ě 2 ;
- (ii) the submonoid of M generated by Σ a is free with basis Σ a .

Let Σ a ' t γ , . . . , γ 1 q u . Then the submonoid of M generated by tr a su Y r Σ a s is naturally isomorphic to the monoid defined by the presentation

$$\langle a, d _ { 1 }, d _ { 2 }, \dots, d _ { q } \, | \, a d _ { 1 } = 1, \dots, a d _ { q } = 1 \rangle.$$

Proof. We claim that Σ a is equal to the set X ' t β a β p j q ´ 1 | a β j P ∆ u defined above; see Lemma 3.18. It is immediate from the definition of X that X Ď Σ . a For the converse, let γ P Σ . a This means that γ is a reduced word and r aγ s ' 1 in M . By Lemma 3.17 we can write aγ ' aγ γ 1 2 with γ 1 P X and aγ 1 ' 1 in M . Then γ 2 ' p aγ 1 q γ 2 ' aγ ' 1 in M . Since γ is a reduced word it follows that γ 2 ' /epsilon1 and thus γ ' γ 1 P X . This completes the proof that X ' Σ . a

Since X ' Σ , part (i) now follows from Lemmas 3.18 and 3.19. a

To prove part (ii) it will suffice to prove that Σ a ' B , where B is the unique basis of the free monoid generated by Σ a ' X . To prove this it will suffice to prove that no γ P Σ a can be written as a product of other γ from Σ . Suppose that a

$$\gamma = \gamma _ { 1 } \gamma _ { 2 } \dots \gamma _ { m }$$

where γ i P Σ a for all 1 ď i ď m . Then

$$1 = a \gamma = a \gamma _ { 1 } \gamma _ { 2 } \dots \gamma _ { m } = \gamma _ { 2 } \dots \gamma _ { m }$$

By Lemma 3.11, γ 2 . . . γ m is a reduced word and hence it follows that it must equal the empty word. Hence m ' 1 and γ ' γ 1 since they are both reduced words and they are equal in M . This completes the proof that Σ a ' B , and hence completes the proof of (ii).

For the last part, let w P pt a u Y Σ a q ˚ ' t a, γ 1 , . . . , γ q u ˚ . Since aγ i ' 1 for all i , this word is equal in M to a word w 1 where w 1 has the form w 1 ' w a 1 j , where w 1 P t γ , . . . , γ 1 q u ˚ . We claim that in fact red p w q ' w a 1 j . Indeed, since none of the words appearing in the rewrite rules in (4) ends in a (because otherwise together with condition (C2) this would imply that a is invertible) to show that w a 1 j is reduced it suffices to prove that w 1 is reduced, and this was proved in Lemma 3.11. Therefore, each element of the submonoid of M generated by tr a su Y r Σ a s may be uniquely written in the form αa j for some j ě 0 and some word α P t γ , . . . , γ 1 q u ˚ . Now consider the monoid N defined by the presentation

$$\left \langle a, d _ { 1 }, d _ { 2 }, \dots, d _ { q } \, \left | \, a d _ { 1 } = 1, \dots, a d _ { q } = 1 \right \rangle$$

This is a finite complete presentation, and the reduced words are precisely those of the form βa j where j ě 0 and β P t d , . . . , d 1 q u ˚ .

Þ

Let φ : t a, d 1 , . . . , d q u ˚ Ñ A ˚ be the homomorphism induced by the map a Ñ a , and d i Ñ γ i for 1 ď i ď q . Since each relation in the presentation for x a, d 1 , . . . , d q y is preserved by this homomorphism it follows that φ induces a homomorphism φ : x a, d 1 , . . . , d q y Ñ M . Moreover, this homomorphism maps x a, d 1 , . . . , d q y bijectively to the submonoid of M generated by tr a su Y r Σ a s since it clearly defines a bijection between the normal forms described above. This completes the proof of the theorem.

Þ

Remark 3.29. We follow the notation of the previous Theorem 3.28. In the proof of Theorem 3.23 we showed that both x a y and x Σ a y are e-interpretable in M . It is natural to ask whether the submonoid x a, Σ a y , which by Theorem 3.28 is isomorphic to the monoid from Example 3.4, is itself e-interpretable in M . The answer to this question is not clear and we leave it open.

## 3.1 One-relator monoids with hyperbolic undirected Cayley graph and hyperbolic group of units

In this subsection we prove some sufficient conditions for one-relator monoids to have hyperbolic undirected Cayley graph and to have hyperbolic group of units. These are of interest to the paper given our question in the introduction regarding the reducibility of the Diophantine problem in a special one-relator monoid to the same problem in its group of units: since the Diophantine problem in hyperbolic groups is decidable [16, 65], such a reduction would imply the decidability of the Diophantine problem in the one-relator monoid.

Before presenting the main result of this section we first define what we mean by the undirected Cayley graph of a monoid, and what it means for this graph to be hyperbolic. For more background on the theory of hyperbolic metric spaces and hyperbolic groups we refer the reader to [12].

Let p X,d q be a metric space. For x, y P X a geodesic path from x to y is a map f : r 0 , l s Ñ X from the closed interval r 0 , l s Ď R to X such that f p 0 q ' x , f p q l ' y and d f p p a , f q p b qq ' | a ´ | b for all a, b P r 0 , l s . Note in particular this implies that d x, y p q ' l . The image α of the map f is called a geodesic segment with endpoints x and y . A geodesic metric space is one in which there exist geodesic segments between all pairs of points. Note that in general there can be more than one geodesic segment between a given pair of points. A geodesic triangle Ω in X is a union of three geodesic segments from x to y , y to z and z to x ,

where x, y, z P X . These three geodesic segments are called the sides of the geodesic triangle Ω.

Definition 3.30. Let X be a geodesic metric space and let Ω be a geodesic triangle in X with sides α β , and γ . The triangle Ω is called δ -slim if for every point a on α the distance from a to β Y γ is less than δ , and similarly every point b on β is within distance δ of α Y γ , and every point c on γ is within distance δ of α Y β . If every geodesic triangle in X is δ -slim then we say that the geodesic metric space X is δ -hyperbolic . If X is δ -hyperbolic for some δ ą 0 then we say X is hyperbolic .

Let M be a monoid generated by a set A . Then by the undirected Cayley graph Γ p M,A q of M with respect to the generating set A we mean the graph with vertex set M and where there is an undirected edge connecting m P M to n P M if and only if ma ' n or na ' m for some a P A . Note that here we have opted to work with the right Cayley graph, but the results we prove in this subsection are also true working with the left Cayley graph instead. The graph Γ p M,A q is a metric space with the usual distance metric on graphs where for a, b P M we define d a, b p q to be the shortest length of a path in Γ p M,A q from a to b . This is not a geodesic metric space, but can be made into one in a natural way by making each edge isometric to the unit interval r 0 1 , s and extending the metric to the points of these edges in the obvious way. This is called the geometric realisation of the Cayley graph. We say that the undirected Cayley graph of a monoid M is hyperbolic if the geometric realisation of Γ p M,A q is a hyperbolic metric space. If M is a finitely generated monoid, it may be shown that this property is independent of the choice of finite generating set for M , so it makes sense to talk about a finitely generated monoid having a hyperbolic undirected Cayley graph, without reference to any specific finite generating set.

Proposition 3.31. Let M ' x A | w ' 1 y . Let G be the group of units of M . If G is a hyperbolic group then the undirected Cayley graph of M is hyperbolic.

Proof. As usual, let ∆ be the set of minimal invertible pieces of the relator w (see the discussion above Theorem 3.5 for further details). Let I be the set of all non-empty prefixes of the words from ∆, that is

$$I = \{ x \in A ^ { + } \ | \ x y \in \Delta \text{ for some } y \in A ^ { * } \}.$$

Let Y ' tr u s : u P I u . Then, by Zhang [71, Lemma 3.3], Y is a finite generating set for the submonoid of right units R of M . Note that R is the R -class of the identity element of M , where R is Green's R -relation on M defined by saying m n R if and only if mM ' nM . Clearly ∆ is a subset of I . Let G be the underlying undirected graph of the right Cayley graph of the monoid R , with respect to the generating set Y . So G has vertex set R and edges tr u , s r ux su where u P A ˚ , x P I and tr u , s r ux su is a subset of R . Note that G is a connected infinite graph and its vertices have bounded degree since R is a right cancellative monoid. We use S to denote the undirected Schützenberger graph of the R -class R . So S also has vertex set R but has edges tr u , s r ua su where u P A ˚ , a P A and tr u , s r ua su is a subset of R .

We claim that the identity map on R defines a quasi-isometry between the graph G and the graph S .

To prove this claim, let d Σ and d Γ denote the distances in each of these graphs. Consider an arbitrary edge tr u , s r ux su in the graph G . Let D be the maximum length of a word in ∆.

Then d Σ pr u , s r ux sq ď D . For the converse, let tr u , s r ua su be an arbitrary edge in the graph S . We claim that d Γ pr u , s r ua sq ď 2. We may assume without loss of generality that u is a reduced word. There are now two cases to consider.

First suppose that ua is a reduced word. It then follows from [71, Lemma 3.3] that ua P I ˚ (i.e. is a graphical product of words from I ). Note that ua may admit several different decompositions in I ˚ . Write ua ' u γ 1 where γ P I and u 1 P I ˚ . If | γ | ' 1 then a ' γ P I and so d Γ pr u , s r ua sq ' 1. Now suppose that | γ | ą 1. Write γ ' γ a 1 with γ 1 P I . Then we have u ' u γ 1 1 and both tr u 1 s , r u γ 1 1 su and tr u 1 s , r u γ 1 su are edges in the graph G . It follows that d Γ pr u , s r ua sq ' d Γ pr u γ 1 1 s , r u γ 1 sq ď 2.

Now suppose that ua is not a reduced word. Since u is reduced, it follows that we can write ua ' u γ 1 where γ P ∆ is a non-empty word. Then arguing as in the previous paragraph, either | γ | ' 1 and d Γ pr u , s r ua sq ' 1, or else | γ | ą 1 and d Γ pr u , s r ua sq ď 2. This completes the proof of the claim that the identity mapping on R induces a quasi-isometry between the graph G and the graph S .

It follows from [71, Theorem 4.5] that the submonoid of right units R of M is isomorphic to a monoid free product T ˚ G where T is a free monoid of finite rank, and G is the group of units of the monoid M . Since the Cayley graph of a free monoid is a tree, it then follows that the undirected Cayley graph G of R -T ˚ G is hyperbolic. Since S is quasi-isometric to G we conclude that the undirected Schützenberger graph of the R -class of the identity element is hyperbolic.

It follows from the results in [31, Section 3] that (i) the Schützenberger graphs of any pair of R -classes of M are isomorphic to each other, and (ii) for every R -class R 1 of M there is at most one edge t m,ma u in the Cayley graph of M such that m P M a , P A , with ma P R 1 but m R R 1 , and (iii) the quotient graph with vertex set the R -classes of M and edges all edges t m,n u from the Cayley graph of M such that p m,n q R R is a rooted tree.

Combining these observations we see that the Cayley graph of M has the structure of a 'regular tree of copies of' the hyperbolic graph S . From this it then quickly follows (e.g. by applying [30, Theorem 5.4]) that the undirected Cayley graph of M is hyperbolic.

In fact, using a similar argument, it may be shown that Proposition 3.31 holds more generally for any finitely presented monoid M defined by a presentation of the form

$$\langle A \, | \, w _ { 1 } = 1, \dots, w _ { k } = 1 \rangle.$$

Proposition 3.32. Let M ' x A | w k ' 1 y p k ě 2 q . Then the group of units of M is a one-relator group with torsion. It follows that the group of units of M is a hyperbolic group, and the undirected Cayley graph of M is a hyperbolic metric space.

Proof. It follows from results of Adjan [2] that the group of units G of M is a one-relator group with torsion (see [31, Section 3] for a proof of this). By the Newman Spelling Theorem [46, Theorem 5.5] we have that G is a hyperbolic group. This and Proposition 3.31 imply that the undirected Cayley graph of M is hyperbolic.

## 4 Applications, examples and open problems

In this section we list some examples, and classes of examples, of monoids to which the main results of this paper apply. We shall also collect together a selection of open problems, and

possible future research directions, which naturally arise from our results. As part of this we will identify the simplest examples of one-relator monoids for which we do not yet know whether or not the Diophantine problem is decidable. In general, we do not know if there is an example of a one-relator monoid of the form x A r | ' y 1 with undecidable Diophantine problem.

Let us begin by recording some examples of one-relator monoids of the form x A r | ' 1 y where we have shown that the Diophantine problem is decidable. Consider, in particular the case of 2-generated one-relator monoids x a, b | r ' 1 . y Let M denote the monoid defined by this presentation. Very often questions about one-relator monoids can be reduced to just considering the 2-generator case e.g. this is the case for the word problem.

By Makanin [48] the Diophantine problem is decidable for the free monoid x a, b | y , while in [21, Example 21] it is proved that it is decidable for the bicyclic monoid x a, b | ab ' y 1 . Now consider the general case x a, b | r ' 1 y and let r ' r r 1 2 . . . r k be the decomposition of r into minimal invertible pieces as described in Section 3 and in Example 1.1 and the paragraph preceding it. If r P t a u ˚ or r P t u b ˚ then the monoid is a free product of a free monoid of rank one and a finite cyclic group, and thus the Diophantine problem is decidable by [21]. Now suppose that both the letters a and b appear in the defining relator r . There are then two cases to consider. If there are minimal invertible pieces r i and r j such that the first letter of r i equals the last letter of r j , then applying the Adjan overlap algorithm it follows that both a and b both represent invertible elements of M and hence M is a group. In this case, M is the group defined by the same one-relator group presentation, and hence M is a so-called positive one-relator group. Such groups have been studied e.g. by Baumslag [9] and Wise [68]. This motivates the question of whether the Diophantine problem is decidable for positive one-relator groups. Up to symmetry the case that remains is when all the invertible pieces r i p 1 ď i ď k q begin with the letter a and end with the letter b . This case then divides into two subcases, either (i) all of the pieces r i are equal to each other as words, or (ii) there is some pair of minimal invertible pieces r i and r j with r i ı r j . Note that subcase (i) includes in particular the case where there is a single invertible piece. This is precisely the case where the relator r is self-overlap free meaning that no proper non-empty prefix is equal to a proper non-empty suffix of r . This in turn is equivalent to saying that the group of units of the monoid is the trivial group. Also note that many of the examples in (ii) will satisfy the conditions (C1) and (C2) (and (C3)) from Section 3, and thus the main theorems of that section, Theorem 3.23 and Theorem 3.26, will apply to them. Some examples of these are listed in the introduction after Theorem A.

A similar division into cases can also be done for one-relator monoids x A | r ' 1 y with more than two generators. For instance, as we already saw in Example 3.2, the monoid x a, b, c, d | aba ' 1 y has decidable Diophantine problem by Theorem 3.1 above, since all the letters in the relator are invertible, and the group of units is the infinite cyclic group which has decidable Diophantine problem. Similarly the monoid x a, b, c, d, e, f | abcddcbbaa ' y 1 has decidable Diophantine problem, again applying Theorem 3.1. Indeed, applying the Adjan overlap algorithm we deduce that all the letters a , b , c and d appearing in the defining relator are invertible, and the group of units of this monoid is defined by the group presentation

$$\text{Gp} \langle a, b, c, d \, | \, a b c d d c b b a a = 1 \rangle.$$

To apply Theorem 3.1 we need to show that this group has decidable Diophantine problem.

To show this, note that this group can be written

$$\text{Gp} \langle a, b, c, d \ | \ c d d c = b ^ { - 1 } a ^ { - 1 } a ^ { - 1 } a ^ { - 1 } b ^ { - 1 } b ^ { - 1 } \rangle.$$

The words cddc and b ´ 1 a ´ 1 a ´ 1 a ´ 1 b ´ 1 b ´ 1 are non-primitive since the words cddc and bbaaab are not Christoffel words (see e.g. [60]), and neither are any of the conjugates of these words, since the first word have the same number of c s and d s, and similarly for the second word. It is known, see [11, 35, 37], that a cyclically pinched one-relator group defined by a presentation Gp x A u | ' v y , where u and v are non-primitive words written over disjoint sets of letters, and it is not the case that both u and v are proper powers, is hyperbolic. Hence the group of units of x a, b, c, d, e, f | abcdcbba ' 1 y is a hyperbolic group and thus by Theorem 3.1 above this monoid has decidable Diophantine problem. Many other examples similar to this can be written down. This gives a reasonably rich source of examples of one-relator monoids x A r | ' y 1 which have solvable Diophantine problem as a consequence of the fact that their groups of units are hyperbolic. We do not know in general whether having a hyperbolic group of units is enough to imply that a one-relator monoid of the form x A | r ' 1 y has solvable Diophantine problem. As explained in the introduction, this was one of the original motivating questions for the work done in this paper. By Proposition 3.32 and Theorem 3.26, a positive answer to this questions implies decidability of word equations with length constraints.

In light of this discussion, it is sensible to identify the simplest examples of one-relator monoids of the form x A r | ' 1 y for which we neither know that the Diophantine problem is decidable, but we also do not know of a reduction theorem (like the theorems from Section 3 above) of a known difficult open problem. Thus we ask whether either of the monoids x b, c | b 2 c ' y 1 or x a, b, c | abc ' y 1 has decidable Diophantine problem? Initial investigations indicate that this might relate to solving word equations with a variation on the notion of twisting, in the sense of [23]. More generally we ask the following

Question 4.1. If the word w P A ˚ has no self overlaps, i.e. there is no non-empty word which is both a proper prefix of w and a proper suffix of w , then is the Diophantine problem for the one-relator monoid x A | w ' y 1 decidable?

Note that the condition that w has no self overlaps is equivalent to saying the group of units of this monoid is trivial (this follows from the discussion immediately before the statement of Theorem 3.5).

The corresponding class of monoids with torsion are also not covered by any of the theorems in this paper. Thus we ask whether x b, c | bcbc ' 1 y has decidable Diophantine problem? More generally, of course, we can ask whether the Diophantine problem is decidable for monoids x A w | n ' y 1 where w has no self overlaps.

Finally, we restate some natural questions which have arisen in this work. As already mentioned above, if any of these problems has a positive answer, then as a corollary this would give a positive solution to the open problem of solving word equations with length constraints.

Question 4.2. Is the Diophantine problem decidable for one-relator monoids of the form x A w | n ' y 1 where n ą 1 ?

Question 4.3. Let M be the monoid defined by x A w | ' 1 y and let G be the group of units of M . If the Diophantine problem is decidable in G, then does it follow that it is decidable in M ?

It follows from the results in the present paper that the positive AE -theory is in general undecidable in the classes of monoids from Questions 4.1 through Question 4.3 (due to Theorem 3.25, Proposition 3.32, and Remark 3.4).

## 5 Acknowledgements

We would like to thank the anonymous reviewer who carefully read our paper, and whose comments and suggestions helped improve it.

We are also thankful to Olga Kharlampovich and Alexei Miasnikov for useful conversations.

This research was initiated during the Heilbronn Focused Research Workshop 'Equations in One-Relator Groups and Semigroups', in September 2018, at the ICMS in Edinburgh organised by Laura Ciobanu of Heriot-Watt University.

The first named author was supported by the ERC grant PCG-336983, by the Basque Government grant IT974-16, and by the MINECO Grant PID2019-107444GA-I00.

## 6 Bibliography

- [1] P. A. Abdulla, M. F. Atig, Y.-F. Chen, L. Holík, A. Rezine, P. Rümmer, and J. Stenman. Norn: An SMT solver for string constraints. In D. Kroening and C. S. Păsăreanu, editors, Computer Aided Verification , pages 462-469, Cham, 2015. Springer International Publishing.
- [2] S. I. Adjan. Defining relations and algorithmic problems for groups and semigroups. Trudy Mat. Inst. Steklov. , 85:123, 1966.
- [3] J. Araújo, M. Kinyon, J. Konieczny, and A. Malheiro. Decidability and independence of conjugacy problems in finitely presented monoids. Theoret. Comput. Sci. , 731:88-98, 2018.
- [4] J. Araújo, J. Konieczny, and A. Malheiro. Conjugation in semigroups. J. Algebra , 403:93-134, 2014.
- [5] S. Arora and B. Barak. Computational Complexity: A Modern Approach . Cambridge University Press, New York, NY, USA, 1st edition, 2009.
- [6] A. Aydin, L. Bang, and T. Bultan. Automata-based model counting for string constraints. In D. Kroening and C. S. Păsăreanu, editors, Computer Aided Verification , pages 255272, Cham, 2015. Springer International Publishing.
- [7] C. Barrett, C. L. Conway, M. Deters, L. Hadarean, D. Jovanović, T. King, A. Reynolds, and C. Tinelli. Cvc4. In G. Gopalakrishnan and S. Qadeer, editors, Computer Aided Verification , pages 171-177, Berlin, Heidelberg, 2011. Springer Berlin Heidelberg.

| [8]   | C. Barrett, R. Sebastiani, S. Seshia, and C. Tinelli. Satisfiability modulo theories , volume 185 of Frontiers in Artificial Intelligence and Applications , pages 825-885. 1 edition, 2009.                                                                   |
|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [9]   | G. Baumslag. Positive one-relator groups. Trans. Amer. Math. Soc. , 156:165-183, 1971.                                                                                                                                                                         |
| [10]  | M. Berzish, V. Ganesh, and Y. Zheng. Z3str3: A string solver with theory-aware heuris- tics. In 2017 Formal Methods in Computer Aided Design (FMCAD) , pages 55-59, Oct 2017.                                                                                  |
| [11]  | M. Bestvina and M. Feighn. A combination theorem for negatively curved groups. J. Differential Geom. , 35(1):85-101, 1992.                                                                                                                                     |
| [12]  | M. R. Bridson and A. Haefliger. Metric spaces of non-positive curvature , volume 319 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathe- matical Sciences] . Springer-Verlag, Berlin, 1999.                                     |
| [13]  | J. R. Büchi and S. Senger. Definability in the existential theory of concatenation and undecidable extensions of this theory. Z. Math. Logik Grundlag. Math. , 34(4):337-342, 1988.                                                                            |
| [14]  | M. Casals-Ruiz and I. Kazachkov. On systems of equations over free products of groups. Journal of Algebra , 333(1):368 - 426, 2011.                                                                                                                            |
| [15]  | L. Ciobanu Radomirovic, V. Volker Diekert, and M. Elder. Solution sets for equations over free groups are EDT0L languages. International Journal of Algebra and Computa- tion , 26(5):843-886, 8 2016.                                                         |
| [16]  | F. Dahmani and V. Guirardel. Foliations for solving equations in groups: free, virtually free, and hyperbolic groups. Journal of Topology , 3(2):343-404, 2016.                                                                                                |
| [17]  | J. D. Day, V. Ganesh, P. He, F. Manea, and D. Nowotka. The satisfiability of word equations: Decidable and undecidable theories. In I. Potapov and P.-A. Reynier, editors, Reachability Problems , pages 15-29, Cham, 2018. Springer International Publishing. |
| [18]  | J. D. Day, V. Ganesh, P. He, F. Manea, and D. Nowotka. The satisfiability of word equations: decidable and undecidable theories. In Reachability problems , volume 11123 of Lecture Notes in Comput. Sci. , pages 15-29. Springer, Cham, 2018.                 |
| [19]  | L. De Moura and N. Bjørner. Satisfiability modulo theories: Introduction and applica- tions. Commun. ACM , 54(9):69-77, September 2011.                                                                                                                        |
| [20]  | T. Deis, J. Meakin, and G. Sénizergues. Equations in free inverse monoids. Internat. J. Algebra Comput. , 17(4):761-795, 2007.                                                                                                                                 |
| [21]  | V. Diekert and M. Lohrey. Word equations over graph products. International Journal of Algebra and Computation , 18(03):493-533, 2008.                                                                                                                         |
| [22]  | V. Diekert. More than 1700 years of word equations. In A. Maletti, editor, Algebraic Informatics , pages 22-28, Cham, 2015. Springer International Publishing.                                                                                                 |

| [23]   | V. Diekert and M. Elder. Solutions to twisted word equations and equations in virtually free groups. International Journal of Algebra and Computation , 30(04):731-819, 2020.                                                                                                                                                                                                               |
|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [24]   | V. Diekert, F. Martin, G. Sénizergues, and P. V. Silva. Equations over free inverse monoids with idempotent variables. Theory Comput. Syst. , 61(2):494-520, 2017.                                                                                                                                                                                                                          |
| [25]   | V. G. Durnev. Undecidability of the positive @D 3 -theory of a free semigroup. Siberian Mathematical Journal , 36(5):917-929, Sep 1995.                                                                                                                                                                                                                                                     |
| [26]   | V. Ganesh, A. Kieżun, S. Artzi, P. J. Guo, P. Hooimeijer, and M. Ernst. HAMPI: a string solver for testing, analysis and vulnerability detection. In Computer aided verification , volume 6806 of Lecture Notes in Comput. Sci. , pages 1-19. Springer, Heidelberg, 2011.                                                                                                                   |
| [27]   | V. Ganesh, M. Minnes, A. Solar-Lezama, and M. Rinard. Word equations with length constraints: What's decidable? In A. Biere, A. Nahir, and T. Vos, editors, Hardware and Software: Verification and Testing , pages 209-226, Berlin, Heidelberg, 2013. Springer Berlin Heidelberg.                                                                                                          |
| [28]   | A. Garreta, A. Miasnikov, and D. Ovchinnikov. Diophantine problems in rings and algebras: undecidability and reductions to rings of algebraic integers. arXiv e-prints , May 2018.                                                                                                                                                                                                          |
| [29]   | A. Garreta, A. Miasnikov, and D. Ovchinnikov. Diophantine problems in solvable groups. Bulletin of Mathematical Sciences , 10(01):2050005, 2020.                                                                                                                                                                                                                                            |
| [30]   | R. D. Gray, P. V. Silva, and N. Szakács. Algorithmic properties of inverse monoids with hyperbolic and tree-like schützenberger graphs. arXiv e-prints , 2019.                                                                                                                                                                                                                              |
| [31]   | R. D. Gray and B. Steinberg. Topological finiteness properties of monoids. Part 2: special monoids, one-relator monoids, amalgamated free products, and HNN extensions. arXiv e-prints , May 2018.                                                                                                                                                                                          |
| [32]   | W. Hodges, S. Hodges, H. Wilfrid, G. Rota, B. Doran, P. Flajolet, T. Lam, E. Lut- wak, and M. Ismail. Model Theory . Encyclopedia of Mathematics and its Applications. Cambridge University Press, 1993.                                                                                                                                                                                    |
| [33]   | J. M. Howie. Fundamentals of semigroup theory , volume 12 of London Mathematical Society Monographs. New Series . The Clarendon Press, Oxford University Press, New York, 1995. Oxford Science Publications.                                                                                                                                                                                |
| [34]   | A. Jez. Word Equations in Nondeterministic Linear Space. In I. Chatzigiannakis, P. In- dyk, F. Kuhn, and A. Muscholl, editors, 44th International Colloquium on Automata, Languages, and Programming (ICALP 2017) , volume 80 of Leibniz International Pro- ceedings in Informatics (LIPIcs) , pages 95:1-95:13, Dagstuhl, Germany, 2017. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik. |
| [35]   | A. Juhász and G. Rosenberger. On the combinatorial curvature of groups of F -type and other one-relator free products. In The mathematical legacy of Wilhelm Magnus: groups, geometry and special functions (Brooklyn, NY, 1992) , volume 169 of Contemp. Math. , pages 373-384. Amer. Math. Soc., Providence, RI, 1994.                                                                    |

| [36]   | O. Kharlampovich and A. G. Miasnikov. Model theory and algebraic geometry in groups, non-standard actions and algorithmic problems. Proceedings of the Intern. Congress of Mathematicians, Seoul, v. 2, invited lectures, 223-244 , 2014.                                                           |
|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [37]   | O. Kharlampovich and A. Myasnikov. Hyperbolic groups and free constructions. Trans. Amer. Math. Soc. , 350(2):571-613, 1998.                                                                                                                                                                        |
| [38]   | O. Kharlampovich and L. López. Bi-interpretability of some monoids with the arithmetic and applications. Semigroup Forum , 99(1):126-139, Aug 2019.                                                                                                                                                 |
| [39]   | O. Kharlampovich, L. Lopez Cruz, and A. Miasnikov. The Diophantine problem in some metabelian groups. Mathematics of Computation , 89:1, 02 2020.                                                                                                                                                   |
| [40]   | O. Kharlampovich and A. Myasnikov. Elementary theory of free non-abelian groups. J. Algebra , 302(2):451-552, 2006.                                                                                                                                                                                 |
| [41]   | O. Kharlampovich and A. G. Myasnikov. Equations and fully residually free groups. In O. Bogopolski, I. Bumagin, O. Kharlampovich, and E. Ventura, editors, Combinatorial and Geometric Group Theory , pages 203-242, Basel, 2010. Birkhäuser Basel.                                                 |
| [42]   | G. Lallement. On monoids presented by a single relation. J. Algebra , 32:370-388, 1974.                                                                                                                                                                                                             |
| [43]   | A. W. Lin and R. Majumdar. Quadratic word equations with length constraints, counter systems, and presburger arithmetic with divisibility. In S. K. Lahiri and C. Wang, editors, Automated Technology for Verification and Analysis , pages 352-369, Cham, 2018. Springer International Publishing. |
| [44]   | M. Lohrey and G. Sénizergues. Theories of HNN-extensions and amalgamated products. In M. Bugliesi, B. Preneel, V. Sassone, and I. Wegener, editors, Automata, Languages and Programming , pages 504-515, Berlin, Heidelberg, 2006. Springer Berlin Heidelberg.                                      |
| [45]   | M. Lothaire. Combinatorics on Words . Cambridge Mathematical Library. Cambridge University Press, 2 edition, 1997.                                                                                                                                                                                  |
| [46]   | R. Lyndon and P. Schupp. Combinatorial Group Theory . Classics in Mathematics. Springer Berlin Heidelberg, 2015.                                                                                                                                                                                    |
| [47]   | G. S. Makanin. On the identity problem in finitely defined semigroups. Dokl. Akad. Nauk SSSR , 171:285-287, 1966.                                                                                                                                                                                   |
| [48]   | G. S. Makanin. The problem of solvability of equations in a free semigroup. Mathematics of the USSR-Sbornik , 32(2):129-198, feb 1977.                                                                                                                                                              |
| [49]   | G. S. Makanin. Equations in a free group. Mathematics of the USSR-Izvestiya , 21(3):483, 1983.                                                                                                                                                                                                      |
| [50]   | S. S. Marchenkov. Undecidability of the positive @D -theory of a free semigroup. Sibirsk. Mat. Zh. , 23(1):196-198, 223, 1982.                                                                                                                                                                      |
| [51]   | D. Marker. Model Theory : An Introduction . Graduate Texts in Mathematics. Springer New York, 2013.                                                                                                                                                                                                 |

| [52]   | J. V. Matijasevič. The Diophantineness of enumerable sets. Dokl. Akad. Nauk SSSR , 191:279-282, 1970.                                                                                                                              |
|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [53]   | Y. Matiyasevich. Word equations, Fibonacci numbers, and Hilbert's Tenth Problem. 02 2019.                                                                                                                                          |
| [54]   | P. Narendran and F. Otto. Complexity results on the conjugacy problem for monoids. Theoret. Comput. Sci. , 35(2-3):227-243, 1985.                                                                                                  |
| [55]   | P. Narendran, F. Otto, and K. Winklmann. The uniform conjugacy problem for finite Church-Rosser Thue systems is NP-complete. Inform. and Control , 63(1-2):58-66, 1984.                                                            |
| [56]   | F. Otto. Conjugacy in monoids with a special Church-Rosser presentation is decidable. Semigroup Forum , 29(1-2):223-240, 1984.                                                                                                     |
| [57]   | W. Plandowski. Satisfiability of word equations with constants is in PSPACE. J. ACM , 51(3):483-496, 2004.                                                                                                                         |
| [58]   | W. V. Quine. Concatenation as a basis for arithmetic. Journal of Symbolic Logic , 11(4):105-114, 1946.                                                                                                                             |
| [59]   | A. A. Razborov. On systems of equations in a free group. Mathematics of the USSR- Izvestiya , 25(1):115, 1985.                                                                                                                     |
| [60]   | C. Reutenauer. From Christoffel words to Markoff numbers . Oxford University Press, Oxford, 2019.                                                                                                                                  |
| [61]   | E. Rips and Z. Sela. Canonical representatives and equations in hyperbolic groups. Inventiones mathematicae , 120(1):489-512, 1995.                                                                                                |
| [62]   | V. A. Roman 1 kov. Equations over groups. Groups Complexity Cryptology , 4:191-239, 2012.                                                                                                                                          |
| [63]   | B. V. Rozenblat. Diophantine theories of free inverse semigroups. Sibirsk. Mat. Zh. , 26(6):101-107, 190, 1985.                                                                                                                    |
| [64]   | Z. Sela. Diophantine geometry over groups. VI. The elementary theory of a free group. Geom. Funct. Anal. , 16(3):707-730, 2006.                                                                                                    |
| [65]   | Z. Sela. Diophantine geometry over groups. VII. The elementary theory of a hyperbolic group. Proc. Lond. Math. Soc. (3) , 99(1):217-273, 2009.                                                                                     |
| [66]   | Z. Sela. Word Equations I: Pairs and their Makanin-Razborov diagrams. arXiv e-prints , Jul 2016.                                                                                                                                   |
| [67]   | M.-T. Trinh, D.-H. Chu, and J. Jaffar. Progressive reasoning over recursively-defined strings. In S. Chaudhuri and A. Farzan, editors, Computer Aided Verification , pages 218-240, Cham, 2016. Springer International Publishing. |
| [68]   | D. T. Wise. The residual finiteness of positive one-relator groups. Comment. Math. Helv. , 76(2):314-338, 2001.                                                                                                                    |

- [69] F. Yu, M. Alkhalaf, and T. Bultan. Stranger: An automata-based string analysis tool for php. In J. Esparza and R. Majumdar, editors, Tools and Algorithms for the Construction and Analysis of Systems , pages 154-157, Berlin, Heidelberg, 2010. Springer Berlin Heidelberg.
- [70] L. Zhang. Conjugacy in special monoids. J. Algebra , 143(2):487-497, 1991.
- [71] L. Zhang. Applying rewriting methods to special monoids. Math. Proc. Cambridge Philos. Soc. , 112(3):495-505, 1992.
Albert Garreta Robert D. Gray
On equations and first-order theory of one-relator monoids
We investigate systems of equations and the first-order theory of one-relator
monoids. We describe a family $\mathcal{F}$ of one-relator monoids of the form
$\langle A\mid w=1\rangle$ where for each monoid $M$ in $\mathcal{F}$, the
longstanding open problem of decidability of word equations with length
constraints reduces to the Diophantine problem (i.e.\ decidability of systems
of equations) in $M$. We achieve this result by finding an interpretation in
$M$ of a free monoid, using only systems of equations together with length
relations. It follows that each monoid in $\mathcal{F}$ has undecidable
positive AE-theory, hence in particular it has undecidable first-order theory.
The family $\mathcal{F}$ includes many one-relator monoids with torsion
$\langle A\mid w^n = 1\rangle$ ($n>1$). In contrast, all one-relator groups
with torsion are hyperbolic, and all hyperbolic groups are known to have
decidable Diophantine problem. We further describe a different class of
one-relator monoids with decidable Diophantine problem.