This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

A Lower Bound of the Number of Rewrite Rules Obtained by Homological Methods

Abstract

It is well-known that some equational theories such as groups or boolean algebras can be defined by fewer equational axioms than the original axioms. However, it is not easy to determine if a given set of axioms is the smallest or not. Malbos and Mimram investigated a general method to find a lower bound of the cardinality of the set of equational axioms (or rewrite rules) that is equivalent to a given equational theory (or term rewriting systems), using homological algebra. Their method is an analog of Squier’s homology theory on string rewriting systems. In this paper, we develop the homology theory for term rewriting systems more and provide a better lower bound under a stronger notion of equivalence than their equivalence. The author also implemented a program to compute the lower bounds.

1 Introduction

The purpose of this paper is to find a lower bound of the number of axioms that are equivalent to a given equational theory. For example, the theory of groups is given by the following axioms:

G1.m(m(x1,x2),x3)=m(x1,m(x2,x3)),G2.m(x1,e)=x1,G3m(e,x1)=x1,G4.m(i(x1),x1)=e,G5.m(x1,i(x1))=e.\begin{array}[]{ll@{}l}G_{1}.\ m(m(x_{1},x_{2}),x_{3})=m(x_{1},m(x_{2},x_{3})),&G_{2}.\ m(x_{1},e)=x_{1},&G_{3}\ m(e,x_{1})=x_{1},\\ G_{4}.\ m(i(x_{1}),x_{1})=e,&G_{5}.\ m(x_{1},i(x_{1}))=e.&\end{array} (1.1)

It is well-known that G2G_{2} and G5G_{5} can be derived from only {G1,G3,G4}\{G_{1},G_{3},G_{4}\}. Moreover, the theory of groups can be given by two axioms: the axiom

m(x1,i(m(m(i(m(i(x2),m(i(x1),x3))),x4),i(m(x2,x4)))))=x3m(x_{1},i(m(m(i(m(i(x_{2}),m(i(x_{1}),x_{3}))),x_{4}),i(m(x_{2},x_{4})))))=x_{3}

together with G4G_{4} is equivalent to the group axioms [n81]. If we use the new symbol dd for division instead of multiplication, a single axiom,

d(x1,d(d(d(x1,x1),x2),x3),d(d(d(x1,x1),x1),x3))=x2,d(x_{1},d(d(d(x_{1},x_{1}),x_{2}),x_{3}),d(d(d(x_{1},x_{1}),x_{1}),x_{3}))=x_{2},

is equivalent to the group axioms [hn52]. However, no single axiom written in symbols m,i,em,i,e is equivalent to the group axioms. This is stated without proof by Tarski [t68] and published proofs are given by Neumann [n81] and Kunen [k92]. Malbos and Mimram developed a general method to calculate a lower bound of the number of axioms that are “Tietze-equivalent” to a given complete term rewriting system (TRS) [mm16, Proposition 23]. We state the definition of Tietze equivalence later (Definition 4), but roughly speaking, it is an equivalence between equational theories (or TRSs) (Σ1,R1)(\Sigma_{1},R_{1}), (Σ2,R2)(\Sigma_{2},R_{2}) where signatures Σ1\Sigma_{1} and Σ2\Sigma_{2} are not necessarily equal to each other, while the usual equivalence between TRSs is defined for two TRSs (Σ,R1)(\Sigma,R_{1}), (Σ,R2)(\Sigma,R_{2}) over the same signature (specifically, by R1=R2{\xleftrightarrow{*}_{R_{1}}}={\xleftrightarrow{*}_{R_{2}}}). For string rewriting systems (SRSs), a work was given earlier by Squier [s87], and Malbos and Mimram’s work is an extension of Squier’s work. Squier provided a rewriting view for “homology groups of monoids”, and proved the existence of an SRS that does not have any equivalent SRSs that are finite and complete.

In this paper, we will develop Malbos and Mimram’s theory more, and show an inequality which gives a better lower bound of the number of axioms with respect to the usual equivalence between TRSs over the same signature. For the theory of groups, our inequality gives that the number of axioms equivalent to the group axioms is greater than or equal to 2, so we have another proof of Tarski’s theorem above as a special case. Our lower bound is algorithmically computable if a complete TRS is given.

We will first give the statement of our main theorem and some examples in Section 2. Then, we will see Malbos-Mimram’s work briefly. The idea of their work is to provide an algebraic structure to TRSs and extract information of the TRSs, called homology groups, which are invariant under Tietze equivalence. The basics of such algebraic tools are given in Section 3. We will explain how resolutions of modules, a notion from abstract algebra, is related to rewriting systems, which is not written in usual textbooks. and we will see the idea of the construction of the homology groups of TRSs in Section 4. After that, in Section 5, we will prove our main theorem. In Section LABEL:section:prime, we show prime critical pairs are enough for our computation at the matrix operation level and also at the abstract algebra level. In Section LABEL:section:impossible, we study the number of rewrite rules in a different perspective: the minimum of #R#Σ\#R-\#\Sigma over all equivalent TRSs (Σ,R)(\Sigma,R) is called the deficiency in group theory and we show that deciding whether the deficiency is less than a given integer or not is computationally impossible.

2 Main Theorem

In this section, we will see our main theorem and some examples. Throughout this paper, we assume that terms are over the set of variables {x1,x2,}\{x_{1},x_{2},\dotsc\} and all signatures we consider are unsorted. For a signature Σ\Sigma, let T(Σ)T(\Sigma) denote the set of terms over the signature Σ\Sigma and the set of variables {x1,x2,}\{x_{1},x_{2},\dotsc\}. {defi} Let (Σ,R)(\Sigma,R) be a TRS. The degree of RR, denoted by deg(R)\deg(R), is defined by

