# Continuum damping of topologically-protected edge modes at the boundary of
magnetized plasmas

Roopendra Singh Rajawat<EMAIL_ADDRESS>School of Applied and Engineering
Physics, Cornell University, Ithaca, NY 14850  V. Khudik  Department of
Physics and Institute for Fusion studies, The University of Texas at Austin,
TX 78712  G. Shvets  School of Applied and Engineering Physics, Cornell
University, Ithaca, NY 14850

###### Abstract

Recent extension of the topological ideas to continuous systems with broken
time-reversal symmetry, such as magnetized plasmas, provides new insights into
the nature of scattering-free topologically-protected surface plasma waves
(TSPWs). We demonstrate a unique characteristic of TSPWs propagating above the
electron cyclotron frequency: their collisionless damping via coupling to the
continuum of resonant modes localized inside a smooth plasma-vacuum interface.
Damped TSPWs retain their unidirectional nature and robustness against
backscattering. When sheared magnetic field creates a boundary between damped
and undamped TSPWs, the two refract into each other without reflections.

††preprint: APS/123-QED

Introduction.- Regardless of their state of matter – solid [1], gaseous and
fluid [2], or plasma [3] – a wide range of materials is found to exhibit non-
trivial topological properties that fundamentally impact wave propagation at
domain walls between topologically-distinct bulk materials. Specifically, bulk
materials possessing propagation bandgaps (i.e., acting as “insulators” for
wave-like polaritonic perturbations of certain energies) and lacking the time-
reversal (TR) symmetry can be characterized by an integer invariant, known as
the Chern number [4], assigned to every bandgap. The bulk-boundary
correspondence (BBC) principle [5] – originally established in condensed
matter physics [6, 7, 1] and later extended to photonics and metamaterials [8,
*Raghu_pra_2008, 10], cold atomic gases[11], and classical fluids [12,
*tauber_jfm_2019] – predicts the existence and number of gapless
unidirectional edge states that are spectrally-located within a common bandgap
of the two bulk materials sharing a domain wall.

Figure 1:  (a) Surface wave excitation at the interface between a magnetized
plasma slab (green) and vacuum by a dipole source (blue disk) oscillating with
$\omega_{\rm dr}=0.9\omega_{p0}$. Generated TSPW (red wavy arrow) propagates
unidirectionally along the interface. (b) Plasma density profiles for hard
(dashed line) and smooth (solid line) plasma interfaces. (c,d) Snapshots of
time-averaged $E_{z}^{2}$ in a $z={\rm const}$-plane for (c) HPI, and (d) SPI.
Parameters: $\omega_{c}/\omega_{p0}=0.75$, $k_{z}/k_{p}=1.0$, and $k_{p}\delta
l=0.2$ for SPI.

There are several remarkable properties of topological edge states. (i) In
real space, they are robust to backscattering with respect to various domain
wall perturbations, e.g., changes along (e.g., sharp turns) and across (e.g.,
interface smoothness) its perimeter. (ii) In reciprocal space, their
dispersion curves connect the two continua of the bulk modes (CBM) by spanning
the corresponding topological bandgap. While properties (i) and (ii) are
always present in condensed matter systems, where the band structure arises
from the lattice periodicity, the situation can be quite different for
continuous systems, such as moving/rotating fluids or magnetized plasmas [3,
14, 15], where intrinsic material resonances (e.g., electron cyclotron
resonance) are responsible for the creation of multiple continuous propagation
bands. The key distinctive characteristic of a continuous topological medium
with a smooth domain wall is that a new continuous spectrum of modes can arise
in addition to the continuum modes of the bulks.

In the specific case of magnetized plasmas comprising mobile electrons and
immobile neutralizing ions – the subject of this Letter – the new continuum of
modes corresponds to local upper hybrid resonances: $\omega_{\rm
UH}^{2}(\mathbf{x})=\omega^{2}_{\rm c}+\omega^{2}_{\rm p}(\mathbf{x})$, where
$\omega_{\rm c}=eB_{0}/mc$ is the cyclotron frequency of an electron with
mass/charge $m/e$ rotating in a uniform magnetic field ${\bf
B_{0}}=B_{0}\hat{z}$, and $\omega_{p}(\mathbf{x})=\sqrt{4\pi
e^{2}n(\mathbf{x})/m}$ is the local plasma frequency inside the domain wall
determined by the local unperturbed plasma density $n(\mathbf{x})$. In the
simplest case of a semi-infinite volume of cold magnetized plasma with uniform
density $n_{0}$ interfaced with a vacuum region through a smooth domain wall,
the continuum of localized modes (CLM) occupies the spectral region
$\omega_{\rm c}<\omega<\Omega_{\rm UH}$, where $\Omega_{\rm UH}$ is the upper-
hybrid frequency of the bulk.

The presence of the CLM inside the topological bandgap raises a number of
fundamental questions that do not arise in the case of a periodic topological
medium. For example, it is unclear if topologically robust bandgap-spanning
modes – possibly damped – can exist inside the CLM spectral band [3, 16,
*Qin_sa_2023], as one would expect based on the BBC principle. While the BBC
principle can be validated for continuous models with sharp interfaces [18],
it is not known if it still holds for smooth interfaces. An even more
important open question is how property (i) is affected, i.e., whether the
presence of the CLM band affects the robustness of edge state to
backscattering when a domain wall makes a sharp turn. It also remains to be
understood how the profile of the domain wall affects the damping of the edge
states when their frequency overlaps with the continuum of local modes. In
this Letter, we use particle-in-cell (PIC) simulations and analytic modeling
to demonstrate the existence of a new class of backscattering-robust
unidirectional quasi-modes spanning the entire CLM band, and develop an
analytic theory predicting their propagation properties.

Figure 2: (a) Propagation band structure for a semi-infinite magnetized plasma
slab with a smooth plasma/vacuum interface. Yellow curves: propagating bulk
and ramp-localized continuum modes. Undamped surface waves: HPI-TSPW (black
solid) and SPI-TSPW (green solid). Damped SPI-TSPWs: spatial propagation
($k_{y}$: red solid line) and decay ($\gamma$: blue dashed line) constants.
Chern numbers are indicated for the bulk bands. Stars at $\omega=\omega_{\rm
dr}$: driven modes from Fig. 1(c,d). (b,c) Integration contours in the complex
(b) $\omega$\- and (c) $x$\- planes used for calculating the dispersion
relation. (d,e) Spatial profiles of (d) $E_{\rm x}$, and (e) $B_{\rm z}$
oscillation amplitudes extracted from the PIC simulation. Shaded region:
linear density ramp of the SPI. Red dashed line: upper-hybrid resonance at
$x_{\rm UH}$. Plasma parameters: same as in Fig. 1.

As a model for investigating topological surface plasma waves (TSPWs), we use
a physical configuration shown in Fig. 1(a): a planar slab of magnetized
plasma with density $n(\mathbf{x})\equiv n(x)$ (where $n(x)\rightarrow n_{0}$
for $x\ll L_{\rm int}$) interfacing with a vacuum region at $x\approx L_{\rm
int}$. Two types of interfaces shown in Fig. 1(a) are utilized: a hard plasma
interface (HPI: solid line) and a smooth plasma interface (SPI: dashed line).
To excite TSPWs with a fixed axial wavenumber $k_{z}$, we use a periodic chain
of oscillating point sources with dipole moments
$\mathbf{p}\equiv\mathbf{e}_{z}p_{z}$ (blue dot in Fig. 1(a)) oscillating as
$p_{z}\propto\cos\left(k_{z}\cdot z-\omega t\right)$ spaced by $P_{z}\ll
2\pi/k_{z}$ in the $z-$direction placed near the plasma-vacuum interface.

The excitation of TSPW’s with $k_{z}=\omega_{p0}/c$ propagating along with the
interface ($\pm yz-$plane) was modeled by a first-principles 3D-PIC simulation
code VLPL[19] for cold collisionless plasmas with magnetic field corresponding
to $\omega_{c}=0.75\omega_{p0}$: see [20] for the details of the PIC
simulation setup. For these parameters, the upper (lower) edge of the first
(second) bulk propagation band with the Chern number $C_{1}=-1$ ($C_{2}=1$) is
at $\omega_{-}\approx 0.4\omega_{p0}$ ($\omega_{+}\approx\omega_{p0}$),
resulting in a complete bandgap for $\omega_{-}<\omega<\omega_{+}$. For the
smooth plasma interface, our driven PIC simulations reveal the existence of
undamped TSPWs in the lower portion of the bandgap:
$\omega_{-}<\omega<\omega_{\rm c}$, as was recently demonstrated using
eigenvalue simulations [3, 16]. The dispersion relation $\omega(k_{y})$ for
these modes is plotted as a green line in Fig. 2 for an SPI represented by a
linear density ramp with the length $\delta l=0.2k_{p}^{-1}$ (where
$k_{p}^{-1}\equiv c/\omega_{p0}$ is the collisionless skin depth of the bulk
plasma). Eigenvalue simulations do not reveal any edge states – damped or
undamped – in the rest of the bulk bandgap overlapping with the CLM band
extending from $\omega_{\rm c}$ to $\Omega_{\rm UH}>\omega_{+}$.

However, driven PIC simulations at $\omega_{\rm dr}=0.9\omega_{p0}$ for the
same SPI (Fig. 1(d)) and for the HPI (Fig. 1(c): $\delta l=0$) present a
different picture. The red-colored images of the time-averaged ${E}_{z}^{2}$
reveal that the edge states are indeed launched inside the CLM band for both
interface types, and illustrate several of their properties. First, SPI and
HPI support unidirectional edge states propagating in the positive
$y-$direction. Second, while the HPI-TSPW mode propagates undamped with
$k_{y}\approx 0.8k_{p}$, the SPI-TSPW appears to be exponentially decaying,
with the corresponding complex-valued wavenumber
$\tilde{k}_{y}\approx\left(0.8-0.075i\right)k_{p}$. The lack of damping in the
HPI case is not surprising because the CLM band collapses into a single point
at $\omega=\Omega_{\rm UH}$ outside of the bulk bandgap. However, the presence
of weakly-damped modes in the SPI case is puzzling because no such modes are
revealed by eigenvalue simulations. The collisionless nature of our PIC
simulations raises the question of how the energy of TSPWs is dissipated in
the absence of plasma viscosity.

Nevertheless, several conjectures – validated below – can be made and utilized
for interpreting the physics of the collisionlessly-damped unidirectional
TSPWs. First, apart from finite damping, TSPW propagation along relatively
sharp ($\delta l\ll k_{p}^{-}1$) interfaces appears similar to their
propagation along the HPI: $\tilde{k}_{y}\approx k_{y}$. Therefore, a
perturbed solution for SPI-TSPWs can be obtained using the field profile of
HPI-TSPWs as the unperturbed solution [21], and $k_{p}\delta l$ as a small
parameter. Second, the unidirectional nature of the SPI-TSPWs indicates that
they are robust to backscattering by abrupt (i.e., on a scale shorter than
$\Delta y\sim k_{y}^{-1}$) perturbations of the domain wall. Third,
collisionless damping of SPI-TSPWs appears to be a kinetic effect that results
from strong plasma heating occurring at the specific location $x=x_{r}$ such
that the unperturbed HPI-TSPW frequency $\omega$ resonates with highly-
localized upper-hybrid resonances: $\omega_{\rm UH}(x_{r})=\omega$. Resonant
excitation of localized upper-hybrid waves can produce energetic electrons
[22].

