\begin{thm}\label{Pointwise Semi-Classical OT} There exists $C>0$ and $p_1\in \N$ such that for any $p\geq p_1$, any $x\in X$, and any $v\in (A^p)_x$,  one can find a global holomorphic section $a=a_{p,x,v}\in H^0(X,A^p)$ with
\begin{equation}\label{OT bound}
    a(x)=v,\quad |v|_{(h_0^A)^p}\leq \sup_X|a|_{(h_0^A)^p}\leq \left(1+\frac{C}{p}\right)|v|_{(h_0^A)^p},
\end{equation}
where $C=C(n,X,\omega)$ depends only on dimension $n$, manifold $X$, and K\"ahler form $\omega=c_1(A,h_0^A)$.
\end{thm}

\begin{thm}\label{quantization of MA energy} If $L$ is a big and semipositive line bundle on $X$, then for any  $u\in \PSH(X,\theta)\cap L^\infty$, we have
\[
\lim_{k\to\infty}E_k(u)=E_\theta(u).
\]
\end{thm}

\begin{equation}\label{MA envelope}
		P_\theta(f):=usc(\sup\{u\in \PSH(X,\theta):u\leq f\})
	\end{equation}

Given an ample line bundle \(L\) over a complex projective manifold \(X\), endowed with the Kähler form \(\omega\) polarized by \(L\), a central theme in Kähler geometry—first articulated by Yau \cite[p.~139]{Yau}—is the approximation of transcendental geometric objects on \((X,\omega)\) by asymptotic algebraic data coming from the powers \(L^k:=L^{\otimes k}\). This is the philosophy of \emph{Kähler quantization}.

The initial proposal is to approximate the infinite-dimensional space
\[
   \mathcal{H}_\omega := \{\,\phi\in C^\infty(X) : \omega + dd^c \phi > 0\,\}
\]
of Kähler potentials by the finite-dimensional spaces \(\mathcal{H}_k\) of positive Hermitian forms on \(H^0(X,L^k)\). Via the Kodaira embedding, elements of \(\mathcal{H}_k\) correspond to Fubini–Study metrics and thus form a distinguished  subspace of \(\mathcal{H}_\omega\). This was established in the seminal works of Tian \cite{Tian}, Bouche \cite{Bouche}, Ruan \cite{Ruan}, Catlin \cite{Catlin}, Zelditch \cite{Zelditch}, Lu \cite{Lu}, among many others, using asymptotics of the Bergman kernel (cf. Theorem~\ref{on diagonal Bergman kernel}).

Donaldson later proposed that not only the metrics but also the \emph{geometry} of \(\mathcal{H}_\omega\) should be captured by the finite-dimensional geometries of \(\mathcal{H}_k\) \cite[p.~483]{DonaldsonI}. This principle has since been realized in various settings and has had deep impacts on problems concerning canonical metrics and stability; see, for example, \cite{PS,SongZelditchqu,CS,BerndtssonProb,DLR,DonaldsonI,DonaldsonScalII,RTZ,Zhang} among a rapidly expanding body of literature. We refer to \cite{Mama} for a detailed exposition of some classical developments in this direction.

