\documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[a4paper,margin=27mm]{geometry} \usepackage{amsmath,amssymb,amsthm,mathtools} \usepackage{microtype} \usepackage{aliascnt} \usepackage{enumitem} \usepackage{xcolor} \usepackage{booktabs} \usepackage[hidelinks]{hyperref} \usepackage[nameinlink,noabbrev]{cleveref} \usepackage{todonotes} \usepackage{array} \setlist{itemsep=3pt,topsep=5pt,parsep=0pt} \setlength{\emergencystretch}{2em} \allowdisplaybreaks[2] \newtheorem{theorem}{Theorem}[section] \newaliascnt{lemma}{theorem} \newtheorem{lemma}[lemma]{Lemma} \aliascntresetthe{lemma} \newaliascnt{proposition}{theorem} \newtheorem{proposition}[proposition]{Proposition} \aliascntresetthe{proposition} \newaliascnt{corollary}{theorem} \newtheorem{corollary}[corollary]{Corollary} \aliascntresetthe{corollary} \theoremstyle{definition} \newaliascnt{definition}{theorem} \newtheorem{definition}[definition]{Definition} \aliascntresetthe{definition} \newaliascnt{example}{theorem} \newtheorem{example}[example]{Example} \aliascntresetthe{example} \theoremstyle{remark} \newaliascnt{remark}{theorem} \newtheorem{remark}[remark]{Remark} \aliascntresetthe{remark} \crefname{theorem}{Theorem}{Theorems} \Crefname{theorem}{Theorem}{Theorems} \crefname{lemma}{Lemma}{Lemmas} \Crefname{lemma}{Lemma}{Lemmas} \crefname{proposition}{Proposition}{Propositions} \Crefname{proposition}{Proposition}{Propositions} \crefname{corollary}{Corollary}{Corollaries} \Crefname{corollary}{Corollary}{Corollaries} \crefname{definition}{Definition}{Definitions} \Crefname{definition}{Definition}{Definitions} \crefname{example}{Example}{Examples} \Crefname{example}{Example}{Examples} \crefname{remark}{Remark}{Remarks} \Crefname{remark}{Remark}{Remarks} \newcommand{\R}{\mathbb R} \newcommand{\Z}{\mathbb Z} \newcommand{\Q}{\mathbb Q} \newcommand{\N}{\mathbb N} \newcommand{\PP}{\mathsf P} \newcommand{\NP}{\mathsf {NP}} \newcommand{\FP}{\mathsf {FP}} \newcommand{\Ppoly}{\mathsf {P/poly}} \newcommand{\FPpoly}{\mathsf {FP/poly}} \newcommand{\poly}{\operatorname{poly}} \newcommand{\nnc}{\operatorname{nnc}} \newcommand{\vxc}{\operatorname{vxc}} \newcommand{\xc}{\operatorname{xc}} \newcommand{\conv}{\operatorname{conv}} \newcommand{\vertset}{\operatorname{vert}} \newcommand{\spanR}{\operatorname{span}_{\R}} \newcommand{\sgn}{\operatorname{sgn}} \newcommand{\diag}{\operatorname{diag}} \newcommand{\relu}{\operatorname{ReLU}} \newcommand{\bits}{\operatorname{bits}} \newcommand{\rank}{\operatorname{rank}} \newcommand{\row}{\operatorname{row}} \newcommand{\cF}{\mathcal F} \newcommand{\cH}{\mathcal H} \newcommand{\cB}{\mathcal B} \newcommand{\cC}{\mathcal C} \newcommand{\norm}[1]{\lVert #1\rVert} \newcommand{\abs}[1]{\lvert #1\rvert} \newcommand{\ip}[2]{#1^{\mathsf T}#2} \newcommand{\eps}{\varepsilon} \newcommand{\ceil}[1]{\lceil #1\rceil} \newcommand{\floor}[1]{\lfloor #1\rfloor} \DeclareMathOperator{\lcm}{lcm} \DeclareMathOperator{\dist}{dist} \DeclareMathOperator{\med}{median} \newcommand{\im}{\operatorname{im}} \newcommand{\App}{\operatorname{App}} \newcommand{\rep}[2]{\langle #1\rangle_{#2}} \setcounter{section}{-1} \title{Two linear programs suffice\\for polynomial-time optimization} \author{Alex Black, Christoph Hertrich, Stefan Kober, Georg Loho, Moritz Stargalla} \date{} \begin{document} \maketitle \vspace{-1.3em} \begin{abstract} \noindent We show that under mild assumptions a continuous piecewise linear (CPWL) function that can be evaluated in polynomial time can also be expressed with a ReLU network of polynomial size and through a polynomial-size virtual extended formulation. More precisely, for families $(f_d\colon \R^d\to \R)_{d\geq 1}$ of positively homogeneous CPWL functions whose linear coefficients are integers of polynomial encoding size in~$d$, the following statements are equivalent: \begin{itemize} \item[(i)] Evaluating $(f_d)$ on integer inputs is in $\FPpoly$. That is, for each $f_d$, there exist polynomial-size Boolean circuits evaluating $f_d$ assuming standard binary encoding of integers. \item[(ii)] For each $f_d$ there exists a polynomial-size ReLU network with integer weights of polynomial encoding size that computes $f_d$ exactly on all real inputs in $\R^{d}$. \item[(iii)] For each $f_d$ there exists a polynomial-size $(\max,+,-)$ circuit that computes $f_d$ exactly on all real inputs in $\R^{d}$. \item[(iv)] For each $f_d$ there exists a polynomial-size virtual extended formulation representing~$f_d$. That is, for each $d$, there are rational polytopes $R,Q\subseteq \R^{\poly(d)}$ in halfspace representation and linear maps $\pi_{R},\pi_{Q}$ into $\R^{d}$, all of polynomial encoding size, such that $f_d(w)=\max_{x\in R}w^\top \pi_{R}(x)-\max_{y\in Q}w^\top \pi_{Q}(y)$ for all $w\in \R^{d}$. \end{itemize} An analogous equivalence holds for CPWL functions that are not positively homogeneous. Moreover, the uniform version of the equivalence is also true. That is, if evaluating $(f_d)$ on integer inputs is in $\FP$, then the objects in (ii) to (iv) can be constructed in polynomial time. One consequence from this is that for every family of 0-1 polytopes $(P_d)$ over which linear optimization can be done in polynomial time, the linear optimization problem over~$P_d$ can be represented as a difference of two linear programs of polynomial size, showing that every such family has polynomial \emph{virtual extension complexity}. Hence, virtual extended formulations are significantly more powerful than ordinary extended formulations, which require exponential size for some polynomial-time solvable problems such as matching. In particular, proving superpolynomial lower bounds on the virtual extension complexity of any 0-1 polytope family corresponding to an $\NP$-hard problem would imply $\PP\neq \NP$. \end{abstract} \section{Human-written remarks} \subsection*{Purpose and AI Statement} On October 16, we found a construction for polynomial-sized ReLU networks that compute the support function of the matching polytope in interaction with ChatGPT-6. After inspecting the output, we had the impression that the techniques used in the construction were not specific to the matching polytope and should apply more broadly. After prompting in that direction, on October 22, ChatGPT extended the construction to the more general case of families of CPWL functions with integral linear pieces of polynomially bounded encoding size. Starting from Section 1, the content of this manuscript was written essentially entirely by ChatGPT on November 11. The only human-written part of this manuscript are the title, abstract, this section. We have chosen to publish the current version of the manuscript given a recent, primarily AI-generated, hexagon preprint~\cite{Barez} that claims to essentially prove the implication (i)$\implies$(ii) for support functions of integral polytopes whose vertex coefficients have bounded encoding size, using what seem to be very similar ideas as the construction presented here does. We are confident that the main results in this manuscript are correct and we are currently working towards creating a human-written and human-readable version in the near future. We hope to give this result the treatment that it deserves by presenting it with a proper exposition and in a way that benefits the community. The current version does not achieve this, and is not intended to be read in depth by humans. \subsection*{Short Proof Overview} The proofs of the above implications (ii)$\iff$(iii) and (iv)$\implies$(i) are elementary, and (ii)$\implies$(iv) follows from the construction given in \cite[Proposition 4.2]{HL}, which leaves (i)$\implies$(ii) as the remaining interesting implication. The proof for this implication is based on the following observation: given a Boolean circuit that evaluates $f:\R^d\to \R$ correctly on bounded bit-represented integer-inputs, one can easily construct a ReLU network that is correct on bounded integer-inputs (simply convert integer-inputs into bits, simulate the Boolean circuit on these bits with a ReLU network, and convert the output bits back into an integer). For arbitrary real inputs $w\in \R^d$, however, such a network might produce incorrect outputs. A similar challenge appeared classically in linear programming theory. In that context, one is trying to solve a linear program with a real-valued objective. The standard approach to deal with this developed by Frank and Tardos~\cite{FT} is to preprocess the real objective and replace it with an integer objective of bounded encoding size that has the same set of optimal solutions. One can adapt the same approach to our setting. Our goal is to evaluate $f(w)$, where $f$ is a CPWL function. For a CPWL function, one can subdivide the space of inputs into polyhedral regions for which $f$ is linear, called the linear regions of $f$. For any $w$ in a linear region, $f(w)= g^\top w$ for some fixed $g \in \Z^{d}$ determined by the region called the gradient of the linear region. By the same argument as for linear programming, the Frank-Tardos procedure yields $\hat{w} \in \mathbb{Z}^{d}$ of bounded encoding size such that $\hat{w}$ is in the same linear region as $w$, so $f(\hat{w}) = g^\top \hat{w}$. In fact, we go a step further and perturb $\hat w$ suitably to obtain an integer point $\bar w\in \Z^d$ of bounded encoding size that lies in the interior of a full-dimensional linear region whose closure contains $w$. Evaluating $f$ at $\bar w$ can be done with a polynomial-size Boolean circuit from (i). We then use that evaluation to recover the gradient $g$ of the linear region containing $\bar w$. Then to evaluate $f$ we simply compute $f(w) = g^\top w$. The key technical challenge for this approach is to implement the Frank and Tardos preprocessing procedure using a ReLU neural network. In particular, going from $w$ to $\bar w$, is an inherently discontinuous map, so we cannot represent it exactly using a ReLU network. Nonetheless, it turns out that implementing this in a ReLU network, along with the core functionality of the Frank and Tardos~\cite{FT} procedure, is essentially possible with significant modifications. The implementation uses techniques that are conceptually very similar to existing techniques on complexity classes PPAD, PLS, and CLS, see~\cite[Lemma E.3]{FGHS2022} and \cite[Section 5.1]{FGHS2025}, such as bit-extraction from continuous values, multiplication of bit-encoded values with continuous ones, and taking the median to eliminate errors caused by bit-extraction. This construction then yields a proof for the remaining implication (i)$\implies$(ii). \subsection*{Remarks on Matroids} It would be tempting to argue that the maximum basis problem in matroids is polynomial-time solvable using the Greedy algorithm. By the above theorem, this should imply that the virtual extension complexity of the corresponding base polytopes is polynomial, contradicting~\cite[Theorem~1.2]{BHKL}. The greedy algorithm crucially uses the access to an independence oracle when evaluating whether an element can be added. Since there are doubly exponentially many matroids on $n$ elements, we cannot hope to implement an independence oracle for every matroid using a polynomial-size binary circuit. However, we note that when we can implement the independence oracle with a polynomial circuit, then the construction yields a polynomial-size virtual extended formulation. This is true in particular for matroids representable over fixed finite fields, e.g., binary matroids. In contrast, it is an open question whether binary matroid polytopes have polynomial size linear extended formulations. \newpage \noindent \textcolor{red}{The remaining content of this manuscript was written essentially entirely by ChatGPT on November 11.} \section{Introduction} A Boolean circuit operates on a finite binary description of its input. A neural network with rectified linear unit (ReLU) activations operates directly on real numbers and computes a continuous piecewise linear function. Both are natural models for evaluating functions arising in combinatorial optimization. Their relationship is less immediate than their simple gate definitions suggest. A Boolean algorithm may inspect input bits or branch on comparisons, whereas a ReLU network is continuous and has a fixed number of units, independent of the precision of its real input. A natural question is whether efficient exact evaluation of a continuous piecewise linear function on rational inputs implies a small network computing the same function on all real inputs. Hertrich and Loho~\cite{HL} posed a related question for real-arithmetic computation and introduced neural network complexity for support functions of polytopes. We work in the binary model and impose a bound on the encoding length of the affine coefficients. This bound is essential: efficient evaluation alone does not suffice, even for functions with integer coefficients. Under the bound, we answer the binary-model question in the affirmative. Throughout, \emph{continuous piecewise linear} (CPWL) allows affine pieces and requires finitely many pieces. Positive homogeneity means $f(tw)=tf(w)$ for $t\ge0$; in this case all pieces are linear. Network size counts ReLU units, while parameter encoding length also counts the binary representations of weights, biases, and the graph. A polynomially encoded description has polynomial total length. The function class $\FPpoly$ consists of functions computed by polynomial-size Boolean circuits, with no requirement that those circuits be constructible; $\FP$ is its uniform polynomial-time counterpart. Formal conventions appear in \cref{sec:prelim}. \subsection{Main results} Let $(f_n\colon\R^{d_n}\to\R)$ be a family with known coefficient bounds $2^{p_n}$, where $p_n$ is polynomially bounded in $d_n$. We measure all structural bounds in $d_n$. The indexing and uniformity conventions in \cref{sec:binarymodels} ensure that the index and any fixed-instance description have polynomial length in $d_n$. \begin{theorem}[From integer evaluation to exact networks]\label{thm:main} Suppose $f_n$ is positively homogeneous and CPWL, and every linear piece is $w\mapsto g^{\mathsf T}w$ with $g\in\Z^{d_n}$ and $\norm g_\infty\le2^{p_n}$. If integer-input evaluation of $(f_n)$ belongs to $\FPpoly$, then $f_n$ has a bias-free ReLU network of size polynomial in $d_n$, with integer weights and polynomial total encoding length, computing it on all of $\R^{d_n}$. More precisely, there is a polynomial length bound $L_h(d,p)$ such that an evaluation circuit on integer inputs of coordinate length at most $L_h(d,p)$ suffices. The network is constructible in time polynomial in $d,p$ and the size of this supplied circuit. In particular, integer-input evaluation in $\FP$ gives polynomial-time constructible networks. \end{theorem} The last statement separates a constructive conversion from the availability of its input. Nonuniform evaluation circuits still give networks, but neither family need have an algorithm producing its descriptions. Only a single polynomially bounded input length is used in constructing each network. The resulting equality nevertheless holds at every real point, including points arbitrarily close to boundaries between linear pieces. \begin{corollary}[Binary maximum, addition, and subtraction]\label{cor:binaryintro} Under the hypotheses of \cref{thm:main}, each $f_n$ is computed by a polynomial-size circuit whose gates are binary $\max$, $+$, and $-$ and whose only constant is $0$. These circuits are polynomial-time constructible from the supplied evaluation circuits, and hence uniformly constructible when integer-input evaluation is in $\FP$. \end{corollary} Thus arbitrary scalar multiplication is unnecessary for these families. Subtraction is allowed, in contrast to monotone tropical circuit models; this distinction is important in view of known lower bounds for those models~\cite{HSt}. \begin{corollary}[Differences of two linear programs]\label{cor:lpintro} Under the hypotheses of \cref{thm:main}, there are nonempty rational polytopes $R_n,Q_n$, given by rational linear inequalities and equations, and rational linear maps $\pi_{R,n},\pi_{Q,n}$ into $\R^{d_n}$ such that \begin{equation}\label{eq:introlp} f_n(w)=\max_{u\in R_n}w^{\mathsf T}\pi_{R,n}(u) -\max_{v\in Q_n}w^{\mathsf T}\pi_{Q,n}(v) \qquad(w\in\R^{d_n}). \end{equation} The two descriptions and maps have total encoding length polynomial in $d_n$. They are polynomial-time constructible from the supplied evaluation circuits, and hence from a uniform polynomial-time evaluator. \end{corollary} We call \eqref{eq:introlp} an \emph{LP-difference representation}. Both feasible sets are fixed independently of $w$; only their objectives depend on it. The size-only network-to-formulation implication is due to Hertrich and Loho~\cite[Theorem~4.1]{HL}. We include an auxiliary-variable proof to control the encoding length and construction time. Convexity of $f_n$ is not needed. \begin{corollary}[Equivalent descriptions in the homogeneous case]\label{cor:homequiv} For a positively homogeneous CPWL family with the integer coefficient bounds of \cref{thm:main}, the following are equivalent: \begin{enumerate}[label=\textup{(\roman*)}] \item integer-input evaluation belongs to $\FPpoly$; \item there are polynomial-size bias-free ReLU networks with integer weights of polynomial bit length; \item there are polynomial-size binary $(\max,+,-)$ circuits with constant $0$; \item there are polynomially encoded LP-difference representations of the form \eqref{eq:introlp}. \end{enumerate} In (ii)--(iv), equality is required on all real inputs. The corresponding uniform statements are also equivalent: replace $\FPpoly$ by $\FP$ and existence by polynomial-time construction of the descriptions. \end{corollary} The encoding qualifications in (ii) and (iv) are part of the assertion. The corollary does not identify unrestricted real-weight network size with Boolean circuit complexity. \begin{corollary}[Equivalent descriptions for affine pieces]\label{cor:affineequiv} Let $f_n\colon\R^{d_n}\to\R$ be CPWL with affine pieces $x\mapsto g^{\mathsf T}x+b$, where $(g,b)\in\Z^{d_n+1}$ and $\max\{\norm g_\infty,|b|\}\le2^{p_n}$. The following are equivalent: \begin{enumerate}[label=\textup{(\roman*)}] \item exact rational-input evaluation belongs to $\FPpoly$; \item there are polynomial-size ReLU networks with integer weights and integer biases of polynomial bit length; \item there are polynomial-size binary $(\max,+,-)$ circuits with constants $0,1$; \item there are nonempty rational polytopes $R_n,Q_n$ and rational linear maps $\pi_{R,n},\pi_{Q,n}$ into $\R^{d_n+1}$, of polynomial total encoding length, such that \begin{equation}\label{eq:introafflp} f_n(x)=\max_{u\in R_n}(x,1)^{\mathsf T}\pi_{R,n}(u) -\max_{v\in Q_n}(x,1)^{\mathsf T}\pi_{Q,n}(v) \quad(x\in\R^{d_n}). \end{equation} \end{enumerate} The uniform versions, with $\FP$ and polynomial-time constructible descriptions, are equivalent as well. \end{corollary} The affine case follows by homogenization, including a definition on the additional coordinate hyperplane. The rational inputs in this corollary cannot in general be replaced by integer inputs. For an integral polytope $P$, its support function $h_P(w)=\max_{x\in P}w^{\mathsf T}x$ has the vertices of $P$ as its linear coefficients. The results therefore apply whenever these vertices have polynomially many bits and binary-weight optimization is in $\FPpoly$; in particular they apply to all such $0/1$ polytopes. They imply polynomial neural network complexity and polynomial virtual extension complexity. For support functions, \eqref{eq:introlp} says $P+\pi_Q(Q)=\pi_R(R)$, so it is a virtual extended formulation. This contrasts with the exponential ordinary extension complexity of the matching polytope~\cite{Rothvoss} and answers the matching question of Black, Hertrich, Kober, and Loho~\cite{BHKL}. For explicit $0/1$ families with polynomially verifiable feasible points, a superpolynomial lower bound on neural or virtual extension complexity would consequently imply $\NP\not\subseteq\Ppoly$; we give the short argument in \cref{sec:polyconsequences}. Our proof uses the simultaneous approximation mechanism of Frank and Tardos~\cite{FT}, based on LLL~\cite{LLL}, to preserve bounded integer comparisons. To recover the function value rather than only these comparisons, we evaluate $f$ at at most $d$ short integer points lying in one closed arrangement face. Integer projections then give exact value updates. Represented Boolean bits, continuous digit extraction, and an explicit geometric list of parameters turn this finite procedure into a continuous network. None of the constructions takes a limit of approximate answers. \section{Preliminaries}\label{sec:prelim} \subsection{Notation and piecewise linear functions} For a positive integer $d$, let $[d]\coloneqq\{1,\ldots,d\}$. Write $e_j$ for the $j$th unit vector, $\mathbf1$ for the all-ones vector, and $\norm x_\infty=\max_j|x_j|$ and $\norm x_1=\sum_j|x_j|$. For a scalar, $x_+\coloneqq\max\{0,x\}$, $\floor x$ is its integer part, and $\{x\}=x-\floor x$ its fractional part. All logarithms are to base two. For a matrix $A$, $\row(A)$ is the real span of its rows, and $\ker A$ and $\im A$ are its kernel and image. Entry bounds for matrices mean the largest absolute entry. A $d\times d$ matrix with entry bound $H$ has maximum absolute row sum at most $dH$. A function $f\colon\R^d\to\R$ is \emph{CPWL} if it is continuous and affine on the cells of a finite polyhedral subdivision. Its \emph{affine pieces} are the distinct affine functions occurring on full-dimensional cells. At every point the function agrees with at least one such piece, by continuity. If $f$ is positively homogeneous, its pieces have zero constant term: apply $f(tx)=tf(x)$ to $x$ and $tx$ in the interior of the same cell, with $t$ near one. We refer to the coefficient vectors of these linear pieces as their gradients. A finite \emph{central hyperplane arrangement} is a finite collection of hyperplanes through the origin. A \emph{face} of the arrangement is a nonempty set obtained by specifying a positive, negative, or zero sign for every defining linear form. A face can have any dimension and is relatively open in its linear span. The faces partition $\R^d$. A full-dimensional face is called a chamber. The \emph{lexicographic sign} of a list of real numbers is the sign of its first nonzero entry, or zero if all entries vanish. Arrangements and their faces are used only in the proof; the construction does not enumerate them. An \emph{integer projection} with kernel $V$ is an integer matrix $\Pi$ satisfying $\Pi^2=\Pi$ and $\ker\Pi=V$. It need not be orthogonal. Its kernel and image form a direct sum: $\R^d=V\oplus\im\Pi$. We construct such projections for the spans of short integer vectors. \subsection{Binary computation and uniformity}\label{sec:binarymodels} Integers are encoded in signed binary. A rational number is encoded by an integer numerator and a positive integer denominator; outputs may be put in lowest terms. A rational vector has \emph{coordinate length} at most $L$ if each numerator and denominator has at most $L$ bits. Its total input length is $O(dL)$. Padding and length fields let a fixed Boolean circuit accept all inputs up to a prescribed length. Changes among standard binary encodings have polynomial cost. The signed-word convention used inside the real network is specified in \cref{sec:bits}. We use Boolean circuits over binary AND and OR gates and unary NOT gates, with unrestricted reuse of previously computed bits. Their size includes all gates and input and output positions. A time-$T$ deterministic Turing computation can be unrolled into a Boolean circuit of size $O(T^2)$, constructible in polynomial time given the machine and its time bound~\cite[Chapter~6]{AB}. This elementary simulation is enough for our purposes. A polynomial number of adaptive calls to supplied circuits can likewise be unrolled into a circuit: each call uses a separate copy wired to its computed query. The decision classes $\PP$ and $\Ppoly$ refer respectively to deterministic polynomial time and polynomial-size Boolean circuit families. Their function versions $\FP$ and $\FPpoly$ allow several output bits, whose number is polynomially bounded. No construction algorithm is required for a nonuniform circuit family. The class $\NP$ consists of decision problems whose positive instances admit polynomial-length certificates verifiable in polynomial time. For $(f_n)$, membership of integer-input evaluation in $\FPpoly$ means that for every $n,L$ there is a circuit of size polynomial in $d_n,L$ computing $f_n$ on all integer vectors of coordinate length at most $L$. Rational-input evaluation is defined analogously. All polynomial bounds use one fixed polynomial for the family. We assume that the description of the family index, and any combinatorial instance fixed in it, has polynomial length in $d_n$. Uniform statements require $d_n,p_n$ and the evaluation circuits at the requested length to be constructible in time polynomial in $d_n,L$; equivalently one can supply a uniform polynomial-time evaluator and these known bounds. When a separate instance description is an input, its length is included in the structural parameter. These conventions prevent nonuniform information from being hidden in a claim of uniform construction. The output length is controlled by the coefficient bound. If the affine coefficients of $f$ are bounded by $2^p$, then on a rational input of coordinate length $L$ its value has $O(p+dL+\log(d+1))$ bits after clearing the input denominators. On integer inputs to a homogeneous function the output is an integer. The number of affine pieces does not enter either bound. \subsection{Real circuits and linear programming} A \emph{ReLU network} is a finite directed acyclic graph with real input coordinates, units computing the positive part of an affine combination of earlier values, and an affine output. A \emph{rank-two maxout unit} computes the maximum of two such combinations. We allow connections between nonconsecutive layers. Converting between rank-two maxout and ReLU descriptions has constant overhead per operation using signed representations, since \[ \max\{u,v\}=v+(u-v)_+,\qquad \min\{u,v\}=u-(u-v)_+. \] A signed value can be carried as its positive and negative parts. These conversions preserve integrality of coefficients. Linear combinations may be retained as explicit nodes with constant-size ReLU implementations; doing so avoids unnecessary densification when encoding the network. Requiring consecutive layers would give a further polynomial overhead and does not affect any equivalence here. A \emph{binary $(\max,+,-)$ circuit} has two inputs at each operation gate and permits reuse of outputs. Constants are restricted to those specified in the statement. For homogeneous functions this is only $0$; for general affine pieces we also allow $1$. Rational or real scalar multiplication is not an additional gate. A polytope is a nonempty bounded convex hull of finitely many points. It is \emph{integral} if its vertices are integer vectors. Its support function is $h_P(w)=\max_{x\in P}w^{\mathsf T}x$. A rational polytope description consists of rational linear inequalities and equations. Its encoding length includes coefficients, dimensions, and any linear maps supplied with it. A polynomially encoded rational linear program can be solved exactly in polynomial time~\cite{SchrijverLP}. An LP-difference representation of a homogeneous function is the data in \eqref{eq:introlp}. If the function is $h_P$, equality of support functions gives \[ P+\pi_Q(Q)=\pi_R(R), \] where $P+Q=\{x+y:x\in P,y\in Q\}$ is the Minkowski sum. This is a \emph{virtual extended formulation}. Following~\cite{HL}, the virtual extension complexity is \[ \vxc(P)=\min\{\xc(Q)+\xc(R):P+Q=R\}, \] where $\xc$ is the minimum number of facets of a polytope projecting affinely onto the given polytope. Equations are not counted as facets but are included in encoding length. Neural network complexity $\nnc(P)$ is the minimum rank-two maxout size for $h_P$; this agrees with ReLU size up to constant factors~\cite{HL}. \paragraph{Organization.} We first describe the proof idea in \cref{sec:overview}. Sections~\ref{sec:directions} and~\ref{sec:value} give the integer directions and the exact value updates. Sections~\ref{sec:bits}--\ref{sec:correctness} implement this procedure continuously and prove the homogeneous theorem. Section~\ref{sec:homogenize} treats affine pieces, and \cref{sec:corollaries} proves the four corollaries. Section~\ref{sec:limits} gives two limitations. Quantitative bounds and encoding lengths are collected in the appendix; they are not needed for the main correctness argument. \section{Proof idea}\label{sec:overview} Fix a positively homogeneous CPWL function $f\colon\R^d\to\R$ with integer gradients bounded by $2^p$. The difference of two gradients is a short integer vector. Hence all changes of linear piece lie on hyperplanes $u^{\mathsf T}x=0$ for bounded integer $u$. We use this finite arrangement to reason about where $f$ is linear, without constructing it. \paragraph{Short integer points in one closed face.} Rounding the input at one fixed precision cannot determine every relevant sign: a real input may be arbitrarily close to one of the hyperplanes. Instead, we retain the rounding error exactly. Starting from $r_0=w$, simultaneous approximation produces a positive integer $q_i$ and a short integer vector $v_i$ such that, with $a_i=\norm{r_{i-1}}_\infty$, \[ r_i=q_i r_{i-1}-a_i v_i \] is small relative to $a_i$. Every round preserves zero coordinates and sets at least one additional coordinate to zero. Thus $r_k=0$ after at most $d$ nonzero rounds. For every relevant integer form $u$, the sign of $u^{\mathsf T}w$ is the first nonzero sign among $u^{\mathsf T}v_1,\ldots,u^{\mathsf T}v_k$. For a sufficiently large fixed integer $T$, set \[ \zeta_i=T^{i-1}v_1+\cdots+Tv_{i-1}+v_i. \] These are short integer points. Their signs successively refine one another, so all $\zeta_i$ lie in the closure of the arrangement face containing $w$. The function is linear on that closed face. Moreover, $w$ lies in the span of the $\zeta_i$. Consequently the values $f(\zeta_1),\ldots,f(\zeta_k)$ determine $f(w)$, even though the points may lie on boundaries and need not determine an entire ambient gradient. We use just one new evaluation in each round. \paragraph{An exact value update.} The preceding observation does not yet give a continuous computation. Writing $w$ in the basis $\zeta_i$ would introduce division of real signals by input-selected integers. We instead use integer projections. Put $V_i=\spanR(v_1,\ldots,v_i)$ and choose an integer projection $\Pi_i$ with kernel $V_i$. There is a unique linear form $\eta_i$ which agrees with the queried values on $V_i$ and vanishes on the chosen complement: \[ \eta_i^{\mathsf T}\zeta_j=f(\zeta_j)\quad(j\le i), \qquad \eta_i^{\mathsf T}\Pi_i=0. \] Although defined by a linear system, $\eta_i$ is an integer vector of polynomial encoding length. Indeed, if $g$ is a linear coefficient vector valid on the final closed face, then $\eta_i=(I-\Pi_i)^{\mathsf T}g$. This identity is for the proof only; we never compute $g$. Initialize $c_0=w$ and $\beta_0=0$, and update \[ c_i=\Pi_i c_{i-1},\qquad \beta_i=\beta_{i-1}+\eta_i^{\mathsf T}c_{i-1}. \] The quantity added is the value, under that same linear form, of $c_{i-1}-c_i$. Thus $\beta_i+g^{\mathsf T}c_i=f(w)$. At termination $c_k=0$, proving $\beta_k=f(w)$. The residual $r_i$ controls the approximation; the vector $c_i$ is a projected part of the original input. Crucially, its magnitude is bounded by a fixed constant times $\norm{r_i}_\infty$, so the two real vectors remain compatible with the same binary representation. \paragraph{Continuous implementation.} All discrete calculations use polynomial-bit integers. We simulate their Boolean circuits with bits represented by $0$ and the current nonnegative factor $a_i$. This permits a represented integer to act on a real signal bounded by a fixed multiple of $a_i$. In particular, it implements all three real updates above without real multiplication or division gates. The only remaining difficulty is rounding. A continuous digit extractor agrees with the integer digits except on short transition intervals. We use $d(d-1)+1$ copies of the whole computation, each with a different fixed geometric rounding parameter reused in every round. For a fixed input, a transition can occur only when two bounded integer linear forms have a ratio close to that parameter. A greedy-basis argument shows that at most $\binom d2$ parameters can have this property, even when the intermediate states differ. A strict majority of final outputs is therefore exact, and their median is $f(w)$. We combine only final values, not the different intermediate projections or integer directions. \section{Integer directions from simultaneous approximation}\label{sec:directions} Frank and Tardos~\cite{FT} replace numerical weights by bounded integers preserving comparisons against integer vectors of prescribed norm. Their method uses simultaneous approximation and successive residuals to obtain a lexicographic list of directions. We use this comparison-preserving mechanism, but keep the real residual in an integer-linear form and later recover the exact function value. We take the classical approximation algorithm as a black box. Throughout Sections~\ref{sec:directions}--\ref{sec:correctness}, let $f\colon\R^d\to\R$ be homogeneous and CPWL with gradients in $[-U,U]^d\cap\Z^d$, where $U=2^p$. Fix \begin{equation}\label{eq:parameters} B=2dU,\qquad N=8B+1,\qquad R=2^{d(d+1)}(4N)^d,\qquad K=2^b>4NR, \end{equation} where $K$ is the smallest power of two satisfying the inequality. These constants have polynomial encoding length in $d,p$. \subsection{Approximation from bounded-bit input} \begin{lemma}[Simultaneous approximation]\label{lem:approx} Given $\alpha\in[-1,1]^d\cap\Q^d$ and $N\ge2$, one can compute in polynomial time integers $q$ and $v\in\Z^d$ such that \[ 1\le q\le R,\qquad \norm v_\infty\le R, \qquad \norm{q\alpha-v}_\infty<\frac1{4N}, \qquad R=2^{d(d+1)}(4N)^d. \] \end{lemma} This is a standard consequence of LLL simultaneous approximation~\cite[Proposition~1.39]{LLL}; the stated denominator bound is deliberately generous. Equivalently one may use the approximation subroutine of~\cite{FT}. Fix a deterministic implementation and write $\App(\alpha)=(q,v)$. The algorithm is called only on a rational vector of bounded encoding length, never on the real input itself. \begin{lemma}[Rounding before approximation]\label{lem:approxround} For $x\in[-1,1]^d$ and $0<\theta<1$, put \[ z=\floor{Kx+\theta\mathbf1},\qquad \alpha=z/K. \] Then $\alpha\in[-1,1]^d$, and the output of $\App(\alpha)$ satisfies \[ \norm{qx-v}_\infty<\frac1{2N}. \] \end{lemma} \begin{proof} The coordinate bounds give $-K\le z_j\le K$. Moreover, \[ \alpha_j-x_j =\frac{\floor{Kx_j+\theta}-Kx_j}{K} =\frac{\theta-\{Kx_j+\theta\}}K, \] so $|\alpha_j-x_j|<1/K$. Hence \[ \norm{qx-v}_\infty \le q\norm{x-\alpha}_\infty+\norm{q\alpha-v}_\infty <\frac RK+\frac1{4N}<\frac1{2N}. \] \end{proof} \subsection{Residuals and lexicographic signs} Fix $w\in\R^d$ and $0<\theta<1$. Set $r_0=w$. As long as $r_{i-1}\ne0$, perform \begin{equation}\label{eq:residualstep} \begin{aligned} a_i&=\norm{r_{i-1}}_\infty,& z_i&=\floor{Kr_{i-1}/a_i+\theta\mathbf1},\\ (q_i,v_i)&=\App(z_i/K),& r_i&=q_i r_{i-1}-a_i v_i. \end{aligned} \end{equation} Let $V_i=\spanR(v_1,\ldots,v_i)$ and $Q_i=\prod_{j=1}^i q_j$, with $V_0=\{0\}$ and $Q_0=1$. If $w=0$, the sequence is empty. The divisions and floor in this description specify an exact mathematical procedure; their continuous replacement is given later. \begin{lemma}[Termination and integer comparisons]\label{lem:residual} The procedure stops at $r_k=0$ after $k\le d$ nonzero rounds. Its directions are linearly independent and satisfy $\norm{v_i}_\infty\le R$. For each nonzero round, \begin{equation}\label{eq:residualinvariants} \norm{r_i}_\infty<\frac{a_i}{2N},\qquad r_i-Q_iw\in V_i. \end{equation} For every integer $u$ with $\norm u_1\le B$, \begin{equation}\label{eq:lex} \sgn(u^{\mathsf T}w) =\text{the lexicographic sign of } (u^{\mathsf T}v_1,\ldots,u^{\mathsf T}v_k). \end{equation} \end{lemma} \begin{proof} By \cref{lem:approxround}, \[ \norm{r_i}_\infty =a_i\left\|q_i\frac{r_{i-1}}{a_i}-v_i\right\|_\infty <\frac{a_i}{2N}. \] The second invariant follows inductively from \[ r_i-Q_iw=q_i(r_{i-1}-Q_{i-1}w)-a_iv_i\in V_i. \] We next show that each round eliminates a coordinate attaining the largest absolute value and preserves all zero coordinates. If $(r_{i-1})_s=0$, the approximation error gives $|(v_i)_s|<1$, so integrality forces $(v_i)_s=0$ and then $(r_i)_s=0$. If $(r_{i-1})_s=\varepsilon a_i$ for $\varepsilon\in\{-1,1\}$, the same argument gives $|\varepsilon q_i-(v_i)_s|<1$. Thus $(v_i)_s=\varepsilon q_i\ne0$ and $(r_i)_s=0$. There are at most $d$ rounds. Choose one newly eliminated coordinate $s_i$ in each round. Then $(v_i)_{s_i}\ne0$, whereas $(v_j)_{s_i}=0$ for $j>i$. The matrix of these coordinates is triangular with nonzero diagonal, proving independence. For \eqref{eq:lex}, suppose $i$ is the first index with $u^{\mathsf T}v_i\ne0$. The second invariant at $i-1$ gives \[ u^{\mathsf T}r_{i-1}=Q_{i-1}u^{\mathsf T}w, \qquad q_i u^{\mathsf T}r_{i-1}=a_i u^{\mathsf T}v_i+u^{\mathsf T}r_i. \] Here $u^{\mathsf T}v_i$ is a nonzero integer, while \[ |u^{\mathsf T}r_i|\le B\norm{r_i}_\infty <\frac{B}{2N}a_i0$: if $\sigma_i(u)=0$, both evaluations vanish; otherwise the second summand has the prescribed strict sign and the first is zero or has the same sign. Letting $t$ decrease to zero proves the claim. Finally, \cref{lem:residual} says that $w$ has sign vector $\sigma_k$, so $w\in\Phi_k$. All query points belong to $\overline{\Phi_k}$ by \eqref{eq:prefixsigns}. Apply \cref{lem:arrangement} to this face to obtain one coefficient vector $g$ satisfying every identity in \eqref{eq:commonvalues}. \end{proof} The points may be on lower-dimensional faces, and their span need not be contained in the final face. This is harmless: agreement with a linear function on the query points determines its restriction to their span. It does not assert that $f$ itself is linear everywhere on that span. \subsection{Integer projections} We require projections with integer entries because the network will apply input-selected integer coefficients to real signals. A rational orthogonal projection would instead require handling input-selected denominators. The following classical normal-form construction avoids them. \begin{lemma}[Integer projections]\label{lem:projection} Given an integer matrix $A\in\Z^{i\times d}$ with independent rows and entries bounded by $R$, one can compute in polynomial time a matrix $\Pi_A\in\Z^{d\times d}$ such that \[ \Pi_A^2=\Pi_A,\qquad \ker\Pi_A=\row(A). \] Its entries can be bounded uniformly by \begin{equation}\label{eq:H} H=2^d d^{d+3}R^d. \end{equation} For the empty matrix take $\Pi_A=I$. Moreover, \begin{equation}\label{eq:nesting} x-\Pi_Ax\in\row(A),\qquad \Pi_{A'}\Pi_A=\Pi_{A'}\quad\text{if }\row(A)\subseteq\row(A'). \end{equation} \end{lemma} \begin{proof} The cases $i=0,d$ are immediate. Otherwise permute columns so that $A=[A_*\ A']$ with $A_*$ nonsingular, and complete $A$ to \[ W=\begin{pmatrix}A_*&A'\\0&I_{d-i}\end{pmatrix}. \] A column Hermite normal form gives $WZ=D$, where $Z$ is an integer matrix with determinant $\pm1$, and $D$ is lower triangular with positive diagonal and $0\le D_{st}0$ and \begin{equation}\label{eq:digitcondition} \{Kx/a+\theta\}\ge 1/\rho, \end{equation} then $t_\ell=a\varepsilon_\ell$, where the $\varepsilon_\ell$ are the unsigned binary digits of \[ \floor{Kx/a+\theta}+K\in\{0,\ldots,2K\}. \] For $a=0$ all outputs are zero. The construction has polynomial size in $b$ and uses integer coefficients. \end{lemma} \begin{proof} The range follows from clipping. For $a>0$, write \[ Kx/a+K+\theta=n+\varphi, \qquad \varphi\in[1/\rho,1),\quad 0\le n\le2K. \] Initially $s_{b+1}=\rho a(n+\varphi)$. Suppose the higher digits have been removed, so $s_\ell=\rho a(n_\ell+\varphi)$, where $n_\ell$ is the remainder of $n$ modulo $2^{\ell+1}$. If its digit at position $\ell$ is zero, then $n_\ell\le2^\ell-1$ and \[ s_\ell-\rho2^\ell a\le\rho a(\varphi-1)<0. \] Thus $t_\ell=0$. If the digit is one, the same expression is at least $\rho a\varphi\ge a$, so $t_\ell=a$. The subtraction in \eqref{eq:digits} removes that digit exactly and preserves the fractional part. Induction proves the assertion. If $a=0$, then $x=0$ and every signal vanishes. All multipliers in the recurrence are fixed integers. \end{proof} The quotient and fractional part in \eqref{eq:digitcondition} occur only in the guarantee. They are not gates of the network. The procedure never produces an unscaled rounding decision. \section{Construction of the network}\label{sec:continuous} We now give a fixed circuit implementing the exact procedure. We call a quantity \emph{offline} if it is computed when the network is constructed and is independent of the real input. A quantity is \emph{online} if it depends on that input during evaluation. Boolean circuits themselves are offline objects; their represented input and output signals are online. \subsection{Parameters and the discrete computation} Besides $B,N,R,K,T,H,L_h$ already defined, set \begin{equation}\label{eq:geoparams} Y=(2R)^d,\qquad M=2KY,\qquad C=(dM)^d, \qquad J=d(d-1)+1. \end{equation} Let $Q$ be the smallest power of two greater than $4C^2$. For $j\in[J]$, put \begin{equation}\label{eq:shiftparams} \theta_j=Q^{-j},\qquad \rho_j=2Q^j. \end{equation} Thus $\rho_j\theta_j=2$ and $1/\rho_j=\theta_j/2$. All extraction coefficients are integers of polynomial bit length, despite the use of rational $\theta_j$ in the notation. A \emph{round} is one application of the residual and value updates. A \emph{copy} is the circuit consisting of exactly $d$ such rounds with one fixed choice of $\theta_j$, used in every round. The $J$ copies will be combined by their median. Their initial real signals are \[ r=w,\qquad c=w,\qquad \beta=0. \] There is no initial query to $f$ and no initial gradient. At the start of round $i$, the \emph{discrete state} is the tuple \begin{equation}\label{eq:state} \bigl(v_1,\ldots,v_{i-1},\ y_1,\ldots,y_{i-1}\bigr), \qquad y_j=f(\zeta_j), \end{equation} represented by bits with common factor $a=\norm r_\infty$. Together with $r,c,\beta$, this is the full state of the computation. Empty tuples are used in the first round. Word lengths are chosen offline to contain all quantities in the exact procedure. Their polynomial bounds follow from \cref{lem:residual,lem:eta} and \eqref{eq:Lh}; explicit bounds are listed in the appendix. For each round number, construct a Boolean circuit $\mathsf{BOOL}_i$ with two kinds of input words: the signed state in \eqref{eq:state}, and an unsigned vector representing $z_i+K\mathbf1$. It performs the following discrete operations: \begin{enumerate}[label=\textup{(\roman*)}] \item Subtract $K\mathbf1$ and compute $(q_i,v_i)=\App(z_i/K)$. \item Append $v_i$ to the prefix, form all $\zeta_j$ by \eqref{eq:querypoints}, and compute $\Pi_i$ from that prefix. \item Make one call to the supplied evaluation circuit at $\zeta_i$, obtaining $y_i=f(\zeta_i)$. \item Solve \eqref{eq:interpolationsystem} for $\eta_i$ using the stored $y_1,\ldots,y_{i-1}$ and the new value $y_i$. \item Output represented words for $q_i,v_i,\eta_i,\Pi_i$. Form the next discrete state by appending $v_i$ and $y_i$ to the two stored lists. \end{enumerate} All operations apart from the supplied evaluator are polynomial-time computations on bounded-bit data. In particular, exact rational linear algebra is internal to this Boolean calculation. The interpolation result is integral on all states arising in the exact procedure. To make the circuit total, use explicit checks for coordinate ranges, independence of the prefix, and an integral interpolation solution within its prescribed bound. On a failed check output a fixed zero tuple. There is no need to decide whether a state is reachable from a real input. On every exact nonzero execution all checks succeed. The algorithms are run with fixed polynomial time bounds, so the resulting Boolean circuits also have defined outputs on arbitrary words. \subsection{The real operations in one round} For copy $j$, with parameter $\theta_j$, the fixed real circuit for round $i$ executes the following operations. First compute $a=\max_s\max\{r_s,-r_s\}$. Apply \cref{lem:digits} to each coordinate $r_s$ with parameters $K,\theta_j,\rho_j$. The output is a tuple of unsigned represented digits. Feed this tuple and the represented discrete state to the simulation of $\mathsf{BOOL}_i$ from \cref{lem:boolean}. Let its represented outputs be denoted $\rep{q_i}a$, $\rep{v_i}a$, $\rep{\eta_i}a$, and $\rep{\Pi_i}a$. Use \eqref{eq:applyword} to implement \begin{equation}\label{eq:realround} r'=q_i r-a v_i,\qquad c'=\Pi_i c,\qquad \beta'=\beta+\eta_i^{\mathsf T}c. \end{equation} These formulas describe the intended values when the words are genuine; the circuit is the fixed combination of minima, maxima, and integer linear operations already specified. The term $av_i$ is obtained by decoding its represented words. Multiplication of $r_s$ by $q_i$ uses $D=1$. The matrix and interpolation coefficients act on $c_s$ using $D=dH$. Their validity is justified by \eqref{eq:domination}. Both updates involving $c$ use its value before the round. Finally compute $a'=\norm{r'}_\infty$ and replace each output state bit $b$ by $\min\{a',b\}$. On an exact round, $a'0$, its state signals are the genuine represented bits of the tuple \eqref{eq:state}. Initially the real signals are $w,w,0$ and the tuple is empty. Suppose the assertion holds at a nonzero round. The extraction condition \eqref{eq:safe} is exactly \eqref{eq:digitcondition}, since $1/\rho_j=\theta_j/2$. Thus every extracted coordinate word is the unsigned encoding of $(z_i)_s+K$, multiplied bitwise by $a_i$. Together with the correctly represented old state, these are genuine inputs to \cref{lem:boolean}. Its outputs therefore represent the same $q_i,v_i,\Pi_i,\eta_i$ and new stored values as in the ideal procedure. The checks succeed by the preceding lemmas. We have $|(r_{i-1})_s|\le a_i$ and $|(c_{i-1})_s|\le dH a_i$. Hence every application of \eqref{eq:applyword} in \eqref{eq:realround} is exact, giving the ideal residual, projected vector, and accumulator. The new norm satisfies $a_{i+1}4C^2$. For any finite list $\theta_j=Q^{-j}$ and every $w\in\R^d$, at most $\binom d2$ indices $j$ have the following property: there exist $u,v\in\Z^d$ with $\|u\|_\infty,\|v\|_\infty\le M$ and \begin{equation}\label{eq:exceptional} v^{\mathsf T}w\ne0,\qquad |(u+\theta_jv)^{\mathsf T}w| <\frac{\theta_j}{2}|v^{\mathsf T}w|. \end{equation} We call such an index \emph{exceptional}. The vectors may depend on both $j$ and $w$. \end{lemma} \begin{proof} Let $\mathcal U=[-M,M]^d\cap\Z^d$. Greedily choose a basis $b_1,\ldots,b_d$ from this finite set: $b_i$ minimizes $|b_i^{\mathsf T}w|$ outside the span of its predecessors. The unit vectors belong to $\mathcal U$, so the procedure can choose $d$ independent vectors. Put $t_i=|b_i^{\mathsf T}w|$; the candidate sets decrease, giving $t_1\le\cdots\le t_d$. Write $z\in\mathcal U$ as $z=\sum_i\alpha_i b_i$. The denominator in the determinant formula for $\alpha_i$ is a nonzero integer, hence has absolute value at least one. All entries in the numerator determinant are bounded by $M$. Hadamard's inequality gives $|\alpha_i|\le d^{d/2}M^d$. Let $k$ be the last nonzero coefficient. The vector $z$ is not in the span of $b_1,\ldots,b_{k-1}$, so it was an eligible candidate when $b_k$ was chosen. Consequently $t_k\le|z^{\mathsf T}w|$. The triangle inequality gives, for $d\ge2$, \[ |z^{\mathsf T}w|\le\sum_{i\le k}|\alpha_i|t_i \le d^{d/2+1}M^d t_k\le C t_k. \] For $d=1$ the same bound follows directly, with $C=M$. If $t_k=0$, the evaluation is zero. Otherwise assign $z$ to class $k$. Every nonzero evaluation in class $k$ lies in $[t_k,Ct_k]$. For an exceptional index, \eqref{eq:exceptional} implies that both evaluations are nonzero and \[ \frac{|u^{\mathsf T}w|}{|v^{\mathsf T}w|} \in W_j:=\left(\frac{\theta_j}{2},\frac{3\theta_j}{2}\right). \] Let $k,\ell$ be the classes assigned to $u,v$. If $k\ge\ell$, then \[ \frac{|u^{\mathsf T}w|}{|v^{\mathsf T}w|} \ge\frac{t_k}{Ct_\ell}\ge\frac1C, \] whereas membership in $W_j$ gives a ratio smaller than $3/(2Q)<1/C$. Hence $k<\ell$. For a fixed pair $k<\ell$, all such ratios lie in \[ I_{k\ell}:=\left[\frac{t_k}{Ct_\ell},\frac{Ct_k}{t_\ell}\right], \] whose endpoints have ratio $C^2$. If $jC^2. \] Thus $I_{k\ell}$ meets at most one of these intervals. Each ordered pair $k<\ell$ accounts for at most one exceptional index, and there are at most $\binom d2$ such pairs. \end{proof} \subsection{Few copies are unsafe} \begin{lemma}\label{lem:few} For every $w\in\R^d$, at most $\binom d2$ of the $J$ copies are unsafe. \end{lemma} \begin{proof} Fix an unsafe copy $j$ and its first unsafe nonzero ideal round. By \cref{lem:resmaps}, its residual is $r=Aw$ for an integer matrix $A$ with entry bound $Y$. Choose $t\in[d]$ and $\varepsilon\in\{-1,1\}$ such that \[ a=\norm r_\infty=\varepsilon A_t w>0, \] where $A_t$ denotes row $t$. Let $s$ violate \eqref{eq:safe}, and put \[ k=\floor{Kr_s/a+\theta_j},\qquad u^{\mathsf T}=KA_s-k\varepsilon A_t,\qquad v^{\mathsf T}=\varepsilon A_t. \] Since $|r_s|\le a$ and $0<\theta_j<1$, $|k|\le K$. Thus both integer vectors have entry bound $2KY=M$. Moreover, \begin{align*} v^{\mathsf T}w&=a,\\ (u+\theta_jv)^{\mathsf T}w &=Kr_s-ka+\theta_j a\\ &=a\left(Kr_s/a+\theta_j-\floor{Kr_s/a+\theta_j}\right)\\ &=a\{Kr_s/a+\theta_j\}\in[0,\theta_j a/2). \end{align*} Hence $j$ is exceptional in \cref{lem:geometric}. That lemma permits the two vectors to depend on the input, on $j$, and on the complete preceding computation. It therefore applies to all copies simultaneously, even when their states differ. There are at most $\binom d2$ such indices. \end{proof} \subsection{The final median and polynomiality} \begin{lemma}\label{lem:median} The median of the $J$ copy outputs equals $f(w)$ for every $w\in\R^d$. \end{lemma} \begin{proof} There are $J=2\binom d2+1$ copies. By \cref{lem:onecopy,lem:few}, at least $\binom d2+1$ return $f(w)$. The middle order statistic is therefore $f(w)$, whatever the remaining outputs are. A median is itself computed continuously by a fixed sorting network. For example, insertion by a fixed sequence of adjacent comparators sorts $J$ numbers with $J(J-1)/2$ comparators. A comparator returns the pair $(\min\{u,v\},\max\{u,v\})$. With $t=(u-v)_+$, these outputs are $u-t$ and $v+t$, so each comparator has a constant-size ReLU realization. No Boolean comparison is extracted. The case $J=1$ requires no comparator. \end{proof} \begin{proposition}[Finite-length conversion]\label{prop:compiler} For a homogeneous CPWL function with integer coefficient bound $2^p$, a Boolean circuit evaluating it on integer inputs of coordinate length at most $L_h$ suffices to construct the exact network above. The network has integer weights, no biases, and size and total encoding length polynomial in $d,p$ and the supplied circuit size. It can be constructed within the same polynomial dependence. \end{proposition} \begin{proof} All offline constants have polynomial bit length. The direction and query lengths are bounded by \eqref{eq:parameters} and \eqref{eq:Lh}. Stored function values have polynomial length because $|f(\zeta_i)|\le dU\norm{\zeta_i}_\infty$. Projection and interpolation coefficients have polynomial length by \cref{lem:projection,lem:eta}. Exact linear algebra and simultaneous approximation on this bounded data are polynomial-time computations, hence have polynomial-size Boolean circuits. We use only one supplied evaluation circuit in each round. There are polynomially many rounds and copies. Each represented-word operation uses polynomially many min, max, and fixed integer linear operations. The median also has polynomial size. The largest extraction coefficient involves $\rho_j$; its length is polynomial because $j\le J$, $\log Q=\poly(d,p)$, and $\rho_j=2Q^j$. All other coefficients have polynomial length as well. Keeping linear operations as explicit addition nodes gives a polynomial-length graph description, rather than silently expanding compositions of linear maps. Every step of constructing that graph is deterministic and polynomial-time in the supplied descriptions. No nonzero constant or bias occurs in the homogeneous circuit. Correctness is \cref{lem:median}. \end{proof} \begin{proof}[Proof of \cref{thm:main}] For each $n$, choose the evaluation circuit at the single length $L_h(d_n,p_n)$ and apply \cref{prop:compiler}. This circuit has polynomial size under the $\FPpoly$ hypothesis, and $p_n$ is polynomial in $d_n$. The resulting network and its encoding are therefore polynomial in $d_n$. If a uniform polynomial-time evaluator is given, the required Boolean circuit can be constructed in polynomial time, after which the same conversion is uniform. The restriction to length $L_h$ concerns only construction; \cref{lem:median} proves equality on the whole real domain. \end{proof} \section{From affine pieces to a homogeneous function}\label{sec:homogenize} To apply the homogeneous theorem to an affine-piece function, one must define the homogenized function on the entire additional coordinate hyperplane. Setting its value there to zero would be incorrect in general. \begin{lemma}[Homogenization and its evaluation]\label{lem:homogenize} Let $f:\R^d\to\R$ be CPWL with integer affine coefficients bounded by $U$. The limit \[ f^\infty(x)=\lim_{\lambda\to\infty}\frac{f(\lambda x)}{\lambda} \] exists for every $x$. The function \begin{equation}\label{eq:homogenize} F(x,t)= \begin{cases} |t|f(x/|t|),&t\ne0,\\ f^\infty(x),&t=0 \end{cases} \end{equation} is continuous, positively homogeneous, and CPWL. Its linear coefficients are integers bounded by $U$. Exact evaluation of $F$ on integer inputs reduces to at most two adaptively selected evaluations of $f$ on rational inputs of polynomially related length. \end{lemma} \begin{proof} For fixed $x$, the restriction $\lambda\mapsto f(\lambda x)$ is eventually affine, because $f$ has finitely many polyhedral pieces. This proves existence of the limit. Every piece of $f$ has gradient of $\ell_1$ norm at most $dU$, so subdividing a segment into its finitely many pieces shows that $f$ is globally $dU$-Lipschitz in maximum norm. For $t\ne0$, the maps $x\mapsto |t|f(x/|t|)$ have the same Lipschitz constant. Their pointwise limit as $t\to0$ is $f^\infty$, which is therefore also $dU$-Lipschitz. For any fixed $x_0$, \[ |F(x,t)-f^\infty(x_0)| \le dU\norm{x-x_0}_\infty +\bigl||t|f(x_0/|t|)-f^\infty(x_0)\bigr|, \] proving joint continuity at $(x_0,0)$. Away from $t=0$, $F$ selects among the finitely many linear forms \[ (x,t)\longmapsto g^{\mathsf T}x+bt, \qquad (x,t)\longmapsto g^{\mathsf T}x-bt \] coming from the pieces of $f$. At $t=0$, its value is also one of these forms, since the eventual slope along a ray is $g^{\mathsf T}x$. A continuous selection of finitely many linear forms is linear on each chamber of their equality arrangement, as in \cref{lem:arrangement}. Hence $F$ is CPWL with the stated coefficient bound. Positive homogeneity follows directly from \eqref{eq:homogenize} and the limit defining $f^\infty$. For an integer input $(z,t)$ with $t\ne0$, evaluate $f(z/|t|)$ and multiply its rational value by $|t|$ in binary arithmetic. For $t=0$, set $\lambda=2U+1$. Along the ray through integer $z$, two distinct affine pieces with different slopes can meet only at \[ s=-\frac{b-b'}{(g-g')^{\mathsf T}z}. \] The denominator, when nonzero, is an integer of absolute value at least one, and $|b-b'|\le2U$. Thus every possible change of slope occurs by $s\le2U$. Pieces with equal slopes cannot exchange at an isolated point unless their restrictions agree identically. It follows that $f(sz)$ is affine for all $s>2U$, and \begin{equation}\label{eq:recessionquery} f^\infty(z)=\frac{f(2\lambda z)-f(\lambda z)}{\lambda}. \end{equation} This uses two integer-input evaluations of $f$. All query lengths are polynomially related to those of $z,t,U$. The resulting values of $F$ on integer inputs are integers, because its linear coefficients are integers. The divisions in this paragraph occur only in a Boolean computation on rational encodings. \end{proof} \begin{proposition}[Affine conversion]\label{prop:affineconversion} A CPWL function with integer affine coefficients of bound $2^p$ admits the same polynomial conversion from a rational-input evaluation circuit at one polynomial coordinate length. The resulting network has integer weights and integer biases and computes the function on all real inputs. \end{proposition} \begin{proof} Apply \cref{lem:homogenize} in dimension $d+1$. The integer queries to $F$ made by the homogeneous construction have polynomial coordinate length. When their last coordinate is nonzero, the corresponding input to $f$ has numerator and denominator of that length. When it is zero, the two queries in \eqref{eq:recessionquery} have polynomially related length. Thus one circuit for $f$ at a sufficiently large polynomial length suffices to evaluate $F$ on every required integer query. A fixed Boolean circuit can evaluate all candidate queries with nonzero default denominators and select the correct answer from the bit test $t=0$. Exact rational arithmetic is polynomial-time, and $F$ has integer outputs at integer points. Use \cref{prop:compiler} to construct a bias-free network for $F$, then fix its last input to $1$. This gives a network for $f(x)=F(x,1)$ with integer biases and polynomial total encoding length. Construction is polynomial in the supplied rational evaluation circuit. No division in the formula for $F$ becomes a real gate: it occurs only in the Boolean preparation of queries. \end{proof} \section{Arithmetic circuits and differences of linear programs}\label{sec:corollaries} We prove the four corollaries from the introduction. All implications concern the same function on its full real domain. In particular, the linear-programming representation is not a relaxation and the arithmetic circuits do not assume a separation from any breakpoint. \subsection{Binary arithmetic and exact evaluation} \begin{lemma}\label{lem:binaryconversion} An integer-weight ReLU network of polynomial total encoding length can be converted in polynomial time to a polynomial-size binary $(\max,+,-)$ circuit. Constant $0$ suffices without biases; with integer biases, constants $0,1$ suffice. Conversely, such a binary circuit gives an integer-weight ReLU network of polynomial encoding length. Every polynomially encoded integer-weight network is exactly evaluable on rational inputs in polynomial time in the network and input lengths. \end{lemma} \begin{proof} A fixed integer multiplier $cx$ can be implemented from the binary expansion of $|c|$ by successive doublings and additions, followed by $0-x$ if $c<0$. The number of operations is polynomial in the coefficient length. Construct integer biases from $1$ in the same way and replace a ReLU by $\max\{0,x\}$. Each operation gate is binary, and computed values are reused rather than duplicated into a formula. The converse uses the signed ReLU representation of each maximum, sum, or difference. For evaluation, clear all rational input denominators by their product $D$. Since weights and biases are integers, every subsequent value can be represented with denominator $D$. Topological evaluation uses integer arithmetic and exact comparisons. In each layer of the graph, a sum of at most the number of preceding nodes and multiplication by fixed integer weights increases numerator length by at most a polynomial in the network description. With polynomially many nodes the total increase remains polynomial. Thus all intermediate numerators, the final answer, and the running time have polynomial length or size. The same argument works on integer inputs with $D=1$. \end{proof} \begin{proof}[Proof of \cref{cor:binaryintro}] Apply \cref{thm:main} and then \cref{lem:binaryconversion}. Both steps are polynomial-time when the evaluation circuit is supplied. Uniform construction follows from a uniform evaluator. \end{proof} \subsection{Two linear programs} The network-size bound for virtual extended formulations follows from Hertrich and Loho~\cite[Theorem~4.1]{HL}. We give an auxiliary-variable version of the argument, both for completeness and to keep the coefficients short. The construction works for a difference of support functions even when the represented function is not convex. \begin{proposition}[A network gives two short linear programs]\label{prop:networkLP} Let a bias-free rational rank-two maxout network with $s$ units compute $f\colon\R^d\to\R$. There are nonempty rational polytopes $R,Q$ and rational linear maps $\pi_R,\pi_Q$ such that \begin{equation}\label{eq:LPdifference} f(w)=\max_{u\in R}w^{\mathsf T}\pi_R(u) -\max_{v\in Q}w^{\mathsf T}\pi_Q(v) \quad(w\in\R^d). \end{equation} The descriptions of these polytopes and maps have length polynomial in the network description, and can be constructed in polynomial time. \end{proposition} \begin{proof} Order the units topologically and write their values as \[ f_i(w)=\max_{k\in\{1,2\}} \left(b_{ik}^{\mathsf T}w+\sum_{ji} \bigl(\alpha_{\ell1}u_{\ell1i} +\alpha_{\ell2}u_{\ell2i} +\mu_\ell\widehat u_{\ell i}\bigr),\\ \mu_i &=c_{q_i}+\sum_{\ell>i} \bigl(\alpha_{\ell1}v_{\ell1i} +\alpha_{\ell2}v_{\ell2i} +\mu_\ell\widehat v_{\ell i}\bigr). \end{align*} Starting at $i=s$ and proceeding backwards, the right-hand sides are nonnegative. We obtain a feasible solution by assigning their prescribed sum to $\alpha_{i1}$, setting $\alpha_{i2}=0$, and using the second equation for $\mu_i$. Thus each feasible set is nonempty. The same equations show that all feasible solutions satisfy $\mu_i\ge0$ and are bounded: later variables are already bounded, the second equation bounds $\mu_i$, and the first bounds the sum of two nonnegative variables. Backward induction completes the argument. Being closed and bounded, these feasible sets are polytopes. Every node contributes only constantly many variables and constraints. Every internal coefficient is a sum of at most two signed parts of original coefficients, and the coefficients of $B$ come directly from input weights. No recursive substitution occurs. Thus coefficient lengths, total description length, and construction time are polynomial in the network description. \end{proof} \begin{proof}[Proof of \cref{cor:lpintro}] Apply \cref{thm:main}, view the resulting bias-free network as a rational maxout network, and use \cref{prop:networkLP}. Its two feasible polytopes are $R_n,Q_n$ and its two maps give exactly \eqref{eq:introlp}. Both descriptions are constructed in polynomial time from the evaluation circuit. They therefore exist in the nonuniform setting and are uniformly constructible from a polynomial-time evaluator. \end{proof} \subsection{The two equivalences} \begin{proof}[Proof of \cref{cor:homequiv}] Theorem~\ref{thm:main} proves (i)$\Rightarrow$(ii), \cref{lem:binaryconversion} proves (ii)$\Leftrightarrow$(iii), and \cref{prop:networkLP} proves (ii)$\Rightarrow$(iv). For (ii)$\Rightarrow$(i), evaluate the polynomially encoded network exactly on integer inputs and unroll this polynomial-time computation into Boolean circuits. The network description is advice independent of the input values. For (iv)$\Rightarrow$(i), use the two rational LP descriptions as advice. Exact polynomial-time linear programming computes both optimal values for every integer objective, and subtraction gives $f_n(w)$. The value is integral by the hypotheses on $f_n$, so conversion to its signed integer output causes no difficulty. Unrolling this algorithm gives polynomial-size Boolean circuits at each input length. These implications establish all equivalences. Each transformation is effective in the supplied finite descriptions. Thus uniformly constructible networks, arithmetic circuits, or LP pairs give uniform evaluation algorithms, while a uniform evaluator supplies the input circuits used in the forward construction. This proves the uniform assertion as well. \end{proof} \begin{proof}[Proof of \cref{cor:affineequiv}] From (i), homogenize by \cref{lem:homogenize} and apply \cref{prop:affineconversion} to obtain (ii). Converting that integer-weight, integer-bias network by \cref{lem:binaryconversion} gives (iii), and the reverse conversion is also available. For the LP statement, retain the bias-free network for $F$ in the homogenization construction and apply \cref{prop:networkLP} in dimension $d_n+1$. Substituting $w=(x,1)$ gives \eqref{eq:introafflp}. Alternatively, a given affine network can be homogenized by replacing each bias $b$ by $bt$; at $t=1$ its value is unchanged, and the resulting network is bias-free. Either route proves (ii)$\Rightarrow$(iv). Conversely, a network in (ii) or a circuit in (iii) can be evaluated exactly on rational inputs in polynomial time. A representation in (iv) can be evaluated by solving the two rational LPs with objective parameter $(x,1)$. Their polynomially encoded descriptions serve as advice, yielding (i). Supplying these descriptions uniformly gives uniform algorithms. Starting with a uniform evaluator makes homogenization and all forward constructions uniform, completing the proof. \end{proof} Notice that (iv) in the affine equivalence still uses bounded feasible polytopes. The constant coordinate belongs to the objective parameter; it does not require an unbounded epigraph or a different feasible set for each input. \subsection{Consequences for integral polytopes}\label{sec:polyconsequences} Let $P_n\subseteq[-2^{p_n},2^{p_n}]^{d_n}$ be nonempty integral polytopes with polynomially bounded $p_n$. The support function has integer coefficient vectors given by vertices, so the homogeneous equivalence applies. For $0/1$ polytopes the coefficient bound is one. In particular, binary-weight optimization in $\FPpoly$ gives polynomial $\nnc(P_n)$ and $\vxc(P_n)$, while uniform polynomial-time optimization yields constructible networks and polynomially encoded virtual extended formulations. No inequality description or dual-certificate algorithm for $P_n$ is required. For completeness, the decision, value, and optimal-vertex versions are equivalent here. An integer objective $w$ has integer optimum in $[-dU\norm w_\infty,dU\norm w_\infty]$, where $U=2^p$. A threshold circuit therefore yields the value by binary search. To recover a vertex from values, take \[ b=2U+1,\quad a=b^d,\quad t=(b^{d-1},\ldots,1),\quad v=aw+t. \] Distinct integral points in $[-U,U]^d$ have distinct $t$-values differing in absolute value by at most $a-1$. Hence $v$ selects a unique $w$-optimal vertex $x^*$. It is also the unique optimizer of $bv+e_j$, since its advantage in $bv$ is at least $b>2U$. Thus \[ x_j^*=h_P(bv+e_j)-b\,h_P(v). \] All query lengths and their number are polynomial. Clearing the positive denominators of a rational objective preserves its optimizers, so integer and rational optimization have polynomially equivalent binary complexities. These adaptive reductions can be unrolled into circuits. If $P_I=\conv X_I$ for $0/1$ feasible vectors having polynomially verifiable certificates, the threshold problem belongs to $\NP$. Under $\NP\subseteq\Ppoly$, its circuits yield value circuits by the preceding reduction. Our theorem and the network-to-LP conversion then give polynomial $\nnc(P_I)$ and $\vxc(P_I)$. Consequently, a superpolynomial lower bound for either quantity on such an explicit family, with structural descriptions of length polynomial in its dimension, would imply $\NP\not\subseteq\Ppoly$. This consequence uses only the forward construction; it does not require a converse for networks with unrestricted real weights. Likewise, efficient optimization relative to an unspecified oracle is not an $\FPpoly$ hypothesis unless that oracle has a suitable circuit implementation. \section{Two limitations}\label{sec:limits} The hypotheses concern the encoding of the affine coefficients and the domain on which evaluation is supplied. For nonhomogeneous functions, integer evaluation alone is insufficient: $x\mapsto\max\{0,\min(2x,2-2x)\}$ vanishes at every integer but not between them. We now give two quantitative limitations, one for parameter encoding and one for neuron count. \subsection{Short rational coefficients need not give short network parameters} If all rational coefficients have a common denominator of polynomial bit length, multiplying the function by that denominator and applying the integer theorem gives polynomially encoded rational networks. Individual denominator bounds, however, do not provide such a common denominator when there are exponentially many pieces. \begin{proposition}[A rational parameter-encoding obstruction]\label{prop:denominators} There is a family of rational polytopes $Q_d\subseteq\R^{d+1}$ with polynomial-size inequality descriptions and $O(d)$-bit vertex coordinates, such that $h_{Q_d}$ is polynomial-time evaluable on rational inputs, but every exact rational-weight ReLU network for it has total parameter encoding length at least \[ 2^d-\log(2^d+1)\ge2^d-d-1. \] Biases are allowed. This is an encoding-length lower bound, not a neuron-count lower bound for arbitrary real weights. \end{proposition} \begin{proof} Let $s_j=2^{j-1}$ and consider \begin{equation}\label{eq:Qd} Q_d=\left\{(t,z)\in\R^{d+1}: 0\le z_j\le t\ (j\in[d]),\quad t+\sum_{j=1}^d s_j z_j=1\right\}. \end{equation} Every point has $t>0$ and is determined by $y=z/t\in[0,1]^d$, with $t=(1+\sum_j s_j y_j)^{-1}$. Its vertices are exactly \begin{equation}\label{eq:Qvertices} \frac{(1,a)}{1+\sum_j s_j a_j},\qquad a\in\{0,1\}^d. \end{equation} Indeed, if some $y_j$ lies strictly between zero and one, at most $d-1$ bound constraints in \eqref{eq:Qd} are tight: since $t>0$, the two bounds for one coordinate cannot both be tight. Together with the defining equation, their normals do not span $\R^{d+1}$. A small two-sided perturbation preserving all tight constraints is therefore feasible, so the point is not a vertex. Conversely, the $d$ endpoint equalities and the last equality in \eqref{eq:Qd} uniquely determine each point in \eqref{eq:Qvertices}. The description has $O(d^2)$ bits and the vertex coordinates have $O(d)$ bits. Their first coordinates include $1,1/2,\ldots,1/2^d$. There is also an elementary polynomial-time value algorithm. For an objective $(w_0,w_1,\ldots,w_d)$, maximize \[ \frac{w_0+\sum_jw_j a_j}{1+\sum_js_ja_j} \quad\text{over }a\in\{0,1\}^d. \] If the optimum is $\lambda$, maximizing numerator minus $\lambda$ times denominator gives value zero. Thus an optimum selects all indices with $w_j-\lambda s_j>0$, no index with negative difference, and any subset of ties. It follows that some optimum is a prefix of the indices sorted by $w_j/s_j$. Evaluating the $d+1$ prefix ratios is an exact polynomial-time algorithm on rational inputs. Now take any rational-weight network representing this support function. Let $D$ be the product of the positive denominators of all edge weights, including output coefficients. On a fixed activation pattern, a gradient coordinate is a sum of products of weights along directed paths. No edge repeats on a path, so its reduced denominator divides $D$. Every vertex of $Q_d$ is the gradient of its support function on a nonempty open set. Within that set one may choose a full-dimensional activation region of the network. Hence each denominator $1,2,\ldots,2^d$ divides $D$, and \[ \lcm(1,\ldots,2^d)\mid D. \] The total parameter encoding length is at least $\log D$. For completeness, for any positive integer $M$ every binomial coefficient $\binom Mk$ divides $\lcm(1,\ldots,M)$. For a prime $p$, its valuation is \[ \sum_{j\ge1}\left(\floor{M/p^j}-\floor{k/p^j}-\floor{(M-k)/p^j}\right), \] whose summands are zero or one and vanish for $p^j>M$. The valuation is therefore at most $\floor{\log_p M}$, the valuation in the least common multiple. Since the largest binomial coefficient is at least $2^M/(M+1)$, \[ \log\lcm(1,\ldots,M)\ge M-\log(M+1). \] Take $M=2^d$ to obtain the claimed lower bound. \end{proof} Thus a rational-coefficient analogue cannot promise polynomial-time output of explicitly encoded rational parameters under only individual coefficient-length bounds. This argument does not exclude a small number of neurons with extremely long rational parameters, or with unrestricted real parameters. That size-only question is separate. \subsection{Polynomial-time evaluation with exponentially many necessary neurons} The integer coefficient-length assumption is also substantive, even when the evaluator returns very short values. \begin{proposition}[A binary-evaluation separation]\label{prop:sawtooth} There is a uniformly rational-input evaluable CPWL family on $\R^n$ with running time polynomial in $n$ and the input length, for which every exact ReLU network has $\Omega(2^n)$ neurons. The lower bound allows arbitrary real weights, biases, and depth. \end{proposition} \begin{proof} Put $M_n=2^{2^n}$ and define the univariate function \[ \psi_n(x)= \begin{cases} \dist(M_nx,\Z),&0\le x\le1,\\ 0,&\text{otherwise}. \end{cases} \] It is continuous because its values at $0,1$ are zero. On $[0,1]$ it has $2M_n$ affine intervals, with slopes $\pm M_n$, and there are two more constant exterior intervals. For rational $x=p/q\in(0,1)$, compute $r=M_np\bmod q$. Starting from $2\bmod q$, exactly $n$ modular squarings compute $2^{2^n}\bmod q$, using only integers of $O(\bits(q))$ bits. Then \[ \psi_n(p/q)=\frac{\min(r,q-r)}q. \] Comparisons handle inputs outside $[0,1]$. The running time and output length are polynomial in $n$ and the rational input length. A ReLU DAG with $s$ neurons, restricted to a line, has at most $2^s$ affine intervals. To see this, process its neurons in topological order. On every interval where all previous outputs are affine, the next preactivation is affine and can create at most one new breakpoint. Thus each neuron increases the interval count by at most a factor two. Since $2M_n+2>2^{2^n}$, exact representation requires $s\ge2^n$. Set $f_n(x_1,\ldots,x_n)=\psi_n(x_1)$ to obtain the asserted dimensions. \end{proof} The affine coefficients in this example are integers, but their bit lengths are exponential in $n$. This does not contradict \cref{thm:main} or \cref{cor:affineequiv}. Long coefficients alone also do not force a large network; a single fixed scalar multiplier can contain many bits. The example shows that an efficient evaluator may exploit the binary representation of a rational input without computing those large coefficients explicitly. There is a homogeneous version in two variables: \[ \Psi_n(x,t)= \begin{cases}|t|\psi_n(x/|t|),&t\ne0,\\0,&t=0.\end{cases} \] It is continuous at $t=0$ because $0\le\Psi_n(x,t)\le|t|/2$, is homogeneous CPWL with integer coefficients, and has the same lower bound after restriction to $t=1$. Padding gives a homogeneous family on $\R^n$ for $n\ge2$. This is a separation in the binary rational-input model. Modular squaring uses the binary numerator and denominator; it is not a polynomial-time procedure on an arbitrary real input using a fixed set of real-arithmetic operations. Consequently it does not settle the real-arithmetic question posed in \cite{HL}. \appendix \section{Encoding bounds and construction size}\label{app:size} The main proof needs only polynomiality. We collect quantitative bounds here, both to distinguish units from parameter bits and to specify the finite word lengths used by the Boolean computations. Put $\kappa=d+p+2$, which is within a constant factor of $d+p$. Let $S$ be the size of the supplied evaluation circuit on signed integer inputs of coordinate length $L_h$, with its output adapted to a fixed signed integer word. Invalid encodings may have any fixed output. The notation $\widetilde O$ below suppresses fixed powers of logarithms in $d+p+2$, not in $S$. \subsection{The projection bound}\label{app:projectionbound} We verify the entry bound stated in \cref{lem:projection}. In its notation, $WZ=D$ is a lower triangular column Hermite normal form. Let \[ \Delta=|\det W|=\prod_{j=1}^d D_{jj}. \] The diagonal entries are positive integers, so each is at most $\Delta$. Since $0\le D_{st}t$ and $1\le j\le s-t$, expansion of the product gives \[ (L^j)_{st}=\sum_{s=i_0>i_1>\cdots>i_j=t} L_{i_0i_1}\cdots L_{i_{j-1}i_j}. \] There are $\binom{s-t-1}{j-1}$ chains in this sum, and each product has magnitude at most one. Thus \[ |(I+L)^{-1}_{st}| \le\sum_{j=1}^{s-t}\binom{s-t-1}{j-1} =2^{s-t-1}\le2^{d-2}. \] The diagonal entries are one. Division of column $t$ by $D_{tt}\ge1$ shows that all entries of $D^{-1}=(I+L)^{-1}\Lambda^{-1}$ have magnitude at most $2^{d-1}$. Hence \[ |(Z^{-1})_{st}|=|(D^{-1}W)_{st}|\le d2^{d-1}R. \] Using $\Pi_A=Z^{-\mathsf T}EZ^{\mathsf T}$ now gives \[ |(\Pi_A)_{st}| \le d\,(d2^{d-1}R)\,d(\sqrt d R)^{d-1} \le 2^d d^{d+3}R^d=H. \] The cases of empty or full row space use $I$ and $0$ directly. This establishes the bound for all prefixes and for the fixed algorithm used in the construction. \subsection{Lengths of the constants and stored quantities} The following are per-coordinate or per-entry bounds unless specified otherwise. \begin{center} \begin{tabular}{@{}p{.66\textwidth}p{.25\textwidth}@{}} \toprule Quantity & Binary length\\ \midrule $B,N$ & $O(p+\log(d+1))$\\[2pt] $R,K,T$; each $q_i,(v_i)_s$ & $O(d\kappa)$\\[2pt] Query coordinates $(\zeta_i)_s$; $L_h$ as a length bound & $O(d^2\kappa)$\\[2pt] Query values $y_i=f(\zeta_i)$ & $O(d^2\kappa)$\\[2pt] $H$; entries of $\Pi_i$ and $\eta_i$ & $O(d^2\kappa)$\\[2pt] $Y=(2R)^d$ and $M=2KY$ & $O(d^2\kappa)$\\[2pt] $C=(dM)^d$ and $Q$ & $O(d^3\kappa)$\\[2pt] $\rho_j=2Q^j$, for $j\le J$ & $O(d^5\kappa)$\\[2pt] Total bits of the stored state $(v_{