deg(R)=gcd{#il#irlrR,i=1,2,}\deg(R)=\gcd\{\#_{i}l-\#_{i}r\mid l\rightarrow r\in R,i=1,2,\dotsc\}

where #it\#_{i}t is the number of occurrences of xix_{i} in tt for tT(Σ)t\in T(\Sigma) and we define gcd{0}=0\gcd\{0\}=0 for convenience. For example, deg({f(x1,x2,x2)x1,g(x1,x1,x1)e})=gcd{0,2,3}=1\deg(\{f(x_{1},x_{2},x_{2})\rightarrow x_{1},\ g(x_{1},x_{1},x_{1})\rightarrow e\})=\gcd\{0,2,3\}=1. Let (Σ,R={l1r1,,lnrn})(\Sigma,R=\{l_{1}\rightarrow r_{1},\dotsc,l_{n}\rightarrow r_{n}\}) be a TRS and CP(R)={(t1,s1),,(tm,sm)}\operatorname{CP}(R)=\{(t_{1},s_{1}),\dots,(t_{m},s_{m})\} be the set of the critical pairs of RR. For any i{1,,m}i\in\{1,\dots,m\}, let ai,bia_{i},b_{i} be the numbers in {1,,n}\{1,\dots,n\} such that the critical pair (ti,si)(t_{i},s_{i}) is obtained by lairail_{a_{i}}\rightarrow r_{a_{i}} and lbirbil_{b_{i}}\rightarrow r_{b_{i}}, that is, ti=raiσlaiσ=C[lbiσ]C[rbiσ]=sit_{i}=r_{a_{i}}\sigma\leftarrow l_{a_{i}}\sigma=C[l_{b_{i}}\sigma]\rightarrow C[r_{b_{i}}\sigma]=s_{i} for some substitution σ\sigma and single-hole context CC. Suppose RR is complete. We fix an arbitrary rewriting strategy and for a term tt, let nrj(t)\operatorname{nr}_{j}(t) be the number of times ljrjl_{j}\rightarrow r_{j} is used to reduce tt into its RR-normal form with respect to the strategy. To state our main theorem, we introduce a matrix D(R)D(R) and a number e(R)e(R): {defi} Suppose d=deg(R)d=\deg(R) is prime or 0. If d=0d=0, let \mathfrak{R} be \mathbb{Z}, and if dd is prime, let \mathfrak{R} be /d\mathbb{Z}/d\mathbb{Z} (integers modulo dd). For 1im1\leq i\leq m, 1jn1\leq j\leq n, let D(R)ijD(R)_{ij} be the integer nrj(si)nrj(ti)+δ(bi,j)δ(ai,j)\operatorname{nr}_{j}(s_{i})-\operatorname{nr}_{j}(t_{i})+\delta(b_{i},j)-\delta(a_{i},j) where δ(x,y)\delta(x,y) is the Kronecker delta. The matrix D(R)D(R) is defined by D(R)=(D(R)ji)j=1,,n,i=1,,mD(R)=(D(R)_{ji})_{j=1,\dots,n,i=1,\dots,m}. {defi} Let \mathfrak{R} be \mathbb{Z} or /p\mathbb{Z}/p\mathbb{Z} for any prime pp. If an m×nm\times n matrix MM over \mathfrak{R} is of the form

(e1000e200000er000000)\left(\begin{matrix}e_{1}&0&\dots&\dots&\dots&\dots&\dots&0\\ 0&e_{2}&0&\dots&\dots&\dots&\dots&0\\ \vdots&0&\ddots&0&\dots&\dots&\dots&\vdots\\ \vdots&\vdots&0&e_{r}&0&\dots&\dots&\vdots\\ \vdots&\vdots&\vdots&0&0&\dots&\dots&\vdots\\ \vdots&\vdots&\vdots&\vdots&\vdots&\ddots&\dots&\vdots\\ 0&0&\dots&\dots&\dots&\dots&\dots&0\end{matrix}\right)

and eie_{i} divides ei+1e_{i+1} for every 1i<r1\leq i<r, we say MM is in Smith normal form. We call eie_{i}s the elementary divisors. It is known that every matrix over \mathfrak{R} can be transformed into Smith normal form by elementary row/column operations, that is, (1) switching a row/column with another row/column, (2) multiplying each entry in a row/column by an invertible element in \mathfrak{R}, and (3) adding a multiple of a row/column to another row/column [r10, 9.4]. (If d=0d=0, the invertible elements in \mathfrak{R}\cong\mathbb{Z} are 11 and 1-1, and if dd is prime, any nonzero element in =/d\mathfrak{R}=\mathbb{Z}/d\mathbb{Z} is invertible. So, e(R)e(R) is equal to the rank of D(R)D(R) if dd is prime.) In general, the same fact holds for any principal ideal domain \mathfrak{R}. {defi} We define e(R)e(R) as the number of invertible elements in the Smith normal form of the matrix D(R)D(R) over \mathfrak{R}. We state the main theorem. {thm} Let (Σ,R)(\Sigma,R) be a complete TRS and suppose d=deg(R)d=\deg(R) is 0 or prime. For any set of rules RR^{\prime} equivalent to RR, i.e., R=R\xleftrightarrow{*}_{R^{\prime}}\,=\,\xleftrightarrow{*}_{R}, we have

#R#Re(R).\#R^{\prime}\geq\#R-e(R). (2.1)

We shall see some examples. {exa} Consider the signature Σ={𝟢(0),𝗌(1),𝖺𝗏𝖾(2)}\Sigma=\{{\sf 0}^{(0)},{\sf s}^{(1)},{\sf ave}^{(2)}\} and the set RR of rules

A1.𝖺𝗏𝖾(𝟢,𝟢)𝟢,A2.𝖺𝗏𝖾(x1,𝗌(x2))𝖺𝗏𝖾(𝗌(x1),x2),A3.𝖺𝗏𝖾(𝗌(𝟢),𝟢)𝟢,A4.𝖺𝗏𝖾(𝗌(𝗌(𝟢)),𝟢)s(𝟢),A5.𝖺𝗏𝖾(𝗌(𝗌(𝗌(x1))),x2)𝗌(𝖺𝗏𝖾(𝗌(x1),x2)).\begin{array}[]{lll}A_{1}.{\sf ave}({\sf 0},{\sf 0})\rightarrow{\sf 0},&A_{2}.{\sf ave}(x_{1},{\sf s}(x_{2}))\rightarrow{\sf ave}({\sf s}(x_{1}),x_{2}),&A_{3}.{\sf ave}({\sf s}({\sf 0}),{\sf 0})\rightarrow{\sf 0},\\ A_{4}.{\sf ave}({\sf s}({\sf s}({\sf 0})),{\sf 0})\rightarrow s({\sf 0}),&A_{5}.{\sf ave}({\sf s}({\sf s}({\sf s}(x_{1}))),x_{2})\rightarrow{\sf s}({\sf ave}({\sf s}(x_{1}),x_{2})).&\end{array}

RR satisfies deg(R)=0\deg(R)=0 and has one critical pair CC:

[Uncaptioned image]

We can see the matrix D(R)D(R) is the 5×15\times 1 zero matrix. The zero matrix is already in Smith normal form and e(R)=0e(R)=0. Thus, for any RR^{\prime} equivalent to RR, #R#R=5\#R^{\prime}\geq\#R=5. This means there is no smaller TRS equivalent to RR. Also, Malbos-Mimram’s lower bound, denoted by s(H2(Σ,R))s(H_{2}(\Sigma,R)), is equal to 3, though we do not explain how to compute it in this paper. (We will roughly describe s(H2(Σ,R))s(H_{2}(\Sigma,R)) in Section 4.) As a generalization of this example, we have an interesting corollary of our main theorem: {cor} Let (Σ,R)(\Sigma,R) be a complete TRS. If for any critical pair utvu\leftarrow t\rightarrow v, two rewriting paths tut^t\rightarrow u\rightarrow\dots\rightarrow\hat{t} and tvt^t\rightarrow v\rightarrow\dots\rightarrow\hat{t} contain the same number of lrl\rightarrow r for each lrRl\rightarrow r\in R, then there is no RR^{\prime} equivalent to RR which satisfies #R<#R\#R^{\prime}<\#R. {exa} We compute the lower bound for the theory of groups, (1.1). A complete TRS RR for the theory of groups is given by

G1.m(m(x1,x2),x3)m(x1,m(x2,x3))G2.m(e,x1)x1G3.m(x1,e)x1G4.m(x1,i(x1))eG5.m(i(x1),x1)eG6.m(i(x1),m(x1,x2))x2G7.i(e)eG8.i(i(x1))x1G9.m(x1,m(i(x1),x2))x2G10.i(m(x1,x2))m(i(x2),i(x1)).\begin{array}[]{ll}G_{1}.\ m(m(x_{1},x_{2}),x_{3})\rightarrow m(x_{1},m(x_{2},x_{3}))&G_{2}.\ m(e,x_{1})\rightarrow x_{1}\\ G_{3}.\ m(x_{1},e)\rightarrow x_{1}&G_{4}.\ m(x_{1},i(x_{1}))\rightarrow e\\ G_{5}.\ m(i(x_{1}),x_{1})\rightarrow e&G_{6}.\ m(i(x_{1}),m(x_{1},x_{2}))\rightarrow x_{2}\\ G_{7}.\ i(e)\rightarrow e&G_{8}.\ i(i(x_{1}))\rightarrow x_{1}\\ G_{9}.\ m(x_{1},m(i(x_{1}),x_{2}))\rightarrow x_{2}&G_{10}.\ i(m(x_{1},x_{2}))\rightarrow m(i(x_{2}),i(x_{1})).\end{array}

Since deg(R)=2\deg(R)=2, we set =/2\mathfrak{R}=\mathbb{Z}/2\mathbb{Z}. RR has 48 critical pairs and we get the 10×4810\times 48 matrix D(R)D(R) given in Appendix A. The author implemented a program which takes a complete TRS as input and computes its critical pairs, the matrix D(R)D(R), and e(R)e(R). The program is available at https://github.com/mir-ikbch/homtrs. The author checked e(R)=rank(D(R))=8e(R)=\operatorname{rank}(D(R))=8 by the program, and also by MATLAB’s gfrank function (https://www.mathworks.com/help/comm/ref/gfrank.html). Therefore we have #Re(R)=2\#R-e(R)=2. This provides a new proof that there is no single axiom equivalent to the theory of groups.

Malbos-Mimram’s lower bound is given by s(H2(Σ,R))=0s(H_{2}(\Sigma,R))=0. {exa} Let Σ={(1),f(1),+(2),(2)}\Sigma=\{-^{(1)},f^{(1)},+^{(2)},\cdot^{(2)}\} and RR be

A1.(x1)x1,A2.f(x1)f(x1),A3.(x1+x2)(x1)(x2),A4.(x1x2)(x1)+(x2).\begin{array}[]{ll}A_{1}.\ -(-x_{1})\rightarrow x_{1},&A_{2}.\ -f(x_{1})\rightarrow f(-x_{1}),\\ A_{3}.\ -(x_{1}+x_{2})\rightarrow(-x_{1})\cdot(-x_{2}),&A_{4}.\ -(x_{1}\cdot x_{2})\rightarrow(-x_{1})+(-x_{2}).\end{array}
Refer to caption
Figure 2.1: The critical pairs of RR

We have deg(R)=0\deg(R)=0 and RR has four critical pairs (Figure 1). The corresponding matrix D(R)D(R) and its Smith normal form are computed as

D(R)=(0011200000110011)(0011200000000000)(0010200000000000)(1000020000000000).D(R)=\left(\begin{matrix}0&0&1&1\\ 2&0&0&0\\ 0&0&1&1\\ 0&0&1&1\\ \end{matrix}\right)\rightsquigarrow\left(\begin{matrix}0&0&1&1\\ 2&0&0&0\\ 0&0&0&0\\ 0&0&0&0\\ \end{matrix}\right)\rightsquigarrow\left(\begin{matrix}0&0&1&0\\ 2&0&0&0\\ 0&0&0&0\\ 0&0&0&0\\ \end{matrix}\right)\rightsquigarrow\left(\begin{matrix}1&0&0&0\\ 0&2&0&0\\ 0&0&0&0\\ 0&0&0&0\\ \end{matrix}\right).

Thus, #Re(R)=3\#R-e(R)=3. This tells RR does not have any equivalent TRS with 2 or fewer rules, and it is not difficult to see RR has an equivalent TRS with 3 rules, {A1,A2,A3}\{A_{1},A_{2},A_{3}\}.

Malbos-Mimram’s lower bound for this TRS is given by s(H2(Σ,R))=1s(H_{2}(\Sigma,R))=1. Although the equality of (2.1) is attained for the above three examples, it is not guaranteed the equality is attained by some TRS RR^{\prime} in general. For example, the TRS with only the associative rule {f(f(x1,x2),x3)f(x1,f(x2,x3))}\{f(f(x_{1},x_{2}),x_{3})\rightarrow f(x_{1},f(x_{2},x_{3}))\} satisfies #Re(R)=0\#R-e(R)=0 and it is obvious that no TRSs with zero rule is equivalent. Also, in Appendix B, Malbos-Mimram’s and our lower bounds for various examples are given.

3 Preliminaries on Algebra

In this section, we give a brief introduction to module theory, homological algebra, and Squier’s theory of homological algebra for string rewriting systems (SRSs) [s87]. Even though Squier’s theory is not directly needed to prove our theorem, it is helpful to understand the homology theory for TRSs, which is more complicated than SRSs’ case.

3.1 Modules and Homological Algebra

We give basic definitions and theorems on module theory and homological algebra without proofs. For more details, readers are referred to [r10, r09] for example.

Modules are the generalization of vector spaces in which the set of scalars form a ring, not necessarily a field. {defi} Let \mathfrak{R} be a ring and (M,+)(M,+) be an abelian group. For a map :×MM\cdot:\mathfrak{R}\times M\rightarrow M, (M,+,)(M,+,\cdot) is a left \mathfrak{R}-module if for all r,sr,s\in\mathfrak{R} and x,yMx,y\in M, we have

r(x+y)=rx+ry,(r+s)x=rx+sx,(rs)x=r(sx)r\cdot(x+y)=r\cdot x+r\cdot y,\ (r+s)\cdot x=r\cdot x+s\cdot x,\ (rs)\cdot x=r\cdot(s\cdot x)

where rsrs denotes the multiplication of rr and ss in \mathfrak{R}. We call the map \cdot scalar multiplication.

For a map :M×M\cdot:M\times\mathfrak{R}\rightarrow M, (M,+,)(M,+,\cdot) is a right \mathfrak{R}-module if for any r,sr,s\in\mathfrak{R} and x,yMx,y\in M,

(x+y)r=xr+yr,x(r+s)=xr+xs,x(sr)=(xs)r.(x+y)\cdot r=x\cdot r+y\cdot r,\ x\cdot(r+s)=x\cdot r+x\cdot s,\ x\cdot(sr)=(x\cdot s)\cdot r.

If ring \mathfrak{R} is commutative, we do not distinguish between left \mathfrak{R}-modules and right \mathfrak{R}-modules and simply call them \mathfrak{R}-modules.

Linear maps and isomorphisms of modules are also defined in the same way as for vector spaces. {defi} For two left \mathfrak{R}-modules (M1,+1,1),(M2,+2,2)(M_{1},+_{1},\cdot_{1}),(M_{2},+_{2},\cdot_{2}), a group homomorphism f:(M1,+1)(M2,+2)f:(M_{1},+_{1})\rightarrow(M_{2},+_{2}) is an \mathfrak{R}-linear map if it satisfies f(r1x)=r2f(x)f(r\cdot_{1}x)=r\cdot_{2}f(x) for any rr\in\mathfrak{R} and xM1x\in M_{1}. An \mathfrak{R}-linear map ff is an isomorphism if it is bijective, and two modules are called isomorphic if there exists an isomorphism between them.

{exa}

Any abelian group (M,+)(M,+) is a \mathbb{Z}-module under the scalar multiplication nx=x++xnn\cdot x=\underbrace{x+\dotsb+x}_{n}. {exa} For any ring \mathfrak{R}, the direct product n=××n\mathfrak{R}^{n}=\underbrace{\mathfrak{R}\times\dotsb\times\mathfrak{R}}_{n} forms a left \mathfrak{R}-module under the scalar multiplication r(r1,,rn)=(rr1,,rrn)r\cdot(r_{1},\dotsc,r_{n})=(rr_{1},\dotsc,rr_{n}). {exa} Let \mathfrak{R} be a ring and XX be a set. X¯\mathfrak{R}\underline{X} denotes the set of formal linear combinations

xXrxx¯(rx)\sum_{x\in X}r_{x}\underline{x}\quad(r_{x}\in\mathfrak{R})

where rx=0r_{x}=0 except for finitely many xxs. The underline is added to emphasize a distinction between rr\in\mathfrak{R} and xXx\in X. X¯\mathfrak{R}\underline{X} forms a left \mathfrak{R}-module under the addition and the scalar multiplication defined by

(xXrxx¯)+(xXsxx¯)=xX(rx+sx)x¯,s(xXrxx¯)=xX(srx)x¯.\left(\sum_{x\in X}r_{x}\underline{x}\right)+\left(\sum_{x\in X}s_{x}\underline{x}\right)=\sum_{x\in X}(r_{x}+s_{x})\underline{x},\quad s\cdot\left(\sum_{x\in X}r_{x}\underline{x}\right)=\sum_{x\in X}(sr_{x})\underline{x}.

If XX is the empty set, X¯\mathfrak{R}\underline{X} is the left \mathfrak{R}-module {0}\{0\} consisting of only the identity element. We simply write 0 for {0}\{0\}. X¯\mathfrak{R}\underline{X} is called the free left \mathfrak{R}-module generated by XX. If #X=n\#X=n\in\mathbb{N}, X¯\mathfrak{R}\underline{X} can be identified with n\mathfrak{R}^{n}.

A left \mathfrak{R}-module MM is said to be free if MM is isomorphic to X¯\mathfrak{R}\underline{X} for some XX. Free modules have some similar properties to vector spaces. If a left \mathfrak{R}-module FF is free, then there exists a basis (i.e., a subset that is linearly independent and generating) of FF. If a free left \mathfrak{R}-module FF has a basis (v1,,vn)(v_{1},\dotsc,v_{n}), any \mathfrak{R}-linear map f:FMf:F\rightarrow M is uniquely determined if the values f(v1),,f(vn)f(v_{1}),\dotsc,f(v_{n}) are specified. Suppose F1F_{1}, F2F_{2} are free left \mathfrak{R}-modules and f:F1F2f:F_{1}\rightarrow F_{2} is an \mathfrak{R}-linear map. If F1F_{1} has a basis (v1,,vn)(v_{1},\dotsc,v_{n}) and F2F_{2} has a basis (w1,,wm)(w_{1},\dotsc,w_{m}), the matrix (aij)i=1,,n,j=1,,m(a_{ij})_{i=1,\dotsc,n,j=1,\dotsc,m} where aija_{ij}s satisfy f(vi)=ai1w1++aimwmf(v_{i})=a_{i1}w_{1}+\dotsb+a_{im}w_{m} for any i=1,,ni=1,\dotsc,n is called a matrix representation of ff. We define submodules and quotient modules, as in linear algebra. {defi} Let (M,+,)(M,+,\cdot) be a left (resp. right) \mathfrak{R}-module. A subgroup NN of (M,+)(M,+) is a submodule if for any xNx\in N and rr\in\mathfrak{R}, the scalar multiplication rxr\cdot x (resp. xrx\cdot r) is in NN.

For any submodule NN, the quotient group M/NM/N is also an \mathfrak{R}-module. M/NM/N is called the quotient module of MM by NN. For submodules and quotient modules, the following basic theorem is known: {thm}[First isomorphism theorem [r10, Theorem 8.8]] Let (M,+,),(M,+,)(M,+,\cdot),(M^{\prime},+^{\prime},\cdot^{\prime}) be left (or right) \mathfrak{R}-modules, and f:MMf:M\rightarrow M^{\prime} be an \mathfrak{R}-linear map.

  1. 1.

    The inverse image of 0 by ff, kerf={xMf(x)=0}\ker f=\{x\in M\mid f(x)=0\}, is a submodule of MM.

  2. 2.

    The image of MM by ff, imf={f(x)xM}\operatorname{im}f=\{f(x)\mid x\in M\}, is a submodule of MM^{\prime}.

  3. 3.

    The image imf\operatorname{im}f is isomorphic to M/kerfM/\ker f.

{thm}

[Third isomorphism theorem [r10, Theorem 7.10]] Let MM be a left (or right) \mathfrak{R}-module, NN be a submodule of MM, and LL be a submodule of NN. Then (M/L)/(N/L)(M/L)/(N/L) is isomorphic to M/NM/N. {thmC}[[r10, Theorem 9.8]] Let \mathfrak{R} be \mathbb{Z} or /p\mathbb{Z}/p\mathbb{Z} for some prime pp. Every submodule of a free \mathfrak{R}-module is free. Moreover, if an \mathfrak{R}-module MM is isomorphic to n\mathfrak{R}^{n}, then every submodule NN of MM is isomorphic to m\mathfrak{R}^{m} for some mnm\leq n. (In general, this holds for any principal ideal domain \mathfrak{R}.)

Let MM be a left \mathfrak{R}-module. For SMS\subset M, the set S\mathfrak{R}S of all elements in MM of the form i=1krisi\sum_{i=1}^{k}r_{i}s_{i} (k0,ri,siS)(k\in\mathbb{Z}_{\geq 0},r_{i}\in\mathfrak{R},s_{i}\in S) is a submodule of MM. If S=M\mathfrak{R}S=M, SS is called a generating set of SS and the elements of SS are called generators of MM. Let S={si}iIS=\{s_{i}\}_{i\in I} be a generating set of MM for some indexing set II. For a set X={xi}iIX=\{x_{i}\}_{i\in I}, the linear map ϵ:X¯xisiM\epsilon:\mathfrak{R}\underline{X}\ni x_{i}\mapsto s_{i}\in M is a surjection from the free module X¯\mathfrak{R}\underline{X}. The elements of kerϵ\ker\epsilon, that is, elements xiXrixi¯\sum_{x_{i}\in X}r_{i}\underline{x_{i}} satisfying ϵ(xiXrixi¯)=xiXrisi=0\epsilon(\sum_{x_{i}\in X}r_{i}\underline{x_{i}})=\sum_{x_{i}\in X}r_{i}s_{i}=0, are called relations of MM.

Now, we introduce one of the most important notions to develop the homology theory of rewriting systems, free resolutions. We first start from the following example. {exa} Let MM be the \mathbb{Z}-module defined by

{a,b,c,d,e}¯/{a¯+b¯+c¯d¯e¯, 2b¯c¯,a¯+2c¯b¯d¯e¯}.\mathbb{Z}\underline{\{a,b,c,d,e\}}/\mathbb{Z}\{\underline{a}+\underline{b}+\underline{c}-\underline{d}-\underline{e},\ 2\underline{b}-\underline{c},\ \underline{a}+2\underline{c}-\underline{b}-\underline{d}-\underline{e}\}.

We consider the \mathbb{Z}-linear map between free \mathbb{Z}-modules f0:3{a,b,c,d,e}¯f_{0}:\mathbb{Z}^{3}\rightarrow\mathbb{Z}\underline{\{a,b,c,d,e\}} defined by

f0(1,0,0)=a¯+b¯+c¯d¯e¯,f0(0,1,0)=2b¯c¯,f0(0,0,1)=a¯+2c¯b¯d¯e¯.f_{0}(1,0,0)=\underline{a}+\underline{b}+\underline{c}-\underline{d}-\underline{e},\ f_{0}(0,1,0)=2\underline{b}-\underline{c},\ f_{0}(0,0,1)=\underline{a}+2\underline{c}-\underline{b}-\underline{d}-\underline{e}.

We can see that the image of f0f_{0} is the set of relations of MM. In other words, imf0=kerϵ\operatorname{im}f_{0}=\ker\epsilon for the linear map ϵ:{a,b,c,d,e}¯M\epsilon:\mathbb{Z}\underline{\{a,b,c,d,e\}}\rightarrow M which maps each element to its equivalence class. Then, we consider the “relations between relations”, that is, triples (n1,n2,n3)(n_{1},n_{2},n_{3}) which satisfy f0(n1,n2,n3)=n1(a¯+b¯+c¯d¯e¯)+n2(2b¯c¯)+n3(a¯+2c¯b¯d¯e¯)=0f_{0}(n_{1},n_{2},n_{3})=n_{1}(\underline{a}+\underline{b}+\underline{c}-\underline{d}-\underline{e})+n_{2}(2\underline{b}-\underline{c})+n_{3}(\underline{a}+2\underline{c}-\underline{b}-\underline{d}-\underline{e})=0, or equivalently, elements of kerf0\ker f_{0}. We can check kerf0={m(1,1,1)m}\ker f_{0}=\{m(-1,1,1)\mid m\in\mathbb{Z}\}. This fact can be explained in terms of rewriting systems. If we write relations in the form of rewrite rules

A1.a¯+b¯+c¯d¯+e¯,A2. 2b¯c¯,A3.a¯+2c¯b¯+d¯+e¯,A_{1}.\ \underline{a}+\underline{b}+\underline{c}\rightarrow\underline{d}+\underline{e},\ A_{2}.\ 2\underline{b}\rightarrow\underline{c},\ A_{3}.\ \underline{a}+2\underline{c}\rightarrow\underline{b}+\underline{d}+\underline{e},

we see {A1,A2,A3}\{A_{1},A_{2},A_{3}\} is a complete rewriting system (over the signature {a¯,b¯,c¯,d¯,e¯,+}\{\underline{a},\underline{b},\underline{c},\underline{d},\underline{e},+\}) with two joinable critical pairs

[Uncaptioned image]

We associate these critical pairs with an equality between formal sums A2+A3=A1A_{2}+A_{3}=A_{1}, and it corresponds to

f0(1,1,1)=(a¯+b¯+c¯d¯e¯)A1+(2b¯c¯)A2+(a¯+2c¯b¯d¯e¯)A3=0.f_{0}(-1,1,1)=\underbrace{-(\underline{a}+\underline{b}+\underline{c}-\underline{d}-\underline{e})}_{-A_{1}}+\underbrace{(2\underline{b}-\underline{c})}_{A_{2}}+\underbrace{(\underline{a}+2\underline{c}-\underline{b}-\underline{d}-\underline{e})}_{A_{3}}=0.

In fact, this correspondence between critical pairs and “relations between relations” is a key to the homology theory of TRSs.

We define a linear map f1:3f_{1}:\mathbb{Z}\rightarrow\mathbb{Z}^{3} by f1(1)=(1,1,1)f_{1}(1)=(-1,1,1) and then f1f_{1} satisfies imf1=kerf0\operatorname{im}f_{1}=\ker f_{0}. We can go further, that is, we can consider kerf1\ker f_{1}, but it clearly turns out that kerf1=0\ker f_{1}=0.

We encode the above information in the following diagram:

f13f0{a,b,c,d,e}¯ϵM\mathbb{Z}\xrightarrow{f_{1}}\mathbb{Z}^{3}\xrightarrow{f_{0}}\mathbb{Z}\underline{\{a,b,c,d,e\}}\xrightarrow{\epsilon}M (3.1)

where imf1=kerf0,imf0=kerϵ\operatorname{im}f_{1}=\ker f_{0},\operatorname{im}f_{0}=\ker\epsilon and ϵ\epsilon is surjective. Sequences of modules and linear maps with these conditions are called free resolutions: {defi} A sequence of left \mathfrak{R}-modules and \mathfrak{R}-linear maps

fi+1Mi+1fiMifi1\dotsb\xrightarrow{f_{i+1}}M_{i+1}\xrightarrow{f_{i}}M_{i}\xrightarrow{f_{i-1}}\dotsb

is called an exact sequence if imfi=kerfi1\operatorname{im}f_{i}=\ker f_{i-1} holds for any ii.

Let MM be a left \mathfrak{R}-module. For infinite sequence of free modules FiF_{i} and linear maps fi:Fi+1Fif_{i}:F_{i+1}\rightarrow F_{i}, ϵ:F0M\epsilon:F_{0}\rightarrow M, if the sequence

f1F1f0F0ϵM\dotsb\xrightarrow{f_{1}}F_{1}\xrightarrow{f_{0}}F_{0}\xrightarrow{\epsilon}M

is exact and ϵ\epsilon is surjective, the sequence above is called a free resolution of MM. If the sequence is finite, it is called a partial free resolution.

(Exact sequences and free resolutions are defined for right \mathfrak{R}-modules in the same way.) Notice that the exact sequence (3.1) can be extended to the infinite exact sequence

00f13f0{a,b,c,d,e}¯ϵM\dotsb\rightarrow 0\rightarrow\dotsb\rightarrow 0\rightarrow\mathbb{Z}\xrightarrow{f_{1}}\mathbb{Z}^{3}\xrightarrow{f_{0}}\mathbb{Z}\underline{\{a,b,c,d,e\}}\xrightarrow{\epsilon}M

since kerf1=0\ker f_{1}=0. Thus, the sequence (3.1) is a free resolution of MM.

As there are generally several rewriting systems equivalent to a given equational theory, free resolutions of MM are not unique. However, we can construct some information of MM from a (partial) free resolution which does not depend on the choice of the free resolution. The information is called homology groups. To define the homology groups, we introduce the tensor product of modules. {defi} Let NN be a right \mathfrak{R}-module and MM be a left \mathfrak{R}-module. Let F(N×M)F(N\times M) be the free abelian group generated by N×MN\times M. The tensor product of NN and MM, denoted by NMN\otimes_{\mathfrak{R}}M, is the quotient group of F(N×M)F(N\times M) by the subgroup generated by the elements of the form

(x,y)+(x,y)(x,y+y),(x,y)+(x,y)(x+x,y),(xr,y)(x,ry)(x,y)+(x,y^{\prime})-(x,y+y^{\prime}),\ (x,y)+(x^{\prime},y)-(x+x^{\prime},y),\ (x\cdot r,y)-(x,r\cdot y)

where x,xNx,x^{\prime}\in N, y,yMy,y^{\prime}\in M, rRr\in R. The equivalence class of (x,y)(x,y) in NMN\otimes_{\mathfrak{R}}M is written as xyx\otimes y.

For a right \mathfrak{R}-module NN and a \mathfrak{R}-linear map f:MMf:M\rightarrow M^{\prime} between left \mathfrak{R}-modules M,MM,M^{\prime}, we write Nf:NMNMN\otimes f:N\otimes_{\mathfrak{R}}M\rightarrow N\otimes_{\mathfrak{R}}M^{\prime} for the map (Nf)(ax)=af(x)(N\otimes f)(a\otimes x)=a\otimes f(x). NfN\otimes f is known to be well-defined and be a group homomorphism. Let f1F1f0F0ϵM\dotsb\xrightarrow{f_{1}}F_{1}\xrightarrow{f_{0}}F_{0}\xrightarrow{\epsilon}M be a free resolution of a left \mathfrak{R}-module MM. For a right \mathfrak{R}-module NN, we consider the sequence

Nf1NF1Nf0NF0.\dotsb\xrightarrow{N\otimes f_{1}}N\otimes_{\mathfrak{R}}F_{1}\xrightarrow{N\otimes f_{0}}N\otimes_{\mathfrak{R}}F_{0}. (3.2)

Then, it can be shown that im(Nfi)ker(Nfi1)\operatorname{im}(N\otimes f_{i})\subset\ker(N\otimes f_{i-1}) for any i=1,2,i=1,2,\dotsc. In general, a sequence fi+1Mi+1fiMifi1\dotsb\xrightarrow{f_{i+1}}M_{i+1}\xrightarrow{f_{i}}M_{i}\xrightarrow{f_{i-1}}\dotsb of left/right \mathfrak{R}-modules satisfying imfikerfi1\operatorname{im}f_{i}\subset\ker f_{i-1} for any ii is called a chain complex. The homology groups of a chain complex are defined to be the quotient group of kerfi1\ker f_{i-1} by imfi\operatorname{im}f_{i}: {defi} Let (C,f)(C_{\bullet},f_{\bullet}) denote the pair ({Ci}i=0,1,,{fi:Ci+1Ci}i=0,1,)(\{C_{i}\}_{i=0,1,\dots},\{f_{i}:C_{i+1}\rightarrow C_{i}\}_{i=0,1,\dots}). For a chain complex fi+1Ci+1fiCifi1\dotsb\xrightarrow{f_{i+1}}C_{i+1}\xrightarrow{f_{i}}C_{i}\xrightarrow{f_{i-1}}\dotsb, the abelian group Hj(C,f)H_{j}(C_{\bullet},f_{\bullet}) defined by

Hj(C,f)=kerfj1/imfjH_{j}(C_{\bullet},f_{\bullet})=\ker f_{j-1}/\operatorname{im}f_{j}

is called the jj-th homology groups of the chain complex (C,f)(C_{\bullet},f_{\bullet}). The homology groups of the chain complex (3.2) depend only on MM, NN, and \mathfrak{R}: {thmC}[[r09, Corollary 6.21]] Let MM be a left \mathfrak{R}-module and NN be a right \mathfrak{R}-module. For any two resolutions f1F1f0F0ϵM\dotsb\xrightarrow{f_{1}}F_{1}\xrightarrow{f_{0}}F_{0}\xrightarrow{\epsilon}M, f1F1f0F0ϵM\dotsb\xrightarrow{f^{\prime}_{1}}F^{\prime}_{1}\xrightarrow{f^{\prime}_{0}}F^{\prime}_{0}\xrightarrow{\epsilon}M, we have a group isomorphism

Hj(NF,Nf)Hj(NF,Nf).H_{j}(N\otimes_{\mathfrak{R}}F_{\bullet},N\otimes f_{\bullet})\cong H_{j}(N\otimes_{\mathfrak{R}}F_{\bullet}^{\prime},N\otimes f_{\bullet}^{\prime}).

We end this subsection by giving some basic facts on exact sequences. {propC}[[r10, Proposition 7.20 and 7.21]]

  1. 1.

    M1𝑓M20M_{1}\xrightarrow{f}M_{2}\rightarrow 0 is exact if and only if kerf=0\ker f=0.

  2. 2.

    0M1𝑓M20\rightarrow M_{1}\xrightarrow{f}M_{2} is exact if and only if imf=M2\operatorname{im}f=M_{2}.

  3. 3.

    If M1M_{1} is a submodule of M2M_{2}, the sequence 0M2𝜄M1𝜋M1/M200\rightarrow M_{2}\xrightarrow{\iota}M_{1}\xrightarrow{\pi}M_{1}/M_{2}\rightarrow 0 is exact where ι\iota is the inclusion map ι(x)=x\iota(x)=x and π\pi is the projection π(x)=[x]\pi(x)=[x].

{prop}

Suppose we have an exact sequence of \mathfrak{R}-modules 0M1M2M300\rightarrow M_{1}\rightarrow M_{2}\rightarrow M_{3}\rightarrow 0. If M3M_{3} is free, then M2M_{2} is isomorphic to M1×M3M_{1}\times M_{3}. The proof is given by using [r10, Proposition 7.22].

3.2 String Rewriting Systems and Homology Groups of Monoids

For an alphabet Σ\Sigma, Σ\Sigma^{*} denotes the set of all strings of symbols over Σ\Sigma. The set Σ\Sigma^{*} forms a monoid under the operation of concatenation with the empty string serving as the identity, and we call Σ\Sigma^{*} the free monoid generated by Σ\Sigma. For a string rewriting system (SRS) (Σ,R)(\Sigma,R), we write (Σ,R)\mathcal{M}_{(\Sigma,R)} for the set defined by (Σ,R)=Σ/R\mathcal{M}_{(\Sigma,R)}=\Sigma^{*}\delimiter 84079374\mathopen{}\xleftrightarrow{*}_{R}. We can see (Σ,R)\mathcal{M}_{(\Sigma,R)} is a monoid under the operations [u][v]=[uv][u]\cdot[v]=[uv] where [w][w] denotes the equivalence class of wΣw\in\Sigma^{*} with respect to R\xleftrightarrow{*}_{R}.

We say that two SRSs (Σ1,R1),(Σ2,R2)(\Sigma_{1},R_{1}),(\Sigma_{2},R_{2}) are Tietze equivalent if the monoids (Σ1,R1)\mathcal{M}_{(\Sigma_{1},R_{1})}, (Σ2,R2)\mathcal{M}_{(\Sigma_{2},R_{2})} are isomorphic. It is not difficult to show that for any two SRSs (Σ,R1),(Σ,R2)(\Sigma,R_{1}),(\Sigma,R_{2}) with the same signature, if R1R_{1} and R2R_{2} are equivalent (i.e., R1=R2\xleftrightarrow{*}_{R_{1}}\,=\,\xleftrightarrow{*}_{R_{2}}), then (Σ,R1)(\Sigma,R_{1}) and (Σ,R2)(\Sigma,R_{2}) are isomorphic. Roughly speaking, the notion that two SRSs are isomorphic means that the SRSs are equivalent but their alphabets can be different. For example, let Σ1\Sigma_{1} be {a,b,c}\{a,b,c\} and R1R_{1} be {abbab,bac}\{abb\rightarrow ab,\ ba\rightarrow c\}. Then, (Σ1,R1)(\Sigma_{1},R_{1}) is isomorphic to (Σ2,R2)(\Sigma_{2},R_{2}) where Σ2={a,b}\Sigma_{2}=\{a,b\} and R2={abbab}R_{2}=\{abb\rightarrow ab\}. Intuitively, since cc is equivalent to baba with respect to the congruence R1\xleftrightarrow{*}_{R_{1}}, cc is redundant as long as we consider strings modulo R1\xleftrightarrow{*}_{R_{1}} and (Σ2,R2)(\Sigma_{2},R_{2}) is the SRS made by removing cc from (Σ1,R1)(\Sigma_{1},R_{1}).

If a monoid SS is isomorphic to (Σ,R)\mathcal{M}_{(\Sigma,R)} for an SRS (Σ,R)(\Sigma,R), we call (Σ,R)(\Sigma,R) a presentation of the monoid SS.

Let SS be a monoid and consider the free \mathbb{Z}-module S¯\mathbb{Z}\underline{S}. The module S¯\mathbb{Z}\underline{S} can be equipped with a ring structure under the multiplication (wSnww¯)(wSmww¯)=w,vSnwmvwv¯\left(\sum_{w\in S}n_{w}\underline{w}\right)\left(\sum_{w\in S}m_{w}\underline{w}\right)=\sum_{w,v\in S}n_{w}m_{v}\underline{wv} where nwmvn_{w}m_{v} is the usual multiplication of integers and wvwv is the multiplication of the monoid SS. S¯\mathbb{Z}\underline{S} as a ring is called the integral monoid ring of SS. When we think of S¯\mathbb{Z}\underline{S} as a ring, we write S\mathbb{Z}\langle S\rangle instead of S¯\mathbb{Z}\underline{S}.

We consider S\mathbb{Z}\langle S\rangle-modules. The group of integers \mathbb{Z} forms a left (resp. right) S\mathbb{Z}\langle S\rangle-module under the scalar multiplication (wSnww¯)m=wSnwm(\sum_{w\in S}n_{w}\underline{w})\cdot m=\sum_{w\in S}n_{w}m (resp. m(wSnww¯)=wSnwmw¯m\cdot(\sum_{w\in S}n_{w}\underline{w})=\sum_{w\in S}n_{w}m\underline{w}). Let 1F10F0ϵ\dotsb\xrightarrow{\partial_{1}}F_{1}\xrightarrow{\partial_{0}}F_{0}\xrightarrow{\epsilon}\mathbb{Z} be a free resolution of \mathbb{Z} over the ring S\mathbb{Z}\langle S\rangle. The abelian group Hi(S)H_{i}(S) is defined as the ii-th homology group of the chain complex (SF,)(\mathbb{Z}\otimes_{\mathbb{Z}\langle S\rangle}F_{\bullet},\mathbb{Z}\otimes\partial_{\bullet}), i.e.,

Hi(S)=Hi(SF,)=keri1/imi.H_{i}(S)=H_{i}(\mathbb{Z}\otimes_{\mathbb{Z}\langle S\rangle}F_{\bullet},\mathbb{Z}\otimes\partial_{\bullet})=\ker\mathbb{Z}\otimes\partial_{i-1}/\operatorname{im}\mathbb{Z}\otimes\partial_{i}.

If SS is isomorphic to (Σ,R)\mathcal{M}_{(\Sigma,R)} for some SRS (Σ,R)(\Sigma,R), it is known that there is a free resolution in the form of

(S)P¯2(S)R¯1(S)Σ¯0(S){}¯ϵ\dotsb\rightarrow(\mathbb{Z}\langle S\rangle)\underline{P}\xrightarrow{\partial_{2}}(\mathbb{Z}\langle S\rangle)\underline{R}\xrightarrow{\partial_{1}}(\mathbb{Z}\langle S\rangle)\underline{\Sigma}\xrightarrow{\partial_{0}}(\mathbb{Z}\langle S\rangle)\underline{\{\star\}}\xrightarrow{\epsilon}\mathbb{Z}

for some set PP. Squier [s87] showed that if the SRS (Σ,R)(\Sigma,R) is complete and reduced111An SRS (Σ,R)(\Sigma,R) is reduced if for each lrRl\rightarrow r\in R, rr is normal w.r.t. R\rightarrow_{R} and there does not exist lrRl^{\prime}\rightarrow r^{\prime}\in R such that l=ulvll^{\prime}=ulv\neq l for some u,vΣu,v\in\Sigma^{*}, there is 2:(S)P¯(S)R¯\partial_{2}:(\mathbb{Z}\langle S\rangle)\underline{P}\rightarrow(\mathbb{Z}\langle S\rangle)\underline{R} for P=(the critical pairs of R)P=(\text{the critical pairs of $R$}) so that we can compute H2(S)=ker1/im2H_{2}(S)=\ker\partial_{1}/\operatorname{im}\partial_{2} explicitly. This is an analog of Example 3.1, but we omit the details here. For an abelian group GG, let s(G)s(G) denote the minimum number of generators of GG (i.e., the minimum cardinality of the subset AGA\subset G such that any element xGx\in G can be written by x=a1++akak+1amx=a_{1}+\dotsb+a_{k}-a_{k+1}-\dotsb-a_{m} for a1,,amAa_{1},\dotsc,a_{m}\in A). Then, we have the following theorem: {thmC}[[u95]] Let (Σ,R)(\Sigma,R) be an SRS and S=(Σ,R)S=\mathcal{M}_{(\Sigma,R)}. Then #Σs(H1(S))\#\Sigma\geq s(H_{1}(S)), #Rs(H2(S))\#R\geq s(H_{2}(S)). To prove this theorem, we use the following lemma: {lem} Let XX be a set. The group homomorphism S(S)X¯X¯\mathbb{Z}\otimes_{\mathbb{Z}\langle S\rangle}(\mathbb{Z}\langle S\rangle)\underline{X}\rightarrow\mathbb{Z}\underline{X}, nwx¯nx¯n\langle w\rangle\underline{x}\mapsto n\underline{x} is an isomorphism. This lemma is proved in a straightforward way.

Proof of Theorem 1.

Since S(S)X¯X¯\mathbb{Z}\otimes_{\mathbb{Z}\langle S\rangle}(\mathbb{Z}\langle S\rangle)\underline{X}\cong\mathbb{Z}\underline{X} by the above lemma, s(S(S)X¯)=s(X¯)=#Xs(\mathbb{Z}\otimes_{\mathbb{Z}\langle S\rangle}(\mathbb{Z}\langle S\rangle)\underline{X})=s(\mathbb{Z}\underline{X})=\#X. For any set YY and group homomorphism f:X¯Y¯f:\mathbb{Z}\underline{X}\rightarrow\mathbb{Z}\underline{Y}, since kerf\ker f is a subgroup of X¯\mathbb{Z}\underline{X}, we have #Xs(kerf)\#X\geq s(\ker f). For any subgroup HH of kerf\ker f, kerf/H\ker f/H is generated by [x1],,[xk][x_{1}],\dotsc,[x_{k}] if kerf\ker f is generated by x1,,xkx_{1},\dotsc,x_{k}. Thus #Σs(ker0/im1)=s(H1(S))\#\Sigma\geq s(\ker\partial_{0}/\operatorname{im}\partial_{1})=s(H_{1}(S)), #Rs(ker1/im2)=s(H2(S))\#R\geq s(\ker\partial_{1}/\operatorname{im}\partial_{2})=s(H_{2}(S)). ∎

Note that Hi(S)H_{i}(S) does not depend on the choice of presentation (Σ,R)(\Sigma,R) by Theorem 3.1. Therefore, Theorem 1 can be restated as follows: Let (Σ,R)(\Sigma,R) be an SRS. For any SRS (Σ,R)(\Sigma^{\prime},R^{\prime}) isomorphic to (Σ,R)(\Sigma,R), the number of symbols #Σ\#\Sigma^{\prime} is bounded below by s(H1((Σ,R)))s(H_{1}(\mathcal{M}_{(\Sigma,R)})) and the number of rules #R\#R^{\prime} is bounded below by s(H2((Σ,R)))s(H_{2}(\mathcal{M}_{(\Sigma,R)})).

4 An Overview of the Homology Theory of TRSs

In this section, we will briefly see the homology theory of algebraic theories, which is the main tool to obtain our lower bounds.

We fix a signature Σ\Sigma. Let t=t1,,tnt=\langle t_{1},\dotsc,t_{n}\rangle be a nn-tuple of terms and suppose that for each tit_{i}, the set of variables in tit_{i} is included in {x1,,xm}\left\{x_{1},\dots,x_{m}\right\}. For an mm-tuple of term s=s1,,sms=\langle s_{1},\dotsc,s_{m}\rangle, we define the composition of tt and ss by

ts=t1[s1/x1,,sm/xm],,tn[s1/x1,,sm/xm]t\circ s=\langle t_{1}[s_{1}/x_{1},\dotsc,s_{m}/x_{m}],\dotsc,t_{n}[s_{1}/x_{1},\dotsc,s_{m}/x_{m}]\rangle

where ti[s1/x1,,sm/xm]t_{i}[s_{1}/x_{1},\dotsc,s_{m}/x_{m}] denotes the term obtained by substituting sjs_{j} for xjx_{j} in tit_{i} for each j=1,,mj=1,\dotsc,m in parallel. (For example, f(x1,x2)[g(x2)/x1,g(x1)/x2]=f(g(x2),g(x1))f(x_{1},x_{2})[g(x_{2})/x_{1},g(x_{1})/x_{2}]=f(g(x_{2}),g(x_{1})).) By this definition, we can think of any mm-tuple s1,,sm\langle s_{1},\dotsc,s_{m}\rangle of terms as a (parallel) substitution {x1s1,,xmsm}\left\{x_{1}\mapsto s_{1},\dotsc,x_{m}\mapsto s_{m}\right\}. Recall that, for a TRS RR, the reduction relation R\rightarrow_{R} between terms is defined as t1Rt2t1=C[ls],t2=C[rs]t_{1}\rightarrow_{R}t_{2}\iff t_{1}=C[l\circ s],\ t_{2}=C[r\circ s] for some single-hole context CC, mm-tuple ss of terms, and rewrite rule lrRl\rightarrow r\in R whose variables are included in {x1,,xm}\{x_{1},\dotsc,x_{m}\}. This definition suggests that the pair of a context CC and an mm-tuple of terms (or equivalently, substitution) ss is useful to think about rewrite relations. Malbos and Mimram [mm16] called the pair of a context and an mm-tuple of terms a bicontext. For a bicontext (C,t)(C,t) and a rewrite rule AA, we call the triple (C,A,t)(C,A,t) a rewriting step. The pair of two rewriting steps (,l1r1,s),(C,l2r2,t)(\square,l_{1}\rightarrow r_{1},s),(C,l_{2}\rightarrow r_{2},t) is called a critical pair if the pair (r1s,C[r2t])(r_{1}\circ s,C[r_{2}\circ t]) of terms is a critical pair in the usual sense given by l1r1l_{1}\rightarrow r_{1}, l2r2l_{2}\rightarrow r_{2}.

The composition of two bicontexts (C,t),(D,s)(C,t),(D,s) (t=t1,,tnt=\langle t_{1},\dotsc,t_{n}\rangle, s=s1,,sms=\langle s_{1},\dotsc,s_{m}\rangle) is defined by

(C,t)(D,s)=(C[Dt],st)(C,t)\circ(D,s)=(C[D\circ t],s\circ t)

where Dt=D[t1/x1,,tn/xn]D\circ t=D[t_{1}/x_{1},\dotsc,t_{n}/x_{n}] and note that the order of composition is reversed in the second component. We write 𝕂(n,m)\mathbb{K}(n,m) (n,mn,m\in\mathbb{N}) for the set of bicontexts (C,t)(C,t) where t=t1,,tnt=\langle t_{1},\dotsc,t_{n}\rangle and each tit_{i} and CC have variables in {x1,,xm}\{x_{1},\dotsc,x_{m}\} (except \square in CC).

To apply homological algebra to TRSs, we construct an algebraic structure from bicontexts. For two natural numbers n,mn,m, we define 𝕂(n,m)\mathbb{Z}\langle\mathbb{K}\rangle(n,m) to be the free abelian group generated by 𝕂(n,m)\mathbb{K}(n,m) (i.e., any element in 𝕂(n,m)\mathbb{Z}\langle\mathbb{K}\rangle(n,m) is written in the form of formal sum (C,t)𝕂(n,m)λ(C,t)(C,t)\sum_{(C,t)\in\mathbb{K}(n,m)}\lambda_{(C,t)}(C,t) where each λ(C,t)\lambda_{(C,t)} is in \mathbb{Z} and is equal to 0 except for finitely many (C,t)(C,t)s.) Then, the composition :𝕂(n,m)×𝕂(k,n)𝕂(k,m)\circ:\mathbb{K}(n,m)\times\mathbb{K}(k,n)\rightarrow\mathbb{K}(k,m) can be extended to :𝕂(n,m)×𝕂(k,n)𝕂(k,m)\circ:\mathbb{Z}\langle\mathbb{K}\rangle(n,m)\times\mathbb{Z}\langle\mathbb{K}\rangle(k,n)\rightarrow\mathbb{Z}\langle\mathbb{K}\rangle(k,m) by

((C,t)λ(C,t)(C,t))((D,s)μ(D,s)(D,s))=(C,t)(D,s)λ(C,t)μ(D,s)((C,t)(D,s)).\left(\sum_{(C,t)}\lambda_{(C,t)}(C,t)\right)\circ\left(\sum_{(D,s)}\mu_{(D,s)}(D,s)\right)=\sum_{(C,t)}\sum_{(D,s)}\lambda_{(C,t)}\mu_{(D,s)}((C,t)\circ(D,s)).

This family of free abelian groups forms a structure called ringoid. {defi} Suppose an abelian group ((i,j),+i,j,0i,j)(\mathcal{R}(i,j),+_{i,j},0_{i,j}) is defined for each i,ji,j\in\mathbb{N}. If for each i,j,ki,j,k\in\mathbb{N}, a map i,j,k:(j,k)×(i,j)(i,k)\circ_{i,j,k}:\mathcal{R}(j,k)\times\mathcal{R}(i,j)\rightarrow\mathcal{R}(i,k) is defined and satisfies the following conditions, \mathcal{R} is called a ringoid (also called a small 𝐀𝐛\mathbf{Ab}-enriched category).

  1. 1.

    For each ii, there exists an element 1i(i,i)1_{i}\in\mathcal{R}(i,i) such that ai,i,j1i=aa\circ_{i,i,j}1_{i}=a, 1ij,i,ib=b1_{i}\circ_{j,i,i}b=b (jj\in\mathbb{N}, a(i,j)a\in\mathcal{R}(i,j), b(j,i)b\in\mathcal{R}(j,i)),

  2. 2.

    (aj,k,lb)i,j,lc=ai,k,l(bi,j,kc)(a\circ_{j,k,l}b)\circ_{i,j,l}c=a\circ_{i,k,l}(b\circ_{i,j,k}c) (a(k,l)a\in\mathcal{R}(k,l), b(j,k)b\in\mathcal{R}(j,k), c(i,j)c\in\mathcal{R}(i,j)),

  3. 3.

    (a+j,kb)i,j,kc=ai,j,kc+i,kbi,j,kc(a+_{j,k}b)\circ_{i,j,k}c=a\circ_{i,j,k}c+_{i,k}b\circ_{i,j,k}c (a,b(j,k)a,b\in\mathcal{R}(j,k), c(i,j)c\in\mathcal{R}(i,j)),

  4. 4.

    ai,j,k(b+i,jc)=ai,j,kb+i,kai,j,kca\circ_{i,j,k}(b+_{i,j}c)=a\circ_{i,j,k}b+_{i,k}a\circ_{i,j,k}c (a(j,k)a\in\mathcal{R}(j,k), b,c(i,j)b,c\in\mathcal{R}(i,j)),

  5. 5.

    ai,j,k0i,j=0i,k=0j,ki,j,kba\circ_{i,j,k}0_{i,j}=0_{i,k}=0_{j,k}\circ_{i,j,k}b (a(j,k)a\in\mathcal{R}(j,k), b(i,j)b\in\mathcal{R}(i,j)).

We will omit subscripts of +,,0,1+,\circ,0,1 if there is no confusion. The notion of modules over a ring is extended to modules over a ringoid. {defi} Let \mathcal{R} be a ringoid. Suppose that for each ii\in\mathbb{N}, an abelian group (M(i),+i,0i)(M(i),+_{i},0_{i}) is defined. If there is a map i,j:(i,j)×M(i)M(j)\cdot_{i,j}:\mathcal{R}(i,j)\times M(i)\rightarrow M(j) satisfying the following conditions, MM is called a left \mathcal{R}-module.

  1. 1.

    (ai,j,kb)i,kx=aj,k(bi,jx)(a\circ_{i,j,k}b)\cdot_{i,k}x=a\cdot_{j,k}(b\cdot_{i,j}x) (a(j,k)a\in\mathcal{R}(j,k), b(i,j)b\in\mathcal{R}(i,j), xM(i)x\in M(i)),

  2. 2.

    1ii,ix=x1_{i}\cdot_{i,i}x=x (xM(i))x\in M(i))),

  3. 3.

    (a+i,jb)i,jx=(ai,jx)+j(bi,jx)(a+_{i,j}b)\cdot_{i,j}x=(a\cdot_{i,j}x)+_{j}(b\cdot_{i,j}x) (a,b(i,j)a,b\in\mathcal{R}(i,j), xM(i)x\in M(i)),

  4. 4.

    ai,j(x+iy)=(ai,jx)+j(ai,jy)a\cdot_{i,j}(x+_{i}y)=(a\cdot_{i,j}x)+_{j}(a\cdot_{i,j}y) (a(i,j)a\in\mathcal{R}(i,j), x,yM(i)x,y\in M(i)),

  5. 5.

    0i,ji,jx=0j0_{i,j}\cdot_{i,j}x=0_{j} (xM(i)x\in M(i)).

