Square Maximality for Spanning Trees of Induced Grid Subgraphs

Abstract

For a finite \(S\subset \Z ^2\), let \(\tau (S)\) be the number of spanning trees of its induced square-lattice graph. For positive integers \(r,s\), set \(\Lambda _{r,s}=\{0,\ldots ,r-1\}\times \{0,\ldots ,s-1\}\) and \(\tau (r,s)=\tau (\Lambda _{r,s})\). We prove that, for every \(n\ge 1\),

\[ |S|=n^2 \quad \Longrightarrow \quad \tau (n,n)\ge \tau (S), \]

with equality exactly for \(n\times n\) lattice squares. More precisely, suppose that \(|S|=n^2\), that its induced graph is connected, and that \(\Lambda _{r,s}\) is its minimal rectangular hull after translation; then \(|\Lambda _{r,s}\setminus S|=rs-n^2\). Interchanging \(r\) and \(s\) if necessary,

\[ \log \tau (r,s)-\log \tau (S) \ \ge \ \frac {4G_{\mathrm {Cat}}}{\pi }(rs-n^2) \ \ge \ \log \tau (r,s)-\log \tau (n,n), \]

where \(G_{\mathrm {Cat}}\) is Catalan’s constant. Filling in the hull is worth at least the square-lattice tree entropy per vertex added, and enlarging the \(n\times n\) square to the hull at most that; the same number of vertices is added in each case, so cancelling \(\log \tau (r,s)\) gives the theorem.

Background. In 1999, Chung obtained boundary-sensitive estimates for spanning-tree counts in lattice subgraphs [Chu99]. In 2010, Swanepoel proposed on MathOverflow that square shapes should maximize the count at fixed cardinality [Swa10]. Procaccia and Tucker-Foltz recorded the conjecture in the research literature in 2022 [PTF22], and Tapp established general boundary-sensitive grid-graph bounds in 2024 [Tap24]. In 2026, Zhang proved exact balancing for free rectangular grids [Zha26a], then extended the extremal result to pure Cartesian-product families with free and periodic boundary conditions and formulated the induced-subgraph conjecture in all dimensions [Zha26b]. The present note proves the square-maximality conjecture recorded by Procaccia and Tucker-Foltz in 2022, resolving for arbitrary finite induced subgraphs of the square lattice both the question proposed by Swanepoel in 2010 and the two-dimensional case of the induced-subgraph conjecture formulated by Zhang in 2026.

1 Introduction

Let \(\mathcal L\) be the infinite square-lattice graph with vertex set \(\Z ^2\). Vertices \(x=(x_1,x_2)\) and \(y=(y_1,y_2)\) are adjacent when

\[ |x_1-y_1|+|x_2-y_2|=1. \]

We call every finite subgraph of \(\mathcal L\) a square-lattice graph. For a finite graph \(G\), write \(V(G)\) and \(E(G)\) for its vertex and edge sets, and let \(\tau (G)\) denote its number of spanning trees. We set \(\tau (G)=0\) when \(G\) is disconnected and \(\tau (G)=1\) when \(G\) consists of a single vertex. For a finite set \(S\subset \Z ^2\), let \(\mathcal L[S]\) be the subgraph induced by \(S\), and write

\[ \tau (S):=\tau (\mathcal L[S]). \]

For positive integers \(r,s\), set

\[ \Lambda _{r,s}:=\{0,\ldots ,r-1\}\times \{0,\ldots ,s-1\}, \qquad R_{r,s}:=\mathcal L[\Lambda _{r,s}], \qquad \tau (r,s):=\tau (R_{r,s}). \]

All logarithms are natural. We use

\[ G_{\mathrm {Cat}} := \sum _{j\ge 0}\frac {(-1)^j}{(2j+1)^2} \]

for Catalan’s constant.

Conjecture 1.1 ([PTF22]). Let \(n\ge 1\), and let \(H\) be a finite connected subgraph of \(\mathcal L\) with \(|V(H)|=n^2\). Then

\[ \tau (H)\le \tau (n,n). \]

For a graph \(H\) in Conjecture 1.1, put \(S:=V(H)\). Adding all lattice edges with both endpoints in \(S\) produces \(\mathcal L[S]\), and every spanning tree of \(H\) remains a spanning tree of \(\mathcal L[S]\). Thus

\[ H\subseteq \mathcal L[S], \qquad \tau (H)\le \tau (S), \]

so it suffices to consider induced subgraphs. If \(H\ne \mathcal L[S]\), adding a missing lattice edge strictly increases the spanning-tree count: adding that edge to any spanning tree of \(H\) and deleting one edge from the resulting cycle produces a new spanning tree containing the added edge. We prove the conjecture and characterize equality.

Theorem 1.2 (Square maximality). Let \(n\ge 1\), and let \(S\subset \Z ^2\) be finite with \(|S|=n^2\). Then

\[ \tau (S)\le \tau (n,n). \]

Equality holds if and only if \(S\) is an \(n\times n\) lattice square, up to translation and the symmetries of the square lattice.

1.1 Outline of the proof

Theorem 1.2 follows from two finite inequalities carrying the same constant: one compares rectangles of different areas, the other compares a set with its rectangular hull.

  1. Rectangular area penalty (Lemma 3.1). For positive integers \(n,r,s\) with \(r\le s\) and \(rs\ge n^2\),

    \[ \log \tau (r,s)-\log \tau (n,n) \le \frac {4G_{\mathrm {Cat}}}{\pi }(rs-n^2), \]

    with equality only when \(r=s=n\). The proof telescopes \(\log \tau \) in one side length, drawing on the rectangular product and hyperbolic formulas, the trapezoidal estimate, and the residual bounds of [Zha26a]; the individual references are given in Section 3.

  2. Normalized rectangular-hull inequality (Lemma 4.1). Let \(S\subset \Z ^2\), suppose that \(\mathcal L[S]\) is connected, and suppose that the smallest axis-parallel lattice vertex rectangle containing \(S\) is \(\Lambda _{r,s}\) after translation. Then

    \[ \log \tau (S)-\log \tau (r,s) \le -\frac {4G_{\mathrm {Cat}}}{\pi } |\Lambda _{r,s}\setminus S|. \]

    Interior vacancy components are controlled by planar duality and Tapp’s bound (Theorem 2.1). Boundary-attached vacancies are handled by Lemma 5.1 and the sliding-window and closed-walk arguments in Section 5.

  3. Exact matching and square maximality (Theorem 1.2). If \(\mathcal L[S]\) is connected, \(|S|=n^2\), and the smallest axis-parallel lattice vertex rectangle containing \(S\) is \(\Lambda _{r,s}\), then

    \[ |\Lambda _{r,s}\setminus S|=rs-n^2, \]

    and the two inequalities match exactly:

    \[ \log \tau (S)-\log \tau (n,n) \le -\frac {4G_{\mathrm {Cat}}}{\pi }(rs-n^2) +\frac {4G_{\mathrm {Cat}}}{\pi }(rs-n^2) =0. \]

    The strictness of the rectangular estimate forces \(r=s=n\), after which equality of cardinalities forces \(S=\Lambda _{n,n}\), up to lattice symmetry.