Finally, the decaying mode SPI-TSPW is highly reminiscent of weakly-damped
surface waves in un-magnetized plasmas that were interpreted as quasi-modes
generated by phase mixing of multiple local resonances [23]. The key
distinction between the true exponentially-decaying eigenmodes (e.g., due to
finite fluid viscosity) and the quasi-modes is that the latter exhibit short-
term exponential and long-term power-law decay that can be viewed as a form of
Landau damping [24] in physical space [15, 25]. While continuum damping of
electromagnetic waves is not unusual in plasma physics [26, 27], to our
knowledge, it has never been studied in the context of topologically-robust
surface waves in magnetized plasmas.

To construct a cold fluid description of the edge states, we assume that their
electric ($\bf E$) and magnetic ($\bf B$) fields are harmonic, i.e.
proportional to $e^{i\mathbf{k}\cdot\mathbf{x}-i\omega t}$, where
$\mathbf{k}=\mathbf{e}_{y}k_{y}+\mathbf{e}_{z}k_{z}$ is the in-plane
propagation wavenumber. Temporal or spatial damping rates of TSPWs are
included in their complex-valued frequency ($\omega$) or wavenumber ($k_{y}$),
respectively [28]. After space-time Fourier transformation of Maxwell
equations [29], we obtain:

$\frac{\partial\mathbf{\psi}}{\partial
x}=-\frac{i}{\epsilon_{t}(x)}M\mathbf{\psi},\ \ \
\mathbf{\psi}=\left(B_{x},B_{y},B_{z},E_{z}\right)^{T}$ (1)

where $\mathbf{\psi}$ is a four-component vector comprising the field
components remaining continuous across the discontinuous HPI. The $4\times 4$
matrix $M\left(x,\mathbf{k},\omega\right)$ is given by

$M=\begin{pmatrix}0&k_{y}\epsilon_{t}&k_{z}\epsilon_{t}&0\\\
-k_{y}\epsilon_{t}&0&0&k_{0}\epsilon_{a}\epsilon_{t}\\\
\frac{k_{0}^{2}\epsilon_{tg}^{2}-\epsilon_{t}k_{z}^{2}}{k_{z}}&-ik_{z}\epsilon_{g}&ik_{y}\epsilon_{g}&-\frac{k_{0}k_{y}}{k_{z}}\epsilon^{2}_{tg}\\\
ik_{0}\epsilon_{g}&\frac{\epsilon_{t}^{2}k_{0}^{2}-k_{z}^{2}}{k_{0}}&\frac{k_{0}k_{y}}{k_{z}}&-ik_{y}\epsilon_{g}\end{pmatrix},$
(2)

where $k_{0}=\omega/c$, $\epsilon_{t}=\frac{\omega^{2}-\omega^{2}_{\rm
UH}(x)}{\omega^{2}-\omega^{2}_{c}}$,
$\epsilon_{g}=\frac{\omega_{c}}{\omega}\frac{\omega^{2}_{p}(x)}{\omega^{2}_{c}-\omega^{2}}$,
and $\epsilon_{a}=\frac{\omega^{2}-\omega^{2}_{p}(x)}{\omega^{2}}$ are the
$x$-dependent components of the cold plasma dielectric tensor [30], and
$\epsilon^{2}_{tg}\equiv\epsilon^{2}_{t}-\epsilon_{g}^{2}$. The remaining two
components of the electric field are expressed in terms of $\mathbf{\psi}$
components:

$\displaystyle\epsilon_{t}E_{x}$ $\displaystyle=$
$\displaystyle\frac{ik_{y}k_{0}\epsilon_{g}E_{z}-k_{y}k_{z}B_{z}}{k_{0}k_{z}}+\frac{k_{z}}{k_{0}}B_{y}-i\frac{k_{0}}{k_{z}}\epsilon_{g}B_{x},$
(3) $\displaystyle E_{y}$ $\displaystyle=$
$\displaystyle\left(\frac{k_{y}}{k_{z}}\right)E_{z}-\left(\frac{k_{0}}{k_{z}}\right)B_{x}.$
(4)

Therefore, by integrating Eq.(1) between $x=x_{\rm in}\rightarrow-\infty$ and
$x=x_{\rm out}\rightarrow+\infty$ endpoints (deep inside and outside the
plasma) and assuming the vanishing of $\mathbf{\psi}\rightarrow 0$ at the
endpoints, a TSPW dispersion relation in the form of $D(\omega,k_{y})=0$ can
be obtained [31, 23] for any SPI. For the TSPWs in the
$\omega_{-}<\omega<\omega_{c}$ frequency range, the $x$-integration of Eq.(1)
can be carried out along the real axis because no singularities are
encountered for any real-valued $x_{\rm in}<x<x_{\rm out}$ for any plasma
density profile $n_{0}(x)$. The resulting solution of the dispersion relation
yields a real-valued (damping-free) dispersion relation $\omega(k_{y})$ [16]
plotted as a green solid line in Fig. 2(a).

The situation changes dramatically for the real-valued TSPW frequencies inside
the CLM band ($\omega>\omega_{c}$) because the $1/\epsilon_{t}(x)$ factor in
Eq.(1) acquires a pole singularity at the local upper-hybrid resonance
location $x=x_{\rm UH}(\omega)$ defined by
$\omega^{2}=\omega^{2}_{c}+\omega^{2}_{p}(x_{\rm UH})$. The ambiguity of
integrating Eq.(1) across the singularity is resolved by analytically
continuing the dispersion function ($D\rightarrow D_{\ast}$) into the lower-
half of the complex $\omega$-plane to preserve causality [15, 25, 23]. If
$D_{\ast}(\omega,k_{y})$ possesses a pole $\tilde{\omega}_{\rm
QM}\equiv\omega^{\rm re}_{\rm QM}+i\omega^{\rm im}_{\rm QM}$ (where
$\omega^{\rm im}<0$), then its analyticity requires that the integration
between $x_{\rm in}$ and $x_{\rm out}$ be carried out along the path
$\mathcal{C}$ in the complex-$x$ plane passing below the complex-valued point
$x_{r}$ defined as $\omega_{\rm UH}(x_{r})=\tilde{\omega}_{\rm QM}$ [15, 23]:
see Fig. 2(c).

Iterative application of such integration for different trial frequencies
$\tilde{\omega}_{\rm tr}$ yields the quasi-mode dispersion relation
$\tilde{\omega}_{\rm QM}(k_{y})$ satisfying the condition of
$D_{\ast}(\tilde{\omega}_{\rm QM},k_{y})=0$ for a given SPI density profile
$n_{0}(x)$: see [20] for the mathematical details of calculating
$D_{\ast}(\tilde{\omega}_{\rm QM},k_{y})=0$. In Fig. 2(a), we present an
example of the complex wavenumber $\tilde{k}_{y}(\omega)\equiv k_{y}+i\gamma$
calculated for the real-valued frequencies $\omega>\omega_{c}$ assuming the
SPI in the form of a linearly-varying plasma density ramp extending from
$x_{\rm in}=-0$ to $x_{\rm out}=\delta l+0$: $n(x)=n_{0}(1-x/\delta l)$ and
$\delta l=0.2k_{p}^{-1}$. Note that the resonant point $x_{r}\equiv x_{\rm
UH}$ (where $x_{\rm UH}/\delta l=\left(\omega_{\rm
UH}^{2}-\omega^{2}\right)/\omega_{p0}^{2}$) is also real-valued, so the the
integration contour $\mathcal{C}$ includes a semi-circle above $x=x_{\rm UH}$.
The numerically calculated oscillation (decay) constants $k_{y}$ ($\gamma$)
are plotted in Fig. 2(a) as solid-red (dashed-blue) lines, respectively.

Note that the decay constant $\gamma$ is normalized to $k_{p}^{2}\delta l$ in
Fig. 2(a): a result that holds rather accurately for sharp plasma-vacuum
interfaces with $\delta l\ll k_{p}^{-1}$. To make further analytic progress in
understanding this scaling with $\delta l$, as well as the properties of the
TPSW quasi-modes, we assume that the electromagnetic fields $\mathbf{\psi}$
are nearly-uniform inside the SPI. Then, their increment
$\Delta\mathbf{\psi}\equiv\mathbf{\psi}^{v}-\mathbf{\psi}^{p}$ (where $p$
($v$) superscripts label the fields in the plasma (vacuum) regions) can be
estimated as $\Delta\mathbf{\psi}\approx iM\mathbf{\psi}\left(\int^{\delta
l}_{0}dx/\epsilon_{t}(x)\right)$. After expanding $\epsilon_{t}(x)$ in the
vicinity of $x=x_{\rm UH}$ as $\epsilon_{t}\approx\tilde{x}/\tilde{\delta l}$,
where $\tilde{\delta l}=\delta l-x_{\rm UH}$ is the distance of the local
upper-hybrid resonance point from the edge of the plasma and
$\tilde{x}=x-x_{\rm UH}$, the integral over the pole is calculated to be
approximately equal to $-i\pi\tilde{\delta l}$. To leading order in $\delta
l$, we find that $B_{x}$ and $B_{y}$ are continuous
($B^{p}_{x,y}-B^{v}_{x,y}\approx 0$) while $B_{z}$ and $E_{z}$ change across
the interface: $k_{z}\left(B^{p}_{z}-B^{v}_{z}\right)\approx i\pi\tilde{\delta
l}\omega_{c}R/\omega$ and
$k_{0}\left(E^{p}_{z}-E^{v}_{z}\right)\approx-\pi\tilde{\delta l}R$. Here
$R=k_{y}\left(k_{z}B_{z}+i\omega_{c}E_{z}/c\right)-k_{z}^{2}B_{y}-ik_{0}\omega_{c}B_{x}/c$
is calculated on the vacuum side of the interface.

Using these boundary conditions, a dispersion relation
$D_{\ast}(\omega,\tilde{k}_{y})=0$ for the edge states can be expressed as
follows (see [20] for more details):

$\displaystyle\left(\kappa_{1}+\kappa_{0}+Q_{1}\right)\left(P_{2}-k_{y}\right)=\left(\kappa_{2}+\kappa_{0}+Q_{2}\right)\left(P_{1}-k_{y}\right)$
(5)

where $\kappa_{0}$ and $\kappa_{1,2}$ are the inverse decay lengths in vacuum
and plasma, respectively [21], and the remaining real-valued coefficients are
defined in [20].

