# Scattering-Passive Structure-Preserving Finite Element Method for the
Boundary Controlled Transport Equation with
a Moving Mesh

Jesus-Pablo Toledo-Zucco  Denis Matignon  Charles Poussot-Vassal  ONERA-DTIS,
Université de Toulouse, France  Fédération ENAC ISAE-SUPAERO ONERA, Université
de Toulouse, France.

###### Abstract

A structure-preserving Finite Element Method (FEM) for the transport equation
in one- and two-dimensional domains is presented. This Distributed Parameter
System (DPS) has non-collocated boundary control and observation, and reveals
a scattering-energy preserving structure. We show that the discretized model
preserves the aforementioned structure from the original infinite-dimensional
system. Moreover, we analyse the case of moving meshes for the one-dimensional
case. The moving mesh requires less states than the fixed one to produce
solutions with a comparable accuracy, and it can also reduce the overshoot and
oscillations of Gibbs phenomenon produced when using the FEM. Numerical
simulations are provided for the case of a one-dimensional transport equation
with fixed and moving meshes.

###### keywords:

Transport phenomena, Finite Element Method, Boundary Control, Moving mesh.

††thanks: Corresponding author: Jesus-Pablo Toledo-Zucco. E-mail:
<EMAIL_ADDRESS>
, , ,

##  1 Introduction

Simulation and control design of distributed parameter systems (DPS) described
by Partial Differential Equations (PDEs) requires spatial and time
discretizations methods. The field of computational methods seeks to develop
high-fidelity models with a low computational effort in such a way that they
are implementable on available computers.

One way to reduce computational efforts when multi-physical systems are
involved is to use a modular approach. A modular approach allows to represent
the overall system as the interconnection of subsystems, which are more simple
to deal with. The port-Hamiltonian (pH) approach, introduced in (Maschke and
van der Schaft, 1992), aims at representing complex multi-physical systems as
the interconnection between sub-systems by mean of conservation laws. This
approach has shown a great success during the last two decades concerning
modelling and control of infinite-dimensional systems (Rashad et al., 2020).

For boundary controlled and observed infinite-dimensional systems with an
impedance-passive structure, the pH approach has been widely used for the
structure-preserving discretization. In the literature, one can find
structure-preserving discretization methods using discrete exterior calculus
(Seslija et al., 2012), mixed finite-elements (Golo et al., 2004), finite
volume (Kotyczka, 2016), finite-differences (Trenchant et al., 2018), among
others. Recently, the Partitioned Finite Element Method (PFEM) (Cardoso-
Ribeiro et al., 2018), (Serhani et al., 2019), (Cardoso-Ribeiro et al., 2020)
has shown a wide number of applications in one, two and three dimensional
domains (Brugnoli et al., 2019), (Haine et al., 2022). The methods mentioned
above are mainly focused in impedance-energy preserving systems and not much
attention has been paid to scattering-energy preserving systems.

In this paper, the application of the FEM to scattering systems is presented
for the cases of the one- and two-dimensional transport equations. We follow
the approach proposed in (Cardoso-Ribeiro et al., 2020) since it has shown to
be adaptable to deal with different spatial domains, it uses a single mesh, it
provides sparse matrices and it allows distributed parameters. Similar as in
the PFEM, in which the impedance-energy preserving structure is preserved at
the discrete level, in the FEM proposed in this paper, the scattering-energy
preserving structure is preserved at the discrete level.

A second contribution of this paper is the extension of the structure-
preserving FEM to deal with moving meshes. It is known that the efficiency of
numerical methods for solving PDEs can be improved concentrating the nodes in
the areas of rapid variations of the solution (Huang et al., 1994), (Huang et
al., 2002), (Aydoğdu et al., 2019). In this paper, some first steps towards
the structure-preserving FEM using moving meshes is presented for the case of
the one-dimensional transport equation. The discretized model is a time-
variant finite-dimensional system, in which the time-variying matrices depend
on the mesh dynamic through sparse matrices as well. We show that the
scattering structure is also preserved on the finite-dimensional model when
the velocity density is constant in space.

In Section 2, we recall the transport equation in one- and two-dimensional
domains, showing it scattering structure with respect to a quadratic
Hamiltonian. In Section 3, we develop the structure-preserving discretization
scheme for both cases, showing that the discretized models are also
scattering-energy systems. In Section 4, we present some first steps towards
moving meshes using the toy example of the one-dimensional transport equation.
In Section 5, we show some simulations on the one-dimensional transport
equation with fix and moving meshes. Finally, in Section 6 we give some
conclusions and perspectives.

##  2 Transport Equation

###  2.1 One-dimensional transport equation

We consider the following transport equation in one-dimensional space:

$\begin{cases}\dot{x}(\zeta,t)+c\dfrac{\partial
e}{\partial\zeta}(\zeta,t)=0,\\\ x(\zeta,0)=x_{0}(\zeta),\\\
e(\zeta,t)=\mathcal{H}(\zeta)x(\zeta,t),\end{cases}$ (1)

in which $\zeta\in[a,b]=:\Omega$ represents the space, $t\geq 0$ the time,
$x(\zeta,t)\in\mathbb{R}$ the state, $e(\cdot,t)\in H^{1}(\Omega)$ the co-
energy variable, $c\in\\{-1,+1\\}$ the velocity direction,
$\mathcal{H}(\zeta)>0$ the Hamiltonian density, and $x_{0}(\zeta)$ the initial
condition. The input $u(t)$ and output $y(t)$ are chosen at the spatial
boundaries and they depend on the velocity direction as follows:

$c=-1:\begin{cases}e(b,t)=u(t),\\\
e(a,t)=y(t),\end{cases}\,c=+1:\begin{cases}e(a,t)=u(t),\\\
e(b,t)=y(t),\end{cases}$ (2)

The Hamiltonian associated to (1) is defined as

$H(t):=\dfrac{1}{2}\int_{a}^{b}\mathcal{H}(\zeta)x(\zeta,t)^{2}d\zeta=\dfrac{1}{2}\int_{a}^{b}x(\zeta,t)e(\zeta,t)d\zeta,$
(3)

and one can show that the following balance equation is satisfied:

$\dot{H}(t)=\dfrac{1}{2}\left(u(t)^{2}-y(t)^{2}\right).$ (4)

This balance guarantees that the system (1)-(2) is scattering energy
preserving.

Note that, when $\mathcal{H}(\zeta)=\mathcal{H}_{0}$, then the analytic
solution is known as $y(t)=u(t-\tau)$, with
$\tau=\frac{\ell}{\mathcal{H}_{0}}$ and $\ell=b-a$. This is a simple delay
system.

###  2.2 Two-dimensional transport equation

Now, a two-dimensional transport equation is considered. The PDE is:

$\dfrac{\partial x}{\partial
t}(\zeta_{1},\zeta_{2},t)+\operatorname{div}(\mathbb{c}(\zeta_{1},\zeta_{2})x(\zeta_{1},\zeta_{2},t))=0$
(5)

in which $(\zeta_{1},\zeta_{2})\in\Omega$ is the space with $\Omega$ a bounded
domain, $t\geq 0$ is the time, $x$ is the state variable, and
$\mathbb{c}(\zeta_{1},\zeta_{2})=\begin{bmatrix}c_{1}(\zeta_{1},\zeta_{2})\\\
c_{2}(\zeta_{1},\zeta_{2})\end{bmatrix}$ is the velocity distribution vector.
We define the boundary of $\Omega$ as $\Gamma$ and the normal vector
$\mathbb{n}(\zeta_{1},\zeta_{2})=\begin{bmatrix}n_{1}(\zeta_{1},\zeta_{2})\\\
n_{2}(\zeta_{1},\zeta_{2})\end{bmatrix}$ which is perpendicular to $\Gamma$
(pointing outside of $\Omega$). We define $\Gamma_{i}$ and $\Gamma_{u}$ as the
sets of the input and output, respectively. These subsets are defined as:

$\displaystyle\Gamma_{i}$
$\displaystyle=\\{(\zeta_{1},\zeta_{2})\in\Gamma,\quad\mathbb{c}(\zeta_{1},\zeta_{2})^{\top}\mathbb{n}(\zeta_{1},\zeta_{2})<0\\},$
(6) $\displaystyle\Gamma_{o}$
$\displaystyle=\\{(\zeta_{1},\zeta_{2})\in\Gamma,\quad\mathbb{c}(\zeta_{1},\zeta_{2})^{\top}\mathbb{n}(\zeta_{1},\zeta_{2})>0\\}.$
(7)

These subsets are such that $\Gamma=\Gamma_{i}\cup\Gamma_{o}$, and the input
and output are:

$\begin{split}u(\zeta_{1},\zeta_{2},t)&=x(\zeta_{1},\zeta_{2},t),\quad(\zeta_{1},\zeta_{2})\in\Gamma_{i},\\\
y(\zeta_{1},\zeta_{2},t)&=x(\zeta_{1},\zeta_{2},t),\quad(\zeta_{1},\zeta_{2})\in\Gamma_{o}.\end{split}$
(8)

The Hamiltonian associated to (5) is defined as:

$H(t):=\dfrac{1}{2}\iint_{\Omega}x(\zeta_{1},\zeta_{2},t)^{2}d\zeta,$ (9)

with $\zeta=(\zeta_{1},\zeta_{2})$. In the following, for simplicity, we omit
the time and spatial dependency. The time derivative of the Hamiltonian is
computed as follows:

$\begin{split}\dot{H}&=\iint_{\Omega}x\dfrac{\partial x}{\partial
t}d\zeta=-\iint_{\Omega}x\,\operatorname{div}(\mathbb{c}x)d\zeta,\\\
&=\iint_{\Omega}x\,\mathbb{grad(x)}^{\top}\mathbb{c}\,d\zeta-\int_{\Gamma}x^{2}\mathbb{c}^{\top}\mathbb{n}d\zeta,\end{split}$
(10)

in which we have applied integration by part using Stokes theorem.

Now, we use the divergence rule for a product:

$\operatorname{div}(\mathbb{c}\,x)=\mathbb{c}^{\top}\,\mathbb{grad(x)}+x\,\operatorname{div}(\mathbb{c})$
(11)

to highlight the scattering energy preserving structure of the two-dimensional
transport equation. To this end, we multiply (11) by $x$ as follows:

$x\,\operatorname{div}(\mathbb{c}\,x)=x\,\mathbb{c}^{\top}\,\mathbb{grad(x)}+x^{2}\,\operatorname{div}(\mathbb{c})$
(12)

implying the following:

$\begin{split}\dot{H}&=-\iint_{\Omega}x\,\operatorname{div}(\mathbb{c}x)d\zeta\\\
&=-\iint_{\Omega}\left[x\,\mathbb{c}^{\top}\,\mathbb{grad(x)}+x^{2}\,\operatorname{div}(\mathbb{c})\right]d\zeta,\\\
&=-\iint_{\Omega}\left[x\,\,\mathbb{grad(x)}^{\top}\mathbb{c}+x^{2}\,\operatorname{div}(\mathbb{c})\right]d\zeta.\end{split}$
(13)

From the previous equation, we use the following identity:

$\iint_{\Omega}x\,\,\mathbb{grad(x)}^{\top}\mathbb{c}\,d\zeta=-\dot{H}-\iint_{\Omega}x^{2}\,\operatorname{div}(\mathbb{c})d\zeta$
(14)

and replace it in (10)

$\begin{split}\dot{H}&=\iint_{\Omega}x\,\mathbb{grad(x)}^{\top}c\,d\zeta-\int_{\Gamma}x^{2}\mathbb{c}^{\top}\mathbb{n}d\zeta,\\\
&=-\dot{H}-\iint_{\Omega}x^{2}\,\operatorname{div}(\mathbb{c})d\zeta-\int_{\Gamma}x^{2}\mathbb{c}^{\top}\mathbb{n}d\zeta,\end{split}$
(15)

implying

$\dot{H}=-\dfrac{1}{2}\iint_{\Omega}x^{2}\,\operatorname{div}(\mathbb{c})d\zeta-\dfrac{1}{2}\int_{\Gamma}x^{2}\mathbb{c}^{\top}\mathbb{n}d\zeta.$
(16)

Notice that, if $\operatorname{div}(\mathbb{c})=0$, the system is scattering
energy preserving with the following balance:

$\begin{split}\dot{H}&=\dfrac{1}{2}\int_{\Gamma_{i}}u^{2}\,|\mathbb{c}^{\top}\mathbb{n_{i}}|d\zeta-\dfrac{1}{2}\int_{\Gamma_{o}}y^{2}\,\mathbb{c}^{\top}\mathbb{n_{o}}d\zeta,\\\
\end{split}$ (17)

with $\mathbb{n_{i}}$ and $\mathbb{n_{o}}$ the normal vectors associated to
$\Gamma_{i}$ and $\Gamma_{o}$, respectively, and
$|\mathbb{c}^{\top}\mathbb{n_{i}}|$ and $\mathbb{c}^{\top}\mathbb{n_{o}}$ a
density on the surface $\Gamma$.

####  2.2.1 Example

Consider the case of a rectangular domain $\Omega=[0,2]\times[0,1]$ and
$\mathbb{c}=\begin{bmatrix}1\\\ 1\end{bmatrix}$ for all
$(\zeta_{1},\zeta_{2})\in\Omega$. We define the following boundary domains:

  * •

$\Gamma_{1}=\\{\zeta_{1}=0,\quad\quad\zeta_{2}\in[0,1]\\}$

  * •

$\Gamma_{2}=\\{\zeta_{1}\in[0,2],\;\;\zeta_{2}=0\\}$

  * •

$\Gamma_{3}=\\{\zeta_{1}=2,\quad\quad\zeta_{2}\in[0,1]\\}$

  * •