Kirchhoff’s Matrix–Tree Theorem is the classical starting point for exact spanning-tree enumeration [Kir47]. Square-lattice tree entropy and product formulas have been studied extensively; we use the standard closed-walk evaluation recorded, for example, in [SW00]. Tapp proved boundary-sensitive upper and lower bounds for arbitrary finite grid graphs [Tap24]. The rectangular balancing theorem gives the sharp finite comparison within the free rectangular family [Zha26a], while the product-grid extension studies other boundary conditions and higher-dimensional product families [Zha26b].

Organization. Section 2 fixes notation and records the external inputs. Section 3 proves the rectangular estimate. Sections 4 and 5 prove the normalized hull inequality. Section 6 completes the proof of Theorem 1.2, and Section 7 discusses the argument.

2 Preliminaries and Notation

Empty products and \(0\times 0\) determinants are equal to one. The free-boundary constant is

\[ \alpha :=\arsinh (1)=\log (1+\sqrt 2). \]

The square-lattice tree entropy is \(4G_{\mathrm {Cat}}/\pi \).

For \(v\in \Z ^2\), let \(\Box _v\) be the unit-square graph having \(v\) as its bottom-right corner. Following [Tap24, Definition 6], the top-left boundary of a finite square-lattice graph \(H\) is

\[ \widehat {\partial H} := \{v\in V(H):\Box _v\text { is not a subgraph of }H\}. \]

Let \(\sq (H)\) denote the number of unit lattice squares whose four boundary edges belong to \(H\). Thus \(\sq (H)=|V(H)|-|\widehat {\partial H}|\).

Theorem 2.1 ([Tap24, Theorem 9]). If \(H\) is a finite connected square-lattice graph, then

\[ \log \tau (H) \ge \frac {4G_{\mathrm {Cat}}}{\pi }\,\sq (H). \]

We also use two standard facts about spanning trees. First, if \(G\) is a connected planar multigraph, let \(G^\star \) denote its geometric dual, including the exterior dual vertex. Deletion of a primal edge corresponds to contraction of its dual edge, so the cycle matroids of \(G\) and \(G^\star \) are dual. For an edge set \(A\subseteq E(G)\), let \(G/A\) denote the multigraph obtained by simultaneously contracting the edges of \(A\), discarding the resulting loops and retaining parallel-edge multiplicities.

Second, if \(T\) is a uniform spanning tree of a connected multigraph \(G\) and \(F\) is a forest, then

\[ \Pr (F\subseteq T)=\frac {\tau (G/F)}{\tau (G)}. \]

The transfer-current theorem represents this probability as a principal minor of a positive semidefinite kernel [BP93]. Hadamard–Fischer therefore implies that, for an integer \(d\ge 1\) and pairwise disjoint edge sets \(F_1,\ldots ,F_d\) whose union is a forest,

\begin{equation}\tag{2.1} \Pr \left (\bigcup _{i=1}^d F_i\subseteq T\right ) \le \prod _{i=1}^d\Pr (F_i\subseteq T). \end{equation}

3 Rectangular Area Penalty

We first compare a rectangle whose area is at least \(n^2\) with the \(n\times n\) square.

Lemma 3.1 (Rectangular area penalty). Let \(n,r,s\) be positive integers with \(r\le s\) and \(rs\ge n^2\). Then

\begin{equation}\tag{3.1} \log \tau (r,s)-\log \tau (n,n) \le \frac {4G_{\mathrm {Cat}}}{\pi }(rs-n^2). \end{equation}

Equality holds if and only if \(r=s=n\).

Proof. Both cases below telescope \(\log \tau \) in one side length. Each increment splits into a main term, depending only on the side length held fixed, and a residual. The main terms supply the entropy constant together with a deficit of at least \(\alpha \); each residual sum contributes less than \(\alpha \). The strict inequality comes from that margin.

For \(0\le x\le 1\) and every integer \(a\ge 1\), define

\[ c(x)=\arcosh (2-\cos \pi x), \qquad C_a=\sum _{j=1}^{a-1}c(j/a). \]

Set

\[ \varepsilon _a := a\frac {4G_{\mathrm {Cat}}}{\pi }-\alpha -C_a. \]

The rectangular product formula, its hyperbolic reduction, and the trapezoidal estimate in [Zha26a, Proposition 2.1, equations (3.1)–(3.2), Lemmas 3.1, 3.2, and 5.1, and equation (5.6)] give

\begin{equation}\tag{3.2} C_a = a\frac {4G_{\mathrm {Cat}}}{\pi } -\alpha -\varepsilon _a, \qquad \varepsilon _a\ge 0, \qquad \frac {\varepsilon _a}{a}\ \text {is nonincreasing}. \end{equation}

The identification of the integral in the main term with \(4G_{\mathrm {Cat}}/\pi \) is [Zha26a, Appendix Lemma A.3].

For positive integers \(a,t\), define

\[ \mathcal R_a(t) := \sum _{j=1}^{a-1} \log \frac {1-e^{-2(t+1)c(j/a)}} {1-e^{-2t c(j/a)}}. \]

The same hyperbolic formula gives

\begin{equation}\tag{3.3} \Delta _a(t) := \log \frac {\tau (a,t+1)}{\tau (a,t)} = C_a+\mathcal R_a(t), \end{equation}