Figure 3:  Reflectionless surface wave propagation in a sheared magnetic field
$\vec{B}=B_{0}(y)\hat{\rm z}$ (a,b) and around an obstacle (c,d). (b)
Refraction of a propagating TSPW ($y<100k_{p}^{-1}$) with frequency
$\omega_{\rm dr}=0.67\omega_{\rm p0}$ into a damped TSPW ($y>100k_{p}^{-1}$):
$E_{z}$ at the plasma-vacuum interface (color-coded) and the cyclotron
frequency $\omega_{c}(y)$ (magenta line, scale on the right) linearly sheared
on the $L_{y}^{\rm shear}=2k_{p}^{-1}$ scale. Plasma parameters in (a,b): same
as in Fig 1. (d) A snapshot of time-averaged $E_{z}^{2}$ (yellow color) of a
damped TSPW with $\omega_{\rm dr}=0.7\omega_{\rm p0}$. Plasma parameters in
(c,d): $k_{\rm z}/k_{\rm p}=0.8$, $\omega_{\rm c}/\omega_{\rm p0}=0.5$, and
$k_{p}\delta l\approx 0.6$. Inset: the TSPW spatially decays inside each of
the propagation arms.

From Eq.(5), it has been demonstrated [21] that in the HPI case ($\delta l=0$)
there always exists a real-valued $k_{y}$ root for the following spectral
range: $\omega_{1}<\omega<\omega_{2}$, where
$\omega_{2,1}=\left(\sqrt{2\omega_{p0}^{2}+\omega_{c}^{2}}\pm\omega_{c}\right)/2$.
For a fixed $k_{z}/k_{p}=1$, the resulting dispersion curve (black solid line)
for a HPI-TSPW is plotted in Fig. 2(a). In the SPI case, it follows from
Eq.(5) that as long as $x_{\rm UH}$ is located inside the ramp, the
propagation wavenumber $\tilde{k}_{y}$ must be complex, with its imaginary
part $\gamma$ proportional to the fields discontinuity – just as our plots of
$k_{y}$ and $\gamma$ in Fig. 2(a) indeed demonstrate for a specific density
ramp with $\delta l=0.2k_{p}^{-}1$.

Remarkably, while the $k_{y}(\omega)$ curves for the HPI- and SPI-TSPW overlap
for small values of $k_{y}$, continuum damping removes the unphysical
flattening of the HPI-TSPW dispersion curve for large propagation wavenumbers
$|k_{y}|\gg k_{p}$, thereby removing the divergences of the local density of
states and of the thermal electromagnetic energy density [28, 32]. As a
result, the combination of the lossless TSPW ($\omega_{-}<\omega<\omega_{c}$)
and the lossy quasi-mode ($\omega_{c}<\omega<\omega_{+}$) produces a
propagation mode spanning the entire topological bandgap bracketed between the
propagation bands of the bulk continua. Importantly, the group velocity
$\partial\omega/\partial k_{y}>0$ of the mode is positive for all frequencies
inside the topological bandgap, thus indicating unidirectional propagation
that is expected to be protected against backscattering. The normalized
spatial damping rate $\gamma/k_{p}^{2}\delta l$ of the topological quasi-mode
is observed to be at its minimum for the long-wavelength modes with positive
$k_{y}<k_{p}$, and to increase for the slowly-propagating short-wavelength
modes.

How “real” are the continuum-damped quasi-modes, given that they represent
only one part of the plasma response, in addition to the continuum of modes
from the $\omega_{\rm c}<\omega<\Omega_{\rm UH}$ range [26, 14, 15]? In fact,
the long-term behavior of the fields inside the SPI region is expected to be
non-exponential [25, 23]. However, their early- and medium-term behavior is
accurately described as exponential decay in time or space, depending on the
initial/boundary conditions. This is confirmed by our PIC simulations
presented in Fig. 1(d) that show nearly-exponentially decaying surface waves
with the damping constant $\gamma_{\rm PIC}\approx 0.08k_{p}$ and the
propagation number $k_{y\rm PIC}\approx 0.8k_{p}$. Both are in close agreement
with the corresponding complex-valued propagation constant of the surface
quasi-mode: $\tilde{k}_{y}=\left(0.8-0.075i\right)k_{p}$.

Another sign of the quasi-modes physical significance is that PIC simulations
indeed confirm their unusual field distribution predicted by the analytic
theory. For example, it follows from Eq.(4) that the largest field component
$E_{x}\propto 1/\epsilon_{t}(x)$ is expected to peak and change its sign at
the upper-hybrid location $x_{\rm UH}$ inside the linear SPI density ramp
($6<k_{p}x<6.2$) as observed in Figs. 2(e,f), where it can be seen that
$|E_{x}|\gg|B_{z}|$ inside the ramp. Moreover, the $B_{z}(x)$ profile is
nearly-discontinuous at $x=x_{\rm UH}$. This is consistent with the jump
condition for $\mathbf{\psi}$ that was used to derive the quasi-mode
dispersion relation given by Eq.(5).

Next, we demonstrate the reflectionless conversion of a collisionless TSPW
into a weakly-damped quasi-mode. The setup is shown in Fig. 3(a), where the
boundary between the two (left and right) plasmas with identical density
profiles comprises a linear magnetic shear region with the length
$L_{y}=2k^{-1}_{p}$, and the radiation source on the left side of the shear
region launching a TPSW with $\omega_{\rm dr}=0.67\omega_{\rm p0}$. The
corresponding cyclotron frequencies on the two sides of the shear region are
$\omega_{c}^{\rm(l)}=\omega_{p0}$ and $\omega_{c}^{\rm(r)}=0.5\omega_{p0}$,
respectively, and the two bulk plasmas share a common topological bandgap that
includes the source frequency: $\omega_{-}^{\rm(l,r)}<\omega_{\rm
dr}<\omega_{+}^{\rm(l,r)}$, where $\omega_{-}^{\rm(l)}\approx 0.45$,
$\omega_{+}^{\rm(l)}\approx 1$, $\omega_{-}^{\rm(r)}\approx 0.25$ and
$\omega_{+}^{\rm(r)}\approx 1$ (see Fig.S1 and the details of bulk band
structures in [20]).

Because the source frequency also satisfies the
$\omega_{c}^{\rm(r)}<\omega_{\rm dr}<\omega_{c}^{\rm(l)}$ condition, the
launched mode is an undamped (damped) TPSW on the left (right) sides of the
magnetic shear region centered at $y=100k_{p}^{-1}$. The corresponding
propagation wavenumbers $k_{y}$ on the opposite sides of the shear region have
opposite signs across the magnetic shear layer: $k_{y}^{\rm l,r}\approx\mp
0.2k_{p}$, respectively. Therefore, while the group velocities
$v_{y}^{(gr)}=\partial\omega/\partial k_{y}>0$ of the TSPWs are positive on
the two sides of the boundary, their phase velocities
$v_{y}^{(ph)}=\omega/k_{y}$ change sign. Therefore, the electric field
profiles shown in Fig. 3(b) reveal reflectionless negative refraction [33] of
the incident undamped TPSW into the damped one.

Finally, we demonstrate the robustness of damped SPI-TSPW when encountering a
sharp rectangular obstacle (see Fig. 3(c)) in its path. The dimensions of the
obstacle are chosen as $L_{x}\times L_{\rm y}\times L_{\rm
z}=4.7k^{-1}_{p}\times 12.6k^{-1}_{\rm p}\times 7.9k^{-1}_{\rm p}$. As shown
in Fig. 3(d), the launched TSPW seamlessly propagates around the obstacle
without any reflection or radiation into the bulk plasma, thus manifesting
topological protection despite their damping [34]. The collisionless damping
observed before and around the obstacle (see inset of Fig. 3(d)) is a
manifestation of the absorption by localized upper-hybrid resonances.

In summary, we have established the existence of collisionlessly-damped, yet
topologically-protected surface quasi-modes in a magnetized plasma. Using PIC
simulations and theoretical calculations, we have identified the damping
mechanism through the coupling to a continuum of upper-hybrid resonances
localized inside the plasma-vacuum domain wall. While the calculations
presented here assume mobile electrons in the background of immobile, future
work will address the finite ion mass and the possibility of topological
effects in multi-species plasmas.

###### Acknowledgements.

This work is supported by Air Force of Scientific Research (AFOSR) through
Stanford University under MURI Award no. FA9550-21-1-0244. The authors would
like to thank Texas Advanced Computing Center (TACC) for providing HPC
resources.

