\section{The cubic protocol: architecture and key lemmas}\label{sec:upper} This section outlines the protocol of \cref{thm:upper} (\cref{fig:proofmap}); its full specification is \cref{alg:cubic} in \cref{cubic:s1.1}, with details in \cref{app:protocol,app:physical}. \Cref{lem:payment,lem:measured,lem:oscillation}, which turn a single payment attempt into progress, are proved in full; \cref{sec:accounting,sec:private,sec:trials} give the key inequalities without the bookkeeping. \input{sections/proofmap} \subsection{The invariant and the two outcomes of a payment}\label{sec:payment} Throughout, $k\le n$ is the size of the current population, and $K$ is its size at the start of the current \emph{phase} (\cref{sec:accounting}); always $K/20$. Using one evaluation per open edge and $O(k)$ further queries, the protocol either \begin{enumerate}[label=(\roman*)] \item closes every comparison in $X$, leaves a residue of positive value for every agent, and leaves a matching whose shortfalls are at most any prescribed $\tau'>0$ in new residue units; or \item finds a piece $D\subseteq B$ and two agents whose normalized values of $D$ differ by more than $e=\min\{\tau',1\}\,b/10$, where $b=\min\{\kappa,1\}/40$; the residue $B$ is not changed. \end{enumerate} \end{lemma} \begin{proof} Null agents are set aside first; they hold favorite labels and see no change. Fix a reference agent, and let $b$ and $e$ be as in (ii): $b$ is the planned value of the new residue and $e$ is the reading tolerance. In the reference measure, cut from $B$ consecutive pieces (\emph{grants}), one for each label $\ell$, of value \[ p_\ell+\frac{1-b-\sum_{\ell'}p_{\ell'}}{k}, \] leaving a \emph{tail} of value $b$. The second summand is the same for all labels, so it affects no comparison; it only distributes the cake that is needed neither for the prices nor for the tail. Every agent evaluates the grants of her open labels and the tail. If some reading differs from the reference value by more than $e$, the discrepant piece is the piece $D$ of outcome (ii), and nothing is added to the bundles. Otherwise every grant is added to the bundle of its label and the tail becomes the new residue. Every piece is within $e$ of its planned value in every agent's measure. With the planned values, the lead of an agent's matched label over an open label is exactly the slack of that edge, by the definition of slack. Her actual lead differs from it by the reading error on one grant minus the reading error on the other, hence by at most $2e$. So after the payment every agent's shortfall is at most $2e$, and every rival designated in $X$ trails the matched label by at least $\kappa-2e$. The tail has value at least $b-e>0$ and at most $b+e$ for every agent, and \[ \kappa-2e\ >\ b+e\ \ge\ v_i(\text{tail}), \] because $b\le\kappa/40$ and $e\le b/10$; so every comparison in $X$ is closed by its matched label. (The appendix version, \cref{phys:lem3}, keeps a factor-$30$ margin here for later rounding.) Finally $2e\le\tau'(b-e)$, which is the required shortfall bound in the new units. \end{proof} \noindent Outcome (ii) means that a failed payment is not wasted: it exhibits a recorded piece on which two agents disagree, and the next lemma turns such a disagreement into a division. It is stated for a general statistic $Q$; after a failed payment one takes $Q=\ind_D$. \begin{lemma}[A measured difference gives a division; \cref{phys:lem1}\leanmark]\label{lem:measured} Suppose the residue $B$ has positive value for every agent and the current table has supporting prices of total at most $1/4$. Let $Q\colon B\to[0,1]$ be a recorded step function, and suppose the normalized means $\int_BQ\,dv_i/v_i(B)$ have a gap of size $g>0$ between two consecutive values. Call the agents whose mean lies above the gap and those whose mean lies below it the two \emph{sides}, and let $\beta=g/(1000k)$. Then there are step functions on $B$ (\emph{rates}), one per label, that give each label a fraction of every point of $B$ (a \emph{fractional division}) and leave an unallocated rate $2\beta$, such that every agent keeps her matched label, her shortfall against the labels of her own side is unchanged, and her matched label has an advantage of more than $4\beta$ over every label of the other side. \end{lemma} \begin{proof} Let $m$ be the midpoint of the gap and $I^+,I^-$ the agents above and below it. Give label $M(i)$ the rate \[ p_{M(i)}+\frac{1-2\beta-\sum_\ell p_\ell}{k}+ \begin{cases}\phantom{-}|I^-|\,(Q-m)/(8k^2), & i\in I^+,\\ -|I^+|\,(Q-m)/(8k^2), & i\in I^-.\end{cases} \] The last terms sum to zero, and the rates are nonnegative because the common middle term is at least $1/(2k)$ while the last term is at most $1/(8k)$ in absolute value. Here and below a label belongs to the side of its matched agent. The first two terms are the grant of \cref{lem:payment} with $2\beta$ in place of $b$; as there, they turn every slack into an actual lead. Within each side the last term is common to all labels, so comparisons inside a side are not affected. Now let $i\in I^+$ and write $\mu_i=\int_BQ\,dv_i/v_i(B)\ge m+g/2$. In agent $i$'s normalized measure the last term adds $|I^-|(\mu_i-m)/(8k^2)$ to the labels of her side and subtracts $|I^+|(\mu_i-m)/(8k^2)$ from those of the other side. As $|I^+|+|I^-|=k$, her matched label gains on every label of the other side by \[ \frac{\mu_i-m}{8k}\ \ge\ \frac{g}{16k}\ >\ 4\beta , \] on top of the nonnegative slack. The case $i\in I^-$ is symmetric. \end{proof} A gap always exists: $k$ normalized means of range $\Delta$ have two consecutive values at distance at least $\Delta/(k-1)$. The fractional division is then turned into actual pieces by moment-preserving rounding with representative measures (\cref{phys:sec3}). Its cost of $O(k^2s)$ queries is paid by the cubic potential (\cref{sec:cube}). \begin{example}[One payment among three agents]\label{ped:toy-upper} We follow \cref{lem:raise,lem:payment,lem:measured} with round numbers, taking a larger tail $b=0.02$ than \cref{lem:payment} allows (harmless with exact readings). The cake is $[0,2]$; $[0,1]$ is already allocated as three fixed bundles $\ell_1,\ell_2,\ell_3$, valued as in the left block below, and the residue is $B=[1,2]$, with $v_i(B)=1$ for all $i$; agents $1,2$ are uniform on $B$. Every two entries of a row differ by less than $1$, so $G=K_{3,3}$. \begin{center} \small \begin{tabular}{@{}lccc@{\qquad}ccc@{\qquad}ccc@{}} \toprule & \multicolumn{3}{c}{table $A_{i\ell}$} & \multicolumn{3}{c}{slack $s_{i\ell}$ (after raising)} & \multicolumn{3}{c}{new values, Scenario~I}\\ \cmidrule(r){2-4}\cmidrule(lr){5-7}\cmidrule(l){8-10} & $\ell_1$ & $\ell_2$ & $\ell_3$ & $\ell_1$ & $\ell_2$ & $\ell_3$ & $\ell_1$ & $\ell_2$ & $\ell_3$\\ \midrule agent $1$ & $\mathbf{0.60}$ & $0.40$ & $0.30$ & $0$ & $0.13$ & $0.23$ & $\mathbf{0.88}$ & $0.75$ & $0.65$\\ agent $2$ & $0.52$ & $\mathbf{0.50}$ & $0.35$ & $0.05$ & $0$ & $0.15$ & $0.80$ & $\mathbf{0.85}$ & $0.70$\\ agent $3$ & $0.20$ & $0.45$ & $\mathbf{0.50}$ & $0.37$ & $0.05$ & $0$ & $0.48$ & $0.80$ & $\mathbf{0.85}$\\ \bottomrule \end{tabular} \end{center} The identity matching is optimal ($W(A)=1.60$), but agent~$2$ has shortfall $0.02$. All six non-matching edges have assignment loss at least $\kappa=0.15$, so \cref{lem:raise}(b) raises them by $\kappa/k=0.05$; the new prices $p=(0,0.07,0.07)$ give each of them slack at least $0.05$ (middle block). With agent~$1$ as reference, the grants of $\ell_1,\ell_2,\ell_3$ are $[1,1.28]$, $[1.28,1.63]$, $[1.63,1.98]$ (value $p_\ell+0.28$), and the tail is $[1.98,2]$; agents $2,3$ read them, $11$ queries in total. \emph{Scenario~I:} if agent~$3$ is uniform on $B$ too, every margin in the right block equals the slack, at least $0.05>0.02=v_i(\text{tail})$, so all six comparisons close and $G=M$. \emph{Scenario~II:} if agent~$3$ has density $3/2$ on $[1,\frac32)$ and $1/2$ on $[\frac32,2]$, she reads $D=[1,1.28]$ as $0.42$ rather than $0.28$, and the payment ends in outcome~(ii). With $Q=\ind_D$, \cref{lem:measured} has $g=0.14$, $I^+=\{3\}$, $I^-=\{1,2\}$, and gives agent~$3$'s label an advantage $0.07/24=g/(16k)$ over the others: she likes the left end of the residue more, so her label gets more of it. After rounding, the split $\{3\},\{1,2\}$ lowers the cubic potential by $27-9=18\ge k^2s=9$. \end{example} \subsection{Where the cubic bound comes from}\label{sec:accounting} A payment on a graph $G$ with $|G|$ open edges costs $\Theta(|G|)$ queries, so it is affordable only if it closes many comparisons. At the densest scale a payment costs $O(K^2)$ queries and closes $\Omega(K)$ comparisons, so there can be only $O(K)$ such payments, costing $O(K^3)$. At the sparse end the graph has only $K^2/\poly\log K$ edges, so a payment is cheap enough to be charged to a decrease of the number of certificates by a constant factor; since there are only $\exp(O(K\log K))$ certificates (\cref{sec:certificates}), this can happen only $O(K\log K)$ times. Intermediate scales interpolate between these regimes so that the costs form a convergent series. The protocol therefore works with a decreasing sequence of degree thresholds, one per \emph{level} $j$ (recursion depth). A \emph{phase} starts with a population of $K$ agents and follows, through divisions, the unique group of more than $K/2$ agents; a group of at most $K/2$ agents starts a new phase. In a phase, level $j$ uses the threshold \[ d_j=\lfloor K/T_j\rfloor,\qquad T_j=u_1u_2\cdots u_j,\qquad u_j=\lceil C(j+2)^p\rceil , \] with absolute constants $C,p$. The \emph{readers} of a label are the agents with an open comparison against it, and a label is \emph{heavy} at level $j$ if it has at least $d_j$ readers. An \emph{invocation} is one recursive call. A level-$j$ invocation is entered only when the graph has more than $500K^2/T_j$ edges, and its \emph{weight} $w_j\approx Kd_{j-1}\cdot\poly(j)$ is the number of queries it may spend. A \emph{component of heavy labels} is a connected component of the graph formed by the heavy labels and their readers. An agent with exactly one open heavy comparison is \emph{pendant}, and that comparison is \emph{protected}: since degrees only decrease, protected comparisons are created and lost only $O(K)$ times per level. Invocations run as \emph{trials}, whose proposed payments the caller verifies before they become permanent (\cref{sec:trials}). Each invocation ends in one of the following outcomes, and each outcome is paid from a different potential: \begin{center} \small \begin{tabularx}{\textwidth}{@{}>{\raggedright\arraybackslash}p{.36\textwidth}>{\raggedright\arraybackslash}X@{}} \toprule Outcome of an invocation at level $j$ & Paid from\\ \midrule Bulk payment: $\Omega(d_j)$ comparisons closed & the $O(Kd_{j-1}\log(2K/d_{j-1}))$ distinct edges available at level $j$\\ \rowsep Structural event: a heavy label becomes light, a component of heavy labels splits, a protected edge is lost & $O(K\cdot\poly(j))$ such events per level (\cref{cubic:sec4})\\ \rowsep Dense placement: the certificate count drops by a factor $K^{\Omega(1)}$ & $\log(\#\text{certificates})=O(K\log K)$, so $O(K)$ events per phase (\cref{sec:oscillation})\\ \rowsep Division of the population & the cubic potential $\sum(\text{size})^3$ (\cref{lem:cube})\\ \rowsep Failed or discarded trial & the verified outcome of a later trial at the same depth, with overhead $1+O((j+2)^{-2})$ (\cref{sec:trials})\\ \bottomrule \end{tabularx} \end{center} \noindent For instance, bulk payments at level $j$ number at most $O(Kd_{j-1}\log(2K/d_{j-1}))/d_j$ and each costs $O(Kd_{j-1}\poly(j))$, so together they cost \[ O\Bigl(\frac{K^2d_{j-1}^2\log(2T_{j-1})}{d_j}\,\poly(j)\Bigr)=O\Bigl(K^3\,\frac{u_j\,\poly(j)\,\log(2T_{j-1})}{T_{j-1}}\Bigr), \] using $d_j\approx K/T_j$ and $T_j=u_jT_{j-1}$; the sum over $j$ is $O(K^3)$ because $T_{j-1}=\prod_{j'0$, then at least $k$ comparisons of $H$ have assignment loss at least $b_H$. \end{lemma} \noindent For the first part, take an optimal additive bound (one attaining $b_H$), keep exactly the fewer than $k$ entries whose error exceeds $b_H$, and cap every other bound $u_i+p_\ell$ at the row maximum. Since $\min\{|H|^2,k\}\le|H|\sqrt k$, all classes together use $O(k^{3/2})$ numbers. For the second part, take supporting prices of an optimal matching $M$ of the whole graph and put $u_i=a_{iM(i)}+p_{M(i)}$. By \eqref{eq:support} the row potentials $u_i$ and column potentials $-p_\ell$ form an additive upper bound, and its errors are exactly the slacks. By the definition of $b_H$ at least $k$ of these slacks are at least $b_H$, and the assignment loss of an edge is at least its slack (\cref{sec:prices}). Later grants change private entries only by column constants common to $H$ and a common rescaling, which this argument absorbs. So there are two cases. If the compression error $b_H$ is small, it is absorbed by a reserve. Otherwise a single payment closes at least $k>K/2$ comparisons; as a phase closes at most $K^2$ comparisons and a payment's weight is $O(K^2)$, such payments cost $O(K^3)$ in all. \subsection{Direct placements: a common certificate is rare}\label{sec:oscillation} Inside a component of heavy labels, a reference agent $r$ reads many heavy labels; call them \emph{heads}, and let $J$ be a set of $|J|=\Theta(d)$ of them. The protocol holds a small piece on which the readers disagree: reader $u$ values it at a normalized \emph{score} $z_u$, while $r$ values all such pieces equally. It may add this piece to the bundle of any one head $h$ (a \emph{placement}). That changes only column $h$ of the table, by $z_u$ in the row of each reader $u$, so the weight of a matching $M$ changes by $z_{M[h]}$ plus a constant, where $M[h]$ is the agent holding $h$ in $M$. If the scores vary, some comparisons at $h$ acquire assignment loss and can be paid. For each head $h\in J$, let $G_h$ be the graph that remains after paying for every edge of assignment loss at least a threshold $\lambda$ in the table of placement $h$. If some $G_h$ is disconnected (which yields a division), loses a protected edge, or loses $\Omega(d)$ edges, the protocol makes that placement and is paid by the corresponding row of the table in \cref{sec:accounting}. The danger is that every placement pays for only a few comparisons. The lemma below shows that then each fixed certificate (\cref{sec:certificates}) survives in only a few of the graphs $G_h$, so some placement destroys almost all certificates. Let $a_h(M)$ be the weight of a matching $M$ in the table of placement $h$. The placements differ only in which head receives the piece, so \begin{equation}\label{eq:osc-form} a_h(M)=a(M)+z_{M[h],h}+c_h+e_h(M),\qquad |e_h(M)|\le\rho, \end{equation} where $a(M)$ is common to all placements, $z_{u,h}$ is the score of agent $u$ for the piece at head $h$, $c_h$ is a constant, and $e_h(M)$ is a small error (in the protocol it comes from the interchangeable backup pieces that a placement swaps; \cref{cubic:sec3}). \begin{lemma}[Oscillation in a common certificate\leanmark]\label{lem:oscillation}\label{cubic:lem3} Assume \eqref{eq:osc-form}, and suppose every matching of $G_h$ has $a_h$-weight within $\gamma$ of the optimum. Let $\xi=2\gamma+4\rho$ and let $S$ be a nonempty set of heads such that $I=\bigcap_{h\in S}G_h$ is a spanning matching-covered graph. If the readers in $I$ of some head of $S$ have scores of range greater than $3\xi$, then \[ \sum_{h\in S}\deg_I(h)\ \le\ 2k . \] \end{lemma} \begin{figure}[t] \centering \begin{tikzpicture}[x=1cm,y=1cm,font=\small, lb/.style={rectangle,draw,fill=gray!12,inner sep=2pt,minimum size=15pt}, arc/.style={-{Stealth[length=2.2mm]},thick}] \begin{scope} \node[font=\small\bfseries,anchor=west] at (-.4,2.0) {(a) the cycle avoids $j$}; \node[lb] (m) at (0,0) {$M(u)$}; \node[lb,fill=uc!25] (h) at (1.8,1.1) {$h$}; \node[lb] (x) at (3.6,0) {$x$}; \node[lb] (y) at (1.8,-1.1) {$y$}; \node[lb,fill=negc!15] (j) at (5.0,-1.1) {$j$}; \draw[arc,uc,line width=1.4pt] (m)--node[above left,font=\scriptsize]{$u$}(h); \draw[arc] (h)--(x); \draw[arc] (x)--(y); \draw[arc] (y)--(m); \node[font=\scriptsize,align=center] at (5.0,-.35) {untouched}; \node[font=\scriptsize,align=left,anchor=north west] at (-.4,-1.6) {rotate: $u$ now holds $h$,\\ the holder of $j$ is unchanged}; \end{scope} \begin{scope}[xshift=7.6cm] \node[font=\small\bfseries,anchor=west] at (-.4,2.0) {(b) the cycle passes through $j$}; \node[lb] (m) at (0,0) {$M(u)$}; \node[lb,fill=uc!25] (h) at (1.8,1.1) {$h$}; \node[lb] (x) at (3.6,0) {$x$}; \node[lb,fill=negc!15] (j) at (1.8,-1.1) {$j$}; \draw[arc,gray!60] (m)--(h); \draw[arc,gray!60] (h)--(x); \draw[arc] (x)--(j); \draw[arc] (j)--(m); \draw[arc,negc,line width=1.4pt] (m) to[bend left=35] node[right,font=\scriptsize,pos=.55]{$u$} (j); \node[font=\scriptsize,align=left,anchor=north west] at (-.4,-1.6) {use the shortcut $M(u)\to j$ and the part of\\ the cycle from $j$ back: $u$ now holds $j$,\\ the holder of $h$ is unchanged}; \end{scope} \end{tikzpicture} \caption{The rotation step in the proof of \cref{lem:oscillation}, in the digraph obtained by contracting the matching $M$ (an arc $M(v)\to\ell$ means agent $v$ may take label $\ell$). Strong connectivity, i.e.\ matching-coveredness, provides a cycle through the arc $M(u)\to h$. Either way we get a matching that changes the holder of exactly one of the two heads, so the scores at the two heads cannot move together.} \label{fig:rotation} \end{figure} \begin{proof} For matchings $P,P'$ of $I$ and heads $h,j\in S$, the common terms $a(\cdot)$ and $c_h$ cancel in $a_h(P)-a_h(P')-a_j(P)+a_j(P')$, each of the two table differences is at most $\gamma$ in absolute value, and the four error terms add at most $4\rho$; hence \begin{equation}\label{eq:osc-compare} \bigl|(z_{P[h],h}-z_{P'[h],h})-(z_{P[j],j}-z_{P'[j],j})\bigr|\ \le\ \xi . \end{equation} Take the two extreme readers of the head of range greater than $3\xi$; both edges extend to matchings $P,P'$ of $I$, and by \eqref{eq:osc-compare} their assigned scores differ by more than $2\xi$ at \emph{every} head of $S$. For $M\in\{P,P'\}$ and $h\in S$ let \[ U_h(M)=\{u\in N_I(h):\ |z_{u,h}-z_{M[h],h}|>\xi\}. \] \emph{For fixed $M$ these sets are disjoint.} Suppose $u\in U_h(M)\cap U_j(M)$ with $h\ne j$; then $u$ holds neither $h$ nor $j$. In the contraction of $M$, which is strongly connected, take a simple cycle through the arc $M(u)\to h$ (\cref{fig:rotation}). If it avoids $j$, rotating $M$ along it gives a matching $M'$ of $I$ with $M'[h]=u$ and $M'[j]=M[j]$. If it passes through $j$, the arc $M(u)\to j$ followed by the part of the cycle from $j$ back to $M(u)$ is a cycle avoiding $h$, and rotating along it gives $M'[j]=u$ and $M'[h]=M[h]$. In either case \eqref{eq:osc-compare} for $(M',M)$ compares a change of more than $\xi$ at one head with a change of zero at the other, a contradiction. Hence $\sum_{h\in S}|U_h(M)|\le k$ for each of $P,P'$. Finally, every $u\in N_I(h)$ lies in $U_h(P)\cup U_h(P')$: otherwise $|z_{P[h],h}-z_{P'[h],h}|\le2\xi$ by the triangle inequality. Summing over $P$ and $P'$ proves the lemma. \end{proof} \paragraph{From the lemma to certificate decrease.} In our application the score does not depend on the head, $z_{u,h}=z_u$, and $\gamma=k\lambda$: a matching of $G_h$ has $k$ edges, each of assignment loss and hence of slack below $\lambda$, and by \eqref{eq:slack-sum} its weight is below the optimum by the sum of these slacks. Let $s=\lfloor d/100\rfloor$ and suppose that no $G_h$ is disconnected, loses a protected edge, or loses at least $s$ edges. Fix a certificate of $G$ and let $S$ be the set of heads $h\in J$ such that $G_h$ still contains it. If $S\neq\emptyset$, the graph $I=\bigcap_{h\in S}G_h$ contains the certificate, so contracting the certificate's matching in $I$ gives a strongly connected digraph, and $I$ is spanning and matching-covered (\cref{sec:certificates}). Every head has at least $d$ readers in $G$, and fewer than $s|S|$ edges of $G$ are missing from $I$, so $\sum_{h\in S}\deg_I(h)\ge(d-s)|S|$. The precision choices guarantee the range condition at some head of $S$ (\cref{cubic:s3.4}), so \cref{lem:oscillation} gives $|S|\le2k/(d-s)=O(k/d)$. Now count the pairs (certificate, head whose graph $G_h$ contains it). Each certificate is in $O(k/d)$ pairs and there are $|J|=\Theta(d)$ heads, so for some head $h$ the graph $G_h$ contains at most an $O(k/d^2)=O(K/d^2)$ fraction of the certificates. At all used levels $d\ge K/\poly\log K$, so this fraction is at most $K^{-1/2}$, and the logarithm of the certificate count drops by $\Omega(\log K)$. Since it starts at $O(K\log K)$ and never increases (also across divisions, \cref{sec:certificates}), this happens $O(K)$ times per phase, at cost $O(K^2)$ each. \subsection{Trials, recursion, and keeping a measured gap}\label{sec:trials} The protocol rarely knows in advance which payment will succeed, so it runs \emph{trials}: a recursive call proposes a list of payments and deletions on a reserved part of the residue (a \emph{working slot}), using representative valuations, and its caller verifies the whole list in the true valuations before anything becomes permanent. A failed trial may have consumed many queries, so successive trials, each on its own slot, get growing query \emph{quotas}. When a trial stops (by running out of quota or by finding progress), the caller first checks, with a single payment, whether its proposed progress is real (\cref{phys:lem18}); only if it is not does the caller start a new trial, with a quota larger by the factor $(j+2)^2$. Let $\alpha_j$ bound the ratio between all queries spent in a level-$j$ subtree, including every discarded slot, and the weight of what it returns. An accepted \emph{ordinary} return (one that reached its quota) comes from the last slot, and the earlier slots and the local cost are smaller by a factor $(j+2)^{-2}$, so its verified progress pays for the discarded trials. This gives \[ \alpha_j\ \le\ \Bigl(1+\frac{C'}{(j+2)^2}\Bigr)\alpha_{j+1}+\frac{C'}{(j+2)^2} \qquad\Longrightarrow\qquad \alpha_j\ \le\ e^{C'}\,(\alpha_{\rm bot}+C') \] for an absolute constant $C'$, where $\alpha_{\rm bot}$ is the ratio at the bottom level; the bound is uniform in $j$ and in the depth of the bottom level (\cref{cubic:sec6})\leanmark, since $\prod_{j\ge0}(1+C'(j+2)^{-2})\le e^{C'}$. A measured division needs one more precaution. A child may return a separating statistic $Q$ (as in \cref{lem:measured}) on the piece $E$ of cake that it still holds. The caller's residue is larger: it consists of $E$ and of cake that the caller reserved for itself. Extending $Q$ to this larger residue would dilute the gap $g$ at every level and destroy the polynomial precision. Instead, when $E$ is significant, the caller pays out its own reserved cake as actual grants, tested in all required valuations (\cref{fig:settlement} in \cref{cubic:sec5}). On success the residue is again exactly $E$, and the call returns the old $E$, the old density on it, and the old statistic $Q$, with the same gap. On failure the failed test is itself a fresh discrepancy of controlled size. \subsection{Completing the proof} Every comparison is closed by a verified witness, every division pays all cross-group comparisons and partitions the parent residue, and the terminal assignment gives the remaining residue to favorite labels. By \cref{lem:domination} the final allocation is envy-free. The accounting of \cref{sec:accounting} bounds the queries of all actual and all discarded trials by $O(K^3)$ per phase, and divisions cost $O(n^3)$ by \cref{cor:tree}. The formal proof of \cref{thm:upper} is in \cref{cubic:sec7}, and the query count in \cref{cubic:sec6}.