and \(\mathcal R_a(t)\ge 0\). These formulas include \(a=1\) by the empty-product convention.

Since \(c\) is concave, \(c(0)=0\), and \(c(1)=2\alpha \), for \(1\le j\le a-1\) we have

\[ c(j/a)\ge \frac {2\alpha j}{a}. \]

For integers \(u\ge t\ge a\), set

\[ q:=e^{-4\alpha }=(3-2\sqrt 2)^2, \qquad K:=\sum _{j\ge 1}-\log (1-q^j). \]

The residuals telescope to give

\begin{align*} \sum _{v=t}^{u-1}\mathcal R_a(v) &= \sum _{j=1}^{a-1} \log \frac {1-e^{-2u c(j/a)}} {1-e^{-2t c(j/a)}}. \end{align*}

For \(j\ge 1\), the estimate

\[ -\log (1-q^j) \le \frac {q^j}{1-q^j} \le \frac {q^j}{1-q} \]

therefore gives the uniform bound

\begin{equation}\tag{3.4} 0 \le \sum _{v=t}^{u-1}\mathcal R_a(v) < K \le \frac {q}{(1-q)^2} = \frac 1{32} < \alpha . \end{equation}

Suppose first that \(r\le n\le s\). Put

\[ k=n-r,\qquad \ell =s-n,\qquad \delta =rs-n^2=\ell r-kn. \]

Telescoping (3.3) and using symmetry gives

\begin{equation}\tag{3.5} \log \frac {\tau (r,s)}{\tau (n,n)} = \sum _{t=n}^{s-1}\Delta _r(t) - \sum _{t=r}^{n-1}\Delta _n(t). \end{equation}

Substituting (3.3) splits the right side of (3.5) into a \(C\)-part and a residual part:

\[ \log \frac {\tau (r,s)}{\tau (n,n)} = \bigl (\ell C_r-kC_n\bigr ) + \left ( \sum _{t=n}^{s-1}\mathcal R_r(t) - \sum _{t=r}^{n-1}\mathcal R_n(t) \right ). \]

We bound the two in turn.

The area condition \(\delta \ge 0\) reads \(\ell r\ge kn\). If the rectangles are distinct it forces \(\ell -k\ge 1\): when \(k=0\), distinctness implies \(\ell \ge 1\); when \(k>0\), the inequality \(\ell r\ge kn\) together with \(r<n\) gives \(\ell >k\). The monotonicity in (3.2) gives \(\varepsilon _r/r\ge \varepsilon _n/n\), whence

\[ \ell \varepsilon _r \ge \frac {\ell r}{n}\varepsilon _n \ge k\varepsilon _n. \]

By (3.2) the \(C\)-part is therefore

\[ \ell C_r-kC_n = \delta \frac {4G_{\mathrm {Cat}}}{\pi } -(\ell -k)\alpha -\ell \varepsilon _r+k\varepsilon _n \le \delta \frac {4G_{\mathrm {Cat}}}{\pi }-(\ell -k)\alpha . \]

In the residual part the subtracted sum is nonnegative, and the first sum is less than \(K<\alpha \) by (3.4). For distinct rectangles \(\ell -k\ge 1\), so the two parts together are less than \(\delta \,4G_{\mathrm {Cat}}/\pi \); thus (3.1) is strict unless \(r=s=n\).

It remains to consider \(n\le r\le s\). For \(a\ge 1\), symmetry and (3.3) give

\[ \log \frac {\tau (a+1,a+1)}{\tau (a,a)} = \Delta _a(a)+\Delta _{a+1}(a). \]

The \(C\)-part is

\[ (2a+1)\frac {4G_{\mathrm {Cat}}}{\pi } -2\alpha -\varepsilon _a-\varepsilon _{a+1}. \]

The first residual, \(\mathcal R_a(a)\), is less than \(1/32\). For \(1\le j\le a\), concavity also gives

\[ 2a\,c(j/(a+1)) \ge \frac {4a}{a+1}\alpha j \ge 2\alpha j. \]

With \(q_0=e^{-2\alpha }=3-2\sqrt 2\), the second residual, \(\mathcal R_{a+1}(a)\), is therefore less than

\[ \sum _{j\ge 1}-\log (1-q_0^j) \le \frac {q_0}{(1-q_0)^2} = \frac 14. \]

Since \(1/32+1/4<2\alpha \), we obtain

\[ \log \tau (a+1,a+1)-\log \tau (a,a) < (2a+1)\frac {4G_{\mathrm {Cat}}}{\pi }. \]

If \(r>n\), summing this strict inequality gives

\begin{equation}\tag{3.6} \log \tau (r,r)-\log \tau (n,n) < \frac {4G_{\mathrm {Cat}}}{\pi }(r^2-n^2); \end{equation}

when \(r=n\), the left side and the right side are both zero.

If \(s>r\), then (3.2) and (3.4) give

\begin{align} \log \frac {\tau (r,s)}{\tau (r,r)} &= (s-r)C_r+\sum _{t=r}^{s-1}\mathcal R_r(t) \notag \\ &< \frac {4G_{\mathrm {Cat}}}{\pi }\,r(s-r). \tag{3.7} \end{align}

Indeed, before the last inequality the right side is at most

\[ \frac {4G_{\mathrm {Cat}}}{\pi }\,r(s-r) -(s-r)\alpha +K, \]

which is strictly smaller because \(s-r\ge 1\) and \(K<\alpha \). When \(s=r\), both sides of the corresponding non-strict inequality are zero. Adding (3.6) and (3.7),

\[ \log \frac {\tau (r,s)}{\tau (n,n)} = \log \frac {\tau (r,r)}{\tau (n,n)} + \log \frac {\tau (r,s)}{\tau (r,r)} \le \frac {4G_{\mathrm {Cat}}}{\pi }(r^2-n^2) + \frac {4G_{\mathrm {Cat}}}{\pi }r(s-r) = \frac {4G_{\mathrm {Cat}}}{\pi }(rs-n^2), \]

which is (3.1). The first summand is strict when \(r>n\) and the second when \(s>r\), so the inequality is strict unless \(r=s=n\). This also covers \(n=1\). □