## References

  * Hasan and Kane [2010] M. Z. Hasan and C. L. Kane, Colloquium: Topological insulators, Rev. Mod. Phys. 82, 3045 (2010).
  * [2] P. Delplace, J. B. Marston, and A. Venaille, Topological origin of equatorial waves, Science 358, 1075.
  * Parker  _et al._ [2020] J. B. Parker, J. B. Marston, S. M. Tobias, and Z. Zhu, Topological gaseous plasmon polariton in realistic plasma, Phys. Rev. Lett. 124, 195001 (2020).
  * Ozawa  _et al._ [2019] T. Ozawa, H. M. Price, A. Amo, N. Goldman, M. Hafezi, L. Lu, M. C. Rechtsman, D. Schuster, J. Simon, O. Zilberberg, and I. Carusotto, Topological photonics, Rev. Mod. Phys. 91, 015006 (2019).
  * Silveirinha [2016] M. G. Silveirinha, Bulk-edge correspondence for topological photonic continua, Phys. Rev. B 94, 205105 (2016).
  * Klitzing  _et al._ [1980] K. v. Klitzing, G. Dorda, and M. Pepper, New method for high-accuracy determination of the fine-structure constant based on quantized hall resistance, Phys. Rev. Lett. 45, 494 (1980).
  * Hatsugai [1993] Y. Hatsugai, Chern number and edge states in the integer quantum hall effect, Phys. Rev. Lett. 71, 3697 (1993).
  * Haldane and Raghu [2008] F. D. M. Haldane and S. Raghu, Possible realization of directional optical waveguides in photonic crystals with broken time-reversal symmetry, Phys. Rev. Lett. 100, 013904 (2008).
  * Raghu and Haldane [2008] S. Raghu and F. D. M. Haldane, Analogs of quantum-hall-effect edge states in photonic crystals, Phys. Rev. A 78, 033834 (2008).
  * Gangaraj and Monticone [2020] S. A. H. Gangaraj and F. Monticone, Physical violations of the bulk-edge correspondence in topological electromagnetics, Phys. Rev. Lett. 124, 153901 (2020).
  * Goldman  _et al._ [2016] N. Goldman, J. C. Budich, and P. Zoller, Topological quantum matter with ultracold gases in optical lattices, Nature Physics 12, 639 (2016).
  * Silveirinha [2015] M. G. Silveirinha, Chern invariants for continuous media, Phys. Rev. B 92, 125153 (2015).
  * Tauber  _et al._ [2019] C. Tauber, P. Delplace, and A. Venaille, A bulk-interface correspondence for equatorial waves, Journal of Fluid Mechanics 868, R2 (2019).
  * Case [1960] C. M. Case, Stability of inviscid plane couette flow, The Physics of Fluids 3, 143 (1960).
  * Briggs  _et al._ [1970] R. J. Briggs, J. D. Daugherty, and R. H. Levy, Role of landau damping in crossed-field electron beams and inviscid shear flow, The Physics of Fluids 13, 421 (1970).
  * Fu and Qin [2021] Y. Fu and H. Qin, Topological phases and bulk-edge correspondence of magnetized cold plasmas, Nature Communications 12, 3924 (2021).
  * Qin and Fu [2023] H. Qin and Y. Fu, Topological langmuir-cyclotron wave, Science Advances 9, eadd8041 (2023), https://www.science.org/doi/pdf/10.1126/sciadv.add8041 .
  * Tauber  _et al._ [2020] C. Tauber, P. Delplace, and A. Venaille, Anomalous bulk-edge correspondence in continuous media, Phys. Rev. Research 2, 013147 (2020).
  * PUKHOV [1999] A. PUKHOV, Three-dimensional electromagnetic relativistic particle-in-cell code vlpl (virtual laser plasma lab), Journal of Plasma Physics 61, 425–433 (1999).
  * [20] See supplemental material for “continuum damping of topologically-protected edge modes at the boundary of magnetized plasmas”, .
  * Pakniyat  _et al._ [2020] S. Pakniyat, A. M. Holmes, G. W. Hanson, S. A. H. Gangaraj, M. Antezza, M. G. Silveirinha, S. Jam, and F. Monticone, Non-reciprocal, robust surface plasmon polaritons on gyrotropic interfaces, IEEE Transactions on Antennas and Propagation 68, 3718 (2020).
  * Lin  _et al._ [1982] A. T. Lin, C. Lin, and J. M. Dawson, Plasma heating from upper‐hybrid mode conversion in an inhomogeneous magnetic field, The Physics of Fluids 25, 646 (1982), https://aip.scitation.org/doi/pdf/10.1063/1.863788 .
  * Shvets and Li [1999] G. Shvets and X. Li, Theory of laser wakes in plasma channels, Physics of Plasmas 6, 591 (1999), https://doi.org/10.1063/1.873204 .
  * Landau [1946] L. Landau, On the vibrations of the electronic plasma, Zhurnal eksperimentalnoi i teoreticheskoi fiziki 16, 574 (1946).
  * Strogatz  _et al._ [1992] S. H. Strogatz, R. E. Mirollo, and P. C. Matthews, Coupled nonlinear oscillators below the synchronization threshold: Relaxation by generalized landau damping, Phys. Rev. Lett. 68, 2730 (1992).
  * Sedlacek [1971] Z. Sedlacek, Electrostatic oscillations in cold inhomogeneous plasma i. differential equation approach, Journal of Plasma Physics 5, 239 (1971).
  * Goedbloed and Poedts [2004] J. P. H. Goedbloed and S. Poedts,  _Principles of Magnetohydrodynamics: With Applications to Laboratory and Astrophysical Plasmas_ (Cambridge University Press, 2004).
  * Archambault  _et al._ [2009] A. Archambault, T. V. Teperik, F. Marquier, and J. J. Greffet, Surface plasmon fourier optics, Phys. Rev. B 79, 195414 (2009).
  * Jackson [2003] J. D. Jackson, Electrodynamics, classical, in  _digital Encyclopedia of Applied Physics_ (American Cancer Society, 2003).
  * Stix [1992] T. Stix,  _Waves in Plasmas_ (American Inst. of Physics, 1992).
  * Chu  _et al._ [1994] M. S. Chu, J. M. Greene, W. Ling, A. D. Turnbull, H. L. Berk, and M. N. Rosenbluth, A numerical study of the Alfvén continuum damping of toroidal Alfvén eigenmodes, Physics of Plasmas 1, 1214 (1994), https://pubs.aip.org/aip/pop/article-pdf/1/5/1214/12286917/1214_1_online.pdf .
  * Buddhiraju  _et al._ [2020] S. Buddhiraju, Y. Shi, A. Song, C. Wojcik, M. Minkov, I. A. D. Williamson, A. Dutt, and S. Fan, Absence of unidirectionally propagating surface plasmon-polaritons at nonreciprocal metal-dielectric interfaces, Nature Communications 11, 674 (2020).
  * Pendry [2000] J. B. Pendry, Negative refraction makes a perfect lens, Phys. Rev. Lett. 85, 3966 (2000).
  * Davoyan and Engheta [2013] A. R. Davoyan and N. Engheta, Theory of wave propagation in magnetized near-zero-epsilon metamaterials: Evidence for one-way photonic states and magnetically switched transparency and opacity, Phys. Rev. Lett. 111, 257401 (2013).


# Commuting upper triangular binary morphisms

Juha Honkala
Department of Mathematics and Statistics
University of Turku
FI-20014 Turku, Finland
<EMAIL_ADDRESS>
###### Abstract

A morphism $g$ from the free monoid $X^{*}$ into itself is called upper
triangular if the matrix of $g$ is upper triangular. We characterize all upper
triangular binary morphisms $g_{1}$ and $g_{2}$ such that
$g_{1}g_{2}=g_{2}g_{1}$.

Keywords: Free monoid morphism; Commutativity; Combinatorics on morphisms

##  1 Introduction

The free monoid morphisms play an important role in many areas of mathematics
and theoretical computer science (see [1, 8, 9, 11, 12, 13]). On the other
hand, many questions concerning combinatorics on morphisms appear to be rather
difficult. It is instructive to consider the problem of commutativity. If $u$
and $v$ are words, the equation $uv=vu$ holds if and only if there is a word
$w$ such that $u$ and $v$ are powers of $w$ (see [8]). For free monoid
morphisms the situation is more complicated. For two morphisms $g_{1}$ and
$g_{2}$, the equation $g_{1}g_{2}=g_{2}g_{1}$ does not imply that $g_{1}$ and
$g_{2}$ are powers of a third morphism (see, however, [10]).

In this paper we study commuting upper triangular binary morphisms. Let
$X=\\{a,b\\}$ be a binary alphabet. A morphism $g$ from the free monoid
$X^{*}$ into itself is called upper triangular if the matrix of $g$ is upper
triangular. If $a$ is the first letter of $X$, this means that there is a
nonnegative integer $s$ such that $g(a)=a^{s}$. We will characterize all upper
triangular binary morphisms $g_{1}$ and $g_{2}$ such that
$g_{1}g_{2}=g_{2}g_{1}$.

We now outline the contents of this paper. In Section 2 we recall the basic
definitions. In Section 3 we discuss the connections between freeness and
commutativity. In Section 4 we give examples of commuting morphisms. In
Section 5 we study infinite words generated by morphisms. While the morphisms
we study are not uniform, it turns out to be possible to use results
concerning automatic sequences. In particular, we will apply the theorem of
Cobham characterizing those sequences which are automatic in two
multiplicatively independent bases (see [1]).

In Sections 6,7,8 and 9 we characterize all upper triangular binary morphisms
$g_{1}$ and $g_{2}$ such that $g_{1}g_{2}=g_{2}g_{1}$. Assume that $a$ is the
first letter and $b$ is the second letter of the binary alphabet. In Section 6
we consider nonsingular morphisms such that both $g_{1}(b)$ and $g_{2}(b)$
contain at least two occurrences of $b$. We have two cases depending on
whether these numbers are multiplicatively independent or not. The remaining
cases are easier and are discussed in Sections 7,8 and 9.

We assume that the reader is familiar with the basics of free monoid
morphisms, infinite words, automatic sequences and combinatorics on words (see
[1, 8, 9, 11, 12, 13]). For previous results concerning combinatorics on
morphisms see, e.g., [4, 5, 6, 7, 10].

##  2 Definitions

We use standard notation and terminology concerning free monoids and their
morphisms (see [1, 8, 9, 11, 12]). If $X$ is a finite nonempty set, $X^{*}$ is
the free monoid generated by $X$. The identity element of $X^{*}$ is the empty
word denoted by $\varepsilon$. If $u,v,w$ are words such that $uv=w$, we
denote $v=u^{-1}w$.

If $w$ is a word and $a$ is a letter, then $|w|_{a}$ is the number of
occurrences of $a$ in $w$. The length of a word $w$, denoted by $|w|$, is the
total number of letters in $w$.

Let $X$ and $Y$ be finite nonempty alphabets. A mapping $h:X^{*}\to Y^{*}$ is
a morphism if

$h(uv)=h(u)h(v)$

for all $u,v\in X^{*}$. The set of all morphisms from $X^{*}$ to $X^{*}$ is
denoted by $\operatorname{Hom}(X^{*})$. $\operatorname{Hom}(X^{*})$ is a
monoid with respect to the usual product of morphisms.

If $h\in\operatorname{Hom}(X^{*})$ and the letters of $X$ are
$x_{1},\ldots,x_{d}$ in a fixed order, then the matrix $M_{h}$ of $h$ is
defined by

$M_{h}=\left(\begin{array}[]{cccc}|h(x_{1})|_{x_{1}}&|h(x_{2})|_{x_{1}}&\ldots&|h(x_{d})|_{x_{1}}\\\
|h(x_{1})|_{x_{2}}&|h(x_{2})|_{x_{2}}&\ldots&|h(x_{d})|_{x_{2}}\\\
\vdots&\vdots&&\vdots\\\
|h(x_{1})|_{x_{d}}&|h(x_{2})|_{x_{d}}&\ldots&|h(x_{d})|_{x_{d}}\\\
\end{array}\right).$

A morphism $h\in\operatorname{Hom}(X^{*})$ is upper triangular if its matrix
$M_{h}$ is upper triangular. The set of upper triangular morphisms from
$X^{*}$ to $X^{*}$ is denoted by $\operatorname{Tri}(X^{*})$. A morphism
$h\in\operatorname{Hom}(X^{*})$ is nonsingular if its matrix is nonsingular.

Let now $X$ be a finite alphabet and let $h\in\operatorname{Hom}(X^{*})$. If
$w\in X^{*}$ is a word such that $w$ is a prefix of $h(w)$ and
$\lim_{n\rightarrow\infty}|h^{n}(w)|=\infty$, we say that $h$ is prolongable
on $w$ and define the infinite word $h^{\omega}(w)$ by

$h^{\omega}(w)=\lim_{n\rightarrow\infty}h^{n}(w).$

Hence, $h^{\omega}(w)$ is the unique infinite word $u$ such that $h^{n}(w)$ is
a prefix of $u$ for all $n\in{\mathbb{N}}$.

##  3 Connections between freeness and commutativity