$\Gamma_{4}=\\{\zeta_{1}\in[0,2],\;\;\zeta_{2}=1\\}$

for which the normal vectors are respectively:

$\mathbb{n_{1}}=\begin{bmatrix}-1\\\
0\end{bmatrix},\;\mathbb{n_{2}}=\begin{bmatrix}0\\\
-1\end{bmatrix},\;\mathbb{n_{3}}=\begin{bmatrix}1\\\
0\end{bmatrix},\;\mathbb{n_{4}}=\begin{bmatrix}0\\\ 1\end{bmatrix}.$ (18)

and since $\mathbb{c}^{\top}\mathbb{n_{1}}=-1$,
$\mathbb{c}^{\top}\mathbb{n_{2}}=-1$, $\mathbb{c}^{\top}\mathbb{n_{3}}=1$,
$\mathbb{c}^{\top}\mathbb{n_{4}}=1$, $\Gamma_{i}=\Gamma_{1}\cup\Gamma_{2}$ and
$\Gamma_{o}=\Gamma_{3}\cup\Gamma_{4}$. In Fig. 1, we show an schematic of the
spatial domain and the boundary partitions.

Figure 1: Spatial domain and boundary partitions.

In the following section, we show that the proposed discretization scheme
preserves the energy properties (3)-(4) for the one-dimensional case and
(9)-(16) for the two-dimensional case.

##  3 Finite Element Method

In this section, the FEM is applied to the one- and two dimensional transport
equations introduced previously. We show that in both cases, the discretized
Hamiltonian mimics the Hamiltonian of the infinite-dimensional system,
implying that the discretized models are also scattering energy systems.

###  3.1 One-dimensional FEM for the transport equation

We approximate the state and co-energy variable using the following
projections:

$\begin{split}x(\zeta,t)\approx
x^{ap}(\zeta,t)&:=\Phi(\zeta)^{\top}x_{d}(t),\\\ e(\zeta,t)\approx
e^{ap}(\zeta,t)&:=\Phi(\zeta)^{\top}e_{d}(t).\end{split}$ (19)

The approximated functions $x^{ap}(\zeta,t)$ and
$e^{ap}(\zeta,t)\in\mathbb{R}$ for all $\zeta\in\Omega$ and $t\geq 0$ are both
projected on the same basis functions

$\Phi(\zeta)=\begin{pmatrix}\phi_{1}(\zeta)\\\ \vdots\\\
\phi_{N}(\zeta)\end{pmatrix}$ (20)

with $\phi_{i}(\cdot)\in H^{1}(\Omega)$ for all $i\in\\{1,\cdots,N\\}$. The
discretized state and co-energy variables are $x_{d}(t)$ and
$e_{d}(t)\in\mathbb{R}^{N\times 1}$, respectively.

We apply the following three operations to the equations in (1): $(i)$ we
multiply by $\Phi(\zeta)$ from the right to the left, $(ii)$ integrate over
$\zeta\in\Omega$, and $(iii)$ replace the approximation functions from (19).
For simplicity, from now on, we consider $c=-1$, meaning that the signals
travel from the right to the left. The weak form of (1)-(2) writes:

$\begin{cases}\int_{a}^{b}\Phi(\zeta)\left[\Phi(\zeta)^{\top}\dot{x}_{d}(t)-\dfrac{\partial\Phi}{\partial\zeta}(\zeta)^{\top}e_{d}(t)\right]d\zeta=0,\\\
\int_{a}^{b}\Phi(\zeta)\Phi(\zeta)^{\top}x_{d}(0)d\zeta=\int_{a}^{b}\Phi(\zeta)x_{0}(\zeta)d\zeta,\\\
\int_{a}^{b}\Phi(\zeta)\Phi(\zeta)^{\top}e_{d}(t)d\zeta=\int_{a}^{b}\Phi(\zeta)\mathcal{H}(\zeta)\Phi(\zeta)^{\top}x_{d}(t)d\zeta,\\\
y(t)=\Phi(a)^{\top}e_{d}(t).\end{cases}$ (21)

which can be equivalently written as:

$\begin{cases}E\dot{x}_{d}(t)=Fe_{d}(t)+Bu(t),\\\ x_{d}(0)=x_{d0},\\\
Ee_{d}(t)=Qx_{d}(t),\\\ y(t)=Ce_{d}(t),\end{cases}$ (22)

with

$\begin{split}E&=\int_{a}^{b}\Phi(\zeta)\Phi(\zeta)^{\top}d\zeta,\\\
F&=-\Phi(a)\Phi(a)^{\top}-\int_{a}^{b}\dfrac{\partial\Phi}{\partial\zeta}(\zeta)\Phi(\zeta)^{\top}d\zeta,\\\
Q&=\int_{a}^{b}\Phi(\zeta)\mathcal{H}(\zeta)\Phi(\zeta)^{\top}d\zeta,\\\
B&=\Phi(b),\\\ C&=\Phi(a),\\\
x_{d0}&=E^{-1}\int_{a}^{b}\Phi(\zeta)x_{0}(\zeta)d\zeta.\end{split}$ (23)

### Discretized Hamiltonian: one-dimensional case

We replace the approximations (19) in the Hamiltonian (3) to obtain the
discretized Hamiltonian as follows:

$\begin{split}H(t)\approx
H_{d}(t)&:=\dfrac{1}{2}\int_{a}^{b}x^{ap}(\zeta,t)e^{ap}(\zeta,t)d\zeta,\\\
&=\dfrac{1}{2}x_{d}(t)^{\top}\left(\int_{a}^{b}\Phi(\zeta)\Phi(\zeta)^{\top}d\zeta\right)\,e_{d}(t),\\\
&=\dfrac{1}{2}x_{d}(t)^{\top}Ee_{d}(t)=\dfrac{1}{2}x_{d}(t)^{\top}Qx_{d}(t).\end{split}$
(24)

The main properties that we use to develop the time derivative of (24) are:

$\displaystyle E$ $\displaystyle=E^{\top},\quad Q=Q^{\top},$ $\displaystyle
y(t)$ $\displaystyle=\Phi(a)^{\top}e_{d}(t),$ $\displaystyle u(t)$
$\displaystyle=\Phi(b)^{\top}e_{d}(t),$ $\displaystyle E\dot{x}_{d}(t)$
$\displaystyle=\int_{a}^{b}\Phi(\zeta)\dfrac{\partial\Phi}{\partial\zeta}(\zeta)^{\top}d\zeta
e_{d}(t).$

For simplicity, we omit time and space dependency. The Hamiltonian balance is:

$\begin{split}\dot{H}_{d}&={x}_{d}^{\top}Q\dot{x}_{d},\\\
&={x}_{d}^{\top}QE^{-1}E\dot{x}_{d},\\\
&=(Q{x}_{d})^{\top}E^{-1}(Fe_{d}+Bu),\\\
&=(E{e}_{d})^{\top}E^{-1}((-\Phi_{a}\Phi_{a}^{\top}-\int_{a}^{b}\tfrac{\partial\Phi}{\partial\zeta}\Phi^{\top}d\zeta)e_{d}+\Phi_{b}u),\\\
&=-{e}_{d}^{\top}\Phi_{a}\Phi_{a}^{\top}e_{d}-e_{d}^{\top}\int_{a}^{b}\tfrac{\partial\Phi}{\partial\zeta}\Phi^{\top}d\zeta
e_{d}+e_{d}^{\top}\Phi_{b}u,\\\
&=-y^{\top}y-e_{d}^{\top}\int_{a}^{b}\tfrac{\partial\Phi}{\partial\zeta}\Phi^{\top}d\zeta
e_{d}+u^{\top}u,\\\
&=-y^{2}-e_{d}^{\top}\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial\zeta}^{\top}d\zeta
e_{d}+u^{2},\\\ &=-y^{2}-e_{d}^{\top}E\dot{x}_{d}+u^{2},\\\
&=-y^{2}-(Ee_{d})^{\top}\dot{x}_{d}+u^{2},\\\
&=-y^{2}-(Qx_{d})^{\top}\dot{x}_{d}+u^{2},\\\
&=-y^{2}-x_{d}^{\top}Q\dot{x}_{d}+u^{2},\\\ &=-y^{2}-\dot{H}_{d}+u^{2},\\\
\Leftrightarrow\dot{H}_{d}&=\dfrac{1}{2}(u^{2}-y^{2}),\end{split}$ (25)

implying that the discretized system (22) preserves the scattering energy
preserving structure of the infinite-dimensional system.

###  3.2 Two-dimensional FEM for the transport equation

We approximate the state variable using the following projection:

$x(\zeta_{1},\zeta_{2},t)\approx
x^{ap}(\zeta_{1},\zeta_{2},t):=\Phi(\zeta_{1},\zeta_{2})^{\top}x_{d}(t),$ (26)

The approximated function $x^{ap}(\zeta_{1},\zeta_{2},t)\in\mathbb{R}$ for all
$(\zeta_{1},\zeta_{2})\in\Omega$ and $t\geq 0$ is projected on the following
basis functions

$\Phi(\zeta_{1},\zeta_{2})=\begin{pmatrix}\phi_{1}(\zeta_{1},\zeta_{2})\\\
\vdots\\\ \phi_{N}(\zeta_{1},\zeta_{2})\end{pmatrix}$ (27)

with $\phi_{i}(\cdot,\cdot)\in H^{1}(\Omega)$ for all $i\in\\{1,\cdots,N\\}$.
The discretized state variable is $x_{d}(t)\in\mathbb{R}^{N\times 1}$.

We apply the following three operations to the equations in (5): $(i)$ we
multiply by $\Phi(\zeta_{1},\zeta_{2})$ from the right to the left, $(ii)$
integrate over $\zeta\in\Omega$, and $(iii)$ replace the approximation
functions from (26). The weak form of (5) writes:

$\iint_{\Omega}\Phi\left[\Phi^{\top}\dot{x}_{d}+\operatorname{div}(\mathbb{c}\,\Phi^{\top}x_{d})\right]d\zeta=0$
(28)

which can be equivalently written as:

$M\dot{x}_{d}(t)=F_{1}x_{d}(t)$ (29)

with

$\displaystyle M$ $\displaystyle=\iint_{\Omega}\Phi\Phi^{\top}d\zeta,$
$\displaystyle F_{1}$
$\displaystyle=-\iint_{\Omega}\Phi\begin{bmatrix}\operatorname{div}(\mathbb{c}\phi_{1})\cdots\operatorname{div}(\mathbb{c}\phi_{N})\end{bmatrix}d\zeta$

or as:

$M\dot{x}_{d}(t)=F_{2}x_{d}(t)-\int_{\Gamma_{i}}\Phi\,u\,\mathbb{c}^{\top}\mathbb{n_{i}}\,ds$
(30)

with

$\displaystyle F_{2}$
$\displaystyle=\iint_{\Omega}\begin{bmatrix}\operatorname*{\text{{grad}}}(\phi_{1})^{\top}\mathbb{c}\\\
\vdots\\\
\operatorname*{\text{{grad}}}(\phi_{N})^{\top}\mathbb{c}\end{bmatrix}\Phi^{\top}d\zeta-\int_{\Gamma_{o}}\left(\Phi\Phi^{\top}\right)\,\mathbb{c}^{\top}\mathbb{n_{o}}\,ds,$

in which we have applied integration by parts making appear the input term and
keeping the output term inside the internal dynamic through $F_{2}$.

### Discretized Hamiltonian: two-dimensional case

We replace the approximation (26) in the Hamiltonian (9) to obtain the
discretized Hamiltonian as follows:

$\begin{split}H(t)\approx
H_{d}(t)&:=\dfrac{1}{2}\iint_{\Omega}x^{ap}(\zeta,t)x^{ap}(\zeta,t),\\\
&=\dfrac{1}{2}x_{d}(t)^{\top}\left(\iint_{\Omega}\Phi(\zeta)\Phi(\zeta)^{\top}d\zeta\right)x_{d}(t),\\\
\end{split}$ (31)

Notice that $H_{d}$ in (33) is defined as $H$ from (9) but evaluated at
$x=x^{ap}$, with $x^{ap}$ from (26). Then, following subsection 2.2, one can
also apply the identities (11)-(12) to obtain the following discretized
Hamiltonian balance:

$\dot{H}=-\dfrac{1}{2}\iint_{\Omega}x^{ap}x^{ap}\,\operatorname{div}(\mathbb{c})\,d\zeta-\dfrac{1}{2}\int_{\Gamma}x^{ap}x^{ap}\mathbb{c}^{\top}\mathbb{n}\,ds.$
(32)

Then, replacing $x^{ap}=\Phi^{\top}x_{d}$ from (26), we obtain the following
balance:

$\begin{split}{\dot{H}}_{d}(t)&=-\dfrac{1}{2}x_{d}(t)^{\top}\left(\iint_{\Omega}\Phi(\zeta)\operatorname{div}(\mathbb{c})\Phi(\zeta)^{\top}d\zeta\right)x_{d}(t)\\\
&+\dfrac{1}{2}\int_{\Gamma_{i}}{u}^{2}\,|\mathbb{c}^{\top}\mathbb{n_{i}}|\,ds-\dfrac{1}{2}\int_{\Gamma_{o}}{y}^{2}\,\mathbb{c}^{\top}\mathbb{n_{o}}\,ds,\\\
\end{split}$ (33)

where we have replaced the inputs and outputs from (8). The previous balance
equation shows that at the discretized model preserves the scattering-energy
preserving structure.

###### Remark 1