4 Normalized Rectangular-Hull Inequality

For a finite nonempty \(S\subset \Z ^2\), define its coordinate extrema by

\[ x_-:=\min _{(x,y)\in S}x,\quad x_+:=\max _{(x,y)\in S}x,\quad y_-:=\min _{(x,y)\in S}y,\quad y_+:=\max _{(x,y)\in S}y. \]

Its minimal rectangular vertex hull is

\[ \{x_-,\ldots ,x_+\}\times \{y_-,\ldots ,y_+\}. \]

Thus, after translation, the hull is \(\Lambda _{r,s}\), where \(r=x_+-x_-+1\) and \(s=y_+-y_-+1\). The central estimate is the following.

Lemma 4.1 (Normalized hull inequality). Let \(S\subset \Z ^2\) be finite, suppose that \(\mathcal L[S]\) is connected, and suppose after translation that \(\Lambda _{r,s}\) is its minimal rectangular vertex hull. Then

\begin{equation}\tag{4.1} \log \tau (S)-\log \tau (r,s) \le -\frac {4G_{\mathrm {Cat}}}{\pi } |\Lambda _{r,s}\setminus S|. \end{equation}

The proof runs to the end of Section 5. Passing to the planar dual converts the deletion of a set of vertices into the event that a prescribed forest is contained in a uniform spanning tree; the missing vertices are then split into king components, and negative correlation reduces the lemma to one bound per component. Components disjoint from the perimeter are handled below by counting the spanning trees of a union of unit squares in the dual, the rest by the determinant estimate of Section 5.

If \(r=1\) or \(s=1\), the connectedness of \(\mathcal L[S]\) and the minimality of the hull imply \(S=\Lambda _{r,s}\) and \(\tau (S)=\tau (r,s)\), so (4.1) is immediate. We assume below that \(r,s\ge 2\).

4.1 Dual Contractions

Let \(D=R_{r,s}^\star \) be the geometric planar dual, including its exterior vertex. If \(e\in E(R_{r,s})\), let \(e^\star \) be its corresponding dual edge. For \(X\subseteq \Lambda _{r,s}\), let

\[ E_X^\star := \{e^\star : e\in E(R_{r,s})\ \text {has at least one endpoint in }X\}, \]

and let \(H_X\) be the dual subgraph formed by \(E_X^\star \), with isolated vertices suppressed.

Whenever \(\mathcal L[\Lambda _{r,s}\setminus X]\) is connected, planar matroid duality gives

\[ \tau (\Lambda _{r,s}\setminus X) = \tau (D/E_X^\star ). \]

Planar tree duality also gives \(\tau (D)=\tau (r,s)\). Indeed, deleting the primal edges incident with \(X\) leaves the connected graph \(R_{r,s}[\Lambda _{r,s}\setminus X]\), together with the isolated vertices of \(X\). Its cycle-matroid bases are exactly the spanning trees of the connected component; the isolated vertices contribute no edge choice. Deletion of the primal edges is contraction of their duals.

Call a component nontrivial if it contains at least one edge, and let \(F_X\) be a spanning forest of the nontrivial components of \(H_X\). Contracting \(F_X\) makes every edge of \(E_X^\star \setminus F_X\) a loop, so the preceding duality identity and the contraction identity give

\begin{equation}\tag{4.2} \frac {\tau (\Lambda _{r,s}\setminus X)}{\tau (r,s)} = \Pr (F_X\subseteq T), \end{equation}

where \(T\) is a uniform spanning tree of \(D\).

For \(z=(z_1,z_2)\in \Z ^2\), set \(\lVert z\rVert _\infty :=\max \{|z_1|,|z_2|\}\). Two lattice vertices \(u,v\) are king-adjacent when \(\lVert u-v\rVert _\infty =1\). The perimeter vertex set of the rectangular hull is

\[ \partial \Lambda _{r,s} := \{(x,y)\in \Lambda _{r,s}: x\in \{0,r-1\}\ \text {or}\ y\in \{0,s-1\}\}. \]

Partition \(\Lambda _{r,s}\setminus S\) into components for king adjacency. Let \(\Vvac \) be the union of those components that meet \(\partial \Lambda _{r,s}\), and denote the remaining, interior components by

\[ J_1,\ldots ,J_m. \]

Here \(m\) may be zero. For a primal vertex \(v\), call the subgraph formed by the duals of the primal edges incident with \(v\) its dual face-star. Distinct king components have disjoint dual edge sets. Two primal vertices can be incident with a common bounded unit face only if their \(\ell ^\infty \)-distance is at most one; their dual face-stars are therefore vertex-disjoint, except that different boundary components can share the exterior dual vertex. Within one king component, the face-stars of successive vertices meet, so their union is connected; for a boundary component, one of these stars also meets the exterior vertex. Hence \(H_{\Vvac }\) is connected when \(\Vvac \ne \varnothing \), and each \(H_{J_i}\) is connected. Set \(F_{\Vvac }=\varnothing \) when \(\Vvac =\varnothing \); otherwise choose a spanning tree of \(H_{\Vvac }\). For \(1\le i\le m\), choose a spanning tree \(F_{J_i}\) of \(H_{J_i}\). These forest edge blocks are pairwise disjoint, and their union is a spanning forest of the nontrivial components of \(H_{\Lambda _{r,s}\setminus S}\).

We record why all deletion graphs used here are connected. Every king component \(C\) has a nearest-neighbour edge to \(S\): on a nearest-neighbour path from \(C\) to \(S\), the first vertex outside \(C\) cannot lie in another king component. Moreover, a diagonal king step between \(u,v\in C\) can be replaced by a two-edge nearest-neighbour path through an orthogonal corner of their unit square. If the corner is in \(\Lambda _{r,s}\setminus S\), it is king-adjacent to \(u\) and hence belongs to \(C\); otherwise it belongs to \(S\). Thus \(\mathcal L[S\cup C]\) is connected. It follows that every undeleted king component is joined to the common connected subgraph \(\mathcal L[S]\). Hence \(\mathcal L[\Lambda _{r,s}\setminus \Vvac ]\) and every \(\mathcal L[\Lambda _{r,s}\setminus J_i]\) are connected.