A nonempty subset $Y$ of a semigroup $S$ is called free if every element of
the subsemigroup of $S$ generated by $Y$ can be written uniquely as a product
of elements of $Y$. In other words, a set $Y$ is free if for all positive
integers $m$ and $n$ and $u_{1},\ldots,u_{m},v_{1},\ldots,v_{n}\in Y$, the
equation

$u_{1}u_{2}\cdots u_{m}=v_{1}v_{2}\cdots v_{n}$

implies that

$m=n\hskip 8.53581pt\mbox{and}\hskip 8.53581ptu_{i}=v_{i}\hskip
8.53581pt\mbox{for}\hskip 8.53581pti=1,\ldots,m.$

For an excellent introduction to freeness problems over semigroups we refer to
[2].

If a set contains two elements which commute, then the set is not free. If
$u,v\in X^{*}$ and $u\neq v$, then $\\{u,v\\}$ is free if and only if $u$ and
$v$ do not commute (see [8]).

We recall some related results for upper triangular morphisms.

First, let $X=\\{a,b\\}$ be a binary alphabet. Let
$g_{1},g_{2}\in\operatorname{Tri}(X^{*})$. We say that $\\{g_{1},g_{2}\\}$ is
a special pair if $g_{1}(b)$ and $g_{2}(b)$ belong to $a^{*}ba^{*}$ and
exactly one of $g_{1}(a)$ and $g_{2}(a)$ equals $a$.

The following result is from [7].

###### Theorem 1

Let $X=\\{a,b\\}$ and let $g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ be
nonsingular upper triangular morphisms. Assume that $g_{1}\neq g_{2}$. Assume
that $\\{g_{1},g_{2}\\}$ is not a special pair. If $\\{g_{1},g_{2}\\}$ is not
free, then $g_{1}g_{2}=g_{2}g_{1}$.

For larger alphabets we have the following result (see [6]).

###### Theorem 2

Let $X$ be an arbitrary alphabet. Let
$g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ and let $M_{i}$ be the matrix of
$g_{i}$ for $i=1,2$. Assume $g_{1}\neq g_{2}$. Assume that all diagonal
entries of $M_{i}$ are at least two for $i=1,2$. If $\\{g_{1},g_{2}\\}$ is not
free, then $g_{1}g_{2}=g_{2}g_{1}$.

Theorems 1 and 2 imply the following lemma.

###### Lemma 3

Assume that the morphisms $g_{1}$ and $g_{2}$ satisfy the assumptions of
Theorem 1 or Theorem 2. Let $m$ and $n$ be positive integers. If $g_{1}^{m}$
and $g_{2}^{n}$ commute, then $g_{1}$ and $g_{2}$ commute.

Proof. Assume that $g_{1}^{m}g_{2}^{n}=g_{2}^{n}g_{1}^{m}$. Then the pair
$\\{g_{1},g_{2}\\}$ is not free and the claim follows by Theorem 1 or by
Theorem 2. $\Box$

##  4 Examples

In this section we give examples of commuting morphisms. The morphisms
considered in Example 1 can be regarded as direct sums of unary morphisms.

###### Example 1

Let $X=\\{x_{1},\ldots,x_{k}\\}$ be an alphabet having $k$ letters. Let
$(m_{1},\ldots,m_{k})$ and $(n_{1},\ldots,n_{k})$ be $k$-tuples of nonnegative
integers. Define the morphisms $g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ by

$g_{1}(x_{i})=x_{i}^{m_{i}}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{2}(x_{i})=x_{i}^{n_{i}}$

for $i=1,\ldots,k$. Then

$g_{1}g_{2}(x_{i})=g_{1}(x_{i}^{n_{i}})=x_{i}^{m_{i}n_{i}}$

and

$g_{2}g_{1}(x_{i})=g_{2}(x_{i}^{m_{i}})=x_{i}^{m_{i}n_{i}}$

for $i=1,\ldots,k$. Hence

$g_{1}g_{2}=g_{2}g_{1}.$

###### Example 2

Let $X=\\{a,b\\}$ and define the morphisms
$g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ by

$g_{1}(a)=a,\hskip 8.53581ptg_{1}(b)=b^{2}$

and

$g_{2}(a)=a^{2},\hskip 8.53581ptg_{2}(b)=b.$

By Example 1 the morphisms $g_{1}$ and $g_{2}$ commute. However, there do not
exist positive integers $m$, $n$ and a morphism
$g\in\operatorname{Hom}(X^{*})$ such that $g_{1}=g^{m}$ and $g_{2}=g^{n}$. To
see this, assume that such $g$, $m$ and $n$ exist. Then neither $g(a)$ nor
$g(b)$ is the empty word. Furthermore, either $|g(a)|=1$ or $|g(b)|=1$ but not
both. Without loss of generality assume that $|g(a)|=1$. Then $g(a)=a$ or
$g(a)=b$. The first alternative is not possible since $g^{n}(a)=a^{2}$. The
second alternative is not possible since it would imply that the only word of
length one in $g(X^{*})$ is $b$.

###### Example 3

Let $X=\\{a,b\\}$ and let $p$ and $q$ be positive integers. Let $\alpha$ be a
nonnegative integer. Define the morphisms
$g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ by $g_{1}(a)=g_{2}(a)=a$,
$g_{1}(b)=(ba^{\alpha})^{p-1}b$, $g_{2}(b)=(ba^{\alpha})^{q-1}b$.

To prove the equation $g_{1}g_{2}=g_{2}g_{1}$, let $z=ba^{\alpha}$. Then
$g_{1}(z)=z^{p}$ and $g_{2}(z)=z^{q}$. Hence $g_{1}g_{2}(z)=g_{2}g_{1}(z)$.
Therefore $g_{1}g_{2}(b)a^{\alpha}=g_{2}g_{1}(b)a^{\alpha}$, which implies
that $g_{1}g_{2}(b)=g_{2}g_{1}(b)$. Trivially $g_{1}g_{2}(a)=g_{2}g_{1}(a)$.

###### Example 4

Let $X=\\{a,b\\}$ and let $g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ be
nonsingular upper triangular binary morphisms. Assume that there exist
positive integers $m$ and $n$ such that $g_{1}^{m}=g_{2}^{n}$. Assume
$g_{1}\neq g_{2}$. Then $\\{g_{1},g_{2}\\}$ is not a special pair. Indeed, if
one of $g_{1}(a)$ and $g_{2}(a)$ equals $a$, then both do. Hence Theorem 1
implies that $g_{1}g_{2}=g_{2}g_{1}$.

Let $u$ and $v$ be words over the binary alphabet $X=\\{a,b\\}$. We say that
$u$ and $v$ are $a$-conjugates if there exist nonnegative integers $p,q,r,s$
and a word $w$ such that

$u=a^{p}wa^{q},\hskip 8.53581ptv=a^{r}wa^{s}\hskip 8.53581pt\mbox{and}\hskip
8.53581ptp+q=r+s.$

###### Example 5

Let $X=\\{a,b\\}$ and let $g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ be
nonsingular upper triangular morphisms. Assume that $g_{1}(a)=g_{2}(a)=a$.
Assume that there are positive integers $m$ and $n$ such that $g_{1}^{n}(b)$
and $g_{2}^{m}(b)$ are $a$-conjugates. We show that these conditions imply
that $g_{1}$ and $g_{2}$ commute. By Lemma 3 it is enough to show that
$g_{1}^{n}$ and $g_{2}^{m}$ commute.

By assumption, there exist nonnegative integers
$\gamma_{1},\gamma_{2},\delta_{1},\delta_{2},\alpha_{1},\ldots,\alpha_{p-1}$
such that $g_{1}^{n}(b)=a^{\gamma_{1}}za^{\gamma_{2}}$ and
$g_{2}^{m}(b)=a^{\delta_{1}}za^{\delta_{2}}$, where
$z=ba^{\alpha_{1}}ba^{\alpha_{2}}b\cdots ba^{\alpha_{p-1}}b$ and
$\gamma_{1}+\gamma_{2}=\delta_{1}+\delta_{2}$. Then

$\displaystyle g_{1}^{n}g_{2}^{m}(b)$ $\displaystyle=$ $\displaystyle
a^{\delta_{1}}g_{1}^{n}(z)a^{\delta_{2}}$ $\displaystyle=$ $\displaystyle
a^{\delta_{1}+\gamma_{1}}za^{\gamma_{2}+\alpha_{1}+\gamma_{1}}za^{\gamma_{2}+\alpha_{2}+\gamma_{1}}za^{\gamma_{2}}\cdots
a^{\gamma_{1}}za^{\gamma_{2}+\alpha_{p-1}+\gamma_{1}}za^{\gamma_{2}+\delta_{2}}$

and

$\displaystyle g_{2}^{m}g_{1}^{n}(b)$ $\displaystyle=$ $\displaystyle
a^{\gamma_{1}}g_{2}^{m}(z)a^{\gamma_{2}}$ $\displaystyle=$ $\displaystyle
a^{\gamma_{1}+\delta_{1}}za^{\delta_{2}+\alpha_{1}+\delta_{1}}za^{\delta_{2}+\alpha_{2}+\delta_{1}}za^{\delta_{2}}\cdots
a^{\delta_{1}}za^{\delta_{2}+\alpha_{p-1}+\delta_{1}}za^{\delta_{2}+\gamma_{2}}.$

Therefore $g_{1}^{n}g_{2}^{m}(b)=g_{2}^{m}g_{1}^{n}(b)$. Hence
$g_{1}^{n}g_{2}^{m}=g_{2}^{m}g_{1}^{n}$.

We conclude this section by two examples involving singular morphisms.

###### Example 6

Let $X=\\{a,b\\}$. Define the morphisms
$g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ by

$g_{1}(a)=g_{2}(a)=\varepsilon,\hskip 8.53581ptg_{1}(b)=w^{i},\hskip
8.53581ptg_{2}(b)=w^{j}$

where $w\in X^{*}$ and $i$ and $j$ are nonnegative integers. Then

$g_{1}g_{2}(b)=g_{1}(w^{j})=w^{ij|w|_{b}}\hskip 8.53581pt\mbox{and}\hskip
8.53581ptg_{2}g_{1}(b)=g_{2}(w^{i})=w^{ij|w|_{b}}.$

Hence $g_{1}g_{2}=g_{2}g_{1}$.

###### Example 7

Let $X=\\{a,b\\}$. Define the morphisms
$g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ by

$g_{1}(a)=\varepsilon,\hskip 8.53581ptg_{1}(b)=(a^{\alpha}ba^{\beta})^{i}$

and

$g_{2}(a)=a,\hskip 8.53581ptg_{2}(b)=(ba^{\alpha+\beta})^{j}b$

where $\alpha,\beta,i,j$ are nonnegative integers. Then

$g_{1}g_{2}(b)=g_{1}((ba^{\alpha+\beta})^{j}b)=g_{1}(b^{j+1})=(a^{\alpha}ba^{\beta})^{i(j+1)}$

and