A right \mathcal{R}-module MM is also defined with a map i,j:M(i)×(i,j)M(j)\cdot_{i,j}:M(i)\times\mathcal{R}(i,j)\rightarrow M(j) in the same manner with right modules over a ring.

An \mathcal{R}-linear map f:MMf:M\rightarrow M^{\prime} between left \mathcal{R}-modules M,MM,M^{\prime} is a collection of group homomorphisms fi:M(i)M(i)f_{i}:M(i)\rightarrow M^{\prime}(i) (ii\in\mathbb{N}) that satisfy

fj(ai,jx)=ai,jfi(x)(a(i,j),xM(i)).f_{j}(a\cdot_{i,j}x)=a\cdot_{i,j}f_{i}(x)\quad(a\in\mathcal{R}(i,j),x\in M(i)).

Ringoids and modules over ringoids are originally defined in a category theoretic way (\cf [m72, mm16]). (A ringoid is a small Ab-enriched category, and a module over a ringoid is an additive functor.) Our definitions here are obtained by unfolding the category theoretic terminology in the original definitions so that those who are not familiar with category theory can understand them more easily. {defi} Let \mathcal{R} be a ringoid and PP be a family of sets PiP_{i} (ii\in\mathbb{N}). The free left \mathcal{R}-module generated by PP, denoted by P¯\mathcal{R}\underline{P} is defined as follows. For each ii\in\mathbb{N}, (P¯)(i)(\mathcal{R}\underline{P})(i) is the abelian group of formal finite sums