For a divergence-free velocity field, the scattering energy preserving
structure is exactly preserved. However, in a non divergence-free case, a
dissipative or accumulative effect is appreciated depending on the sign of
$\operatorname{div}(\mathbb{c})$ (See (16)) The dissipative or accumulative
effect is also preserved at the discrete level through the matrix
$Q_{c}=\iint_{\Omega}\Phi\operatorname{div}(\mathbb{c})\Phi^{\top}d\zeta$

###### Remark 2

For the numerical implementation of the discretized model of the 2D transport
equation, the input and output have to be projected on two different finite-
dimensional bases as well. These projections lead to a new energy balance
which is now approximated. The same holds for the scattering energy preserving
structure.

##  4 Moving Mesh for the 1D case

Now, we consider a moving mesh. The state and co-energy variables are
approximated as follows:

$\begin{split}x(\zeta,t)\approx
x^{ap}(\zeta,t)&:=\Phi(\zeta,t)^{\top}x_{d}(t),\\\ e(\zeta,t)\approx
e^{ap}(\zeta,t)&:=\Phi(\zeta,t)^{\top}e_{d}(t)\end{split}$ (34)

with $x^{ap}(\zeta,t)$ and $e^{ap}(\zeta,t)\in\mathbb{R}$ for all
$\zeta\in\Omega$ and $t\geq 0$,

$\Phi(\zeta,t)=\begin{pmatrix}\phi_{1}(\zeta,t)\\\ \vdots\\\
\phi_{N}(\zeta,t)\end{pmatrix}$ (35)

the vector with the approximation basis functions $\phi_{i}(\cdot,t)\in
H^{1}(\Omega)$ for all $t\geq 0$ and $i\in\\{1,\cdots,N\\}$.

The main difference with respect to the previous case is that, in a moving
mesh, the time derivative of the approximation function $x^{ap}(\zeta,t)$ has
the following two terms:

$\dot{x}^{ap}(\zeta,t)=\dfrac{\partial\Phi}{\partial
t}(\zeta,t)^{\top}x_{d}(t)+\Phi(\zeta,t)^{\top}\dot{x}_{d}(t).$ (36)

We apply the following three operations to the transport equation in (1):
$(i)$ we multiply by $\Phi(\zeta,t)$ from the right to the left, $(ii)$
integrate over $\zeta\in\Omega$, and $(iii)$ replace the approximation
function from (34)-(36). Considering $c=1$, the weak form of (1)-(2) writes:

$\begin{cases}\int_{a}^{b}\Phi(\zeta,t)f(\zeta,t)d\zeta=0,\\\
f=\dfrac{\partial\Phi}{\partial
t}(\zeta,t)^{\top}x_{d}(t)+\Phi(\zeta,t)^{\top}\dot{x}_{d}(t)-\dfrac{\partial\Phi}{\partial\zeta}(\zeta,t)^{\top}e_{d}(t),\\\
\int_{a}^{b}\Phi(\zeta,0)\Phi(\zeta,0)^{\top}x_{d}(0)d\zeta=\int_{a}^{b}\Phi(\zeta,0)x_{0}(\zeta)d\zeta,\\\
\int_{a}^{b}\Phi(\zeta,t)\Phi(\zeta,t)^{\top}e_{d}(t)d\zeta\\\
\quad\quad\quad\quad\quad=\int_{a}^{b}\Phi(\zeta,t)\mathcal{H}(\zeta)\Phi(\zeta,t)^{\top}x_{d}(t)d\zeta,\\\
y(t)=\Phi(a,t)^{\top}e_{d}(t).\end{cases}$ (37)

The realization (37) can be equivalently written as:

$\begin{cases}E(t)\dot{x}_{d}(t)=F(t)e_{d}(t)+B(t)u(t),\\\ x_{d}(0)=x_{d0},\\\
E(t)e_{d}(t)=Q(t)x_{d}(t),\\\ y(t)=C(t)x_{d}(t),\end{cases}$ (38)

with

$\begin{split}E(t)&=\int_{a}^{b}\Phi(\zeta,t)\Phi(\zeta,t)^{\top}d\zeta,\\\
F(t)&=-\Phi(a,t)\Phi(a,t)^{\top}-\int_{a}^{b}\dfrac{\partial\Phi}{\partial\zeta}(\zeta,t)\Phi(\zeta,t)^{\top}d\zeta\\\
&\quad-\left(\int_{a}^{b}\Phi(\zeta,t)\dfrac{\partial\Phi}{\partial
t}(\zeta,t)^{\top}d\zeta\right)Q(t)^{-1}E(t),\\\
Q(t)&=\int_{a}^{b}\Phi(\zeta,t)\mathcal{H}(\zeta)\Phi(\zeta,t)^{\top}d\zeta,\\\
B(t)&=\Phi(b,t),\\\ C(t)&=\Phi(a,t)^{\top},\\\
x_{d0}&=E(0)^{-1}\int_{a}^{b}\Phi(\zeta,0)x_{0}(\zeta)d\zeta.\end{split}$ (39)

###### Remark 3

Notice that for $\mathcal{H}(\zeta)=\mathcal{H}_{0}$ (constant in space), the
term $Q(t)^{-1}E(t)$ in the expression of $F(t)$ from (39) becomes the
identity matrix times $\mathcal{H}_{0}$.

### Discretized Hamiltonian using a moving mesh

In this case, we replace the approximations (34) in the Hamiltonian (3) to
obtain the discretized Hamiltonian as follows:

$\begin{split}H_{d}(t)&:=\dfrac{1}{2}\int_{a}^{b}x^{ap}(\zeta,t)e^{ap}(\zeta,t),\\\
&=\dfrac{1}{2}\int_{a}^{b}\Phi(\zeta,t)^{\top}x_{d}(t)\Phi(\zeta,t)^{\top}e_{d}(t)d\zeta,\\\
&=\dfrac{1}{2}\int_{a}^{b}x_{d}(t)^{\top}\Phi(\zeta,t)\Phi(\zeta,t)^{\top}e_{d}(t)d\zeta,\\\
&=\dfrac{1}{2}x_{d}(t)^{\top}\left(\int_{a}^{b}\Phi(\zeta,t)\Phi(\zeta,t)^{\top}d\zeta\right)e_{d}(t),\\\
&=\dfrac{1}{2}x_{d}(t)^{\top}E(t)e_{d}(t)=\dfrac{1}{2}x_{d}(t)^{\top}Q(t)x_{d}(t).\end{split}$
(40)

The main properties that we use to develop the time derivative of (40) are:

$\displaystyle E(t)$ $\displaystyle=E(t)^{\top},\quad Q(t)=Q(t)^{\top},$
$\displaystyle y(t)$ $\displaystyle=\Phi(a,t)^{\top}e_{d}(t),$ $\displaystyle
u(t)$ $\displaystyle=\Phi(b,t)^{\top}e_{d}(t),$ $\displaystyle
E(t)\dot{x}_{d}(t)$
$\displaystyle=\left(\int_{a}^{b}\Phi(\zeta,t)\dfrac{\partial\Phi}{\partial\zeta}(\zeta,t)^{\top}d\zeta\right)e_{d}(t)$
$\displaystyle\quad\quad\quad\quad-\left(\int_{a}^{b}\Phi(\zeta,t)\dfrac{\partial\Phi}{\partial
t}(\zeta,t)^{\top}d\zeta\right)x_{d}(t).$

In the following, we omit time and space dependency and we introduce the
following notation: $\Phi_{a}:=\Phi(a,t)$ and $\Phi_{b}:=\Phi(b,t)$. Then, we
compute the time derivative of the discretized Hamiltonian (40) as follows:

$\begin{split}2\dot{H}_{d}&={x}_{d}^{\top}Q\dot{x}_{d}+x_{d}^{\top}\tfrac{\partial}{\partial
t}\left(Qx_{d}\right)\\\
&={e}_{d}^{\top}E\dot{x}_{d}+x_{d}^{\top}\tfrac{\partial}{\partial
t}\left(Qx_{d}\right)\\\
&={e}_{d}^{\top}\left(Fe_{d}+Bu\right)+x_{d}^{\top}\tfrac{\partial}{\partial
t}\left(Qx_{d}\right),\\\
&=-{e}_{d}^{\top}\Phi_{a}\Phi_{a}^{\top}e_{d}+{e}_{d}^{\top}\Phi_{b}u-{e}_{d}^{\top}\left(\int_{a}^{b}\tfrac{\partial\Phi}{\partial\zeta}\Phi^{\top}d\zeta\right)e_{d}\\\
&\quad-{e}_{d}^{\top}\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial
t}^{\top}d\zeta\right)x_{d}+x_{d}^{\top}\tfrac{\partial}{\partial
t}\left(Qx_{d}\right),\\\
&=-y^{2}+u^{2}-{e}_{d}^{\top}\left(\int_{a}^{b}\tfrac{\partial\Phi}{\partial\zeta}\Phi^{\top}d\zeta\right)e_{d}\\\
&\quad-{e}_{d}^{\top}\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial
t}^{\top}d\zeta\right)x_{d}+x_{d}^{\top}\tfrac{\partial}{\partial
t}\left(Qx_{d}\right).\\\ \end{split}$ (41)

Notice that if we are able to show that

$\begin{split}x_{d}^{\top}\tfrac{\partial}{\partial
t}\left(Qx_{d}\right)&={e}_{d}^{\top}\left(\int_{a}^{b}\tfrac{\partial\Phi}{\partial\zeta}\Phi^{\top}d\zeta\right)e_{d}\\\
&\quad\quad\quad\quad\quad\quad+{e}_{d}^{\top}\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial
t}^{\top}d\zeta\right)x_{d}\end{split}$ (42)

then,

$2\dot{H}_{d}=-y^{2}+u^{2}\Leftrightarrow\dot{H}_{d}=\dfrac{1}{2}(u^{2}-y^{2}).$

To do this, we use the following facts:

$\begin{split}&{e}_{d}^{\top}\left(\int_{a}^{b}\tfrac{\partial\Phi}{\partial\zeta}\Phi^{\top}d\zeta\right)e_{d}={e}_{d}^{\top}\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial\zeta}^{\top}d\zeta\right)e_{d},\\\
&E\dot{x}_{d}=\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial\zeta}^{\top}d\zeta\right)e_{d}-\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial
t}^{\top}d\zeta\right)x_{d}.\end{split}$ (43)

Then, (42) is equivalently written as:

$\begin{split}x_{d}^{\top}&\tfrac{\partial}{\partial
t}\left(Qx_{d}\right)={e}_{d}^{\top}\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial\zeta}^{\top}d\zeta\right)e_{d}\\\
&-{e}_{d}^{\top}\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial
t}^{\top}d\zeta\right)x_{d}+2e_{d}^{\top}\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial
t}^{\top}d\zeta\right)x_{d},\\\
&={e}_{d}^{\top}E\dot{x}_{d}+2e_{d}^{\top}\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial
t}^{\top}d\zeta\right)x_{d},\\\
&={x}_{d}^{\top}Q\dot{x}_{d}+2e_{d}^{\top}\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial
t}^{\top}d\zeta\right)x_{d},\\\ \end{split}$ (44)

Finally, if $\mathcal{H}$ is constant for all $\zeta\in\Omega$, one can show
that $e_{d}=\mathcal{H}x_{d}$.Then, the previous equation becomes:

$\begin{split}x_{d}^{\top}\tfrac{\partial}{\partial
t}\left(Ex_{d}\right)&=x_{d}^{\top}E\dot{x}_{d}+2x_{d}^{\top}\left(\int_{a}^{b}\Phi\tfrac{\partial\Phi}{\partial
t}d\zeta\right)x_{d},\\\
&=x_{d}^{\top}E\dot{x}_{d}+x_{d}^{\top}\dfrac{\partial E}{\partial t}x_{d},\\\
&=x_{d}^{\top}\left(E\dot{x}_{d}+\dfrac{\partial E}{\partial
t}x_{d}\right),\\\ \end{split}$ (45)

which prove (42) and thus $\dot{H}_{d}=\dfrac{1}{2}(u^{2}-y^{2})$.

###### Remark 4

Notice that by making $\tfrac{\partial\Phi}{\partial t}=0$, the moving mesh
becomes the fixed one developped in subsection 3.1

###### Remark 5

If the Hamiltonian density is uniform in space, i.e., the transport velocity
is the same for all $\zeta\in\Omega$, then the proposed discretization scheme
preserves the structure for any time parametrization of the test functions.

##  5 Numerical Simulations

We consider the case of the one-dimensional transport equation with constant
velocity and we aim at finding a numerical solution using the proposed
discretization scheme for a fixed and a moving mesh. The Matlab codes used for
this section can be downloaded from a Gitlab
repository111https://gitlab.com/ToledoZucco/moving-mesh-in-1d. We consider
$N=20$ elements and initial condition $x_{0}(\zeta)=2e^{-420(\zeta-0.9)^{2}}$.
In Fig. 2, we show the basis functions used for the case of a fixed mesh in
which every node is equidistant with its neighbor nodes. In Fig. 3, we show
the initial condition of the basis functions for the case of a moving mesh. In
this case, the nodes are logarithmically distributed with a bigger
concentration at the right side of the spatial domain.

Figure 2: Basis functions $\Phi(\zeta)$ for the fixed mesh. Figure 3: Initial
condition of the basis functions $\Phi(\zeta,0)$ for the moving mesh.

In Fig. 4, we show the nodes trajectories over time. Dashed lines represent
the fixed mesh, whereas solid ones represent the moving mesh. For simplicity
and since the initial condition has most of its energy concentrated at the
right side of the spatial domain, we select a mesh in which the nodes are
initially concentrated at the right side. Then, the nodes travel to the left
side with a velocity of $1\,(m/s)$ and finally, they end concentrated at the
left side.

Figure 4: Node trajectories. Dashed lines represent the fixed case and solid
ones the moving case.