$g_{2}g_{1}(b)=g_{2}((a^{\alpha}ba^{\beta})^{i})=(a^{\alpha}(ba^{\alpha+\beta})^{j}ba^{\beta})^{i}=(a^{\alpha}ba^{\beta})^{i(j+1)}.$

Hence $g_{1}g_{2}=g_{2}g_{1}$.

##  5 Properties of infinite words generated by upper triangular binary
morphisms

Let $X=\\{a,b\\}$ be a binary alphabet. Regard $a$ as the first letter of $X$
and $b$ as the second letter of $X$.

Let $h\in\operatorname{Tri}(X^{*})$. Assume that $h$ is nonsingular. Then
there exist a nonnegative integer $\gamma$ and a word $v$ such that
$h(b)=a^{\gamma}bv$. Let $c$ be a new letter and let $Y=X\cup\\{c\\}$. Regard
$c$ as the third letter of $Y$. Define the morphism ${\bf
RIGHT}(h)\in\operatorname{Tri}(Y^{*})$ by

$\mbox{{\bf RIGHT}}(h)(x)=h(x),\hskip 8.53581pt\mbox{ if }x\in X,\hskip
17.07164pt\mbox{{\bf RIGHT}}(h)(c)=cv.$

Assume that $v\neq\varepsilon$. Then we define the infinite word $\omega(h)$
by

$\omega(h)=bc^{-1}{\bf RIGHT}(h)^{\omega}(c).$

In other words, the infinite word $\omega(h)$ is obtained from ${\bf
RIGHT}(h)^{\omega}(c)$ by replacing its first letter $c$ by $b$. Hence, if $n$
is any positive integer, the word obtained from $h^{n}(b)$ by deleting all
occurrences of $a$ preceding the first occurrence of $b$ is a prefix of
$\omega(h)$.

For the proof of the following lemma see [6].

###### Lemma 4

Let $g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ be nonsingular morphisms. Let
$h_{i}={\bf RIGHT}(g_{i})$ for $i=1,2$. Assume that $h_{i}(c)\neq c$ for
$i=1,2$. If $g_{1}g_{2}=g_{2}g_{1}$, then $\omega(g_{1})=\omega(g_{2})$.

We will now study some properties of the infinite words defined above.

Let $w$ be an infinite word over $X$ having infinitely many occurrences of
$b$. For $i\geq 1$, let $A_{w}(i)$ be the number of occurrences of the letter
$a$ in $w$ between the $i$th and the $(i+1)$th occurrences of $b$ in $w$.

The following lemma gives a formula for $A_{w}(i)$, which will be used
repeatedly.

###### Lemma 5

Let $h\in\operatorname{Tri}(X^{*})$ be the morphism defined by

$h(a)=a^{s}\hskip 8.53581pt\mbox{ and }\hskip
8.53581pth(b)=a^{\gamma_{1}}ba^{\alpha_{1}}ba^{\alpha_{2}}b\cdots
ba^{\alpha_{p-1}}ba^{\gamma_{2}},$

where $s\geq 1$, $p\geq 2$ and
$\gamma_{1},\gamma_{2},\alpha_{1},\ldots,\alpha_{p-1}\geq 0$. Let
$w=\omega(h)$. Then

(i) $A_{w}(i+pn)=\alpha_{i}$ if $i\in\\{1,\ldots,p-1\\}$ and $n\geq 0$.

(ii) $A_{w}(pi)=sA_{w}(i)+\gamma_{1}+\gamma_{2}$ if $i\geq 1$.

(iii) If $m\geq 1$, $k\geq 0$, $d_{m},\ldots,d_{m+k}\in\\{0,1,\ldots,p-1\\}$
and $d_{m}\neq 0$, then

$A_{w}(d_{m}p^{m}+d_{m+1}p^{m+1}+\cdots+d_{m+k}p^{m+k})=\alpha_{d_{m}}s^{m}+(\gamma_{1}+\gamma_{2})(1+s+\cdots+s^{m-1}).$

Proof. The infinite word $w$ belongs to
$a^{-\gamma_{1}}h(b)\\{a,h(b)\\}^{\omega}$ and $|h(b)|_{b}=p$. This implies
(i).

To prove (ii), let

$w=w_{1}ba^{j}b\cdots,$

where $|w_{1}b|_{b}=i$ and $j=A_{w}(i)$. Then

$w=a^{-\gamma_{1}}\,h(w_{1})\,h(b)\,a^{js}\,h(b)\,\cdots,$

where $|h(w_{1})h(b)|_{b}=p|w_{1}b|_{b}=pi$. Hence

$A_{w}(pi)=\gamma_{2}+js+\gamma_{1}=sA_{w}(i)+\gamma_{1}+\gamma_{2}.$

This proves (ii).

If $m=1$, (iii) is a consequence of (i) and (ii). Assume inductively that
(iii) holds for $m\geq 1$. Assume that $k\geq 0$,
$e_{m+1},\ldots,e_{m+1+k}\in\\{0,1,\ldots,p-1\\}$ and $e_{m+1}\neq 0$. Then

$A_{w}(e_{m+1}p^{m+1}+e_{m+2}p^{m+2}+\cdots+e_{m+k+1}p^{m+k+1})$
$=sA_{w}(e_{m+1}p^{m}+e_{m+2}p^{m+1}+\cdots+e_{m+k+1}p^{m+k})+\gamma_{1}+\gamma_{2}$
$=s(\alpha_{e_{m+1}}s^{m}+(\gamma_{1}+\gamma_{2})(1+s+\cdots+s^{m-1}))+\gamma_{1}+\gamma_{2}$
$=\alpha_{e_{m+1}}s^{m+1}+(\gamma_{1}+\gamma_{2})(1+s+\cdots+s^{m}).$

Here the first equation follows by (ii) and the second equation by the
inductive hypothesis. This proves (iii). $\Box$

The final lemma of this section studies the case of eventually periodic words.

###### Lemma 6

Let $h$ be as in Lemma 5. Assume that $w=\omega(h)$ is eventually periodic.
Then $\gamma_{1}=\gamma_{2}=0$ and
$\alpha_{1}=\alpha_{2}=\cdots=\alpha_{p-1}$.

Proof. Since $w$ is eventually periodic, also the sequence $(A_{w}(i))_{i\geq
1}$ is eventually periodic. In particular, this sequence takes only finitely
many different values. Hence, by Lemma 5, we have $\gamma_{1}=\gamma_{2}=0$.
If $\alpha_{1}=\cdots=\alpha_{p-1}=0$, the claim of the lemma holds. Assume
that some $\alpha_{i}$ is nonzero. Then Lemma 5 implies that $s=1$.

Assume

$A_{w}(i)=A_{w}(i+d)\hskip 8.53581pt\mbox{ for all }i\geq i_{0},$

where $i_{0}$ is an integer and $d=ep^{m}+fp^{m+1}$ for some $m\geq 0$,
$e\in\\{1,\ldots,p-1\\}$ and $f\geq 0$. Choose an integer $n$ such that $n>m$
and $p^{n}\geq i_{0}$. Then

$A_{w}(jp^{n})=A_{w}(ep^{m}+fp^{m+1}+jp^{n})$

for $j=1,\ldots,p-1$. Now Lemma 5 implies that

$\alpha_{j}=\alpha_{e}$

for $j=1,\ldots,p-1$. This implies the claim. $\Box$

##  6 Commuting nonsingular morphisms $g_{1}$ and $g_{2}$ such that both
$g_{1}(b)$ and $g_{2}(b)$ have at least two occurrences of $b$

In this section $X=\\{a,b\\}$. We will consider nonsingular morphisms
$g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ such that $|g_{i}(b)|_{b}\geq 2$ for
$i=1,2$. We have two different cases to consider according to whether
$|g_{1}(b)|_{b}$ and $|g_{2}(b)|_{b}$ are multiplicatively independent or not.
Recall that two integers $p\geq 2$ and $q\geq 2$ are multiplicatively
dependent if there are positive integers $r,m,n$ such that $p=r^{m}$ and
$q=r^{n}$ (see [1]).

###  6.1 The numbers of occurrences of $b$ are multiplicatively independent

###### Lemma 7

Let $g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, be morphisms such that

$g_{1}(a)=a^{s}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{1}(b)=a^{\gamma_{1}}ba^{\alpha_{1}}ba^{\alpha_{2}}b\cdots
ba^{\alpha_{p-1}}ba^{\gamma_{2}}$

and

$g_{2}(a)=a^{t}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{2}(b)=a^{\delta_{1}}ba^{\beta_{1}}ba^{\beta_{2}}b\cdots
ba^{\beta_{q-1}}ba^{\delta_{2}}$

where $s,t\geq 1$, $p,q\geq 2$ and
$\gamma_{1},\gamma_{2},\delta_{1},\delta_{2},\alpha_{1},\ldots,\alpha_{p-1},\beta_{1},\ldots,\beta_{q-1}\geq
0$. Assume that $p$ and $q$ are multiplicatively independent. Assume that
$g_{1}(b)\not\in b^{*}$. Assume that $\omega(g_{1})=\omega(g_{2})$. Then
$s=t=1$ and $\gamma_{1}=\gamma_{2}=\delta_{1}=\delta_{2}=0$.

Proof. Let $z$ be the smallest positive integer such that
$\beta_{z}=\max\\{\beta_{i}\mid i=1,2,\ldots,q-1\\}$. Then $\beta_{z}\geq 0$
but it is possible that $\beta_{z}=0$.

By Lemma 5 we have

$A_{\omega(g_{2})}(i)\leq A_{\omega(g_{2})}(zq^{n})$ (1)

for $n\geq 1$ and $i<zq^{n}$. Consider the numbers $zq^{n}$, $n\geq 1$. For
$n\geq 1$, let

$zq^{n}=p^{\tau(n)}(i_{n}+pj_{n}),$

where $\tau(n),j_{n}\geq 0$ and $i_{n}\in\\{1,\ldots,p-1\\}$.

Now, the set $\\{j_{n}\mid n\geq 1\\}$ is infinite. To see this, assume on the
contrary that it is finite. Then there are integers $m$ and $n$ such that
$i_{m}+pj_{m}=i_{n}+pj_{n}$ and $m<n$. This implies that

$\frac{zq^{m}}{p^{\tau(m)}}=\frac{zq^{n}}{p^{\tau(n)}}\ .$

Hence $p^{\tau(n)-\tau(m)}=q^{n-m}$, which contradicts the assumption. It
follows that the set $\\{j_{n}\mid n\geq 1\\}$ is infinite. Therefore there is
an integer $n\geq 1$ such that

$zq^{n}=p^{\tau(n)}(i_{n}+x_{1}p+\cdots+x_{k}p^{k})$

where $k\geq 2$ and $x_{k}\neq 0$.

Next, let $y$ be an integer such that $\alpha_{y}=\max\\{\alpha_{i}\mid
i=1,\ldots,p-1\\}$ and consider the numbers