Applying (4.2) and (2.1) to the disjoint forest edge blocks gives

\begin{equation}\tag{4.3} \frac {\tau (S)}{\tau (r,s)} \le \frac { \tau (\Lambda _{r,s}\setminus \Vvac ) }{\tau (r,s)} \prod _{i=1}^m \frac {\tau (\Lambda _{r,s}\setminus J_i)}{\tau (r,s)}. \end{equation}

The factor indexed by \(\Vvac \) is one when \(\Vvac =\varnothing \).

4.2 Interior Vacancy Components

For each \(i\in \{1,\ldots ,m\}\), put \(J:=J_i\). The following argument is vacuous when \(m=0\). The dual graph \(H_J\) is a finite connected square-lattice graph. Every \(v\in J\) contributes a complete unit square to \(H_J\), formed by the four duals of the primal edges incident with \(v\). Different vertices give different squares, so

\[ \sq (H_J)\ge |J|. \]

By Theorem 2.1,

\[ \tau (H_J) \ge \exp \!\left ( \frac {4G_{\mathrm {Cat}}}{\pi }|J| \right ). \]

For every spanning tree \(F\) of \(H_J\), (4.2) gives

\[ \Pr (F\subseteq T) = \frac {\tau (\Lambda _{r,s}\setminus J)}{\tau (r,s)}. \]

These events are pairwise incompatible: the union of two distinct spanning trees on the same vertex set contains a cycle, while \(T\) is acyclic. Summing over the spanning trees of \(H_J\) therefore gives

\[ \tau (H_J)\,\frac {\tau (\Lambda _{r,s}\setminus J)}{\tau (r,s)} = \sum _{F}\Pr (F\subseteq T) \le 1, \]

which with the preceding consequence of Tapp’s theorem yields

\begin{equation}\tag{4.4} \frac {\tau (\Lambda _{r,s}\setminus J)}{\tau (r,s)} \le \frac 1{\tau (H_J)} \le \exp \!\left ( -\frac {4G_{\mathrm {Cat}}}{\pi }|J| \right ). \end{equation}

The argument used that \(J\) misses the perimeter: only then does each \(v\in J\) have four incident primal edges, whose duals close into a unit square. A vacancy on \(\partial \Lambda _{r,s}\) has fewer, so the count above does not apply to it, and the same exponential factor for the union \(\Vvac \) of the boundary-attached components is obtained differently, in Section 5.

5 Boundary-Attached Vacancies

What is proved here is a comparison of two determinants. Both \(\tau (r,s)\) and \(\tau (\Lambda _{r,s}\setminus \Vvac )\) have the form \(\det (4I-\mathsf A)\) for the adjacency matrix of a set of unit faces, and expanding \(\log \det \) in closed walks turns their ratio into a sum, over closed walks, of the number of placements meeting a face with a corner in \(\Vvac \). The first three subsections bound that number by \(|\Vvac |\) plus a multiple of the number of vacancy runs interior to a row or column; the last assembles the estimate.

Retain the boundary-vacancy set \(\Vvac \subseteq \Lambda _{r,s}\setminus S\) from the preceding section. For \(z\in \Z ^2\) and \(A\subseteq \Z ^2\), define the translate

\[ z+A:=\{z+a:a\in A\}. \]

Let

\[ \Phi = \{0,\ldots ,r-2\}\times \{0,\ldots ,s-2\} \]

index the unit faces of \(R_{r,s}\). The face indexed by \(z\in \Phi \) has corner set \(z+\{0,1\}^2\). Define the marked and unmarked face sets by

\[ M = \{z\in \Phi :(z+\{0,1\}^2)\cap \Vvac \ne \varnothing \}, \qquad U=\Phi \setminus M. \]

An interval component is a maximal nonempty set of consecutive integers. Let \(\rho _x\) be the total number of interval components of \(\Lambda _{r,s}\setminus \Vvac \) in all horizontal rows, and let \(\rho _y\) be the corresponding total in all vertical columns. Put

\[ g_x=\rho _x-s,\qquad g_y=\rho _y-r. \]

Every row and column contains a vertex of \(S\). Indeed, minimality gives a vertex of \(S\) on each of the two extreme columns, and a nearest-neighbour path in \(S\) between them visits every intermediate column. The row statement is identical. Consequently \(g_x,g_y\ge 0\). Here a run of \(\Vvac \) is an interval component of \(\Vvac \) in a row or column, and it is internal when it touches neither endpoint of that row or column. Then \(g_x\) is exactly the total number of horizontally internal runs of \(\Vvac \), and \(g_y\) is the corresponding number of vertically internal runs.

5.1 One-Dimensional Windows

We begin with an elementary interval estimate.

Lemma 5.1. Let \(L\ge 0\) be an integer, let \(B\subseteq \{0,\ldots ,L\}\), and let \(i(B)\) be the number of interval components of \(B\) that touch neither endpoint. For an integer \(p\) with \(0\le p\le L\), the number of integer intervals

\[ [t,t+p]:=\{t,t+1,\ldots ,t+p\}\subseteq \{0,\ldots ,L\}, \qquad t\in \Z , \]

that meet \(B\) is at most

\[ |B|+p\,i(B). \]

Proof. A boundary run of length \(a\) is met by at most \(a\) such intervals, whereas an internal run of length \(a\) is met by at most \(a+p\). Summing over the runs proves the claim; any double counting only strengthens the upper bound. □

For an integer \(p\) with \(0\le p\le r-1\), define

\[ Y_p = \left \{ (x,y)\in \{0,\ldots ,r-1-p\}\times \{0,\ldots ,s-1\}: ([x,x+p]\times \{y\})\cap \Vvac \ne \varnothing \right \}. \]

Applying Lemma 5.1 in each row gives

\begin{equation}\tag{5.1} |Y_p|\le |\Vvac |+p g_x. \end{equation}

5.2 A Sliding-Window Injection

For an integer \(x\) with \(0\le x\le r-1-p\), let

\[ Y_{p,x}=\{y:(x,y)\in Y_p\}. \]

The second ingredient is

\begin{equation}\tag{5.2} \sum _{x=0}^{r-1-p}i(Y_{p,x})\le g_y. \end{equation}