A natural question is whether this quantization picture extends beyond the ample case. This has become increasingly relevant in view of recent progress on canonical metrics in degenerate or singular settings \cite{BBJ,LTW,Li,DZ24,Dervan,Xu,PT25-1,PTT23,PT25-2}, where the positivity of \(L\)  only holds in a weak sense.  The present note fits into this broader direction, establishing a quantization result for Monge--Amp\`ere energy in big and semipositive setting.

\subsection*{Statement of Main Result}
We now describe our results, referring to  Section~\ref{finite energy space and weak geodesic} and Section~\ref{Bergman Measures, Positivity of Direct Images, and Equilibrium} for details. Let $L$ be holomorphic line bundle over a complex projective manifold $X$ of dimension $n$. We assume that $L$ is big and semipositive.  Let $h_0^L$ be a smooth metric on $L$ and let $\theta:=c_1(L,h_0^L)$ denote the Chern curvature of $h_0^L$ so that $\theta$ is a smooth semipositive $(1,1)$-form.

One of the difficulties in the degenerate setting is the lack of smooth potentials. Instead, we work with  the set of $\theta$-plurisubharmonic functions on $X$, denoted by $\PSH(X,\theta)$. This parametrizes singular hermitian metrics on $L$ whose curvature $\theta_u:=\theta+dd^cu$ is positive in the current sense. Following the pioneering work of Boucksom et al. \cite{BEGZ}, for $u\in \PSH(X,\theta)$, one can define the \textit{non-pluripolar Monge--Amp\`ere measure} $\theta_u^n$, which is a Borel measure on $X$ that puts no mass on pluripolar sets. Moreover, we denote by
\[
E_\theta:\PSH(X,\theta)\to [-\infty,\infty)
\]
the \textit{Monge--Amp\`ere energy} or \textit{Aubin--Yau energy}. It is the primitive of the Monge--Amp\`ere operator and plays an important role in the variational approach to canonical K\"ahler metrics.

On the other hand, let $K_X:=\Omega^{n,0}_X$ be the canonical bundle on $X$. For $k\in\mathbb N$, we consider the adjoint line bundle $L^k\otimes K_X$. For global sections $s_1,s_2\in H^0(X,L^k\otimes K_X)$, locally written  as
\[
s_j=\sigma_j\, dz_1\wedge \cdots \wedge dz_n,\quad j=1,2,
\]
where $\sigma_j$ are local holomorphic sections of $L^k$, we set
\[
\langle s_1,s_2\ra_{(h_0^L)^k}:=\langle \sigma_1,\sigma_2\ra_{(h_0^L)^k}\left(\frac{i}{2}\right)^n
dz_1\wedge d\bar{z}_1\wedge \cdots \wedge dz_n\wedge d\bar{z}_n,
\]
yielding  a smooth volume form on $X$. For a function $u:X\to [-\infty,\infty)$, we define the \textit{Hilbert norm}
\begin{equation}\label{Hilbert norm}
		(s_1,s_2)_{Hilb_k(u)}:=\int_X \langle s_1,s_2\ra_{(h_0^L)^k}e^{-ku},\quad k\in \mathbb N,
\end{equation}
for sections $s_1,s_2\in H^0(X,L^k\otimes K_X)$ such that \eqref{Hilbert norm} is finite. We say $u$ is \textit{admissible} if $Hilb_k(u)$ is finite on the whole space $H^0(X,L^k\otimes K_X)$ for any $k\in \mathbb N$. Clearly, any bounded function is admissible. For an admissible function $u$, we define the \textit{quantized Monge--Amp\`ere energy} by
\begin{equation}\label{quantized MA-intro}
    E_k(u):=-\frac{1}{kN_k}\log\left(\frac{\det Hilb_k(u)}{\det Hilb_k(0)}\right),
\end{equation}
which is first introduced by Donaldson \cite{DonaldsonScalII} (see also Berman–Boucksom \cite{BB10}).

Our main result is the  quantization of Monge--Amp\`ere energy in adjoint twisting.

The initial proposal is to approximate the infinite-dimensional space
\[
 \mathcal{H}_\omega := \{\,\phi\in C^\infty(X) : \omega + dd^c \phi > 0\,\}
\]
of Kähler potentials by the finite-dimensional spaces \(\mathcal{H}_k\) of positive Hermitian forms on \(H^0(X,L^k)\). Via the Kodaira embedding, elements of \(\mathcal{H}_k\) correspond to Fubini–Study metrics and thus form a distinguished subspace of \(\mathcal{H}_\omega\). This was established in the seminal works of Tian \cite{Tian}, Bouche \cite{Bouche}, Ruan \cite{Ruan}, Catlin \cite{Catlin}, Zelditch \cite{Zelditch}, Lu \cite{Lu}, among many others, using asymptotics of the Bergman kernel (cf. Theorem~\ref{on diagonal Bergman kernel}).

A natural question is whether this quantization picture extends beyond the ample case. This has become increasingly relevant in view of recent progress on canonical metrics in degenerate or singular settings \cite{BBJ,LTW,Li,DZ24,Dervan,Xu,PT25-1,PTT23,PT25-2}, where the positivity of \(L\) only holds in a weak sense. The present note fits into this broader direction, establishing a quantization result for Monge--Amp\`ere energy in big and semipositive setting.

\subsection*{Statement of Main Result}
We now describe our results, referring to Section~\ref{finite energy space and weak geodesic} and Section~\ref{Bergman Measures, Positivity of Direct Images, and Equilibrium} for details. Let $L$ be holomorphic line bundle over a complex projective manifold $X$ of dimension $n$. We assume that $L$ is big and semipositive. Let $h_0^L$ be a smooth metric on $L$ and let $\theta:=c_1(L,h_0^L)$ denote the Chern curvature of $h_0^L$ so that $\theta$ is a smooth semipositive $(1,1)$-form.

One of the difficulties in the degenerate setting is the lack of smooth potentials. Instead, we work with the set of $\theta$-plurisubharmonic functions on $X$, denoted by $\PSH(X,\theta)$. This parametrizes singular hermitian metrics on $L$ whose curvature $\theta_u:=\theta+dd^cu$ is positive in the current sense. Following the pioneering work of Boucksom et al. \cite{BEGZ}, for $u\in \PSH(X,\theta)$, one can define the \textit{non-pluripolar Monge--Amp\`ere measure} $\theta_u^n$, which is a Borel measure on $X$ that puts no mass on pluripolar sets. Moreover, we denote by
\[
E_\theta:\PSH(X,\theta)\to [-\infty,\infty)
\]
the \textit{Monge--Amp\`ere energy} or \textit{Aubin--Yau energy}. It is the primitive of the Monge--Amp\`ere operator and plays an important role in the variational approach to canonical K\"ahler metrics.

On the other hand, let $K_X:=\Omega^{n,0}_X$ be the canonical bundle on $X$. For $k\in\mathbb N$, we consider the adjoint line bundle $L^k\otimes K_X$. For global sections $s_1,s_2\in H^0(X,L^k\otimes K_X)$, locally written as
\[
s_j=\sigma_j\, dz_1\wedge \cdots \wedge dz_n,\quad j=1,2,
\]
where $\sigma_j$ are local holomorphic sections of $L^k$, we set
\[
\langle s_1,s_2\ra_{(h_0^L)^k}:=\langle \sigma_1,\sigma_2\ra_{(h_0^L)^k}\left(\frac{i}{2}\right)^n
dz_1\wedge d\bar{z}_1\wedge \cdots \wedge dz_n\wedge d\bar{z}_n,
\]
yielding a smooth volume form on $X$. For a function $u:X\to [-\infty,\infty)$, we define the \textit{Hilbert norm}
\begin{equation}\label{Hilbert norm}
 (s_1,s_2)_{Hilb_k(u)}:=\int_X \langle s_1,s_2\ra_{(h_0^L)^k}e^{-ku},\quad k\in \mathbb N,
\end{equation}
for sections $s_1,s_2\in H^0(X,L^k\otimes K_X)$ such that \eqref{Hilbert norm} is finite. We say $u$ is \textit{admissible} if $Hilb_k(u)$ is finite on the whole space $H^0(X,L^k\otimes K_X)$ for any $k\in \mathbb N$. Clearly, any bounded function is admissible. For an admissible function $u$, we define the \textit{quantized Monge--Amp\`ere energy} by
\begin{equation}\label{quantized MA-intro}
 E_k(u):=-\frac{1}{kN_k}\log\left(\frac{\det Hilb_k(u)}{\det Hilb_k(0)}\right),
\end{equation}
which is first introduced by Donaldson \cite{DonaldsonScalII} (see also Berman–Boucksom \cite{BB10}).

Our main result is the quantization of Monge--Amp\`ere energy in adjoint twisting.

\begin{equation}
    \frac{d}{dt}\Big|_{t=0}E_\theta(P_\theta(u+tf))=\frac{1}{\vol(\{\theta\})}\int_Xf\theta_u^n.
\end{equation}
\end{lem}
\section{Bergman Measures, Positivity of Direct Images, and Equilibrium}\label{Bergman Measures, Positivity of Direct Images, and Equilibrium}
\subsection*{Bergman Measure and Quantized Monge--Amp\`ere Energy}
Let $V$ be a finite-dimensional complex vector space of dimension $N$. We denote $\H_V$ by the space of positive-definite hermitian inner products on $V$. For $H,H'\in \H_V$, there exists an $H$-hermitian endomorphism $A\in \End(V)$ such that
\begin{equation}\label{transfer map}
(s_1,s_2)_{H'}=(e^As_1,s_2)_H,\quad s_1,s_2\in V.
\end{equation}

\begin{equation}\label{Hilbert norm}
		(s_1,s_2)_{Hilb_k(u)}:=\int_X \la s_1,s_2\ra_{(h_0^L)^k}e^{-ku},\quad k\in \N,
\end{equation}

\begin{equation}\label{volume of a line bundle}
		\vol(\{L\})=\limsup_{k\to\infty}\frac{\dim_\C H^0(X,L^k)}{k^n/n!},
	\end{equation}
	which we  denote by $\vol(L)$. Hence, $L$ is big iff the right-hand side of \eqref{volume of a line bundle} is positive and furthermore $\limsup$ in \eqref{volume of a line bundle} is actually a limit by a Theorem of Fujita \cite{Fujita} (see also  \cite[\S 2.2C]{LazarsfeldI}).

\subsection*{Finite Energy Space and Weak Geodesics}\label{finite energy space and weak geodesic}
	Let $\theta$ be a closed, smooth $(1,1)$-form so that $\{\theta\}$ is big. If $u\in\PSH(X,\theta)$ has minimal singularity type, then we define \textit{Monge--Amp\`ere energy} by
	\begin{equation}\label{MA energy}
	E_\theta(u):=\frac{1}{(n+1)\vol(\{\theta\})}\sum_{j=0}^n\int_X (u-V_\theta) \theta_u^j\wedge \theta^{n-j}_{V_\theta}
	\end{equation}

\begin{equation}\label{on diagonal Bergman kernel}
K_p(x):=K_p(x,x)=\sum_{j=1}^{d_p}|S_j(x)|^2_{(h_0^A)^p}.
\end{equation}

Rescaling $w=\sqrt{k}z$ on the standard shrinking polydisc gives the uniform approximation
\[
k\Phi_\epsilon(w/\sqrt{k})
=\Phi_\epsilon^0(w)+\rho_k+\epsilon\widetilde\rho_k,
\qquad
\rho_k,\widetilde\rho_k\to0.
\]
Repeating the submean-value argument used for Theorem~\ref{Berman's local Morse inequality} then yields
\[
\frac{n!|s|^2(x)}{k^n\|s\|^2}
\le
e^{\rho_k+\epsilon\widetilde\rho_k}
\frac{n!dV_n}{(2\pi)^n\prod_{j=1}^n\int_0^{\log k} e^{-(\lambda_j+\epsilon)r^2}r\,dr}.
\]
Since the quadratic model satisfies $\lambda_j+\epsilon\ge\epsilon>0$, the Gaussian integrals in the denominator behave exactly as in the proof of Theorem~\ref{Berman's local Morse inequality}, with $\lambda_j$ replaced by $\lambda_j+\epsilon$.
Using the identity
\[
(\theta+\epsilon\omega)^n
= \frac{n!}{\pi^n}\!\left(\prod_{j=1}^n (\lambda_j+\epsilon)\right)dV_n,
\]
the same computation as in the untwisted case yields
\[
\frac{n!|s|^2(x)}{k^n\|s\|^2}
\;\le\;
e^{\rho_k+\epsilon\widetilde\rho_k}
\Biggl(\prod_{j=1}^n
 \frac{1}{1-e^{-(\lambda_j+\epsilon)(\log k)^2}}\Biggr)
(\theta+\epsilon\omega)^n(x)\leq {(1-e^{-\epsilon(\log k)^2})^n}(\theta+\epsilon\omega)^n(x),
\]
since $\lambda_j(x)+\epsilon\ge\epsilon$ for all $j$ and $x\in X$. \eqref{epsilon twisted local holomorphic morse} then follows from extremal characterization \eqref{extremal for twisted Bergman measure}.
\end{proof}
\section{Proof of Theorem \ref{quantization of MA energy} and Corollary \ref{convergence of Bergman measures}}
Recall that $X$ is a compact projective manifold of dimension $n$, $L$ be a big and semipositive line bundle over $X$ with fixed smooth metric $h_0^L$ on $L$ with Chern curvature form $\theta:=c_1(L,h^L_0)\geq 0$. Let us first deduce Corollary \ref{convergence of Bergman measures} from Theorem \ref{quantization of MA energy}.
\begin{proof}[Proof of Corollary \ref{convergence of Bergman measures}] For $f\in C^0(X)$ and $t\in \R$, $u+tf$ is bounded and thus is admissible. We set
\[
f_k(t):=E_k(u+tf),\quad g(t):=E_\theta(P_\theta(u+tf)).
\]
Notice that $u+tf\geq P_\theta(u+tf)\geq m:=\inf_X(u+tf)>-\infty$ by definition of envelope and thus, $P_\theta(u+tf)\in \PSH(X,\theta)\cap L^\infty$. By Theorem \ref{quantization of MA energy}, we obtain that for any $t\in \R$,
\[
\liminf_{k\to\infty}f_k(t)\geq \lim E_k(P_\theta(u+tf))=g(t),\quad \lim_{k\to\infty}f_k(0)=\lim_{k\to\infty}E_k(u)=E_\theta(u)=g(0).
\]
By Lemma \ref{variational formula for QMA along affine path}, $f_k(t)$ is concave and is differentiable at $t=0$:
\[
f_k'(0)=\int_X f\beta_{L^k,u}.
\]
On the other hand, by Lemma \ref{variation formula of MA energy}, $g(t)$ is differentiable at $t=0$ and
\[
g'(0)=\int_Xf\frac{\theta_u^n}{\vol(\{\theta\})}.
\]
The result follows from the elementary lemma proved in \cite[Lemma 3.1]{BBWN}.
\end{proof}
\begin{rmk}
 In fact, the arguments in Theorem \ref{upper bound estimate} below shows that $\lim_{k\to\infty}f_k(t)=g(t)$.
\end{rmk}

We now begin with the upper bound in Theorem \ref{quantization of MA energy} which holds for any finite-energy potentials.
\begin{thm}\label{upper bound estimate} For $u\in \E^1(X,\theta)$, $\limsup_{k\to\infty}E_k(u)\leq E_\theta(u)$.
\end{thm}
\begin{proof} The proof goes exactly as in \cite[Theorem 3.5]{BF14} and \cite[Theorem A]{BB10}. Since $u$ is upper semi-continuous, we can find a sequence $\phi_j\in C^\infty(X)$ such that $\phi_j\downarrow u$. Clearly, $\phi_j$ is admissible and $E_k(u)\leq E_k(\phi_j)$ by Lemma \ref{properties of Hilb and QMA} (ii). By Corollary \ref{Quantization of MOnge-Ampere energy for smooth functions},
\[
\limsup_{k\to\infty}E_k(u)\leq \lim_{k\to\infty}E_k(\phi_j)=E_\theta(P_\theta(\phi_j)),\quad \forall j\in \N.
\]
On the other hand, by definition of envelope, $u\leq P_\theta(\phi_j)\leq \phi_j$ and thus $P_\theta(\phi_j)\downarrow u$. Then
\[
\lim_{k\to\infty}E_k(u)\leq\lim_{j\to\infty}E_\theta(P_\theta(\phi_j))=E_\theta(u),
\]
by continuity of Monge--Amp\`ere energy along decreasing sequences.
\end{proof}
\begin{rmk} The proof actually shows that Theorem \ref{upper bound estimate} holds for any big and nef line bundle $L$.
\end{rmk}
\begin{proof}[Proof of Theorem \ref{quantization of MA energy}] It remains to prove that for any $u\in \PSH(X,\theta)\cap L^\infty$, we have
\begin{equation}\label{lower bound on energy}
 \liminf_{{k\to\infty}}E_k(u)\geq E_\theta(u).
\end{equation}
Following \cite{BF14}, we consider the following functional on $\E^1(X,\theta)$:
\[
\mathcal{F}_k(u):=E_k(u)-E_\theta(u),\quad u\in \E^1(X,\theta).
\]
By Lemma \ref{Properties on Energy and E1} (iii) and Lemma \ref{properties of Hilb and QMA} (ii), $\F_k$ is continuous along decreasing sequences in $\E^1(X,\theta)$. Also, by definition \eqref{MA energy} and Lemma \ref{properties of Hilb and QMA} (iii), $\F_k(u+C)=\F_k(u)$ for $C\in \R$. For fixed $u\in \PSH(X,\theta)\cap L^\infty$, we may assume that $u\leq 0$ by addition of a constant. By Lemma \ref{minimal singular/finite energy geodesic} (iii), $\dot{u}_0\in L^\infty(X)$.

Now, for fixed $\epsilon\in \Q^+$ and an positive line bundle $(A,h_0^A)$ with curvature $\omega$, we set $\omega_\epsilon:=\theta+\epsilon\omega$. By Theorem \ref{Bergman kernel comparison} and \eqref{epsilon twisted local holomorphic morse},
\[
\frac{1}{N_k}B_{L^k,0}\leq N_k^{-1}\left(1+\frac
{C}{\epsilon k}\right)^2B_{k,\epsilon}\leq \frac{k^n/n!}{N_k}\frac{e^{\rho_k+\epsilon\td{\rho}_k}}{(1-e^{-\epsilon(\log k)^2})^n}\omega_\epsilon^n
\]
As $\dot{u}_0\leq 0$, we obtain
\begin{equation}\label{key estimate}
\F_k(u)\geq \int_X\dot{u}_0\left(\left(1+\frac{C}{\epsilon k}\right)^2\frac{k^n/n!}{N_k}\frac{e^{\rho_k+\epsilon\td{\rho}_k}}{(1-e^{-\epsilon(\log k)^2})^n}\omega_\epsilon^n-\frac{1}{\vol L}\theta^n\right).
\end{equation}
Taking $k\to \infty$, we see that for fixed $\epsilon\in \Q^+$, since $\rho_k,\td{\rho}_k\to 0$ and from \eqref{volume of a line bundle} (since $L$ is big):
\[
1+\frac{C}{\epsilon k}\to 1,\quad \frac{k^n/n!}{N_k}\to \frac{1}{\vol L},\quad\frac{e^{\rho_k+\epsilon\td{\rho}_k}}{(1-e^{-\epsilon(\log k)^2})^n}\to 1.
\]
As a result, we obtain for fixed $\epsilon\in \Q^+$,
\[
\liminf_{k\to\infty}\F_k(u)\geq \frac{1}{\vol L}\int_X \dot{u}_0\left(\omega_\epsilon^n-\theta^n\right)=\frac{1}{\vol L}\sum_{j=1}^n\int_X\dot{u}_0\theta^{n-j}\wedge (\epsilon \omega)^j.
\]
Taking $\epsilon\to 0+$, we obtain the result.
\end{proof}\begin{rmk}\label{pitfall for finite energy potentials}
The argument proving \eqref{lower bound on energy} fails for general
\(u\in \mathcal{E}^1(X,\theta)\), since one cannot in general guarantee that the
initial tangent \(\dot u_0\) of the weak geodesic \(t\mapsto u_t\) in
\(\PSH(X,\theta)\) is integrable with respect to \(\omega_\epsilon^n\) in
\eqref{key estimate}, even for arbitrarily small \(\epsilon>0\). One obstruction comes from a counterexample of Di Nezza
\cite[Example 4.5]{DN15}, which shows that for any \(\epsilon>0\),
\[
\mathcal{E}^1(X,\theta)\not\subset \mathcal{E}^1(X,\omega_\epsilon),
\]
Indeed, let \(u\in \mathcal{E}^1(X,\theta)\setminus
\mathcal{E}^1(X,\omega_\epsilon)\) with \(u\le0\). From
\(\PSH(X,\theta)\subset \PSH(X,\omega_\epsilon)\) and envelope definition of the weak geodesic, the weak geodesic
\(v_t\) joining \(0\) and \(u\) in \(\PSH(X,\omega_\epsilon)\) satisfies
\[
v_t \le u_t,\qquad t\in[0,1],
\]
by the envelope construction. Since \(u\notin \mathcal{E}^1(X,\omega_\epsilon)\), one can shows that
\[
\int_X \dot v_0\,\omega_\epsilon^n = -\infty.
\]
As \(u_t\) and \(v_t\) agree at the endpoints,
we get $
\dot u_0 \le \dot v_0 \le 0$. This implies that $\dot{u}_0\notin L^1(X,\omega_\epsilon^n)$ since
\[
\int_X \dot u_0\,\omega_\epsilon^n
 \;\le\; \int_X \dot v_0\,\omega_\epsilon^n
 \;=\; -\infty,
\]
Thus, a necessary condition for the integrability of \(\dot u_0\) is that
\(u\in \mathcal{E}^1(X,\omega_\epsilon)\). To author's current knowledge, we do not aware of any general sufficient condition.
\end{rmk}
\printbibliography

A result such as Theorem~\ref{quantization of MA energy} was raised as an open problem in Berman–Freixas i Montplet \cite[Remark~3.6]{BF14}, and our theorem provides a partial answer in the big and semipositive setting.
When $L$ is ample and no adjoint twisting is present, Donaldson \cite{DonaldsonScalII} first established the convergence for smooth Kähler potentials; this was later extended to continuous potentials by Berman–Boucksom \cite[Theorem~A]{BB10} and to all finite-energy potentials by Darvas–Lu–Rubinstein \cite{DLR}.
In the adjoint setting, Berman–Freixas i Montplet \cite[Theorem~3.5]{BF14} proved the quantization of energy for finite-energy potentials, and subsequently Darvas–Xia \cite{DX22} obtained the result for arbitrary twisting.
In the big, untwisted case, Berman–Boucksom \cite[Theorem~A]{BB10} showed convergence for all continuous metrics.
More recently, Darvas–Xia \cite{DX24} proved a “partial quantization’’ theorem for continuous metrics under arbitrary twisting on a pseudoeffective line bundle.

Theorem \ref{quantization of MA energy} has an immediate application to quantization of non-pluripolar measure. For an admissible $u$, we fix a basis $\{S_1,\dots,S_{N_k}\}$ of $H^0(X,L^k\otimes K_X)$ with $N_k=\dim_\mathbb C H^0(X,L^k\otimes K_X)$. Then we define \textit{Bergman measure} and its normalization by
	\begin{equation}\label{Bergman measure}
	B_{L^k,u}(x)=\sum_{j=1}^{N_k}|S_j(x)|^2_{(h_u^L)^k}=\sum_{j=1}^{N_k}|S_j(x)|^2_{(h_0^L)^k}e^{-ku(x)},\quad \beta_{L^k,u}=\frac{1}{N_k}B_{L^k,u}.
	\end{equation}
Coupling with  a standard trick in Berman--Boucksom--Witt Nystr\"om \cite{BBWN}, Theorem \ref{quantization of MA energy} yields the following weak convergence of normalized Bergman measures to non-pluripolar measures
\begin{cor}\label{convergence of Bergman measures}  Let $u\in \PSH(X,\theta)\cap L^\infty(X)$. Then $\beta_{L^k,u}$ converges weakly to non-pluripolar measure $\frac{1}{\vol L}\theta_{u}^n$ as $k\to\infty$, where $\vol L$ is the volume of the line bundle $L$, see \eqref{volume of a line bundle}.
\end{cor}
Our approach refines the arguments in \cite{BF14} as follows. Fix an ample line bundle $A$ on $X$ and $\varepsilon\in \mathbb Q^+$. We prove a comparison Theorem for Bergman measure to $L$ and to small ample twist $L\otimes A^\varepsilon$ with almost optimal asymptotic bound (Theorem \ref{Bergman kernel comparison}). This allows us to apply Berman's local Morse inequality \cite[Proposition 2.5]{BF14} to the twisted bundle with explicit dependence on $\varepsilon$, see  \eqref{epsilon twisted local holomorphic morse}. Combining this with the standard variational relations between the Monge–Ampère energy and non-pluripolar measures, the quantized energy and Bergman measures, and the convexity of the quantized Monge–Ampère energy along weak geodesics,  we can carry out the proof of Theorem \ref{quantization of MA energy} for bounded potentials following standard argument as in \cite[Theorem A]{BB10} and \cite[Theorem 3.5]{BF14}. However, as we will explain in Remark \ref{pitfall for finite energy potentials}, our method does not presently extend to arbitrary finite-energy potentials, due to integrability issues for initial tangent vectors of weak geodesics.

As this work was being finalized, Siarhei Finski kindly informed us of his related work \cite{FinskiBig}, in which he quantizes the Darvas–Mabuchi $d_p$ distances on big line bundles and for potentials of the type $P_\theta(f)$ (defined below \ref{MA envelope}), where $f$ is continuous. In particular, for $p=1$ and $\theta$ semipositive, his result implies the version of Theorem~\ref{quantization of MA energy} for such potentials,  a subset of the class $\PSH(X,\theta)\cap L^\infty$. Our setting and approach differ from his in two main aspects. His quantization is formulated using the untwisted section spaces $H^0(X,L^k)$, whereas we work in the adjoint setting. This allows us to apply the Berndtsson–P\u{a}un positivity theorem directly. Additionally, he reduces the problem to the ample case via passing to certain birational models over $X$, while our reduction is by twisting $L^k\otimes K_X$ by an ample line bundle on $X$ as explained above.

\subsection*{Organization}
We briefly describe the structure of the paper.

In Section~2 we collect the necessary background from pluripotential theory,  following \cite{BEGZ,BBGZ,DDL18,DDL18L1}. We also recall the basic variational formulas for \(E_\theta\).

Section~3 is devoted to Bergman measures and quantized Monge--Amp\`ere energies in the adjoint setting. We prove basic properties of $B_{L^k,u}$ and $E_k(u)$ and discuss their variational formula. Next, we recall the positivity of direct images à la Berndtsson–P\u{a}un \cite{BerndtssonPositivity1,BerndtssonPositivity2,BP08,PT18} and the relation with convexity of $E_k$ along weak geodesics. Finally, we recall Berman’s local holomorphic Morse inequalities and the convergence of Bergman measures at equilibrium, adapting the arguments of \cite{Ber09,BB10} to our adjoint framework.

Section 4 is the new input in our argument.  We prove the the comparison Theorem  (Theorem \ref{Bergman kernel comparison}).    This follows from choosing peak sections with asymptotically optimal $L^\infty$-control from a pointwise semi-classical Ohsawa--Takegoshi type extension theorem for powers of an ample line bundle (Theorem \ref{Pointwise Semi-Classical OT}). We also discuss the relation of Theorem \ref{Pointwise Semi-Classical OT} with recent work of Finski \cite[Theorem 1.10]{Finski1}. We also present a  local Morse inequality in ample twisting setting.

Finally, in Section~5 we combine these ingredients to prove Theorems~\ref{quantization of MA energy} and Corollary  \ref{convergence of Bergman measures} and conclude with obstacles to aribtrary finite-energy potentials in Remark \ref{pitfall for finite energy potentials}.
\subsection*{Acknowledgment}  This work was supported by NSF Grant DMS-2405274 and the Hauptman Fellowship. The author is deeply grateful to his advisor, Tamás Darvas, for his constant support and guidance. The author also wishes to thank Siarhei Finski for his enlightening lecture and discussions at the summer school at the Rényi Institute, Budapest, and for kindly sharing his preprint \cite{FinskiBig} along with related insights.

Fix an ample line bundle $A$ on $X$ and $\varepsilon\in\mathbb Q^+$. The approach is to (i) prove a comparison theorem for Bergman measures for $L$ versus the small ample twist $L\otimes A^\varepsilon$ with an almost optimal asymptotic bound (Theorem~\ref{Bergman kernel comparison}); (ii) use this to apply Berman's local Morse inequality to the twisted bundle with explicit dependence on $\varepsilon$ (see \eqref{epsilon twisted local holomorphic morse}); (iii) combine this with “the standard variational relations between the Monge–Ampère energy and non-pluripolar measures, the quantized energy and Bergman measures,” together with “the convexity of the quantized Monge–Ampère energy along weak geodesics,” to “carry out the proof of Theorem~\ref{quantization of MA energy} for bounded potentials following standard argument as in \cite[Theorem A]{BB10} and \cite[Theorem 3.5]{BF14}.” The method is noted not to extend to arbitrary finite-energy potentials because of “integrability issues for initial tangent vectors of weak geodesics” (Remark~\ref{pitfall for finite energy potentials}).

Fix an ample line bundle $A$ on $X$ and $\varepsilon\in\mathbb Q^+$. The approach is to (i) prove a comparison theorem for Bergman measures for $L$ versus the small ample twist $L\otimes A^\varepsilon$ with an almost optimal asymptotic bound. We first prove the following theorem.

\begin{thm}\label{Bergman kernel comparison} For $\epsilon\in \Q^+$ and admissible $u$, and for sufficiently divisible $k\gg 1$, we have
\[
B_{L^k,u}\leq \left(1+\frac{C}{\epsilon k}\right)^2B_{(L\otimes A^{\epsilon})^k,u},
\]
where $C=C(n,X,\omega)$ depends only on dimension $n$, manifold $X$, and K\"ahler form $\omega=c_1(A,h_0^A)$.
\end{thm}

(ii) use this to apply Berman's local Morse inequality to the twisted bundle with explicit dependence on $\varepsilon$, namely
\begin{equation}\label{epsilon twisted local holomorphic morse}
    \frac{n!}{k^n}B_{k,\epsilon}\leq \frac{e^{\rho_k+\epsilon\td{\rho}_k}}{(1-e^{-\epsilon(\log k)^2})^n}(\theta+\epsilon\omega)^n,
\end{equation}

(iii) combine this with “the standard variational relations between the Monge–Ampère energy and non-pluripolar measures, the quantized energy and Bergman measures,” together with “the convexity of the quantized Monge–Ampère energy along weak geodesics,” to carry out the proof of the main theorem for bounded potentials following the standard argument as in Berman–Boucksom, Theorem A in \cite[Theorem A]{BB10} and Berman–Fujita, Theorem 3.5 in \cite[Theorem 3.5]{BF14}.

The method is noted not to extend to arbitrary finite-energy potentials because of “integrability issues for initial tangent vectors of weak geodesics.” More precisely:

\begin{rmk}\label{pitfall for finite energy potentials}
The argument proving \eqref{lower bound on energy} fails for general
\(u\in \mathcal{E}^1(X,\theta)\), since one cannot in general guarantee that the
initial tangent \(\dot u_0\) of the weak geodesic \(t\mapsto u_t\) in
\(\PSH(X,\theta)\) is integrable with respect to \(\omega_\epsilon^n\) in
\eqref{key estimate}, even for arbitrarily small \(\epsilon>0\). One obstruction comes from a counterexample of Di Nezza
\cite[Example 4.5]{DN15}, which shows that for any \(\epsilon>0\),
\[
\mathcal{E}^1(X,\theta)\not\subset \mathcal{E}^1(X,\omega_\epsilon),
\]
Indeed, let \(u\in \mathcal{E}^1(X,\theta)\setminus
\mathcal{E}^1(X,\omega_\epsilon)\) with \(u\le0\). From
\(\PSH(X,\theta)\subset \PSH(X,\omega_\epsilon)\) and envelope definition of the weak geodesic, the weak geodesic
\(v_t\) joining \(0\) and \(u\) in \(\PSH(X,\omega_\epsilon)\) satisfies
\[
v_t \le u_t,\qquad t\in[0,1],
\]
by the envelope construction. Since \(u\notin \mathcal{E}^1(X,\omega_\epsilon)\), one can  shows that
\[
\int_X \dot v_0\,\omega_\epsilon^n = -\infty.
\]
As \(u_t\) and \(v_t\) agree at the endpoints,
we get $
\dot u_0 \le \dot v_0 \le 0$. This implies that $\dot{u}_0\notin L^1(X,\omega_\epsilon^n)$ since
\[
\int_X \dot u_0\,\omega_\epsilon^n
   \;\le\; \int_X \dot v_0\,\omega_\epsilon^n
   \;=\; -\infty,
\]
Thus, a necessary condition for the integrability of \(\dot u_0\) is that
\(u\in \mathcal{E}^1(X,\omega_\epsilon)\). To author's current knowledge, we do not aware of any  general sufficient condition.
\end{rmk}

\label{quantization of MA energy} If $L$ is a big and semipositive line bundle on $X$, then for any  $u\in \PSH(X,\theta)\cap L^\infty$, we have
\[
\lim_{k\to\infty}E_k(u)=E_\theta(u).
\],

Question:
Let $X$ be a complex projective manifold, let $L$ be a big and semipositive holomorphic line bundle on $X$, and choose a smooth Hermitian metric $h_0^L$ on $L$ with semipositive Chern curvature $\theta:=c_1(L,h_0^L)$. For $u\in \PSH(X,\theta)\cap L^\infty(X)$, where $\PSH(X,\theta)$ denotes the $\theta$-plurisubharmonic functions (so $\theta+dd^c u\ge 0$ in the sense of currents), define for each $k\in\mathbb N$ the Hilbert norm on $H^0(X,L^k\otimes K_X)$ by
\[
(s_1,s_2)_{\mathrm{Hilb}_k(u)}:=\int_X \langle s_1,s_2\rangle_{(h_0^L)^k}e^{-ku},
\]
and the quantized Monge--Amp\`ere energy by
\[
E_k(u):=-\frac{1}{kN_k}\log\left(\frac{\det \mathrm{Hilb}_k(u)}{\det \mathrm{Hilb}_k(0)}\right),
\]
where $N_k=\dim_\mathbb C H^0(X,L^k\otimes K_X)$. Let $E_\theta(u)$ denote the Monge--Amp\`ere (Aubin--Yau) energy on $\PSH(X,\theta)$, i.e. the primitive of the non-pluripolar Monge--Amp\`ere operator. Under these assumptions, which statement about $E_k(u)$ holds as $k\to\infty$?

One has
\[
\lim_{k\to\infty} E_k(u)=E_\theta(u).
\]

Choices:
B.
One has
\[
\limsup_{k\to\infty} E_k(u)\le E_\theta(u),
\]
and in fact equality holds only when the semipositive form \(\theta\) is K\"ahler.
C.
One has
\[
\limsup_{k\to\infty} E_k(u)\le E_\theta(u).
\]
D.
For every \(u\in \PSH(X,\theta)\cap L^\infty(X)\), there exists a subsequence \(k_j\to\infty\) such that
\[
\lim_{j\to\infty} E_{k_j}(u)=E_\theta(u),
\]
and the convergence is uniform in \(u\) over bounded subsets of \(\PSH(X,\theta)\cap L^\infty(X)\).
\]
E.
If \(L\) is big and semipositive, then for any \(u\in \PSH(X,\theta)\cap \mathcal E^1(X,\theta)\), one has
\[
\lim_{k\to\infty} E_k(u)=E_\theta(u).
\]

full limit equality weakened to upper-bound asymptotics

pointwise convergence upgraded to uniform-in-u subsequential convergence

boundedness hypothesis replaced by finite-energy class

The stem gives definitions and setup but does not reveal the asymptotic conclusion. The correct convergence statement is not stated or strongly hinted at.

The correct option is essentially the standard theorem statement in this setting, so the item is close to theorem recall. However, it is not a pure restatement because the alternatives include stronger, weaker, and misdirected variants.

Some reasoning is needed to distinguish the exact theorem from nearby false or weaker claims, especially regarding boundedness, identification of the limit, and uniform rates. Still, the item primarily tests recognition of the precise statement rather than deeper derivation.

The distractors are mathematically plausible and target common errors: overgeneralizing the class of potentials, settling for a weaker convergence claim, asserting an unjustified uniform O(1/k) rate, or confusing the limiting energy functional.

A solid theorem-recognition MCQ with strong distractors and no answer leakage, but it leans more toward precise recall than genuinely generative reasoning.


Question:
Let $X$ be a complex projective manifold, let $L$ be a big and semipositive holomorphic line bundle on $X$, and choose a smooth Hermitian metric $h_0^L$ on $L$ with semipositive Chern curvature $\theta:=c_1(L,h_0^L)$. For $u\in \PSH(X,\theta)\cap L^\infty(X)$, where $\PSH(X,\theta)$ denotes the $\theta$-plurisubharmonic functions (so $\theta+dd^c u\ge 0$ in the sense of currents), define for each $k\in\mathbb N$ the Hilbert norm on $H^0(X,L^k\otimes K_X)$ by
\[
(s_1,s_2)_{\mathrm{Hilb}_k(u)}:=\int_X \langle s_1,s_2\rangle_{(h_0^L)^k}e^{-ku},
\]
and the quantized Monge--Amp\`ere energy by
\[
E_k(u):=-\frac{1}{kN_k}\log\left(\frac{\det \mathrm{Hilb}_k(u)}{\det \mathrm{Hilb}_k(0)}\right),
\]
where $N_k=\dim_\mathbb C H^0(X,L^k\otimes K_X)$. Let $E_\theta(u)$ denote the Monge--Amp\`ere (Aubin--Yau) energy on $\PSH(X,\theta)$, i.e. the primitive of the non-pluripolar Monge--Amp\`ere operator. Under these assumptions, which statement about $E_k(u)$ holds as $k\to\infty$?

Choices:
B.
One has
\[
\limsup_{k\to\infty} E_k(u)\le E_\theta(u),
\]
and in fact equality holds only when the semipositive form \(\theta\) is K\"ahler.
C.
One has
\[
\limsup_{k\to\infty} E_k(u)\le E_\theta(u).
\]
D.
For every \(u\in \PSH(X,\theta)\cap L^\infty(X)\), there exists a subsequence \(k_j\to\infty\) such that
\[
\lim_{j\to\infty} E_{k_j}(u)=E_\theta(u),
\]
and the convergence is uniform in \(u\) over bounded subsets of \(\PSH(X,\theta)\cap L^\infty(X)\).
\]
E.
If \(L\) is big and semipositive, then for any \(u\in \PSH(X,\theta)\cap \mathcal E^1(X,\theta)\), one has
\[
\lim_{k\to\infty} E_k(u)=E_\theta(u).
\]

The stem gives definitions and hypotheses but does not explicitly reveal the asymptotic conclusion. There is no direct answer leakage.

The item is very close to asking for the exact theorem statement, so it mostly tests recall of the known conclusion rather than deriving a new consequence. The presence of nearby variants prevents it from being a pure verbatim restatement.

Some reasoning is needed to distinguish the exact convergence statement from stronger or weaker variants, but this is limited. Moreover, choice C is also true if A is true, so the question does not cleanly force a uniquely reasoned selection.

Several distractors are mathematically plausible and reflect common theorem-tampering patterns (extra Kahler assumption, weaker limsup statement, stronger uniformity, larger function class). However, C is a genuinely true weaker statement, so the distractor set is ambiguous rather than cleanly single-answer.

Moderate-quality MCQ: no answer leakage and some plausible variants, but it is close to theorem recall and is weakened by ambiguity because a weaker true option is also present.


\begin{tikzpicture}[
    level 1/.style = {sibling distance=6cm},
    level 2/.style = {sibling distance=3cm},
    level 3/.style = {sibling distance=1.5cm},
    level distance          = 1cm,
    edge from parent/.style = {draw},
    scale=1.2
    ]

    \node {$\frac{x}{x+1}$}
    child{
      node {$\frac{x}{x+2}$}
      child{
        node {$\frac{x}{x+3}$}
        child{
          node {$\frac{x}{x+4}$}
        }
        child{
          node {$\frac{x+3}{x+4}$}
        }
      }
      child{
        node {$\frac{x+2}{x+3}$}
        child{
          node {$\frac{x^2+2x}{x^2+4x+2}$}
        }
        child{
          node {$\frac{x^2+3x}{x^2+4x+2}$}
        }
      }
    }
    child{
      node {$\frac{x+1}{x+2}$}
      child{
        node {$\frac{x^2+x}{x^2+3x+1}$}
        child{
          node {$\frac{x^2+x}{x^2+4x+2}$}
        }
        child{
          node {$\frac{x^2+3x+1}{x^2+4x+2}$}
        }
      }
      child{
        node {$\frac{x^2+2x}{x^2+3x+1}$}
        child{
          node {$\frac{x^2+2x}{x^2+4x+3}$}
        }
        child{
          node {$\frac{x^2+3x+1}{x^2+4x+3}$}
        }
      }
    };
\end{tikzpicture}

        \caption{The first four levels of the Farey polynomial tree.}\label{fig:FareyPoly}
    \end{center}
\end{figure}

We label each vertex in the tree with notation inspired by continued fractions. For $a_i \in \mathbb{Z}^+$:
\begin{equation}\label{eqn: vertex labels}
[a_1,a_2,\ldots,a_k]_x = \Phi_1^{a_1-1} \circ \Phi_0 \circ \Phi_1^{a_2-1} \circ \Phi_0 \circ \cdots \circ \Phi_1^{a_{k-1}-1}\circ \Phi_0 \circ \Phi_1^{a_k-1} \left( \frac{1}{1}\right)
\end{equation}

In this way the root of our tree is the vertex $[2]_x=[1,1]_x$, and in general $[a_1,\ldots,a_{k-1},a_k+1]_x=[a_1,\ldots,a_{k-1},a_k,1]_x$. Observe also that
\begin{align*}
    \Phi_0\left( [a_1,\ldots,a_k]_x\right) &= [1,a_1,\ldots,a_k]_x\\
    \Phi_1\left( [a_1,\ldots,a_k]_x\right) &= [a_1+1,a_2,\ldots,a_k]_x\\
\end{align*}The tree we present here has some very nice properties. We highlight some of them with the following two theorems; by ``subtree at vertex $[a_1,\ldots,a_k]_x$" we mean the tree generated by $\Phi_1$ and $\Phi_0$ rooted at vertex $[a_1,\ldots,a_k]_x$.

We have the following two main theorems.

\begin{theorem}\label{th:cfs}
For a fixed value of $x$, we consider the function which maps the tree to the set of values given by evaluating every vertex at this value of $x$.
    \begin{enumerate}
        \item Setting a value $x>0$ injectively maps the tree to a dense subset of $(0,1)$.
        \item Setting a value $x>0$ bijectively maps the tree to $\mathbb{Q} \cap (0,1)$ if and only if $x \in \mathbb{Z}^+$.
    \end{enumerate}
\end{theorem}
Note that from (1) in Theorem \ref{th:cfs} it follows that the rational functions in the tree don't intersect on $(0,\infty)$.

\begin{theorem}\label{th:dense}
    For the subtree $\Omega$ rooted at any vertex $[a_1,\ldots,a_k]_x$, if we set
    \[R=\left\{ x \, | \, \textrm{there is a } p(x)/q(x) \in \Omega \textrm{ for which }q(x)=0\right\}\]
    then $R$ is dense in $(-\infty,-1]$.
\end{theorem}

We begin \Cref{sec:cfs} with a derivation of this tree. For Theorem \ref{th:cfs} we use the close relationship between the tree and a family of continued fractions explained in Section \ref{sec:cfresults}. Theorem \ref{th:dense} is proven in \Cref{sec:dense} by inductively selecting a path in the tree whose vertices have poles converging to an arbitrary $\alpha<-1$; comments are included regarding the possibility of expanding this result to $\alpha \in (-1,0)$. A similar tree derived from the theory of backwards continued fractions is presented in \Cref{sec:other trees}.
We will see a similar behaviour in view of Theorem \ref{th:cfs} and a very different one in view of Theorem \ref{th:dense} for this tree.

\section{Forward Farey Tree}\label{sec:cfs}
\subsection{Background and Definition}
The \textit{Gauss map} $T:[0,1) \mapsto [0,1)$, given by
\[T(t) = \begin{cases}
    \frac{1}{t} - \floor{\frac{1}{t}} & t\neq 0\\
    0 & t=0,
\end{cases}\]
may be used to generate the \textit{regular continued fraction} expansion of $t$:
\[ t = \cfrac{1}{a_1+\cfrac{1}{a_2+\cfrac{1}{a_3+\ddots}}},\]
where $a_i =a(T^{i-1}(t))= \floor{1/T^{i-1}(t)}$. This map is the `sped-up' version of the \textit{Farey map} $F$, given by
\[ F(t) = \begin{cases}
    F_0(t) = \frac{1-t}{t} & x \geq 1/2\\
    F_1(t) = \frac{t}{1-t} & x \leq 1/2
\end{cases}\]
with the observation that
\begin{equation}\label{eqn: RCF functional}T(t) = F_0 \circ F_1 ^{a(t)-1} (t).\end{equation}
Note that $a(t)-1=\min(n\in\mathbb{N}_0 : T^n(t)\in [\frac{1}{2},1])$ i.e. it is first hitting time of $x$ to the interval $[\frac{1}{2},1]$ (possibly zero) and $T$ can be understood as the composition of $F_0$ and the induced transformation on this interval (where a return time of zero is allowed).

