\documentclass[finalversion]{FPSAC2021}
\articlenumber{86}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{example}[theorem]{Example}

%\usepackage{lipsum}
\usepackage{tikz}
\usetikzlibrary{cd}
\usepackage{enumitem}

%\setlength{\marginparwidth}{2cm}

\usepackage{enotez}
\let\footnote=\endnote

 \newcommand\mandy[1]{{\color{magenta} \sf $\nabla$ Mandy: [#1]}}
  \newcommand\elizabeth[1]{{\color{blue} \sf $\Delta$ Elizabeth: [#1]}}
  \newcommand\gregg[1]{{\color{green} \sf $\square$ Gregg: [#1]}}

%% define your title in the usual way
\title{Cluster scattering diagrams and theta basis for reciprocal generalized cluster algebras}

%% define your authors in the usual way
%% use \addressmark{1}, \addressmark{2} etc for the institutions, and use \thanks{} for contact details
\author{Man-Wai Cheung\addressmark{1}, Elizabeth Kelley\addressmark{2}, \and Gregg Musiker\addressmark{2}}
%\author[Optional shorter names]{Longer names me\thanks{\href{mailto:hello@world.c}{hello@world.c}. Longer names me was partially supported by Grant 2017.11.14.$\partial$\;supp.}\addressmark{1}, \and you\addressmark{2}}

%% then use \addressmark to match authors to institutions here
\address{\addressmark{1}Department of Mathematics, Harvard University, Cambridge, MA 02138 \\ \addressmark{2}Department of Mathematics, University of Minnesota, Minneapolis, MN 55455}

%% put the date of submission here
\received{\today}

%% leave this blank until submitting a revised version
%\revised{}

%% put your English abstract here, or comment this out if you don't have one yet
%% please don't use custom commands in your abstract / resume, as these will be displayed online
%% likewise for citations -- please don't use \cite, and instead write out your citation as something like (author year)
\abstract{We give a construction of generalized cluster scattering diagrams, generalized cluster varieties, and theta bases for reciprocal generalized cluster algebras, the latter of which were defined  by  Chekhov  and  Shapiro.   These constructions are analogous to the structures given for ordinary cluster algebras in the work of Gross, Hacking, Keel, and Kontsevich.}

%% put your French abstract here, or comment this out if you don't have one
%\resume{\lipsum[2]}

%% put your keywords here, or comment this out if you don't have them yet
\keywords{cluster algebra, generalized cluster algebra, scattering diagram, theta function}

%% you can include your bibliography however you want, but using an external .bib file is STRONGLY RECOMMENDED and will make the editor's life much easier
%% regardless of how you do it, please use numerical citations, ie. [xx, yy] in the text

%% this sample uses biblatex, which (among other things) takes care of URLs in a more flexible way than bibtex
%% but you can use bibtex if you want
\usepackage[backend=bibtex]{biblatex}
\addbibresource{86Cheung.bib}
%% note the \printbibliography command at the end of the file which goes with these biblatex commands

\begin{document}

\maketitle
%% note that you DO NOT have to put your abstract here -- it is generated by \maketitle and the \abstract and \resume commands above

\section{Introduction}


This work concerns constructing analogues of scattering diagrams, cluster varieties, and theta bases beyond the ordinary cluster algebra setting. Cluster algebras were originally introduced by Fomin and Zelevinsky as a tool for studying total positivity \cite{FZ-I}. 
%Cluster algebra structures appear in a diverse array of mathematical settings, including: Poisson geometry \cite{poissonGeometry_book}, higher Teichm\"{u}ller theory \cite{Le, Wienhard}, category theory \cite{Keller-derived, Reiten}, discrete dynamical systems \cite{Kedem, NAK}, Donaldson--Thomas theory \cite{Kontsevich-Soibelman, Nagao}, representation theory of quivers and finite-dimensional algebras \cite{Keller}, enumerative properties of associahedra \cite{chapoton-associahedra,chapoton-fomin-zelevinsky}, and various areas of mathematical physics. 
Two particularly celebrated structural features of cluster algebras are the \emph{Laurent phenomenon} and \emph{positivity}. Although the Laurent phenomenon was proved in the original work of Fomin and Zelevinsky, a proof of positivity for arbitrary cluster algebras did not appear until the work of Gross, Hacking, Keel, and Kontsevich \cite{GHKK}.
%After Fomin and Zelevinsky posed positivity as a conjecture, many mathematicians were able to verify positivity for particular subclasses of cluster algebras, including: skew-symmetric cluster algebras \cite{Lee-Schiffler}, cluster algebras of surface type \cite{schiffler-thomas, Schiffler-unpunctured, MSW}, acyclic (quantum) cluster algebras \cite{Efimov, Caldero-Reineke, Qin, Kimura-Qin}, and bipartite cluster algebras \cite{Nakajima}. A general proof didn't appear until the work of Gross, Hacking, Keel, and Kontsevich, more than a decade later \cite{GHKK}.

From a geometric perspective, one can study cluster algebras by studying \emph{cluster varieties}, which are studied in \cite{FG} as \emph{cluster ensembles} $(\mathcal{A}, \mathcal{X})$. The $\mathcal{A}$-variety encodes information about the cluster variables and the $\mathcal{X}$-variety encodes information about the coefficients in the sense of \cite{Fomin-Zelevinsky-IV}.
For the special case of cluster algebras with principal coefficients, one can talk about the \emph{$\mathcal{A}$ cluster variety with principal coefficients}, $\mathcal{A}_\textrm{prin}$; the $\mathcal{A}$ and $\mathcal{X}$ varieties appear, respectively, as a fiber and quotient of $\mathcal{A}_{\textrm{prin}}$. 
%In \cite{GHKK}, Gross, Hacking, Keel, and Kontsevich demonstrate how cluster varieties can be built from cluster scattering diagrams.

An important structural question in the study of cluster algebras concerns the existence of bases. Because the original definition of cluster algebras arose from a desire to understand dual canonical bases, it is natural to wonder if "desirable" bases for cluster algebras exist. 
%One property we might find ``desirable" in this context is that each basis element have positive coefficients when written as a linear combination of the other basis elements, mirroring the positivity property. 
Many subclasses of cluster algebras have known bases, including: the cluster monomial basis for finite type, the generic basis for affine type \cite{caldero-keller}, the generic basis for acyclic type \cite{GLS2, GLS1}, and the bangle and band bases for cluster algebras of surface type \cite{MSW-2}. Gross, Hacking, Keel, and Kontsevich proved the existence of the \emph{theta basis} for arbitrary cluster algebras \cite{GHKK}.

Their proofs of positivity and the existence of the theta basis used \emph{scattering diagrams}, a tool from algebraic geometry. Scattering diagrams were first introduced in two dimensions by Kontsevich and Soibelman in \cite{KS-chapter} and then in arbitrary dimension by Gross and Siebert in \cite{GS} as a tool for constructing mirror spaces in mirror symmetry.
%varieties with trivial canonical bundle. 
Gross, Hacking, Keel, and Kontsevich constructed cluster scattering diagrams and then defined the theta basis \cite{GHKK} for cluster algebras. 
%Using the notion of \emph{broken lines} on scattering diagrams, Gross, Hacking, Keel, and Kontsevich defined the \emph{theta basis} for arbitrary cluster algebras \cite{GHKK}.

We parallel the work of Gross, Hacking, Keel, and Kontsevich in the context of reciprocal generalized cluster algebras. In particular, we construct generalized cluster varieties whose rings of regular functions are generalized cluster algebras.
%In particular, we construct generalized cluster varieties such that their rings of regular functions are generalized cluster algebras. 
Simultaneously, we develop scattering diagrams which lie in the tropicalization of the Fock--Goncharov dual of said varieties.  This allows us to establish theta bases for such algebras. 

We remark that in his recent Ph.D. thesis, Lang Mou  outlines a related approach for constructing cluster scattering diagrams for reciprocal generalized cluster algebras \cite{Mou}.  His work utilizes a different lattice structure and does not provide theta functions.  Our work occurred contemporaneously and independently. 

Section~\ref{sec:background} contains necessary background information for generalized cluster algebras. Our construction is then given in Section \ref{sec:genScatDiag}. In Section \ref{sec:thetaBasis}, we define \emph{theta functions} in terms of \emph{broken lines} and state our main result, Theorem \ref{theorem:thetaBasis}, that given generalized fixed data $\Gamma$ and any choice of seed $\mathbf{s}$ and corresponding cluster scattering diagram $\mathfrak{D}_{\mathbf{s}}$, a particular collection $\Theta$ of theta functions defined on $\mathfrak{D}_{\mathbf{s}}$ forms a basis for the associated generalized cluster algebra (see Theorem~\ref{theorem:thetaBasis} for the precise statement).


\section{Generalized Cluster Algebras}
\label{sec:background}

One natural generalization of a cluster algebra, introduced by \cite{CS}, is to allow the characteristic binomial exchange relations to instead contain arbitrarily many terms. 
%The resulting algebras, referred to as \emph{generalized cluster algebras}, have already been the object of significant study. \elizabeth{There should be some citations here and probably several more sentences about major work on generalized cluster algebras. It's not here right now because I wanted to get all the definitions set up first.} Here, we review some of the basic definitions and properties of generalized cluster algebras, largely following the structure of definitions from \cite{Nakanishi}.
Let $(\mathbb{P}, \oplus)$ be a semifield and $\mathcal{F}$ be isomorphic to the field of rational functions in $n$ independent variables with coefficients in $\mathbb{P}$.

\begin{definition}
\label{def:genCA}
A \emph{labeled generalized cluster seed} is a quintuple ${\Sigma = (\mathbf{x},
\mathbf{y},B,R,\mathbf{a})}$ such that $\mathbf{x} = (x_1,\dots,x_n)$ is a free generating set for $\mathcal{F}$, $\mathbf{y}$ is an $n$-tuple with elements in $\mathbb{P}$, ${B = [b_{ij}]}$ is an $n \times n$ skew-symmetrizable matrix with entries in $\mathbb{Z}$, $R$ is an $n \times n$ diagonal matrix with positive integer entries whose $i$-th diagonal entry is denoted by $r_i$, and $\mathbf{a} = (a_{i,s})_{i \in [n], s \in [r_i-1]}$ is a collection of elements in $\mathbb{P}$. We refer to $\mathbf{x} = (x_1, \dots, x_n)$ as the \emph{cluster} of $\Sigma$, $\mathbf{y} = (y_1, \dots, y_n)$ as the \emph{coefficient tuple}, $B$ as the \emph{generalized exchange matrix}, $R$ as the exchange degree matrix, and $\mathbf{a}$ as the exchange coefficient collection. The elements $x_1, \dots, x_n$ are the \emph{cluster variables} of $\Sigma$ and $y_1, \dots, y_n$ are its \emph{coefficient variables}.
\end{definition}

Together, 
the data of 
the exchange degree matrix $R$ and the exchange coefficient collection $\mathbf{a}$ determine a set of \emph{exchange polynomials} $\rho_1, \dots, \rho_n$, 
where 
for each $i$, we have 
$\rho_i(u) = 1 + a_{i,1}u + \cdots + a_{i,r_i-1}u^{r_i-1} + u^{r_i} \in \mathbb{ZP}[u]$. 
The structure of the exchange relations for mutation in direction $k$ are determined by the $k$-th exchange polynomial. We  work in the specialized setting of \cite{Nakanishi} and impose the additional requirement that ${a_{i,s} = a_{i,r_i - s}}$ - i.e., that all exchange polynomials are \emph{reciprocal polynomials}.

\begin{definition}
\label{def:genMutation}
For a generalized cluster seed $\Sigma = (\mathbf{x},\mathbf{y},B,R,\mathbf{a})$, generalized mutation in direction $k$, $\mu_k^{(r)}$, is defined by the following exchange relations:
\begin{align*}
    b_{ij}' &= \begin{cases}
                    -b_{ij} & i = k \textrm{ or } j = k \\
                    b_{ij} + r_k\left( [-b_{ik}]_+b_{kj} + b_{ik}[b_{kj}]_+ \right) & i,j \neq k
                \end{cases} \\
    y_i' &= \begin{cases}
                y_k^{-1} & i = k \\
                y_i \left( y_k^{[ b_{ki}]_+} \right)^{r_k}\left( \bigoplus_{s=0}^{r_k} a_{k,s}y_k^{ s} \right)^{-b_{ki}} & i \neq k
            \end{cases} \\
    x_i' &= \begin{cases}
                x_k^{-1}\left(\prod_{j=1}^n x_j^{[- b_{jk}]_+} \right)^{r_k} \frac{ \sum_{s=0}^{r_k} a_{k,s} \widehat{y}_k^{ s}}{\oplus_{s=0}^{r_k} a_{k,s}y_k^{ s}} & i = k \\
                x_i & i \neq k
            \end{cases} \\
    a_{k,s} &= a_{k,r_k - s}
\end{align*}
where $[\cdot]_+ = \textrm{max}(\cdot,0)$ and $\widehat{y}_i := y_i \prod_{j=1}^n x_j^{b_{ji}}$.
\end{definition}

\begin{remark}
The mutation relation for $b_{ij}'$ given in Definition~\ref{def:genMutation} is for the generalized exchange matrix, $B$. This is equivalent to writing that the matrix $BR$ mutates according to the relation
\[ (br)_{ij}' = (br)_{ij} + ([-(br)_{ik}]_+(br)_{kj} + (br)_{ik}[(br)_{kj}]_+). \]
This reflects the fact that $\mu_k(BR) = \mu^{(r)}_k(B)R$, where $\mu_k$ denotes ordinary matrix mutation.
%On the matrix level, this reflects the fact that mutation commutes with right multiplication by $R$: that is, $\mu_k(BR) = \mu^{(r)}_k(B)R$, where $\mu_k$ denotes ordinary matrix mutation.
%and $\mu_k^{(r)}$ denotes the generalized matrix mutation given in Definition~\ref{def:genMutation}.
\end{remark}

%\begin{remark}
%Chekhov and Shapiro use matrices $B$ and $\beta$ in their exchange relations \cite{CS}. Their $B$ matrix is our $BR$ matrix and their $\beta$ matrix is our $B$ matrix.
%\end{remark}

\noindent A generalized cluster algebra is then defined as:

\begin{definition}
The \emph{generalized cluster algebra} $\mathcal{A} = \mathcal{A}(\mathbf{x},\mathbf{y},B,R,\mathbf{a})$ associated to a generalized seed $\Sigma$ is the $\mathbb{ZP}$-subalgebra of $\mathcal{F}$ generated by the cluster variables $\mathbf{x} = \{ x_i \}_{i \in [n]}$ of $\Sigma$ via the exchange relations given in Definition \ref{def:genMutation}.
\end{definition}

Chekhov and Shapiro proved that generalized cluster algebras exhibit the Laurent phenomenon \cite{CS}. They further proved that positivity holds for the subclass of generalized cluster algebras from orbifolds and conjectured that it holds in all cases.
%They conjectured that positivity holds for all generalized cluster algebras and offered a proof for the subclass of generalized cluster algebras arising from orbifolds.

%\begin{theorem}[Theorem 2.5 of \cite{CS}]
%Let $\mathcal{A} = \mathcal{A}(\mathbf{x},\mathbf{y},B,R,\mathbf{a})$ be an arbitrary generalized cluster algebra. Its cluster variables can be expressed in terms of any cluster of $\mathcal{A}$ as Laurent polynomials with coefficients in $\mathbb{ZP}.$
%\end{theorem}

\section{Generalized cluster scattering diagrams}
\label{sec:genScatDiag}

We begin by establishing the notions of \emph{generalized fixed data} and \emph{generalized torus seed data} and defining an associated map.

%In order to define a cluster scattering diagram, we first need to establish the notions of \emph{generalized fixed data}, denoted by $\Sigma$, and \emph{generalized torus seeds}, denoted by $\mathbf{s}$.

\begin{definition}
\label{def:fixedData}
    The following data is referred to as \emph{generalized fixed data}, denoted by  $\Gamma$:
    \begin{itemize}[noitemsep]
        \item A lattice $N$ called the \emph{co-character lattice} with skew-symmetric bilinear form \[\{ \cdot, \cdot \}: N \times N \rightarrow \mathbb{Q}.\]
        \item A saturated sublattice $N_{\textrm{uf}} \subseteq N$ called the \emph{unfrozen sublattice}.
        \item An index set $I$ with $| I | = \textrm{rank}(N)$ and subset $I_{\textrm{uf}} \subseteq I$ such that ${| I_{\textrm{unf}}| = \textrm{rank}(N_{\textrm{uf}})}$
        \item A set of positive integers $\{ d_i \}_{i \in I}$ such that $\textrm{gcd}(d_i) = 1$.
        \item A sublattice $N^{\circ} \subseteq N$ of finite index such that ${\{ N_{\textrm{uf}}, N^{\circ} \} \subseteq \mathbb{Z}}$ and ${\{ N, N_{\textrm{uf}} \cap N^{\circ} \} \subseteq \mathbb{Z}}$.
        \item A lattice $M = \textrm{Hom}(N,\mathbb{Z})$ called the \emph{character lattice} and sublattice ${M^{\circ} = \textrm{Hom}(N^{\circ},\mathbb{Z})}$.
        \item A set of positive integers $\{r_i \}_{i \in I}$.
    \end{itemize}
The adjective `fixed' refers to the fact that this data is fixed under mutation.
\end{definition}

%\begin{definition}
%    The bilinear form $\{\cdot, \cdot \}: N \times N \rightarrow \mathbb{Q}$ defines the maps ${p_1^*: N_{\textrm{uf}} \rightarrow M^{\circ}}$ and ${p_2^*: N \rightarrow M^{\circ} \backslash N_{\textrm{uf}}^{\perp}}$ as
%    \begin{align*}
%        p_1^*\left(n \in N_{\textrm{uf}}\right) &= \left(n' \in N^{\circ} \mapsto \{n,n' \} \right) \\
%        p_2^*\left(n \in N \right) &= \left( n' \in N_{\textrm{uf}} \cap N^{\circ} \mapsto \{n,n' \} \right)
%    \end{align*}
%\end{definition}

%\noindent We then choose a map $p^*: N \rightarrow M^{\circ}$ such that $\left.p^*\right|_{N_{\textrm{uf}}} = p_1^*$ and composing $p^*$ with the quotient map $M^{\circ} \rightarrow M^{\circ} \backslash N_{\textrm{uf}}^{\perp}$ agrees with $p_2^*$. Note that the choice of $p^*$ is not unique.

To construct cluster scattering diagrams, we must assume that the map ${p_1^*: N_{\textrm{uf}} \rightarrow M^{\circ}}$ given by $n \mapsto \{ n,\cdot \}$ is injective. This is not true for all choices of fixed data, but is true in the principal coefficient case. Because arbitrary generalized cluster algebras can be obtained as specializations of the principal coefficient case, this is sufficient.
%This is sufficient, as our results for arbitrary reciprocal generalized cluster algebras are proved via the principal case.
%Because our results for arbitrary reciprocal generalized cluster algebras and varieties are proved via the principal coefficient case, it suffices for the injectivity assumption to hold in that case.
%We must also define the notion of a \emph{generalized torus seed}.

\begin{definition}
Given a set of generalized fixed data, we can define  \emph{generalized torus seed data} $\mathbf{s} = \left\{ (e_i,\mathbf{a}_i) \right\}_{i \in I}$ such that $\{ e_i\}_{i \in I}$ is a basis for $N$,  $\{ e_i\}_{i \in I_{\textrm{uf}}}$ is a basis for $N_{\textrm{uf}}$, $\{d_ie_i \}_{i \in I}$ is a basis for $N^{\circ}$, and each $\mathbf{a}_i = (a_{i,s})$ is a tuple of scalars of length $r_i$ with $a_{i,1} = a_{i,r_i} = 1$. The torus seed data defines a new bilinear form $[\cdot,\cdot]_{\mathbf{s}}: N \times N \rightarrow \mathbb{Q}$ given by $[e_i,e_j]_{\mathbf{s}} = \epsilon_{ij} = \{e_i,e_j \}d_j$. This bilinear form is essentially the exchange matrix of \cite{FZ-I} and is skew-symmetrizable. 
\end{definition}

A choice of a generalized torus seed $\mathbf{s} = \{(e_i,\mathbf{a}_i) \}_{i \in I}$ defines a dual basis $\{e_i^* \}_{i \in I}$ for $M$ and a basis $\{f_i = d_i^{-1}e_i^* \}_{i \in I}$ for $M^{\circ}$.  A generalized torus seed $\mathbf{s}$ is called \emph{reciprocal} if its scalar tuples $\mathbf{a}_i = (a_{i,s})$ satisfy the reciprocity condition $a_{i,s} = a_{i,r_i-s}$. We refer to the associated algebra as a \emph{reciprocal} generalized cluster algebra. Here, we confine our attention to this subclass of generalized cluster algebras.

\begin{example}
\label{ex:genCAdata}
Consider the generalized cluster algebra
\[
\mathcal{A}\left(\mathbf{x},\mathbf{y},\begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix},\begin{bmatrix} 3 & 0 \\ 0 & 1 \end{bmatrix}, ((1,a,a,1),(1,1)) \right).\]
In the language of Definition~\ref{def:fixedData}, this corresponds to the generalized fixed data $\Gamma$ with $d=(1,1)$, $r=(3,1)$, ${I = I_{\textrm{uf}} = \{ 1, 2 \}}$, ${N = N^{\circ} = \langle (1,0),(0,1) \rangle}$, ${M = M^{\circ} = \langle (1,0), (0,1) \rangle}$, and skew-symmetric bilinear form specified by the exchange matrix. The generalized torus seed data is $\mathbf{s} = \{ ((1,0),(1,a,a,1)),((0,1),(1,1)) \}$.
\end{example}

Just as in Section \ref{sec:background}, we can define generalized mutation in direction $k$.
%for a given generalized torus seed $\mathbf{s}$.


\begin{definition}
\label{def:basisMutGen}
    Given generalized torus seed data $\mathbf{s}$ and some $k \in I_{\textrm{uf}}$, a \emph{mutation in direction $k$} of the generalized torus seed data is defined by the following transformations of basis vectors and exchange polynomial coefficients:
    \begin{align*}
        e_i' &:= \begin{cases}
                    e_i + r_k[\epsilon_{ik}]_+e_k & i \neq k \\
                    -e_k & i = k
                \end{cases} \\
        f_i' &:= \begin{cases}
                    -f_k + r_k\sum_{j \in I_{\textrm{uf}}} [-\epsilon_{kj}]_{+}f_j & i = k \\
                    f_i & i \neq k
                \end{cases} \\
        a_{k,s}' &:= a_{k,r_k-s}
    \end{align*}
    The basis mutation induces the following mutation of the matrix $[\epsilon_{ij}]$:
    \begin{align*}
        \epsilon_{ij}' &:= \{e_i',e_j' \}d_j
                        = \begin{cases}
                            -\epsilon_{ij} & k = i \textrm{ or } k = j \\
                            \epsilon_{ij} & k \neq i,j \textrm{ and } \epsilon_{ik}\epsilon_{kj} \leq 0 \\
                            \epsilon_{ij} + r_k|\epsilon_{ik}|\epsilon_{kj} & k \neq i,j \textrm{ and } \epsilon_{ik}\epsilon_{kj} \geq 0
                        \end{cases}
    \end{align*}
\end{definition}

\begin{example}
Mutating the generalized torus seed from Example~\ref{ex:genCAdata} once in either direction yields 
\begin{align*}
    \mu_1(\mathbf{s}) & = \{ \left((-1,0),(1,a,a,1)\right),\left((0,1),(1,1)\right) \} \\
    \mu_2(\mathbf{s}) & = \{ ((1,1),(1,a,a,1)),((0,-1),(1,1)) \}.
\end{align*}
\end{example}

Given a generalized torus seed $\mathbf{s}$, we can then define \emph{generalized cluster varieties}. Let $\mathfrak{T}$ be an infinite $|I_{\textrm{uf}}|$-regular oriented tree rooted at vertex $v$ whose edges are labeled by elements of $I_{\textrm{uf}}$. If we attach a choice of $\mathbf{s}$ to $v$, then paths within $\mathfrak{T}$ correspond to sequences of mutations in the directions specified by the edge labels. We write $\mathfrak{T}_{\mathbf{s}}$ to record the choice of seed. For each vertex $v$, we can associate the tori $\mathcal{X}_{\mathbf{s}} = T_{M} = \textrm{Spec}~\Bbbk[N]$ and $\mathcal{A}_{\mathbf{s}} = T_{N^{\circ}} = \textrm{Spec}~\Bbbk[M^{\circ}]$.
%We refer to $\mathcal{X}_{\mathbf{s}}$ as the generalized $\mathcal{X}$-variety and to $\mathcal{A}_{\mathbf{s}}$ as the generalized $\mathcal{A}$-variety. The generalized $\mathcal{X}$-variety has coordinates $y_1, \dots, y_n$ and the generalized $\mathcal{A}$-variety has coordinates $x_1, \dots, x_n$.

The cluster variables of Definition~\ref{def:genCA} appear in this setting as $x_i = z^{f_i}$ and $y_i = z^{e_i}$. We can then define birational maps between these tori which encode the exchange relations of Definition~\ref{def:genMutation}.

\begin{definition}
\label{def:biratMutMap}
For $n \in N$ and $m \in M^\circ$, we define birational maps ${\mu_k: \mathcal{X}_\mathbf{s} \rightarrow \mathcal{X}_{\mu_k(\mathbf{s})}}$ and ${\mu_k: \mathcal{A}_\mathbf{s} \rightarrow \mathcal{A}_{\mu_k(\mathbf{s})}}$ via the pull-back of functions
\begin{align*}
    \mu_k^*z^n &= z^n\left(1 + a_{k,1}z^{e_k} + \cdots + a_{k,r_k-1}z^{(r_k-1)e_k} + z^{r_ke_k} \right)^{-[n,e_k]} \\
    \mu_k^*z^m &= z^m \left( 1 + a_{k,1}z^{v_k} + \cdots + a_{k,r_k-1}z^{(r_k-1)v_k} + z^{r_kv_k} \right)^{-\langle d_ke_k,m \rangle}
\end{align*}
Here the bilinear form $\{\cdot, \cdot \}: N \times N \rightarrow \mathbb{Q}$ naturally defines a map ${p_1^*: N_{\textrm{uf}} \rightarrow M^{\circ}}$, and we use $v_k = p_1^*(e_k)$ in the above.
\end{definition}

\noindent By \cite[Proposition 2.4]{GHK}, we can glue along the open piece of $\mathcal{A}_{\mathbf{s}}$, where $\mu$ is defined, to obtain the scheme $\mathcal{A}$. We can similarly obtain the scheme $\mathcal{X}$.

%\begin{definition}
%The $\mathcal{A}$ (resp.  $\mathcal{X}$) generalized cluster varieties are schemes which are isomorphic up to codimension 2 to the following schemes
%\begin{align*}
%    \mathcal{A} := \bigcup_{w \in \mathfrak{T}} T_{N^{\circ},\mathbf{s}_w}, \qquad \mathcal{X}:= \bigcup_{w \in \mathfrak{T}} T_{M,\mathbf{s}_w}
%\end{align*}
%where the tori are glued according to the birational  functions maps from Definition~\ref{def:biratMutMap}.
%\end{definition}

\begin{definition}
The $\mathcal{A}$ (resp.  $\mathcal{X}$) generalized cluster varieties are schemes which are isomorphic up to codimension 2 to the schemes $\mathcal{A} := \bigcup_{w \in \mathfrak{T}} T_{N^{\circ},\mathbf{s}_w}$ and $\mathcal{X}:= \bigcup_{w \in \mathfrak{T}} T_{M,\mathbf{s}_w}$
where the tori are glued according to the birational  functions maps from Definition~\ref{def:biratMutMap}.
\end{definition}

\subsection{Generalized Cluster Scattering Diagrams}

We begin by establishing the setting for our construction. 
%\textcolor{blue}{Let $\Bbbk$ be a field of characteristic zero and $\sigma \subseteq M_{\mathbb{R}}$ be a top-dimensional cone with associated monoid $P := \sigma \cap M^{\circ}$ such that $p_1^*(e_i) \in P \backslash P^{\times}$ for all $i \in I_{\textrm{uf}}$. Let $\Bbbk[P]$ and $\widehat{\Bbbk[P]}$ denote, respectively, the rings of polynomials and formal power series in $P$.} 
Let $\Bbbk$ be a field of characteristic zero and $\sigma \subseteq M_{\mathbb{R}}$ a convex top-dimensional
cone which contains $\{ p_1^*(e_i) \}_{i \in I_{\textrm{uf}}}$. Then $\Bbbk[P]$ and $\widehat{\Bbbk[P]}$ denote, respectively, the rings of polynomials and formal power series in the monoid ${P := \sigma \cap M^{\circ}}$.
%\textcolor{red}{Let $\Bbbk$ be a field of characteristic zero and let $\Bbbk[P]$ and $\widehat{\Bbbk[P]}$ denote, respectively, the rings of polynomials and formal power series in the monoid $P = \langle p_1^*(e_i) \rangle \cap M^{\circ}$}.
%\footnote{\mandy{1. we will want $P$ to be top dim where $p_1^*$ is only from unfrozen part which cannot be full rank. 2. assuming we only have unfrozen variable, $P$ only 'span' the `cone' which here from the writing it looks like we have the whole lattice} \elizabeth{I tried rewriting this - is it accurate now?}}Set $N^+ := N_{\mathbf{s}}^+ := \left\{ \left. \sum_{i \in I_{\textrm{uf}}} a_ie_i \right| a_i \geq 0, \sum a_i > 0 \right\}$
Choose a linear function $d: N \rightarrow \mathbb{Z}$ such that $d(n) > 0$ for $n \in N^+$.

\begin{definition}[Definition 1.2 of \cite{GHKK}]
\label{def:wallcrossing}
For $n_0 \in N^+$, let $m_0 := p_1^*(n_0)$ and ${f = 1 + \sum_{k=1}^\infty c_kz^{km_0}}$ ${\in \widehat{\Bbbk[P]}}$. Then $\mathfrak{p}_f \in \widehat{\Bbbk[P]}$ denotes the automorphism given by  $\mathfrak{p}_f(z^m) = z^{m}f^{\langle n_0',m\rangle}$ where $n_0'$ generates the monoid $\mathbb{R}_{\geq 0}n_0 \cap N^\circ$. 
\end{definition}

\begin{definition}[Definition 1.4 of \cite{GHKK}]
\label{def:walls}
    A \emph{wall} in $M_\mathbb{R}$ is a pair $(\mathfrak{d},f_\mathfrak{d}) \in (N^+,\widehat{\Bbbk[P]})$ such that for some primitive $n_0 \in N^{+}$,
    \begin{enumerate}
        \item $f_\mathfrak{d} \in \widehat{\Bbbk[P]}$ has the form $1 + \sum_{j=1}^{\infty} c_j z^{jp_1^*(n_0)}$ with $c_j \in \Bbbk$.
        \item $\mathfrak{d} \subset n_0^{\perp} \subset M_\mathbb{R}$ is a convex rational polyhedral cone with dimension ${\mathrm{rank}~M -1}$.
    \end{enumerate}
    We refer to $\mathfrak{d} \subset M_\mathbb{R}$ as the \emph{support} of the wall $(\mathfrak{d},f_\mathfrak{d})$.
\end{definition}

\noindent We can then define scattering diagrams, an example of which appears in Figure~\ref{fig:scatDiagEx}.

\begin{definition}[Definition 1.6 of \cite{GHKK}] \label{def:1.6-GHKK}
A \emph{scattering diagram} $\mathfrak{D}$ for $N^+$ is a set of walls $\{ (\mathfrak{d},f_{\mathfrak{d}}) \}$ such that for every degree $k > 0$, there are a finite number of walls $(\mathfrak{d},f_{\mathfrak{d}}) \in \mathfrak{D}$ with $f_{\mathfrak{d}} \neq 1 \mod \mathfrak{m}^{k+1}$, where $\mathfrak{m}$ is the maximal monomial ideal generated by $\{z^{m} : m \in P \backslash \{ 0 \} \}$.
\end{definition}

\begin{figure}[h!]
    \centering
    \begin{minipage}{0.3\textwidth}
	\begin{tikzpicture}[scale=0.75]
	    %\draw [fill=blue, opacity=0.15] (-3,0) to (3,0) to (3,3) to (-3,3) to (-3,0);
	    %\draw [fill=red, opacity=0.15] (-3,0) to (3,0) to (3,-3.45) to (-3,-3.4) to (-3,0);
	
		\draw (-3,0) to (3,0);
		\draw (0,-3.4) to (0,3);
		\draw (0,0) to (2.5,-2.5);
		\draw (0,0) to (2,-3);
		\draw (0,0) to (1.5,-3);
		\draw (0,0) to (1,-3);
				
		\node at (3.3,0) {$\mathfrak{d}_1$};
		\node at (0,3.25) {$\mathfrak{d}_2$};
		\node at (2.85,-2.75) {$\mathfrak{d}_6$};
		\node at (2.25,-3.25) {$\mathfrak{d}_5$};
		\node at (1.65,-3.25) {$\mathfrak{d}_4$};
		\node at (1,-3.25) {$\mathfrak{d}_3$};
		
		\node at (2,1) {$\mathcal{C}^+$};
	\end{tikzpicture}
	\end{minipage}
	\qquad
	\begin{minipage}{0.44\textwidth}
	\begin{align*}
        f_{\mathfrak{d}_1} &= 1+z^{(-1,0)} \\
        f_{\mathfrak{d}_2} &= 1+az^{(0,1)}+az^{(0,2)}+z^{(0,3)} \\
        f_{\mathfrak{d}_3} &= 1+z^{(-1,3)} \\
        f_{\mathfrak{d}_4} &= 1 + az^{(-1,2)}+az^{(-2,4)}+z^{(-3,6)} \\
        f_{\mathfrak{d}_5} &= 1 + z^{(-2,3)} \\
        f_{\mathfrak{d}_6} &= 1 + az^{(-1,1)}+az^{(-2,2)}+z^{(-3,3)}
    \end{align*}
	\end{minipage}
    \caption{A cluster scattering diagram $\mathfrak{D}_{\mathbf{s}}$ for the algebra from Example~\ref{ex:genCAdata}.}
    \label{fig:scatDiagEx}
\end{figure}

Let $\gamma: [0,1] \rightarrow M_\mathbb{R} \backslash \textrm{Sing}(\mathfrak{D})$ be a smooth immersion which crosses walls transversely and whose endpoints aren't in the support of $\mathfrak{D}$. Let $0 < t_1 \leq t_2 \leq \cdots \leq t_s < 1$ be a sequence such that at time $t_i$ the path $\gamma$ crosses the wall $\mathfrak{d}_i$ such that $f_i \neq 1~\mod \mathfrak{m}^{k+1}$. Definition~\ref{def:1.6-GHKK} ensures that this is a finite sequence. Set $\epsilon_i := -\textrm{sgn}(\langle n_i, \gamma'(t_i) \rangle)$ where $n_i \in N^{+}$ is the primitive vector normal to $\mathfrak{d}_i$.
For each degree $k > 0$, define $\mathfrak{p}_{\gamma,\mathfrak{D}}^k := \mathfrak{p}_{f_{\mathfrak{d}_{t_s}}}^{\epsilon_s} \circ \cdots \circ \mathfrak{p}_{f_{\mathfrak{d}_{t_1}}}^{\epsilon_1}$,
where $\mathfrak{p}_{f_{\mathfrak{d}_{t_i}}}$ is defined as in Definition \ref{def:wallcrossing}. Then let $\mathfrak{p}_{\gamma,\mathfrak{D}} := \lim_{k \rightarrow \infty} \mathfrak{p}_{\gamma,\mathfrak{D}}^k$.
We refer to $ \mathfrak{p}_{\gamma,\mathfrak{D}}$ as a \emph{path-ordered product}.

\begin{definition}[Definition 1.8 of \cite{GHKK}]
Let $\mathfrak{D}$, $\mathfrak{D}'$ be scattering diagrams. They are \emph{equivalent} if $\mathfrak{p}_{\gamma,\mathfrak{D}} = \mathfrak{p}_{\gamma,\mathfrak{D}'}$ for all paths $\gamma$ for which both path-ordered products are defined.
\end{definition}
A scattering diagram $\mathfrak{D}$ is \emph{consistent} if $\mathfrak{p}_{\gamma,\mathfrak{D}}$ depends only on the endpoints of $\gamma$. Let $v_i = p_1^*(e_i)$ for $i \in I_{\textrm{uf}}$. Then the \emph{initial scattering diagram} for generalized torus seed $\mathbf{s}$ is 
\[ \mathfrak{D}_{\textrm{in},\textbf{s}} := \{ (e_i^{\perp},1+a_{i,1}z^{v_i} + a_{i,2}z^{2v_i} + \cdots + a_{i,r_i-1}z^{(r_i - 1)v_i} + z^{r_iv_i}) :i \in I_{\textrm{uf}} \}, \]
and we have the following:
\begin{prop}[cf.\ \cite{GS,KS}]
\label{theorem:uniqueness}
Given a generalized torus seed $\mathbf{s}$, there is a consistent scattering diagram $\mathfrak{D}_{\mathbf{s}}$ which contains $ \mathfrak{D}_{\textrm{in},\mathbf{s}}$ such that  $\mathfrak{D}_{\mathbf{s}} \backslash \mathfrak{D}_{\textrm{in},\mathbf{s}}$ consists only of walls $\mathfrak{d} \subset n_0^{\perp}$ with $p_1^*(n_0) \not\in \mathfrak{d}$ for some primitive $n_0 \in N^{+}$. The scattering diagram $\mathfrak{D}_\mathbf{s}$ is unique up to equivalence.
\end{prop}

\subsection{Principal Coefficients}

%\footnote{\mandy{Discussion: move this section earlier? seems this is the set up anyway and can tell ppl why we can assume $p^*$ map is injective when defining scattering diagram}}
As with ordinary cluster algebras, we can obtain a generalized cluster algebra with \emph{principal coefficients} by extending the matrix $[\{ e_i, e_j \}]$ to a $2n \times 2n$ skew-symmetric matrix with the $n \times n$ identity matrix as its upper right block and an $n \times n$ zero matrix as its lower right block.
This requires the following modifications to our construction:

\begin{definition}
\label{def:principalFixedData}
Given generalized fixed data $\Gamma$, the generalized fixed data for the cluster variety with principal coefficients, $\Gamma_{\textrm{prin}}$, is defined by:
\begin{itemize}[noitemsep]
    \item The \emph{double} of the lattice $N$, $\widetilde{N} := N \oplus M^{\circ}$, with skew-symmetric bilinear form given by
    \[ \{ (n_1,m_1),(n_2,m_2) \} = \{ n_1, n_2 \} + \langle n_1, m_2 \rangle - \langle n_2, m_1 \rangle. \]
    \item The unfrozen sublattice $\widetilde{N}_{\textrm{uf}} := N_{\textrm{uf}} \oplus 0 \cong N_{\textrm{uf}}$. 
    \item The sublattice $\widetilde{N}^{\circ} := N^{\circ} \oplus M$.
    \item The index set $\widetilde{I}$ is given by the disjoint union of two copies of $I$.
    \item The unfrozen index set, $\widetilde{I}_{\textrm{uf}}$, is the original $I_{\textrm{uf}}$ thought of as a subset of the first copy of $I$.
    \item The integer collections $\widetilde{d} = (d_i)_{i \in \widetilde{I}}$ and $\widetilde{r} = (r_i)_{i \in \widetilde{I}}$ taken such that within each disjoint copy of $I$, the $d_i$ and $r_i$ agree with the original generalized torus seed $\mathbf{s}$.
    \item The character lattice $\widetilde{M} = \textrm{Hom}(\widetilde{N},\mathbb{Z}) = M \oplus N^{\circ}$ with sublattice $\widetilde{M}^{\circ} = M^{\circ} \oplus N$.
\end{itemize}
\end{definition}

Given a torus seed $\mathbf{s}$, the torus seed with principal coefficients $\mathbf{s}_{\textrm{prin}}$ is defined as $\mathbf{s}_{\textrm{prin}} := \{ ((e_i,0),\mathbf{a}_i), ((0,f_i),\mathbf{a}_i) \}_{i \in I}$. The choice of $\mathbf{s}_{\textrm{prin}}$ defines dual bases for $\widetilde{M}$ and $\widetilde{M}^{\circ}$. Let $\widetilde{v_i} := (v_i,e_i) = (p_1^*(e_i),e_i)$. Then we can define
\[ \mathfrak{D}_{\textrm{in},\mathbf{s}}^{\mathcal{A}_{\textrm{prin}}} = \left\{ \left( (e_i,0)^\perp, 1 + a_{i,1}z^{\widetilde{v_1}} + \cdots + a_{i,r_i - 1}z^{(r_i-1)\widetilde{v_i}} + z^{r_i\widetilde{v_i}} \right) \right\}. \] 

\begin{figure}[h!]
    \centering
    \begin{minipage}{0.2\textwidth}
	\begin{tikzpicture}[scale=0.75]
	    %\draw [fill=blue, opacity=0.2] (0,0) to (3,0) to (3,3) to (0,3) to (0,0);
	    %\draw [fill=red, opacity=0.15] (-3,0) to (3,0) to (3,-3.45) to (-3,-3.4) to (-3,0);
	
		\draw (-3,0) to (3,0);
		\draw (0,-3.4) to (0,3);
		\draw (0,0) to (2.5,-2.5);
		\draw (0,0) to (2,-3);
		\draw (0,0) to (1.5,-3);
		\draw (0,0) to (1,-3);
				
		\node[scale=0.75] at (3.3,0) {$\widetilde{\mathfrak{d}}_1$};
		\node[scale=0.75] at (0,3.25) {$\widetilde{\mathfrak{d}}_2$};
		\node[scale=0.75] at (2.85,-2.75) {$\widetilde{\mathfrak{d}}_6$};
		\node[scale=0.75] at (2.25,-3.25) {$\widetilde{\mathfrak{d}}_5$};
		\node[scale=0.75] at (1.65,-3.25) {$\widetilde{\mathfrak{d}}_4$};
		\node[scale=0.75] at (1,-3.25) {$\widetilde{\mathfrak{d}}_3$};
		
		%\node at (2,1) {$\mathcal{C}^+$};
	\end{tikzpicture}
	\end{minipage}
	\qquad\qquad\qquad~
	\begin{minipage}{0.54\textwidth}
	\begin{align*}
        f_{\widetilde{\mathfrak{d}}_1} &= 1+z^{(-1,0,0,1)} \\
        f_{\widetilde{\mathfrak{d}}_2} &= 1+az^{(0,1,1,0)}+az^{(0,2,2,0)}+z^{(0,3,3,0)} \\
        f_{\widetilde{\mathfrak{d}_3}} &= 1+z^{(-1,3,3,1)} \\
        f_{\widetilde{\mathfrak{d}}_4} &= 1 + az^{(-1,2,2,1)}+az^{(-2,4,4,2)}+z^{(-3,6,6,3)} \\
        f_{\widetilde{\mathfrak{d}}_5} &= 1 + z^{(-2,3,3,2)} \\
        f_{\widetilde{\mathfrak{d}}_6} &= 1 + az^{(-1,1,1,1)}+az^{(-2,2,2,2)}+z^{(-3,3,3,3)}
    \end{align*}
	\end{minipage}
	
	    \begin{minipage}{0.3\textwidth}
	\begin{tikzpicture}[scale=0.75]
	    %\draw [fill=blue, opacity=0.15] (-3,0) to (3,0) to (3,3) to (-3,3) to (-3,0);
	    %\draw [fill=red, opacity=0.15] (-3,0) to (3,0) to (3,-3.45) to (-3,-3.4) to (-3,0);
	
		\draw (-3,0) to (3,0);
		\draw (0,-3.4) to (0,3);
		\draw (0,0) to (-2.5,-2.5);
		\draw (0,0) to (-2,-3);
		\draw (0,0) to (-1.5,-3);
		\draw (0,0) to (-1,-3);
				
		\node[scale=0.75] at (3.3,0) {$\mathfrak{d}_2$};
		\node[scale=0.75] at (0,3.25) {$\mathfrak{d}_1$};
		\node[scale=0.75] at (-2.85,-2.75) {$\mathfrak{d}_6$};
		\node[scale=0.75] at (-2.25,-3.25) {$\mathfrak{d}_5$};
		\node[scale=0.75] at (-1.65,-3.25) {$\mathfrak{d}_4$};
		\node[scale=0.75] at (-1,-3.25) {$\mathfrak{d}_3$};
		
	\end{tikzpicture}
	\end{minipage}
	\qquad
	\begin{minipage}{0.44\textwidth}
	\begin{align*}
        f_{\mathfrak{d}_1} &= 1+z^{(0,1)} \\
        f_{\mathfrak{d}_2} &= 1+az^{(1,0)}+az^{(2,0)}+z^{(3,0)} \\
        f_{\mathfrak{d}_3} &= 1+z^{(3,1)} \\
        f_{\mathfrak{d}_4} &= 1 + az^{(2,1)}+az^{(4,2)}+z^{(6,3)} \\
        f_{\mathfrak{d}_5} &= 1 + z^{(3,2)} \\
        f_{\mathfrak{d}_6} &= 1 + az^{(1,1)}+az^{(2,2)}+z^{(3,3)}
    \end{align*}
	\end{minipage}
    \caption{The $\mathcal{A}_{\textrm{prin}}$ (top) and $\mathcal{X}$ (bottom) scattering diagrams for the generalized cluster algebra $\mathcal{A}\Big( \mathbf{x},\mathbf{y},\left[\begin{smallmatrix} 0 & 1 \\ -1 & 0 \end{smallmatrix}\right], \left[\begin{smallmatrix} 3 & 0 \\ 0 & 1 \end{smallmatrix}\right], ((1,a,a,1),(1,1)) \Big)$. The $\mathcal{X}$-diagram is obtained from the $\mathcal{A}_{\textrm{prin}}$-diagram via the slice $\{m \in M^{\circ} : m = p^*(n) \}$, with $\widetilde{\mathfrak{d}}_i$ in the $\mathcal{A}_{\textrm{prin}}$-diagram yielding the wall $\mathfrak{d}_i$ in the $\mathcal{X}$-diagram. Note that in this example, the diagram for $\mathcal{A}_{\textrm{prin}}$ is actually four dimensional and it is drawn here via  projection onto $M^{\circ}$.}
	    \label{fig:AXdiagrams}
\end{figure}

A choice of generalized torus seed with principal coefficients defines tori  $ \mathcal{X}_{\mathbf{s}_{\textrm{prin}}} := T_{\widetilde{M}} = \textrm{Spec}~\Bbbk[\widetilde{N}]$ and  $ \mathcal{A}_{\mathbf{s}_{\textrm{prin}}} := T_{\widetilde{N}^{\circ}} = \textrm{Spec}~\Bbbk[\widetilde{M}^{\circ}]$. The varieties $\mathcal{A}_{\textrm{prin}}$ and $\mathcal{X}_{\textrm{prin}}$ are then obtained by gluing according to the birational mutation maps, as before. By Theorem \ref{theorem:uniqueness}, there exists a unique consistent scattering diagram $\mathfrak{D}_{\mathbf{s}}^{\mathcal{A}_{\textrm{prin}}}$ corresponding to $\mathcal{A}_{\mathbf{s}_{\textrm{prin}}}$. The varieties $\mathcal{A}_{\mathbf{s}}$ and $\mathcal{X}_{\mathbf{s}}$ are given, respectively, by the fiber $\mathcal{A}_e$, where $e \in T_{M}$ is the identity element, and the quotient $\mathcal{A}_{\textrm{prin}}/T_{N^{\circ}}$.  Figure~\ref{fig:AXdiagrams} illustrates an example of a consistent scattering diagram for $\mathcal{A}_{\textrm{prin}}$ and the corresponding $\mathcal{X}$-diagram obtained by slicing.
%Figure~\ref{fig:AXdiagrams} contains an example of $\mathfrak{D}_{\mathbf{s}}^{\mathcal{A}_{\textrm{prin}}}$ and the diagram $\mathfrak{D}_{\mathbf{s}}^{\mathcal{X}}$ obtained from $\mathfrak{D}_{\mathbf{s}}^{\mathcal{A}_{\textrm{prin}}}$ by slicing.

\subsection{Mutation invariance}
In Section~\ref{sec:genScatDiag}, we gave both a construction for $\mathfrak{D}_{\mathbf{s}}$ and relations for obtaining a mutated seed $\mu_k(\mathbf{s})$. If applied to $\mu_k(\mathbf{s})$, our construction would yield another diagram $\mathfrak{D}_{\mu_k(\mathbf{s})}$. Because $\mathbf{s}$ and $\mu_k(\mathbf{s})$ correspond to the same generalized cluster algebra, we should expect $\mathfrak{D}_{\mathbf{s}}$ and $\mathfrak{D}_{\mu_k(\mathbf{s})}$ to be equivalent. To see this, let $\mathcal{H}_{k,+} := \{ m \in M_{\mathbb{R}} : \langle e_k, m \rangle \geq 0 \}$ and $\mathcal{H}_{k,-} := \{ m \in M_{\mathbb{R}} : \langle e_k, m \rangle \leq 0 \}$. Then define the piecewise linear transformation $T_k: M^\circ \rightarrow M^\circ$ as
\[ T_k(m) := \begin{cases}
                m + r_kv_k\langle d_ke_k,m \rangle & m \in \mathcal{H}_{k,+} \\
                m & m \in \mathcal{H}_{k,-}
            \end{cases}\]
The shorthand $T_{k,-}$ and $T_{k,+}$ is sometimes used for $T_k$ in the regions $\mathcal{H}_{k,+}$ and $\mathcal{H}_{k,-}$.
%We sometimes use $T_{k,-}$ and $T_{k,+}$ to refer to $T_k$ in, respectively, the regions $\mathcal{H}_{k,+}$ and $\mathcal{H}_{k,-}$.

\begin{definition}
\label{def:diagramMutProcedure}
The scattering diagram $T_k(\mathfrak{D}_\mathbf{s})$ is obtained from $\mathfrak{D}_{\mathbf{s}}$ via the following procedure:
\begin{enumerate}
    \item For each wall $(\mathfrak{d},f_{\mathfrak{d}})$ in $\mathfrak{D}_{\mathbf{s}}$ other than $\mathfrak{d}_k := (e_k^{\perp},1 + a_1z^{v_k} + \cdots + a_{j-1}z^{(j-1)v_k} + z^{jv_k})$, there are either one or two corresponding walls in $T_k(\mathfrak{D}_\mathbf{s})$. If $\textrm{dim}(\mathfrak{d} \cap \mathcal{H}_{k,-}) \geq \textrm{rank}(M) - 1$, then add to $T_k(\mathfrak{D}_\textbf{s})$ the wall $(T_k(\mathfrak{d} \cap \mathcal{H}_{k,-}),T_{k,-}(f_{\mathfrak{d}}))$ where the notation $T_{k,\pm}(f_{\mathfrak{d}})$ indicates the formal power series obtained by applying $T_{k,\pm}$ to the exponent of each term of $f_{\mathfrak{d}}$. If $\textrm{dim}(\mathfrak{d} \cap \mathcal{H}_{k,+}) \geq \textrm{rank}(M) - 1$, add the wall $(T_k(\mathfrak{d} \cap \mathcal{H}_{k,+}),T_{k,+}(f_{\mathfrak{d}}))$.
    \item The wall $\mathfrak{d}_k$ in $\mathfrak{D}_\mathbf{s}$ becomes the wall $\mathfrak{d}_k' = (e_k^{\perp},1 + a_{1}z^{-v_k} + \cdots + a_{r_k-1}z^{-(r_k-1)v_k} + z^{-r_kv_k})$ 
    %in $T_k(\mathfrak{D}_\mathbf{s})$.
\end{enumerate}
\end{definition}

\noindent It is important to note that $T_k$ is an involution up to equivalence of diagrams. 
%This reflects the fact that although cluster algebra mutation is involutive, the mutation of seed data is involutive up to isomorphism.

\begin{theorem}[Analogue of Theorem 1.24 of \cite{GHKK}]
\label{theorem:mutDiagConsistent}
If the injectivity assumption holds, then $T_k(\mathfrak{D}_{\mathbf{s}})$ is a consistent scattering diagram for $N^+_{\mu_k(\mathbf{s})}$. Moreover, 
%the diagrams 
$\mathfrak{D}_{\mu_k(\mathbf{s})}$ and $T_k(\mathfrak{D}_{\mathbf{s}})$ are \mbox{equivalent.}
\end{theorem}

%The conclusion of Theorem~\ref{theorem:mutDiagConsistent} means that $T_k$ commutes with diagram construction, up to equivalence of diagrams, so we can obtain $\mathfrak{D}_{\mu_k(\mathbf{s})}$ by applying $T_k$ to $\mathfrak{D}_{\mathbf{s}}$ rather than by computing $\mu_k(\mathbf{s})$ and then constructing the corresponding diagram. An example of $\mathfrak{D}_{\mathbf{s}}$ and $T_k(\mathfrak{D}_{\mathbf{s}})$ are shown in Figure~\ref{fig:brokenlines}.

Hence, we conclude that the definition of a scattering diagram is mutation invariant. That is, even though two distinct seeds $\mathbf{s}$ and $\mathbf{s}'$ for the same generalized cluster algebra will yield distinct scattering diagrams $\mathfrak{D}_{\mathbf{s}}$ and $\mathfrak{D}_{\mathbf{s}'}$ (see Figure~\ref{fig:brokenlines}), the diagrams are "mutable" to each other via some sequence of applications of $T_k$.
Note that that the exchange polynomial coefficients are reciprocal, i.e.  $a_{i,s} = a_{i,r_i-s}$, are necessary for the theorem. 

The \emph{positive chamber} of $\mathfrak{D}_{\mathbf{s}}$ is $\mathcal{C}^+_\mathbf{s} := \{ \left. m \in M_\mathbb{R} \right| \langle e_i,m \rangle \geq 0 \textrm{ for } i \in I_\textrm{uf} \}$.  For seeds $\mathbf{s}'$ reachable from $\mathbf{s}$ via a finite sequence of mutations, let $\mathcal{C}^{+}_v$ denote the chamber of $\mathfrak{D}_{\mathbf{s}}$ corresponding to the positive chamber of $\mathfrak{D}_{\mathbf{s}'}$ and $\Delta_{\mathbf{s}}^{+}$ denote the set of chambers $\mathcal{C}^+_{v}$ as $v$ runs across all vertices of $\mathfrak{T}_{\mathbf{s}}$. We refer to $\Delta_{\mathbf{s}}^+$ as the \emph{cluster complex} and to its elements as \emph{cluster chambers}. This identification of the chamber structure of $\mathfrak{D}_{\mathbf{s}}$ and the cluster complex follows from the fact that $T_k$ is the Fock--Goncharov tropicalization of the mutation map $\mu_k$ on $\mathcal{A}^{\vee}$.

\section{Theta basis for reciprocal generalized cluster algebras}

\label{sec:thetaBasis}

To define theta functions, we will make use of \emph{broken line} as in the ordinary setting:

\begin{definition}[Definition 3.1 of \cite{GHKK}]
\label{def:brokenline}
Let $\mathfrak{D}$ be a scattering diagram, $m_0$ be a point in $M^\circ \backslash \{ 0 \}$, and $Q$ be a point in $M_\mathbb{R} \backslash \textrm{Supp}(\mathfrak{D})$. A \emph{broken line} with endpoint $Q$ and initial slope $m_0$ is a piecewise linear path $\gamma: (-\infty,0] \rightarrow M_\mathbb{R} \backslash \textrm{Sing}(\mathfrak{D})$ with finitely many domains of linearity. Each domain of linearity, $L$, has an associated monomial $c_Lz^{m_L} \in k[M^\circ]$ such that:
\begin{enumerate}[noitemsep]
    \item $\gamma(0) = Q$.
    \item If $L$ is the first domain of linearity of $\gamma$, then $c_Lz^{m_L} = z^{m_0}$.
    \item Within the domain of linearity $L$, the broken line has slope $-m_L$, i.e. $\gamma'(t) = -m_L$.
    \item If $t$ is a point at which $\gamma$ is non-linear and is passing from one domain of linearity $L$ to another domain $L'$ and ${\mathfrak{D}_t := \{ (\mathfrak{d},f_\mathfrak{d}) \in \mathfrak{D} : \gamma(t) \in \mathfrak{d}. \}}$, then the power series $\mathfrak{p}_{\left.\gamma\right|_{(t-\epsilon,t+\epsilon)},\mathfrak{D}_t}$ contains the term $c_{L'}z^{m_{L'}}$.
\end{enumerate}
%(1)  $\gamma(0) = Q$; (2) if $L$ is the first domain of linearity of $\gamma$, then $c_Lz^{m_L} = z^{m_0}$; (3) within the domain of linearity $L$, the broken line has slope $-m_L$, i.e. $\gamma'(t) = -m_L$; (4) and if $t$ is a point at which $\gamma$ is non-linear and is passing from one domain of linearity $L$ to another domain $L'$ and ${\mathfrak{D}_t := \{ (\mathfrak{d},f_\mathfrak{d}) \in \mathfrak{D} : \gamma(t) \in \mathfrak{d}. \}}$, then the power series $\mathfrak{p}_{\left.\gamma\right|_{(t-\epsilon,t+\epsilon)},\mathfrak{D}_t}$ contains the term $c_{L'}z^{m_{L'}}$.
\end{definition}

\noindent One example of a broken line is shown in Figure~\ref{fig:brokenlines}. 
%The \emph{theta function} $\vartheta_{Q,m_0}$ can be defined in terms of a particular set of broken lines.

\begin{definition}[Definition 3.3 of \cite{GHKK}]
\label{def:thetaFunction}
Suppose $\mathfrak{D}$ is a scattering diagram and consider points $m_0 \in M^\circ \backslash \{ 0 \}$ and $Q \in M_\mathbb{R} \backslash \textrm{Supp}(\mathfrak{D})$. For a broken line $\gamma$ with initial exponent $m_0$ and endpoint $Q$, we define $I(\gamma) = m_0$, $b(\gamma) = Q$, and $\textrm{Mono}(\gamma) = c(\gamma)z^{F(\gamma)}$ where $\textrm{Mono}(\gamma)$ is the monomial attached to the final domain of linearity of $\gamma$. We then define $\vartheta_{Q,m_0} := \sum_\gamma \textrm{Mono}(\gamma)$ where the summation ranges over all broken lines $\gamma$ with initial exponent $m_0$ and endpoint $Q$. When $m_0 = 0$, we define $\vartheta_{Q,0} = 1$ for any endpoint $Q$.
\end{definition}

\begin{figure}[ht!]
    \centering
    	\begin{tikzpicture}
		\draw (-4.5,0) to (3,0);
		\draw (0,-1) to (0,4.5);
		\draw (0,0) to (1,-1);
		\draw (0,0) to (0.67,-1);
		\draw (0,0) to (0.5,-1);
		\draw (0,0) to (0.33,-1);
		
		\draw[green!60!black] (1.5,1) to (0,4);
		\draw[green!60!black] (0,4) to (-4,0);
		\draw[green!60!black] (-4,0) to (-4,-1);
		\node[green!60!black,scale=0.8] at (1.2,2.8) {$z^{(-1,2)}$};
		\node[green!60!black,scale=0.8] at (-1.9,2.8) {$z^{(-1,-1)}$};
		\node[green!60!black,scale=0.8] at (-4.5,-0.5) {$z^{(0,-1)}$};
		
		\draw[purple] (1.5,1) to (0,2.5);
		\draw[purple] (0,2.5) to (-2.5,0);
		\draw[purple] (-2.5,0) to (-2.5,-1);
		\node[purple,scale=0.7] at (0.5,1.5) {$az^{(-1,1)}$};
		\node[purple,scale=0.8] at (-1.5,1.7) {$z^{(-1,-1)}$};
		\node[purple,scale=0.8] at (-3,-0.5) {$z^{(0,-1)}$};
		
		\draw[blue] (1.5,1) to (0,1);
		\draw[blue] (0,1) to (-1,0);
		\draw[blue] (-1,0) to (-1,-1);
		\node[blue,scale=0.8] at (0.65,0.8) {$az^{(-1,0)}$};
		\node[blue,scale=0.8] at (-0.9,0.7) {$z^{(-1,-1)}$};
		\node[blue,scale=0.8] at (-1.5,-0.5) {$z^{(0,-1)}$};
		
		\draw[red!50!blue] (1.5,1) to (0.5,0);
		\draw[red!50!blue] (0.5,0) to (0.5,-1);
		\node[red!50!blue,scale=0.6] at (1.1,0.2) {$z^{(-1,-1)}$};
		\node[red!50!blue,scale=0.6] at (0.9,-0.3) {$z^{(0,-1)}$};
		
		\draw[red] (1.5,1) to (1.5,-1);
		\node[red,scale=0.8] at (2,0.5) {$z^{(0,-1)}$};
		
		\draw[fill] (1.5,1) circle [radius=2pt] ;
		\node at (1.7,1.2) {$Q$};
	\end{tikzpicture}
    \caption{The broken line for $\vartheta_{(0,-1)}$ in $\mathfrak{D}_\mathbf{s}$ for the generalized cluster algebra from Example~\ref{ex:genCAdata} with generalized torus seed $\mathbf{s} = ((1,0),(1,a,a,1),((0,1),(1,1))$.}
    \label{fig:brokenlines}
\end{figure}

\noindent We can then observe how mutation acts on broken lines:

\begin{prop}[Analog of Proposition 3.6 of \cite{GHKK}]
\label{prop:brokenLineBijection}
The transformation $T_k$ gives a bijection between broken lines with endpoint $Q$ and initial slope $m_0$ in $\mathfrak{D}_\mathbf{s}$ and broken lines with endpoint $T_k(Q)$ and initial slope $T_k(m_0)$ in $\mathfrak{D}_{\mu_k(\mathbf{s})}$. In particular, $\vartheta^{\mu_k(\mathbf{s})}_{T_k(Q),T_k(m_0)} = 
            T_{k,\pm}\left( \vartheta^\mathbf{s}_{Q,m_0} \right)$
for $Q \in \mathcal{H}_{k,\pm}$ where $T_{k,\pm}$ acts linearly on the exponents in $\vartheta^\mathbf{s}_{Q,m_0}$.
\end{prop}

%The collection $\{ \vartheta_{m} \}_{m \in M^{\circ}}$

%As in the ordinary setting, the cluster variables and cluster monomials are theta functions (cf.\ Proposition 3.8 and Corollary 3.9 of \cite{GHKK}).
%\textcolor{blue}{
%For any $m_0 \in M \backslash \{ 0 \}$ such that there exists a path $\gamma$ from $m_0$ to some point $Q$ in the positive chamber $\mathcal{C}^+$ which passes through finitely many chambers, theta function $\vartheta_{m_0, Q}$ can be obtained by path-ordered product, i.e. $\vartheta_{m_0, Q} = \mathfrak{p}_{\gamma}(z^{m_0})$.
%}
%This allows us to frame a useful relationship between pairs of theta functions within a given diagram.
%\begin{theorem}[Theorem 3.5 of \cite{GHKK}]
%\label{theorem:thetafuncomposition}
%Let $\mathfrak{D}$ be a consistent scattering diagram, $m_0$ be a point in $M \backslash \{ 0 \}$, and consider a pair of points $Q$ and $Q'$ in $M_\mathbb{R} \backslash \textrm{Supp}(\mathfrak{D})$ such that $Q$ and $Q'$ are linearly independent over $\mathbb{Q}$. Then for any path $\gamma$ with endpoints $Q$ and $Q'$ for which $\mathfrak{p}_{\gamma,\mathfrak{D}}$ is defined, we have $\vartheta_{Q',m_0} = \mathfrak{p}_{\gamma,\mathfrak{D}}(\vartheta_{Q,m_0})$.
%\end{theorem}

%\begin{prop}
%Consider $m_0 \in M \backslash \{ 0 \}$ such that there exists a path $\gamma$ from $m_0$ to some point $Q$ in the positive chamber $\mathcal{C}^+$ which passes through finitely many chambers. Then $ {\vartheta_{Q,m_0} = \mathfrak{p}_{\gamma,\mathfrak{D}}(z^{m_0})}$.
%\end{prop}

This observation tells us theta functions is defined independent of the choice of the seed $\textbf{s}$. 
The last important step is to prove that cluster monomials can be expressed as theta functions. To do so, we construct the scheme $\mathcal{A}_{\textrm{scat}}$ by associating tori to each chamber of the scattering diagram and gluing along the birational mutation maps induced by path-ordered products. 
Then we show that $\mathcal{A}_{\textrm{scat}}$ is isomorphic to the generalized cluster variety $\mathcal{A}$. The structure of our argument is the same as in the ordinary case (see Section 4 of \cite{GHKK}) with some modifications
to accommodate the differences in our wall-crossing automorphisms. 

For any $m_0 \in M \backslash \{ 0 \}$ such that there exists a path $\gamma$ from $m_0$ to some point $Q$ in the positive chamber $\mathcal{C}^{+}$ which passes through finitely many chambers, the theta function $\vartheta_{Q,m_0}$ can also be obtained via the path-ordered product $\mathfrak{p}_{\gamma}\left(z^{m_0} \right)$. Within the cluster complex, the definitions of $\vartheta_{Q,m_0}$ by broken lines and by path-ordered products agree. Hence, the theta functions are regular functions on $\mathcal{A}_{\textrm{scat}}$. Because $\mathcal{A}_{\textrm{scat}} \simeq \mathcal{A}$ and the ring of regular functions on $\mathcal{A}$ is the generalized cluster algebra, we have
%we can identify their rings of regular functions. Since the ring of regular functions on $\mathcal{A}$ is the generalized cluster algebra, we have:
%\footnote{
%Theta functions can alternately be defined in terms of path-ordered products. For any $m_0 \in M \backslash \{ 0 \}$ such that there exists a path $\gamma$ from $m_0$ to some point $Q$ in the positive chamber $\mathcal{C}_{\mathbf{s}}^+$ which passes through finitely many chambers, $ {\vartheta_{Q,m_0} = \mathfrak{p}_{\gamma,\mathfrak{D}}(z^{m_0})}$. Given points $Q,Q' \in M_{\mathbb{R}} \backslash \textrm{Supp}(\mathfrak{D})$ with irrational coordinates and a path $\gamma$ between $Q$ and $Q'$ for which $\mathfrak{p}_{\gamma,\mathfrak{D}}$ is defined, we have $\vartheta_{Q',m_0} = \mathfrak{p}_{\gamma,\mathfrak{D}}(\vartheta_{Q,m_0})$, cf.\ Theorem 3.5 of \cite{GHKK}. }
%\footnote{\mandy{This paragraph contained a few mixed message: 1. theta functions are well defined under mutation; 2. can obtain by path-ordered product; 3. cluster monomial are theta functions (which does not follow at this moment yet)}}

\begin{theorem}[Analogue of Theorem 4.9 of \cite{GHKK}]
The generalized cluster monomials can be expressed in terms of theta functions.
\end{theorem}



To demonstrate that the theta functions form a basis, we then define structure constants for multiplication and give a multiplication rule for theta functions:

\begin{lemma}[Analogue of Definition-Lemma 6.2 and Proposition 6.3 in \cite{GHKK}]
Let $p_1,p_2,$ and $q$ be points in $\widetilde{M}_{\mathbf{s}}^{\circ}$ and $z$ be a generic point in $\widetilde{M}_{\mathbb{R},\mathbf{s}}^{\circ}$. There are at most finitely many pairs of broken lines $\gamma_1,\gamma_2$ such that $\gamma_i$ has initial slope $p_i$, both broken lines have endpoint $z$, and $F(\gamma_1) + F(\gamma_2) = q$. Let $a_{z}(p_1,p_2,q) := \sum_{(\gamma_1,\gamma_2)} c(\gamma_1)c(\gamma_2)$ for pairs $\gamma_1,\gamma_2$ such that $I(\gamma_i) = p_i$, $b(\gamma_i) = z$, and $F(\gamma_1) + F(\gamma_2) = q$.
%Let
%\[ a_{z}(p_1,p_2,q) := \sum_{\substack{ (\gamma_1,\gamma_2) \\ I(\gamma_i) = p_i, b(\gamma_i) = z \\ F(\gamma_1) + F(\gamma_2) = q}} c(\gamma_1)c(\gamma_2). \]
Then
\[ \vartheta_{p_1} \cdot \vartheta_{p_2} = \sum_{q \in \widetilde{M}_{\mathbf{s}}^{\circ}} \alpha_{z(q)}(p_1,p_2,q)\vartheta_q \]
for $z(q)$ sufficiently close to $q$. When $z$ is sufficiently close to $q$, $a_z(p_1,p_2,q)$ is independent of the choice of $z$ and we can simply write $\alpha(p_1,p_2,q) := a_z(p_1,p_2,q)$.
\end{lemma}
For a generic point $Q$ in some chamber, let $\Theta$ be the collection of $m_0 \in M^{\circ}$ such that there are finitely many broken lines with initial slope $-m_0$ and endpoint $Q$. Then,
%These structural results allow us to establish the following theorem:
%\footnote{\mandy{Do we have it in general? Or just when the coefficient is positive? and do we just have middle algebra?} \elizabeth{Hm, yes, this needs to be phrased more precisely. We do require that $a_s \geq 0$ for all $s \in [r_i]$. I'm not quite sure how to phrase that here since the exchange coefficients are part of the torus seed data rather than the fixed data. Do either of you have a suggestion? Also, we don't talk about the middle generalized cluster algebra in this abstract, but you're right that we really have this result as a corollary since the generalized cluster algebra is a subalgebra of the middle generalized cluster algebra. Do we want to include a sentence or two mentioning that the proof goes via the middle and upper generalized cluster algebras?}\mandy{I feel I may mix up with the definition of basis. At some point multification between cluster monomial would have theta functions in the badland. Would that we just look at the cluster algebras?}}

\begin{theorem}
\label{theorem:thetaBasis}
For fixed data $\Gamma$ and torus seed $\mathbf{s} = \{ (e_i, (a_{i,s}) \}_{i \in I}$ with all $a_{i,s} \geq 0$, the collection $\{ \vartheta_{m} \}_{m \in \Theta}$ 
%defined on $\mathfrak{D}_{\mathbf{s}}$
%Let $\Gamma$ be a set of generalized fixed data. For a generalized torus seed $\mathbf{s} = \{ (e_i, (a_{i,s}) \}_{i \in I}$ with all $a_{i,s} \geq 0$, the collection $\{ \vartheta_{m} \}_{m \in \Theta}$ 
%defined on $\mathfrak{D}_{\mathbf{s}}$
forms a basis for the associated middle reciprocal generalized cluster algebra.
%Given a set of generalized fixed data $\Gamma$, the collection $\{ \vartheta_{m} \}_{m \in \widetilde{M}^{\circ}}$ forms a basis for the associated reciprocal middle generalized cluster algebra.
\end{theorem}
When the upper generalized cluster algebra and generalized cluster algebra agree, Theorem~\ref{theorem:thetaBasis} gives a basis for the generalized cluster algebra.

%\section{Building $\mathcal{A}$ and $\mathcal{A}_{\textrm{prin}}$}
%\label{sec:buildVariety}
%Finally, we must check that our cluster scattering diagrams yield the appropriate generalized cluster varieties 
%and therefore the theta basis from Section~\ref{sec:thetaBasis} is the . 
%Let $\Gamma$ be a set of generalized initial data such that the diagram $\mathfrak{D}_\mathbf{s}$ has cluster chamber structure $\Delta_\mathbf{s}^+$. To distinguish between the multiple copies of the lattices $N, M, N^{\circ},$ and $M^{\circ}$ that arise from the different possible choices of $\mathbf{s}$, we index both seeds and lattices by the vertices $v$ of $\mathfrak{T}_{\mathbf{s}}$. 
%For example, the seed $\mathbf{s}_{v}$ gives rise to the diagram $\mathfrak{D}_{\mathbf{s}_{v}}$ on the lattice $M^\circ_{\mathbb{R},v}$.
%The chambers in $\mathfrak{D}_{\mathbf{s}_{\sigma}}$ give the Fock--Goncharov cluster complex $\Delta^+$ under the identification $M^\circ_{\mathbb{R},\mathbf{s}_{\sigma}} = \mathcal{A}^\vee(\mathbb{R}^T)$. As a consequence of this identification, there's a canonical bijection between the cluster chambers of $\mathfrak{D}_{\mathbf{s}_{\sigma}}$ and $\mathfrak{D}_{\mathbf{s}_{\sigma'}}$.

%We compactly sketch the argument of Construction 4.1 of \cite{GHKK}, which holds in our setting with some modification of the proofs. Given a seed $\mathbf{s}$, we construct a space $\mathcal{A}_{\textrm{scat},\mathbf{s}}$ using the positive chambers $\sigma \in \Delta_\mathbf{s}^+$. For  distinct $\sigma, \sigma' \in \Delta_\mathbf{s}^+$, there exists a path $\gamma$ from $\sigma'$ to $\sigma$. This path gives an automorphism $\mathfrak{p}_{\gamma,\mathfrak{D}_\mathbf{s}}: \widehat{\Bbbk[P]} \rightarrow \widehat{\Bbbk[P]}$ which depends only on the choice of $\sigma$ and $\sigma'$. For each chamber in $\Delta_\mathbf{s}^+$, attach a copy of the torus $T_{N^\circ,\sigma} := T_{N^\circ}$. The path $\gamma$ can be chosen to lie in the support of the cluster complex so the wall-crossing automorphisms attached to walls crossed by $\gamma$ are birational maps of $T_{N^\circ}$. The path-ordered product $\mathfrak{p}_{\gamma,\mathfrak{D}_\mathbf{s}}$ is a well-defined map of fields of fractions $\mathfrak{p}_{\gamma,\mathfrak{D}_\mathbf{s}}: \Bbbk(M^\circ) \rightarrow \Bbbk(M^\circ)$ which induces a positive birational map $\mathfrak{p}_{\sigma,\sigma'}:T_{N^\circ,\sigma} \rightarrow T_{N^\circ,\sigma'}$.

%The space $\mathcal{A}_{\textrm{scat},\mathbf{s}}$ is constructed by gluing the collection of tori $\{ T_{N^\circ,\sigma} \}_{\sigma \in \Delta_\mathbf{s}^+}$ using the birational maps $\{ \mathfrak{p}_{\sigma,\sigma'} \}_{\sigma,\sigma' \in \Delta_{\mathbf{s}}^+}$ via the method described in Proposition 2.4 of \cite{GHK}, cf.\ Section 4 of \cite{GHKK}. For any two vertices $v$ and $v'$ of $\mathfrak{T}_{\mathbf{s}}$, one can construct an isomorphism between $\mathcal{A}_{\textrm{scat},\mathbf{s}_v}$ and $\mathcal{A}_{\textrm{scat},\mathbf{s}_{v'}}$. Hence, the variety $\mathcal{A}_{\textrm{scat}}$ can be viewed as independent of the choice of seed within a particular mutation class. One can also verify that $\mathcal{A}_{\mathbf{s}}$ is independent of the choice of seed within a particular mutation class.

%\begin{prop}[Analog of Proposition 4.3 of \cite{GHKK}]
%\label{prop:A_scatIso}
%Let $\mathbf{s}$ be a seed, $v$ be the root of $\mathfrak{T}_\mathbf{s}$, and $v'$ be any other vertex of $\mathfrak{T}_\mathbf{s}$. Let $\mu_{v',v}^T : M^\circ_{v'} \rightarrow M_v^\circ$ be the Fock--Goncharov tropicalization of $\mu_{v',v}:T_{M^\circ,v'} \rightarrow T_{M^\circ,v}$. The restriction $\left.\mu_{v',v}^T\right|_{\sigma'} : M^\circ_{\sigma'} \rightarrow M^\circ_{\sigma}$ to each cluster chamber $\sigma'$ of $\Delta^+_{\mathbf{s}_{v'}}$ gives a linear isomorphism from $\sigma'$ to the corresponding cluster chamber $\sigma := \mu^T_{v',v}(\sigma')$ in $\Delta^+_\mathbf{s}$ and induces an isomorphism
%$ T_{v',\sigma} : T_{N^\circ,\sigma} \rightarrow T_{N^\circ,\sigma'}$. When $\sigma$ ranges across all the cluster chambers of $\Delta^+_{\mathbf{s}_v}$, the isomorphisms $T_{v',\sigma}$ glue together to yield an isomorphism between $\mathcal{A}_{\textrm{scat},\mathbf{s}_v}$ and $\mathcal{A}_{\textrm{scat},\mathbf{s}_{v'}}$.
%\end{prop}

%Now, we identify $\mathcal{A}_{\textrm{scat}}$ with $\mathcal{A}$. 
%Doing so requires considering a more redundant atlas for $\mathcal{A}_{\textrm{scat},\mathbf{s}}$ than the one parameterized by the chambers of $\Delta_{\mathbf{s}}^+$,  which was just discussed.
%Each vertex $v$ of $\mathfrak{T}_\mathbf{s}$ has an associated cluster chamber $\mathcal{C}_v^+ \in \Delta_\mathbf{s}^+$. We construct a more redundant atlas for $\mathcal{A}_{\textrm{scat},\mathbf{s}}$ which is indexed by $v \in \mathfrak{T}_\mathbf{s}$ by equating $T_{N^\circ,v}$ with $T_{N^\circ,\mathcal{C}_v^+}$. Because $\mathfrak{T}_\mathbf{s}$ may have repeated vertices, this atlas may contain many copies of the same open set. Despite this repetition, however, the open sets and gluing maps are the same as in the original atlas. Hence,

%\begin{theorem}[Analogue of Theorem 4.4 of \cite{GHKK}]
%\label{theorem:AscatCommuteMutation}
%For a given generalized torus seed $\mathbf{s}$, let $v$ denote the root of $\mathfrak{T}_\mathbf{s}$ and $v'$ denote some arbitrary other vertex. Let $\phi_{v,v'}^*: M_{v'}^{\circ} \rightarrow M_{v'}^{\circ}$ be the linear map $\left.\mu_{v,v'}^T\right|_{\mathcal{C}^+_{v' \in \mathbf{s}}}$ and $\phi_{v,v'}:T_{N^{\circ},v'} \rightarrow T_{N^{\circ},v'}$ be the map between the associated tori. Then the collection $\{ \phi_{v,v'} \}_{v'}$ glue to give an isomorphism $\mathcal{A}_\mathbf{s} := \bigcup_{v'} T_{N^{\circ}} \rightarrow \mathcal{A}_{\textrm{scat},\mathbf{s}} := \bigcup_{v'} T_{N^{\circ},v'}$
%and the diagram
%\begin{center}
%    \begin{tikzcd}
%        \mathcal{A}_\mathbf{s} \arrow[r] \arrow[d] & \mathcal{A}_{\textrm{scat},\mathbf{s}} \arrow[d] \\
%        \mathcal{A}_{\mathbf{s}_{v'}} \arrow[r] & \mathcal{A}_{\textrm{scat}, \mathbf{s}_{v'}}
%    \end{tikzcd}
%\end{center}
%commutes, where the horizontal maps are the %isomorphisms that were just defined, the right-hand vertical map is the isomorphism $T_{N^{\circ},\sigma\in\mathbf{s}} \rightarrow T_{N^{\circ},\sigma'\in\mathbf{s}_{v'}}$ induced by the Fock--Goncharov tropicalisation $\mu^T_{v',v}:M_{v'}^{\circ} \rightarrow M_v^{\circ}$ of $\mu_{v',v}:T_{M^{\circ},v'} \rightarrow T_{M^{\circ},v}$ and the left-hand map is the natural open immsersion $\mathcal{A}_{\mathbf{s}'} \hookrightarrow \mathcal{A}_\mathbf{s}$.
%\end{theorem}

%Theorem~\ref{theorem:AscatCommuteMutation} means  the cluster scattering diagram $\mathfrak{D}_{\mathbf{s}}$ can be used to construct the generalized cluster variety $\mathcal{A}_{\mathbf{s}}$ for the associated generalized cluster algebra. Similar arguments hold for $\mathcal{A}_{\mathbf{s}_{\textrm{prin}}}$ and $\mathcal{X}_{\mathbf{s}}$ via the appropriate scattering diagrams.
%A similar argument can be given for $\mathcal{A}_{\mathbf{s}_{\textrm{prin}}}$ in the principal coefficient case and for $\mathcal{X}_{\mathbf{s}}$ using $\mathcal{X}$-scattering diagrams.

%\acknowledgements{Acknowledgements}
\vspace{-\baselineskip}

%% if you use biblatex then this generates the bibliography
%% if you use some other method then remove this and do it your own way
\printbibliography

\newpage

\printendnotes

\end{document}