It is proved in two steps: each internal interval component of \(Y_{p,x}\) contains the projection of a connected piece of vacancy runs lying in the window and carrying no run that touches row \(0\) or row \(s-1\); and those pieces, taken over all windows, inject into the vertically internal runs of \(\Vvac \).

To prove it, form the full run graph, whose vertices are the maximal vertical runs of \(\Vvac \). Join two runs in adjacent columns when their integer intervals overlap or are adjacent, and mark a run if it touches row \(0\) or row \(s-1\). The connected components of the full run graph are precisely the king components of \(\Vvac \). Since every such component meets \(\partial \Lambda _{r,s}\), it contains either a marked run or a run in column \(0\) or \(r-1\).

Fix once and for all a rooted spanning tree in every component of the full run graph. Use a marked run as the root whenever possible, and otherwise use a run in column \(0\) or \(r-1\). For the window of columns \([x,x+p]\), consider the subgraph of the full run graph induced by the run vertices whose columns lie in this window. In each of its components containing no marked run, choose a run of minimum depth, where depth is measured in the previously fixed rooted tree.

If the chosen run is not the root, its parent lies outside the window; otherwise the parent would belong to the same induced component at a smaller depth. Parent and child lie in adjacent columns. If the parent is to the left, then \(x\) is the child’s column; if the parent is to the right, then \(x\) is the child’s column minus \(p\). Thus the oriented parent–child pair determines the window start uniquely. If the chosen run is an unmarked root, column \(0\) forces \(x=0\), while column \(r-1\) forces \(x=r-1-p\). Therefore the pairs

\[ (\text {window},\text {unmarked induced component}) \]

inject into the unmarked vertices of the full run graph. These vertices are exactly the vertically internal runs of \(\Vvac \), of which there are \(g_y\).

Every internal interval component of \(Y_{p,x}\) contains the vertical projection of an induced run-graph component containing no marked run. The projection of a connected induced run-graph component is itself an integer interval, because adjacent runs overlap or are one unit apart. Distinct interval components therefore contain distinct such induced components. This proves (5.2).

For integers \(a,b\) with \(1\le a\le r\) and \(1\le b\le s\), define

\[ \win _{a,b}(\Vvac ) := \left | \left \{ (x,y)\in \Z ^2: \begin {array}{l} 0\le x\le r-a,\quad 0\le y\le s-b,\\ ([x,x+a-1]\times [y,y+b-1])\cap \Vvac \ne \varnothing \end {array} \right \} \right |. \]

Applying Lemma 5.1 vertically and then using (5.1) and (5.2) gives, for every integer \(q\) with \(0\le q\le s-1\),

\begin{equation}\tag{5.3} \win _{p+1,q+1}(\Vvac ) \le |\Vvac |+p g_x+q g_y. \end{equation}

5.3 Closed-Walk Charging

For an integer \(\ell \ge 1\), put \(e_1=(1,0)\) and \(e_2=(0,1)\). A closed step word of length \(\ell \) is a sequence

\[ \omega =(d_1,\ldots ,d_\ell ), \qquad d_i\in \{\pm e_1,\pm e_2\}, \qquad \sum _{i=1}^{\ell }d_i=0. \]

Define its partial-sum set by

\[ P_\omega = \{0,d_1,d_1+d_2,\ldots ,d_1+\cdots +d_\ell \}, \]

and set

\[ r_x(\omega ) = \max _{z\in P_\omega }z_1-\min _{z\in P_\omega }z_1, \qquad r_y(\omega ) = \max _{z\in P_\omega }z_2-\min _{z\in P_\omega }z_2. \]

Let \(\mathcal C_\ell \) be the set of closed words of length \(\ell \), and put \(w_\ell =|\mathcal C_\ell |\).

We use two exact closed-walk sums. The first is the standard square-lattice tree-entropy identity [SW00]:

\begin{equation}\tag{5.4} \sum _{\ell \ge 1}\frac {w_\ell }{\ell 4^\ell } = \log 4-\frac {4G_{\mathrm {Cat}}}{\pi }. \end{equation}

This series is absolutely convergent: \(w_{2a}=\binom {2a}{a}^2\) for \(a\ge 1\), so its nonzero terms are \(O(a^{-2})\). The second is

\begin{equation}\tag{5.5} \sum _{\ell \ge 1}\frac 1{\ell 4^\ell } \sum _{\omega \in \mathcal C_\ell }(r_x(\omega )+1) = \log \frac 4{1+\sqrt 2}. \end{equation}

We include the proof of (5.5). Let \(a\ge 1\) and \(h=2a\). A one-dimensional bridge of length \(h\) is a sequence \(\gamma =(\gamma _0,\ldots ,\gamma _h)\) such that \(\gamma _0=\gamma _h=0\) and \(\gamma _t-\gamma _{t-1}\in \{-1,1\}\) for \(1\le t\le h\). Define

\[ \operatorname {span}(\gamma ) := \max _{0\le t\le h}\gamma _t-\min _{0\le t\le h}\gamma _t. \]

Thus \(\operatorname {span}(\gamma )+1\) is the number of integer levels visited by \(\gamma \). For an integer \(k>0\) and a bridge that visits \(k\), let \(\sigma _k\) be its first visit to \(k\), and set