pjPj,japjpj¯,(apj(j,i))\sum_{p_{j}\in P_{j},\ j\in\mathbb{N}}a_{p_{j}}\underline{p_{j}},\quad(a_{p_{j}}\in\mathcal{R}(j,i))

and for each r(i,k)r\in\mathcal{R}(i,k),

r(pjPj,japjpj¯)=pjPj,j(rapj)pj¯.r\cdot\left(\sum_{p_{j}\in P_{j},\ j\in\mathbb{N}}a_{p_{j}}\underline{p_{j}}\right)=\sum_{p_{j}\in P_{j},\ j\in\mathbb{N}}(r\circ a_{p_{j}})\underline{p_{j}}.

If a left \mathcal{R}-module MM is isomorphic to P¯\mathcal{R}\underline{P} for some PP, we say that MM is free. For 𝕂\mathbb{Z}\langle\mathbb{K}\rangle, we write Cx¯tC\underline{x}t for elements of ((𝕂)P¯)(X)((\mathbb{Z}\langle\mathbb{K}\rangle)\underline{P})(X) instead of (C,t)x¯(C,t)\underline{x}, and (D+C)x¯t(D+C)\underline{x}t for Dx¯t+Cx¯tD\underline{x}t+C\underline{x}t.

The tensor product of two modules over a ringoid is also defined. {defiC}[[mm16]] Let \mathcal{R} be a ringoid, M1M_{1} be a right \mathcal{R}-module, and M2M_{2} be a left \mathcal{R}-module. For a family of groups {GXXP}\{G_{X}\mid X\in P\} for some indexing set PP, its direct sum, denoted by XPGX\bigoplus_{X\in P}G_{X}, is the subset of the direct product defined by {(gX)XPXPGXgX=0 except for finite Xs}\{(g_{X})_{X\in P}\in\prod_{X\in P}G_{X}\mid\text{$g_{X}=0$ except for finite $X$s}\}. The direct sum of groups also forms a group.

