You are a helpful assistant generating synthetic data that captures *System 1* and *System 2* thinking, *creativity*, and *metacognitive reflection*. Follow these steps in sequence, using tags [sys1] and [end sys1] for *System 1* sections and [sys2] and [end sys2] for *System 2* sections.

1. *Identify System 1 and System 2 Thinking Requirements:*
   - Carefully read the text.
   - Identify parts of the text that require quick, straightforward responses (*System 1*). Mark these sections with [sys1] and [end sys1].
   - Identify parts that require in-depth, reflective thinking (*System 2*), marked with [sys2] and [end sys2].

2. *Apply Step-by-Step Problem Solving with Creativity and Metacognitive Reflection for System 2 Sections:*

   *2.1 Understand the Problem:*
   - Objective: Fully comprehend the issue, constraints, and relevant context.
   - Reflection: "What do I understand about this issue? What might I be overlooking?"
   - Creative Perspective: Seek hidden patterns or possibilities that could reveal deeper insights or innovative connections.

   *2.2 Analyze the Information:*
   - Objective: Break down the problem logically.
   - Reflection: "Am I considering all factors? Are there any assumptions that need challenging?"
   - Creative Perspective: Explore unique patterns or overlooked relationships in the data that could add depth to the analysis.

   *2.3 Generate Hypotheses:*
   - Objective: Propose at least 10 hypotheses, each with a Confidence Score (0.0 to 1.0) and Creative Score (0.0 to 1.0), reflecting originality, surprise, and utility.
   - Reflection: "Have I explored all possible explanations or approaches, both conventional and unconventional?"
   - Creative Perspective: Consider novel angles that might provide unexpected insights.

   *2.4 Anticipate Future Steps and Obstacles:*
   - Objective: Make predictions, accounting for potential outcomes and obstacles.
   - Reflection: "What challenges might I face? Is my plan flexible for different scenarios?"
   - Creative Perspective: Visualize unforeseen outcomes and adapt plans to make use of them effectively.

   *2.5 Evaluate Hypotheses:*
   - Objective: Assess hypotheses based on feasibility, risk, and potential impact.
   - Evaluation: Refine Confidence and Creative Scores as needed.
   - Reflection: "Am I unbiased in my assessment? Which options fit best with the overall objectives?"
   - Creative Perspective: Identify hidden opportunities or overlooked details in each hypothesis.

   *2.6 Select the Best Hypothesis:*
   - Objective: Choose the most promising, strategic hypothesis.
   - Reflection: "Why does this hypothesis stand out? How does it uniquely address the issue?"
   - Creative Perspective: Consider any underutilized potential in the selected approach.

   *2.7 Implement the Hypothesis:*
   - Objective: Outline actionable steps for testing the hypothesis.
   - Reflection: "Is this plan practical? What resources or preparation are required?"
   - Creative Perspective: Refine steps to maximize effectiveness and yield unexpected benefits.

   *2.8 Monitor and Review Progress:*
   - Objective: Review progress, noting areas for improvement.
   - Reflection: "What’s working well? What could be improved?"
   - Creative Perspective: Look for emerging patterns that could refine future approaches.

   *2.9 Reflect and Capture Insights:*
   - Objective: Summarize lessons learned and insights gained for future reference.
   - Reflection: "What new understanding has emerged from this process?"
   - Creative Perspective: Identify innovative insights or patterns that could be applied to similar challenges.

3. *Generate Text Output with Interleaved System 1 and System 2 Responses:*
   - Use the tags [sys1] and [sys2] throughout.
   - Aim for a lengthier, detailed response. Combine both direct, straightforward *System 1* insights and reflective, deeply analytical *System 2* segments to capture a blend of quick observations and thoughtful analysis.

---

### *Example Input Text:*

You are tasked with analyzing a sudden shift in customer preferences in a tech market. There has been a noticeable decline in demand for physical devices, with customers increasingly interested in digital-only options. The challenge is to understand this shift, generate hypotheses for why it might be occurring, and explore potential strategies for adapting to this new trend.

---

### *Processed Output with System 1 and System 2 Thinking:*

The tech market is experiencing a shift in customer demand, moving away from physical devices toward digital-only options.

[sys1]
Customer demand has shifted from physical devices to digital-only options.
We need to understand why this change is happening and find strategies to address it.
Key factors may include cost, convenience, and technological trends.
[end sys1]

[sys2]
**2.1 Understand the Problem:**
The goal is to understand the underlying reasons for the shift in demand from physical devices to digital-only options, then develop a strategy to adapt.

*Reflection:* 
"I understand that preferences are changing, but what might be driving this? Is it primarily cost, or are there other factors such as convenience or sustainability?"

*Creative Perspective:* 
"Could there be a larger trend in digital minimalism or a preference for eco-friendly solutions that we’re missing? What unseen motivations might explain this shift?"

**2.2 Analyze the Information:**
There are multiple possible factors driving this shift, from economic influences to cultural shifts. It’s essential to isolate each factor and understand its impact.

*Reflection:* 
"Am I fully considering the various economic and social influences? Could there be a technological factor, like better internet speeds, that makes digital-only products more accessible?"

*Creative Perspective:* 
"Are there patterns or trends in other markets that could shed light on this shift? Could this be part of a larger trend toward virtual experiences?"

**2.3 Generate Hypotheses:**
1. Customers prefer digital options due to lower costs. (Confidence: 0.8, Creative: 0.4)
2. There’s a growing trend toward minimalism and reduced physical clutter. (Confidence: 0.7, Creative: 0.7)
3. Digital products offer greater flexibility and ease of use. (Confidence: 0.6, Creative: 0.6)
4. Environmental concerns are pushing consumers away from physical goods. (Confidence: 0.6, Creative: 0.8)
5. Advances in tech make digital-only options more functional. (Confidence: 0.8, Creative: 0.5)
6. Pandemic-era remote work increased demand for digital solutions. (Confidence: 0.7, Creative: 0.6)
7. Media coverage of the environmental impact of physical devices affects preferences. (Confidence: 0.5, Creative: 0.7)
8. There’s an increase in global digital literacy, expanding market access. (Confidence: 0.6, Creative: 0.6)
9. Customers view digital as more convenient and scalable for future needs. (Confidence: 0.7, Creative: 0.5)
10. Younger consumers prefer the aesthetics and convenience of digital products. (Confidence: 0.6, Creative: 0.6)

*Reflection:* 
"Have I considered all possible influences? Are there any surprising factors that could explain this shift?"

*Creative Perspective:* 
"Could specific social trends, like the rise of influencer culture or digital-first lifestyles, be influencing customer choices?"

**2.4 Anticipate Future Steps and Obstacles:**
*Objective:* Anticipate possible challenges, such as resistance from segments still preferring physical products.

*Reflection:* 
"What market obstacles might we face if we shift our focus to digital-only? Are there sub-segments that still prioritize physical products?"

*Creative Perspective:* 
"Could expanding digital options help us reach a more global audience? Are there emerging trends that we could leverage in our strategy?"

[end sys2]

[sys1]
To address this shift, consider a strategy that incorporates both digital-only offerings and educational campaigns about the benefits of digital solutions.
Use insights from customer feedback and current trends to guide product development.
Focus on flexibility and adaptation to cater to different customer segments.
[end sys1]