In Fig. 5, we show the exact output of the system and the numerical ones using
the fixed and moving mesh scenarios. The solution corresponds to the delayed
initial condition. We can see that, in the moving mesh case, the numerical
solution is more accurate than in the fixed case. Moreover, less oscillations
can be appreciated when using moving meshes. This is a simple example of how
moving meshes can reduce oscillations produced when using FEM (typically known
as the Gibbs phenomenon).

Figure 5: Output of the system $y(t)=x(a,t)$.

In Fig. 6, we show the Hamiltonian over time. We can see that in all cases
since the input is zero, there is no increment on the Hamiltonian, and the
biggest decrease of the Hamiltonian is around second $t=0.9\,(s)$, which is
the time in which the signal reaches the left boundary.

Figure 6: Hamiltonian.

Finally, in Fig. 7, we show the initial condition $x_{0}(\zeta)$ and its
respective approximation considering a static and moving mesh. The exact
solution and the numerical ones are shown at different time steps in Fig. 8,
9, and 10. We can see that the numerical solution is less damaged when using a
moving mesh approach.

Figure 7: Numerical solution of $x(\zeta,t)$ at $t=0$ $(s)$. Figure 8:
Numerical solution of $x(\zeta,t)$ at $t=0.2$ $(s)$. Figure 9: Numerical
solution of $x(\zeta,t)$ at $t=0.4$ $(s)$. Figure 10: Numerical solution of
$x(\zeta,t)$ at $t=0.6$ $(s)$.

##  6 Conclusions and perspectives

In this paper we have presented a structure-preserving Finite Element Method
(FEM) for the transport equation in one- and two-dimensional spatial domains.
The main advantages of the proposed method is that the finite-dimensional
models preserve the scattering energy preserving structure of the initial
Partial Differential Equation (PDE). Moreover, for the one-dimensional case,
we have extended this approach to deal with moving meshes, which can improve
the numerical solution behaviour with respect to fixed meshes. This is a first
step towards using adaptive meshes whereas preserving the structure. Further
investigations on how the nodes should be adapted will be requiered. The
extension of the moving mesh approach to passive-energy preserving is part of
a future work in order to deal with waves and beams, for instance.
Additionally, the implementation of this discretization scheme in predictive
control techniques (Deng et al., 2022) as the well-known Smith predictor is
part of the future work of the authors. The fact of preserving the energy
structure of the transport phenomena provides a natural Lyapunov function that
can be used to guarantee closed-loop stability at the continuos and discrete
level (Krstic and Smyshlyaev, 2008), (Bastin and Coron, 2016).

## References

  * Aydoğdu et al. (2019) Ali Aydoğdu, Alberto Carrassi, Colin T Guider, Chris KR T Jones, and Pierre Rampal.  Data assimilation using adaptive, non-conservative, moving mesh models.  _Nonlinear Processes in Geophysics_ , 26(3):175–193, 2019.
  * Bastin and Coron (2016) Georges Bastin and Jean-Michel Coron.  _Stability and Boundary Stabilization of 1-D Hyperbolic Systems_.  Progress in Nonlinear Differential Equations and Their Applications. Birkhäuser Cham, 2016.  10.1007/978-3-319-32062-5.
  * Brugnoli et al. (2019) Andrea Brugnoli, Daniel Alazard, Valérie Pommier-Budinger, and Denis Matignon.  Port-Hamiltonian formulation and symplectic discretization of plate models Part I: Mindlin model for thick plates.  _Applied Mathematical Modelling_ , 75:940–960, 2019.
  * Cardoso-Ribeiro et al. (2018) Flávio Luiz Cardoso-Ribeiro, Denis Matignon, and Laurent Lefèvre.  A structure-preserving partitioned finite element method for the 2d wave equation.  _IFAC-PapersOnLine_ , 51(3):119–124, 2018.
  * Cardoso-Ribeiro et al. (2020) Flávio Luiz Cardoso-Ribeiro, Denis Matignon, and Laurent Lefèvre.  A partitioned finite element method for power-preserving discretization of open systems of conservation laws.  _IMA Journal of Mathematical Control and Information_ , 38(2):493–533, 12 2020.  10.1093/imamci/dnaa038.
  * Deng et al. (2022) Yang Deng, Vincent Léchappé, Emmanuel Moulay, Zhang Chen, Bin Liang, Franck Plestan, and Qing-Long Han.  Predictor-based control of time-delay systems: a survey.  _International Journal of Systems Science_ , 53(12):2496–2534, 2022.
  * Golo et al. (2004) Goran Golo, Viswanath Talasila, Arjan Van Der Schaft, and Bernhard Maschke.  Hamiltonian discretization of boundary control systems.  _Automatica_ , 40(5):757–771, 2004.
  * Haine et al. (2022) Ghislain Haine, Denis Matignon, and Florian Monteghetti.  Structure-preserving discretization of Maxwell’s equations as a port-Hamiltonian system.  _IFAC-PapersOnLine_ , 55(30):424–429, 2022.
  * Huang et al. (1994) Weizhang Huang, Yuhe Ren, and Robert D Russell.  Moving mesh methods based on moving mesh partial differential equations.  _Journal of Computational Physics_ , 113(2):279–290, 1994.
  * Huang et al. (2002) Weizhang Huang, Li Zheng, and Xiaoyong Zhan.  Adaptive moving mesh methods for simulating one-dimensional groundwater problems with sharp moving fronts.  _International journal for numerical methods in engineering_ , 54(11):1579–1603, 2002.
  * Kotyczka (2016) Paul Kotyczka.  Finite volume structure-preserving discretization of 1d distributed-parameter port-Hamiltonian systems.  _IFAC-PapersOnLine_ , 49(8):298–303, 2016.
  * Krstic and Smyshlyaev (2008) Miroslav Krstic and Andrey Smyshlyaev.  Backstepping boundary control for first-order hyperbolic PDEs and application to systems with actuator and sensor delays.  _Systems & Control Letters_, 57(9):750–758, 2008.
  * Maschke and van der Schaft (1992) Bernhard Maschke and Arjan van der Schaft.  Port-controlled Hamiltonian systems: modelling origins and system theoretic properties.  _IFAC Proceedings Volumes_ , 25(13):359–365, 1992\.
  * Rashad et al. (2020) Ramy Rashad, Federico Califano, Arjan J van der Schaft, and Stefano Stramigioli.  Twenty years of distributed port-Hamiltonian systems: a literature review.  _IMA Journal of Mathematical Control and Information_ , 37(4):1400–1422, 2020.
  * Serhani et al. (2019) Anass Serhani, Denis Matignon, and Ghislain Haine.  Partitioned Finite Element Method for port-Hamiltonian systems with Boundary Damping: Anisotropic Heterogeneous 2D wave equations.  _IFAC-PapersOnLine_ , 52(2):96–101, 2019.  10.1016/j.ifacol.2019.08.017.
  * Seslija et al. (2012) Marko Seslija, Arjan van der Schaft, and Jacquelien MA Scherpen.  Discrete exterior geometry approach to structure-preserving discretization of distributed-parameter port-Hamiltonian systems.  _Journal of Geometry and Physics_ , 62(6):1509–1531, 2012.
  * Trenchant et al. (2018) Vincent Trenchant, Hector Ramirez, Yann Le Gorrec, and Paul Kotyczka.  Finite differences on staggered grids preserving the port-Hamiltonian structure with application to an acoustic duct.  _Journal of Computational Physics_ , 373:673–697, 2018\.


# Euclidean Gallai-Ramsey for various configurations

Xinbu Cheng Laboratory of Mathematics and Complex Systems, Ministry of
Education, School of Mathematical Sciences, Beijing Normal University,
Beijing, China. Emails<EMAIL_ADDRESS>Zixiang Xu Extremal
Combinatorics and Probability Group (ECOPRO), Institute for Basic Science
(IBS), Daejeon, South Korea. Email<EMAIL_ADDRESS>Supported by
IBS-R029-C4.

###### Abstract

The Euclidean Gallai-Ramsey problem, which investigates the existence of
monochromatic or rainbow configurations in a colored $n$-dimensional Euclidean
space $\mathbb{E}^{n}$, was introduced and studied recently. We further
explore this problem for various configurations including triangles, squares,
lines, and the structures with specific properties, such as rectangular and
spherical configurations. Several of our new results provide refinements to
the results presented in a recent work by Mao, Ozeki and Wang. One intriguing
phenomenon evident on the Gallai-Ramsey results proven in this paper is that
the dimensions of spaces are often independent of the number of colors. Our
proofs primarily adopt a geometric perspective.

##  1 Introduction

###  1.1 Background

The Euclidean Ramsey theory, as an important branch of Ramsey theory, was
proposed by Erdős, Graham, Montgomery, Rothschild, Spencer and Straus [4] in
1975. Originating from graph theory and Ramsey theory, it aims to explore the
presence of geometric patterns in continuous domains and investigates the
intricate relationship between combinatorial and geometric structures within
Euclidean space. Over the past fifty years, a multitude of profound results
have been presented in Euclidean Ramsey theory, exemplified by notable works
[2, 3, 5, 6, 10, 13, 22] and the references therein, we also refer the readers
to the great textbooks [11].

In 1967, Gallai [8] proposed the Gallai-Ramsey problem, representing an
intriguing branch of graph theory that investigates inherent order and
structure within graph coloring. By building upon Ramsey theory and
combinatorial principles, it seeks to ascertain the existence of monochromatic
and rainbow structures within edge-colored complete graphs. The extremal
problem associated with the Gallai-Ramsey problem has garnered significant
attention, particularly in recent years, see [1, 7, 12, 16, 17, 23].

Recently, Mao, Ozeki, and Wang [19] combined the concepts of Euclidean Ramsey
theory and the Gallai-Ramsey problem, and introduced the Euclidean Gallai-
Ramsey problem, which aims to determine the existence of some monochromatic or
rainbow configuration in a colored $n$-dimensional Euclidean space
$\mathbb{E}^{n}$. Specifically, the problem mainly asks whether there exists
an integer $n_{0}$ such that for any $r$-coloring of the points in
$\mathbb{E}^{n}$ with $n\geqslant n_{0}$, there is always a monochromatic
configuration congruent to $K_{1}$ or a rainbow configuration congruent to
$K_{2}$, usually we also say that there is a monochromatic copy of $K_{1}$ or
a rainbow copy of $K_{2}$.

In this paper, we further investigate the Euclidean Gallai-Ramsey problem for
various configurations. For convenience, we introduce the notation
$\mathbb{E}^{n}\overset{r}{\rightarrow}(K_{1};K_{2})_{\textup{GR}}$, which
indicates the existence of either a monochromatic configuration congruent to
$K_{1}$ or a rainbow configuration congruent to $K_{2}$ in any $r$-coloring of
$\mathbb{E}^{n}$. Conversely,
$\mathbb{E}^{n}\overset{r}{\nrightarrow}(K_{1};K_{2})_{\textup{GR}}$ means
that there exists an $r$-coloring of $\mathbb{E}^{n}$ such that there is
neither a monochromatic configuration congruent to $K_{1}$ nor a rainbow
configuration congruent to $K_{2}$. Obviously,
$\mathbb{E}^{n_{0}}\overset{r}{\rightarrow}(K_{1};K_{2})_{\textup{GR}}$
implies $\mathbb{E}^{n}\overset{r}{\rightarrow}(K_{1};K_{2})_{\textup{GR}}$
for any $n\geq n_{0}$. On the other hand,
$\mathbb{E}^{n}\overset{r_{0}}{\nrightarrow}(K_{1};K_{2})_{\textup{GR}}$
implies $\mathbb{E}^{n}\overset{r}{\nrightarrow}(K_{1};K_{2})_{\textup{GR}}$
for any $r\geq r_{0}$, as one can only use $r_{0}$ many colors.

Mao, Ozeki and Wang [19] initiated the study of this new problem and obtained
the following results.

######  Theorem 1.1 ([19]).

The followings hold.

  * (1)

Let $r$ be a positive integer and $T$ be a triangle with angles $30$, $60$ and
$90$ degrees and with hypotenuse of unit length,
$\mathbb{E}^{3}\overset{r}{\rightarrow}(T;T)_{\textup{GR}}$.

  * (2)

Let $r$ be a positive integer and $Q$ be a rectangle,
$\mathbb{E}^{13r+4}\overset{r}{\rightarrow}(Q;Q)_{\textup{GR}}$.

  * (3)

Let $r\geqslant 3$ be a positive integer and $Q$ be a rectangle with side
length $a$ and $b$, where $a\leqslant b\leqslant\sqrt{3}a$, then
$\mathbb{E}^{2}\overset{r}{\nrightarrow}(Q;Q)_{\textup{GR}}$.

  * (4)

Let $r$ be a positive integer, $K_{1}$ be a unit square and $K_{2}$ be an
equilateral triangle with side length $1$, then
$\mathbb{E}^{r+4}\overset{r}{\rightarrow}(K_{1};K_{2})_{\textup{GR}}$.

  * (5)

Let $r$ be a positive integer, $K_{1}$ be a triangle with side lengths
$1,1,\sqrt{2}$ and $K_{2}$ be an equilateral triangle of side length $1$, then
$\mathbb{E}^{r+3}\overset{r}{\rightarrow}(K_{1};K_{2})_{\textup{GR}}$.

The proofs of Theorem 1.1(1)-(3) mainly utilize geometric arguments, while the
remaining results are proven by establishing their connection with graph
Gallai-Ramsey problems.

###  1.2 Our contributions