A generalization of regular continued fractions, $N$-continued fractions, allow for all numerators to be some fixed $N \in \mathbb{Z}\setminus\{0\}$. These were first studied in  \cite{AW11,BGRKWY208} and later in many other papers such as \cite{CK,DO18,DKW13,JKN,KL} . Most papers study positive values of $N$ and in the remainder of this section we will also take $N>0$. For negative $N$, there is a relation with the backward continued fractions in Section \ref{sec:other trees}. One of the key differences with regular continued fractions is that there is not a unique continued fraction for every $t\in(0,1)$. For some studied algorithms generating $N$-continued fractions it is proven that there are quadratic irrationals without periodic expansion (and even rationals with aperiodic expansions), see \cite{KL}. For the greedy $N$-continued fractions, which we have here, there is strong numeric evidence that there are quadratic irrationals with an aperiodic expansion (see \cite{DKW13}), though this problem is still open. The greedy $N$-continued fractions can be generated with a similar map as the Gauss map namely by \[ T_N(t) = \begin{cases}
   \left(\frac{N}{t}-N\right) - \floor{\frac{N}{t}-N} & t \neq 0\\
     0 & t=0,
\end{cases}\]
which generates
\[ t= \cfrac{N}{N+(a_1-1)+\cfrac{N}{N+(a_2-1)+\cfrac{N}{N+(a_3-1)+\ddots}}},\]
where now $a_i=a(N,t)= \floor{N/T_N^{i-1}(t)-N}+1$. Then $T_N(x)$ is a sped-up version of the associated $N$-Farey map
\[F_N(t) = \begin{cases}
    F_{N,0}(t) = \frac{N(1-t)}{t} &  t \geq \frac{N}{N+1} \\
    F_{N,1}(t) = \frac{Nt}{N-t} & t \leq \frac{N}{N+1}
\end{cases}\]
with the observation that
\begin{equation}\label{eqn: N-CF functional}T_N(t) = F_{N,0} \circ F_{N,1}^{a(N,t)-1}(t).\end{equation}
See Figure \ref{fig:Fareymap} (right) for an example of $N=2$. It is important to point out that this definition of $a_i=a(N,t)$ is not typical: more typical, e.g. in the above references for N-continued fractions, is that $a(N,t)=\floor{N/t}$ and $T_N(t)$ is equivalent but without the `$-N$' both inside and outside the integer part function. Our definition here differs only by an integer constant for $a$, is identical for $T_N$, gives a similar presentation between \Cref{eqn: RCF functional} and (\ref{eqn: N-CF functional}), and is what we will now generalize.

Note that from a dynamical point of view, there is no necessity of taking $N\in\mathbb{Z}^+$ in the definition of the map $F_N(t)$. To this end, let us define a map $F_x:[0,1]\rightarrow[0,1]$ with $x\in(0,\infty)$\footnote{note that for other values of $x$, we have that $\frac{x}{x+1}$ is not in $[0,1]$  and the map cannot be used to generate continued fractions.} as
\begin{equation}\label{eq:F_x}
  F_x(t)=
\begin{cases}
F_{x,0}(t)=\frac{x(1-t)}{t}   & t \geq \frac{x}{x+1}\\[1ex]
F_{x,1}(t)=\frac{xt}{x-t}, & t \leq \frac{x}{x+1},
\end{cases}
\end{equation}
see Figure \ref{fig:Fareymap} (left) for $x=1/3$.
\begin{figure}[ht]
		\centering

		\subfigure{\begin{tikzpicture}[scale=5]
				\draw[white] (-0.25,0)--(1,0);
				\draw(0,0)node[below]{\small $0$}--(1,0)node[below]{\small $1$}--(1,1)--(0,1)node[left]{\small $1$}--(0,0);

				\draw[thick, blue, smooth, samples =20, domain=1/4:1] plot(\x,{1/(3*\x)-1/3});
				\draw[thick,blue, smooth, samples =20, domain=0:1/4] plot(\x,{\x/(1-3*\x)});

				\draw[dotted](1/4,0)node[below]{\small $\frac{1}{4}$}--(1/4,1);

		\end{tikzpicture}

Let us first define the tree of interest which we will call the \textit{Farey polynomial tree} (an explanation of the derivation of this tree will be given in the beginning of \Cref{sec:cfs}). On the nodes we have rational functions $v(x)=p(x)/q(x)$. The root of the tree is $\frac{x}{x+1}$ and the two offspring of each node are found using the following two functions:
\begin{equation}\label{eqn: Phi}\begin{split}
\Phi_0\left( \frac{p(x)}{q(x)}\right) &= \begin{cases}
\frac{xq(x)}{xq(x)+p(x)} & p(0)\neq 0\\
\frac{q(x)}{q(x)+p(x)/x}& p(0)=0\end{cases}\\
\\
\Phi_1\left( \frac{p(x)}{q(x)}\right) &= \begin{cases}
\frac{xp(x)}{xq(x)+p(x)} & p(0)\neq 0\\
\frac{p(x)}{q(x)+p(x)/x}& p(0)=0.\end{cases}\end{split}\end{equation}

See Figure \ref{fig:FareyPoly} for the first few levels. These two functions are the inverse branches of a generalized Farey map and the tree generalizes the classical Farey tree which is found for $x=1$. Note that we define it by using inverse images of the Farey map and not by using mediants of neighboring fractions, but the trees are intimately related (see \cite{BI09}). The Farey tree is well studied and appears in many different branches of mathematics (see for example~\cite{AK22,BBDG24,BDM21,DKS25,DS07,KO86,LRS17} and the references therein). Curiously, Farey himself (a geologist) did not publish anything significant on the matter. It was Cauchy who proved one of the basic ideas of the Farey sequence and attributed it to Farey (see \cite[Notes on Chapter~3]{HW79}).

\begin{figure}[ht]
    \begin{center}

\begin{tikzpicture}[
    level 1/.style = {sibling distance=6cm},
    level 2/.style = {sibling distance=3cm},
    level 3/.style = {sibling distance=1.5cm},
    level distance          = 1cm,
    edge from parent/.style = {draw},
    scale=1.2
    ]

    \node {$\frac{x}{x+1}$}
    child{
      node {$\frac{x}{x+2}$}
      child{
        node {$\frac{x}{x+3}$}
        child{
          node {$\frac{x}{x+4}$}
        }
        child{
          node {$\frac{x+3}{x+4}$}
        }
      }
      child{
        node {$\frac{x+2}{x+3}$}
        child{
          node {$\frac{x^2+2x}{x^2+4x+2}$}
        }
        child{
          node {$\frac{x^2+3x}{x^2+4x+2}$}
        }
      }
    }
    child{
      node {$\frac{x+1}{x+2}$}
      child{
        node {$\frac{x^2+x}{x^2+3x+1}$}
        child{
          node {$\frac{x^2+x}{x^2+4x+2}$}
        }
        child{
          node {$\frac{x^2+3x+1}{x^2+4x+2}$}
        }
      }
      child{
        node {$\frac{x^2+2x}{x^2+3x+1}$}
        child{
          node {$\frac{x^2+2x}{x^2+4x+3}$}
        }
        child{
          node {$\frac{x^2+3x+1}{x^2+4x+3}$}
        }
      }
    };
\end{tikzpicture}

        \caption{The first four levels of the Farey polynomial tree.}\label{fig:FareyPoly}
    \end{center}
\end{figure}

We label each vertex in the tree with notation inspired by continued fractions. For $a_i \in \mathbb{Z}^+$:
\begin{equation}\label{eqn: vertex labels}
[a_1,a_2,\ldots,a_k]_x = \Phi_1^{a_1-1} \circ \Phi_0 \circ \Phi_1^{a_2-1} \circ \Phi_0 \circ \cdots \circ \Phi_1^{a_{k-1}-1}\circ \Phi_0 \circ \Phi_1^{a_k-1} \left( \frac{1}{1}\right)
\end{equation}

In this way the root of our tree is the vertex $[2]_x=[1,1]_x$, and in general $[a_1,\ldots,a_{k-1},a_k+1]_x=[a_1,\ldots,a_{k-1},a_k,1]_x$. Observe also that
\begin{align*}
    \Phi_0\left( [a_1,\ldots,a_k]_x\right) &= [1,a_1,\ldots,a_k]_x\\
    \Phi_1\left( [a_1,\ldots,a_k]_x\right) &= [a_1+1,a_2,\ldots,a_k]_x\\
\end{align*}The tree we present here has some very nice properties. We highlight some of them with the following two theorems; by ``subtree at vertex $[a_1,\ldots,a_k]_x$" we mean the tree generated by $\Phi_1$ and $\Phi_0$ rooted at vertex $[a_1,\ldots,a_k]_x$.

We have the following two main theorems.

Let us first define the tree of interest which we will call the \textit{Farey polynomial tree} (an explanation of the derivation of this tree will be given in the beginning of \Cref{sec:cfs}). On the nodes we have rational functions $v(x)=p(x)/q(x)$. The root of the tree is $\frac{x}{x+1}$ and the two offspring of each node are found using the following two functions:
\begin{equation}\label{eqn: Phi}\begin{split}
\Phi_0\left( \frac{p(x)}{q(x)}\right) &= \begin{cases}
\frac{xq(x)}{xq(x)+p(x)} & p(0)\neq 0\\
\frac{q(x)}{q(x)+p(x)/x}& p(0)=0\end{cases}\\
\\
\Phi_1\left( \frac{p(x)}{q(x)}\right) &= \begin{cases}
\frac{xp(x)}{xq(x)+p(x)} & p(0)\neq 0\\
\frac{p(x)}{q(x)+p(x)/x}& p(0)=0.\end{cases}\end{split}\end{equation}

See Figure \ref{fig:FareyPoly} for the first few levels. These two functions are the inverse branches of a generalized Farey map and the tree generalizes the classical Farey tree which is found for $x=1$. Note that we define it by using inverse images of the Farey map and not by using mediants of neighboring fractions, but the trees are intimately related (see \cite{BI09}). The Farey tree is well studied and appears in many different branches of mathematics (see for example~\cite{AK22,BBDG24,BDM21,DKS25,DS07,KO86,LRS17} and the references therein). Curiously, Farey himself (a geologist) did not publish anything significant on the matter. It was Cauchy who proved one of the basic ideas of the Farey sequence and attributed it to Farey (see \cite[Notes on Chapter~3]{HW79}).

\caption{The first four levels of the Farey polynomial tree.}\label{fig:FareyPoly}
 \end{center}
\end{figure}

We label each vertex in the tree with notation inspired by continued fractions. For $a_i \in \mathbb{Z}^+$:
\begin{equation}\label{eqn: vertex labels}
[a_1,a_2,\ldots,a_k]_x = \Phi_1^{a_1-1} \circ \Phi_0 \circ \Phi_1^{a_2-1} \circ \Phi_0 \circ \cdots \circ \Phi_1^{a_{k-1}-1}\circ \Phi_0 \circ \Phi_1^{a_k-1} \left( \frac{1}{1}\right)
\end{equation}

In this way the root of our tree is the vertex $[2]_x=[1,1]_x$, and in general $[a_1,\ldots,a_{k-1},a_k+1]_x=[a_1,\ldots,a_{k-1},a_k,1]_x$. Observe also that
\begin{align*}
 \Phi_0\left( [a_1,\ldots,a_k]_x\right) &= [1,a_1,\ldots,a_k]_x\\
 \Phi_1\left( [a_1,\ldots,a_k]_x\right) &= [a_1+1,a_2,\ldots,a_k]_x\\
\end{align*}The tree we present here has some very nice properties. We highlight some of them with the following two theorems; by ``subtree at vertex $[a_1,\ldots,a_k]_x$" we mean the tree generated by $\Phi_1$ and $\Phi_0$ rooted at vertex $[a_1,\ldots,a_k]_x$.

We have the following two main theorems.

\begin{theorem}\label{th:dense}
 For the subtree $\Omega$ rooted at any vertex $[a_1,\ldots,a_k]_x$, if we set
 \[R=\left\{ x \, | \, \textrm{there is a } p(x)/q(x) \in \Omega \textrm{ for which }q(x)=0\right\}\]
 then $R$ is dense in $(-\infty,-1]$.
\end{theorem}

\section{Forward Farey Tree}\label{sec:cfs}
\subsection{Background and Definition}
The \textit{Gauss map} $T:[0,1) \mapsto [0,1)$, given by
\[T(t) = \begin{cases}
 \frac{1}{t} - \floor{\frac{1}{t}} & t\neq 0\\
 0 & t=0,
\end{cases}\]
may be used to generate the \textit{regular continued fraction} expansion of $t$:
\[ t = \cfrac{1}{a_1+\cfrac{1}{a_2+\cfrac{1}{a_3+\ddots}}},\]
where $a_i =a(T^{i-1}(t))= \floor{1/T^{i-1}(t)}$. This map is the `sped-up' version of the \textit{Farey map} $F$, given by
\[ F(t) = \begin{cases}
 F_0(t) = \frac{1-t}{t} & x \geq 1/2\\
 F_1(t) = \frac{t}{1-t} & x \leq 1/2
\end{cases}\]
with the observation that
\begin{equation}\label{eqn: RCF functional}T(t) = F_0 \circ F_1 ^{a(t)-1} (t).\end{equation}
Note that $a(t)-1=\min(n\in\mathbb{N}_0 : T^n(t)\in [\frac{1}{2},1])$ i.e. it is first hitting time of $x$ to the interval $[\frac{1}{2},1]$ (possibly zero) and $T$ can be understood as the composition of $F_0$ and the induced transformation on this interval (where a return time of zero is allowed).