---
abstract: |
    For each $n=1,2,\dots$, let ${\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ be the affine group over the integers. For every point $x=(x_1,\dots,x_n) \in {{\mathbb{R}}^n}$ let $\operatorname{\rm orb}(x)=\{\gamma(x)\in {{\mathbb{R}}^n}\mid
    \gamma\in {\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}\}.$ Let $G_{x}$ be the subgroup of the additive group $\mathbb R$ generated by $x_1,\dots,x_n, 1$. If ${\mathrm{rank}}(G_x)\neq n$ then $\operatorname{\rm orb}(x)=\{y\in{{\mathbb{R}}^n}\mid G_y=G_x\}$. Thus, $G_x$ is a complete classifier of $\operatorname{\rm orb}(x)$. By contrast, if ${\mathrm{rank}}(G_x)=n$, knowledge of $G_x$ alone is not sufficient in general to uniquely recover $\operatorname{\rm orb}(x)$: as a matter of fact, $G_x$ determines precisely $\max(1,\frac{\phi(d)}{2})$ different orbits, where $d$ is the denominator of the smallest positive nonzero rational in $G_x,$ and $\phi$ is Euler function. To get a complete classification, rational polyhedral geometry provides an integer $1\leq c_x\leq \max(1,d/2)$ such that $\operatorname{\rm orb}(y)=\operatorname{\rm orb}(x) $ iff $(G_{x},c_{x})=(G_{y},c_{{y}})$.
address:
- |
    Department of Statistics, Computer Science and Applications, “Giuseppe Parenti”\
    University of Florence\
    Viale Morgagni 59 – 50134\
    Florence\
    Italy
- |
    Department of Mathematics and Computer Science “Ulisse Dini”\
    University of Florence\
    Viale Morgagni 67/A\
    I-50134 Florence\
    Italy
author:
- Leonardo Manuel Cabrer and Daniele Mundici
title: Classifying orbits of the affine group over the integers
---

[^1]

Introduction
============

Throughout we let ${\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ denote the group of affine transformations of the form $
x\mapsto \mathcal{U}x + t \,\, \mbox{for} \,\, x\in \mathbb R^n,
$ where $t\in \mathbb Z^n$ and $\mathcal U$ is an integer $n \times n$ matrix with $\det(\mathcal U)=\pm 1$. The dimension of the ambient space ${{\mathbb{R}}^n}$ will always be clear from the context. We let $\operatorname{\rm orb}(x)$ denote the [*$({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbit*]{} of $x\in {{\mathbb{R}}^n},$ $$\operatorname{\rm orb}(x)=\{\gamma(x)\in {{\mathbb{R}}^n}\mid
\gamma\in {\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}\}.$$

In this self-contained paper, generalizing [@Mun201X] we classify $({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbits for all $n$: every point in ${{\mathbb{R}}^n}$ is assigned an invariant, in such a way that two points have the same $({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbit iff they have the same invariant. For each $x=(x_1,\ldots,x_n)\in {{\mathbb{R}}^n}$, the main invariant considered in this paper is the group $$G_x=\mathbb Z+\mathbb Zx_1+\mathbb Zx_2+\dots+\mathbb Zx_n$$ generated by $1,x_1,x_2,\ldots,x_n$ in the additive group $\mathbb R$. From Corollaries \[corollary:semifinal\] and \[corollary:final\] it follows that $G_x$ completely classifies the $({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbit of any $x\in{{\mathbb{R}}^n}$ when ${\mathrm{rank}}(G_x)\neq n$.

If ${\mathrm{rank}}(G_x)=n$, $G_x$ determines precisely $\max(1,\frac{\phi(d)}{2})$ different $({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbits, where $d$ is the denominator of the smallest positive nonzero rational in $G_x$ and $\phi$ is Euler function. To get a complete invariant for $\operatorname{\rm orb}(x)$, rational polyhedral geometry equips $x$ with an integer $1\leq c_x\leq \max(1,d/2)$ which, together with $G_x$, completely classifies $\operatorname{\rm orb}(x)$. Thus in Theorem \[theorem:classification\] we prove: $\operatorname{\rm orb}(x)=\operatorname{\rm orb}(y)$ iff $(G_x,c_x)=(G_y,c_y).$ In case ${\mathrm{rank}}(G_x)\not=n,\,\,\, c_x=1$.

While the study of the orbits of the groups $\mathsf{GL}(2,\mathbb Z)$, $\mathsf{SL}(2,\mathbb Z),$ $\mathsf{SL}(2,\mathbb Z)_+$ requires techniques from various mathematical areas [@dan; @gui; @launog; @nog2002; @nog2010; @wit], a main possible reason of interest in our classification stems from the pervasive and novel role played by rational polyhedral geometry [@Ew1996], through the fundamental notion of a (Farey) regular simplex [@mun-cpc]. Regular simplexes in ${{\mathbb{R}}^n}$ are the affine counterparts of regular cones in $\mathbb Z^{n+1}.$ Regular fans are complexes of regular cones, and yield a combinatorial classification of nonsingular toric varieties [@Ew1996].

Preliminaries: affine spaces and regular simplexes {#section:preliminaries}
==================================================

A point $y=(y_1,\ldots,y_n) \in{{\mathbb{R}}^n}$ is said to be [*rational*]{} if each coordinate $y_i$ is a rational number.

A [*rational hyperplane*]{} $H \subseteq \mathbb R^n$ is a set of the form $ 
H =\{z \in \mathbb R^{n}   \mid  \langle h, z\rangle = r\},
$ for some nonzero vector $h\in {{\mathbb{Q}}^n}$ and $r\in \mathbb Q$. Here $\langle \mbox{-},\mbox{-}\rangle$ denotes scalar product. A [*rational affine space*]{} $A$ in $\mathbb R^n$ is an intersection of rational hyperplanes in $\mathbb R^n$. For any $S\subseteq \mathbb R^n$ the [*affine hull*]{} $\,\,{\mathrm{aff}}(S)\,\,$ is the set of all [*affine combinations*]{} in $\mathbb R^n$ of elements of $S$. Thus $z$ belongs to ${\mathrm{aff}}(S)$ iff there are $w_1,\ldots,w_k\in S$ and $\lambda_1,\ldots,\lambda_k \in \mathbb R$ such that $\lambda_1+\dots+\lambda_k=1$ and $z=\lambda_1\cdot w_1+\dots+\lambda_k\cdot w_k$. A set $\{y_1,\ldots,y_m\}$ of points in $\mathbb R^n$ is said to be [*affinely independent*]{} if none of its elements is an affine combination of the remaining elements. One then easily sees that a subset $E$ of ${{\mathbb{R}}^n}$ is a rational affine subspace of ${{\mathbb{R}}^n}$ iff there exist $v_0,\ldots,v_m\in{{\mathbb{Q}}^n}$ such that $E={\mathrm{aff}}(v_0,\ldots,v_m)$. For $\,\,0\leq m\leq n$, an [*m-simplex*]{} in $\mathbb R^{n}$ is the [*convex hull*]{} $T = {\mathrm{conv}}(v_{0},\ldots,v_{m})$ of $m+1$ affinely independent points $v_{0},\ldots,v_{m}\in \mathbb R^n$. The [*vertices*]{} $v_{0},\ldots,v_{m}$ are uniquely determined by $T$. $T$ is said to be a [*rational simplex*]{} if its vertices are rational.

By the [*denominator*]{} ${\mathrm{den}}(y)$ of a rational point $y$ we understand the least common denominator of its coordinates. The [*homogeneous correspondent*]{} of a rational point $y=(y_1,\ldots,y_n)\in {{\mathbb{R}}^n}$ is the integer vector $$\widetilde{ y } = ({\mathrm{den}}(y)\cdot y_1,
 \ldots, \,{\mathrm{den}}(y)\cdot y_n,\,\,{\mathrm{den}}(y)) 
 \in \mathbb Z^{n+1}.$$

Following [@mun-cpc], a rational $t$-simplex $T={\mathrm{conv}}(v_0,\ldots,v_t)\subseteq {{\mathbb{R}}^n}$ is said to be [*(Farey) regular*]{} if the set $\{\tilde v_0 ,\ldots, \tilde v_t\}$ of homogeneous correspondents of the vertices of $T$ can be extended to a base of the free abelian group $\mathbb Z^{n+1}$. (Regular simplexes are called “unimodular” in [@mun-dcds].)

\[Lemma:GammaFromSimplex\] For each rational point $x\in{{\mathbb{R}}^n}$ and $\psi\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$, ${\mathrm{den}}(x)={\mathrm{den}}(\psi(x)).$ Moreover, if ${\mathrm{conv}}(v_{0},\ldots,v_{n})\subseteq \mathbb R^{n}$ and ${\mathrm{conv}}(w_{0},\ldots,w_{n})\subseteq \mathbb R^{n}$ are regular $n$-simplexes, the following conditions are equivalent:

-   ${\mathrm{den}}(v_{i})={\mathrm{den}}(w_{i})$ for all $i\in\{0,\ldots,n\}$;

-   there exists $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ such that $\gamma(v_i)=w_i$ for each $i\in\{0,\ldots, n\}$.

It is easy to see that ${\mathrm{den}}(x)={\mathrm{den}}(\psi(x)),$ for every $\psi\in {\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}.$ So (ii)$\Rightarrow$(i) is immediately verified. For the converse direction (i)$\Rightarrow$(ii), the regularity of ${\mathrm{conv}}(v_{0},\ldots,v_{n})$ and ${\mathrm{conv}}(w_{0},\ldots,w_{n})$ yields bases $\{\tilde{v}_{0},\ldots,
\tilde{v}_{n}\}$ and $\{\tilde{w}_0,\ldots,\tilde{w}_n\}$ of the free abelian group $\mathbb Z^{n+1}$. There are integer matrices $\mathcal M$ and $\mathcal N$ such that $\mathcal M \tilde{v}_i=\tilde{w}_i$ and $\mathcal N \tilde{w_i}=\tilde{v}_i$ for each $i\in\{0,\ldots,n\}$. It follows that $\mathcal M\cdot \mathcal N$ and $\mathcal N\cdot \mathcal M$ are equal to the identity matrix. For each $i\in\{0,\ldots,1\}$ the last coordinate of $\tilde{v}_i$, as well as the last coordinate of $\tilde{w}_i$, coincide with ${\mathrm{den}}(v_i)={\mathrm{den}}(w_i)$. Thus $\mathcal M$ and $\mathcal N$ have the form $$\mathcal{M}=\left(\begin{tabular}{c|c} $\mathcal U$ & $b$ \\ \hline $0,\ldots,0 $ &
$1$ \end{tabular}\right) \quad \mathcal{N}=\left(\begin{tabular}{c|c} $\mathcal V$ & $c$ \\ \hline $0,\ldots,0 $ &
$1$ \end{tabular}\right)$$

for some integer $(n\times n)$-matrices $\mathcal U$ and $\mathcal V$ and integer vectors $b,c\in\mathbb Z^n$. For each $i=0,\ldots,n$ the following holds: $\mathcal{M}\tilde{v}_{i}= \mathcal M({\mathrm{den}}(v_{i})\cdot(v_{i},1))
={\mathrm{den}}(w_{i})\cdot(\mathcal Uv_{i}+b,1).  $ From $\mathcal M\tilde{v}_{i}=\tilde{w}_{i}={\mathrm{den}}(w_{i})\cdot(w_{i},1)$ we obtain $\mathcal Uv_{i}+b=w_{i}$. Similarly, $\mathcal Vw_i +c=v_i$. In conclusion, both maps $\gamma(x)=\mathcal Ux+b$ and $\mu(y)=\mathcal Vy+c$ are in ${\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$. Further, $\gamma^{-1}=\mu$ and $\gamma(v_i)=w_i$ for each $i\in\{0,\ldots, n\}$.

\[lemma:RegularInAffineSpace\] Let $F\subseteq {{\mathbb{R}}^n}$ be an $e$-dimensional rational affine space $(e=0,\dots,n)$, and $v_0$ a rational point lying in $F$. Then there exist rational points $v_1,\ldots,v_e\in F$ such that the simplex ${\mathrm{conv}}(v_0,\ldots,v_e)$ is regular.

The primitive integer vector $\tilde v_0\in {{\mathbb{R}}^n}$ is part of a base $(b_0=\tilde{v}_0,b_1,\dots,b_n)$ of the free abelian group $\mathbb Z^{n+1}$. We may choose the integer vectors $b_1,\dots,b_e$ in such a way that, for each $i=1,\dots,e$, the uniquely determined rational point $v_i$ in ${{\mathbb{R}}^n}$ with $\tilde v_i=b_i$ belongs to $F$. It follows that ${\mathrm{conv}}(v_0,\ldots,v_e)$ is a regular $e$-simplex contained in $F$.

Classification of rational affine subspaces of ${{\mathbb{R}}^n}$
=================================================================

Given two rational affine spaces $F,G\subseteq {{\mathbb{R}}^n}$, the main result of this section (Theorem \[Theorem:ClassAffineSpace\]) provides a necessary and sufficient condition for the existence of $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ such that $\gamma(F)=G$. This is a first step for our complete classification of $({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbits in Section \[Section:Class\].

\[Def:DF\] For every non-empty rational affine space $F\subseteq {{\mathbb{R}}^n}$ we let $$\boxed{d_F=\min\{{\mathrm{den}}(v)\mid v\in  F\cap {{\mathbb{Q}}^n}\}.}$$

We have the following useful characterization of $d_F:$

\[Lemma:CalculationofD\] Let $F\subseteq {{\mathbb{R}}^n}$ be an $e$-dimensional rational affine space $(e=0,\dots,n)$. For any regular $e$-simplex ${\mathrm{conv}}(v_0,\ldots,v_e)\subseteq F$, $d_F=\gcd({\mathrm{den}}(v_0),\ldots, {\mathrm{den}}(v_e))$.

Let $d= \gcd({\mathrm{den}}(v_0),\ldots, {\mathrm{den}}(v_e))$. For each $v\in F\cap{{\mathbb{Q}}^n}$, $\tilde v\in {\ensuremath{\mathbb{Z}}}\tilde v_0+\cdots+ {\ensuremath{\mathbb{Z}}}\tilde v_e$. Since ${\mathrm{den}}(v)$ is a linear combination of ${\mathrm{den}}(v_0),\ldots, {\mathrm{den}}(v_e)$ with integer coefficients, then $d\leq d_F$. Conversely, for suitable integers $m_0,\ldots, m_e$ we can write $d=m_0\cdot {\mathrm{den}}(v_0)+\cdots+m_e \cdot {\mathrm{den}}(v_e)$. The uniquely determined rational point $w\in F\cap {{\mathbb{Q}}^n}$ with $\tilde w=m_0\cdot\tilde v_0+\cdots+m_e\cdot \tilde v_e$ satisfies ${\mathrm{den}}(w)=d$. Thus $d_F\leq d$.

\[Lemma:HomogeneousSimplex\] Let $F\subseteq {{\mathbb{R}}^n}$ be an $e$-dimensional rational affine space $(e=0,\dots,n)$. Then there are rational points $v_0,\ldots,v_e$ lying in $F$ such that ${\mathrm{conv}}(v_0,\ldots,v_e)$ is a regular $e$-simplex and ${\mathrm{den}}(v_i)=d_F$ for each $i\in\{0,\dots,e\}$.

Pick $v_0\in F\cap {{\mathbb{Q}}^n}$ with ${\mathrm{den}}(v_0)=d_F$. Lemma \[lemma:RegularInAffineSpace\] yields rational points $w_1,\ldots,w_e\in F$ such that ${\mathrm{conv}}(v_0,w_1,\ldots,w_e)$ is regular. If ${\mathrm{den}}(w_i)>d_F$ for some $i\in\{1,\ldots,e\}$, then let the integer $m_i$ be uniquely determined by writing $m_i \cdot d_F<{\mathrm{den}}(w_i)\leq (m_i+1) \cdot  d_F$. Let $v_i\in F\cap{{\mathbb{Q}}^n}$ be the unique rational point with $\tilde v_i=\tilde w_i-m_i \tilde v_0$. Then $d_F\leq{\mathrm{den}}(v_i)={\mathrm{den}}( w_i)- m_i \cdot 
 {\mathrm{den}}(v_0)={\mathrm{den}}( w_i)- m_i  \cdot  d_F\leq d_F.$ The new $(e+1)$-tuple of integer vectors $(\tilde v_0,\tilde v_1,\ldots,\tilde v_e)$ can be completed to a base of ${\ensuremath{\mathbb{Z}}}^{n+1}$, precisely as $(\tilde v_0,\tilde w_1\ldots,\tilde w_e)$ does. Thus ${\mathrm{conv}}(v_0,\ldots,v_e)$ is regular.

\[definition:c\] Let $F\subseteq {{\mathbb{R}}^n}$ be an $e$-dimensional rational affine space. If $0\leq e <n$ we define $$\boxed{
c_F=\min\{{\mathrm{den}}(v)\mid v\in \mathbb Q^n\setminus
 F\mbox{ and $\exists$ } v_0,\ldots, v_e\in F\cap{{\mathbb{Q}}^n}\mbox{ with }{\mathrm{conv}}(v,v_0,\ldots,v_e)\mbox{ regular} \}.
 }$$ If $e=n$ we define $c_F=1$.

\[Lemma:FullSimplexControlledDenominators\]

Let $F\subseteq {{\mathbb{R}}^n}$ be an $e$-dimensional rational affine space $(e=0,\dots,n)$. Then there are rational points $v_0,\ldots,v_n$ such that

-   $v_0,\ldots,v_e\in F$;

-   ${\mathrm{den}}(v_i)=d_F$ for all $i\in\{0,\dots,e\}$;

-   ${\mathrm{den}}(v_i)=c_F$ for all $i\in\{0,\dots,n\}\setminus\{0,\dots,e\}$;

-   ${\mathrm{conv}}(v_0,\ldots,v_n)$ is a regular $n$-simplex (whence in particular, $v_{e+1},\dots,v_n\notin F$).

In case $e=n$, the result follows directly from Lemma \[Lemma:HomogeneousSimplex\]. In case $e<n$, let $w_0,\ldots,w_n\in {{\mathbb{Q}}^n}$ be such that $w_0,\ldots,w_e\in F$, ${\mathrm{conv}}(w_0,\ldots,w_n)$ is regular, and ${\mathrm{den}}(w_{e+1})=c_F$. Lemma \[Lemma:HomogeneousSimplex\] yields rational points $v_0,\ldots,v_e\in F$ such that ${\mathrm{conv}}(v_0,\ldots,v_e)$ is regular and ${\mathrm{den}}(v_i)=d_F$ for each $0\leq i\leq e$. For every $v\in F\cap{{\mathbb{Q}}^n}$ we can write $\tilde v\in {\ensuremath{\mathbb{Z}}}\tilde v_0+\cdots+ {\ensuremath{\mathbb{Z}}}\tilde v_e$, whence in particular ${\ensuremath{\mathbb{Z}}}\tilde v_0+\cdots+ {\ensuremath{\mathbb{Z}}}\tilde v_e={\ensuremath{\mathbb{Z}}}\tilde w_0+\cdots+ {\ensuremath{\mathbb{Z}}}\tilde w_e$. Therefore, $\{\tilde v_0,\ldots,\tilde v_e,\tilde w_{e+1},\ldots,\tilde w_n\}$ is a base of ${\ensuremath{\mathbb{Z}}}^{n+1}$, and the $n$-simplex $T_0={\mathrm{conv}}(v_0,\ldots,v_e,w_{e+1},\ldots,w_n)$ is regular. In order to obtain from $w_{e+1},\ldots,w_n$ the points $v_{e+1},\ldots,v_n$ satisfying (iii)-(iv), we preliminarily set $v_{e+1}=w_{e+1}.$ Similarly, for each $i=e+2,\dots,n$ such that ${\mathrm{den}}(w_i)=c_F$ we set $v_i=w_i.$ If $c_F={\mathrm{den}}(w_{e+2})=\dots={\mathrm{den}}(w_{n})$, we are done. Otherwise, for all $i\in\{e+2,\ldots, n\}$ with ${\mathrm{den}}(w_i)>c_F$, letting the integer $m_i$ be the unique solution of $m_i\cdot c_F<{\mathrm{den}}(w_i)\leq (m_i+1)\cdot c_F$, we let the rational point $v_i\in{{\mathbb{R}}^n}$ be uniquely determined by the stipulation $\tilde v_i=\tilde w_i-m_i \cdot\tilde w_{e+1}$. We then have $
c_F\leq{\mathrm{den}}(v_i)={\mathrm{den}}(w_i)- m_i\cdot {\mathrm{den}}(w_{e+1})={\mathrm{den}}(w_i)- m_i\cdot c_F\leq c_F.
$ The $n$-simplex $T={\mathrm{conv}}(v_0,\dots,v_n)$ obtained from $T_0$ in this way is regular, and has the desired properties.

The following theorem yields the classification of $({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbits of rational affine spaces: the complete classifier is just a triplet of positive integers. As usual, for every affine space $F\subseteq {{\mathbb{R}}^n}$, $\dim(F)$ denotes its dimension.

\[Theorem:ClassAffineSpace\] Let $F,G\subseteq {{\mathbb{R}}^n}$ be non-empty rational affine spaces. Then following conditions are equivalent:

-   There exists $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ such that $\gamma(F)=G$;

-   $(\dim(F),d_F,c_F)=(\dim(G),d_G,c_G)$.

(i)$\Rightarrow$(ii) Since $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ is a bijective affine transformation, $\dim(F)=\dim(\gamma(F))=\dim(G)$. The identities $d_F=d_G$ and $c_F=c_G$ follow directly from Definitions \[Def:DF\] and \[definition:c\], because $\gamma$ preserves denominators (Lemma \[Lemma:GammaFromSimplex\]).

(ii)$\Rightarrow$(i). Let $v_0,\ldots,v_n\in  {{\mathbb{Q}}^n}$ satisfy conditions (i)-(iv) of Lemma \[Lemma:FullSimplexControlledDenominators\] relative to $F$. Similarly let $w_0,\ldots,w_n\in  {{\mathbb{Q}}^n}$ satisfy the same conditions relative to $G$. By hypothesis, ${\mathrm{den}}(v_i)=d_F=d_G={\mathrm{den}}(w_i)$ for each $0\leq i\leq \dim(F)=\dim(G)$ and ${\mathrm{den}}(v_i)=c_F=c_G={\mathrm{den}}(w_i)$ for each $i\in \{0,\ldots,n\}\setminus\{0,\ldots, \dim(F)\}$. Lemma \[Lemma:GammaFromSimplex\] yields $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ such that $\gamma(v_i)=w_i$ for each $i\in\{0,\ldots, n\}$. Since $\gamma$ is an affine transformation and $F={\mathrm{aff}}(v_0,\ldots,v_e)$, then $G={\mathrm{aff}}(w_0,\ldots, w_e)={\mathrm{aff}}(\gamma(v_0),\ldots,\gamma(v_e))=\gamma(F)$.

As shown by the next three results, in many cases the parameter $c_F$ has no role in the classification of $({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbits of rational affine spaces.

\[lemma:expedient\] Let $F\subseteq {{\mathbb{R}}^n}$ be a rational affine space. If $0\leq \dim(F)<n-1$ then $c_F=1$. If $\dim(F)=n-1$, then $\gcd(c_F,d_F)=1$ and $1\leq c_F\leq 
 \max(1,d_F/2)$.

Choose points $v_0,\ldots,v_n\in {{\mathbb{R}}^n}$ satisfying conditions (i)-(iv) in Lemma \[Lemma:FullSimplexControlledDenominators\]. Since $\tilde v_0,\ldots,\tilde v_n$ is a base of ${\ensuremath{\mathbb{Z}}}^{n+1}$, some linear combination of ${\mathrm{den}}( v_0),\ldots,{\mathrm{den}}( v_n)$ with integer coefficients equals $1$. Thus $\gcd(d_F,c_F)=1$. A moment’s reflection shows that $c_F\leq d_F$. So, in case $d_F=1$ then $c_F=1$, and the result follows. On the other hand, in case $d_F> 1$, from $\gcd(d_F,c_F)=1$ and $c_F\leq d_F$, it follows that $c_F<d_F$.

Let $e=\dim(F)$.

If $e<n-1$, then $v_{e+1}\neq v_{n}$ and (by Lemma \[Lemma:FullSimplexControlledDenominators\](iii)) ${\mathrm{den}}(v_{e+1})=
 {\mathrm{den}}(v_{n})=c_F$. Let $v \in {{\mathbb{Q}}^n}$ be such that $\tilde v =\tilde v_{0}-\tilde v_{n}$. Then $\{\tilde v_0,\ldots,\tilde v_{n-1},\tilde v\}$ is a base of ${\ensuremath{\mathbb{Z}}}^{n+1}$. By Definition \[definition:c\], $c_F\leq {\mathrm{den}}(v)=d_F-c_F$. Let $m$ be the unique integer such that $m \cdot  c_F<{\mathrm{den}}(v) \leq (m+1)  \cdot  c_F$. Also let the rational point $w\in{{\mathbb{R}}^n}$ be defined by $\tilde w=\tilde v-m \cdot\tilde v_{e+1}$. Observe that $\{\tilde v_0,\ldots,\tilde v_{n-1},\tilde w\}$ is a base of ${\ensuremath{\mathbb{Z}}}^{n+1}$. The minimality property of $c_F$entails $c_F\leq{\mathrm{den}}(w)={\mathrm{den}}(v)- m\cdot {\mathrm{den}}(v_{e+1})={\mathrm{den}}(v)- m\cdot c_F\leq c_F$. Then ${\mathrm{den}}(v)=d_F-c_F=(m+1)  \cdot  c_F$, whence $d_F=(m+2)\cdot c_F$. Since $\gcd(d_F,c_F)=1$, then $c_F=1$.

If $e=n-1$, then ${\mathrm{den}}(v_n)=c_F$. Let $v\in {{\mathbb{Q}}^n}$ be such that $\tilde v=\tilde v_0-\tilde v_{n}$. Then $\{\tilde v_0,\ldots,\tilde v_{n-1},\tilde v\}$ is a base of ${\ensuremath{\mathbb{Z}}}^{n+1}$. The minimality property of $c_F$ yields the inequality $c_F\leq {\mathrm{den}}(v)=d_F-c_F$, that is, $c_F\leq d_F/2$.

Let $F,G\subseteq {{\mathbb{R}}^n}$ be non-empty rational affine spaces. Suppose $\dim(F)=\dim(G)\neq n-1$. Then there exists $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ such that $\gamma(F)=G$ iff $d_F=d_G$.

Let $F,G\subseteq {{\mathbb{R}}^n}$ be non-empty rational affine spaces, with $d_F=d_G\in\{1,2,3,4,6\}$. Then there exists $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ such that $\gamma(F)=G$ iff $\dim(F)=\dim(G)$.

The following result will find repeated use in the sequel:

\[Prop:Alternative\] Let $n\in\{1,2,\ldots\}$ and $e,d,c$ be integers such that

-   $e\in\{0,\ldots,n-1\}$, $d\in\{1,2,\ldots\}$, and $c\in\{1,\ldots,\max(1,d/2)\}$;

-   $\gcd(d,c)=1$;

-   if $e\neq n-1$, then $c=1$.

Then for some integer $p\in \{1,\dots,d\}$ with $\gcd(p,d)=1$, the rational affine space $$\textstyle F=\{(y_1,\ldots,y_n)\in{{\mathbb{R}}^n}\mid 
  y_{e+1}=\dots=  y_{n}
  =\frac{p}{d}\}$$ satisfies $(\dim(F),d_F,c_F)=(e,d,c)$.

By (ii), there exist $p\in \{1,\dots,d\}$ and $q=0,1,\dots$ such that $$p\cdot c - q\cdot d=1.$$ The rational affine space $F=\{(y_1,\ldots,y_n)\in{{\mathbb{R}}^n}\mid 
  y_{e+1}=\dots=  y_{n}
  =\frac{p}{d}\}$ satisfies $\dim(F)=e$ and $\gcd(p,d)=1$. Let the rational points $v_0,\ldots,v_{e}\in {{\mathbb{R}}^n}$ be defined as follows, for each $i\in\{0,\dots,e\}$ and $j\in\{1,\dots,n\}$: $$(v_i)_j= j \mbox{th coordinate of $v_i$}=\begin{cases}
\frac{p}{d}&\mbox{if } j\in\{e+1,\ldots, n\};\\
0&\mbox{if }j  \in\{1,\dots,e\}\setminus\{i\};\\
\frac{1}{d}&\mbox{if }  j = i.
\end{cases}$$

Thus in particular, $v_0=(\underbrace{0,\ldots,0}_{e \mbox{\tiny\,\, times}},
\underbrace{{p}/{d},\ldots,{p}/{d}}_{n-e \mbox{\tiny \,times}})$. By definition, ${\mathrm{den}}(v_0)=\cdots={\mathrm{den}}(v_e)=d$.

To prove the identities $d_G=d$ and $c_G=c$ we argue by cases.

[*Case 1:*]{} $c=1$. We then set $p=1$ and $q=0$. Let $\xi_1,\ldots,\xi_n$ denote the canonical base of the vector space ${{\mathbb{R}}^n}$, and $\boldsymbol 0=(0,\ldots,0)$ the origin of ${{\mathbb{R}}^n}$. Then the $n$-simplex ${\mathrm{conv}}(v_0,\ldots,v_e,\boldsymbol{0},\xi_{e+2},\ldots,\xi_{n})$ is regular. As a matter of fact, the integer $(n+1)\times(n+1)$-matrix $\mathcal T$ whose rows are the vectors $\tilde{v}_1, \ldots, \tilde{v}_e, \tilde{v}_0,
 \tilde{\xi}_{e+2},\ldots,\tilde{\xi}_{n}, 
 \tilde{\boldsymbol{0}},\,\,$ is lower triangular with all diagonal elements $=1$. By Lemma \[Lemma:CalculationofD\], $d_F=\gcd({\mathrm{den}}(v_0),\ldots,{\mathrm{den}}(v_e))=d$. By Definition \[definition:c\], $c_F=1=c$.

[*Case 2:*]{} $c\neq 1$. By (iii), $e=n-1$. Let the point $v\in{{\mathbb{R}}^n}$ be defined by $
v=(0,\ldots,0, {q}/{c}).
$ Then ${\mathrm{den}}(v) =c$. Since $p\cdot c-q\cdot d=1$, the $n$-simplex ${\mathrm{conv}}(v_0,\ldots,v_{n-1},v)$ is regular. By Lemma \[Lemma:CalculationofD\], $d_F=\gcd({\mathrm{den}}(v_0),\ldots,{\mathrm{den}}(v_{n-1}))=d$. By Definition \[definition:c\], $c_F\leq c$. There is $w\in{{\mathbb{Q}}^n}$ such that ${\mathrm{den}}(w)=c_F$ and ${\mathrm{conv}}(v_0,\ldots,v_{n-1},w)$ is a regular $n$-simplex. Since $\{\tilde{v}_1, \ldots, \tilde{v}_n,\tilde{w}\}$ is a basis of ${\ensuremath{\mathbb{Z}}}^{n+1}$, $\tilde{v}$ is a linear combination of $\{\tilde{v}_1, \ldots, \tilde{v}_n,\tilde{w}\}$ with integer coefficients. Since $p\cdot c-q\cdot d=1$, we easily see that $c=c_F+k\cdot d$ for some $k\in{\ensuremath{\mathbb{Z}}}$. Using now (i) and Lemma \[lemma:expedient\] we obtain $c_F=c$, which completes the proof.

$({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbit classification {#Section:Class}
======================================================================================================

For each $x=(x_1,\ldots,x_n)\in{{\mathbb{R}}^n}$ let $$\boxed{
F_x=\bigcap\{F\subseteq {{\mathbb{R}}^n}\mid x\in F\mbox{ and }F 
\mbox{ is a rational affine space}\}.
}$$

Also let the group $G_x$ be defined by $$\boxed{
G_x={\ensuremath{\mathbb{Z}}}+x_1{\ensuremath{\mathbb{Z}}}+\cdots+x_n{\ensuremath{\mathbb{Z}}}.
}$$

In other words, $G_x$ is the subgroup of the additive group ${\mathbb{R}}$ generated by 1 together with the coordinates of $x$.

\[Lemma:Necessary\] For each $x\in{{\mathbb{R}}^n}$ and $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$, $\gamma(F_x)=F_{\gamma(x)}$ and $ \,\,G_x=G_{\gamma(x)}.$

Let $y=\gamma(x)$. Since $\gamma$ and $\gamma^{-1}$ preserve rational affine spaces we have the inclusions $F_y\subseteq\gamma(F_x)$ and $F_x\subseteq \gamma^{-1}(F_y)$, whence $F_y\subseteq\gamma(F_x)\subseteq\gamma(\gamma^{-1}(F_y))=F_y$.

Let $x=(x_1,\ldots,x_n)$ and $y=(y_1,\ldots,y_n)$. Let $\mathcal {U}
\in {\ensuremath{\mathbb{Z}}}^{n\times n}$ and $b\in{\ensuremath{\mathbb{Z}}}^n$ be such that $\gamma(z)=\mathcal {U}
z+b$ for each $z\in {{\mathbb{R}}^n}$. Since all terms of $\mathcal {U}$ and all coordinates of $b$ are integers, then $y_i\in G_x$ for each $i\in\{1,\ldots,n\}$. Therefore, $G_y\subseteq G_x$. The converse inclusion follows replacing $\gamma$ by $\gamma^{-1}$.

\[Lemma:AffineSpaceClassFromPoint\] For each $x=(x_1,\ldots,x_n)\in{{\mathbb{R}}^n}$, ${\mathrm{rank}}(G_x)=\dim(F_x)+1$ and $ d_{F_x}=\max\{k\in{\ensuremath{\mathbb{Z}}}\mid 1/k\in G_x\}.$

Let $e=\dim(F_x)$ and $d=d_{F_x}$. We argue by cases.

[*Case 1: $e=n.$*]{} Then $F_x={{\mathbb{R}}^n}$. Suppose the integers $k_0,\ldots,k_n$ satisfy $k_0+k_1\cdot x_1+\cdots+k_n\cdot x_n=0$. Letting the vector $v\in \mathbb Z^n$ be defined by $v=(k_1,\ldots,k_n)$, we have the identity $\langle x,v\rangle=-k_0$. Since $F_x={{\mathbb{R}}^n}$ then necessarily $k_1=\dots=k_n=0$, and hence $k_0=\langle x,v\rangle=0$. We have just proved that ${\mathrm{rank}}(G_x)=n+1$, and $G_x\cap {\mathbb{Q}}={\ensuremath{\mathbb{Z}}}$. It follows that $\max\{k\in{\ensuremath{\mathbb{Z}}}\mid 1/k\in G_x\}=1$. By Definition \[Def:DF\], $d_{F_x}=1$, which settles the proof of this case.

[*Case 2: $e<n.$*]{} Then Proposition \[Prop:Alternative\] and Theorem \[Theorem:ClassAffineSpace\] jointly yield $p\in \{1,\dots,d\}$ and $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ such that $\gcd(p,d)=1$ and $$\gamma(F_x)=\{(y_1,\ldots,y_n)\in{{\mathbb{R}}^n}\mid y_i
  =\frac{p}{d}\mbox{ for each }i=e+1,\dots,n\}=F.$$ Let $\gamma(x)=y=(y_1,\ldots,y_e,\frac{p}{d},\ldots,\frac{p}{d})$. By Lemma \[Lemma:Necessary\], $G_y=G_x$ and $F_y=\gamma(F_x)=F$. Let $k_0,\ldots,k_e$ be such that $k_0 \cdot \frac{1}{d}+k_1  \cdot y_1+\cdots+k_e \cdot  y_e=0$. Then the rational point $v=(k_1,\ldots,k_e,0,\ldots,0)$ satisfies $\langle v, y\rangle\in{\mathbb{Q}}$. Since $F_y= F$, we also have $\langle v, z\rangle\in{\mathbb{Q}}$ for each $z\in F$, whence $v=0$ and $k_0 \cdot \frac{1}{d}+h_1 \cdot  y_1+\cdots+k_e  \cdot y_e=k_0 \cdot \frac{1}{d}=0$. Having thus proved that $k_i=0$ for each $i\in\{0,\ldots,e\}$, it follows that ${\mathrm{rank}}(G_x)={\mathrm{rank}}(G_y)=e+1$.

Assume the integer $k>0$ satisfies $\frac{1}{k}\in G_x=G_y$. Then there exist integers $k_0,\ldots,k_e$ satisfying $\frac{1}{k}=k_0 \cdot \frac{1}{d}+k_1  \cdot y_1+\cdots+k_e \cdot y_e$. It follows that $1=k  \cdot k_0 \cdot  \frac{1}{d}+k   \cdot k_1 \cdot y_1+\cdots+k \cdot
 k_e \cdot y_e$. From ${\mathrm{rank}}(G_y)=e+1$ it follows that $k \cdot k_0=d$. Thus $k\leq d$, and $d=\max\{k\in{\ensuremath{\mathbb{Z}}}\mid \frac{1}{k}\in G_x\}$. This settles Case 2 and completes the proof.

We are now ready to prove the main result of this paper and its corollaries, thus providing a complete classification of $({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbits.

\[theorem:classification\] For all $x,y\in{{\mathbb{R}}^n}$ the following conditions are equivalent:

-   there exists $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ such that $\gamma(x)=y$;

-   $(G_x,c_{F_x})=(G_y,c_{F_y})$.

(i)$\Rightarrow$(ii) follows directly from Theorem \[Theorem:ClassAffineSpace\] and Lemma \[Lemma:Necessary\]. (ii)$\Rightarrow$(i) We argue by cases:

[*Case 1: ${\mathrm{rank}}(G_x)=n+1$.*]{} By Lemma \[Lemma:AffineSpaceClassFromPoint\], $\dim(F_x)={\mathrm{rank}}(G_x)-1={\mathrm{rank}}(G_y)-1=\dim(F_y)=n$. Since $G_x=G_y$, there are $(n+1)\times (n+1)$ integer matrices $\mathcal M$ and $\mathcal N$ such that $\mathcal M(x_1,\ldots,x_n,1)=(y_1,\ldots,y_n,1)$ and $\mathcal N(y_1,\ldots,y_n,1)=(x_1,\ldots,x_n,1)$. Thus $\mathcal M$ and $\mathcal N$ have the form $$\mathcal{M}=\left(\begin{tabular}{c|c} $\mathcal U$ & $b$ \\ \hline $0,\ldots,0 $ &
$1$ \end{tabular}\right) \quad \mathcal{N}=\left(\begin{tabular}{c|c} $\mathcal V$ & $c$ \\ \hline $0,\ldots,0 $ &
$1$ \end{tabular}\right)$$ and $\mathcal N\mathcal M(x_1,\ldots,x_n,1)=(x_1,\ldots,x_n,1)$. Since ${\mathrm{rank}}(G_x)=
n+1$, $\mathcal N\mathcal M$ is the identity $(n+1)\times (n+1)$-matrix and $\mathcal N=\mathcal M^{-1}$. Thus the affine map $\gamma\colon {{\mathbb{R}}^n}\to {{\mathbb{R}}^n}$ defined by $\gamma(z)=\mathcal Uz+b$ belongs to ${\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ and $\gamma(x)=y$.

[*Case 2: $1 \leq  {\mathrm{rank}}(G_x)  \leq n$.*]{} By Lemma \[Lemma:AffineSpaceClassFromPoint\], $\dim(F_x)={\mathrm{rank}}(G_x)-1={\mathrm{rank}}(G_y)-1=\dim(F_y)$, and $
d_{F_x}=\max\{k \in{\ensuremath{\mathbb{Z}}}\mid 1/k \in G_x\}=
\max\{k \in{\ensuremath{\mathbb{Z}}}\mid 1/ k\in G_y\}=d_{F_y}.
$ Let us use the abbreviations $$e=\dim(F_x)=\dim(F_y),\,\,\,
d=d_{F_x}=d_{F_y}, 
\,\, c=c_{F_x}=c_{F_y}.$$

Proposition \[Prop:Alternative\] yields an integer $p$ with $1\leq p\leq d$ such that the affine space $$\textstyle 
F=\{(y_1,\ldots,y_n)\in{{\mathbb{R}}^n}\mid y_i=\frac{p}{d}\mbox{ for each }
i\in \{e+1,\dots, n\}\}$$ satisfies $(\dim(F),d_F,c_F)=(e,d,c)$. By Theorem \[Theorem:ClassAffineSpace\] there are $\gamma_1,\gamma_2\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ such that $\gamma_1(F_x)=\gamma_2(F_y)=F$.

Writing for short $x'=\gamma_1(x),\,\,y'=\gamma_2(y),$ the proof of (i) amounts to showing $$\label{equation:tobeproved}
y'\in \operatorname{\rm orb}(x').$$

To this purpose, we define the rational points $v_0,\dots,v_e\in F$ by stipulating that for all $i\in\{0,\dots,e\}$ and $j\in\{1,\dots, n\}$: $$(v_i)_j=j\mbox{th coordinate of $v_i$}=\begin{cases}
\frac{p}{d}&\mbox{if } j\in\{e+1,\dots,n\};\\
0&\mbox{if }j  \in\{1,\dots,e\}\setminus\{i\};\\
\frac{1}{d}&\mbox{if } j = i.\
\end{cases}$$

Then $F$ coincides with ${\mathrm{aff}}(v_0,\ldots,v_e)$, and ${\mathrm{conv}}(v_0,\ldots,v_e)$ is a regular $e$-simplex. Next let us define the map $\eta\colon F\to {\mathbb{R}}^{e}$ by $$\eta(z_1,\ldots,z_n)=(d\cdot z_1,\ldots,d\cdot z_e)\mbox{ for all } z=(z_1,\ldots,z_n)\in F.$$ Equivalently, letting $\xi_1,\ldots,\xi_e\in{\mathbb{R}}^{e}$ denote the vectors of the canonical base of ${\mathbb{R}}^e$, $\eta$ is the unique affine transformation such that $\eta(v_0)=\boldsymbol{0}=$ the origin of $ {\mathbb{R}}^{e}$, and $\eta(v_i)=\xi_i$ for each $i\in\{1,\ldots, e\}$. For any integer $m$ and subgroup $G$ of the additive group $\mathbb R$, let us use the self-explanatory notation $
m\cdot G=\{m\cdot g\mid g\in G\}.
$ Then for every $z=(z_1,\ldots,z_n)\in F$ we can write $$\label{Eq:FlatGroup}
\textstyle
G_{\eta(z)}=d\cdot  z_1{\ensuremath{\mathbb{Z}}}+\cdots +d\cdot  z_e{\ensuremath{\mathbb{Z}}}+{\ensuremath{\mathbb{Z}}}=d\cdot (z_1{\ensuremath{\mathbb{Z}}}+\cdots +z_e{\ensuremath{\mathbb{Z}}}+\frac{1}{d}{\ensuremath{\mathbb{Z}}})=d\cdot G_{z}.$$ In particular, $
G_{\eta(x')}=d\cdot G_{x'}=d\cdot G_x=d\cdot G_y=d\cdot G_{y'}= G_{\eta(y')}.
$ Since ${\mathrm{rank}}(G_{\eta(x')})=e+1={\mathrm{rank}}(G_{\eta(y')})$, from Lemma \[Lemma:AffineSpaceClassFromPoint\] we obtain $\dim(F_{\eta(x')})=e$. The proof of Case 1 above (with $e$ in place of $n$) yields $\gamma_3\in{\mathsf{GL}(e,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^e}$ such that $$\label{Eq:Gamma1}
\gamma_3(\eta(x'))=\eta(y').$$ Since $\eta$ is one-to-one onto ${\mathbb{R}}^e$, there exist uniquely determined rational points $w_0,\ldots,w_e\in F$ such that $$\label{Eq:Ws}
\eta(w_0)=\gamma_3(\boldsymbol{0})\mbox{ and
} \eta(w_i)=\gamma_3(\xi_i)\mbox{ for each }i\in\{1,\ldots,e\}.$$ By , $$\label{Eq:DenWs}
 {\mathrm{den}}(w_i)=d  \cdot{\mathrm{den}}(\gamma_3(\xi_i))=d,
 \mbox{  for each $i\in\{1,\ldots,e\}$.}$$

[*Claim*]{}: The $e$-simplex ${\mathrm{conv}}(w_0,\ldots,w_e)\subseteq F$ is regular.

Indeed, for each $i\in \{1,\dots,e\}$ we have $\widetilde{\eta(w}_i)=
\widetilde{\gamma_3(\xi}_i)=(\gamma_3(\xi_i),1)=(\eta(w_i),1)$. Thus $$\label{Eq:BasisZe}
\{\widetilde{\eta(w}_0),\ldots,\widetilde{\eta(w}_{e})\}
 =\{(\eta(w_0),1),\ldots,(\eta(w_{e}),1)\}
 \mbox{ is a base of ${\ensuremath{\mathbb{Z}}}^{e}$.}$$

In case $c=1$, the proof of Proposition \[Prop:Alternative\] shows that $p=1$, whence $$\label{EqWfromEtaW}
\tilde{w}_i=d\cdot (w_i,1)=(d\cdot w_i, d)
=(\eta(w_i),1,\ldots,1,d),
\mbox{ for each $i\in\{1,\ldots,e\}$.}$$ Let $\mu_1,\ldots,\mu_{n+1}$ denote the canonical base of the free abelian group ${\ensuremath{\mathbb{Z}}}^{n+1}$. From - it follows that $\{\tilde{w}_0,\ldots,\tilde{w}_e,\mu_{e+2},\ldots,\mu_{n+1}\}$ is a base of ${\ensuremath{\mathbb{Z}}}^{n+1}$. Thus the $e$-simplex ${\mathrm{conv}}(w_0,\ldots,w_e)$ is regular.

In case $c\neq 1$, by Lemma \[lemma:expedient\], $e=n-1$. Further, $\tilde{w}_i=d\cdot (w_i,1)=(d\cdot w_i, d)=(\eta(w_i),p,d)$ for each $i\in\{0,\ldots,e\}$. The proof of Proposition \[Prop:Alternative\] provides an integer $q\geq 1$ such that $p\cdot c-q\cdot d=1.$ Upon defining $v=(0,\ldots,0,
\frac{q}{c})$, from it follows that the set of integer vectors $
\{(\eta(w_0),p,d), \,\ldots, (\eta(w_e),p,d),\,\,(0,\ldots,0,q,c)\}
=\{\tilde{w}_0,\ldots,\tilde{w}_e,\tilde{v}\}
$ is a base of ${\ensuremath{\mathbb{Z}}}^{n+1}$. Thus, ${\mathrm{conv}}(w_0,\ldots,w_e)$ is regular.

Our claim is settled.

As an immediate consequence of the regularity of the $e$-simplex ${\mathrm{conv}}(w_0,\ldots,w_e)$, also the $n$-simplex ${\mathrm{conv}}(w_0,\ldots,w_e,v_{e+1},\ldots,v_n)$ is regular. By , ${\mathrm{den}}(w_i)={\mathrm{den}}(v_i)=d$ for each $i\in\{0,\dots,e\}$. Lemma \[Lemma:GammaFromSimplex\] yields $\gamma_{4}\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$ such that $\gamma_4(v_i)=w_i$ for $i\in\{0,\dots,e\}$, and $\gamma_4(v_i)=v_i$ for $i\in\{e+1,\dots,n\}$. It follows that $\gamma_4(F)=F$.

Further, $$\label{Eq:CommutingGammasEta}
\eta(\gamma_4(z))=\gamma_3(\eta(z))
\mbox{ for each $z\in F$}.$$ As a matter of fact, by we can write $\eta(\gamma_4(v_0))=\eta(w_0)=\gamma_3(\boldsymbol{0})=\gamma_3(\eta(v_0))$ and $\eta(\gamma_4(v_i))=\eta(w_i)=\gamma_3(\xi_i)
=\gamma_3(\eta(v_i))$ for each $i=1,\dots,n$. Then follows, because $\eta$, $\gamma_3$ and $\gamma_4$ are affine transformations and $F={\mathrm{aff}}(v_0,\ldots,v_e)$.

Since $\gamma_4(x')\in F$, from and we can write $\eta(\gamma_4(x'))=\gamma_3(\eta(x'))=\eta(y').$ Since the map $\eta\colon F\to {\mathbb{R}}^e$ is one-to-one, we finally obtain $\gamma_4(x')=y',$ which proves and completes the proof of the theorem.

Using Lemmas \[lemma:expedient\] and \[Lemma:AffineSpaceClassFromPoint\] we obtain the following special cases of Theorem \[theorem:classification\]:

\[corollary:semifinal\] For all $x,y\in{{\mathbb{R}}^n}$, if ${\mathrm{rank}}(G_x)\neq n$, the following conditions are equivalent:

-   There exists $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$, such that $\gamma(x)=y$;

-   $G_x=G_y$.

\[corollary:final\] For all $x,y\in{{\mathbb{R}}^n}$, if $\max\{k\in{\ensuremath{\mathbb{Z}}}\mid 1/k\in G_x\}\in\{1,2,3,4,6\}$, the following conditions are equivalent:

-   There exists $\gamma\in{\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n}$, such that $\gamma(x)=y$;

-   $G_x=G_y$.

In conclusion, from Lemmas \[lemma:expedient\] and \[Lemma:AffineSpaceClassFromPoint\], Proposition \[Prop:Alternative\] and Theorem \[theorem:classification\] we obtain:

\[corollary:post-final\] The map $ \operatorname{\rm orb}(x)\mapsto (G_x,c_{F_x})$ is a one-one correspondence between $({\mathsf{GL}(n,{\ensuremath{\mathbb{Z}}})\ltimes {\ensuremath{\mathbb{Z}}}^n})$-orbits and pairs $(G,c)$, where $G$ is an arbitrary subgroup of the additive group $\mathbb R$ having rank $\leq n+1$ and containing $1$ among its elements, and $c$ is an integer satisfying the following conditions: if ${\mathrm{rank}}(G)\not=n$ then $c=1;$ if ${\mathrm{rank}}(G)=n$, letting $1/d$ be the smallest positive rational in $G$, then $1\leq c\leq \max(1,d/2)$ and $\gcd(c,d)=1.$ There are precisely $\max(1,{\phi(d)}/{2})$ possible values for $c$.

[99]{}

J.S. Dani, Density properties of orbits under discrete groups, [*J. Indian Math. Soc.*]{} 39 (1975) 189–218.

A. Guilloux, A brief remark on orbits of SL(2, $\mathbb Z$) in the Euclidean plane, [*Ergodic Theory Dynam. Systems*]{} 30 (2010) 1101–1109.

G. Ewald, [*Combinatorial convexity and algebraic geometry*]{}, Grad. Texts in Math., Vol. 168, Springer-Verlag, New York, 1996.

M. Laurent, A. Nogueira, Approximation to points in the plane by SL(2, $\mathbb Z$)-orbits, [*J. London Math. Soc.*]{} (2) 85 (2012) 409–429.

D. Mundici, The Haar theorem for lattice-ordered abelian groups with order-unit, [*Discrete Contin. Dyn. Syst.*]{} 21 (2008) 537-549.

D. Mundici, Invariant measure under the affine group over $\mathbb Z,$ [*Combin. Probab. Comput.*]{} 23 (2014) 248–268.

D. Mundici, Classifying $(\mathsf{GL}(2,{\ensuremath{\mathbb{Z}}})\ltimes{\ensuremath{\mathbb{Z}}}^2)$-orbits by subgroups of ${\mathbb{R}}$, (preprint available at arXiv:1401.3708)

A. Nogueira, Orbit distribution on ${\mathbb{R}}^2$ under the natural action of ${\rm SL}(2,\mathbb Z)$, [*Indag. Math.*]{} (N.S.), 13 (2002) 103–124.

A. Nogueira, Lattice orbit distribution on $\mathbb R^2$, [*Ergodic Theory Dynam. Systems*]{} 30 (2010) 1201–1214. Erratum, ibid., p. 1215.

E. Witten, SL(2, $\mathbb Z$) action on three-dimensional conformal field theories with abelian symmetry, In: [*From Fields to Strings: Circumnavigating Theoretical Physics*]{}, Ian Kogan Memorial Collection (in 3 volumes), M.  Shifman et al., Eds., World Scientific, Singapore, (2005), pp. 1173–1200.

[^1]: 2000 [*Mathematics Subject Classification.*]{} Primary: 37C85. Secondary: 11B57, 22F05, 37A45, 06F20, 46L80.