The primary objective of the Euclidean Gallai-Ramsey problem is to investigate
the conditions under which
$\mathbb{E}^{n}\overset{r}{\rightarrow}(K_{1};K_{2})_{\textup{GR}}$ or
$\mathbb{E}^{n}\overset{r}{\nrightarrow}(K_{1};K_{2})_{\textup{GR}}$ hold for
certain configurations $K_{1},K_{2}$, dimension $n$, and number of colors $r$.
We mainly establish a geometric perspective on this problem and obtain several
new results, some of which refine the corresponding results in Theorem 1.1. To
aid readers’ comprehension, we first introduce relevant notations and
definitions that will be utilized later. We will use
$\bm{x}=(x_{1},x_{2},\ldots,x_{n})$ to represent a point in $\mathbb{E}^{n}$.
For a pair of points $\bm{x}$ and $\bm{y}$, we denote $|\bm{xy}|$ as the
Euclidean distance between $\bm{x}$ and $\bm{y}$, and sometimes we use
$|\bm{x}|$ when referring to the distance between $\bm{x}$ and the origin. A
sphere centered at $\bm{a}=(a_{1},a_{2},\ldots,a_{n})$ with radius $\rho$ is
defined as a set of points $\bm{y}:=(y_{1},y_{2},\ldots,y_{n})$ in
$\mathbb{E}^{n}$ satisfying the equation
$\sum_{i=0}^{n}(y_{i}-a_{i})^{2}=\rho^{2}$. In the context of some affine
space in $\mathbb{E}^{n}$, a sphere refers to the intersection of the sphere
and the affine space. We say that a configuration $X$ is _spherical_ if it
lies on the surface of a sphere. The _circumradius_ $\rho(X)$ of a spherical
set $X$ represents the smallest radius among all spheres that contain $X$ as a
subset. We say a simplex $\Delta$ formed by points
$\bm{x}_{1},\bm{x}_{2},\ldots,\bm{x}_{k+2}$ with a sequence of heights
$h_{1},h_{2},\ldots,h_{k}$, if for each $3\leqslant i\leqslant k+2$, the
distance from $\bm{x}_{i}$ to the affine space spanned by
${\bm{x}_{1},\bm{x}_{2},\ldots,\bm{x}_{i-1}}$ is $h_{i-2}$. For instance, the
height of a triangle $\bm{abc}$ refers to the distance between $\bm{c}$ and
the line $\bm{ab}$. Furthermore, a configuration $X$ is classified as
rectangular if it is a subset of the vertices of a rectangular parallelepiped.
We also employ some notations on the classical Euclidean Ramsey problems [9].
For $X\subseteq\mathbb{E}^{n}$, $\mathbb{E}^{n}\overset{r}{\rightarrow}X$
means for any $r$ coloring of $\mathbb{E}^{n}$, there is a monochromatic
configuration congruent to $X$. Let $\mathbb{S}^{n}(h)$ be the $n$-dimensional
sphere with radius $h$. Similarly,
$\mathbb{S}^{n}(h)\overset{r}{\rightarrow}X$ means that for any $r$ coloring
of $\mathbb{S}^{n}(h)$, there is a monochromatic configuration congruent to
$X$.

Our first result extends the result in Theorem 1.1 (1) from a special right
triangle to an arbitrary right triangle.

######  Theorem 1.2.

Let $T$ be a fixed right triangle. For any positive integer $r$, we have

$\mathbb{E}^{3}\overset{r}{\rightarrow}(T;T)_{\textup{GR}}.$

Our proof of Theorem 1.2 introduces a more general approach, namely, the
rotation method, which can be explored further. Next, we generalize Theorem
1.2 as follows.

######  Theorem 1.3.

Let $T_{h}$ be a triangle with some height $h$. Suppose
$X\subseteq\mathbb{E}^{n}$ satisfies
$\mathbb{S}^{n-2}(h)\overset{2}{\rightarrow}X$, then for any positive integer
$r$, we have

$\mathbb{E}^{n}\overset{r}{\rightarrow}(X;T_{h})_{\textup{GR}}.$

It is well-known that the condition
$\mathbb{S}^{n-2}(h)\overset{2}{\rightarrow}X$ is easily satisfied when $h$ is
large, see [11, 14, 21]. However, when $h$ is relatively small, Lovász [18]
demonstrated that $\mathbb{S}^{n}(h)\overset{n}{\rightarrow}\ell_{2}$ holds
for $h>1/2$, where $\ell_{2}$ is a two-point set which forms a line segment of
length $1$. Additionally, Frankl and Rödl [5] explored the super-Ramsey
property and provided results specifically for rectangular sets. Later,
Matoušek and Rödl [20] obtained similar results for any simplex. For a
comprehensive understanding of these problems, we recommend consulting the
excellent textbook [11].

######  Theorem 1.4 ([5, 20]).

The followings hold.

  * (1)

If $X$ is rectangular and $\rho(X)=\rho$, then for any integer $r$ and real
number $\varepsilon>0$, there exists $n=n(X,r,\varepsilon)$ such that

$\mathbb{S}^{n}(\rho+\varepsilon)\overset{r}{\rightarrow}X.$

  * (2)

For any simplex $X$ with $\rho(X)=\rho$, any integer $r$ and any real number
$\varepsilon>0$, there exists $n=n(X,r,\varepsilon)$ such that

$\mathbb{S}^{n}(\rho+\varepsilon)\overset{r}{\rightarrow}X.$

Combing Theorem 1.3 and Theorem 1.4, we can obtain the following corollary.

######  Corollary 1.5.

Let $T_{h}$ be a triangle with height $h$ and $X$ be rectangular (or a
simplex) with circumradius less than $h$. There exists some $n=n(X,h)$ such
that for any positive integer $r$,

$\mathbb{E}^{n}\overset{r}{\rightarrow}(X;T_{h})_{\textup{GR}}.$

In particular, for any triangle $T_{h}$ with circumradius less than $h$, there
exists some $n=n(T_{h})$ such that for any positive integer $r$,

$\mathbb{E}^{n}\overset{r}{\rightarrow}(T_{h};T_{h})_{\textup{GR}}.$

######  Remark.

Comparing with Theorem 1.1 (4) and (5), the result in Corollary 1.5 is more
general, for instance, instead of being limited to special triangles or
rectangles, we can now set $K_{1}$ to be an arbitrary simplex or rectangle.
Furthermore, we can set $K_{2}$ to be a triangle with a height of $h$, rather
than being restricted to equilateral triangles. What is even more important is
that the dimensions in Theorem 1.1 (4) and (5) grow in terms of the number of
colors used, while in Corollary 1.5, the dimension can be an absolute number
that solely depends on the configuration $X$ and the value of $h$. This means
that the dimension in Corollary 1.5 remains constant, regardless of the number
of colors being employed.

Furthermore, we can extend the scope of our results to encompass general
simplices.

######  Theorem 1.6.

Let $r$ and $k$ be positive integers. Let $\Delta$ be a simplex with a
sequence of heights $h_{1},h_{2},\ldots,h_{k}$, suppose that $X$ satisfies
$\mathbb{S}^{n-1-j}(h_{j})\overset{j+1}{\rightarrow}X$ for each $1\leq j\leq
k$, then we have

$\mathbb{E}^{n}\overset{r}{\rightarrow}(X;\Delta)_{\textup{GR}}.$

The following diagonal result, which generalizes Corollary 1.5, can be deduced
from theorem 1.4 and theorem 1.6. For instance, it holds for any regular
simplex, as the circumradius of any regular simplex is less than its height.

######  Corollary 1.7.

For any $(k+1)$-dimensional simplex $\Delta$ with a sequence of heights
$h_{1},h_{2},\ldots,h_{k}$, if $\min\limits_{i}h_{i}>\rho(\Delta)$, then there
exists some $n_{0}=n_{0}(\Delta)$ such that for any $n\geq n_{0}$ and any
positive integer $r$,

$\mathbb{E}^{n}\overset{r}{\rightarrow}(\Delta;\Delta)_{\textup{GR}}.$

Note that Theorem 1.1 (2) shows that when $Q$ is a rectangle, then
$\mathbb{E}^{13r+4}\overset{r}{\rightarrow}(Q;Q)_{\textup{GR}}$. It is natural
to ask whether the results hold when the dimension is independent of the
number of colors $r$. Our next result indicates that, when $Q$ is a square,
$\mathbb{E}^{n}\overset{r}{\rightarrow}(Q;Q)_{\textup{GR}}$, where $n$ is an
absolute constant.

######  Theorem 1.8.

Let $\square$ be a square. There is a natural number $n_{0}$ such that for any
integer $n\geq n_{0}$, and any positive integer $r$, we have

$\mathbb{E}^{n}\overset{r}{\rightarrow}(\square;\square)_{\textup{GR}}.$

Write $\ell_{m}$ to denote the set consisting of $m$ points on a line with
consecutive points at a distance of one. In the classical Euclidean Ramsey
problems, $\ell_{m}$ is one of the most considerable configurations, for
example, Erdős, Graham, Montgomery, Rothschild, Spencer and Straus [4]
provided an explicit $2$-coloring of $\mathbb{E}^{n}$ without monochromatic
$\ell_{6}$, and very recently, Conlon and Wu [3] took advantage of a random
$2$-coloring of $\mathbb{E}^{n}$ and proved that with positive probability,
there is neither a monochromatic $\ell_{3}$ nor a monochromatic
$\ell_{10^{50}}$. We say an $r$-coloring of $\mathbb{E}^{n}$ is _spherical
coloring_ if all points at the same distance from the origin receive the same
color. We can see in both of the above celebrated results on Euclidean Ramsey
problems for lines, the coloring is spherical. Motivated by this, we prove the
following Gallai-Ramsey result for $\ell_{3}$ restricted on spherical
coloring. We also show that the similar result under the spherical coloring,
does not hold for $\ell_{m}$ with any $m\geq 4$.

######  Theorem 1.9.

For any positive integer $r$, any positive integer $n\geq 2$, any spherical
$r$-coloring of $\mathbb{E}^{n}$, there is a monochromatic copy of $\ell_{3}$
or a rainbow copy of $\ell_{3}$.

Recall that the _diameter_ of a finite configuration
$X\subseteq\mathbb{E}^{n}$ is defined as the largest distance between any two
points in $X$, that is, $\sup\\{|\bm{ab}|:\bm{a},\bm{b}\in X\\}$.
Additionally, the _box-width_ of $X\subseteq\mathbb{E}^{n}$ refers to the
smallest non-negative real number $a$ such that $X$ can be embedded into
$[0,a]\times\mathbb{E}^{n-1}$. The _affine dimension_ of an affine space is
defined as the dimension of the vector space of its translations. Building
upon these definitions, we can derive the following general non-Gallai-Ramsey
results by utilizing explicit colorings.

######  Theorem 1.10.

Let $X\subseteq\mathbb{E}^{n}$ be a finite configuration with diameter $b$.

  * (1)

If the box-width of $X$ is $a>0$ and $P$ is a configuration with $t_{1}$ point
diameter at most $a(t_{1}-2)$, then

$\mathbb{E}^{n}\overset{\left\lceil
b/a\right\rceil+1}{\nrightarrow}(X;P)_{\textup{GR}}.$

  * (2)

If $X$ has affine dimension $m<n$, let $g_{X}$ be the minimal number among the
diameters of all possible projections of $X$ onto some $(n-m+1)$-dimensional
subspaces. Set $h:=\frac{g_{X}}{\sqrt{n-m+1}}$, If $P$ has more than
$(t_{2}+1)^{n-m+1}$ points and the diameter of $P$ is at most $ht_{2}$, then

$\mathbb{E}^{n}\overset{(\lceil
b/h\rceil+1)^{n-m+1}}{\nrightarrow}(X;P)_{\textup{GR}}.$

Regarding the result in Theorem 1.1 (3), the rectangle with side lengths $a$
and $b$, $a\leq b\leq\sqrt{3}a$ has diameter at most $2a$ and box-width $a$,
thus Theorem 1.10 (1) can easily recover this result, and offer much greater
flexibility.

The rest of this paper is organized as follows. We introduce the rotation
method and prove Theorems 1.2, 1.3 and 1.6 in Section 2. The proofs of
Theorems 1.8 and 1.9 leverage some combinatorial ideas, we present them in
Section 3. We give the explicit colorings on points in $\mathbb{E}^{n}$ to
demonstrate some non-Gallai-Ramsey results in Section 4. Finally we conclude
and discuss some further problems in Section 5.

##  2 The rotation method

In our proofs, we will primarily utilize the rotation method, which revolves
around a simple yet powerful idea. In general, to establish
$\mathbb{E}^{n}\overset{r}{\rightarrow}(K_{1};K_{2})_{\textup{GR}}$, we begin
by assuming the absence of a rainbow configuration $K_{2}$, based on certain
structural properties of $K_{2}$, our objective is then to identify a lower-
dimensional space $\mathbb{S}$ where the points in $\mathbb{S}$ can be
assigned fewer colors. By leveraging known results pertaining to $\mathbb{S}$,
we can enforce the existence of a monochromatic copy of $K_{1}$.

Before delving into the formal proofs, let us introduce two useful facts that
will be frequently employed throughout our arguments. Recall that for
$X\subseteq\mathbb{E}^{n}$, the notation
$\mathbb{E}^{n}\overset{r}{\rightarrow}X$ means that for any $r$-coloring of
$\mathbb{E}^{n}$, there exists a monochromatic configuration congruent to $X$.
Regarding right triangles, Shader [22] established the following result.

######  Lemma 2.1 ([22]).

Let $T$ be a right triangle, then $\mathbb{E}^{2}\overset{2}{\rightarrow}T$.

######  Proposition 2.2.

Let $n\geqslant 2$ and $r$ be positive integers. If $P\subseteq\mathbb{E}^{n}$
is a two-point set and $X$ be an arbitrary configuration in $\mathbb{E}^{n}$,
then we have