A generalization of regular continued fractions, $N$-continued fractions, allow for all numerators to be some fixed $N \in \mathbb{Z}\setminus\{0\}$. These were first studied in \cite{AW11,BGRKWY208} and later in many other papers such as \cite{CK,DO18,DKW13,JKN,KL} . Most papers study positive values of $N$ and in the remainder of this section we will also take $N>0$. For negative $N$, there is a relation with the backward continued fractions in Section \ref{sec:other trees}. One of the key differences with regular continued fractions is that there is not a unique continued fraction for every $t\in(0,1)$. For some studied algorithms generating $N$-continued fractions it is proven that there are quadratic irrationals without periodic expansion (and even rationals with aperiodic expansions), see \cite{KL}. For the greedy $N$-continued fractions, which we have here, there is strong numeric evidence that there are quadratic irrationals with an aperiodic expansion (see \cite{DKW13}), though this problem is still open. The greedy $N$-continued fractions can be generated with a similar map as the Gauss map namely by \[ T_N(t) = \begin{cases}
 \left(\frac{N}{t}-N\right) - \floor{\frac{N}{t}-N} & t \neq 0\\
 0 & t=0,
\end{cases}\]
which generates
\[ t= \cfrac{N}{N+(a_1-1)+\cfrac{N}{N+(a_2-1)+\cfrac{N}{N+(a_3-1)+\ddots}}},\]
where now $a_i=a(N,t)= \floor{N/T_N^{i-1}(t)-N}+1$. Then $T_N(x)$ is a sped-up version of the associated $N$-Farey map
\[F_N(t) = \begin{cases}
 F_{N,0}(t) = \frac{N(1-t)}{t} & t \geq \frac{N}{N+1} \\
 F_{N,1}(t) = \frac{Nt}{N-t} & t \leq \frac{N}{N+1}
\end{cases}\]
with the observation that
\begin{equation}\label{eqn: N-CF functional}T_N(t) = F_{N,0} \circ F_{N,1}^{a(N,t)-1}(t).\end{equation}
See Figure \ref{fig:Fareymap} (right) for an example of $N=2$. It is important to point out that this definition of $a_i=a(N,t)$ is not typical: more typical, e.g. in the above references for N-continued fractions, is that $a(N,t)=\floor{N/t}$ and $T_N(t)$ is equivalent but without the `$-N$' both inside and outside the integer part function. Our definition here differs only by an integer constant for $a$, is identical for $T_N$, gives a similar presentation between \Cref{eqn: RCF functional} and (\ref{eqn: N-CF functional}), and is what we will now generalize.

\begin{proposition}\label{prop: elementary vertex properties without proof}
 At every vertex $[a_1,\ldots,a_k]_x=p/q$, we have:
 \begin{itemize}
 \item $p,q$ are polynomials of the same degree.
 \item All coefficients of each are positive integers, except the constant term of $p(x)$ which may be zero.
 \item Term-by-term, the coefficients of $q$ are strictly larger than those of $p$, except for the leading coefficients which are both one.
 \end{itemize}
 \begin{proof}
 All properties are preserved by both $\Phi_0$ and $\Phi_1$, and are true for the root vertex $p(x)=x$, $q(x)=x+1$.
 \end{proof}
\end{proposition}
\begin{proposition}\label{prop: increasing functions}
 For every vertex $v=[a_1,\ldots,a_k]_x$, we have both
 \begin{align}
 v'(x)&> 0 &\textrm{(wherever defined)}\\
 xv'(x) &\leq v(x) & \textrm{(with equality if and only if $x=0$ and $v(0)=0$)}
 \end{align}
 \begin{proof}
 We induct on $k$, the length of the expansion of $v$. For $k=1$ we have
 \[v=\frac{x}{x+a_1-1}\]
 (where $a_1 \geq 2$) for which both claims may be trivially verified. Now assume both properties hold for $v$, and for some $a \in \mathbb{Z}^+$ set
 \[V = [a,v]_x = \begin{cases}\frac{x}{x+a-1+v} & a \geq 2 \textrm{ or } v(0) \neq 0\\ \frac{1}{1+v/x} & a=1 \textrm{ and } v(0)=0.
 \end{cases}\]
 Note that by \Cref{prop: elementary vertex properties without proof} $x=0$ is at most a simple root of $v$, so the second case may be properly defined even for $x=0$, and if we establish $v'>0$, then $xv'$ also has at most a simple root at $x=0$.
 In the first case, we compute
 \begin{align*}
 V'&=\frac{a-1+v-xv'}{(x+a-1+v)^2}.\\
 \intertext{Since we have assumed $xv'<v$, the first claim now follows.}
 xV'-V&= \frac{x((a-1)+v-xv')-x(x+a-1+v)}{(x+a-1+v)^2}\\
 &=-x^2\frac{v'+1}{(x+a-1+v)^2}.\\
 \end{align*}
 Which is negative unless $x=0$, in which case it follows that $V(0)=0$ as well.

\section{Backward Farey Tree}\label{sec:other trees}
The results we have on the Farey polynomial tree raise the question of how general these results are: there are many other different families of continued fraction algorithms. In this section we take the backward continued fractions as a starting point and compare it with Theorem \ref{th:cfs} and Theorem \ref{th:dense}.
Just as for regular continued fractions, the backward continued fractions appears in different fields of mathematics. There are many nice papers studying backwards continued fractions, but we want to highlight \cite{MO19,MO20} where backwards (and regular) continued fractions are used to draw connections between graph theory, combinatorics, number theory, and algebra.
For backward continued fractions, a parametrised family is already studied in the form of $ 1/(u(1-x)) \mod 1$ where $u\in(0,4)$, introduced and studied in \cite{GH96a,GH96b} and more recently \cite{LS20, LS22}. In contrast to those papers, in this article we will make the branches full again by shifting the digit set in order to get a better comparison with the Farey polynomial tree. Of course, instead of having $ 1/(u(1-x)) \mod 1$, we can also put the parameter in the numerator. This leads to the fast map
\begin{equation}
 T_x(t)=\frac{x}{1-t}- x -\left\lfloor \frac{x}{1-t}-x \right\rfloor.
\end{equation}
The continued fractions are of the form
\[
t=1-\cfrac{x}{x + a_1-\cfrac{x}{x+ a_2 -\ddots}}
\]
where $a_i\in\mathbb{Z^+}$, given by
\[a(t)=1+\floor{\frac{x}{1-t}-x}.\] Note that, when taking $x\in \mathbb{Z^+}$, you essentially get $N$-continued fractions with a negative value for $N$.
The slow map is given by
\begin{equation}\label{eq:F_x backwards}
 F_x(t)=
\begin{cases}
\dfrac{xt}{1-t} & t\in [0,\frac{1}{x+1})\\[1ex]
1-\displaystyle\frac{x(t-1)}{1-t-x}, & t\in [\frac{1}{x+1},1],
\end{cases}
\end{equation}
 see Figure \ref{fig:Fareymapbackward}.

\begin{theorem}\label{th:backwardcf}
 For a fixed value of $x$, we consider the function which maps the backward tree to the set of values given by evaluating every vertex at this value of $x$.
 \begin{enumerate}
 \item Setting a value $x\geq 1$ injectively maps the backward tree to a dense subset of $(0,1)$. \\For $x\in(0,1)$, the mapping is injective and maps to a subset of $(0,1)$ but the image is not dense.
 \item Setting a value $x \geq 1$ bijectively maps the tree to $\mathbb{Q} \cap (0,1)$ if and only if $x \in \mathbb{Z}^+$.
 \end{enumerate}
\end{theorem}

For Theorem~\ref{th:cfs} the introduction says it is proved by “us[ing] the close relationship between the tree and a family of continued fractions explained in Section~\ref{sec:cfresults}.”

(No further proof structure for Theorem~\ref{th:cfs} is described here; the only other proof outline given is for Theorem~\ref{th:dense}, which is “proven … by inductively selecting a path in the tree whose vertices have poles converging to an arbitrary $\alpha<-1$.”)

To prove the main theorem, the introduction says it is proved by “us[ing] the close relationship between the tree and a family of continued fractions explained later.”

(No further proof structure for the main theorem is described here; the only other proof outline given is for \begin{theorem}\label{th:dense}
    For the subtree $\Omega$ rooted at any vertex $[a_1,\ldots,a_k]_x$, if we set
    \[R=\left\{ x \, | \, \textrm{there is a } p(x)/q(x) \in \Omega \textrm{ for which }q(x)=0\right\}\]
    then $R$ is dense in $(-\infty,-1]$.
\end{theorem}, which is “proven … by inductively selecting a path in the tree whose vertices have poles converging to an arbitrary $\alpha<-1$.”)

Question:
Consider the Farey polynomial tree whose vertices are rational functions in a variable $X$, with root $\dfrac{X}{X+1}$, and where each vertex $\dfrac{p(X)}{q(X)}$ has two children given by
\[
\Phi_0\!\left(\frac{p(X)}{q(X)}\right)=
\begin{cases}
\dfrac{Xq(X)}{Xq(X)+p(X)} & \text{if } p(0)\neq 0,\\[1ex]
\dfrac{q(X)}{q(X)+p(X)/X} & \text{if } p(0)=0,
\end{cases}
\qquad
\Phi_1\!\left(\frac{p(X)}{q(X)}\right)=
\begin{cases}
\dfrac{Xp(X)}{Xq(X)+p(X)} & \text{if } p(0)\neq 0,\\[1ex]
\dfrac{p(X)}{q(X)+p(X)/X} & \text{if } p(0)=0.
\end{cases}
\]
For a fixed real number $x$, evaluate every vertex at $X=x$, thereby obtaining a map from the vertices of the tree to real numbers. Which statement holds about this evaluation map?

For every fixed $x>0$, the evaluation map is injective and its image is a dense subset of $(0,1)$. Moreover, this map is a bijection onto $\mathbb{Q}\cap(0,1)$ if and only if $x\in\mathbb{Z}^+$.

Choices:
B. For every fixed $x\ge 1$, the evaluation map is injective and its image is a dense subset of $(0,1)$. Moreover, this map is a bijection onto $\mathbb{Q}\cap(0,1)$ if and only if $x\in\mathbb{Z}^+$.
C. For every fixed $x\in\mathbb{Z}^+$, the evaluation map is injective and its image is a dense subset of $(0,1)$, and in fact it is a bijection onto $\mathbb{Q}\cap(0,1)$.
D. For every fixed $x>0$, the evaluation map is injective and its image is all of $(0,1)$. Moreover, this map is a bijection onto $\mathbb{Q}\cap(0,1)$ if and only if $x\in\mathbb{Z}^+$.
E. For every fixed $x>0$, the evaluation map has dense image in $(0,1)$, and it is injective if and only if $x\in\mathbb{Z}^+$. Moreover, in that case the map is a bijection onto $\mathbb{Q}\cap(0,1)$.

parameter range $x>0$ replaced by $x\ge 1$

restricts the universal quantifier from all $x>0$ to integer parameters only

dense image strengthened to surjective image $(0,1)$

injectivity made dependent on integrality rather than holding for all $x>0$

The stem gives only the construction and asks for the correct global property of the evaluation map. It does not explicitly state or strongly hint at the correct conclusion.

This is close to a theorem-identification item: the correct option is essentially the full theorem statement, while the others are nearby variants. It is not a direct restatement of the stem, but it still leans heavily on recall/recognition rather than independent derivation.

The student must compare subtle logical differences among the options (all x>0 vs integers, dense image vs surjective image, unconditional injectivity vs conditional injectivity). That creates moderate reasoning pressure, but the option structure still makes it more recognition-based than genuinely generative.

The distractors are plausible and mathematically meaningful: they vary quantifier range, strength of image statement, and dependence of injectivity on integrality. These reflect common theorem-misremembering and over/under-strengthening errors.

A solid theorem-recognition MCQ with little answer leakage and strong distractors, though it tests nuanced recall/comparison more than fully generative reasoning.


\begin{corollary}\label{cor:behave}
  For the sequences defined by \eqref{eq:mexdef},
  there exist a bounded function $\lambda_\ell:\mathbb{N}\to\mathbb{Z}$ such that, for all $n$,
  \[
   a_n=\lfloor (n+\ell)\phi \rfloor +\lambda_\ell(n).
 \]
 So, in particular, \(b_n=\lfloor (n+\ell)\phi^2 \rfloor + \lambda_\ell(n) +1\).
  \end{corollary}

\begin{theorem}\label{thm:rec_car}
  Let $\ell\ge 1$ and define recursively $(a_n,b_n)_{n\ge 0}$ by
\begin{equation}\label{eq:mexdef}
  (a_0,b_0)=(\ell+1,2\ell+2) \quad\text{ and }\quad \forall n\ge 1, \left\{
    \begin{array}{l}
a_n =\mex (\{ a_i,b_i \mid i<n \}\cup\{0,1,\ldots,\ell\}),\\
b_n =a_n+n+\ell+1.\\
    \end{array}
  \right.
\end{equation}
The set of non-terminal $\mathcal{P}$-positions of $K^\ell$ is $\{(a_n,b_n)\mid n\ge 0\} \cup \{(b_n,a_n)\mid n\ge 0\} $.
\end{theorem}

\begin{array}{c|llll}
    &g_n & \mu(g_n) & \mu^2(g_n) & \mu^3(g_n) \\
    \hline
 0&1& 0& 1& 10\\
 1&0& 1& 10& 011\\
 2&1& 10& 011& 11010\\
 3&1& 01& 110& 01011\\
 4&0& 11& 010& 11011\\
 5&1& 0& 11& 010\\
  \end{array}
\]
  \caption{The different $3$-types when applying a $\varphi$-morphism to $g$.}
  \label{tab:types}
\end{table}

Now we associate each symbol $g_n$ with its $3$-type and get the infinite word
\[
  01|2|31|45|2|35|4|31|45|4|35|45|\cdots
\]
where the vertical bars indicate the factorization of the Fibonacci word $ab|a|ab|ab|a|\cdots$ with factors $\sigma(a)=ab$ and $\sigma(b)=a$, the images of the letters by the Fibonacci morphism. From this, we deduce the morphism $\mu$ given in Example~\ref{exa:mu}: the image of the $n$th letter has to be the $n$th block in the factorization. So $0\mapsto 01$, then $1\mapsto 2$ and so on. From the morphism, it is a routine to obtain the DFA in Figure~\ref{fig:automG}, see Definition~\ref{def:dfao}.

Finally, one may define a coding~$\rho$ to recover the original sequence where each type is mapped to the first element of the tuple. So, $0,2,3,5\mapsto 1$ and $1,4\mapsto 0$. This can equivalently be performed by comparing the morphic word and the original sequence
\begin{align*}
  &01231452354314543545\cdots\\
  &10110011110100101101\cdots
\end{align*}
and matching corresponding elements.
\subsection{An automatic proof for $K^2$}\label{ssec:autom_proof}

Now that $g$ has been defined by a DFA fed with Fibonacci representations (and stored as {\tt G.txt} in {\tt Word Automata Lib}), the set of $\mathcal{P}$-positions \eqref{eq:Ppos} obtained by Komak et al. can be described by the following commands:
\begin{verbatim}
def pposK2_asym "?msd_fib (a+b<=1) | En,x $phin(n,x) & a+1=x+G[n]
                                                     & b=x+n+G[n]":
def pposK2 "?msd_fib $pposK2_asym(a,b) | $pposK2_asym(b,a) ":
\end{verbatim}
The resulting automaton has $27$ states.

For the sake of presentation, let us recall some basics on combinatorial games.
\begin{definition}\label{def:stab}
A set $S$ of positions is {\em stable} if, for all $s,t\in S$, $s\neq t$, there is no move between $s$ and $t$. A set $S$ of positions is {\em absorbing}, if for all $t\not\in S$, there exists $s\in S$ such that there is a move from $t$ to $s$ (or, $t$ has an option in $S$).
\end{definition}
It is a well-known property in graph theory that every acyclic graph has a unique kernel, i.e., a stable and absorbing set of vertices. In a take-away game where tokens are removed from piles, the corresponding game graph is acyclic: it is not possible to visit twice the same position during a game.
\begin{proposition}[Folklore]\label{pro:kernel}
  The sets of $\mathcal{P}$- and $\mathcal{N}$-positions of an
  impartial acyclic game are uniquely determined by the following two
  properties:
\begin{enumerate}
\item Every move from a $\mathcal{P}$-position leads to an
  $\mathcal{N}$-position; equivalently there is no move between two $\mathcal{P}$-positions (stability property of $\mathcal{P}(G)$).
  \item From every $\mathcal{N}$-position, there exists a move leading to a $\mathcal{P}$-position (absorbing property of $\mathcal{P}(G)$).
\end{enumerate}
\end{proposition}

As observed in \cite{MRRW}, it is then a routine test to check stability and absorbing property:
\begin{verbatim}
eval stableK2 "?msd_fib Ap,q,r,s (($pposK2(p,q) & $pposK2(r,s)
     & p>=r & q>=s & p+q>2) => ((p=r & q=s) | (p>r & q>s & p+s!=q+r)))":

eval absorbingK2 "?msd_fib Ap,q (~$pposK2(p,q) => Ex,y
     (x<=p & y<=q & $pposK2(x,y) & (p+y=q+x | p=x | q=y))) ":
\end{verbatim}
These two commands return {\tt TRUE} resulting in the following result, \cite[Thm.~3]{Komak}. From Proposition~\ref{pro:kernel}, we immediately get an alternative proof of Theorem~\ref{thm:K2}.

\section{Towards an algebraic characterization for $K^\ell$}\label{sec:newGame}

In \cite{Komak}, Komak et al. chose $\{(x,y)\mid x+y\le 2\}$ as set of terminal positions. It is natural to consider a parameterized version where the set of terminal states is
\[
  \{(x,y)\in\mathbb{N}^2\mid x+y\le \ell\}
\]
for some $\ell\in\mathbb{N}$. The corresponding game is denoted by $K^\ell$. Note that the game $K^0$ is the classic Wythoff game. In this section, we obtain new results concerning the games $K^1$ and~$K^3$.

\subsection{The $K^1$-game}
Up to our knowledge, the game $K^1$ does not seem to have been studied in the literature. Computing the first $\mathcal{P}$-positions of $K^1$ and writing their Fibonacci expansions permitted us to state a conjecture that can be tested with {\tt Walnut}. This result is quite similar to the famous characterization of the $\mathcal{P}$-positions of Wythoff game obtained by Fraenkel \cite{Fraenkel3}.
\begin{table}[h!t]
  \[
    \begin{array}{c|r|c|r}
      a_n & \rep_F(a_n) & b_n & \rep_F(b_n) \\
      \hline
 0&\varepsilon  & 1 &1 \\
 2&10 & 4 &101 \\
 3&100 & 6 & 1001 \\
 5&1000 & 9 & 10001 \\
 7&1010 & 12 & 10101 \\
 8&10000 & 14 & 100001 \\
 10&10010 & 17 &100101 \\
 11&10100 & 19 & 101001 \\
 13&100000 & 22 & 1000001 \\
 15&100010 & 25 & 1000101 \\
  \end{array}

\begin{theorem}\label{thm:carK1}
  A position $(a,b)$, with $a\le b$, is a $\mathcal{P}$-position of the game $K^1$, with a set of terminal positions being $\{(x,y)\mid x+y\le 1\}$ and Wythoff's moves, if and only if $\rep_F(a)$ ends with $0$ and $\rep_F(b)=\rep_F(a)1$.
\end{theorem}

\begin{array}{c|ccccccccccccccccccccc}
      & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10  & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 &  19 & 20 \\
      \hline
      h& 0 & 1 & 1 & 2 & 3 & 3 & 4 & 4 & 5 & 6 & 6 &  7 & 8 & 8 & 9 & 9 & 10 & 11 & 11 & 12 &  12 \\
      g&1 & 0 & 1 & 1 & 0 & 0 & 1 & 1 & 1 & 1 & 0 &  1 & 0 & 0 & 1 & 0 & 1 & 1 & 0 & 1 & 1 \\
    \end{array}
  \]
  \caption{First values of the sequence $g$ and Hofstadter sequence $h$.}
  \label{tab:gh}
\end{table}

The main result of Komak {\em et al.} provides an algebraic description of set of $\mathcal{P}$-positions of $K^2$:
\begin{theorem}\label{thm:K2}
  The set of $\mathcal{P}$-positions of the variant of Wythoff game where the set of terminal positions is $\{(x,y)\mid x+y\le 2\}$,  is exactly \begin{equation}\label{eq:Ppos}
  \left\{ (\lfloor n\phi\rfloor +g(n)-1, \lfloor n \phi^2\rfloor +g(n))\mid n\ge 0\right\} \cup
  \left\{ (\lfloor n \phi^2\rfloor +g(n), (\lfloor n\phi\rfloor +g(n)-1)\mid n\ge 0\right\}
\end{equation}
where $g:\mathbb{N}\to\mathbb{N}$ is the function given in Definition~\ref{def:fg}.
\end{theorem}

The authors provide a classical proof of their result by showing that the set of $\mathcal{P}$-positions described by \eqref{eq:Ppos} is both stable and absorbing (see Definition~\ref{def:stab}). The proof is quite long and requires a detailed case analysis. Without diminishing their achievement, once the set \eqref{eq:Ppos} has been conjectured, if the set can be handled by {\tt Walnut}, then it becomes straightforward to produce an automated proof in just a few lines. Our approach therefore complements the work carried out in \cite{Komak}.

In \cite{block}, other variants of Wythoff game are studied, in which some blocking maneuvers are added. Let $k\ge 1$. In the game denoted by $W^k$, for each move, before the next player (i.e., the player who is about to play) moves, the previous player (i.e., the one who has just played) may declare at most $k-1$ of the options as forbidden. When the next player has moved, any blocking maneuver is forgotten and has no further incidence on the game. This terminology of previous and next player explains why we speak of $\mathcal{N}$- and $\mathcal{P}$-positions, respectively. For $k=1$, this is the classical game of Wythoff. When $k=2,3$, we reconsider Larsson's result and obtain an automated proof, replacing a 2-page-long analysis by some easy-to-describe first-order formulas.

As Shallit has already noted on several occasions, the two approaches are complementary. A classical, purely combinatorial proof usually provides structural insights, whereas the use of automated provers helps avoid lengthy case analyses and enables the exploration of directions that are difficult to access through traditional techniques. In particular, in this article, we easily obtain a variety of results that would otherwise require significantly more effort using ``classical'' methods. Moreover, these results lead us to formulate general theorems.
\smallskip

This article is organized as follows. Section~\ref{sec:2} --- which was the starting point of this article --- aims to give an automatic proof of the algebraic characterization \eqref{eq:Ppos} of the $\mathcal{P}$-positions of $K^2$. We begin with preliminary results about Fibonacci-automatic sequences. We define a notion of $\varphi$-morphism and describe a heuristic that we extensively use throughout the paper to construct such $\varphi$-morphisms. Given a sufficiently long prefix of an infinite word, we obtain morphisms that can be used in our automatic proofs (and we can therefore prove the correctness of the procedure). Basic results from combinatorial game theory are given in Section~\ref{ssec:autom_proof}.

In Section~\ref{sec:newGame}, we obtain results about new games: a parameterized version of a variant of Wythoff game denoted by $K^\ell$, where the set of terminal states is
\[
  \{(x,y)\in\mathbb{N}^2\mid x+y\le \ell\}
\]
for some $\ell\in\mathbb{N}$. We study the games $K^1$, $K^3$ and $K^4$ and obtain algebraic characterizations of the $\mathcal{P}$-positions similar to \cite{Komak}. In particular, as for the classical Wythoff game $K^0$, the game $K^1$ has a nice set of $\mathcal{P}$-positions: a pair $(a,b)$ of integers such that $a\le b$ is a $\mathcal{P}$-position of $K^1$ if and only if its Fibonacci representation $\rep_F(a)$ ends with zero and $\rep_F(b)$ is of the form $\rep_F(a)1$, see Theorem~\ref{thm:carK1}.

In Section~\ref{sec:6}, we go further in the analysis of the games $K^\ell$ for an arbitrary $\ell\ge 1$. We provide a recursive characterization of the set of $\mathcal{P}$-positions. The non-terminal $\mathcal{P}$-positions $(a_n,b_n)_{n\ge 0}$ of $K^\ell$ are given, in Theorem~\ref{thm:rec_car}, by
\[
  (a_0,b_0)=(\ell+1,2\ell+2) \quad\text{ and }\quad \forall n\ge 1, \left\{
    \begin{array}{l}
a_n =\mex (\{ a_i,b_i \mid i<n \}\cup\{0,1,\ldots,\ell\}) \\
b_n =a_n+n+\ell+1.\\
    \end{array}

In combinatorial game theory, proofs of many results are obtained by using a suitable numeration system \cite{Duchene,Fraenkel1,Fraenkel2,RigoLNM}. As a typical example, the Zeckendorf numeration based on the Fibonacci sequence is used to characterize the $\mathcal{P}$-positions (i.e., losing positions) of the Wythoff game \cite{Fraenkel3}. Fraenkel showed that a pair $(a,b)$ of integers such that $a\le b$ is a $\mathcal{P}$-position of Wythoff game if and only if $\rep_F(a)$ ends with an even number of zeroes and $\rep_F(b)$ is the left-shift of $\rep_F(a)$, i.e., $\rep_F(b)=\rep_F(a)0$.

When the numeration system has good properties (i.e., it is an {\em addable} system as discussed in \cite{ShallitBook}), the formalism of first-order logic can be used to express certain properties of combinatorial games. We have recently exploited this approach and used {\tt Walnut} to reprove classical results in combinatorial games theory, as well as to obtain new ones \cite{MRRW}. {\tt Walnut} is a free, open-source prover for first-order statements dealing with automatic sequences \cite{Mousavi,ShallitBook}.

We assume that the reader is sufficiently familiar with the use of {\tt Walnut}. For references on combinatorial game theory, we refer to \cite{RigoLNM} and \cite{MRRW}.

The Wythoff game is a {\em take-away} game: two players alternately remove tokens from two piles. One can remove a positive number of token from one pile or, remove the same positive number of token from both piles. The Wythoff game is {\em impartial}: the set of options (i.e., positions reachable in one legal move) of a given position does not depend on which player is in turn to move. Wythoff game can be seen as a queen on an infinite chessboard $\mathbb{N}^2$: in a position $(x,y)\neq(0,0)$ the queen can move horizontally to $(x-n,y)$ with $0<n\le x$, vertically to $(x,y-n)$ with $0<n\le y$ or diagonally to $(x-n,y-n)$ with $0<n\le \min\{x,y\}$. According to the {\em normal convention}, a player who is unable to move loses the game; passing is not allowed. Otherwise stated, the player who takes the last token wins or, in an equivalent way, when the queen reaches $(0,0)$.

In this article, we are mainly interested in two kinds of variations of the Wythoff game.

In \cite{Komak}, a variant of Wythoff game has been introduced: the set $\{(x,y)\mid x+y\le 2\}$ is declared to be the set of {\em terminal} positions. If a player moves the queen into this terminal set with the usual Wythoff moves, that player wins the game. Let us call this game $K^2$. We chose this notation because we will later introduce a generalization of the game obtained by varying the set of terminal positions. Let $\phi$ be the golden ratio~$(1+\sqrt{5})/2$. We first define a sequence~$(g(n))_{n\ge 0}$ as follows.
\begin{definition}\label{def:fg}
  We let $g(0)=1$, $g(1)=0$ and
  \[
    g(n)=\left\{
      \begin{array}{ll}
        1-g(m),& \text{ if }\lfloor n\phi\rfloor= \lfloor m(\phi+1)\rfloor+1 \text{ for some }m\ge 0;\\
        1,& \text{ otherwise}.
      \end{array}\right.
  \]

\end{definition}
The first values of the sequence~$g$ are given in Table~\ref{tab:gh}.
\begin{table}[h!tb]
  \centering
  \[
    \begin{array}{c|ccccccccccccccccccccc}
      & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10  & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 &  19 & 20 \\
      \hline
      h& 0 & 1 & 1 & 2 & 3 & 3 & 4 & 4 & 5 & 6 & 6 &  7 & 8 & 8 & 9 & 9 & 10 & 11 & 11 & 12 &  12 \\
      g&1 & 0 & 1 & 1 & 0 & 0 & 1 & 1 & 1 & 1 & 0 &  1 & 0 & 0 & 1 & 0 & 1 & 1 & 0 & 1 & 1 \\
    \end{array}
  \]
  \caption{First values of the sequence $g$ and Hofstadter sequence $h$.}
  \label{tab:gh}
\end{table}

The main result of Komak {\em et al.} provides an algebraic description of set of $\mathcal{P}$-positions of $K^2$:

In combinatorial game theory, proofs of many results are obtained by using a suitable numeration system \cite{Duchene,Fraenkel1,Fraenkel2,RigoLNM}. As a typical example, the Zeckendorf numeration based on the Fibonacci sequence is used to characterize the $\mathcal{P}$-positions (i.e., losing positions) of the Wythoff game \cite{Fraenkel3}. Fraenkel showed that a pair $(a,b)$ of integers such that $a\le b$ is a $\mathcal{P}$-position of Wythoff game if and only if $\rep_F(a)$ ends with an even number of zeroes and $\rep_F(b)$ is the left-shift of $\rep_F(a)$, i.e., $\rep_F(b)=\rep_F(a)0$.

The Wythoff game is a {\em take-away} game: two players alternately remove tokens from two piles. One can remove a positive number of token from one pile or, remove the same positive number of token from both piles. The Wythoff game is {\em impartial}: the set of options (i.e., positions reachable in one legal move) of a given position does not depend on which player is in turn to move. Wythoff game can be seen as a queen on an infinite chessboard $\mathbb{N}^2$: in a position $(x,y)\neq(0,0)$ the queen can move horizontally to $(x-n,y)$ with $0<n\le x$, vertically to $(x,y-n)$ with $0<n\le y$ or diagonally to $(x-n,y-n)$ with $0<n\le \min\{x,y\}$. According to the {\em normal convention}, a player who is unable to move loses the game; passing is not allowed. Otherwise stated, the player who takes the last token wins or, in an equivalent way, when the queen reaches $(0,0)$.

In this article, we are mainly interested in two kinds of variations of the Wythoff game.

In \cite{Komak}, a variant of Wythoff game has been introduced: the set $\{(x,y)\mid x+y\le 2\}$ is declared to be the set of {\em terminal} positions. If a player moves the queen into this terminal set with the usual Wythoff moves, that player wins the game. Let us call this game $K^2$. We chose this notation because we will later introduce a generalization of the game obtained by varying the set of terminal positions. Let $\phi$ be the golden ratio~$(1+\sqrt{5})/2$. We first define a sequence~$(g(n))_{n\ge 0}$ as follows.
\begin{definition}\label{def:fg}
 We let $g(0)=1$, $g(1)=0$ and
 \[
 g(n)=\left\{
 \begin{array}{ll}
 1-g(m),& \text{ if }\lfloor n\phi\rfloor= \lfloor m(\phi+1)\rfloor+1 \text{ for some }m\ge 0;\\
 1,& \text{ otherwise}.
 \end{array}\right.
 \]

\end{definition}
The first values of the sequence~$g$ are given in Table~\ref{tab:gh}.
\begin{table}[h!tb]
 \centering
 \[
 \begin{array}{c|ccccccccccccccccccccc}
 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \\
 \hline
 h& 0 & 1 & 1 & 2 & 3 & 3 & 4 & 4 & 5 & 6 & 6 & 7 & 8 & 8 & 9 & 9 & 10 & 11 & 11 & 12 & 12 \\
 g&1 & 0 & 1 & 1 & 0 & 0 & 1 & 1 & 1 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 1 & 1 & 0 & 1 & 1 \\
 \end{array}
 \]
 \caption{First values of the sequence $g$ and Hofstadter sequence $h$.}
 \label{tab:gh}
\end{table}

The main result of Komak {\em et al.} provides an algebraic description of set of $\mathcal{P}$-positions of $K^2$:

\end{definition}
The first values of the sequence~$g$ are given in Table~\ref{tab:gh}.
\begin{table}[h!tb]
 \centering
 \[
 \begin{array}{c|ccccccccccccccccccccc}
 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \\
 \hline
 h& 0 & 1 & 1 & 2 & 3 & 3 & 4 & 4 & 5 & 6 & 6 & 7 & 8 & 8 & 9 & 9 & 10 & 11 & 11 & 12 & 12 \\
 g&1 & 0 & 1 & 1 & 0 & 0 & 1 & 1 & 1 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 1 & 1 & 0 & 1 & 1 \\
 \end{array}
 \]
 \caption{First values of the sequence $g$ and Hofstadter sequence $h$.}
 \label{tab:gh}
\end{table}

The authors provide a classical proof of their result by showing that the set of $\mathcal{P}$-positions described by \eqref{eq:Ppos} is both stable and absorbing (see Definition~\ref{def:stab}). The proof is quite long and requires a detailed case analysis. Without diminishing their achievement, once the set \eqref{eq:Ppos} has been conjectured, if the set can be handled by {\tt Walnut}, then it becomes straightforward to produce an automated proof in just a few lines. Our approach therefore complements the work carried out in \cite{Komak}.

In Section~\ref{sec:6}, we go further in the analysis of the games $K^\ell$ for an arbitrary $\ell\ge 1$. We provide a recursive characterization of the set of $\mathcal{P}$-positions. The non-terminal $\mathcal{P}$-positions $(a_n,b_n)_{n\ge 0}$ of $K^\ell$ are given, in Theorem~\ref{thm:rec_car}, by
\[
 (a_0,b_0)=(\ell+1,2\ell+2) \quad\text{ and }\quad \forall n\ge 1, \left\{
 \begin{array}{l}
a_n =\mex (\{ a_i,b_i \mid i<n \}\cup\{0,1,\ldots,\ell\}) \\
b_n =a_n+n+\ell+1.\\
 \end{array}
 \right.
\]
We prove this result in an automatic way for $\ell=1,2$, then extend it for all values of the parameter using classical arguments. With Corollary~\ref{cor:behave}, we generalize Theorem~\ref{thm:K2} and obtain that $(a_n,b_n)_{n\ge 0}$ are of the form
\[ a_n=\lfloor (n+\ell)\phi\rfloor + \lambda_\ell(n) \quad\text{ and }\quad
 b_n=\lfloor (n+\ell)\phi^2\rfloor + \lambda_\ell(n)+1\]
for some bounded integer-valued function $\lambda_\ell$. Our result can be related to the recent paper \cite{Letouzey} where discrepancy of generalized Hofstadter functions is studied (and formalized in {\tt Coq}). Our methods are inspired by \cite{Fraenkel5,Kimberling2,Larsson}.

The first non-terminal $\mathcal{P}$-positions $(a_n,b_n)_{n\ge 0}$ are given in Table~\ref{tab:k3}. From now on, we take this convention: in the indexing of the $P$-positions, we do not take terminal positions into account. Thus, $(a_0,b_0)$ represents the first non-terminal $\mathcal{P}$-position. Due to the symmetry of the game, we only consider sequences where $a_n<b_n$.
\begin{table}[h!t]
\[
 \begin{array}{c|cccccccccccccccccccccccccccccc}
 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 \\
 \hline
 a_n& 4 & 5 & 6 & 7 & 9 & 11 & 13 & 15 & 16 & 18 & 19 & 21 & 22 & 24 & 25 & 27 &
 29 & 30 \\
 b_n & 8 & 10 & 12 & 14 & 17 & 20 & 23 & 26 & 28 & 31 & 33 & 36 & 38 & 41 & 43 & 46
 & 49 & 51 & \\
 \end{array}
 \]
 \caption{First (non-terminal) $\mathcal{P}$-positions of $K^3$, $(n\ge 0)$.}
 \label{tab:k3}
\end{table}
\begin{theorem}\label{thm:fibaut2}
There exists a Fibonacci-automatic function $g_3:\mathbb{N}\to\{0,1,2\}$ such that, for all $n\ge 0$, the $n$th non-terminal $\mathcal{P}$-position $(a_n,b_n)$ of $K^3$ is given by
\begin{equation}\label{eq:K3}
 a_n=\lfloor (n+2)\phi \rfloor+g_3(n+1)-1 \quad \text{ and }\quad
 b_n=\lfloor (n+2)\phi^2 \rfloor+g_3(n+1)+1.
\end{equation}
\end{theorem}
The first few values of $g_3(n)$ are
\[
 1221011221211111111121121121211211112111121111111211112\cdots
\]
Using the heuristic described in Section~\ref{ssec:heuristic}, assuming that the above infinite word is generated by a $\varphi$-morphism, we obtain the morphism
\begin{align*}
 \mu_3:\;&
0 \mapsto 01,
1 \mapsto 2,
2 \mapsto 34,
3 \mapsto 56,
4 \mapsto 7,
5 \mapsto 78,\\
& 6 \mapsto 9,
7 \mapsto ab,
8 \mapsto a,
9 \mapsto 56,
a \mapsto ab,
b \mapsto 7
\end{align*}
and the coding
\[\rho_3:0,3,5,6,8,a,b\mapsto 1,\quad 1,2,7,9\mapsto 2,\quad 4\mapsto 0.\]
We thus define $g_3(n)$ as the $n$th symbol in $\rho_3(\mu_3^\omega(1))$. Note that to produce enough value of $g_3(n)$, we have to compute sufficiently many $\mathcal{P}$-positions of $W^3$.

\subsection{Even further}
For the game~$K^4$, we have applied the same procedure. The first non-terminal $\mathcal{P}$-positions $(a_n,b_n)_{n\ge 0}$ are given in Table~\ref{tab:k4}.
\begin{table}[h!t]
\[
\begin{array}{c|cccccccccccccccccc}
 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 \\
 \hline
 a_n &5 & 6 & 7 & 8 & 9 & 11 & 13 & 15 & 17 & 19 & 20 & 22 & 23 & 25 & 26 & 28 & 29 & 31 \\
 b_n & 10 & 12 & 14 & 16 & 18 & 21 & 24 & 27 & 30 & 33 & 35 & 38 & 40 & 43 & 45 & 48 & 50 & 53 \\
\end{array}
 \]
 \caption{First (non-terminal) $\mathcal{P}$-positions of $K^4$, $(n\ge 0)$.}
 \label{tab:k4}
\end{table}
To get a long enough prefix, we have computed the first $600$ $\mathcal{P}$-positions $(a_n,b_n)$ with $a_n\le b_n$ (up to $a_n$ close to $1000$). From this, we conjectured that
\begin{equation}\label{eq:K4}
 a_n=\lfloor (n+2)\phi \rfloor+g_4(n+1) \quad \text{ and }\quad
 b_n=\lfloor (n+2)\phi^2 \rfloor+g_4(n+1)+3,
\end{equation}
where the first few values of $g_4(n)$ are
\[
 12210001112111111010110110111111111111111111\cdots.
\]
Having the first $600$ values of $g_4(n)$, we apply the heuristic of Section~\ref{ssec:heuristic}. Note that here, to be able to discern types correctly, we have to consider $4$-types (there are distinct $4$-types whose restrictions to $3$-types are equal). Since we have to take fourth iterations, this explains why we need a longer prefix. We obtain $18$ different $4$-types and the heuristic gives the following morphisms:
\begin{align*}
 \mu_4:\;&0 \mapsto 01,\ 1 \mapsto 2,\ 2 \mapsto 34,\ 3 \mapsto 56,\ 4 \mapsto 7,\ 5 \mapsto 89,\ 6 \mapsto a,\ 7 \mapsto bc,\ 8 \mapsto dc,\\
 &9 \mapsto d,\ a \mapsto ef,\ b \mapsto ef,\ c \mapsto e,\ d \mapsto 7g,\ e \mapsto eh,\ f \mapsto b,\ g \mapsto d,\ h \mapsto b
\end{align*}
\[
 \rho_4: 0,3,7,8,9,b,c,d,e,h \mapsto 1,\ 1,2,a \mapsto 2,\ 4,5,6,f,g \mapsto 0
\]
With $g_4(n)$ being the $n$th symbol of $\rho_4(\mu_4^\omega(1))$, we have a $18$-state DFAO. Formulas \eqref{eq:K4} translates in {\tt Walnut} into
\begin{verbatim}
def pposK4_asym "?msd_fib (a+b<=4) | (En,x $phin(n+2,x) & (a=x+K4[n+1])
 & (b=x+K4[n+1]+n+5))":
\end{verbatim}
and we then follow exactly the same proof to get the result.

Let us begin with some classical and well-known results on Wythoff game before moving on to the games discussed in this article. We recall the {\em recursive definition} of the $\mathcal{P}$-positions of Wythoff game~$K^0$, with our convention:
\[
 (a_0,b_0)=(1,2) \quad\text{ and }\quad \forall n\ge 1, \left\{
 \begin{array}{l}
a_n =\mex (\{ a_i,b_i \mid i<n \}\cup\{0\}),\\
b_n =a_n+n+1,\\
 \end{array}
 \right.
\]
where $\mex$ stands for {\em minimum excluded value}, i.e. the least non-negative integer not in the set. In other words, $\mex S=\min(\mathbb{N}\setminus S)$. So $a_1=\mex\{0,1,2\}=3$ and $b_1=a_1+2=5$, then $a_2=\mex\{0,1,2,3,5\}=4$ and $b_2=a_2+3=7$ and so on.

Larsson characterized \cite[Thm.~1.1]{block} the set of $\mathcal{P}$-positions of $W^2$, a variant of Wythoff game where one option may be blocked, see Figure~\ref{fig:w2w3}. We provide an automatic proof of this result.
\begin{theorem}
The set of $\mathcal{P}$-positions of $W^2$ is given by
\[
 \mathcal{R}_2=\{(0,0)\}\cup \{ \{n,2n+1\}\mid n\ge 0\}\cup \{\{2\lfloor n\phi\rfloor+2,2\lfloor n\phi^2\rfloor+2\}\mid n\ge 0\}.
\]
\end{theorem}

The authors provide a classical proof of their result by showing that the set of $\mathcal{P}$-positions described by \eqref{eq:Ppos} is both stable and absorbing (see Definition~\ref{def:stab}). The proof is quite long and requires a detailed case analysis. Without diminishing their achievement, once the set \eqref{eq:Ppos} has been conjectured, if the set can be handled by {\tt Walnut}, then it becomes straightforward to produce an automated proof in just a few lines. Our approach therefore complements the work carried out in \cite{Komak}.

In \cite{block}, other variants of Wythoff game are studied, in which some blocking maneuvers are added. Let $k\ge 1$. In the game denoted by $W^k$, for each move, before the next player (i.e., the player who is about to play) moves, the previous player (i.e., the one who has just played) may declare at most $k-1$ of the options as forbidden. When the next player has moved, any blocking maneuver is forgotten and has no further incidence on the game. This terminology of previous and next player explains why we speak of $\mathcal{N}$- and $\mathcal{P}$-positions, respectively. For $k=1$, this is the classical game of Wythoff. When $k=2,3$, we reconsider Larsson's result and obtain an automated proof, replacing a 2-page-long analysis by some easy-to-describe first-order formulas.

As Shallit has already noted on several occasions, the two approaches are complementary. A classical, purely combinatorial proof usually provides structural insights, whereas the use of automated provers helps avoid lengthy case analyses and enables the exploration of directions that are difficult to access through traditional techniques. In particular, in this article, we easily obtain a variety of results that would otherwise require significantly more effort using ``classical'' methods. Moreover, these results lead us to formulate general theorems.
\smallskip

This article is organized as follows. Section~\ref{sec:2} --- which was the starting point of this article --- aims to give an automatic proof of the algebraic characterization \eqref{eq:Ppos} of the $\mathcal{P}$-positions of $K^2$. We begin with preliminary results about Fibonacci-automatic sequences. We define a notion of $\varphi$-morphism and describe a heuristic that we extensively use throughout the paper to construct such $\varphi$-morphisms. Given a sufficiently long prefix of an infinite word, we obtain morphisms that can be used in our automatic proofs (and we can therefore prove the correctness of the procedure). Basic results from combinatorial game theory are given in Section~\ref{ssec:autom_proof}.

In Section~\ref{sec:newGame}, we obtain results about new games: a parameterized version of a variant of Wythoff game denoted by $K^\ell$, where the set of terminal states is
\[
  \{(x,y)\in\mathbb{N}^2\mid x+y\le \ell\}
\]
for some $\ell\in\mathbb{N}$. We study the games $K^1$, $K^3$ and $K^4$ and obtain algebraic characterizations of the $\mathcal{P}$-positions similar to \cite{Komak}. In particular, as for the classical Wythoff game $K^0$, the game $K^1$ has a nice set of $\mathcal{P}$-positions: a pair $(a,b)$ of integers such that $a\le b$ is a $\mathcal{P}$-position of $K^1$ if and only if its Fibonacci representation $\rep_F(a)$ ends with zero and $\rep_F(b)$ is of the form $\rep_F(a)1$, see Theorem~\ref{thm:carK1}.

In Section~\ref{sec:6}, we go further in the analysis of the games $K^\ell$ for an arbitrary $\ell\ge 1$. We provide a recursive characterization of the set of $\mathcal{P}$-positions. The non-terminal $\mathcal{P}$-positions $(a_n,b_n)_{n\ge 0}$ of $K^\ell$ are given, in Theorem~\ref{thm:rec_car}, by
\[
  (a_0,b_0)=(\ell+1,2\ell+2) \quad\text{ and }\quad \forall n\ge 1, \left\{
    \begin{array}{l}
a_n =\mex (\{ a_i,b_i \mid i<n \}\cup\{0,1,\ldots,\ell\}) \\
b_n =a_n+n+\ell+1.\\
    \end{array}
  \right.
\]
We prove this result in an automatic way for $\ell=1,2$, then extend it for all values of the parameter using classical arguments. With Corollary~\ref{cor:behave}, we generalize Theorem~\ref{thm:K2} and obtain that $(a_n,b_n)_{n\ge 0}$ are of the form
\[ a_n=\lfloor (n+\ell)\phi\rfloor + \lambda_\ell(n) \quad\text{ and }\quad
  b_n=\lfloor (n+\ell)\phi^2\rfloor + \lambda_\ell(n)+1\]
for some bounded integer-valued function $\lambda_\ell$. Our result can be related to the recent paper \cite{Letouzey} where discrepancy of generalized Hofstadter functions is studied (and formalized in {\tt Coq}). Our methods are inspired by   \cite{Fraenkel5,Kimberling2,Larsson}.

It is well-known that the set of $\mathcal{P}$-positions of the Wythoff game are coded by the Fibonacci word~$\mathbf{f}=abaababa\cdots$, see \cite{Vision,Duchene}. If we start indexing letters of~$\mathbf{f}$ with $1$, the indices of the letters $a$ (resp. $b$) in~$\mathbf{f}$ correspond to the sequence $(a_n)_{n\ge 0}$ (resp. $(b_n)_{n\ge 0}$). Using the recursive definition from the previous section, we obtain  similar results with $K^1,K^2,K^3$: their $\mathcal{P}$-positions are encoded by morphic words obtained by $\varphi$-morphisms and codings.

In Section~\ref{sec:3}, we obtain automatic proofs of Larsson's result about $W^2$ and $W^3$. Interestingly, the automata arising in the computations are much larger than those for $K^2$.

In Section~\ref{sec:redundant}, we are concerned with redundant moves of the games discussed so far. A move is considered {\em redundant} if, upon its removal from the rule-set, then the set of $\mathcal{P}$-positions remains unchanged. It is a classical question in combinatorial game theory: do distinct rule-sets yield the same set of $\mathcal{P}$-positions? In particular, can certain moves be added or removed without altering the $\mathcal{P}$-positions?

\begin{remark}
  A {\tt Jupyter} notebook recording all the {\tt Walnut} computations is available (it has been produced using Ollinger's {\tt Walnut-Kernel}.
  The {\tt Mathematica} code and the various {\tt Walnut} files are also available online\footnote{at {\tt https://hdl.handle.net/2268/338482}, you may also download a standalone Wolfram Player.}. In particular, the package permits us to compute $\mathcal{P}$-positions and $\varphi$-morphisms.
\end{remark}

To prove Theorem~\ref{thm:K2}, the authors “provide a classical proof … by showing that the set of $\mathcal{P}$-positions described by \eqref{eq:Ppos} is both stable and absorbing (see Definition~\ref{def:stab}).” They note that “the proof is quite long and requires a detailed case analysis.” They also indicate that, “once the set \eqref{eq:Ppos} has been conjectured,” an alternative route is to “produce an automated proof” (e.g., “if the set can be handled by {\tt Walnut}”).

To prove the main theorem, the authors “provide a classical proof … by showing that the set of $\mathcal{P}$-positions described by \begin{equation}\label{eq:Ppos}
  \left\{ (\lfloor n\phi\rfloor +g(n)-1, \lfloor n \phi^2\rfloor +g(n))\mid n\ge 0\right\} \cup
  \left\{ (\lfloor n \phi^2\rfloor +g(n), (\lfloor n\phi\rfloor +g(n)-1)\mid n\ge 0\right\}
\end{equation}
 is both stable and absorbing (see \begin{definition}\label{def:stab}
A set $S$ of positions is {\em stable} if, for all $s,t\in S$, $s\neq t$, there is no move between $s$ and $t$. A set $S$ of positions is {\em absorbing}, if for all $t\not\in S$, there exists $s\in S$ such that there is a move from $t$ to $s$ (or, $t$ has an option in $S$).
\end{definition}).” They note that “the proof is quite long and requires a detailed case analysis.” They also indicate that, “once the set in the equation above has been conjectured,” an alternative route is to “produce an automated proof” (e.g., “if the set can be handled by {\tt Walnut}”).

\label{thm:K2}
  The set of $\mathcal{P}$-positions of the variant of Wythoff game where the set of terminal positions is $\{(x,y)\mid x+y\le 2\}$,  is exactly \begin{equation}\label{eq:Ppos}
  \left\{ (\lfloor n\phi\rfloor +g(n)-1, \lfloor n \phi^2\rfloor +g(n))\mid n\ge 0\right\} \cup
  \left\{ (\lfloor n \phi^2\rfloor +g(n), (\lfloor n\phi\rfloor +g(n)-1)\mid n\ge 0\right\}
\end{equation}
where $g:\mathbb{N}\to\mathbb{N}$ is defined as follows: \begin{definition}\label{def:fg}
  We let $g(0)=1$, $g(1)=0$ and
  \[
    g(n)=\left\{
      \begin{array}{ll}
        1-g(m),& \text{ if }\lfloor n\phi\rfloor= \lfloor m(\phi+1)\rfloor+1 \text{ for some }m\ge 0;\\
        1,& \text{ otherwise}.
      \end{array}\right.
  \]

\end{definition}

Question:
Consider the Wythoff-type game on positions (x,y) ∈ ℕ² in which a move from (x,y) consists of replacing it by (x-n,y), (x,y-n), or (x-n,y-n), where n is any positive integer allowed by the coordinates. The terminal positions are exactly those with x+y ≤ 2, and under normal play a P-position means a losing position. Let φ=(1+√5)/2, and define g:ℕ→ℕ by g(0)=1, g(1)=0, and for n≥0,

 g(n)=1-g(m) if floor(nφ)=floor(m(φ+1))+1 for some m≥0, and g(n)=1 otherwise.

Which statement gives exactly the set of P-positions of this game?

The set of P-positions is exactly

{ (⌊nφ⌋+g(n)-1, ⌊nφ²⌋+g(n)) : n≥0 } ∪ { (⌊nφ²⌋+g(n), ⌊nφ⌋+g(n)-1) : n≥0 }.

Choices:
B.
The set of P-positions is exactly

{ (⌊nφ⌋+g(n), ⌊nφ²⌋+g(n)) : n≥0 } ∪ { (⌊nφ²⌋+g(n), ⌊nφ⌋+g(n)) : n≥0 }.
C.
Every position of the form

(⌊nφ⌋+g(n)-1, ⌊nφ²⌋+g(n))

with n≥0 is a P-position.
D.
The set of P-positions is exactly

{ (⌊nφ⌋+g(n)-1, ⌊nφ²⌋+g(n)) : n≥1 } ∪ { (⌊nφ²⌋+g(n), ⌊nφ⌋+g(n)-1) : n≥1 }.
E.
The set of P-positions is exactly

{ (⌊nφ⌋+g(n)-1, ⌊nφ²⌋+g(n)) : n≥0 }.

offset-by-1 needed for stability against terminal region and moves within the candidate set

dropped the converse exactness/union description, keeping only one included family of P-positions

symmetry of coordinates required for absorbing all non-candidate positions

The stem does not state or strongly hint at the correct option; it only defines the game, the function g, and asks for the exact characterization of the cal P-position set.

The item is close to a theorem-recall question: it asks for the exact explicit description of the cal P-positions, with answer choices that are small variants of the target formula. It is not a pure verbatim restatement, but it is only a mild reformulation.

Some reasoning is needed to distinguish exactness from a stronger set, a weaker subset, and a boundary-case omission, especially regarding symmetry and the n=0 case. However, the item mainly tests recognition of a known formula rather than substantial generative derivation.

The distractors are mathematically meaningful and target plausible failure modes: missing the -1 offset, dropping the symmetric family, excluding the boundary case n=0, and replacing union by intersection.

A solid MCQ with no answer leakage and generally strong distractors, but it leans heavily toward theorem recognition rather than deep generative reasoning.