$K_{1}=yp^{\tau(n)+k-1}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptK_{2}=zq^{n}=p^{\tau(n)}(i_{n}+x_{1}p+\cdots+x_{k}p^{k}).$

Then we have $K_{1}<K_{2}$. Therefore (1) implies that

$A_{\omega(g_{1})}(K_{1})=A_{\omega(g_{2})}(K_{1})\leq
A_{\omega(g_{2})}(K_{2})=A_{\omega(g_{1})}(K_{2}).$

On the other hand, Lemma 5 implies that

$A_{\omega(g_{1})}(K_{1})=\alpha_{y}s^{\tau(n)+k-1}+(\gamma_{1}+\gamma_{2})(1+s+\cdots+s^{\tau(n)+k-2})$

and

$A_{\omega(g_{1})}(K_{2})=\alpha_{i_{n}}s^{\tau(n)}+(\gamma_{1}+\gamma_{2})(1+s+\cdots+s^{\tau(n)-1}).$

Since $A_{\omega(g_{1})}(K_{1})\leq A_{\omega(g_{1})}(K_{2})$, we have
$\gamma_{1}=\gamma_{2}=0$. If ${\alpha}_{y}=0$, we would have $g_{1}(b)\in
b^{*}$ which contradicts our assumption. Hence $\alpha_{y}\neq 0$ and $s=1$.

Since $\gamma_{1}=\gamma_{2}=0$ and $s=1$, we have
$A_{\omega(g_{1})}(i)\in\\{\alpha_{1},\ldots,\alpha_{p-1}\\}$ for all $i\geq
1$. Now the equality $\omega(g_{1})=\omega(g_{2})$ implies that
$\delta_{1}=\delta_{2}=0$ and $t=1$. $\Box$

The next theorem gives all nonsingular morphisms
$g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, such that
$g_{1}g_{2}=g_{2}g_{1}$ and the numbers $|g_{1}(b)|_{b}$ and $|g_{2}(b)|_{b}$
are multiplicatively independent integers larger than one. In the proof we use
automatic sequences and Cobham’s theorem characterizing sequences which are
$p$-automatic and $q$-automatic for multiplicatively independent integers $p$
and $q$ (see [1]).

###### Theorem 8

Let $g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, be morphisms such that

$g_{1}(a)=a^{s}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{1}(b)=a^{\gamma_{1}}ba^{\alpha_{1}}ba^{\alpha_{2}}b\cdots
ba^{\alpha_{p-1}}ba^{\gamma_{2}}$

and

$g_{2}(a)=a^{t}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{2}(b)=a^{\delta_{1}}ba^{\beta_{1}}ba^{\beta_{2}}b\cdots
ba^{\beta_{q-1}}ba^{\delta_{2}}$

where $s,t\geq 1$, $p,q\geq 2$ and
$\gamma_{1},\gamma_{2},\delta_{1},\delta_{2},\alpha_{1},\ldots,\alpha_{p-1},\beta_{1},\ldots,\beta_{q-1}\geq
0$. Assume that $p$ and $q$ are multiplicatively independent. Then
$g_{1}g_{2}=g_{2}g_{1}$ if and only if at least one of the following
conditions holds:

(i) $g_{i}(b)\in b^{*}$ for $i=1,2$,

(ii) $g_{1}(a)=g_{2}(a)=a$, $g_{1}(b)=(ba^{\alpha})^{p-1}b$ and
$g_{2}(b)=(ba^{\alpha})^{q-1}b$, where $\alpha=\alpha_{1}$.

Proof. If (i) or (ii) holds, then $g_{1}g_{2}=g_{2}g_{1}$ (see Examples 1 and
3).

Assume that $g_{1}g_{2}=g_{2}g_{1}$. By Lemma 4 we have
$\omega(g_{1})=\omega(g_{2})$. Hence, if $g_{1}(b)\in b^{*}$, also
$g_{2}(b)\in b^{*}$ and (i) holds. Assume that $g_{1}(b)\not\in b^{*}$ and
$g_{2}(b)\not\in b^{*}$.

Now Lemma 7 implies that $s=t=1$ and
$\gamma_{1}=\gamma_{2}=\delta_{1}=\delta_{2}=0$. By Lemma 5, the sequence
$(A_{\omega(g_{1})}(i))_{i\geq 1}$ is $p$-automatic and the sequence
$(A_{\omega(g_{2})}(i))_{i\geq 1}$ is $q$-automatic. Since these sequences are
equal and the numbers $p$ and $q$ are multiplicatively independent,
$(A_{\omega(g_{1})}(i))_{i\geq 1}$ is eventually periodic. Hence
$\omega(g_{1})$ is eventually periodic. Now Lemma 6 implies that
$\alpha_{1}=\alpha_{2}=\cdots=\alpha_{p-1}$. Hence
$g_{1}(b)=(ba^{\alpha})^{p-1}b$ where $\alpha=\alpha_{1}$.

A similar argument shows that $g_{2}(b)=(ba^{\beta})^{q-1}b$, where
$\beta=\beta_{1}$. Since $\omega(g_{1})=\omega(g_{2})$, we have
$\alpha_{1}=\beta_{1}$. Hence (ii) holds. $\Box$

###  6.2 The numbers of occurrences of $b$ are multiplicatively dependent

In this subsection we first consider the case that $|g_{1}(b)|_{b}$ and
$|g_{2}(b)|_{b}$ are equal.

###### Lemma 9

Let $g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, be morphisms such that

$g_{1}(a)=a^{s}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{1}(b)=a^{\gamma_{1}}ba^{\alpha_{1}}ba^{\alpha_{2}}b\cdots
ba^{\alpha_{p-1}}ba^{\gamma_{2}}$

and

$g_{2}(a)=a^{t}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{2}(b)=a^{\delta_{1}}ba^{\beta_{1}}ba^{\beta_{2}}b\cdots
ba^{\beta_{q-1}}ba^{\delta_{2}}$

where $s,t\geq 1$, $p,q\geq 2$ and
$\gamma_{1},\gamma_{2},\delta_{1},\delta_{2},\alpha_{1},\ldots,\alpha_{p-1},\beta_{1},\ldots,\beta_{q-1}\geq
0$. Assume that $p=q$. If $g_{1}g_{2}=g_{2}g_{1}$, then at least one of the
following conditions holds:

(i) $g_{1}=g_{2}$,

(ii) $g_{i}(b)\in b^{*}$ for $i=1,2$,

(iii) $g_{1}(a)=g_{2}(a)=a$ and the words $g_{1}(b)$ and $g_{2}(b)$ are
$a$-conjugates.

Proof. Assume that $g_{1}g_{2}=g_{2}g_{1}$. Let $w_{i}=\omega(g_{i})$ for
$i=1,2$. By Lemma 4 we have $w_{1}=w_{2}$. Since $p=q$, the equation
$w_{1}=w_{2}$ implies that $\alpha_{i}=\beta_{i}$ for $i=1,\ldots,p-1$.

If $g_{1}(b)\in b^{*}$, we have $w_{1}=b^{\omega}$. This implies that
$g_{2}(b)\in b^{*}$ and hence (ii) holds.

Assume that $g_{1}(b)\not\in b^{*}$ and $g_{2}(b)\not\in b^{*}$.

Next, assume that $A_{w_{1}}(i)$ takes only finitely many different values.
Then Lemma 5 implies that $\gamma_{1}=\gamma_{2}=0$. Since $g_{1}(b)\not\in
b^{*}$, some $\alpha_{i}$ is nonzero. This implies that $s=1$. By a similar
reasoning it is seen that $\delta_{1}=\delta_{2}=0$ and $t=1$. Then
$g_{1}(a)=g_{2}(a)$ and $g_{1}(b)=g_{2}(b)$ and condition (i) holds.

Assume then that $A_{w_{1}}(i)$ takes infinitely many values. Since
$A_{w_{1}}(pi)=A_{w_{2}}(pi)$ for all $i\geq 1$, Lemma 5 implies that

$sA_{w_{1}}(i)+\gamma_{1}+\gamma_{2}=tA_{w_{2}}(i)+\delta_{1}+\delta_{2}$

for all $i\geq 1$. Because this equation holds for infinitely many different
values of $A_{w_{1}}(i)=A_{w_{2}}(i)$, it follows that $s=t$ and
$\gamma_{1}+\gamma_{2}=\delta_{1}+\delta_{2}$. If now $s=t=1$, we have (iii).

Assume that $s=t>1$. By counting the number of occurrences of $a$ before the
first occurrence of $b$ in $g_{1}g_{2}(b)=g_{2}g_{1}(b)$, we see that

$s\delta_{1}+\gamma_{1}=t\gamma_{1}+\delta_{1}.$

By counting the number of occurrences of $a$ after the last occurrence of $b$
in $g_{1}g_{2}(b)=g_{2}g_{1}(b)$, we see that

$\gamma_{2}+s\delta_{2}=\delta_{2}+t\gamma_{2}.$

Hence $(s-1)\delta_{1}=(t-1)\gamma_{1}$ and $(s-1)\delta_{2}=(t-1)\gamma_{2}$.
Since $s=t>1$ we have $\gamma_{1}=\delta_{1}$ and $\gamma_{2}=\delta_{2}$.
Therefore condition (i) holds. $\Box$

The next theorem gives all nonsingular morphisms
$g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, such that
$g_{1}g_{2}=g_{2}g_{1}$ and the numbers $|g_{1}(b)|_{b}$ and $|g_{2}(b)|_{b}$
are multiplicatively dependent integers larger than one.

###### Theorem 10

Let $g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, be morphisms such that

$g_{1}(a)=a^{s}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{1}(b)=a^{\gamma_{1}}ba^{\alpha_{1}}ba^{\alpha_{2}}b\cdots
ba^{\alpha_{p-1}}ba^{\gamma_{2}}$

and

$g_{2}(a)=a^{t}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{2}(b)=a^{\delta_{1}}ba^{\beta_{1}}ba^{\beta_{2}}b\cdots
ba^{\beta_{q-1}}ba^{\delta_{2}}$

where $s,t\geq 1$, $p,q\geq 2$ and
$\gamma_{1},\gamma_{2},\delta_{1},\delta_{2},\alpha_{1},\ldots,\alpha_{p-1},\beta_{1},\ldots,\beta_{q-1}\geq
0$. Assume that $p=r^{m}$ and $q=r^{n}$ where $m,n,r$ are positive integers.
Then $g_{1}g_{2}=g_{2}g_{1}$ if and only if at least one of the following
conditions holds:

(i) $g_{1}^{n}=g_{2}^{m}$,

(ii) $g_{i}(b)\in b^{*}$ for $i=1,2$,

(iii) $g_{1}(a)=g_{2}(a)=a$ and the words $g_{1}^{n}(b)$ and $g_{2}^{m}(b)$
are $a$-conjugates.

Proof. If at least one of the conditions (i), (ii) or (iii) holds, then
$g_{1}g_{2}=g_{2}g_{1}$ (see Examples 1, 4 and 5).