The tensor product M1M2M_{1}\otimes_{\mathcal{R}}M_{2} is the quotient abelian group of XM1(X)(X,X)M2(X)\bigoplus_{X\in\mathcal{R}}M_{1}(X)\otimes_{\mathcal{R}(X,X)}M_{2}(X) by relations (xa)yx(ay)(x\cdot a)\otimes y-x\otimes(a\cdot y) for all a(Y,X)a\in\mathcal{R}(Y,X), xM(X),yM(Y)x\in M(X),y\in M(Y).

We define an equivalence between two TRSs (Σ,R)(\Sigma,R), (Σ,R)(\Sigma^{\prime},R^{\prime}), called Tietze equivalence. {defi} Two TRSs are Tietze equivalent if one is obtained from the other by applying a series of Tietze transformations defined as follows:

  1. 1.

    If f(n)f^{(n)} is a symbol not in Σ\Sigma and tT(Σ)t\in T(\Sigma) has variables in {x1,,xn}\{x_{1},\dots,x_{n}\}, then (Σ,R)(\Sigma,R) can be transformed into (Σ{f},R{tf(x1,,xn)})(\Sigma\cup\{f\},R\cup\{t\rightarrow f(x_{1},\dots,x_{n})\}).

  2. 2.

    If tf(x1,,xn)Rt\rightarrow f(x_{1},\dots,x_{n})\in R, tT(Σ{f})t\in T(\Sigma\setminus\{f\}), and ff does not occur in any rule in R=R{tf(x1,,xn)}R^{\prime}=R\setminus\{t\rightarrow f(x_{1},\dots,x_{n})\}, then (Σ,R)(\Sigma,R) can be transformed into (Σ{f},R)(\Sigma\setminus\{f\},R^{\prime}).

  3. 3.

    If tRst\xleftrightarrow{*}_{R}s, then (Σ,R)(\Sigma,R) can be transformed into (Σ,R{ts})(\Sigma,R\cup\{t\rightarrow s\}).

  4. 4.

    If tsRt\rightarrow s\in R and tRst\xleftrightarrow{*}_{R^{\prime}}s for R=R{ts}R^{\prime}=R\setminus\{t\rightarrow s\}, then (Σ,R)(\Sigma,R) can be transformed into (Σ,R)(\Sigma,R^{\prime}).

We can see that any two TRSs (Σ,R1)(\Sigma,R_{1}),(Σ,R2)(\Sigma,R_{2}) are Tietze equivalent if they are equivalent in the usual sense, R1=R2\xleftrightarrow{*}_{R_{1}}\,=\,\xleftrightarrow{*}_{R_{2}}. Tietze equivalence is originally introduced in group theory [t1908, §11] and is also defined for monoids [bo93, 7.2]. {exa} Consider the signature Σ={+(2),S(1),0(0)}\Sigma=\{+^{(2)},S^{(1)},0^{(0)}\} and the set RR of four rules