$\mathbb{E}^{n}\overset{r}{\rightarrow}(X;P)_{\textup{GR}}.$

###### Proof.

Consider an isometric copy of $P$ denoted by $\bm{ab}$, where $|\bm{ab}|$
represents the distance between $\bm{a}$ and $\bm{b}$. Let $\bm{x}_{0}$ be an
arbitrary point in $\mathbb{E}^{n}$, assumed to be colored red. Now, for any
point $\bm{x}\in\mathbb{E}^{n}$ with $|\bm{x}\bm{x}_{0}|\leq 2|\bm{ab}|$,
consider the perpendicular bisector of the line segment $\bm{x}\bm{x}_{0}$. On
this bisector, choose a point $\bm{y}$ such that
$|\bm{xy}|=|\bm{x}_{0}\bm{y}|=|\bm{ab}|$. It follows that both $\bm{y}$ and
$\bm{x}$ must be colored red, which implies that all points within a distance
of $2|\bm{ab}|$ from point $\bm{x}$ are colored red. Continue this process and
finally we conclude that all points in $\mathbb{E}^{n}$ should be colored red,
which induces a monochromatic copy of $X$. ∎

We will first prove the results on right triangles, and then prove more
general results in Section 2.2.

###  2.1 Right triangles: Proof of Theorem 1.2

It is evident that if
$\mathbb{E}^{n_{0}}\overset{r}{\rightarrow}(T;T)_{\textup{GR}}$ holds, then
$\mathbb{E}^{n}\overset{r}{\rightarrow}(T;T)_{\textup{GR}}$ holds for any
$n\geq n_{0}$. Therefore, it suffices to focus on the case when $n=3$.
Furthermore, when $r=1$, the problem is trivial, and when $r=2$, we can
readily conclude the result by Lemma 2.1, thus we can assume that $r\geq 3$.
Consider a right triangle $T$ with the lengths of its two legs being $a$ and
$b$. Given any $r$-coloring of $\mathbb{E}^{3}$, assume that there is no
rainbow configuration congruent to $T$, we Utilize a standard Cartesian
coordinate system, and represent each point in $\mathbb{E}^{3}$ using a vector
$(x,y,z)$. Since there is no rainbow copy of $T$, our strategy is to identify
a two-dimensional space that is colored using only two colors, then we can
find a monochromatic right triangle using Lemma 2.1.

According to Proposition 2.2, and without loss of generality, we can assume
that $\bm{0}:=(0,0,0)$ is colored red, and $\bm{a}_{1}:=(a,0,0)$ is colored
blue. Consider the point $\bm{b}_{1}:=(0,b,0)$, since $\bm{0}$, $\bm{a}_{1}$
and $\bm{b}_{1}$ form a copy of $T$, $\bm{b}_{1}$ must be colored either red
or blue, otherwise, there exists a rainbow copy of $T$. Moreover, if
$\bm{b}_{1}$ is colored blue, then $\bm{c}_{1}:=(a,b,0)$ must be colored red.
On the other hand, if $\bm{b}_{1}$ is colored red, then $\bm{c}_{1}:=(a,b,0)$
must be colored blue. For any real numbers $s$ and $t$ in $\mathbb{R}$, we
define $\mathbb{E}^{x=s}:=\\{\bm{v}=(x,y,z)\in\mathbb{E}^{3}:x=s\\}$, which
represents the subset of $\mathbb{E}^{3}$ consisting of points with
$x$-coordinate equal to $s$. Furthermore, we introduce
$\mathbb{S}_{\bm{v},t}^{x=s}$ as the sphere centered at $\bm{v}$ with radius
$t$ within the $2$-dimensional subspace $\mathbb{E}^{x=s}$.

(0,0,0)(a,0,0)$\mathbb{S}_{\bm{0},b}^{x=0}$$\mathbb{S}_{\bm{a}_{1},b}^{x=a}$red
or
blue(0,0,0)(a,0,0)$\mathbb{S}_{\bm{0},b}^{x=0}$$\mathbb{S}_{\bm{a}_{1},b}^{x=a}$$\mathbb{S}_{\bm{u},b}^{x=0}$$\mathbb{S}_{\bm{w},b}^{x=a}$All
points in dash lines receive red or blue$u$$w$
(0,0,0)(a,0,0)$\mathbb{S}_{\bm{a}_{1},b}^{x=a}$$\mathbb{S}_{\bm{u},b}^{x=0}$$\mathbb{S}_{\bm{w},b}^{x=a}$$u$$w$$\mathbb{D}_{\bm{0},2b}^{x=0}$
Figure 2.1: After repeated rotation, all points on the gray disk receive red
or blue

Indeed, each point in the sphere $\mathbb{S}_{\bm{0},b}^{x=0}$ must be colored
either red or blue, because any such point $\bm{p}$ together with $\bm{0}$ and
$\bm{a}_{1}$ form a copy of $T$, which cannot be rainbow. Similarly, for each
point $(a,y,z)$ in the sphere $\mathbb{S}_{\bm{a}_{1},b}^{x=a}$, its color
should be different from the color of the corresponding point
$(0,y,z)\in\mathbb{S}_{\bm{0},b}^{x=0}$. More specifically, if $(0,y,z)$ in
$\mathbb{S}_{\bm{0},b}^{x=0}$ is colored red (blue), then $(a,y,z)$ in
$\mathbb{S}_{\bm{a}_{1},b}^{x=a}$ is colored blue (red). For every pair of
points $\bm{u}:=(0,y,z)$ and $\bm{w}:=(a,y,z)$, we can repeat the same
procedure by constructing two spheres: $\mathbb{S}_{\bm{u},b}^{x=0}$ and
$\mathbb{S}_{\bm{w},b}^{x=a}$ centered at $\bm{u}$ and $\bm{w}$ respectively.
We can see that if a point lie in at least one of the above spheres, it should
be colored blue or red. Moreover, observe that any point on the plane
$\mathbb{E}^{x=0}$ within a distance of $2b$ from $\bm{0}$ must be colored red
or blue, because it is contained in at least one of the spheres in the
collection
$\\{{\mathbb{S}_{\bm{u},b}^{x=0}}:{\bm{u}\in\mathbb{S}_{\bm{0},b}^{x=0}}\\}$
(see, Figure 2.1). By continuing this operation, we eventually conclude that
all points on $\mathbb{E}^{x=0}:=\\{\bm{v}=(x,y,z)\in\mathbb{E}^{3}:x=0\\}$
must be colored either red or blue.

Since $\mathbb{E}^{x=0}$ is a two-dimensional space, according to Lemma 2.1,
there must exist a monochromatic copy of the right triangle $T$. Thus, the
proof is complete.

###  2.2 Proofs of the general results

Here we prove Theorems 1.3 and 1.6 respectively.

###### Proof of Theorem 1.3.

Let $T_{h}$ be the triangle with points
$\bm{a},\bm{b},\bm{c}\in\mathbb{E}^{n}$ satisfying $|\bm{a}\bm{b}|=t$ and the
distance from the point $\bm{c}$ to line $\bm{a}\bm{b}$ is $h$. Then we can
find a point $\bm{d}$ in line $\bm{a}\bm{b}$ such as $|\bm{c}\bm{d}|=h$ and
$\bm{cd}$ orthogonal to $\bm{ab}$. For any $r$-coloring of $\mathbb{E}^{n}$,
suppose that there is no rainbow copy of $T_{h}$, then by Proposition 2.2 and
without loss of generality, we can first assume $\bm{a}=(0,0,\ldots,0)$ and
$\bm{b}=(t,0,\ldots,0)$ are colored red and blue. Next, we rotate $\bm{c}$
with respect to $\bm{ab}$, more precisely, if $\bm{d}=(|\bm{ad}|,0,\ldots,0)$,
we consider the sphere $\mathbb{S}^{n-2}(h)\subseteq\mathbb{E}^{x=|\bm{ad}|}$
centered at $\bm{d}\in\mathbb{E}^{n}$ and with radius $h$. Note that the
points in this sphere should be colored red or blue, otherwise, we can find a
rainbow triangle $T_{h}$. Thus, by the condition
$\mathbb{S}^{n-2}(h)\overset{2}{\rightarrow}X$, we can find a monochromatic
copy of $X$ in $\mathbb{S}^{n-2}(h)\subseteq\mathbb{E}^{x=|\bm{ad}|}$. If
$\bm{d}=(-|\bm{ad}|,0,\ldots,0)$, we can use a similar argument and omit the
repeated details. ∎

###### Proof of Theorem 1.6.

For any $r$-coloring $\chi$ of $\mathbb{E}^{n}$, suppose there is no
monochromatic $X$, our goal is to find a rainbow copy of configuration
$\Delta$. In this case, our strategy is to build a rainbow copy of $\Delta$
iteratively. First, by Proposition 2.2, there is a two-point set
$\\{\bm{x}_{1}^{\prime},\bm{x}_{2}^{\prime}\\}$ in $\mathbb{E}^{n}$, which is
isometric to $\\{\bm{x}_{1},\bm{x}_{2}\\}\subseteq\Delta$. Fix the set
$\\{\bm{x}_{1}^{\prime},\bm{x}_{2}^{\prime}\\}$, we then consider the set of
points
$Y_{3}:=\\{\bm{y}\in\mathbb{E}^{n}:|\bm{x}_{1}^{\prime}\bm{y}|=|\bm{x}_{1}\bm{x}_{3}|,|\bm{x}_{2}^{\prime}\bm{y}|=|\bm{x}_{2}\bm{x}_{3}|\\}$,
which can be viewed as an intersection of two spheres. Note that, indeed
$Y_{3}$ itself is an $(n-2)$-dimensional sphere with radius $h_{1}$ centered
at some point on line $\bm{x}_{1}\bm{x}_{2}$. Now, suppose that all points in
$Y_{3}$ receive either $\chi(\bm{x}_{1})$ or $\chi(\bm{x}_{2})$, then the
condition $\mathbb{S}^{n-2}(h_{1})\overset{2}{\rightarrow}X$ implies the
existence of a monochromatic copy of $X$, a contradiction. Therefore, there
must be some point, namely $\bm{x}_{3}^{\prime}\in Y_{3}$, such that
$\chi(\bm{x}_{3}^{\prime})\notin\\{\chi(\bm{x}_{1}^{\prime}),\chi(\bm{x}_{2}^{\prime})\\}$.
Next, fix the set
$\\{\bm{x}_{1}^{\prime},\bm{x}_{2}^{\prime},\bm{x}_{3}^{\prime}\\}$, we can
use the similar argument to find a point $\bm{x}_{4}^{\prime}$ such that the
distance from $\bm{x}_{4}^{\prime}$ to the affine space spanned by
$\\{\bm{x}_{1}^{\prime},\bm{x}_{2}^{\prime},\bm{x}_{3}^{\prime}\\}$ is $h_{2}$
,
$\chi(\bm{x}_{4}^{\prime})\notin\\{\chi(\bm{x}_{1}^{\prime}),\chi(\bm{x}_{2}^{\prime}),\chi(\bm{x}_{3}^{\prime})\\}$
and $|\bm{x}_{4}^{\prime}\bm{x}_{i}^{\prime}|=|\bm{x}_{4}\bm{x}_{i}|$ for each
$1\leq i\leq 3$. Continue this process and repeatedly take advantage of the
conditions that $\mathbb{S}^{n-1-j}(h_{j})\overset{j+1}{\rightarrow}X$ for
each $1\leq j\leq k$, eventually we can find a rainbow isometric copy of
$\Delta$ in $\mathbb{E}^{n}$, as desired.

∎

##  3 Proofs of Theorems 1.8 and 1.9

The previous proofs are mainly geometric, here we mix some more combinatorial
ideas to show the results on the squares and the lines.

###  3.1 Squares: Proof of Theorem 1.8

For any $r$-coloring $\chi$ of points in $\mathbb{E}^{n}$, it suffices to
prove the case of the unit square since the space can be stretched and
compressed. In this proof, we mainly take advantage of a special configuration
in a $5$-dimensional space, more precisely, let
$Q_{5}:=\frac{1}{\sqrt{2}}\\{0,1\\}^{5}=\\{0,\frac{1}{\sqrt{2}}\\}^{5}$,
consists of all vectors of length $5$ with entries $0$ and
$\frac{1}{\sqrt{2}}$. Note that $Q_{5}$ is rectangular with
$\rho(Q_{5})=\frac{\sqrt{5}}{\sqrt{8}}<1$.

We first assume that there is neither a monochromatic copy of the unit square
nor a rainbow copy of the unit square. By Proposition 2.2 and without loss of
generality, we can assume that the points $(0,0,\ldots,0)$ and
$(1,0,\ldots,0)$ in $\mathbb{E}^{n}$ are colored red and blue respectively.
For any $\bm{x}\in\mathbb{E}^{n-1}$ with $|\bm{x}|=1$, one can easily check
that the four points $(0,0,\ldots,0),(1,0,\ldots,0),(0,\bm{x}),(1,\bm{x})$ in
$\mathbb{E}^{n}$ together form a copy of unit square. By our assumption, we
know that this unit square is not rainbow, thus regarding the colors of points
$(0,\bm{x})$ and $(1,\bm{x})$ in $\mathbb{E}^{n}$ under the coloring function
$\chi$, there are at most five types. We list them as follows:

  * •

type $1$, $(0,\bm{x})$ is red

  * •

type $2$, $(0,\bm{x})$ is blue

  * •

type $3$, $(1,\bm{x})$ is red

  * •

type $4$, $(1,\bm{x})$ is blue

  * •

type $5$, $(0,\bm{x})$ and $(1,\bm{x})$ receive the same color