\[ \gamma'_t = \begin {cases} \gamma _t,&t\le \sigma _k,\\ 2k-\gamma _t,&t\ge \sigma _k. \end {cases} \]

This reflection is a bijection with unrestricted walks of length \(h\) from \(0\) to \(2k\). The negative levels are symmetric, while level zero is visited by every bridge. Summing over levels rather than over bridges,

\begin{align*} \sum _{\substack {\gamma _0=\gamma _h=0\\ \gamma _t-\gamma _{t-1}\in \{-1,1\},\ 1\le t\le h}} (\operatorname {span}(\gamma )+1) &= \binom {h}{a} + \sum _{k=1}^a \left [ \binom {h}{a+k}+\binom {h}{a-k} \right ]\\ &=2^h. \end{align*}

For even \(\ell \), condition a two-dimensional closed word on the even number \(h\) of its horizontal steps and on their positions. Write \([\zeta ^0]\) for extraction of the constant term in the formal variable \(\zeta \). The bridge identity is also immediate when \(h=0\). Using it gives

\begin{align*} \sum _{\omega \in \mathcal C_\ell }(r_x(\omega )+1) &= \sum _{\substack {0\le h\le \ell \\h\ \mathrm {even}}} \binom {\ell }{h}2^h \binom {\ell -h}{(\ell -h)/2}\\ &= [\zeta ^0](2+\zeta +\zeta ^{-1})^\ell = \binom {2\ell }{\ell }. \end{align*}

There are no closed words for odd \(\ell \). For \(|t|<1/4\), define

\[ \mathcal B(t) := \sum _{\ell \ge 1} \binom {2\ell }{\ell }\frac {t^\ell }{\ell } = 2\log \frac 2{1+\sqrt {1-4t}}. \]

At \(t=\pm 1/4\), its terms are \(O(\ell ^{-3/2})\), so both boundary series converge. Abel’s theorem extends the displayed closed form to both endpoints, applied to \(\mathcal B(-t)\) for the negative endpoint. Taking the even part gives

\[ \frac {\mathcal B(1/4)+\mathcal B(-1/4)}2 = \log \frac 4{1+\sqrt 2}, \]

which proves (5.5).

Define

\[ N(M;\omega ) := \left | \{z\in \Z ^2:z+P_\omega \subseteq \Phi ,\ (z+P_\omega )\cap M\ne \varnothing \} \right |. \]

Its bounding face rectangle has \(r_x(\omega )+1\) face columns and \(r_y(\omega )+1\) face rows. The corresponding primal vertex window has \(r_x(\omega )+2\) columns and \(r_y(\omega )+2\) rows and meets \(\Vvac \). For fixed \(\omega \), translation by its coordinatewise minima makes the map from a start \(z\) to this window’s lower-left corner injective. If either span is too large for \(\Phi \), there is no admissible start and the desired estimate is immediate. Otherwise, taking \(p=r_x(\omega )+1\) and \(q=r_y(\omega )+1\) in (5.3) yields

\begin{equation}\tag{5.6} N(M;\omega ) \le |\Vvac | +g_x(r_x(\omega )+1) +g_y(r_y(\omega )+1). \end{equation}

5.4 The Determinant Estimate

Recall that \(M\) and \(U=\Phi \setminus M\) are respectively the marked and unmarked face sets. Every face in \(M\) belongs to a face-star indexed by \(\Vvac \). Since every king component of \(\Vvac \) meets the boundary, contraction of \(E_{\Vvac }^\star \) joins all these face vertices to the exterior dual vertex. On the other hand, a face indexed by \(U\) has no corner in \(\Vvac \), so all four primal boundary edges remain. Thus the bounded faces of \(R_{r,s}[\Lambda _{r,s}\setminus \Vvac ]\) are exactly those indexed by \(U\).

For \(Y\subseteq \Phi \), let \(\mathsf A_Y\) be the adjacency matrix of the face-grid graph induced by \(Y\), and let \(I\) denote the identity matrix of the appropriate order. Rooted planar duality and the Matrix–Tree Theorem [Kir47] give

\begin{equation}\tag{5.7} \tau (r,s) = \det (4I-\mathsf A_\Phi ), \qquad \tau (\Lambda _{r,s}\setminus \Vvac ) = \det (4I-\mathsf A_U). \end{equation}

Primal bridges become dual loops and do not affect the determinant. When \(U=\varnothing \), the second determinant is the \(0\times 0\) determinant and equals one.

The horizontal edges of \(\Lambda _{r,s}\setminus \Vvac \) number \(|\Lambda _{r,s}\setminus \Vvac |-\rho _x\), and the vertical edges number \(|\Lambda _{r,s}\setminus \Vvac |-\rho _y\). Therefore

\[ |E(R_{r,s}[\Lambda _{r,s}\setminus \Vvac ])| = 2|\Lambda _{r,s}\setminus \Vvac |-\rho _x-\rho _y. \]

Since the graph is connected, Euler’s formula, together with \(g_x=\rho _x-s\), \(g_y=\rho _y-r\), and \(|\Phi |=(r-1)(s-1)\), gives

\[ |U| = |E(R_{r,s}[\Lambda _{r,s}\setminus \Vvac ])| - |\Lambda _{r,s}\setminus \Vvac |+1 = |\Lambda _{r,s}\setminus \Vvac |-\rho _x-\rho _y+1, \]

and therefore

\begin{equation}\tag{5.8} |M|=|\Vvac |+g_x+g_y. \end{equation}

The spectral radius of the rectangular face adjacency is

\[ 2\cos \frac {\pi }{r}+2\cos \frac {\pi }{s} <4. \]

Since \(\mathsf A_U\) is a principal submatrix, its spectral radius is also below \(4\), with the empty matrix assigned spectral radius zero. Hence, for \(Y\in \{\Phi ,U\}\), the matrix trace \(\operatorname {tr}\) satisfies

\begin{equation}\tag{5.9} \log \det (4I-\mathsf A_Y) = |Y|\log 4 - \sum _{\ell \ge 1} \frac {\operatorname {tr}(\mathsf A_Y^\ell )} {\ell 4^\ell }. \end{equation}

Both log-determinant series are absolutely convergent by the preceding spectral-radius bound.

The trace difference counts precisely the closed-walk starts in \(\Phi \) whose walk meets \(M\):

\begin{equation}\tag{5.10} \operatorname {tr}(\mathsf A_\Phi ^\ell ) - \operatorname {tr}(\mathsf A_U^\ell ) = \sum _{\omega \in \mathcal C_\ell }N(M;\omega ). \end{equation}

All terms used below are nonnegative, and (5.4)–(5.5) show that the dominating series are finite. Thus Tonelli’s theorem justifies the ensuing interchanges of sums. Subtract the two instances of (5.9), substitute (5.10), and apply the charging bound (5.6). Evaluating the three resulting series by (5.4) and (5.5), the \(g_y\) term by symmetry between the coordinates, and then inserting (5.8) and the identifications (5.7), gives

\begin{align*} \log \frac {\tau (r,s)} {\tau (\Lambda _{r,s}\setminus \Vvac )} &\ge |M|\log 4 - |\Vvac |\left (\log 4-\frac {4G_{\mathrm {Cat}}}{\pi }\right ) - (g_x+g_y)\log \frac 4{1+\sqrt 2} \notag \\ &= \frac {4G_{\mathrm {Cat}}}{\pi }|\Vvac | + \alpha (g_x+g_y) \notag \\ &\ge \frac {4G_{\mathrm {Cat}}}{\pi }|\Vvac |. \end{align*}

We have proved the boundary factor

\begin{equation}\tag{5.11} \frac {\tau (\Lambda _{r,s}\setminus \Vvac )}{\tau (r,s)} \le \exp \!\left ( -\frac {4G_{\mathrm {Cat}}}{\pi }|\Vvac | \right ). \end{equation}

Completion of the proof of Lemma 4.1. Substitute (4.4) and (5.11) into (4.3). Since \(\Lambda _{r,s}\setminus S\) is the disjoint union of \(\Vvac ,J_1,\ldots ,J_m\), we obtain

\[ \frac {\tau (S)}{\tau (r,s)} \le \exp \!\left ( -\frac {4G_{\mathrm {Cat}}}{\pi } |\Lambda _{r,s}\setminus S| \right ). \]

Both tree counts are positive because \(\mathcal L[S]\) and \(R_{r,s}\) are connected. Taking logarithms gives (4.1). □

6 Proof of Square Maximality

Proof of Theorem 1.2. Let \(|S|=n^2\). If \(\mathcal L[S]\) is disconnected, then \(\tau (S)=0<\tau (n,n)\).

Assume that \(\mathcal L[S]\) is connected. After translation and an interchange of coordinates, let its minimal rectangular vertex hull be \(\Lambda _{r,s}\), where \(r\le s\). Then

\[ rs\ge n^2, \qquad |\Lambda _{r,s}\setminus S|=rs-n^2. \]

Applying Lemmas 3.1 and 4.1 and adding their log-difference estimates gives

\[ \log \tau (S)-\log \tau (n,n) \le -\frac {4G_{\mathrm {Cat}}}{\pi }(rs-n^2) +\frac {4G_{\mathrm {Cat}}}{\pi }(rs-n^2) =0. \]

This proves the inequality.

If \((r,s)\ne (n,n)\), Lemma 3.1 is strict, so equality is impossible. If \(r=s=n\), then the hull and \(S\) both have \(n^2\) vertices, hence \(S=\Lambda _{n,n}\). Undoing the translation and lattice symmetry gives the stated equality characterization. □

7 Discussion

The rectangular area penalty bounds the gain available from enlarging the hull, and the normalized hull inequality charges every omitted vertex by exactly the same entropy constant. In log-difference form the two estimates add, their constants cancel, and strictness comes entirely from the rectangular estimate.

Use of AI tools

A substantial part of the reasoning in this paper was developed with the assistance of a large language model. Both runs used Work mode with Speed mode enabled. GPT-5.6 Sol, at the Extra High reasoning setting, worked on the initial prompt below for 87 minutes 7 seconds and returned incomplete results. GPT-5.6 Sol Ultra continued from those results under the shorter follow-up prompt and produced its result after 199 minutes 9 seconds. The raw output became the basis for a substantial part of the present argument, in particular Lemmas 3.1 and 4.1. I manually checked the argument, prepared the bibliography, checked each citation against its source, and wrote the present note. Both prompts are published below.

I am deeply grateful to Sloan Nietert for many helpful suggestions and insightful discussions. I also thank him for collaborating with me on the prompting strategy for this problem and, in particular, for his “breakthrough” prompt.

Final verification (August 22, 2026). The square-maximality theorem as stated here for arbitrary finite square-lattice subgraphs, together with its equality characterization and complete proof chain, has been formalized in Lean 4 and checked by the Lean kernel. The formalization and its reproducible trust audit are available in the public repository. I also completed a paper-to-Lean specification audit matching the definitions, hypotheses, intermediate results, and conclusions in the formalization to the mathematical claims in this manuscript.

Palomar registration (August 23, 2026). The Lean verification has been registered in the Palomar Registry at a fixed commit of the public submission repository. The registration metadata records the role of the model and the subsequent human and kernel-level checks.

References

  1. [BP93] Robert Burton and Robin Pemantle. Local characteristics, entropy and limit theorems for spanning trees and domino tilings via transfer-impedances. The Annals of Probability, 21(3):1329–1371, 1993. doi:10.1214/aop/1176989121.
  2. [Chu99] Fan R. K. Chung. Spanning trees in subgraphs of lattices. In Applications of Curves over Finite Fields, volume 245 of Contemporary Mathematics, pages 201–219. American Mathematical Society, 1999. doi:10.1090/conm/245/03734.
  3. [Kir47] Gustav Kirchhoff. Ueber die Auflösung der Gleichungen, auf welche man bei der Untersuchung der linearen Vertheilung galvanischer Ströme geführt wird. Annalen der Physik, 148(12):497–508, 1847. doi:10.1002/andp.18471481202.
  4. [PTF22] Ariel D. Procaccia and Jamie Tucker-Foltz. Compact redistricting plans have many spanning trees. In Proceedings of the 2022 Annual ACM-SIAM Symposium on Discrete Algorithms, pages 3754–3771. SIAM, 2022. doi:10.1137/1.9781611977073.148.
  5. [SW00] Robert Shrock and F. Y. Wu. Spanning trees on graphs and lattices in \(d\) dimensions. Journal of Physics A: Mathematical and General, 33(21):3881–3902, 2000. doi:10.1088/0305-4470/33/21/303.
  6. [Swa10] Konrad J. Swanepoel. Comment on “Number of spanning trees in a grid.” MathOverflow, January 7, 2010.
  7. [Tap24] Kristopher Tapp. Spanning tree bounds for grid graphs. The Electronic Journal of Combinatorics, 31(1):P1.26, 2024. doi:10.37236/12130.
  8. [Zha26a] Jiechen Zhang. The balancing theorem for spanning trees of rectangular grid graphs. arXiv preprint arXiv:2605.23773, 2026. arXiv:2605.23773.
  9. [Zha26b] Jiechen Zhang. Extremal spanning trees in product grid graphs. arXiv preprint arXiv:2606.24016, 2026. arXiv:2606.24016.