0+xx,x+0x,S(x)+yS(x+y),(x+y)+zx+(y+z).0+x\rightarrow x,\ x+0\rightarrow x,\ S(x)+y\rightarrow S(x+y),\ (x+y)+z\rightarrow x+(y+z).

We can see (Σ,R)(\Sigma,R) is Tietze equivalent to (Σ,R)(\Sigma^{\prime},R^{\prime}) where

Σ={+(2),0(0),1(0)},R={0+xx,x+0x,(x+y)+zx+(y+z)}\Sigma^{\prime}=\{+^{(2)},0^{(0)},1^{(0)}\},\ R^{\prime}=\{0+x\rightarrow x,\ x+0\rightarrow x,\ (x+y)+z\rightarrow x+(y+z)\}

as follows:

(Σ,R)\displaystyle(\Sigma,R) \xlongrightarrow(1)(Σ{1(0)},R{S(0)1})\displaystyle\xlongrightarrow{\rm(1)}(\Sigma\uplus\{1^{(0)}\},R\uplus\{S(0)\rightarrow 1\})
\xlongrightarrow(3)(Σ{1(0)},R{S(0)1, 1+xS(x)})\displaystyle\xlongrightarrow{\rm(3)}(\Sigma\uplus\{1^{(0)}\},R\uplus\{S(0)\rightarrow 1,\ 1+x\rightarrow S(x)\})
\xlongrightarrow(4)(Σ{1(0)},R{1+xS(x)})\displaystyle\xlongrightarrow{\rm(4)}(\Sigma\uplus\{1^{(0)}\},R\uplus\{1+x\rightarrow S(x)\})
\xlongrightarrow(4)(Σ{1(0)},R{1+xS(x)}{S(x)+yS(x+y)})\displaystyle\xlongrightarrow{\rm(4)}(\Sigma\uplus\{1^{(0)}\},R\uplus\{1+x\rightarrow S(x)\}\setminus\{S(x)+y\rightarrow S(x+y)\})
\xlongrightarrow(2)(Σ{1(0)}{S(1)},R{S(x)+yS(x+y)})=(Σ,R).\displaystyle\xlongrightarrow{\rm(2)}(\Sigma\uplus\{1^{(0)}\}\setminus\{S^{(1)}\},R\setminus\{S(x)+y\rightarrow S(x+y)\})=(\Sigma^{\prime},R^{\prime}).

Now, we outline Malbos-Mimram’s construction of the homology groups of TRSs. Let d=deg(R)d=\deg(R).

  1. 1.

    We begin by defining a new ringoid from 𝕂\mathbb{Z}\langle\mathbb{K}\rangle. That ringoid, denoted by 𝕂¯(Σ,R)\overline{\mathbb{Z}\langle\mathbb{K}\rangle}^{(\Sigma,R)}, depends only on the Tietze equivalence class of (Σ,R)(\Sigma,R). 𝕂¯(Σ,R)\overline{\mathbb{Z}\langle\mathbb{K}\rangle}^{(\Sigma,R)} corresponds to (Σ,R)\mathbb{Z}\langle\mathcal{M}_{(\Sigma,R)}\rangle in the case (Σ,R)(\Sigma,R) is an SRS.

  2. 2.

    From this step, we write \mathcal{R} for 𝕂¯(Σ,R)\overline{\mathbb{Z}\langle\mathbb{K}\rangle}^{(\Sigma,R)}. It can be shown that we have a partial free resolution

    𝐏3¯2𝐏2¯1𝐏1¯0𝐏0¯ϵ𝒵\mathcal{R}\underline{\mathbf{P}_{3}}\xrightarrow{\partial_{2}}\mathcal{R}\underline{\mathbf{P}_{2}}\xrightarrow{\partial_{1}}\mathcal{R}\underline{\mathbf{P}_{1}}\xrightarrow{\partial_{0}}\mathcal{R}\underline{\mathbf{P}_{0}}\xrightarrow{\epsilon}\mathcal{Z} (4.1)

    where every 𝐏i\mathbf{P}_{i} is a family of sets (𝐏i)j(\mathbf{P}_{i})_{j} given by (𝐏0)1={1}(\mathbf{P}_{0})_{1}=\{1\}, (𝐏0)j=(\mathbf{P}_{0})_{j}=\emptyset (j1j\neq 1), (𝐏1)j=Σ(j)={fΣf is of arity j}(\mathbf{P}_{1})_{j}=\Sigma^{(j)}=\{f\in\Sigma\mid\text{$f$ is of arity $j$}\}, (𝐏2)j={lrRl is of arity j}(\mathbf{P}_{2})_{j}=\{l\rightarrow r\in R\mid\text{$l$ is of arity $j$}\}, (𝐏3)j={((,A,s),(C,B,t)) : critical pairone of A,B is in (𝐏2)j, and the other is in (𝐏2)k for kj}(\mathbf{P}_{3})_{j}=\{((\square,A,s),(C,B,t))\text{ : critical pair}\mid\text{one of $A,B$ is in $(\mathbf{P}_{2})_{j}$, and the other is in }(\mathbf{P}_{2})_{k}\\ \text{ for }k\leq j\}.

  3. 3.

    By taking the tensor product /d\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}-, we have the chain complex

    /d𝐏3¯/d2/d𝐏2¯/d1/d𝐏1¯/d0/d𝐏0¯\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{3}}\xrightarrow{\!\!\raisebox{2.84526pt}{$\scriptstyle{\mathbb{Z}/d\mathbb{Z}\otimes\partial_{2}}$}\!\!}\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{2}}\xrightarrow{\!\!\raisebox{2.84526pt}{$\scriptstyle{\mathbb{Z}/d\mathbb{Z}\otimes\partial_{1}}$}\!\!}\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{1}}\xrightarrow{\!\!\raisebox{2.84526pt}{$\scriptstyle{\mathbb{Z}/d\mathbb{Z}\otimes\partial_{0}}$}\!\!}\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{0}} (4.2)

    where /d\mathbb{Z}/d\mathbb{Z} above is the \mathcal{R}-module defined by /d(i)=/d\mathbb{Z}/d\mathbb{Z}(i)=\mathbb{Z}/d\mathbb{Z} (the abelian group of integers) for each object ii, and the scalar multiplication is given by (C,t)k=k(C,t)\cdot k=k.

  4. 4.

    The homology groups can be defined by

    Hi(Σ,R)=ker(/di1)/im(/di).H_{i}(\Sigma,R)=\ker(\mathbb{Z}/d\mathbb{Z}\otimes\partial_{i-1})/\operatorname{im}(\mathbb{Z}/d\mathbb{Z}\otimes\partial_{i}).

    It is shown that the homology groups of TRS depend only on the Tietze equivalence class of (Σ,R)(\Sigma,R). Thus, we have the following:

    R1=R2Hi(Σ,R1)Hi(Σ,R2).\xleftrightarrow{*}_{R_{1}}\,=\,\xleftrightarrow{*}_{R_{2}}\implies H_{i}(\Sigma,R_{1})\cong H_{i}(\Sigma,R_{2}).

For the step 1, we define the relations of 𝕂¯(Σ,R)\overline{\mathbb{Z}\langle\mathbb{K}\rangle}^{(\Sigma,R)}. We identify elements in 𝕂\mathbb{Z}\langle\mathbb{K}\rangle as follows. (a) For two mm-tuples t=t1,,tm,s=s1,,smt=\langle t_{1},\dotsc,t_{m}\rangle,s=\langle s_{1},\dotsc,s_{m}\rangle of terms, we identify tt and ss if tRst\xleftrightarrow{*}_{R}s. (b) Similarly, for two single-hole contexts C,DC,D, we identify CC and DD if CRDC\xleftrightarrow{*}_{R}D. For the last identification, we introduce operator κi\kappa_{i} which takes a term tt and returns the formal sum of single-hole contexts C1++CmC_{1}+\dotsb+C_{m} where CjC_{j} (j=1,,m)(j=1,\dotsc,m) is obtained by replacing the jj-th occurrence of xix_{i} with \square in tt, and mm is the number of the occurrences of xix_{i} in tt. For example, we have

κ1(f(g(x1,x2),x1))\displaystyle\kappa_{1}(f(g(x_{1},x_{2}),x_{1})) =f(g(,x2),x1)+f(g(x1,x2),),\displaystyle=f(g(\square,x_{2}),x_{1})+f(g(x_{1},x_{2}),\square),
κ2(f(g(x1,x2),x1))\displaystyle\kappa_{2}(f(g(x_{1},x_{2}),x_{1})) =f(g(x1,),x1),\displaystyle=f(g(x_{1},\square),x_{1}),
κ2(h(x1))\displaystyle\kappa_{2}(h(x_{1})) =0.\displaystyle=0.

The definition of κi\kappa_{i} can be stated inductively as follows:

κi(xi)\displaystyle\kappa_{i}(x_{i}) =,κi(xj)=0(ji),\displaystyle=\square,\ \kappa_{i}(x_{j})=0\quad(j\neq i),
κi(f(t1,,tn))\displaystyle\kappa_{i}(f(t_{1},\dotsc,t_{n})) =k=1nf(t1,,tk1,κi(tk),tk+1,,tn).\displaystyle=\sum_{k=1}^{n}f(t_{1},\dotsc,t_{k-1},\kappa_{i}(t_{k}),t_{k+1},\dotsc,t_{n}).

Then, (c) we identify formal sums of bicontexts (C1,t)++(Ck,t)(C_{1},t)+\dots+(C_{k},t) and (D1,t)++(Dl,t)(D_{1},t)+\dots+(D_{l},t) if κi(u)=C1++Ck\kappa_{i}(u)=C_{1}+\dots+C_{k}, κi(v)=D1++Dl\kappa_{i}(v)=D_{1}+\dots+D_{l} for some positive integer ii and terms u,vu,v such that uRvu\xleftrightarrow{*}_{R}v. 𝕂¯(Σ,R)\overline{\mathbb{Z}\langle\mathbb{K}\rangle}^{(\Sigma,R)} is defined as the quotient of 𝕂\mathbb{Z}\langle\mathbb{K}\rangle by the equivalence class generated by the identifications (a), (b), and (c).

We omit the definitions of the \mathcal{R}-linear maps ϵ,i\epsilon,\partial_{i} (i=0,1,2i=0,1,2) in the step 2, but we describe the group homomorphisms /di:/d𝐏i+1¯/d𝐏i¯\mathbb{Z}/d\mathbb{Z}\otimes\partial_{i}:\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{i+1}}\rightarrow\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{i}}. Let ~i\tilde{\partial}_{i} denote /di\mathbb{Z}/d\mathbb{Z}\otimes\partial_{i} for simplicity. For the step 2, we define the \mathcal{R}-linear maps ϵ,i\epsilon,\partial_{i} (i=0,1,2i=0,1,2). For f(n)Σf^{(n)}\in\Sigma, the homomorphism ~0:/d𝐏1¯/d𝐏0¯\tilde{\partial}_{0}:\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{1}}\rightarrow\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{0}} is given by

~0(f¯)=(n1)1¯.\tilde{\partial}_{0}(\underline{f})=(n-1)\underline{1}.

For a term tt, we define φ(t)\varphi(t) as the linear combinaton of symbols fΣnff¯\sum_{f\in\Sigma}n_{f}\underline{f} where nfn_{f} is the number of occurrences of ff in tt. Using this, for lrRl\rightarrow r\in R, the homomorphism ~1:/d𝐏2¯/d𝐏1¯\tilde{\partial}_{1}:\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{2}}\rightarrow\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{1}} is given by

~1(lr¯)=φ(r)φ(l).\tilde{\partial}_{1}(\underline{l\rightarrow r})=\varphi(r)-\varphi(l).

For a critical pair ((,lr,s),(C,uv,t))((\square,l\rightarrow r,s),(C,u\rightarrow v,t)), let (Di,liri,si)(D_{i},l_{i}\rightarrow r_{i},s_{i}), (Cj,ujvj,tj)(C_{j},u_{j}\rightarrow v_{j},t_{j}) (i=1,,k,j=1,,li=1,\dots,k,j=1,\dots,l) be rewriting steps such that rs=D1[l1s1],D1[r1s1]=D2[l2s2],,Dk1[rk1sk1]=Dk[lksk]r\circ s=D_{1}[l_{1}\circ s_{1}],D_{1}[r_{1}\circ s_{1}]=D_{2}[l_{2}\circ s_{2}],\dots,D_{k-1}[r_{k-1}\circ s_{k-1}]=D_{k}[l_{k}\circ s_{k}], C[vt]=C1[u1t1],C1[v1t1]=C2[u2t2],,Cl1[vl1tl1]=Cl[ultl]C[v\circ t]=C_{1}[u_{1}\circ t_{1}],C_{1}[v_{1}\circ t_{1}]=C_{2}[u_{2}\circ t_{2}],\dots,C_{l-1}[v_{l-1}\circ t_{l-1}]=C_{l}[u_{l}\circ t_{l}], Dk[rksk]=Cl[vltl]D_{k}[r_{k}\circ s_{k}]=C_{l}[v_{l}\circ t_{l}]. Then the map ~2((,lr,s),(C,uv,t))\tilde{\partial}_{2}((\square,l\rightarrow r,s),(C,u\rightarrow v,t)) is defined by

uv¯lv¯i=1kuivi¯j=1lljrj¯.\underline{u\rightarrow v}-\underline{l\rightarrow v}-\sum_{i=1}^{k}\underline{u_{i}\rightarrow v_{i}}-\sum_{j=1}^{l}\underline{l_{j}\rightarrow r_{j}}.