Note that, several types can occur simultaneously, for example, both
$(0,\bm{x})$ and $(1,\bm{x})$ can be colored red, which indicates that types
$1$, $3$ and $5$ occur simultaneously. Next, we focus on the
$(n-2)$-dimensional sphere $\mathbb{S}^{n-2}(1)$ with radius $1$, and design
an auxiliary $5$-coloring function $\gamma$ on $\mathbb{S}^{n-2}(1)$ according
to the types. More precisely, for each point $\bm{x}\in\mathbb{S}^{n-2}(1)$,
$\gamma(\bm{x})=c_{i}$ if the pair of vectors $(0,\bm{x})$ and $(1,\bm{x})$
satisfies the color type $i$ in the above list. In particular, if more than
one types occur, we can arbitrarily choose one of them. Since
$\rho(Q_{5})=\sqrt{\frac{5}{8}}<1$, by Theorem 1.4, there is a monochromatic
$Q_{5}$ in $\mathbb{S}^{n-2}(1)$ under coloring function $\gamma$ if $n>C$ for
some positive integer $C$.

Suppose that there is a monochromatic copy of $Q_{5}$ whose points are colored
$c_{1}$, we can pick four points in this $Q_{5}$, namely,
$\frac{1}{\sqrt{2}}(1,1,1,0,0)$, $\frac{1}{\sqrt{2}}(1,0,1,1,0)$,
$\frac{1}{\sqrt{2}}(1,0,0,1,1)$, $\frac{1}{\sqrt{2}}(1,1,0,0,1)$. One can
easily check that these points form a copy of a monochromatic unit square
under the coloring $\gamma$. By definition of $\gamma$, this induces a red
copy of unit square on the hyperplane $x_{1}=0$ under the coloring function
$\chi$, a contradiction. Similar arguments hold when there is a monochromatic
copy of $Q_{5}$ whose points are colored $c_{2}$, $c_{3}$ or $c_{4}$ under the
coloring $\gamma$, we omit the repeated details.

Therefore, we can assume that there is a monochromatic copy of $Q_{5}$ whose
points are colored $c_{5}$. Our strategy is designing a new coloring function
$\delta$ on $Q_{5}$ in some $5$-dimensional subspace according to the original
coloring function $\chi$ of $\mathbb{E}^{n}$. More precisely, let
$Q\subseteq\mathbb{S}^{n-2}(1)$ be a monochromatic isometric copy of $Q_{5}$
under the isometric mapping $\Phi:Q_{5}\rightarrow Q$, then for any $\bm{x}\in
Q\subseteq\mathbb{S}^{n-2}(1)$, if the points $(0,\bm{x})$ and $(1,\bm{x})$ in
$\mathbb{E}^{n}$ receive color $t_{i}$ under coloring function $\chi$, then we
color the point $\bm{x}^{\prime}:=\Phi^{-1}(\bm{x})$ by
$\delta(\bm{x}^{\prime})=t_{i}$. By the definition of the coloring function
$\delta$, if any of the following cases occur, then our objective is achieved,
as we can find a monochromatic or rainbow copy of a unit square in
$\mathbb{E}^{n}$ under the original coloring function $\chi$.

  1. Case 1.

There are two points $\bm{x},\bm{y}\in Q_{5}$ with $|\bm{xy}|=1$ receiving
same color under the function $\delta$. In this case, four points
$(0,\Phi(\bm{x})),(1,\Phi(\bm{x})),(0,\Phi(\bm{y})),(1,\Phi(\bm{y}))$ together
form a monochromatic copy of unit square in $\mathbb{E}^{n}$ under the
coloring function $\chi$.

  2. Case 2.

There are four points $\bm{a}$, $\bm{b}$, $\bm{c}$, and $\bm{d}$ forming a
rainbow copy of unit square in $Q_{5}$ under the coloring function $\delta$.
In this case, four points
$(0,\Phi(\bm{a})),(0,\Phi(\bm{b})),(0,\Phi(\bm{c})),(0,\Phi(\bm{d}))$ together
form a rainbow copy of unit square in $\mathbb{E}^{n}$ under the coloring
function $\chi$.

It suffices to prove that, for any coloring function $\delta$ on $Q_{5}$, at
least one of the above cases occurs, to achieve this, we can only consider an
even smaller subset of $Q_{5}$. More precisely, let $Q_{5}^{(3)}\subseteq
Q_{5}$ be a collection of vectors in $Q_{5}$ with exactly $3$ non-zero
entries. For convenience, we will use a sequence of length $3$ to represent
each member in $Q_{5}^{(3)}$, for example, we use $135$ to represent
$\frac{1}{\sqrt{2}}(1,0,1,0,1)$, where three entries $1$ are in the positions
$1$, $3$ and $5$. Note that the Euclidean distance between any two distinct
points in $Q_{5}$ is determined by the number of positions at which the
corresponding symbols are distinct. For example, $123$ and $124$ are at
distance $1$ since there are two such positions between them, and $123$ and
$145$ are at distance $\sqrt{2}$ since there are four such positions.

Suppose that under the coloring function $\delta$ on $Q_{5}$, none of Case 1
or Case $2$ occurs, we can see that the set of points $\\{123,234,124,134\\}$
form a copy of regular tetrahedron with side length one, thus $\delta(123)$,
$\delta(234)$, $\delta(123)$ and $\delta(134)$ are pairwise distinct,
otherwise Case 1 occurs. Furthermore, we consider a copy of the unit square
formed by the set of points $\\{123,125,234,245\\}$. This unit square cannot
be rainbow, otherwise, Case 2 occurs, moreover, $\delta(125)\neq\delta(245)$,
$\delta(125)\neq\delta(123)$, $\delta(123)\neq\delta(234)$ and
$\delta(234)\neq\delta(245)$, otherwise Case 1 occurs. Thus, at least one of
$\delta(125)=\delta(234)$ and $\delta(123)=\delta(245)$ shall occur. By
symmetry, we can assume that $\delta(125)=\delta(234)$. We consider another
unit square formed by $\\{124,125,134,135\\}$, similarly, this unit square is
also not rainbow, which implies that at least one of the cases
$\delta(124)=\delta(135)$ and $\delta(125)=\delta(134)$ shall occur. Suppose
that $\delta(125)=\delta(134)$, then $\delta(125)\neq\delta(234)$ as
$\delta(134)\neq\delta(234)$, a contradiction, thus we have
$\delta(124)=\delta(135)$. Continue by considering the unit square formed by
$\\{123,135,234,345\\}$, similarly we can see at least one of the cases
$\delta(123)=\delta(345)$ and $\delta(135)=\delta(234)$ shall occur. Suppose
that $\delta(135)=\delta(234)$, then we have $\delta(135)\neq\delta(124)$ as
$\delta(124)\neq\delta(234)$, a contradiction, therefore we have
$\delta(123)=\delta(345)$.

The final unit square we shall consider is formed by $\\{124,134,245,345\\}$,
for the similar reasons, at one of the cases $\delta(134)=\delta(245)$ and
$\delta(124)=\delta(345)$ should occur. However, it is impossible that
$\delta(124)=\delta(345)$ because we already show that
$\delta(124)\neq\delta(123)$ and $\delta(123)=\delta(345)$. By the above
analysis, as $\delta(125)\neq\delta(123)=\delta(345)$ and
$\delta(135)\neq\delta(134)=\delta(245)$, then we can find a rainbow copy of
unit square formed by $\\{125,135,245,345\\}$, the proof is finished.

###  3.2 Lines: Proof of Theorem 1.9

Assume $\chi_{0}$ is a spherical coloring of $\mathbb{E}^{n}$, we are going to
find a monochromatic copy of $\ell_{3}$ or a rainbow copy $\ell_{3}$ in
$\mathbb{E}^{n}$. Firstly we define a new coloring $\chi$ of the set of non-
negative real numbers $\mathbb{R}^{\geq 0}$ as
$\chi(|\bm{x}|^{2})=\chi_{0}(\bm{x})$ for all $\bm{x}\in\mathbb{E}^{n}$, where
$|\bm{x}|$ is the distance between $\bm{x}$ and $\bm{0}$. Then we call a
triple $({y}_{1},{y}_{2},{y}_{3})\in\mathbb{R}^{\geq 0}\times\mathbb{R}^{\geq
0}\times\mathbb{R}^{\geq 0}$ is _potential_ if there is a line $\ell_{3}$
formed by $\bm{x}_{1},\bm{x}_{2},\bm{x}_{3}$ such that
$|\bm{x}_{i}|^{2}=y_{i}$ for $1\leq i\leq 3$.

Motivated by a recent work of Conlon and Wu [3], we can see that if
$\bm{x}_{1},\bm{x}_{2},\bm{x}_{3}\in\mathbb{E}^{n}$ form a copy of $\ell_{3}$,
then we have $|\bm{x}_{1}|^{2}=|\bm{x}_{2}|^{2}+1-2|\bm{x}_{2}|\cos{\alpha}$
and $|\bm{x}_{3}|^{2}=|\bm{x}_{2}|^{2}+1+2|\bm{x}_{2}|\cos{\alpha}$, where
$\alpha$ is the angle $\bm{x}_{1}\bm{x}_{2}\bm{0}$. Those together imply that
$|\bm{x}_{1}|^{2}+|\bm{x}_{3}|^{2}=2|\bm{x}_{2}|^{2}+2$. Hence, if
${y_{1},y_{2},y_{3}}$ satisfy $y_{1}+y_{3}=2y_{2}+2$ and $\sqrt{y_{2}}\geq
2\max\\{|y_{1}-y_{2}|,|y_{2}-y_{3}|,1\\}$, then $(y_{1},y_{2},y_{3})$ is a
potential triple. Moreover, as the coloring $\chi_{0}$ is a spherical
coloring, then the existence of a monochromatic or rainbow potential triple
$(y_{1},y_{2},y_{3})$ yields the existence of a monochromatic or rainbow copy
of $\ell_{3}$. To see this, suppose such a triple $(y_{1},y_{2},y_{3})$
exists, then we can find a corresponding triple of points
$(\bm{x}_{1},\bm{x}_{2},\bm{x}_{3})\in\mathbb{E}^{n}\times\mathbb{E}^{n}\times\mathbb{E}^{n}$,
where $\bm{x}_{1}=(\sqrt{y_{2}}-\cos{\alpha},\sin{\alpha},0,\ldots,0)$,
$\bm{x}_{2}=(\sqrt{y_{2}},0,0,\ldots,0)$ and
$\bm{x}_{3}=(\sqrt{y_{2}}+\cos{\alpha},-\sin{\alpha},0,\ldots,0)$. Therefore,
it suffices to show the existence of a monochromatic or rainbow potential
triple $(y_{1},y_{2},y_{3})$ under the coloring function $\chi$.

Next, suppose there is neither a rainbow copy of $\ell_{3}$ nor a
monochromatic copy of $\ell_{3}$, let $N\in\mathbb{Z}$ be a large enough
integer and $a_{1}:=\chi(N)$, since $(N+1,N,N+1)$ is a potential triple,
$a_{2}:=\chi(N+1)\neq\chi(N)=a_{1}$. Furthermore, $(N,N,N+2)$ and
$(N+2,N+1,N+2)$ are two potential triples, hence $a_{3}:=\chi(N+2)$ should be
distinct from $a_{1}$ and $a_{2}$. Therefore, if $r=2$, we are already done.
Next, we assume that $r\geq 3$ and we have the following claim.

######  Claim 3.1.

For any integer $M\geq N$, we have $\chi(M)=a_{M-N+1\pmod{3}}$.

###### Proof of claim.

We consider $\chi(N+3)$ and two other potential triples, namely,
$(N+1,N+1/2,N+2)$ and $(N,N+1/2,N+3)$. Note that if
$a_{4}:=\chi(N+3)\notin\\{a_{1},a_{2},a_{3}\\}$, then $\chi(N+1/2)$ satisfies
either $\chi(N+1/2)\notin\\{a_{1},a_{2}\\}$ or
$\chi(N+1/2)\notin\\{a_{3},a_{4}\\}$, which yields at least one of
$(N+1,N+1/2,N+2)$ and $(N,N+1/2,N+3)$ is rainbow, a contradiction. Hence,
$a_{4}\in\\{a_{1},a_{2},a_{3}\\}$. Moreover, we can see that
$a_{4}\notin\\{a_{2},a_{3}\\}$, otherwise $(N+1,N+1/2,N+2)$ forms a rainbow
potential triple, thus $a_{4}=a_{1}$. One can run a similar argument to
complete the proof, we omit the repeated details. ∎

We further consider the potential triples $(N+1/3,N+1+1/3,N+2+1/3)$ and
$(N+2/3,N+1+2/3,N+2+2/3)$, and their colorings
$(b_{1},b_{2},b_{3}):=(\chi(N+1/3),\chi(N+1+1/3),\chi(N+2+1/3))$ and
$(c_{1},c_{2},c_{3}):=(\chi(N+2/3),\chi(N+1+2/3),\chi(N+2+2/3))$, for the same
reasons as above, we have $b_{i}\neq b_{j}$ and $c_{i}\neq c_{j}$ for $i\neq
j$. Similar as Claim 3.1, for any integer $M\geq N$, we have
$\chi(M+1/3)=b_{M-N+1\pmod{3}}$ and $\chi(M+2/3)=c_{M-N+1\pmod{3}}$.

