\section{Introduction} \input{history} \subsection{Wall functions and the main theorem} Let $\FF$ be a field of characteristic zero, and let $X,Y$ be independent formal variables. A vector $(d,e)\in\ZZ_{\geq0}^2\setminus\{(0,0)\}$ is \emph{primitive} if $\gcd(d,e)=1$. For $G(z)\in1+z\FF[[z]]$, define an $\FF$-algebra automorphism of $\FF[[X,Y]]$ by \[ \theta_{(d,e),G}(X)=XG(X^dY^e)^{-e},\qquad \theta_{(d,e),G}(Y)=YG(X^dY^e)^d. \] The inverse uses $G^{-1}$ in place of $G$. These maps preserve the logarithmic two-form $dX/X\wedge dY/Y$, interpreted after inverting $X$ and $Y$. Products of automorphisms below mean composition, with the rightmost map applied first, and are completed with respect to total degree in $X,Y$. Fix polynomials \begin{equation}\label{eq:initial} P_1(X)=1+\sum_{s=1}^{a}w_sX^s,\qquad P_2(Y)=1+\sum_{h=1}^{b}v_hY^h, \qquad w_s,v_h\in\FF, \end{equation} where $a,b\geq1$ are degree bounds. Coefficients may vanish, including all the nonconstant coefficients of either polynomial. Write $w_0=v_0=1$, and extend these lists by zero beyond their respective bounds. Set \[ S=\theta_{(1,0),P_1},\qquad T=\theta_{(0,1),P_2}. \] The ordered-factorization theorem for the tropical vertex group gives unique series $G_{d,e}(z)\in1+z\FF[[z]]$, indexed by primitive $d,e>0$, such that \begin{equation}\label{eq:factorization} T^{-1}STS^{-1} =\prod_{\substack{d,e>0\\\gcd(d,e)=1}}^{\longrightarrow} \theta_{(d,e),G_{d,e}}. \end{equation} The factors act in increasing order of $e/d$, so they are written from right to left in that order. Modulo any fixed total degree the product is finite. This is the convention of~\cite[Section~1.3]{GP} and~\cite[Section~1.1]{BLM}. We call $G_{d,e}$ the wall function in direction $(d,e)$; a missing wall has function $1$. \begin{theorem}\label{thm:main} For every choice of \eqref{eq:initial} and every primitive pair $d,e>0$, the wall function $G_{d,e}(z)$ in \eqref{eq:factorization} is algebraic over $\FF(z)$. \end{theorem} Here algebraicity means that there exists a nonzero polynomial $A(z,Z)\in\FF[z,Z]$ with $A(z,G_{d,e}(z))=0$. The proof occupies Sections~\ref{sec:tight}--\ref{sec:algebraicity}. Taking $P_1=(1+X)^{\ell_1}$ and $P_2=(1+Y)^{\ell_2}$ gives the following answer to Kontsevich's question. \begin{corollary}\label{cor:KGP} For all positive integers $\ell_1,\ell_2$ and all primitive pairs $d,e>0$, the wall function $G_{d,e}(t^{d+e}x^dy^e)$ associated to $(1+tx)^{\ell_1},(1+ty)^{\ell_2}$ is algebraic over $\QQ(t,x,y)$. \end{corollary} \begin{proof} Apply Theorem~\ref{thm:main} over $\QQ$ and substitute $z=t^{d+e}x^dy^e$ in a nonzero polynomial relation. The monomial substitution is injective on $\QQ[z]$ and gives the required relation. \end{proof}