Malbos-Mimram’s lower bound for the number of rewrite rules is given by s(H2(Σ,R))s(H_{2}(\Sigma,R)). (Recall that s(G)s(G) denotes the minimum number of generators of an abelian group GG.) More precisely, #Σs(H1(Σ,R))\#\Sigma^{\prime}\geq s(H_{1}(\Sigma,R)) and #Rs(H2(Σ,R))\#R^{\prime}\geq s(H_{2}(\Sigma,R)) hold for any TRS (Σ,R)(\Sigma^{\prime},R^{\prime}) that is Tietze equivalent to (Σ,R)(\Sigma,R). These inequalities are shown in a similar way to the proof of Theorem 1.

5 Proof of Main Theorem

Let (Σ,R)(\Sigma,R) be a complete TRS. We first simplify the tensor product /d𝐏i¯\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{i}} in (4.2). {lem} Let d=deg(R)d=\deg(R) and PP be a family of sets P0,P1,P_{0},P_{1},\dots. Then, we have /dP¯(/d)iPi¯\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{P}\cong(\mathbb{Z}/d\mathbb{Z})\underline{\biguplus_{i}P_{i}}. Especially, if d=0d=0, P¯iPi¯\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{P}\cong\mathbb{Z}\underline{\biguplus_{i}P_{i}}.

Proof.

We define a group homomorphism f:/dP¯(/d)iPi¯f:\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{P}\rightarrow(\mathbb{Z}/d\mathbb{Z})\underline{\biguplus_{i}P_{i}} by f((wn)n0)=n0fn(wn)f((w_{n})_{n\geq 0})=\sum_{n\geq 0}f_{n}(w_{n}) where fn:/d(n,n)P¯(n)(/d)Pn¯f_{n}:\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}(n,n)}\mathcal{R}\underline{P}(n)\rightarrow(\mathbb{Z}/d\mathbb{Z})\underline{P_{n}} is defined by fn([k]Ca¯t)=[k]a¯f_{n}([k]\otimes C\underline{a}t)=[k]\underline{a} for aPna\in P_{n}. Since each fnf_{n} is an isomorphism, ff is also an isomorphism. ∎

As special cases of this lemma, we have /d𝐏0¯(/d)Σ¯\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{0}}\cong(\mathbb{Z}/d\mathbb{Z})\underline{\Sigma}, /d𝐏1¯(/d)R¯\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{1}}\cong(\mathbb{Z}/d\mathbb{Z})\underline{R}, and /d𝐏2¯(/d)CP(R)¯\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{2}}\cong(\mathbb{Z}/d\mathbb{Z})\underline{\operatorname{CP}(R)}. Additionally, we can see each group homomorphism ~i\tilde{\partial}_{i} (i=0,1,2i=0,1,2) is a /d\mathbb{Z}/d\mathbb{Z}-linear map.

To prove Theorem 2, we show the following lemma. {lem} Let d=deg(R)d=\deg(R). If d=0d=0 or dd is prime, #Re(R)=s(H2(Σ,R))+s(im~1)\#R-e(R)=s(H_{2}(\Sigma,R))+s(\operatorname{im}\tilde{\partial}_{1}). (Recall that s(G)s(G) is the minimum number of generators of a group GG.)

Proof.

By definition, D(R)D(R) defined in Section 2 is a matrix representation of ~2\tilde{\partial}_{2}. Suppose dd is prime. In this case, s(H2(Σ,R))s(H_{2}(\Sigma,R)) is equal to the dimension of H2(Σ,R)H_{2}(\Sigma,R) as a /d\mathbb{Z}/d\mathbb{Z}-vector space. By the rank-nullity theorem, we have

dim(H2(Σ,R))\displaystyle\dim(H_{2}(\Sigma,R)) =dim(ker~1)dim(im~2)\displaystyle=\dim(\ker\tilde{\partial}_{1})-\dim(\operatorname{im}\tilde{\partial}_{2})
=dim(/d𝐏1¯)dim(im~1)dim(im~2)\displaystyle=\dim(\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{1}})-\dim(\operatorname{im}\tilde{\partial}_{1})-\dim(\operatorname{im}\tilde{\partial}_{2})
=dim((/d)R¯)dim(im~1)rank(D(R))\displaystyle=\dim((\mathbb{Z}/d\mathbb{Z})\underline{R})-\dim(\operatorname{im}\tilde{\partial}_{1})-\operatorname{rank}(D(R))
=#Rdim(im~1)e(R).\displaystyle=\#R-\dim(\operatorname{im}\tilde{\partial}_{1})-e(R).

Suppose d=0d=0. We show H2(Σ,R)#Rrk×/e1××/erH_{2}(\Sigma,R)\cong\mathbb{Z}^{\#R-r-k}\times\mathbb{Z}/e_{1}\mathbb{Z}\times\dotsb\times\mathbb{Z}/e_{r}\mathbb{Z} where r=rank(D(R))r=\operatorname{rank}(D(R)), k=s(im~1)k=s(\operatorname{im}\tilde{\partial}_{1}), and e1,,ere_{1},\dotsc,e_{r} are the elementary divisors of D(R)D(R). Let

¯1:𝐏1¯/im~2𝐏0¯\overline{\partial}_{1}:\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{1}}/\operatorname{im}\tilde{\partial}_{2}\rightarrow\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{0}}

be the group homomorphism defined by [x]~1(x)[x]\mapsto\tilde{\partial}_{1}(x). ¯1\overline{\partial}_{1} is well-defined since im~2ker~1\operatorname{im}\tilde{\partial}_{2}\subset\ker\tilde{\partial}_{1}, and ker¯1\ker\overline{\partial}_{1} is isomorphic to ker~1/im~2=H2(Σ,R)\ker\tilde{\partial}_{1}/\operatorname{im}\tilde{\partial}_{2}=H_{2}(\Sigma,R). By taking the basis v1,,v#Rv_{1},\dotsc,v_{\#R} of 𝐏1¯R¯\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{1}}\cong\mathbb{Z}\underline{R} such that D(R)D(R) is the matrix representation of ~2\tilde{\partial}_{2} under the basis v1,,v#Rv_{1},\dotsc,v_{\#R} and some basis of 𝐏2¯\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{2}}, we can see 𝐏1¯/im~2#Rr×/e1××/ek\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{1}}/\operatorname{im}\tilde{\partial}_{2}\cong\mathbb{Z}^{\#R-r}\times\mathbb{Z}/e_{1}\mathbb{Z}\times\dotsb\times\mathbb{Z}/e_{k}\mathbb{Z}. Suppose ¯1(ei[x])=0\overline{\partial}_{1}(e_{i}[x])=0 for some xx and i=1,,ri=1,\dotsc,r. Since ¯1\overline{\partial}_{1} is a homomorphism, ¯1(ei[x])=ei¯1([x])𝐏0¯Σ¯\overline{\partial}_{1}(e_{i}[x])=e_{i}\overline{\partial}_{1}([x])\in\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{0}}\cong\mathbb{Z}\underline{\Sigma} holds. Since Σ¯\mathbb{Z}\underline{\Sigma} is free, we have [x]=0[x]=0. Therefore, ker¯1\ker\overline{\partial}_{1} is included in the subset of 𝐏1¯/im~2\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbf{P}_{1}}/\operatorname{im}\tilde{\partial}_{2} isomorphic to #Rr×{0}××{0}\mathbb{Z}^{\#R-r}\times\{0\}\times\dotsb\times\{0\}. Thus, ker¯1#Rrk×/e1××/er\ker\overline{\partial}_{1}\cong\mathbb{Z}^{\#R-r-k}\times\mathbb{Z}/e_{1}\mathbb{Z}\times\dotsb\times\mathbb{Z}/e_{r}\mathbb{Z}.

Since /e0\mathbb{Z}/e\mathbb{Z}\cong 0 if ee is invertible, #Rrk×/e1××/ek#Rrk×/ee(R)+1×/er=:G\mathbb{Z}^{\#R-r-k}\times\mathbb{Z}/e_{1}\mathbb{Z}\times\dotsb\times\mathbb{Z}/e_{k}\mathbb{Z}\cong\mathbb{Z}^{\#R-r-k}\times\mathbb{Z}/e_{e(R)+1}\mathbb{Z}\times\dotsb\mathbb{Z}/e_{r}\mathbb{Z}=:G. The group GG is generated by (1,0,,0#Rrk,[0],,[0]re(R))(\underbrace{1,0,\dotsc,0}_{\#R-r-k},\underbrace{[0],\dotsc,[0]}_{r-e(R)}), \dotsc, (0,,0,1,[0],,[0])(0,\dotsc,0,1,[0],\dotsc,[0]), \dotsc, (0,,0,[1],[0],,[0])(0,\dotsc,0,[1],[0],\dotsc,[0]), \dotsc, (0,,0,[0],,[0],[1])(0,\dotsc,0,[0],\dotsc,[0],[1]), so we have s(G)#Rrk+re(R)=#Rke(R)s(G)\leq\#R-r-k+r-e(R)=\#R-k-e(R). Let pp be a prime number which divides ee(R)+1e_{e(R)+1}. We can see G/pG(/p)#Rke(R)G/pG\cong(\mathbb{Z}/p\mathbb{Z})^{\#R-k-e(R)}. It is not hard to see s(G)s(G/pG)s(G)\geq s(G/pG), and since G/pGG/pG is a /p\mathbb{Z}/p\mathbb{Z}-vector space, s(G/pG)=dim(G/pG)=#Rke(R)s(G/pG)=\dim(G/pG)=\#R-k-e(R). Thus, s(H2(Σ,R))=s(G)=#Rs(im~1)e(R)s(H_{2}(\Sigma,R))=s(G)=\#R-s(\operatorname{im}\tilde{\partial}_{1})-e(R). ∎

By Lemma 5, Theorem 2 is implied by the following theorem: {thm} Let (Σ,R)(\Sigma,R) be a TRS and d=deg(R)d=\deg(R). If d=0d=0 or dd is prime,

#Rs(H2(Σ,R))+s(im~1).\#R\geq s(H_{2}(\Sigma,R))+s(\operatorname{im}\tilde{\partial}_{1}). (5.1)
Proof.

By the first isomorphism theorem, we have an isomorphism between /d\mathbb{Z}/d\mathbb{Z}-modules

im~1/d2¯/ker~1\operatorname{im}\tilde{\partial}_{1}\simeq\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbb{P}_{2}}\delimiter 84079374\mathopen{}\ker\tilde{\partial}_{1}

and by the third isomorphism theorem, the right hand side is isomorphic to

/d2¯/ker~1\displaystyle\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbb{P}_{2}}\delimiter 84079374\mathopen{}\ker\tilde{\partial}_{1} (/d2¯/im~2)/(ker~1/im~2)\displaystyle\simeq\left(\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbb{P}_{2}}\delimiter 84079374\mathopen{}\operatorname{im}\tilde{\partial}_{2}\right)\delimiter 84079374\mathopen{}\left(\ker\tilde{\partial}_{1}\delimiter 84079374\mathopen{}\operatorname{im}\tilde{\partial}_{2}\right)
(/d2¯/im~2)/H2(Σ,R).\displaystyle\simeq\left(\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbb{P}_{2}}\delimiter 84079374\mathopen{}\operatorname{im}\tilde{\partial}_{2}\right)\delimiter 84079374\mathopen{}H_{2}(\Sigma,R).

Thus, we obtain the following exact sequence by Proposition 3.1:

0H2(Σ,R)/d2¯/im~2im~10.0\rightarrow H_{2}(\Sigma,R)\rightarrow\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbb{P}_{2}}\delimiter 84079374\mathopen{}\operatorname{im}\tilde{\partial}_{2}\rightarrow\operatorname{im}\tilde{\partial}_{1}\rightarrow 0.

By Theorem 3.1, since im~1/d1¯(/d)R¯\operatorname{im}\tilde{\partial}_{1}\subset\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbb{P}_{1}}\cong(\mathbb{Z}/d\mathbb{Z})\underline{R} and (/d)R¯(\mathbb{Z}/d\mathbb{Z})\underline{R} is a free /d\mathbb{Z}/d\mathbb{Z}-module, im~1\operatorname{im}\tilde{\partial}_{1} is also free and by Proposition 3.1, we have /d2¯/im~2H2(Σ,R)×im~1\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbb{P}_{2}}\delimiter 84079374\mathopen{}\operatorname{im}\tilde{\partial}_{2}\cong H_{2}(\Sigma,R)\times\operatorname{im}\tilde{\partial}_{1}. Therefore, s(/d2¯/im~2)=s(H2(Σ,R))+s(im~1)s(\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbb{P}_{2}}\delimiter 84079374\mathopen{}\operatorname{im}\tilde{\partial}_{2})=s(H_{2}(\Sigma,R))+s(\operatorname{im}\tilde{\partial}_{1}). Since /d2¯/im~2\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbb{P}_{2}}\delimiter 84079374\mathopen{}\operatorname{im}\tilde{\partial}_{2} is generated by [l1r1],,[lkrk][l_{1}\rightarrow r_{1}],\dots,[l_{k}\rightarrow r_{k}] if R={l1r1,,lkrk}R=\{l_{1}\rightarrow r_{1},\dots,l_{k}\rightarrow r_{k}\}, we obtain