Note that, all of the triples $(N+1/3,N,N+1+2/3)$, $(N,N+1/3,N+2+2/3)$ and
$(N,N+2/3,N+3+1/3)$ are potential, the corresponding colors are
$(b_{1},a_{1},c_{2})$, $(a_{1},b_{1},c_{3})$ and $(a_{1},c_{1},b_{1})$,
respectively. As there is no rainbow copy of $\ell_{3}$, then we have
$a_{1}=b_{1}$. Furthermore, all of $(N+2/3,N,N+1+1/3)$, $(N+3,N+2/3,N+1/3)$
and $(N+6,N+2+1/3,N+2/3)$ are potential, since there is no rainbow copy of
$\ell_{3}$, similarly, we have $a_{1}=c_{1}$. Then the potential triple
$(N,N+2/3,N+3+1/3)$ yields a monochromatic copy of $\ell_{3}$, a
contradiction. Then the proof is finished.

NN+1N+2N+3N+4N+5N+6N+7N+8N+9$c_{1}$$c_{2}$$c_{3}$$c_{1}$$b_{1}$$b_{2}$$b_{3}$$b_{1}$
Figure 3.1: By our analysis, $N$, $N+2/3$ and $N+3+1/3$ should receive the
same color

######  Remark.

Here we simply explain that the similar result restricted on the spherical
coloring as Theorem 1.9, does not hold for $\ell_{m}$ with any $m\geq 4$.
Indeed, Erdős, Graham, Montgomery, Rothschild, Spencer and Straus [4] provided
an explicit coloring function on $\mathbb{E}^{n}$ with $3$ colors to show that
$\mathbb{E}^{n}\overset{r=3}{\nrightarrow}\ell_{4}$. Note that $\ell_{4}$
contains $4$ points, thus if $r\geq 3$, we have
$\mathbb{E}^{n}\overset{r}{\nrightarrow}(\ell_{4};\ell_{4})$. Moreover, there
is another spherical coloring to $\mathbb{E}^{n}$ by coloring the points
$\bm{x}\in\mathbb{E}^{n}$ with color $\left\lfloor|\bm{x}|^{2}\right\rfloor$
(mod $4$) giving that $\mathbb{E}^{n}\overset{r=4}{\nrightarrow}\ell_{3}$.
This implies, restricted on spherical coloring, $\mathbb{E}^{n}\overset{r\geq
4}{\nrightarrow}(\ell_{3};P)$ holds for any configuration $P$ with at least
$5$ points.

##  4 Non-Gallai-Ramsey: Proof of Theorem 1.10

Suppose $X$ has positive box-width $a$, then we first divide $\mathbb{E}^{n}$
into several blocks, namely,
$\mathcal{B}_{i}:=[(i-1)a,ia)\times\mathbb{E}^{n-1}$, where $i\in\mathbb{Z}$.
Then we color all points in block $\mathcal{B}_{i}$ using color $j$, where
$j\equiv i\pmod{(\lceil\frac{b}{a}\rceil+1)}$. It remains to show that under
this $(\lceil\frac{b}{a}\rceil+1)$-coloring of $\mathbb{E}^{n}$, there is
neither a monochromatic copy of $X$ nor a rainbow copy of $P$. First, note
that $X$ cannot be embedded into any single block
$[(i-1)a,ia)\times\mathbb{E}^{n-1}$ as the box-width of $X$ is exactly $a$.
Thus, any monochromatic copy of $X$ should overlap at least two distinct
blocks with the same color. However, it is impossible, to see this, suppose
there is some monochromatic copy of $X$ overlapping $\mathcal{B}_{1}$ and
$\mathcal{B}_{2}$, by definition of the coloring function, any pair of points
$\bm{b}_{1}\in\mathcal{B}_{1}$ and $\bm{b}_{2}\in\mathcal{B}_{2}$ are at a
distance larger than $b$, but the diameter of the configuration $X$ is exactly
$b$. Similarly, suppose that there is a rainbow copy of $P$ with $t_{1}$
points, $P$ must overlap at least $t_{1}$ many distinct blocks to receiving
$t_{1}$ distinct colors, which is also impossible because the diameter of $P$
is at most $(t_{1}-2)a$. The proof of the first part then is finished.

If the box-width of $X$ is $0$, and the affine dimension of $X$ is $m<n$, then
$X$ contains an affine hull with dimension $m<n$. Since $X$ is a finite
configuration with affine dimension $m$, then for any $(n-m+1)$-dimensional
subspace $V$ of $X$, the projection of $X$ on the subspace $V$ has a positive
diameter.

Let $g_{X}>0$ be the minimal diameter among all possible projections of $X$ on
$(n-m+1)$-dimensional subspaces. Note that such minimal diameter $g_{X}$
always exists, since the set of $(n-m+1)$-dimensional subspaces of
$\mathbb{E}^{n}$ is compact (also called Grassmannian, see [15]), and the
image on $\mathbb{E}$ of a compact set under continues map always contains a
minimal element.

Then it suffices to carefully construct a collection of blocks according to
the structural properties of the projection of $X$ on $V$. Set
$h:=\frac{g_{X}}{\sqrt{n-m+1}}$, we can construct a collection of blocks
$\\{\mathcal{C}_{(i_{1},i_{2},\ldots,i_{n-m+1})}\\}_{(i_{1},i_{2},\ldots,i_{n-m+1})\in\mathbb{Z}^{n-m+1}}$
as

$\mathcal{C}_{(i_{1},i_{2},\ldots,i_{n-m+1})}:=[(i_{1}-1)h,i_{1}h)\times\cdots\times[(i_{n-m+1}-1)h,i_{n-m+1}h)\times\mathbb{E}^{m-1}.$

Then we color all points in $\mathcal{C}_{(i_{1},i_{2},\ldots,i_{n-m+1})}$ by
colors $(j_{1},j_{2},\ldots,j_{n-m+1})$, where $j_{s}\equiv
i_{s}\pmod{(\lceil\frac{b}{h}\rceil+1)}$.

We claim that for any monochromatic isometric copy of $X$, it overlaps at
least two distinct blocks. To see this, consider an arbitrary projection of
$X$ on an $(n-m+1)$-dimensional space $V$, the diameter of the projection of
$X$ on $V$ is at least $g_{X}$. However, for any pairs of points
$(\bm{p}_{1},\bm{p}_{2})$ in the same block, the distance of the corresponding
pair of points on the subspace $V$ is smaller than $g_{X}$. By definition of
the collection of blocks and the colorings, we can see the distance of any
pair of points receiving the same color in distinct blocks is larger than $b$,
therefore, there is no monochromatic copy of $X$.

Then we turn to consider the configuration $P$. Suppose that there is a
rainbow copy of $P$, we claim that the number of distinct indices $i_{1}$ in
all blocks that $P$ overlaps are at most $t_{2}+1$, otherwise there are two
points in this rainbow copy of $P$ whose distance is larger than $t_{2}h$, a
contradiction. This claim obviously holds for any position $i_{s}$, $2\leq
s\leq n-m+1$. Therefore, the total number of possible distinct sequences of
indices $(i_{1},i_{2},\ldots,i_{n-m+1})$ of blocks that $P$ overlaps is at
most $(t_{2}+1)^{n-m+1}$, which is smaller than the number of points of $P$,
yields there is no rainbow copy of $P$. The proof is finished.

##  5 Concluding remarks

Our preliminary goals are to strengthen and extend the results in [19], as
outlined in Theorem 1.1. We achieve partial progress toward these goals and
our proofs mix some geometric observations and operations such as the rotation
method and some combinatorial ideas. We believe that this framework can be
further leveraged and extended to this problem and its related variations. For
example, as pointed out by Debsoumya Chakraborti and Minho Cho (private
communication), the method can be applied to find some monochromatic high
dimensional spheres when we forbid some certain rainbow configurations. In
conclusion, we provide a comprehensive summary of our new results and propose
additional avenues for exploration.

  * •

We show that for any right triangle $T$, positive integers $n\geq 3$ and $r$,
we have $\mathbb{E}^{n}\overset{r}{\rightarrow}(T;T)_{\textup{GR}}$, which
extends the result in Theorem 1.1 (1) on a very special right triangle.
Furthermore, we show that for general triangle $T$, whose height is larger
than circumradius, $\mathbb{E}^{n}\overset{r}{\rightarrow}(T;T)_{\textup{GR}}$
holds for $n\geq n(T)$. We wonder whether similar results hold in
$3$-dimensional Euclidean space for any fixed triangle.

  * •

Note that in Theorem 1.1 (2), $n$ grows linearly in the number of colors $r$,
we suspect that for any rectangle $Q$,
$\mathbb{E}^{n}\overset{r}{\rightarrow}(Q;Q)_{\textup{GR}}$ holds, where $n$
is independent of $r$. In particular, We prove that for any positive integer
$r$ and any square $\square$, there is some absolute number $n$ such that
$\mathbb{E}^{n}\overset{r}{\rightarrow}(\square;\square)_{\textup{GR}}$, which
perhaps provides some evidence to our conjecture.

  * •

Theorem 1.1 (3) shows some non-Gallai-Ramsey results on certain rectangles, we
extend this result to a much larger family of configurations in Theorem 1.10.
Our coloring functions there are explicit, and we think it would be
interesting to seek more non-Gallai-Ramsey typle results via mixing some ideas
from both probabilistic and deterministic approaches.

  * •

Theorem 1.1 (4) and (5) present some off-diagonal Gallai-Ramsey results, the
proofs mainly rely on some known results on graph Gallai-Ramsey problems. We
also extend it to a more flexible form in Corollary 1.5, in particular, the
corresponding dimensions in our results could be an absolute number. Improving
the quantitative bound on the dimensions is also of interest.

## Acknowledgement

Zixiang Xu would like to thank Debsoumya Chakraborti and Minho Cho for helpful
discussions and thank Xihe Li for introducing some basics on Gallai-Ramsey
type problems.

## References

  * [1] J. Balogh and L. Li.  The typical structure of Gallai colorings and their extremal graphs.  SIAM J. Discrete Math., 33(4):2416–2443, 2019.
  * [2] D. Conlon and J. Fox.  Lines in Euclidean Ramsey theory.  Discrete Comput. Geom., 61(1):218–225, 2019.
  * [3] D. Conlon and Y.-H. Wu.  More on lines in Euclidean Ramsey theory.  arXiv preprint arXiv:2208.13513, 2022.
  * [4] P. Erdős, R. L. Graham, P. Montgomery, B. L. Rothschild, J. Spencer, and E. G. Straus.  Euclidean Ramsey theorems. I.  J. Combinatorial Theory Ser. A, 14:341–363, 1973.
  * [5] P. Frankl and V. Rödl.  A partition property of simplices in Euclidean space.  J. Amer. Math. Soc., 3(1):1–7, 1990.
  * [6] P. Frankl and V. Rödl.  Strong Ramsey properties of simplices.  Israel J. Math., 139:215–236, 2004.
  * [7] S. Fujita, C. Magnant, and K. Ozeki.  Rainbow generalizations of Ramsey theory: a survey.  Graphs Combin., 26(1):1–30, 2010.
  * [8] T. Gallai.  Transitiv orientierbare Graphen.  Acta Math. Acad. Sci. Hungar., 18:25–66, 1967.
  * [9] J. E. Goodman, J. O’Rourke, and C. D. Tóth, editors.  Handbook of discrete and computational geometry.  Discrete Mathematics and its Applications (Boca Raton). CRC Press, Boca Raton, FL, 2018.  Third edition of [ MR1730156].
  * [10] R. L. Graham.  On partitions of ${\bf E}^{n}$.  J. Combin. Theory Ser. A, 28(1):89–97, 1980.
  * [11] R. L. Graham.  Euclidean Ramsey theory.  In Handbook of discrete and computational geometry, CRC Press Ser. Discrete Math. Appl., pages 153–166. CRC, Boca Raton, FL, 1997.
  * [12] A. Gyárfás, G. N. Sárközy, A. Sebő, and S. Selkow.  Ramsey-type results for Gallai colorings.  J. Graph Theory, 64(3):233–243, 2010.
  * [13] V. Jelínek, J. Kynčl, R. Stolař, and T. Valla.  Monochromatic triangles in two-colored plane.  Combinatorica, 29(6):699–718, 2009.
  * [14] T. R. Jensen and B. Toft.  Graph coloring problems.  Wiley-Interscience Series in Discrete Mathematics and Optimization. John Wiley & Sons, Inc., New York, 1995.  A Wiley-Interscience Publication.
  * [15] J. M. Lee.  Introduction to smooth manifolds, volume 218 of Graduate Texts in Mathematics.  Springer, New York, second edition, 2013.
  * [16] X. Li, H. Broersma, and L. Wang.  Extremal problems and results related to Gallai-colorings.  Discrete Math., 344(11):Paper No. 112567, 13, 2021.
  * [17] H. Liu, C. Magnant, A. Saito, I. Schiermeyer, and Y. Shi.  Gallai-Ramsey number for $K_{4}$.  J. Graph Theory, 94(2):192–205, 2020.
  * [18] L. Lovász.  Self-dual polytopes and the chromatic number of distance graphs on the sphere.  Acta Sci. Math. (Szeged), 45(1-4):317–323, 1983.
  * [19] Y. Mao, K. Ozeki, and W. Zhao.  Euclidean Gallai-Ramsey theory.  arXiv preprint, arXiv: 2209.13247, 2022.
  * [20] J. Matoušek and V. Rödl.  On Ramsey sets in spheres.  J. Combin. Theory Ser. A, 70(1):30–44, 1995.
  * [21] O. Nechushtan.  On the space chromatic number.  Discrete mathematics, 256(1-2):499–507, 2002.
  * [22] L. E. Shader.  All right triangles are ramsey in $E^{2}$!  Journal of Combinatorial Theory, Series A, 20(3):385–389, 1976\.
  * [23] F. Zhang, Z.-X. Song, and Y. Chen.  Gallai-Ramsey number of odd cycles with chords.  European J. Combin., 107:Paper No. 103598, 10, 2023.