Assume $g_{1}g_{2}=g_{2}g_{1}$. Let $h_{1}=g_{1}^{n}$ and $h_{2}=g_{2}^{m}$.
Then $|h_{1}(a)|_{a}=s^{n}$, $|h_{2}(a)|_{a}=t^{m}$ and
$|h_{1}(b)|_{b}=p^{n}=r^{mn}=q^{m}=|h_{2}(b)|_{b}$.

Since $h_{1}h_{2}=h_{2}h_{1}$, Lemma 9 implies that at least one of the
following conditions holds:

(a) $h_{1}=h_{2}$,

(b) $h_{i}(b)\in b^{*}$ for $i=1,2$,

(c) $h_{1}(a)=h_{2}(a)=a$ and the words $h_{1}(b)$ and $h_{2}(b)$ are
$a$-conjugates.

Now (a) implies (i), (b) implies (ii) and (c) implies (iii). $\Box$

##  7 Commuting nonsingular morphisms $g_{1}$ and $g_{2}$ such that
$|g_{1}(b)|_{b}=1$ and $|g_{2}(b)|_{b}\geq 2$

Let $X=\\{a,b\\}$. The following theorem gives all commuting nonsingular
morphisms $g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, such that
$|g_{1}(b)|_{b}=1$ and $|g_{2}(b)|_{b}\geq 2$.

###### Theorem 11

Let $g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, be morphisms such that

$g_{1}(a)=a^{s}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{1}(b)=a^{\gamma_{1}}ba^{\gamma_{2}}$

and

$g_{2}(a)=a^{t}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{2}(b)=a^{\delta_{1}}ba^{\beta_{1}}ba^{\beta_{2}}b\cdots
ba^{\beta_{q-1}}ba^{\delta_{2}}$

where $s,t\geq 1$, $q\geq 2$ and
$\gamma_{1},\gamma_{2},\delta_{1},\delta_{2},\beta_{1},\ldots,\beta_{q-1}\geq
0$. Then $g_{1}g_{2}=g_{2}g_{1}$ if and only if at least one of the following
conditions holds:

(i) $g_{1}(x)=x$ for all $x\in\\{a,b\\}$,

(ii) $g_{i}(b)\in b^{*}$ for $i=1,2$.

Proof. If (i) or (ii) holds, then $g_{1}g_{2}=g_{2}g_{1}$.

Assume then that $g_{1}g_{2}=g_{2}g_{1}$. Let $h_{1}=g_{1}g_{2}$ and
$h_{2}=g_{2}$. Then $h_{1}h_{2}=h_{2}h_{1}$. Since
$|h_{1}(b)|_{b}=|h_{2}(b)|_{b}\geq 2$, Lemma 9 implies that at least one of
the following conditions holds:

(a) $h_{1}=h_{2}$,

(b) $h_{i}(b)\in b^{*}$ for $i=1,2$,

(c) $h_{1}(a)=h_{2}(a)=a$ and the words $h_{1}(b)$ and $h_{2}(b)$ are
$a$-conjugates.

Now (a) implies (i), (b) implies (ii) and (c) implies (i). $\Box$

##  8 Commuting nonsingular morphisms $g_{1}$ and $g_{2}$ such that
$|g_{1}(b)|_{b}=|g_{2}(b)|_{b}=1$

Let $X=\\{a,b\\}$. In this section we give all commuting nonsingular morphisms
$g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, such that
$|g_{1}(b)|_{b}=|g_{2}(b)|_{b}=1$.

###### Proposition 12

Let $g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, be morphisms such that

$g_{1}(a)=a^{s}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{1}(b)=a^{\gamma_{1}}ba^{\gamma_{2}}$

and

$g_{2}(a)=a^{t}\hskip 8.53581pt\mbox{ and }\hskip
8.53581ptg_{2}(b)=a^{\delta_{1}}ba^{\delta_{2}}$

where $s,t\geq 1$ and $\gamma_{1},\gamma_{2},\delta_{1},\delta_{2}\geq 0$.
Then $g_{1}g_{2}=g_{2}g_{1}$ if and only if

$(s-1)\delta_{i}=(t-1)\gamma_{i}\hskip 8.53581pt\mbox{ for }\hskip
8.53581pti=1,2.$

Proof. We have

$g_{1}g_{2}(b)=a^{s\delta_{1}+\gamma_{1}}ba^{s\delta_{2}+\gamma_{2}}\hskip
8.53581pt\mbox{and}\hskip
8.53581ptg_{2}g_{1}(b)=a^{t\gamma_{1}+\delta_{1}}ba^{t\gamma_{2}+\delta_{2}}.$

Hence $g_{1}g_{2}=g_{2}g_{1}$ if and only if
$s\delta_{1}+\gamma_{1}=t\gamma_{1}+\delta_{1}$ and
$s\delta_{2}+\gamma_{2}=t\gamma_{2}+\delta_{2}$. This implies the claim.
$\Box$

##  9 Commuting morphisms $g_{1}$ and $g_{2}$ such that $g_{1}$ or $g_{2}$ is
singular

Let $X=\\{a,b\\}$ and let $h\in\operatorname{Tri}(X^{*})$. If $h$ is singular,
then $h(a)=\varepsilon$ or $h(b)\in a^{*}$. In this section we give all
commuting morphisms $g_{i}\in\operatorname{Tri}(X^{*})$, $i=1,2$, such that
$g_{1}$ or $g_{2}$ is singular.

###### Proposition 13

Let $g_{i}\in\operatorname{Tri}(X^{*})$ for $i=1,2$. Assume that $g_{1}(b)\in
a^{*}$. Then $g_{1}g_{2}=g_{2}g_{1}$ if and only if
$|g_{1}g_{2}(b)|=|g_{2}g_{1}(b)|$ or, equivalently,

$|g_{1}(a)||g_{2}(b)|_{a}+|g_{1}(b)||g_{2}(b)|_{b}=|g_{2}(a)||g_{1}(b)|.$

Proof. Since $g_{2}g_{1}(b)\in a^{*}$ and $g_{1}g_{2}(b)\in a^{*}$, the claim
holds. $\Box$

###### Proposition 14

Let $g_{1},g_{2}\in\operatorname{Tri}(X^{*})$ be morphisms such that

$g_{1}(a)=\varepsilon,\hskip 8.53581ptg_{1}(b)=u$

and

$g_{2}(a)=a^{t},\hskip 8.53581ptg_{2}(b)=v,$

where $t\geq 0$ and both $u$ and $v$ have at least one occurrence of $b$. Then
$g_{1}g_{2}=g_{2}g_{1}$ if and only if at least one of the following
conditions holds:

(i) $g_{1}=g_{2}$,

(ii) $g_{2}(x)=x$ for all $x\in X$,

(iii) $t=0$ and $uv=vu$,

(iv) $g_{i}(b)\in b^{*}$ for $i=1,2$,

(v) $t=1$ and there exist nonnegative integers $\alpha,\beta,i$ and $j$ such
that

$g_{1}(b)=(a^{\alpha}ba^{\beta})^{i},\hskip
8.53581ptg_{2}(b)=(ba^{\alpha+\beta})^{j}b.$

Proof. If (i), (ii), (iii), (iv) or (v) holds, then $g_{1}g_{2}=g_{2}g_{1}$
(see Examples 1, 6, 7).

Assume that $g_{1}g_{2}=g_{2}g_{1}$. Then

$g_{2}(u)=g_{2}g_{1}(b)=g_{1}g_{2}(b)=g_{1}(v)=u^{|v|_{b}}.$

If $u\in b^{*}$, this equation implies that $v\in b^{*}$. Hence (iv) holds.
Assume that $u\not\in b^{*}$.

Next, assume that $t=0$. Then $u^{|v|_{b}}=g_{2}(u)=v^{|u|_{b}}$, which shows
that (iii) holds.

Assume then that $t\neq 0$. By assumption, $|v|_{b}=1$ or $|v|_{b}\geq 2$.
Assume first that $|v|_{b}=1$. Then the equation $g_{2}(u)=u$ shows that (ii)
holds. Assume finally that $|v|_{b}\geq 2$. Then $\omega(g_{2})$ is defined.
Since $\omega(g_{2})$ is obtained from $g_{2}^{\omega}(u)=u^{\omega}$ by
deleting the occurrences of $a$ preceding the first occurrence of $b$, the
word $\omega(g_{2})$ is eventually periodic. Hence $t=1$. By Lemma 6 there are
nonnegative integers $\gamma$ and $j$ such that $g_{2}(b)=(ba^{\gamma})^{j}b$.
Since $\omega(g_{2})=(ba^{\gamma})^{\omega}$, there exist nonnegative integers
$\alpha,\beta$ and $i$ such that $g_{1}(b)=(a^{\alpha}ba^{\beta})^{i}$ and
$\gamma=\alpha+\beta$. Hence (v) holds. $\Box$

For a systematic study of the equation $h(w)=w^{n}$, $n\geq 2$, for binary
morphisms, see [3].

## References

  * [1] J.-P. Allouche and J. Shallit, Automatic Sequences. Theory, Applications, Generalizations, Cambridge University Press, 2003.
  * [2] J. Cassaigne and F. Nicolas, On the decidability of semigroup freeness, RAIRO \- Theor. Inform. Appl. 46 (2012) 355–399.
  * [3] T. Harju and M. Linna, The equations $h(w)=w^{n}$ in binary alphabets, Theoret. Comput. Sci. 33 (1984) 327–329.
  * [4] J. Honkala, Remarks concerning the freeness problem over morphism and matrix semigroups, Theoret. Comput. Sci. 557 (2014) 115–119.
  * [5] J. Honkala, The freeness problem for uniform free monoid morphisms, in M. Gheorghe, I. Petre, M. Perez-Jimenez, G. Rozenberg, A. Salomaa (Eds.): Multidisciplinary Creativity, Spandugino, 2015, pp. 261–268.
  * [6] J. Honkala, A characterization of free pairs of upper triangular free monoid morphisms, Inform. Comput. 267 (2019) 110–115.
  * [7] J. Honkala, Combinatorics on morphisms - the freeness problem for pairs of morphisms, submitted.
  * [8] M. Lothaire, Combinatorics on Words, Addison-Wesley, 1983.
  * [9] M. Lothaire, Algebraic Combinatorics on Words, Cambridge University Press, 2002.
  * [10] H. Rao and Z.-Y. Wen, Invertible substitutions with a common periodic point, in J. Barral, S. Seuret (Eds.): Recent Developments in Fractals and Related Fields, Birkhäuser, 2010, pp. 401–409.
  * [11] G. Rozenberg and A. Salomaa, The Mathematical Theory of L Systems, Academic Press, 1980.
  * [12] G. Rozenberg and A. Salomaa (Eds.), Handbook of Formal Languages, Vols. 1-3, Springer, 1997.
  * [13] A. Salomaa, Jewels of Formal Language Theory, Computer Science Press, 1981.