WorksComputer Science
Global Convergence of Detailed Balanced Mass Action Systems
Abstract
We give a self-contained proof that, for a finite detailed balanced mass-action system with positive rate constants, each positive stoichiometric compatibility class contains exactly one positive equilibrium and every positive trajectory converges to it, together with a Lean 4 formalization of the complete argument from persistence to convergence. Boundedness and persistence come from the barrier argument of OpenAI (2026) for weakly reversible systems: an arbitrary-tolerance affine approximation yields a finite-minimum barrier whose superlevel sets confine trajectories and give one logarithmic bound for all solutions from a given initial state. The Horn-Jackson dissipation identity identifies the positive equilibria as an exponential family with parameters in the orthogonal complement of the stoichiometric subspace, which gives uniqueness in each class. A bounded-speed descent argument replaces LaSalle's invariance principle; it uses neither uniqueness of solutions nor continuous dependence on initial data, and it places every cluster point in that family. The route given here is direct and elementary, and its main theorem is checked by the Lean kernel against explicit definitions. The proofs, the Lean development, and the manuscript were produced in ClawsGO Science, an agent harness that packages a complete research environment: Claude Opus 5.5 made the research decisions, GPT 6 Astra carried them out, and the Lean kernel checked every formal step.
Introduction
We consider finite mass-action reaction networks with positive constant rate coefficients and a positive detailed balanced equilibrium. The classical theory of Horn and Jackson [11 pp. 81–116], Feinberg [5 pp. 187–194], and Horn [9 pp. 172–186] establishes the equilibrium structure of complex balanced systems, including existence and uniqueness in each positive compatibility class and local asymptotic stability. Horn [10 pp. 125–137] formulated the global attractor conjecture, which asks whether every positive trajectory converges to the positive equilibrium in its compatibility class.
The entropy argument must be supplemented by an exclusion of boundary accumulation. Without this step, it permits an -limit set contained in the positive equilibria ∪ the boundary [14 pp. 89–110]. Earlier partial results include the single linkage class case [1], low-dimensional systems [13], and strongly endotactic networks [8]. Craciun [3], Feinberg [5] gives a proof of the global attractor conjecture for complex balanced systems using toric differential inclusions.
Theorem 3.1 and § 3.1.1–§ 3.1.7 build on OpenAI’s work on boundedness and persistence of weakly reversible mass-action systems [15]; the detailed-balance argument developed here uses this theorem as input. The accompanying Lean modules for that part are adapted from the same work, with paths, namespaces, and principal declarations reorganized for this project.
Theorem 1.1 (Main theorem). Assume that the network is finite, all rate constants are positive, and the mass-action system is detailed balanced at some . Then, for every , the following hold:
(i) The positive compatibility class contains exactly one equilibrium .
(ii) Equation (1) has a solution starting at and defined on .
(iii) Every such solution satisfies as .
Contributions. (1) A self-contained proof of Theorem 1.1 that joins persistence and the entropy argument into one chain. Theorem 3.1, stated for finite weakly reversible systems without detailed balance, supplies one compact container for all forward solutions from a given initial state (Corollary 3.15), and Steps 2–5 use Step 1 only through this container. The detailed-balance argument, this reduction, and the exact examples were developed for this paper.
(2) In Step 5, a bounded-speed descent argument for a non-increasing function bounded below replaces LaSalle’s invariance principle. It uses neither continuous dependence on initial conditions nor uniqueness of solutions.
(3) A machine-checked proof of the whole chain from persistence to global convergence in Lean 4 [4] with Mathlib [12]. The formal main theorem quantifies over all global forward solutions, and the exact three-species example of § 5.1 instantiates it. § 4 gives the correspondence between the paper and the formal statements and the reproducible build.
Relation to previous work. Existence, uniqueness, and the entropy structure are classical. Craciun’s proof of the global attractor theorem [3 Section 8] covers this case through toric differential inclusions; the route here is direct, uses elementary tools, and is machine-checked from persistence to convergence.
How the work was produced. The work was carried out end to end in ClawsGO Science [16], an agent harness that packages a complete research environment. Claude Opus 5.5 made the research decisions: it reduced Steps 2–5 to a single compact container for all solutions from a given initial state (Corollary 3.15), replaced LaSalle’s invariance principle by the bounded-speed descent argument of Step 5, and chose to formalize the whole chain from persistence to convergence on top of the adapted persistence modules. GPT 6 Astra carried out these decisions: it wrote the proofs and the Lean modules, adapted the 71 persistence modules, ran the builds and axiom audits, and drafted the manuscript. The Lean kernel checked every formal step, and the human authors directed the work and reviewed the results.
Proof strategy and organization. § 2 fixes the notation. § 3.1 constructs an affine barrier, proves confinement through feasible directions, and obtains a common logarithmic bound and a compact container for the trajectories. § 3.2 proves entropy dissipation, parameterizes the positive equilibria, establishes uniqueness, and treats cluster points. § 3.3 combines these steps. § 4 records the formal statements, their correspondence with the paper, and the scope of verification. § 5 gives examples and discusses persistence, complex balance, and boundary initial conditions.
Mass Action Systems and Detailed Balance
Mass action systems
Let there be species. A complex is a vector , and is a finite set of complexes. A reaction network is a finite set . We write a reaction as and require . Its source and target are and , respectively. Each reaction has a rate constant , and we put . For , write the monomial and the inner product . The mass-action equation is
The stoichiometric subspace is . For , the set is the positive stoichiometric compatibility class of . The map is polynomial, and (1) gives for every .
Definition 2.1 (Solutions). Let . (i) A map is a global forward solution starting at if and, for every , the map is differentiable at with derivative .
(ii) Let . A map is a solution on if , the map is continuous on , and it is differentiable at every with derivative .
Definition 2.1(i) requires a two-sided derivative at , so must also be defined to the left of . This is the formalization convention used in Section 4. Since is polynomial, any classical forward solution extends a short distance backwards, so the convention does not restrict the result. The confinement argument of Lemma 3.10 and the descent argument of Step 5 apply to every solution without using uniqueness. The complete Lean proof also constructs a stronger forward-invariance property, including extension and agreement of finite solution segments; this construction uses standard ODE uniqueness for the locally Lipschitz polynomial vector field.
Reversibility and detailed balance
Definition 2.2. (i) A network is reversible if implies . In this case denotes the reverse of , and is an involution on .
(ii) A network is weakly reversible if, for every , there is a directed path consisting of reactions in , with .
(iii) A system is detailed balanced if the network is reversible and there exists such that
By definition, .
Lemma 2.3. Every reversible network is weakly reversible.
Proof. For , the reverse reaction itself gives a path from to of length 1. □
Remark 2.4 (Existence of detailed balance). Assume the network is reversible. Choose a representative direction for each reverse pair and put . Setting componentwise, (2) is equivalent to the linear system . This system is solvable if and only if every real linear relation , with , implies . These are the Wegscheider conditions [6 pp. 1819–1827]. In particular, if the vectors are linearly independent, all positive choices of rate constants admit detailed balance.
Notation
We use for the maximum norm on . For and , write . The map is a bijection from to with inverse . It maps the cube to the box
and maps the boundary of the cube to the topological boundary of the box. The monomial definition gives
Proof of the Main Theorem
We prove Theorem 1.1 in five steps. Section 3.1 proves boundedness and persistence for weakly reversible systems (Theorem 3.1), without (2), and applies the result to detailed balanced systems to obtain a common compact container for all solutions from the fixed initial state (Corollary 3.15). Section 3.2 supplies Steps 2–5 of the Horn–Jackson argument: entropy dissipation, identification of positive equilibria, uniqueness in each class, and identification of cluster points. Section 3.3 finishes the proof. Steps 2–5 use Step 1 only through Corollary 3.15.
Boundedness and persistence for weakly reversible systems
Statement
Theorem 3.1 (Logarithmic confinement). Assume , the network is finite and weakly reversible, the rate constants satisfy , and . Then:
(a) There exists a global forward solution starting at .
(b) There exists such that every global forward solution starting at is positive at all nonnegative times and satisfies
The same works for all these solutions and all coordinates; it may depend on the network, rate constants, and .
Here a global forward solution is understood as in Definition 2.1(i). Theorem 3.1 assumes only weak reversibility and positive constant rates; detailed balance (2) is not required.
Exponentiating (4) places every trajectory in the compact box inside the positive orthant. Conversely, on any nonempty compact subset of the positive orthant the finitely many continuous functions have a common finite maximum. Thus logarithmic confinement expresses both boundedness and separation from the boundary. We will construct one compact plateau containing all trajectories from and obtain from it.
Strategy
We construct a barrier as a finite minimum of affine functions. Let for and put
An index is active at if , equivalently for every . Every minimizer is active when there is a tie. We construct data with the following properties.
There is a constant branch , with and , that is active at . Thus , and the plateau contains .
At every , the vector is a feasible direction of the superlevel set : a sufficiently short forward segment stays in that set. The Lipschitz continuity of then makes non-decreasing along trajectories.
The constant branch is inactive on , so the plateau does not meet the boundary of the box.
Consequently, is bounded below by and above by , and the trajectory remains on the plateau. The plateau is a compact convex polyhedron in , on which the logarithmic coordinates are uniformly bounded, giving (4).
The feasible-direction criterion of Lemma 3.8 reduces this property to for every constraint tight at level , namely every active branch. To obtain these inequalities, write . By (3), . For small , complexes minimizing have dominant monomials in . If the ordering induced by agrees with that induced by , the leading contributions to point upwards from the lowest levels (Lemma 3.2). The main difficulty is to make every active direction close enough to while fixing all directions before choosing $h ({xref}Proposition 3.5`).
Network lemmas
Lemma 3.2 (Cut-flux dominance). Assume that the network is weakly reversible, , , , and the following conditions hold:
(O) For all , the inequality implies .
(Q) For each reaction , we have .
Then .
Proof. Define the height . For , let
be the upward and downward reactions crossing height , respectively, and put
(i) We have . This is immediate if . Otherwise choose . Weak reversibility gives a directed path from to . Its initial height is and its final height is , so some reaction on the path satisfies , that is, . For any , we have , and (O) gives . By (Q) and ,
(ii) Sum over cuts. Arrange the distinct values in as . If a reaction satisfies , then , and holds exactly for . The downward case is analogous; equal-height reactions cross no . Hence
Alternatively, (ii) can be expressed as an integral of with respect to , using , without sorting the heights. The integral and finite cut-sum formulations are equivalent. Condition (Q) is imposed reaction by reaction, so the empty reaction set needs no separate argument. One upward reaction dominates the total downward flux; reverse reactions need not be paired. This is why weak reversibility suffices.
Lemma 3.3 (Monomial ordering from an exponent gap). Let , , , and . If , then .
Proof. By (3), . For , the map is non-increasing, so .
Lemma 3.4 (Sign tolerance). Let be finite.
(a) There exists a function such that, for any , if for all , then, for every satisfying , the numbers and have the same sign and .
(b) For every finite set , there exists such that for all and with .
Proof. (a) Put . For fixed , let , taking when the set is empty, and define . If for every , and satisfies , then and
Thus , and and have the same sign. (b) Take the minimum of and all the finitely many positive numbers , taking if this collection is empty. □
The definition of includes zero in the finite set, so it gives when .
The function is chosen pointwise; no continuity is required.
Affine approximation
Proposition 3.5 (Uniform affine approximation). For every function , there exist , directions , functions , and such that the following holds. For every , every satisfying , and every index active at for the affine family , we have
The directions and intercept functions are fixed before is chosen; only the values vary with . The conclusion holds for every active index, including ties, as required by the tight-constraint criterion in Lemma 3.8. The proposition depends only on the dimension and tolerance , not on the reaction network. Section 3.1.7 proves it by induction on dimension, first constructing local label families near a fixed minimum and then joining them along a chain of intervals.
Assembly of the barrier
Proposition 3.6 (Barrier data). Assume weak reversibility, , and . There exist , , affine functions for , and an index such that:
(B1) We have , and is active at .
(B2) We have , that is, for all .
(B3) Put . For every , there exists such that
The step size may depend on ; the condition is imposed throughout .
(B4) For every , the index is inactive at .
Proof. Order of choices. Put , where are the coordinate vectors. Choose, in order, from Lemma 3.4(a); the data from Proposition 3.5 for this ; and from Lemma 3.4(b) for . Finally choose such that
This is possible: as , we have and . Put . Then and . Fix the intercepts . Since the directions are fixed before is chosen, the gap is independent of , allowing both inequalities in (3.2) to hold.
Key estimate. Suppose , the index is active at , and satisfies . Proposition 3.5 gives , and Lemma 3.4 yields
For (B3), let and write with . Let be active at . Apply Lemma 3.2 with . Condition (Q) is the second inequality in (3.2). For (O), if and , take . Then , so (3.3) gives and . Lemma 3.3 gives . Therefore .
Apply the finite-constraint criterion of Lemma 3.8 with level , base point , and direction . Its tight constraints are precisely the active branches just considered. It gives a positive step on which every stays at least , proving (B3). The criterion is an elementary affine calculation independent of the barrier construction.
For (B1), a finite non-empty family always has an active index. Choose active at . If , take . (6), with , gives , contradicting . Thus .
For (B2), the inequalities and give .
For (B4), let and write . Then , and for some coordinate. If were active at , Proposition 3.5 would give , a contradiction.
The plateau and confinement
Take the data from Proposition 3.6 and put , , and
Lemma 3.7 (Plateau geometry). (a) We have everywhere, and if and only if , equivalently is active at . (b) The set is an intersection of finitely many closed half-spaces, hence a closed convex polyhedron, and . (c) We have ; in particular, is compact and contained in .
Proof. (a) Since , we have and hence . The equality is equivalent to for every branch. (b) This follows from the definition and (B1). (c) Parts (a) and (B4) imply . Thus is a disjoint union of relatively open sets. The set is convex and therefore connected. By (B2), the first set contains and is non-empty, so the second is empty. Thus is a closed subset of the compact box and is compact.
Lemma 3.8 (Feasible directions under finite affine constraints). Let be finite, let for , and fix a level . Put . For , a vector satisfies
for some if and only if for every tight constraint , that is, every with .
Proof. Write and . Then
Suppose the tight constraints have nonnegative slopes. For , set ; the displayed expression is nonnegative for all . For , set . If , then
Thus works for every constraint, including when is empty. Conversely, a feasible segment and a tight constraint give , hence .
For the barrier family, taking identifies the tight constraints with all active branches at . At a plateau point, and . The finite minimum defining accounts both for ties and for the slack of the other constraints.
Lemma 3.9 (From feasible directions to monotonicity). Let , where and the are affine. Suppose is continuous and differentiable on . If, for each , the direction is feasible in at , then is non-decreasing on .
Proof. The maximum norm gives
Indeed, use a minimizing branch at to bound , and then exchange . Put ; it is continuous on , because is continuous and is Lipschitz. For fixed , differentiability gives , with as . For every sufficiently small positive , feasibility and the Lipschitz estimate imply
Consequently . The feasible step may vary with ; only the limit at this fixed is used.
To pass from this local inequality to monotonicity, fix and put . If and , the nonempty closed set has a largest point . At the lower right Dini derivative is at least , so for all sufficiently close . This contradicts maximality. Let and use continuity at the endpoints. □
Lemma 3.10 (Confinement). Let and , and let be a solution starting at on in the sense of Definition 2.1(ii). Then .
Proof. The case is immediate. For , put . By and continuity, . Since is closed, . For every , condition (B3) at says that is feasible in the current superlevel set. Lemma 3.9 therefore gives on . Together with , this gives throughout that interval. If , then and continuity keeps in for a short interval after , contradicting the definition of . Hence . □
Confinement holds for every solution, with no uniqueness, global existence, or positivity assumed in advance. Positivity follows from .
Lemma 3.11 (Global existence from compact confinement). Let be compact. Suppose that, for every and , all solutions starting at on remain in . Then a global forward solution exists from every .
Proof. The polynomial map is bounded and Lipschitz on a compact neighborhood of . The Picard–Lindelöf theorem gives a time independent of such that a solution exists on from every . Choose such a solution from . By confinement, . Choose another local solution starting at and translate its forward segment to , extending the forward solution to . Continue inductively. Adjacent pieces agree in value at their junction, and both derivatives equal at that value, so the concatenation is differentiable there. This gives a curve on satisfying the equation at every . Extend it arbitrarily to . □
Proof of Theorem 3.1. Take the data of Proposition 3.6 and the plateau . Lemmas 3.10 and 3.11 give a global forward solution from , proving (a). For any global forward solution from , apply Lemma 3.10 on each finite interval to obtain for all . By Lemma 3.7, is nonempty, compact, and contained in the positive orthant. Each continuous function therefore attains a finite maximum on . Set
The plateau was chosen from the network and before choosing a solution. Thus this one constant bounds every trajectory, proving (b).
Proof of Proposition 3.5
We first prove a sequential version on a general cube (Lemma 3.12), and then obtain the uniform conclusion of Proposition 3.5 by compactness. We denote the dimension by because the proof proceeds by induction on dimension.
Notation. For an integer , , and , continue to write . A label is a pair , where the slope is independent of and the intercept is a real function defined for all sufficiently small . Given a finite non-empty label family , a fixed small , and , we call active at if
All minimizers are active, including ties. When finitely many label families are combined, restrict their intercepts to a common domain . In every sequential statement below, discard finitely many initial terms so that all parameters lie in this common domain. Write and . The largest coordinate of is .
Lemma 3.12 (Affine approximation with arbitrary tolerance). Let , , and let be any function. There exists a finite non-empty label family with slopes and intercepts satisfying as , with the following property. For every and every sequence converging to , if a fixed is active at for every , then
No regularity is assumed for , and the approximating sequence need not lie in . This is necessary for induction: after projection, the sequence may approach a face of a smaller cube from either side. The conclusion holds for every label that remains active along the sequence, including tied labels.
Proof. We use strong induction on , invoking the induction hypothesis only in positive dimensions below . First fix a value of the minimum exponent and construct a label family. Negative intercepts compensate for increasing slope components in coordinates where is small. Compactness extends the guarantee to nearby values of around . A finite interval construction then selects among these families. When , Stage 1 uses only a singleton family, so the remaining stages also establish the induction base.
Stage 1. Construction at a fixed minimum.
Fix . We construct a finite family whose slopes all satisfy and which contains the label . Its active labels satisfy the conclusion whenever the limit has and activity is taken within .
If or , take . In either case, the only point of the cube with is , so the conclusion is immediate. Henceforth assume and .
A label has type if exactly slope components are strictly greater than $t and all others equal . Type 0 consists only of . Construct the remaining types in the order . After constructing type , choose such that
There are only finitely many slopes of type , each with a positive tolerance, so such a exists. Only these finitely many tolerance values are compared; no positive lower bound for on the entire cube is needed.
For each -element subset and each , let equal on and outside . Apply the induction hypothesis in dimension to the cube and tolerance , ordering the coordinates of naturally. For every resulting label with , include the label
in type . Taking all coordinate subsets and all types gives the finite non-empty family . Since , every intercept is . The negative term favors increasing the slope in coordinates of that are small relative to . As decreases, this preference becomes stronger at each successive type.
Stage 2. Verification at a fixed minimum. Assume , , , , and . Fix a type label that remains active in along the sequence, and let be its raised coordinate set. All asymptotic comparisons below are along this sequence; write . Whenever a limiting exponent lies strictly on one side of a threshold, convergence gives a fixed positive exponent gap for sufficiently large . We use only these gaps and do not replace by , which convergence of exponents alone would not justify.
If , comparison with and activity give
Every coefficient on the left is . If for some , a fixed satisfies for all sufficiently large . Dividing by then gives a term tending to infinity on the left, a contradiction. Therefore
Among labels constructed using the same , the contribution from coordinates outside and the intercept term are common. Thus is active at within the family supplied by induction. Its limiting exponent vector lies in . The induction hypothesis gives
Here it is essential to allow approximating sequences outside the cube: need not lie in , although its limit does. In particular, a limiting coordinate equal to or requires no strict inequality.
We next control coordinates outside , taking for type 0. Suppose . We claim that
Otherwise there is some with , so every limiting exponent on is strictly greater than . When , use for ; when , no such check is needed. Choose any type label whose raised coordinates are . Its affine value minus the value of is
since in every raised coordinate. For the purported active label, the corresponding difference is zero when and is bounded below by when . In the latter case, . Thus, for sufficiently large , the competitor has strictly smaller value, contradicting activity. This proves the claim. Outside we have and , so
where the strict inequality is precisely the condition imposed on when constructing type .
If , only one coordinate lies outside . Each exponent on is , and , so the remaining limiting exponent equals and has zero error. Combining the cases gives for every type, including types 0 and . Strictness is not needed at the threshold .
Stage 3. Extension to nearby minima.
Fix and the finite family . For each label , let be the set of limiting points realized by sequences and such that is active in at and converges to the given point. The set is closed. Indeed, if and , choose a point and a parameter from a realizing sequence for such that
and is active at . Then , so . This diagonal selection uses actual active points and does not require continuity of .
Consequently, the set
is compact. Every here is a fixed real number, so continuity of is unnecessary. Stages 1 and 2 show that no point of satisfies . Continuity of therefore gives such that no point of satisfies
Indeed, if is non-empty, choose below the positive minimum of on . If is empty, any positive radius works. Thus the limiting active-label conclusion holds whenever and .
If necessary, decrease further so that every local intercept satisfies
For a non-singleton family, it suffices to impose ; singleton intercepts vanish. This stronger decay uses the constructed form and and does not follow from alone. Decreasing the radius preserves the preceding guarantee. We now have a correct local family near every possible value of ; it remains to combine finitely many families so that the appropriate one is selected.
Stage 4. Finite interval construction and gluing.
Each local family gives the required approximation near its own minimum level. Add a common intercept shift to each family so that every label active in the combined family comes from an appropriate neighborhood. Overlap between adjacent neighborhoods allows equality at the transition cuts.
Choose a finite subcover of from and discard any selected interval contained in another, retaining one of any identical pair. Order the remaining centers as and write . Non-containment forces the left and right endpoints to have the same order. Since , this is also the order of the centers. Hence
Adjacent intervals overlap. Otherwise , leaving points in uncovered by every selected interval. The endpoint ordering, coverage, and the fact that all centers lie in imply that the first interval contains and the last contains .
For , choose
This open interval is non-empty: the adjacent intervals overlap, each contains its center, and . Thus belongs to both neighboring intervals and lies strictly between their centers. Put and . Then
When , no cut is needed and the single interval contains all of .
Take the union of the selected families and, at level , replace each intercept by
The sum is empty for . Every new intercept is : use (3.4) and , while each shift exponent satisfies . Within one local family, a common shift does not change activity. Between adjacent families, the extra term selects the family on the appropriate side of the cut.
Suppose a fixed label from level remains active in the combined family along and . Let be its original local intercept and continue to write . We claim that
If and , each is . By (3.4) and , the local intercept is also . Subtracting the value of the shifted label gives
for sufficiently large , contradicting activity. If and , subtract instead the shifted label . The difference is
Every coefficient in the inner product is . There is a coordinate with , so . Also gives . Dividing the difference by therefore gives a quantity tending to , again contradicting activity. At or , the outer bounds follow from .
By (3.5), the claim implies , including equality at either cut. Labels at the same level receive the same shift, so activity in the combined family implies activity in the original local family. The Stage 3 guarantee for gives . Each contradiction uses a competitor with strictly smaller value, so the argument also applies to tied active labels. This completes the induction. □
Corollary 3.13 (Uniform active-label bound). Let be as in Lemma 3.12 and fix its label family . There exists such that, for every and every , each label active at satisfies . The family is fixed before is chosen.
Proof. Otherwise, for every there exist , a point , and a label active at such that . Since is finite and is compact, a subsequence has fixed and . On this subsequence is constant. Passing to the limit gives , contrary to the strict inequality in Lemma 3.12. No regularity of is used. □
Proof of Proposition 3.5. Take , , and . Apply Lemma 3.12 and Corollary 3.13 to the restriction of to , obtaining a finite non-empty family and . Decrease if needed so that all intercepts are defined on , and extend them arbitrarily to the remaining values of , for example by ; these values do not affect the conclusion. Enumerate as with . The condition is equivalent to , and the assertion that is active at for is exactly the activity defined above. Corollary 3.13 therefore gives for . □
Proposition 3.5 enters Step 1 in two ways. The directions are fixed before , so the gap in Lemma 3.4(b) is independent of . The conclusion holds for every active index, so every tight constraint passes the feasible-direction test in Lemma 3.8. The tolerance may be discontinuous, which allows Proposition 3.6 to impose sign conditions near finitely many hyperplanes simultaneously.
A common compact container in the positive orthant
We return to detailed balanced systems and fix .
Lemma 3.14 (Invariance of the compatibility class). Let be a global forward solution starting at . Then for every .
Proof. Let be any linear functional satisfying . Since , we have for . The mean value theorem gives , that is, . In finite dimensions, a vector annihilated by every functional in the annihilator of belongs to . □
This proof uses the mean value theorem and does not require integration.
Corollary 3.15 (Step 1). Assume detailed balance and . There exists such that the set
has the following properties. (a) A global forward solution exists from . (b) Every global forward solution from satisfies for . (c) The set is compact and . (d) There exists such that for every .
Proof. Lemma 2.3 gives weak reversibility, so Theorem 3.1 supplies and (a). Exponentiating (4) gives for every solution and nonnegative time. Lemma 3.14 places these states in , proving (b). The box is compact and is closed, so their intersection is compact; every coordinate on it is at least . This proves (c). Continuity of on gives a finite speed bound; increasing it to a positive number proves (d). □
The detailed-balanced convergence argument uses Theorem 3.1 only through Corollary 3.15. For the fixed initial state , the set is a common compact container for all its forward solutions. The invariant plateau constructed earlier provides the stronger trapping property. Compact containment is sufficient for the subsequent convergence proof.
The Horn Jackson argument
Throughout this subsection and Section 3.3, assume detailed balance, with and as in (2). For and , define
Then .
Entropy monotonicity
Define
The quantity is the directional derivative of along the vector field.
Lemma 3.16 (Entropy properties). (a) We have on . (b) If is differentiable at with derivative and , then is differentiable at with derivative . (c) The function is continuous on .
Proof. (a) For , the inequality with gives . Multiplication by gives ; sum componentwise. (b) Apply the chain rule componentwise: . (c) The function is continuous on the positive reals, and is polynomial. □
Lemma 3.17 (Dissipation identity). For , we have
where . Every summand is and equals if and only if .
Proof. Interchanging the sums gives . By (2),
The map is an involution on , so for any . Hence , where . Substitution gives
which is (3.8). The function is strictly increasing, so , with equality if and only if . Also . □
Lemmas 3.16 and 3.17 show that, along every positive solution, is differentiable with derivative . It is therefore non-increasing and bounded below by 0.
Zero dissipation and positive equilibria
Lemma 3.18 (Exponential parameterization of positive equilibria). Assume positive rates and detailed balance at . Define . Then
The map is bijective, with inverse , where logarithms are componentwise.
Proof. First let and . Since every reaction vector belongs to ,
The flux identities of Lemma 3.17 give . Reindexing (1) by the reverse-reaction involution therefore gives
Thus consists of positive equilibria, and every positive equilibrium satisfies .
Conversely, let satisfy , and put . In (3.8) every summand is nonpositive. Since , a nonzero logarithmic gap would make the sum strictly negative. Hence for every reaction. The reaction vectors span , so , and exponentiation gives . This proves equality of the three sets. Finally, forces for every , proving uniqueness of the parameter. □
The parameterization describes all positive equilibria, including those outside the compatibility class of . If there are no reactions, and , as required.
Uniqueness in each compatibility class
Lemma 3.19 (Uniqueness in each compatibility class). If , , and , then .
Proof. By Lemma 3.18, write and with . Since and ,
Every summand is nonnegative, and strict monotonicity of , together with , makes it zero only when . Therefore and . □
Cluster points and convergence
A point is a cluster point of as if there exists such that .
Lemma 3.20 (Descent argument). Let be a global forward solution with for all , where is compact. Fix such that on . If is a cluster point, then .
Proof. Put . Step 2 and the mean value theorem show that is non-increasing on and satisfies . Let .
Suppose . Lemma 3.17 gives . Put . Continuity of at gives such that implies ; decrease the radius so that this neighborhood lies in the positive orthant. Put . Choose with , and then choose with , using that is a cluster point. For , the mean value inequality gives , hence and . A further application of the mean value theorem gives
contradicting the definition of as the infimum. □
A standard alternative uses LaSalle’s invariance principle: the -limit set is forward invariant, is constant on it, and therefore . That formulation uses continuous dependence on initial conditions. Lemma 3.20 uses only a speed bound.
Completion of the proof
Theorem 3.21 (Main theorem). Theorem 1.1 holds. In particular, the equilibrium in part (i) has the property that every in satisfying equals .
Proof. Take from Corollary 3.15 and choose a global forward solution . Since it remains in the compact set , it has a cluster point . Lemma 3.20 gives , so Lemma 3.18 places in , the set of positive equilibria. Also . If is another equilibrium in this class, then , and Lemma 3.19 gives . This proves (i); part (ii) is Corollary 3.15(a).
For (iii), let be any global forward solution starting at . It remains in . Since is closed, every cluster point lies in , so Lemma 3.20 applies. The same argument shows that every cluster point is an equilibrium in and therefore equals . A trajectory in a compact set with a unique cluster point converges to that point. Hence . □
Remark 3.22. (1) The proof also yields existence of a positive equilibrium in every positive class. This classical conclusion can alternatively be obtained by Birch-type convex analysis [7, 11]. (2) Theorem 3.1 assumes . For , the space has one point, so the conclusion of the main theorem is immediate.
Corollary 3.23 (Asymptotic stability within the class). Put . Then is the strict global minimizer of and is Lyapunov stable in . Together with Theorem 3.21, this implies that is globally asymptotically stable in .
Proof. If , the class is a singleton and both conclusions are immediate. Assume , and use the maximum norm throughout this proof. The function is strictly convex on , with Hessian . Lemma 3.18 gives . Thus, for , strict convexity gives . For stability, fix any and choose . The closed ball lies in the positive orthant. Its sphere intersected with is compact, since it equals the intersection of that compact sphere with the closed affine space . If this intersection is empty, take ; continuity prevents a trajectory in starting within distance from exiting this ball. Otherwise put . This minimum exists and is positive by compactness and strict minimality. By continuity of , choose such that implies . For any such initial state in , Theorem 3.21 gives a global forward solution. Corollary 3.15(b), applied to this initial state, places every global forward solution in a compact subset of the positive orthant, so is non-increasing, and Lemma 3.14 keeps in . If for some , then and continuity give with and . Hence , contradicting monotonicity. Consequently every such solution satisfies for all . This proves Lyapunov stability with the required quantifiers. □
Lean Formalization
Scope
Theorem 1.1 is formalized in Lean 4 with Mathlib, together with every numbered step of Section 3 from Theorem 3.1 to Theorem 3.21 and the exact example of Section 5.1. The development has about 9,300 lines. About 7,900 of them form the persistence part, adapted from OpenAI’s formalization [15], which supplies Theorem 3.1; the rest was written for this paper and contains the entropy argument, the convergence proof, and the examples. Section 4.2 gives the formal main theorem and the definitions it depends on, Section 4.3 the correspondence with the paper and the points where the formal proof departs from the text, and Section 4.4 the verification and the build.
Formal statement of the main theorem
structure DBCondition (N : CRN d)
(κ : RxnIdx N → ℝ) (c : Fin d → ℝ) : Prop where
hRev : HasReverses N
hPos : InOpenOrthant c
hEq : ∀ e : RxnIdx N,
κ e * xPow c e.val.1 = κ (oppRxn hRev e) * xPow c e.val.2
theorem db_unique_equilibrium_attracts
The statement is taken from GAC/Paper.lean, with the proof omitted. The Lean kernel checks that the proof establishes exactly this statement. Whether the statement expresses Theorem 1.1 then depends only on the definitions it uses; together with the statement they occupy fewer than sixty lines on top of Mathlib. The names in the listing are transparent abbreviations of these definitions, which read as follows.
N : CRN dis a network as in § 2.1: a finite set of complexes in and a finite set of reactions, each an ordered pair of distinct complexes of the network.RxnIdx Nis the type of its reactions, so assigns a rate constant to each reaction, and requires all of them to be positive.
xPow c yis the monomial , andrateField N κis the vector field of (1), with the reaction vectors computed in .
InOpenOrthant xmeans , andreactionSpan Nis the stoichiometric subspace .
HasReverses Nis reversibility (Definition 2.2(i)),oppRxnmaps to , andDBCondition N κ cis detailed balance (2), with in the role of .
SolvesForward N κ x0 xis Definition 2.1(i): , , and has derivative at every . It assumes neither positivity nor convergence.
With these readings, the first three conjuncts of the conclusion say that is a positive equilibrium in , and the fourth that it is the only one; this is Theorem 1.1(i). The last two conjuncts are Theorem 1.1(ii) and (iii). The final conjunct quantifies over all global forward solutions, so it does not rely on uniqueness of solutions.
Two instances check that the hypotheses can be met and that the definitions take the expected values. For the network of § 5.1, the development proves detailed balance at the stated rates, the conservation law , and convergence to from every positive initial state in the class , including the five initial states of Figure 1 written as exact rationals. A second instance treats .

Figure 1. Trajectories for and in the class . (a) Projection onto the plane; dots mark initial states and the star marks . (b) A logarithmic plot of ; the entropy panel is plotted down to .
Correspondence with the paper
Table 1 lists, for each numbered result, the Lean declarations that state it; names are relative to the namespaces GAC.Paper, GAC.Persistence, and GAC.Reformulated, and to GAC.PaperExample for the example rows. File locations, and the declarations behind individual proof steps, are recorded in docs/PAPER_MAPPING.md in the repository. The formal proof follows Section 3, with the following departures.
| Paper | Lean declarations |
| 1.1 / 3.21 | db_unique_equilibrium_attracts |
| 2.3 | strongConn_of_hasReverses |
| 3.1 | wr_trajectory_log_bound<br>bounded_persistent_of_weaklyReversible |
| 3.1 / 3.15 | compact_positive_iff_log_bound<br>solution_family_log_confinement |
| 3.2 | Cuts.cut_flux_nonneg_of_ordered_sources<br>massAction_points_inward_of_order |
| 3.3 | monomial_bound_of_exponent_gap |
| 3.4 | exists_sign_margin_function<br>exists_uniform_sign_gap |
| 3.5 | uniform_affine_approximation<br>Affine.uniform_data_of_full_certificates |
| 3.6 | exists_minBarrierSpec<br>Barrier.exists_barrier_data |
| 3.7 | Barrier.BarrierData.plateau_subset_interior_box<br>.isCompact_plateau |
| 3.8 | feasible_direction_iff_tight |
| 3.6 / 3.8 | Plateau special cases:<br>plateau_active_iff_tight<br>plateau_feasible_direction_iff_active<br>plateau_massAction_feasible |
| 3.9–3.10 | finite_minimum_monotone_of_active_slopes<br>Confinement.forward_solution_trapped |
| 3.11 | global_solution_of_compact_trap<br>global_massAction_of_compact_trap |
| 3.12 | Affine.exists_full_certificate |
| 3.13 | Affine.FullCertificate.uniform_activity_bound |
| 3.14 | trajectory_in_coset |
| 3.15 | GAC.exists_compact_class_container |
| 3.16 | entropyFn_ge_zero<br>entropyFn_deriv<br>entropyRate_continuous |
| Paper | Lean declarations |
| 3.17 | GAC.dissip_eq_sum |
entropyRate_double | |
entropyRate_le_zero | |
| 3.18 | logGap_vanish_of_rate_zero |
rateField_zero_of_logGap | |
entropyRate_eq_zero_iff | |
positive_equilibria_eq_exp_normal | |
exponential_parameter_unique | |
| 3.19 | equilibria_unique_of_exp_parameterization |
| 3.20 | entropyRate_zero_at_accumulation |
| 5.1 | net_detailed_balanced |
total_conserved | |
tends_to_equilibrium_of_total_eq_three | |
| Figure 1 | figure_initial_states_positive |
figure_initial_states_total | |
figure_initial_states_converge |
Table 1. Numbered results and the Lean declarations that state them.
Table 1.
Lemmas 3.9–3.10. Lean derives confinement from the monotonicity of a finite minimum along curves on which every active branch has nonnegative slope. The Lipschitz estimate and the Dini argument of Lemma 3.9 have no separate Lean counterpart; the conclusion is the same.
Proposition 3.6 (B3). Lean proves that every active branch has nonnegative slope along at each point of . The feasible-segment form follows from Lemma 3.8, as in the text; Lean states it on the plateau.
Theorem 3.1. Lean states positivity of solutions separately from the logarithmic bound, because under the Mathlib convention the bound alone does not exclude zero coordinates. The forward-invariance construction in its proof uses ODE uniqueness, as noted after Definition 2.1.
Corollary 3.15. The Lean container is for some , rather than , with the same conclusions. The case is treated separately.
Lemma 3.18. The equality of the three sets is assembled from several declarations rather than stated as one.
The following are not formalized: Corollary 3.23; the Wegscheider criterion of Remark 2.4 and the claim in § 5.1 that the example is detailed balanced for all positive rates; the discussions in § 5.2–§ 5.5; and the numerical computations behind Figure 1.
Verification and reproducibility
The project is available at https://github.com/BitMiracle-AI/detailed-balance-gac (tag v1.0). It pins Lean 4.34.1 and Mathlib commit d13f23b723b8a846827a245b89c10fc7d3f11612. In the lean/ directory, lake exe cache get followed by lake build GAC compiles the project from source in a few minutes. Then lake env lean Audit.lean and lake env lean GAC/Reformulated/Audit.lean print the axioms used by the main theorem, the example theorems, and the principal intermediate results. Each depends only on propext, Classical.choice, and Quot.sound, and none on sorryAx. A scan of the sources finds no sorry, admit, additional axioms, unsafe declarations, native_decide, or implemented_by. The repository README describes the module layout and gives the complete commands.
Examples and Discussion
Numerical example
Consider the three-species network and , with rate constants for the first pair and for the second. The reaction vectors and are linearly independent, so Remark 2.4 gives detailed balance for any positive rate constants. The space is spanned by , giving the conserved quantity . Equilibria satisfy and . In the class , the equilibrium is . Substitution expresses the conserved quantity as a strictly increasing function of , confirming uniqueness.
Figure 1 shows five positive trajectories computed with LSODA using relative tolerance and absolute tolerance on . The initial states are , , , , and . All lie in the stated class. The trajectories approach the equilibrium, and the entropy evaluated relative to that equilibrium decreases. The computation illustrates the theorem.
Why persistence is needed
Without Step 1, the entropy argument permits an -limit set contained in the positive equilibria ∪ the boundary of the positive orthant [14 pp. 89–110]. Boundary equilibria may exist, is not differentiable there, and the magnitude of can become arbitrarily small near the boundary.
Example 5.1. Consider with forward rate and reverse rate . There is only one reaction vector, so detailed balance holds; take . The conserved quantity is and the equation is . Besides the positive equilibrium , the closure of the class contains the boundary equilibrium . By (11), as we have . Thus dissipation can approach zero at a boundary equilibrium as well as at a positive equilibrium. In this example, the logistic equation, or the specific shape of on the class, excludes convergence to from positive initial states. Theorem 3.1 supplies the general compact-interior containment needed for the cluster-point argument.
The role of persistence under detailed balance
The function extends continuously to the closed orthant under the convention , and its sublevel sets there are compact. Along positive trajectories, , so alone gives boundedness in the detailed balanced case. What Step 5 needs from Step 1 is for . We use the full statement of Theorem 3.1 because it also provides global existence and matches the formal development.
Complex balanced systems
For a complex balanced system, there is a point at which total inflow equals total outflow at every complex. Replace the detailed-balance dissipation and equilibrium-identification steps as follows. Put . The inequality and the complex balance equations give
Equality holds exactly when for every reaction. Thus is constant on each weakly connected component. Set . At zero dissipation, regrouping the vector field by complexes gives
The first equality groups incoming and outgoing contributions at each complex. On an incoming edge, the equality condition gives ; complex balance makes each final bracket zero. Conversely, implies . At every positive equilibrium, on each reaction, so the logarithmic uniqueness argument of Lemma 3.19 applies. Complex balance implies weak reversibility [5, pp. 187–194]; [9, pp. 172–186], allowing Theorem 3.1 and the unchanged cluster-point argument to apply. This recovers the convergence conclusion covered by Craciun [3, Section 8].
Boundary initial states
The results concern strictly positive initial states. If a nonempty set of initially absent species is a siphon, meaning that every reaction producing a species in the set has a species of the set in its source complex [2], uniqueness of solutions of the polynomial system keeps those species absent, and the trajectory stays on the boundary for as long as the solution exists. In Example 5.1, is a siphon. The global attractor conjecture likewise concerns positive initial states.
Logical dependencies
Section 3 presents the mathematical proof, with the geometric input isolated in Theorem 3.1. Section 4 records the formalization, its correspondence with the paper, and the reproducible build. The complete Lean proof uses standard ODE uniqueness in its strong-invariance construction, whereas the direct descent argument of Step 5 has no such dependency. Steps 2–5 apply to any global positive trajectory contained in a compact subset of its compatibility class. Suitable siphon criteria [2] or low-dimensional results [13] may establish the needed persistence for particular networks under their respective assumptions.
Development in ClawsGO Science
The harness closes the loop between proposing and checking. Each formal step written by GPT 6 Astra went directly to the Lean kernel, and the full build and axiom audits of Section 4.4 certify the result, including the adaptation of the 71 upstream modules under new paths, namespaces, and declaration names. For the handwritten arguments and the correspondence between the paper and the code, the harness ran three independent review sessions in parallel, covering Sections 2–3.1, Sections 3.2–5, and the correspondence with Lean; every finding is incorporated in the present version.
Code and data availability
The Lean 4 project of Section 4 is publicly available at https://github.com/BitMiracle-AI/detailed-balance-gac under the Apache License 2.0; the version described in this paper is tagged v1.0, and Section 4.4 gives the commands that reproduce the check. The project and the numerical recomputation of Section 5.1, cross-checked with a second solver, were produced in ClawsGO Science [16].
Acknowledgements and use of AI
We acknowledge OpenAI’s work on boundedness and persistence of weakly reversible mass-action systems [15], from which Theorem 3.1 and Sections 3.1.1–3.1.7 derive. Seventy-one Lean modules of that work, at commit 1581d4cbdd69a0faf34b2089614fe2a814316a6a, are adapted into GAC/Persistence/, with renamed paths, namespaces and principal declarations and with modification notices. The Apache-2.0 license is retained in GAC/Persistence/LICENSE; the old/new paths and separate upstream/current hashes are recorded in lean/docs/SOURCE_MAP.md and its machine-readable companion.
The proofs, the Lean development, and the manuscript were produced in ClawsGO Science [16], with Claude Opus 5.5 making the research decisions and GPT 6 Astra executing them. Together they developed the detailed-balance argument and its connection with Theorem 3.1, the logarithmic bounds, feasible directions, and exponential parameterization in the main text, wrote and audited the Lean 4 development (the GAC modules and the manuscript and coordinate/geometric interfaces), constructed the exact examples and the numerical illustration, and drafted and translated the manuscript. The human authors directed the work, checked the arguments and the correspondence between the Lean statements and the mathematical definitions, and take full responsibility for the content. No AI system is an author of this paper.
References
- [1]D. F. Anderson, A proof of the global attractor conjecture in the single linkage class case, SIAM J. Appl. Math. 71 (2011), no. 4, 1487–1508. https://doi.org/10.1137/11082631X.
- [2]D. Angeli, P. De Leenheer, and E. D. Sontag, A Petri net approach to the study of persistence in chemical reaction networks, Math. Biosci. 210 (2007), no. 2, 598–618. https://doi.org/10.1016/j.mbs.2007.07.003.
- [3]G. Craciun, Toric differential inclusions and a proof of the global attractor conjecture, preprint, arXiv:1501.02860v3 (2026). https://arxiv.org/abs/1501.02860v3.
- [4]L. de Moura and S. Ullrich, The Lean 4 theorem prover and programming language, in: A. Platzer and G. Sutcliffe (eds.), Automated Deduction – CADE 28, Lecture Notes in Comput. Sci., vol. 12699, Springer, Cham, 2021, 625–635. https://doi.org/10.1007/978-3-030-79876-5_37.
- [5]M. Feinberg, Complex balancing in general kinetic systems, Arch. Rational Mech. Anal. 49 (1972), 187–194. https://doi.org/10.1007/BF00255665.
- [6]M. Feinberg, Necessary and sufficient conditions for detailed balancing in mass action systems of arbitrary complexity, Chem. Eng. Sci. 44 (1989), no. 9, 1819–1827. https://doi.org/10.1016/0009-2509(89)85124-3.
- [7]M. Feinberg, Foundations of Chemical Reaction Network Theory, Applied Mathematical Sciences, vol. 202, Springer, Cham, 2019. https://doi.org/10.1007/978-3-030-03858-8.
- [8]M. Gopalkrishnan, E. Miller, and A. Shiu, A geometric approach to the global attractor conjecture, SIAM J. Appl. Dyn. Syst. 13 (2014), no. 2, 758–797. https://doi.org/10.1137/130928170.
- [9]F. Horn, Necessary and sufficient conditions for complex balancing in chemical kinetics, Arch. Rational Mech. Anal. 49 (1972), 172–186. https://doi.org/10.1007/BF00255664.
- [10]F. Horn, The dynamics of open reaction systems, in: Mathematical Aspects of Chemical and Biochemical Problems and Quantum Chemistry, SIAM–AMS Proc., vol. 8, American Mathematical Society, Providence, RI, 1974, 125–137.
- [11]F. Horn and R. Jackson, General mass action kinetics, Arch. Rational Mech. Anal. 47 (1972), 81–116. https://doi.org/10.1007/BF00251225.
- [12]The mathlib Community, The Lean mathematical library, in: J. Blanchette and C. Hrițcu (eds.), Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, ACM, New York, 2020, 367–381. https://doi.org/10.1145/3372885.3373824.
- [13]C. Pantea, On the persistence and global stability of mass-action systems, SIAM J. Math. Anal. 44 (2012), no. 3, 1636–1673. https://doi.org/10.1137/110840509.
- [14]D. Siegel and D. MacLean, Global stability of complex balanced mechanisms, J. Math. Chem. 27 (2000), nos. 1–2, 89–110. https://doi.org/10.1023/A:1019183206064.
- [15]OpenAI, Boundedness and persistence of weakly reversible mass-action systems, preprint, September 25, 2026, with Lean source at commit 1581d4cbdd69a0faf34b2089614fe2a814316a6a, https://github.com/openai/math/tree/1581d4cbdd69a0faf34b2089614fe2a814316a6a.hub.valency.io/works/W_gtf8ahr3
- [16]ClawsGO Science, an agent harness with an integrated research environment, https://clawsgo.ai, accessed October 21, 2026.