k=#Rs(/d2¯/im~2)=s(H2(Σ,R))+s(im~1).k=\#R\geq s(\mathbb{Z}/d\mathbb{Z}\otimes_{\mathcal{R}}\mathcal{R}\underline{\mathbb{P}_{2}}\delimiter 84079374\mathopen{}\operatorname{im}\tilde{\partial}_{2})=s(H_{2}(\Sigma,R))+s(\operatorname{im}\tilde{\partial}_{1}).

Thus, we get (5.1). ∎

Now, we prove our main theorem, Theorem 2.

Proof of Theorem 2.

As we stated, H2(Σ,R)H_{2}(\Sigma,R) depends only on the Tietze equivalence class of (Σ,R)(\Sigma,R) and particularly, H2(Σ,R)H_{2}(\Sigma,R^{\prime}) is isomorphic to H2(Σ,R)H_{2}(\Sigma,R) if RR^{\prime} is equivalent to RR (in the sense R=R{\xleftrightarrow{*}_{R}}={\xleftrightarrow{*}_{R^{\prime}}}). Let us show s(im~1)s(\operatorname{im}\tilde{\partial}_{1}) depends only on the equivalence class of RR. For a left \mathfrak{R}-module MM, rank(M)\operatorname{rank}(M) denotes the cardinality of a minimal linearly independent generating set of MM, that is, a minimal generating set SS of GG such that any element s1,,skΓs_{1},\dotsc,s_{k}\in\Gamma, and r1s1++rksk=0r1==rk=0r_{1}s_{1}+\dotsb+r_{k}s_{k}=0\implies r_{1}=\dotsb=r_{k}=0 for any r1,,rkr_{1},\dotsc,r_{k}\in\mathfrak{R}, s1,,skSs_{1},\dotsc,s_{k}\in S. It can be shown that rank(M)=s(M)\operatorname{rank}(M)=s(M) if MM is free. Especially, s(im~1)=rank(im~1)s(\operatorname{im}\tilde{\partial}_{1})=\operatorname{rank}(\operatorname{im}\tilde{\partial}_{1}) since im~1R¯\operatorname{im}\tilde{\partial}_{1}\subset\mathbb{Z}\underline{R} if deg(R)=0\deg(R)=0. Also, rank(im~1)=rank(ker~0)rank(ker~0/im~1)\operatorname{rank}(\operatorname{im}\tilde{\partial}_{1})=\operatorname{rank}(\ker\tilde{\partial}_{0})-\operatorname{rank}(\ker\tilde{\partial}_{0}/\operatorname{im}\tilde{\partial}_{1}) is obtained by a general theorem [r10, Ch 10, Lemma 10.1]. By definition, ~0\tilde{\partial}_{0} does not depend on RR. Since ker~0/im~1=H1(Σ,R)\ker\tilde{\partial}_{0}/\operatorname{im}\tilde{\partial}_{1}=H_{1}(\Sigma,R) depends only on the Tietze quivalence class of RR, two sets of rules R,RR,R^{\prime} with R=R{\xleftrightarrow{*}_{R}}={\xleftrightarrow{*}_{R^{\prime}}} give the same rank(im~1)\operatorname{rank}(\operatorname{im}\tilde{\partial}_{1}).

In conclusion, for any TRS RR^{\prime} equivalent to RR, we obtain #Rs(H2(Σ,R))+s(im~1)=#Re(R)\#R^{\prime}\geq s(H_{2}(\Sigma,R))+s(\operatorname{im}\tilde{\partial}_{1})=\#R-e(R). ∎

6 Inefficient TRS

We construct and prove that there exists an inefficient TRS.

Let us consider the signature Σ={a1(1),a2(1),a3(1),b(1)}\Sigma=\{a_{1}^{(1)},a_{2}^{(1)},a_{3}^{(1)},b^{(1)}\} and the set RR of rewrite rules

ai7(x)\displaystyle a_{i}^{7}(x) x(i=1,2,3)\displaystyle\rightarrow x\quad(i=1,2,3)
ai(aj(x))\displaystyle a_{i}(a_{j}(x)) aj(ai(x))(j<i,i=2,3,j=1,2)\displaystyle\rightarrow a_{j}(a_{i}(x))\quad(j<i,i=2,3,j=1,2)
b3(x)\displaystyle b^{3}(x) x\displaystyle\rightarrow x
b(ai(x))\displaystyle b(a_{i}(x)) ai2(b(x))(i=1,2,3)\displaystyle\rightarrow a_{i}^{2}(b(x))\quad(i=1,2,3)
{defi}

Let (Σ,R)(\Sigma,R) be a TRS.

  1. 1.

    (Σ,R)(\Sigma,R) is a groupoid if for any bicontext (C,t)(C,t)

  2. 2.

    A sub-TRS of (Σ,R)(\Sigma,R) is a TRS satisfying tRst𝑅st\xleftrightarrow[R^{\prime}]{*}s\iff t\xleftrightarrow[R]{*}s for any t,sT(Σ)t,s\in T(\Sigma^{\prime}).

  3. 3.

    a subgroupoid of (Σ,R)(\Sigma,R) if (Σ,R)(\Sigma^{\prime},R^{\prime}) is a sub-TRS of (Σ,R)(\Sigma,R) and for any

Suppose A=(Σ,R)A^{\prime}=(\Sigma^{\prime},R^{\prime}) is a sub-TRS of A=(Σ,R)A=(\Sigma,R). Let [(C,t)]𝕂¯A(i,j)[(C,t)]\in\overline{\mathbb{Z}\langle\mathbb{K}\rangle}^{A}(i,j) be a coset of bicontext. We write A[(C,t)](k)A^{\prime}[(C,t)](k) for the set

{[(D,s)(C,t)](D,s)𝕂¯A(j,k)}\{[(D,s)\circ(C,t)]\mid(D,s)\in\overline{\mathbb{Z}\langle\mathbb{K}\rangle}^{A^{\prime}}(j,k)\}

and \lcosetAA(i,k)\lcoset{A^{\prime}}{A}(i,k) for

{A[(C,t)](k)(C,t)𝕂¯A(i,j),j}.\{A^{\prime}[(C,t)](k)\mid(C,t)\in\overline{\mathbb{Z}\langle\mathbb{K}\rangle}^{A}(i,j),\ j\in\mathbb{N}\}.

Note that A[(C,t)](k)A^{\prime}[(C,t)](k) and A[(D,s)](k)A^{\prime}[(D,s)](k) can be the same set for different (C,t)(C,t) and (D,s)(D,s). Therefore, even if each 𝕂¯A(i,j)\overline{\mathbb{Z}\langle\mathbb{K}\rangle}^{A}(i,j) contains infinitely many cosets of bicontext, \lcosetAA(i,k)\lcoset{A^{\prime}}{A}(i,k) can be a finite set. {defi} Suppose A=(Σ,R)A^{\prime}=(\Sigma^{\prime},R^{\prime}) is a sub-TRS of (Σ,R)(\Sigma,R). The (i,k)(i,k)-index of AA^{\prime} in AA is the cardinality of the set \lcosetAA(i,k)\lcoset{A^{\prime}}{A}(i,k), denoted by \gindexAA(i,k)\gindex{A}{A^{\prime}}(i,k). The set A[(C,t)](k)A^{\prime}[(C,t)](k) is an analog of the “right coset” in group theory and the (i,k)(i,k)-index corresponds to the index of a subgroup.

Let A=(Σ,R)A^{\prime}=(\Sigma^{\prime},R^{\prime}) be a sub-TRS of a TRS A=(Σ,R)A=(\Sigma,R), Γi,j\Gamma_{i,j} be a finite set for each i=0,1,2,ji=0,1,2,\ j\in\mathbb{N}, and Γi\Gamma_{i} be {Γi,0,Γi,1,Γi,2,}\{\Gamma_{i,0},\Gamma_{i,1},\Gamma_{i,2},\dots\}. For each a\lcosetAA(i,j)a\in\lcoset{A^{\prime}}{A}(i,j), we choose [(Ca,ta)]A(i,j)[(C_{a},t_{a})]\in\mathcal{R}^{A}(i,j) such that A[(Ca,ta)](j)=aA^{\prime}[(C_{a},t_{a})](j)=a. We define Γi,j={(a,p)a\lcosetAA(i,j),pΓi,j}\Gamma^{\prime}_{i,j}=\{(a,p)\mid a\in\lcoset{A^{\prime}}{A}(i,j),p\in\Gamma_{i,j}\} and Γi={Γi,0,Γi,1,Γi,2,}\Gamma^{\prime}_{i}=\{\Gamma^{\prime}_{i,0},\Gamma^{\prime}_{i,1},\Gamma^{\prime}_{i,2},\dots\}. Since any [(D,s)]A(i,j)[(D,s)]\in\mathcal{R}^{A}(i,j) is equal to [(D,s)(Ca,ta)][(D^{\prime},s^{\prime})\circ(C_{a},t_{a})] for a unique a\lcosetAA(i,j)a\in\lcoset{A^{\prime}}{A}(i,j), the following A\mathcal{R}^{A^{\prime}}-linear map AΓi¯AΓi¯\mathcal{R}^{A}\underline{\Gamma_{i}}\rightarrow\mathcal{R}^{A^{\prime}}\underline{\Gamma^{\prime}_{i}} is well-defined:

ϕi([(D,s)]p¯)=[(D,s)]([(Ca,ta)],p)¯([(D,s)]=[(D,s)(Ca,ta)]).\phi_{i}([(D,s)]\underline{p})=[(D^{\prime},s^{\prime})]\underline{([(C_{a},t_{a})],p)}\quad([(D,s)]=[(D^{\prime},s^{\prime})\circ(C_{a},t_{a})]).

We can check ϕi\phi_{i} has its inverse

ϕi1([(D,s)]([(Ca,ta)])¯)=[(D,s)(Ca,ta)]p¯=[(D,s)]p¯.\phi_{i}^{-1}([(D^{\prime},s^{\prime})]\underline{([(C_{a},t_{a})])})=[(D^{\prime},s^{\prime})\circ(C_{a},t_{a})]\underline{p}=[(D,s)]\underline{p}.
{prop}

In the setting of the above paragraph, if the sequence of free left A\mathcal{R}^{A}-modules

AΓ2¯2AΓ1¯1AΓ0¯ϵ𝒵0\mathcal{R}^{A}\underline{\Gamma_{2}}\xrightarrow{\partial_{2}}\mathcal{R}^{A}\underline{\Gamma_{1}}\xrightarrow{\partial_{1}}\mathcal{R}^{A}\underline{\Gamma_{0}}\xrightarrow{\epsilon}\mathcal{Z}\rightarrow 0

is exact, then

AΓ2¯2AΓ1¯1AΓ0¯ϵ𝒵0\mathcal{R}^{A^{\prime}}\underline{\Gamma^{\prime}_{2}}\xrightarrow{\partial^{\prime}_{2}}\mathcal{R}^{A^{\prime}}\underline{\Gamma^{\prime}_{1}}\xrightarrow{\partial^{\prime}_{1}}\mathcal{R}^{A^{\prime}}\underline{\Gamma^{\prime}_{0}}\xrightarrow{\epsilon^{\prime}}\mathcal{Z}\rightarrow 0

is also exact where i=ϕiiϕi1\partial^{\prime}_{i}=\phi_{i}\circ\partial_{i}\circ\phi_{i}^{-1} for i=1,2i=1,2 and ϵi=ϕiϵiϕi1\epsilon^{\prime}_{i}=\phi_{i}\circ\epsilon_{i}\circ\phi_{i}^{-1}.

Proof.

By definition, 12=0\partial_{1}^{\prime}\circ\partial_{2}^{\prime}=0, ϵ1=0\epsilon^{\prime}\circ\partial^{\prime}_{1}=0 follows from 12=0\partial_{1}\circ\partial_{2}=0, ϵ1=0\epsilon\circ\partial_{1}=0. If [(D,s)](a,p)¯)ker1[(D,s)]\underline{(a,p)})\in\ker\partial^{\prime}_{1}, then 1([(D,s)](a,p)¯)=ϕ11([(D,s)(Ca,ta)]p¯)=0\partial^{\prime}_{1}([(D,s)]\underline{(a,p)})=\phi_{1}\circ\partial_{1}([(D,s)\circ(C_{a},t_{a})]\underline{p})=0, so we have 1([(D,s)(Ca,ta)]p¯)=0\partial_{1}([(D,s)\circ(C_{a},t_{a})]\underline{p})=0, or equivalently, [(D,s)(Ca,ta)]p¯ker1[(D,s)\circ(C_{a},t_{a})]\underline{p}\in\ker\partial_{1}. Therefore [(D,s)(Ca,ta)]p¯im2[(D,s)\circ(C_{a},t_{a})]\underline{p}\in\operatorname{im}\partial_{2}, \ie, there exists [(E,u)]q¯AΓ2¯[(E,u)]\underline{q}\in\mathcal{R}^{A}\underline{\Gamma_{2}} such that 2([(E,u)]q¯)=[(D,s)][(Ca,ta)]p¯\partial_{2}([(E,u)]\underline{q})=[(D,s)]\circ[(C_{a},t_{a})]\underline{p}.

{defi}

Let (Σ,R)(\Sigma,R) be a TRS. Suppose FF_{\bullet} is a partial resolution

F2F1F0𝒵0F_{2}\rightarrow F_{1}\rightarrow F_{0}\rightarrow\mathcal{Z}\rightarrow 0

of \mathcal{R} over \mathcal{R}.

μ(F)=f2f1+f0\mu(F_{\bullet})=f_{2}-f_{1}+f_{0}

Appendix A The matrix D(R)D(R) for The Theory of Groups