On uniformly continuous functions for some profinite topologies ∗
Dedicated to Antonio Restivo for his 70th birthday
Jean-´ Eric Pin
2, Pedro V. Silva
3June 28, 2016
Abstract
Given a variety of finite monoidsV, a subset of a monoid is aV-subset if its syntactic monoid belongs toV. A function between two monoids is V-preserving if it preservesV-subsets under preimages and it is hereditary V-preserving if it isW-preserving for every subvarietyWofV. The aim of this paper is to study hereditaryV-preserving functions whenVis one of the following varieties of finite monoids: groups,p-groups, aperiodic monoids, commutative monoids and all monoids.
1 Introduction
This article is a follow-up of [12], where the authors started the study of V- preserving functions. Let us first remind the definition. Let M be a monoid and letV be a variety of finite monoids. A recognizable subsetS ofM is said to be aV-subset if its syntactic monoid belongs toV. A function f :M →N is called V-preserving if, for each V-subset of N, f−1(L) is a V-subset of M. A function ishereditaryV-preserving if it isW-preserving for every subvariety WofV.
Let us first consider the case where f is a function from A∗ to B∗, where A and B are finite alphabets. If V is the variety M of all finite monoids, a V-preserving function is also called regularity-preserving, according to the terminology used in [5, 16, 18]. The characterization of regularity-preserving functions is a long-term objective, but in spite of intensive research (see [10]
for a detailed bibliography), it it is still out of reach. For the variety Gp of finitep-groups, the situation is more advanced. Indeed, the authors gave in [13]
a characterization of Gp-preserving functions whenB is a one-letter alphabet
1The first author received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 670624). The second author was partially supported by CMUP (UID/MAT/00144/2013), which is funded by FCT (Portugal) with national (MEC) and European structural funds through the programs FEDER, under the partnership agreement PT2020.
2IRIF, Universit´e Paris-Diderot and CNRS, Case 7014, 75205 Paris Cedex 13, France.
3Centro de Matem´atica, Faculdade de Ciˆencias, Universidade do Porto, R. Campo Alegre 687, 4169-007 Porto, Portugal.
and a preliminary step towards a general solution can be found in [10]. For the varietyGof finite groups and for the variety Aof finite aperiodic monoids, the only known contribution to the study ofV-preserving functions seems to be the article of Reutenauer and Sch¨utzenberger on rational functions [14].
This paper focuses on hereditaryV-preserving functions whenV is one of the varieties M,G,Gp and A. We consider functions from a free monoid or a free commutative monoid toN and, in the case of the varietiesGand Gp, we also study functions from A∗ to Z or from Zk to Z. The case of a one-letter alphabet was also discussed in [3]. Our results are summarized in the table below.
V Gp G A M
A∗→Z Theorem 3.19 Theorem4.3 Open Open
Zk →Z Theorem3.5 Theorem4.1 Irrelevant Corollary 7.5 Nk→Z Theorem 3.12 Theorem4.2 Irrelevant Open Nk →N Theorem 3.12 Theorem4.2 Theorem5.4 Theorem7.2
Characterization of hereditary V-preserving functions.
2 Preliminaries
In this section, we review the basic notions used in this paper.
2.1 Varieties
A variety of finite monoids is a class of finite monoids closed under taking submonoids, quotients and finite direct products. In the sequel, we shall use freely the termvariety instead ofvariety of finite monoids.
We denote by M (respectively Com, G, Ab, A) the variety of all finite monoids (respectively finite commutative monoids, finite groups, finite abelian groups, finite aperiodic monoids). Given a prime number p, we denote byGp
the variety of all finite p-groups and by Abp the variety of all finite abelian p-groups. Each finite monoidM generates a variety, denoted by (M). The join of a family of varieties (Vi)i∈I is the least variety containing all the varieties Vi, fori∈I.
Forn >0,Cn denotes the cyclic group of ordern. Throughout the paper, we shall use the well-known structure theorem for finite abelian groups [15], which shows thatAbis the variety generated by the finite cyclic groups.
Proposition 2.1 Every finite abelian group is isomorphic to a direct product of finite cyclic groups.
2.2 Ultrametrics and pseudo-ultrametrics
A pseudo-ultrametric on a set X is a function d: X ×X → Rsatisfying the following properties, for allx, y, z∈X:
(P1) d(x, y)>0,
(P2) d(x, x) = 0, (P3) d(x, y) =d(y, x),
(P4) d(x, z)6max{d(x, y), d(y, z)}.
An ultrametricsatisfies a stronger version of(P2):
(P5) d(x, y) = 0 if and only ifx=y.
2.3 Uniformly continuous functions
Given two pseudometric spaces (X1, d1) and (X2, d2), a functionf :X1→X2is uniformly continuous if, for every positive real numberεthere exists a positive real numberδ >0 such that for all (x, y)∈X2,
d1(x, y)< δ impliesd2(f(x), f(y))< ε. (2.1) It follows in particular that if d1(x, y) = 0, thend2(f(x), f(y)) = 0. Moreover this condition is sufficient if 0 is an isolated point in the range ofd1andd2. We shall only need a weaker version of this result.
Proposition 2.2 If d1 and d2 have finite range, a function f : (X1, d1) → (X2, d2)is uniformly continuous if and only if
d1(x, y) = 0impliesd2(f(x), f(y)) = 0. (2.2) Proof. Sinced2has finite range, there exists a positive real numberεsuch that d2(u, v) < ε implies d2(u, v) = 0. If f is uniformly continuous, there exists δ such that d1(x, y) < δ implies d2(f(x), f(y)) < ε. By the choice of ε, this actually impliesd2(f(x), f(y)) = 0 and thus (2.2) holds.
Since d1 has finite range, there exists a positive real number δ such that d1(u, v) < δ implies d1(u, v) = 0. Suppose that (2.2) holds and let ε be a positive integer. Ifd1(u, v)< δ thend1(u, v) = 0 and by (2.2),d2(f(x), f(y)) = 0. It follows in particular that d2(f(x), f(y)) < ε and thus f is uniformly continuous.
Nonexpansive functions form an interesting subclass of the class of uniformly continuous functions. A functionf : (X1, d1)→(X2, d2) isnonexpansive if, for all (x, y)∈X1×X1,
d2(f(x), f(y))6d1(x, y) We shall use nonexpansive functions in Section 3.
2.4 Pro-V metrics
For the remainder of this section, letV denote a variety of finite monoids. Let M be a monoid and let u, v ∈ M. We say that a monoid N separates u and v if there exists a monoid morphism ϕ : M → N such that ϕ(u) 6= ϕ(v). A monoid M is residually V if any two distinct elements ofM can be separated by a monoid inV.
We shall use the conventions min∅=∞and 2−∞ = 0. For allu, v∈M, let rV(u, v) = minn
|N| N is inV and separatesuandvo
and dV(u, v) = 2−rV(u,v). Then dV is a pseudo-ultrametric, called the pro-V metric onM (see [12]). If the monoid is residuallyV, thendVis an ultrametric.
In this paper, we consider free monoids, free commutative monoids and free abelian groups of finite rank: they are all finitely generated and residuallyVfor the main varieties considered in this paper: monoids, (abelian) groups, abelian p-groups, (commutative) aperiodic monoids.
2.5 V-uniform continuity and V-hereditary continuity
Let M and N be monoids. A function f :M →N is said to be V-uniformly continuous if it is uniformly continuous for the pro-V pseudometric onM and N. The following result was proved in [12, Theorem 4.1].
Proposition 2.3 A function f : M → N is V-preserving if and only if it is V-uniformly continuous.
We say thatf is V-hereditarily continuous if it is W-uniformly continuous for each subvariety W of V. Closure properties of this notion under various operators are analysed in [12, Subsection 4.3].
A monoid N is called V-projective if the following property holds: if α : N →Ris a morphism and ifβ :T →Ris a surjective morphism, whereT (and henceR) is a monoid ofV, then there exists a morphismγ:N →T such that α=β◦γ.
N
R T
α γ
β
For example, any free monoid (in particularN) isV-projective for every variety of finite monoids. Similarly, any free group (in particularZ) is V-projective for every variety of finite groups. Note that aV-projective monoid isW-projective for every subvarietyWofV.
The following results were proved in [12]:
Proposition 2.4 [12, Proposition 5.7] Let V be the join of a family (Vi)i∈I
of varieties of finite commutative monoids. A function from a monoid to aV- projective monoid isV-hereditarily continuous if and only if it isVi-hereditarily continuous for all i∈I.
Proposition 2.5 [12, Proposition 5.4] A function from a monoid to a com- mutative monoid is V-hereditarily continuous if and only if it is (V∩Com)- hereditarily continuous.
In constrast, note that aV-uniformly continuous function from a monoid to a commutative monoid is not necessarily (V∩Com)-hereditarily continuous.
For instance, the functionffrom{a, b}∗toNdefined byf(ab) = 1 andf(u) = 0 ifu6=ab isM-uniformly continuous but is notCom-uniformly continuous.
2.6 p-adic valuations
Letpbe a prime number. If nis a non-zero integer, the p-adic valuation of n is the integer
vp(n) = max
k∈N|pk dividesn
By convention, vp(0) = +∞. Note that the equality vp(nm) =vp(n) +vp(m) holds for all integersn,m.
Thep-adic norm ofnis the real number
|n|p=p−vp(n).
Thep-adic norm satisfies the following properties, for alln, m∈Z: (N1) |n|p>0,
(N2) |n|p= 0 if and only if n= 0, (N3) |mn|p=|m|p|n|p,
(N4) |m+n|p6max{|m|p,|n|p}.
The p-adic valuation and the p-adic norm can be extended to Zk as follows.
Givenn= (n1, . . . , nk)∈Zk, we set vp(n) = min
16j6k{vp(nj)} and |n|p=p−vp(n)= max
16j6k{|nj|p}.
Thep-adic norm onZkstill satisfies(N1),(N2)and(N4), as well as the following weaker version of(N3):
(N5) for alln, m∈Zk,|mn|p 6|m|p|n|p.
The p-adic norm on Zk induces the p-adic ultrametric dp on Zk, defined by dp(u, v) = |u−v|p. Note that the pro-Abp metric dAbp and dp are strongly equivalent metrics.
2.7 Binomial coefficients
LetAbe a finite alphabet. We denote by A∗ the free monoid onA. Note that if|A|= 1, thenA∗ is isomorphic to the additive monoidN.
Letuandvbe two words ofA∗. Letu=a1· · ·an, witha1, . . . , an∈A. Then uis asubword ofv if there existv0, . . . , vn ∈A∗ such thatv=v0a1v1· · ·anvn. Set
v u
=|{(v0, . . . , vn)|v=v0a1v1· · ·anvn}|. Note that if A = {a}, u =an and v = am, then vu
= mn
and hence these numbers constitute a generalization of the classical binomial coefficients. See [7, Chapter 6] for more details. Sometimes, it will be useful to use the convention
m n
= 0 form>0 andn∈Z\ {0, . . . , m}, which is compatible with the usual properties of binomial coefficients.
2.8 Mahler expansions
For a fixed v ∈ A∗, we can view the generalized binomial coefficient v as a function fromA∗ toN. The functions
v
|v∈A∗ constitute a locally finite family of functions in the sense that, for eachu∈A∗, the image ofuis 0 for all but finitely many elements of the family.
It is clear that the sum of a locally finite family of functions is well defined.
In particular, if (gv)v∈A∗ is a family of elements of an abelian groupG, then there is a well-defined function f from A∗ into G defined by the formula (in additive notation)
f(u) = X
v∈A∗
gv u v
The generalized binomial coefficients provide a unique decomposition of the functions fromA∗ intoG, which will be referred asMahler expansion:
Proposition 2.6 (Lothaire [7]) Let Gbe an abelian group and let f :A∗ → G be an arbitrary function. Then there exists a unique family hf, viv∈A∗ of elements ofGsuch that, for allu∈A∗,f(u) =P
v∈A∗hf, vi uv
. This family is given by the inversion formula
hf, vi= X
w∈A∗
(−1)|v|+|w| wv
f(w) (2.3)
A similar result holds for functions from Nk to an abelian group G. If ris an element ofNk (or more generally ofZk), we denote byri itsi-th component, so that r= (r1, . . . , rk). First observe that the family
n
r1
· · · r
k
|r∈Nko
is a locally finite family of functions from Nk into N. Thus, given a family (gr)r∈Nk, the formula
f(n) = X
r∈Nk
gr n1 r1
· · · nrk
k
defines a function f :Nk →G. Conversely, each function fromNk to Gadmits a uniqueMahler expansion, a result proved in a more general setting in [2, 1].
Proposition 2.7 LetGbe an abelian group and letf :Nk →Gbe an arbitrary function. Then there exists a unique family hf, rir∈Nk of elements of G such that, for all n∈Nk,
f(n) = X
r∈Nk
hf, ri nr1
1
· · · nrk
k
.
The coefficients hf, riare given by hf, ri=
r1
X
i1=0
. . .
rk
X
ik=0
(−1)r1+...+rk+i1+...+ik ri1
1
· · · rik
k
f(i).
3 G
p-hereditary continuity
Letpbe a prime number. We proved in [11,13] thatGp-uniformly continuous functions from A∗ to Z can be characterized by properties of their Mahler ex- pansions. The case whereAis a one-letter alphabet corresponds to the classical Mahler’s Theorem fromp-adic number theory [8,9].
Theorem 3.1 Letf :A∗→Z be a function and letf(u) =P
v∈A∗hf, vi uv be its Mahler expansion. Then the following conditions are equivalent:
(1) f isGp-uniformly continuous;
(2) lim|v|→∞|hf, vi|p= 0.
A similar result (Amice, [2]) holds whenA∗ is replaced byZk (see also [13, Corollary 6.3] for an alternative proof). In this section, we obtain analogous results for Gp-hereditary continuity. A first step is to reduce Gp-hereditary continuity to a simpler property.
Lemma 3.2 A function from a monoid to aGp-projective commutative monoid isGp-hereditarily continuous if and only if it is(Cpn)-uniformly continuous for all n >0.
Proof. By Proposition 2.5,f isGp-hereditarily continuous if and only if it is (Gp∩Com)-hereditarily continuous. Since
Gp∩Com=Gp∩Ab=Abp= _
n>0
(Cpn)
by Proposition2.1, Proposition2.4implies thatf isGp-hereditarily continuous if and only if f is (Cpn)-hereditarily continuous for every n ∈ N. Since the only subvarieties of (Cpn) are those of the form (Cpi) with i 6 n, the lemma follows.
LetVbe a variety of groups. Since any morphism fromNk to a finite group extends uniquely to a morphism fromZkto that same group, the pro-Vpseudo- metric onNk is the restriction of the pro-Vpseudo-metric onZk. Therefore the forthcoming results hold forNk even though they are stated and proved forZk. We denote bye1, . . . , ek the canonical generators of bothNk andZk. Thus ej = (0, . . . ,0,1,0, . . . ,0) where the 1 occurs in positionj.
Lemma 3.3 Let n ∈N and let dbe the pro-(Cpn) pseudo-metric on Zk. For r, s∈Zk, one hasd(r, s) = 2−pm where
m= min
i6n|there existsj∈ {1, . . . , k}such that rj6≡sjmodpi . Proof. Suppose thatrj 6≡sj (modpi) for somei6nandj ∈ {1, . . . , k}. Let f :Zk →Cpi be defined by f(n) =nj. Clearly, Cpi ∈(Cpn) andf separates r ands, henced(r, s)>2−pi and sod(r, s)>2−pm. Note that this last inequality holds trivially if m=∞.
Ifd(r, s) = 0, equality follows. Otherwise, we may assume thatf :Zk →G∈ (Cpn) is a morphism that separatesrandswith|G|minimum. By Proposition 2.1, G is a direct product of cyclic groups. Since their order must divide |G|
which is a power ofp, each one of these factor groups is of the formCpi. Since any group in (Cpn) must satisfy the identityxpn= 1, we conclude thati6nin each case. IfGwere a nontrivial direct product, we could decomposef into its components and contradict the minimality ofG, thusG=Cpi withi6n.
Suppose thatrj≡sj (mod pi) for everyj∈ {1, . . . , k}. Thenrj=sj inCpi for every j and so
f(r) =
k
X
j=1
rjf(ej) =
k
X
j=1
sjf(ej) =f(s),
a contradiction. Thusrj 6≡sj (modpi) for somej ∈ {1, . . . , k} and soi>m.
It follows that d(r, s) = 2−pi 62−pm and sod(r, s) = 2−pm as required.
The next corollary shows how the pro-(Cpn) pseudo-metric relates to the p-adic norm:
Corollary 3.4 Let n∈Nand letddenote the pro-(Cpn)pseudo-metric onZk. For allr, s∈Zk, we have
d(r, s) =
(2−|r−s|p p if |r−s|p> p−n
0 otherwise.
Proof. Let m= min
i6n| existsj ∈ {1, . . . , k} such thatrj 6≡sjmodpi . It is easy to check that
m=
(vp(r−s) + 1 ifvp(r−s)< n
∞ otherwise.
Clearly,vp(r−s)< nif and only if|r−s|p> p−n. In this case, pm=pvp(r−s)+1= p
|r−s|p
and the claim follows from Lemma 3.3.
We arrive to our characterization ofGp-hereditarily continuous functions.
Theorem 3.5 A function from Zk to Z is Gp-hereditarily continuous if and only if it is nonexpansive for the p-adic norm.
Proof. Letdndenote the pro-(Cpn) pseudo-metric. By Lemma3.2,f is hered- itarily Gp-uniformly continuous if and only if, for all n > 0, it is uniformly continuous fordn. By Proposition2.2, this holds if and only if, for allr, s∈Zk, dn(r, s) = 0 impliesdn(f(r), f(s)) = 0. (3.4) By Corollary3.4,dn(r, s) = 0 if and only if|r−s|p6p−n, thus (3.4) is equivalent to stating that for allr, s∈Zk,
|r−s|p6p−n implies|f(r)−f(s)|p6p−n. (3.5) Clearly, (3.5) holds for every n if and only if |f(r)−f(s)|p 6 |r−s|p, which proves the result.
It follows easily from Theorem3.5that all polynomial functions fromZk to Z areGp-hereditarily continuous. We shall use the Mahler expansion of func- tions given by Proposition2.7to characterize all theGp-hereditarily continuous functions from Nk to Z. Polynomial functions will appear then as the finitely generated case. We shall need a few lemmas:
Lemma 3.6 The sum of a locally finite family of Gp-hereditarily continuous functions fromNk toZisGp-hereditarily continuous.
Proof. Let {fi :Nk →Z| i∈I} be a locally finite family of Gp-hereditarily continuous functions and let f =P
i∈Ifi. By Theorem 3.5, eachfi is nonex- pansive for the p-adic norm, and since the p-adic norm satisfies(N4),f is also nonexpansive.
The following result is due to Kummer [6]. See also [17,4].
Proposition 3.7 Let n, r ∈N with 0 6r 6n. Then vp n r
is equal to the number of carries it takes to addr andn−rin base p.
Takingn=psyields the following corollary Lemma 3.8 Letr, s∈Nwith0< r6ps. Thenvp
ps r
=s−vp(r).
We also need a result stated in [3, Lemma 2.8], for which we give a shorter proof.
Lemma 3.9 Letn, r, s∈N. Then ps divides( lcm
16j6rj) n+pr s
− nr
(3.6) or equivalently,
s6 max
16j6rvp(j) +νp n+ps r
− nr
. (3.7)
Proof. Since n+pr s
− nr
=Pr j=1
ps j
n r−j
, one gets by Lemma3.8the relation
n+ps r
− n
r
p
6 max
16j6r
ps j
p
n r−j
p
6 max
16j6r
ps j
p
= max
16j6rpvp(j)−s
or equivalently, vp
n+ps r
− n
r
> min
16j6r(s−vp(j)) =s− max
16j6rvp(j) which gives (3.7).
We shall need two elementary results on nonexpansive functions.
Lemma 3.10 Let f :N →Z be a nonexpansive function for the p-adic norm and lets∈N. Then for06i6ps,psdivides pis
(f(i)−f(0)), or equivalently, s6vp
ps i
+vp(f(i)−f(0)).
Proof. Since f is nonexpansive, one has |f(i)−f(0)|p 6 |i−0|p and thus vp(f(i)−f(0))>vp(i). Sincevp
ps i
=s−vp(i) by Lemma3.8, the relation s6vp
ps i
+vp(f(i)−f(0)) follows immediately.
Corollary 3.11 Letf :N→Zbe a nonexpansive function for thep-adic norm and lets∈N. Then ps divides Pps
i=0(−1)i pis f(i).
Proof. Newton’s binomial formula yields 0 = (1−1)ps =
ps
X
i=0
(−1)i ps
i
, hence
ps
X
i=0
(−1)i ps
i
f(i) =
ps
X
i=0
(−1)i ps
i
(f(i)−f(0)).
The result now follows from Lemma3.10.
Theorem 3.12 Let f(n) = P
r∈Nkhf, ri nr1
1
· · · nrk
k
be the Mahler expansion of a function f :Nk→Z. Then the following conditions are equivalent:
(1) f isGp-hereditarily continuous,
(2) vp(j)6vp(hf, ri)holds for allj, r such that16j 6max{r1, . . . , rk}.
Proof. (1)⇒(2). For allr, t∈Nk, let us set mr(t) =
r1
X
i1=0
. . .
rk
X
ik=0
(−1)r1+...+rk+i1+...+ik ri1
1
· · · rik
k
f(i+t).
By Proposition2.7, we havemr(0, . . . ,0) =hf, ri. We next show that mint∈Nk{vp(mr(t))}6min
t∈Nk{vp(mr+s(t))} (3.8) for all r, s ∈Nk. By transitivity, we may assume thats1+. . .+sk = 1. By symmetry, we may assume thats= (1,0, . . . ,0). Letℓ= mint∈Nk{vp(mr(t))}.
For allt∈Nk, we have mr+s(t) =
r1+1
X
i1=0 r2
X
i2=0
. . .
rk
X
ik=0
(−1)1+r1+...+rk+i1+...+ik 1+ri 1
1
r2 i2
· · · rik
k
f(i+t)
=
r1
X
i1=0 r2
X
i2=0
. . .
rk
X
ik=0
(−1)1+r1+...+rk+i1+...+ik ri1
1
r2
i2
· · · rikk f(i+t)
+
r1+1
X
i1=1 r2
X
i2=0
. . .
rk
X
ik=0
(−1)1+r1+...+rk+i1+...+ik ir1
1−1
r2
i2
· · · rik
k
f(i+t)
=−
r1
X
i1=0 r2
X
i2=0
. . .
rk
X
ik=0
(−1)r1+...+rk+i1+...+ik ri1
1
r2 i2
· · · rik
k
f(i+t)
+
r1
X
i1=0 r2
X
i2=0
. . .
rk
X
ik=0
(−1)r1+...+rk+i1+...+ik ri1
1
r2
i2
· · · rikk
f(i+t+s)
=−mr(t) +mr(t+s).
Since pℓ | mr(t) and pℓ | mr(t+s), it follows that pℓ | mr+s(t) and so (3.8) holds.
Now we show that
s6vp mpsej(t)
(3.9) for alls∈N,t∈Nk andj= 1, . . . , k.
By symmetry, we may assume thatj= 1, so that (3.9) becomes ps|
ps
X
i=0
(−1)ps+i pis
f(i+t1, t2, . . . , tk). (3.10) Fixt∈Nk and letg:N→Zbe the function defined by
g(n) =f(n+t1, t2, . . . , tk).
By Theorem 3.5, g is Gp-hereditarily continuous and thus (3.10) follows from Corollary3.11. Therefore (3.10) holds and so does (3.9).
We now show that
16j6max{r1, . . . , rk} ⇒vp(j)6vp(mr(t)) (3.11) holds for allj∈Nandr, t∈Nk.
We use induction onq=r1+. . .+rk. The claim holds trivially for q= 0, hence we assume that q > 0 and (3.11) holds for smaller values of q. By symmetry, we may assume thatr1>0.
Assume first that 16j 6max{r1−1, . . . , rk}. By the induction hypothesis onq, we havevp(j)6vp(mr1−1,r2,...,rk(t)) for allt∈Nk. Thusvp(j)6vp(mr(t)) by (3.8).
The remaining case corresponds toj=r1>max{r1−1, . . . , rk}. Ifjis not a power ofp, then we may writej=j1j2withj1< jandvp(j1) =vp(j), falling into the previous case. Thus we may assume that j =pi for somei ∈N. By (3.9), we have i6vp mpi,0,...,0(t)
for all t∈Nk. Sincer1 =j =pi, it follows from (3.8) that vp(j) =i6vp(mr(t)) and (3.11) holds.
Considering now the particular caset= 0, we obtain Condition (2).
(2)⇒(1). By Lemma3.6, it is enough to show that the function g(n) =hf, ri nr1
1
· · · nrk
k
isGp-hereditarily continuous for a fixedr∈Nk. Writem=hf, ri. Letx, y ∈Nk and assume thatps|x−y. By Theorem 3.5, it suffices to show that
ps|m xr1
1
· · · xrk
k
− yr1
1
· · · yrk
k
. (3.12)
We have ps | x−y if and only y =x+psz for somez ∈ Zk. Clearly, we can obtainy fromxby successively adding or subtractingpsei(i= 1, . . . , k). Since ps | ℓ and ps | ℓ′ together imply ps | ℓ−ℓ′, we may assume without loss of generality that x= y+psei. By symmetry, we may also assume that i = 1.
Therefore (3.12) will follow from
ps|m y1r+ps
1
− yr1
1
. (3.13)
By condition (2), we havevp(j)6vp(m) if 16j6r1, hence Lemma3.9yields s6 max
16j6r1vp(j) +νp y1+ps r1
− yr1
1
6vp(m) +νp y1+ps r1
− yr1
1
and (3.13) holds as required.
It followed from Theorem 3.5 that all polynomial functions f : Nk → Z with integer coefficients are Gp-hereditarily continuous. There are of course only countably many such functions. Theorem 3.12 implies the existence of uncountably manyGp-hereditarily continuous functions:
Corollary 3.13 There are uncountably manyGp-hereditarily continuous func- tionsf :Nk →Z.
Proof. For everyr∈Nk, let
ℓr= max{vp(j)|16j6max{r1, . . . , rk}}.
By Theorem3.12and Proposition 2.7, the map (nr)r∈Nk7→ X
r∈Nk
pℓrnr r
1
· · · r
k
is a bijection between Z(Nk)and the set of allGp-hereditarily continuous func- tions fromNk to Z.
We now consider functions from a free monoidA∗ to Z. Let h:A∗ →NA be the canonical morphism defined by h(u) = (|u|a)a∈A, where|u|a denotes as usual the number of occurrences of the letterainu. Let∼be thecommutative equivalence, formally defined by u∼v if and only ifh(u) =h(v).
Lemma 3.14 Let f :A∗→Zbe aGp-hereditarily continuous function and let u, v∈A∗ be commutatively equivalent. Thenf(u) =f(v).
Proof. Let us choosessuch thatps>|f(u)−f(v)|and letd(respectivelyd′) be the pro-(Cps) pseudo-metric onA∗ (respectivelyZ). Since f is hereditarilyGp- uniformly continuous, it is in particular (Cps)-uniformly continuous. Now, ifu andvare commutatively equivalent, thend(x, y) = 0 and henced′(f(x), f(y)) = 0, which means that f(x)≡f(y) modps. Since ps>|f(u)−f(v)|, this finally implies thatf(u) =f(v).
Lemma 3.15 Let u ∈ A∗ and r = (ra)a∈A ∈ NA. Then P
v∈h−1(r) u v
= Q
a∈A
|u|a ra
.
Proof. LetZhAibe the ring of polynomials in noncommutative variables inA with integer coefficients. The monoid morphismµfromA∗to the multiplicative monoid ZhAi defined, for each letter a ∈ A, by µ(a) = 1 +a, is called the Magnus transformation. By [7, Proposition 6.3.6], the following formula holds for allu∈A∗:
µ(u) = X
v∈A∗
u v
v (3.14)
LetZ[A] be the ring of polynomials in commutative variables inAwith integer coefficients. The commutative version of the Magnus transformation is the monoid morphism µ from A∗ to the multiplicative monoid Z[A] defined, for
each lettera∈A, by µ(a) = 1 +a. Thus by definition, one has, for each word v∈A∗,
µ(u) = Y
a∈A
(1+a)|u|a= Y
a∈A
X
06ra6|u|a
|u|a ra
ara
= X
06ra6|u|a
Y
a∈A
|u|a ra
! Y
a∈A
ara (3.15) and on the other hand, (3.14) shows that
µ(u) = X
v∈A∗
u v
Y
a∈A
a|v|a = X
r∈NA
X
v∈h−1(r)
u v
Y
a∈A
ara (3.16)
Comparing (3.15) and (3.16) now gives the formulaP
v∈h−1(r) u v
=Q
a∈A
|u|a ra
. Lemma 3.16 Let f : A∗ → G be a function from A∗ to some abelian group with Mahler expansionf( ) =P
w∈A∗hf, wi w
. Then the following conditions are equivalent:
(1) for any two commutatively equivalent words uandv,hf, ui=hf, vi, (2) for any two commutatively equivalent words uandv,f(u) =f(v).
Proof. (1) implies (2). Suppose that (2) holds. For each r∈Nk, lethk, ribe the common value of hf, vifor all v ∈ h−1(r). With the help of Lemma 3.15, we now obtain
f(u) = X
v∈A∗
hf, vi u
v
= X
r∈Nk
X
v∈h−1(r)
hk, ri u
v
= X
r∈Nk
hk, ri X
v∈h−1(r)
u v
= X
r∈Nk
hk, riY
a∈A
|u|a ra
It follows immediately that ifuandvare commutatively equivalent, thenf(u) = f(v).
(2) implies (1). Let g : A∗ → G be the function defined by g(u) = (−1)|u|hf, ui. It follows from the inversion formula (2.3) thathg, xi= (−1)|x|f(x).
Thus if (2) holds, then for any two commutatively equivalent words u and v, hg, ui = hg, vi. By the first part of the proof applied to g, it follows that g(u) =g(v) and thushf, ui=hf, vi.
Lemma 3.17 Let g : Nk → Z be a function and let V be a variety of finite groups. Theng isV-hereditarily continuous if and only ifg◦hisV-hereditarily continuous.
Proof. By Proposition2.5,gorg◦hareV-hereditarily continuous if and only if they are (V∩Ab)-hereditarily continuous. LetWbe a subvariety ofV∩Ab and letddenote the pro-Wpseudo-metric. Sincehis surjective, every element of Nk can be written in the form h(u) for some u ∈ A∗. Therefore g is W- uniformly continuous if and only if for all ε >0, there exists δ >0 such that, for allu, v∈A∗,
d(h(u), h(v))< δ impliesd(g◦h(u), g◦h(v))< ε (3.17)
Since any morphism fromA∗ to an abelian group factors through Nk, one has d(u, v) =d(h(u), h(v)) for allu, v∈A∗. Therefore (3.18) can be rewritten as
d(u, v)< δ impliesd(g◦h(u), g◦h(v))< ε (3.18) and thus g is W-uniformly continuous if and only if g◦ h is W-uniformly continuous.
Lemma 3.18 Let g:Nk→Z be a function and let g(n) = X
r∈Nk
hg, ri nr1
1
· · · nrk
k
andg◦h(u) = X
v∈A∗
hg◦h, vi uv
be the Mahler expansions of g and g◦h. Then hg, ri= hg◦h, ar11· · ·arkki for every r∈Nk.
Proof. We have
g(n) =g◦h(an11· · ·ankk) = X
v∈A∗
hg◦h, vi an11···av nkk
= X
v∈a∗1···a∗k
hg◦h, vi an11···av nkk
=
n1
X
r1=0
. . .
nk
X
rk=0
hg◦h, ar11· · ·arkki nr1
1
· · · nrk
k
.
By the uniqueness of the Mahler expansion in Proposition2.7, we conclude that hg, ri=hg◦h, ar11· · ·arkkifor everyr∈Nk.
Theorem 3.19 Let f :A∗ → Zbe a function and let f(u) =P
v∈A∗hf, vi uv be its Mahler expansion. Thenf isGp-hereditarily continuous if and only if it satisfies the following conditions:
(1) for any two commutatively equivalent words uandv,hf, ui=hf, vi, (2) vp(j)6vp(hf, vi)holds for all v∈A∗ and16j6max
a∈A |v|a.
Proof. Assume that f is Gp-hereditarily continuous. By Lemmas 3.14 and 3.16, condition (1) holds. Moreover, by Lemma3.14, we may write f =g◦h, whereh:A∗→Nk is the canonical morphism andg:Nk →Zis defined by
g(n) =f(an11· · ·ankk).
By Lemma3.18, the Mahler expansion g(n) = X
r∈Nk
hg, ri nr1
1
· · · nrk
k
ofg is defined byhg, ri=hf, ar11· · ·arkki.
Assume that v ∈ A∗ and j ∈ N are such that 1 6 j 6 |v|ai for every i∈ {1, . . . , k}. Letr= (|v|a
1, . . . ,|v|ak). By Lemma3.17, g isGp-hereditarily continuous and so we get vp(j) 6 vp(hg, ri) = vp(hf, ar11· · ·arkki) by Theorem 3.12. Sincev∼ar11· · ·arkk, we gethf, vi=hf, ar11· · ·arkkiby Lemma3.16and so vp(j)6vp(hf, vi). Thus condition (2) holds.
Conversely, assume that conditions (1) and (2) hold. By Lemma3.16,f(u) = f(v) wheneveru∼v and so there exists a function g:Nk →Zsuch thatf = g◦h. By Lemma3.17, it suffices to show thatg isGp-hereditarily continuous.
Let
g(n) = X
r∈Nk
hg, ri nr1
1
· · · nrk
k
be the Mahler expansion of g and suppose that 1 6j 6max{r1, . . . , rk}. By Theorem3.12, we only need to show that
vp(j)6vp(hg, ri). (3.19)
By Lemma3.18, we havehg, ri=hf, ar11· · ·arkki. Since 16j6max{r1, . . . , rk}= max{|ar11· · ·arkk|a
1, . . . ,|ar11· · ·arkk|a
k}, it follows from condition (2) thatvp(j)6vp(hf, ar11· · ·arkki) and so (3.19) holds as required.
4 G-hereditary continuity
LetPdenote the set of all positive primes.
Theorem 4.1 A function fromZktoZisG-hereditarily continuous if and only if, for each prime p, it is nonexpansive for the p-adic norm.
Proof. SinceG∩Com=W
p∈P(Gp∩Com), it follows from Propositions 2.4 and 2.5 that a function fromZk to Zis G-hereditarily continuous if and only if it is Gp-hereditarily continuous for every p ∈ P. It now remains to apply Theorem3.5to conclude.
Theorem3.12yields:
Theorem 4.2 Let f(n) =P
r∈Nkhf, ri nr1
1
· · · nrk
k
be the Mahler expansion of a function f :Nk →Z. Then the following conditions are equivalent:
(1) f isG-hereditarily continuous;
(2) jdivideshf, rifor allj∈Nandr∈Nksuch that16j6max{r1, . . . , rk}.
We present now the analogue of Theorem3.19through an adaptation of its proof. We keep the notation introduced in Section3.
Theorem 4.3 Let f : A∗ → Z be a function and let f(u) = P
v∈A∗hf, vi uv be its Mahler expansion. Then f is G-hereditarily continuous if and only if it satisfies the following conditions:
(1) if uandv are commutatively equivalent, thenhf, ui=hf, vi, (2) j divideshf, vifor allv∈A∗ and16j6maxa∈A|v|a.
Proof. Assume thatf isG-hereditarily continuous. Since G-hereditarily con- tinuous implies Gp-hereditarily continuous, Lemma 3.14 remains valid for G.
Together with Lemma 3.16, this yields condition (1). Moreover, by Lemma 3.14, we may writef =gh, whereh:A∗→Nk is the canonical morphism and g:Nk →Zis defined by
g(n) =f(an11· · ·ankk) By Lemma3.18, the Mahler expansion
g(n) = X
r∈Nk
hg, ri nr1
1
· · · nrk
k
ofg is defined byhg, ri=hf, ar11· · ·arkki.
Assume that 16 j 6 |v|ai for somev ∈ A∗ and i ∈ {1, . . . , k}. Let r = (|v|a
1, . . . ,|v|ak). By Lemma 3.17, g is G-hereditarily continuous and so we get j | hg, ri = hf, ar11· · ·arkki by Theorem 4.2. Since v ∼ ar11· · ·arkk, we get hf, vi = hf, ar11· · ·arkki by Lemma 3.16 and so j | hf, vi. Thus condition (2) holds.
Conversely, assume that conditions (1) and (2) hold. By Lemma3.16,f(u) = f(v) wheneveru∼vand so there exists a functiong:Nk →Zsuch thatf =gh.
By Lemma3.17, it suffices to show thatg isG-hereditarily continuous. Let g(n) = X
r∈Nk
hg, ri nr1
1
· · · nrk
k
be the Mahler expansion of g and suppose that 1 6j 6max{r1, . . . , rk}. By Theorem4.2, we only need to show that
j| hg, ri. (4.20)
By Lemma3.18, we havehg, ri=hf, ar11· · ·arkki. Since 16j6max{r1, . . . , rk}= max{|ar11· · ·arkk|a
1, . . . ,|ar11· · ·arkk|a
k}, it follows from condition (2) that j | hf, ar11· · ·arkki and so (4.20) holds as required.
5 A-uniform continuity
Given a variety V, let CV = Com∩V. In particular CA is the variety of commutative and aperiodic monoids. For each t∈N, letAt=Jxt+1=xtKand CAt=Com∩Atbe the variety of commutative aperiodic monoids of exponent t.
Let alsoNtdenote the monogenic monoid presented byhx|xt=xt+1i. We usually viewNtas a quotient ofNin order to represent its elements by natural numbers. The following results are folklore.
Proposition 5.1 Every variety of commutative monoids is generated by its monogenic monoids. In particular CAt = (Nt) for every t ∈ N. Moreover, if V⊆CA, thenV=CAt for somet∈N.
Givenm, n∈N, let us set (m∧n) =
(min{m, n} ifm6=n
∞ ifm=n
More generally, foru, v∈Nk, we set write
(u∧v) = min{u1∧v1, . . . , uk∧vk}.
Lemma 5.2 Letu, v∈Nk andt∈N. Then:
(1) rA(u, v) =rCA(u, v) = (u∧v) + 2;
(2) rAt(u, v) =rCAt(u, v) =
((u∧v) + 2 if(u∧v)< t
∞ otherwise
Proof. We may assume that u6=v. Let V ⊆ A. SinceCV ⊆V and every quotient of Nk in V is necessarily inCV, we have rV(u, v) = rCV(u, v). We show next that
rCV(u, v) = min{|Nt| |Nt∈CVand separatesuandv}. (5.21) Indeed, ifM ∈CVseparatesuandv throughψ:Nk→M, it follows from the proof of Proposition5.1that there exists an onto homomorphismϕ:Nt1× · · · × Ntn→M, where eachNti may be assumed to be a submonoid ofM. SinceNk is a free commutative monoid, we may factorψthrough θ:
Nk Nt
1× · · · ×Ntn
M θ
ψ ϕ
Since ψ(u) 6= ψ(v), one of the component morphisms θi : Nk → Nti must separateuandv. Therefore the smallestM ∈CV separatinguandvmust be of the formNt and so (5.21) holds.
(1) By (5.21), we have
rCA(u, v) = min{|Nt| |Ntseparatesuandv}. (5.22) If u∧v = ui∧vi, it is immediate that the projection on the i-th component induces a morphism fromNk toN(u∧v)+1separatinguandv.
Suppose now thatη:Nk→Ntseparatesuandv witht6(u∧v). Since
k
X
i=1
η(uiei) =η(u)6=η(v) =
k
X
i=1
η(viei),
we have η(uiei) 6= η(viei) for some i ∈ {1, . . . , k}. Hence η(ei) > 1. Since ui, vi>t, it follows thatη(uiei) =t=η(viei), a contradiction.
ThusN(u∧v)+1 is the smallest Nt separating uand v. In view of (5.21), it follows that
rCA(u, v) =|N(u∧v)+1|= (u∧v) + 2.
(2) By (5.21) and Proposition5.1, we have
rCAt(u, v) = min{|Ns| |s6tandNs separatesuandv}.
In view of (5.22), it follows that rCAt(u, v) =
(rCA(u, v) ifrCA(u, v)6t+ 1 =|Nt|
∞ otherwise
By (1),rCA(u, v)6t+1 is equivalent to (u∧v)< tand the claim follows.
Theorem 5.3 Letf :N→Nbe a mapping. Then the following conditions are equivalent:
(1) f isA-uniformly continuous,
(2) for all n ∈ N, there exists s ∈ N such that, for all u, v ∈ N, u∧v > s implies f(u)∧f(v)>n,
(3) for every n∈N,f−1(n) is either finite or cofinite.
Proof. (1)⇔(2). It follows from the definition that f isA-uniformly contin- uous if and only if for alln∈N, there existss∈Nsuch that, for allu, v∈N,
rA(u, v)>simpliesrA(f(u), f(v))>n, that is equivalent to (2) by Lemma5.2.
(2)⇒(3). Suppose thatf−1(m) is neither finite nor cofinite. Lets∈Nbe arbitrary. Takeus∈f−1(m) and vs∈N\f−1(m) such thatus, vs>s. Thus the relation
us∧vs>sandf(us)∧f(vs)6m holds for alls∈N, and so (2) fails.
(3)⇒(2). Letn∈N. Suppose first thatf−1(m) is cofinite for somem∈N. Lets= max(N\f−1(m)). Ifu∧v>s+ 1, thenu6=vimpliesu, v>s+ 1 and sof(u) =m=f(v), hence we havef(u) =f(v) in any case andf(u)∧f(v)> n trivially.
Assume now thatf−1(i) is finite for everyi∈N. Let s= max∪n−1i=0f−1(i).
Ifu∧v >s+ 1 andu6=v, thenu, v >s+ 1 and sou, v /∈ ∪ni=0f−1(i). Hence f(u), f(v)>nand so f(u)∧f(v)>n. Therefore (2) holds.
Similarly, we get
Theorem 5.4 Let f : Nk → N be a mapping. Then the following conditions are equivalent:
(1) f isA-uniformly continuous;
(2) for all n∈ N, there exists s ∈ N such that for all u, v ∈ Nk, u∧v > s implies f(u)∧f(v)>n.
However, there is no analogue of condition (3) of Theorem 5.3 in this case: if we define f :N2 → Nbyf(m, n) =m, it is immediate that f is A-uniformly continuous andf−1(m) is infinite for everym∈N.