Semigroup models for biochemical reaction networks

The catalytic reaction system (CRS) formalism by Hordijk and Steel is a versatile method to model autocatalytic biochemical reaction networks. It is particularly suited, and has been widely used, to study self-sustainment and self-generation properties. Its distinguishing feature is the explicit assignment of a catalytic function to chemicals that are part of the system. In this work, it is shown that the subsequent and simultaneous catalytic functions give rise to an algebraic structure of a semigroup with the additional compatible operation of idempotent addition and a partial order. The aim of this article is to demonstrate that such semigroup models are a natural setup to describe and analyze self-sustaining CRS. The basic algebraic properties of the models are established and the notion of the function of any set of chemicals on the whole CRS is made precise. This leads to a natural discrete dynamical system on the power set of chemicals, which is obtained by iteratively considering the self-action on a set of chemicals by its own function. The fixed points of this dynamical system are proven to correspond to self-sustaining sets of chemicals, which are functionally closed. Finally, as the main application, a theorem on the maximal self-sustaining set and a structure theorem on the set of functionally closed self-sustaining sets of chemicals are proven.


Introduction
In order to describe and understand the organization of very large biochemical reaction networks, in particular with respect to their evolutionary origins, the classical models developed by Horn and Jackson (1972) and Feinberg (1987Feinberg ( , 2019) ) based on systems of ordinary differential equations are often not the optimally suited mathematical framework.Although they are most capable of describing a wide plethora of biochemical phenomena, as is vividly presented in the books by Beard and Qian (2008), Mikhailov and Ertl (2017) and many others, these models are limited by their relatively high computational cost and their reliance on the precise knowledge of kinetic parameters.Several other approaches have been proposed with the primary aim of capturing general and universal properties of biochemical reaction networks, with a particular focus on the functional organization and self-sustainment as well as self-generation properties of the reaction networks of living and evolving systems.Examples include (M, R)-systems by Rosen (1958), hypercycles introduced by Eigen (1971), autopoetic systems studied by Varela et al (1974), chemotons by Gánti (1975), autocatalytic sets by Kauffman (1986) and catalytic reaction systems developed by Hordijk and Steel (2004).The common property of such models is that they focus on the catalytic function of network reactions by chemicals which are themselves produced by reactions within the network.They usually do not require kinetic details, but only the knowledge of the occurring reactions, together with data on catalysis.An in-depth discussion and comparison of such approaches was given by Hordijk and Steel (2018).
The construction of the semigroup models presented in this article is based on the formalism of catalytic reaction systems (CRS) introduced by Hordijk andSteel (2004, 2018); Hordijk et al (2011), which is a generalization of autocatalytic sets by Kauffman (1986) and is broad enough to encompass several of the aforementioned approaches.A CRS is given by the datum of a chemical reaction network, i.e. by a finite set of chemicals and specified chemical reactions, together with the assignment of catalytic functionality to certain chemicals.The main purpose of this article is to flesh out the algebraic structure which is inherent in the CRS formalism given by the occurrence of simultaneous and subsequent reactions and to investigate the properties of the resulting semigroup models.In particular, the construction allows to make the notion of the catalytic function of chemicals and of sets of chemicals on the whole CRS precise.In order to illustrate that the semigroup models provide a well-suited mathematical language for CRS, it is shown how self-sustaining subsets of chemicals can be characterized in a concise manner and how the largest self-sustaining subset of chemicals can be determined for any CRS.Moreover, within the semigroup formalism it is natural to consider self-sustaining sets of chemicals which cannot produce chemicals not already contained in the respective set.Such sets have not been considered in the literature thus far and the term of functionally closed set of chemicals is coined here for them.The lattice of all functionally closed sets of the CRS is characterized and its potential applications to the analysis of CRS which model real biological systems are discussed.In a nutshell, the semigroup models provide natural tools to concisely state and solve problems in CRS theory and to find new meaningful constructions within the theory.
Besides their applications to CRS theory, semigroup models open up the field of biochemical reaction networks to be tackled with algebraic methods.For example, the equivalence of finite semigroups and finite automata suggests to investigate the computational capabilities of chemical reaction networks from this abstract point of view.Moreover, it will be interesting and rewarding to construct a purely algebraic description of semigroup models without the need to consider their representation as maps on a finite set.One step in this direction, which is proven in this work, is the fact that the semigroup models of CRS with a nontrivial self-sustaining sets of chemicals cannot be nilpotent.This excludes a large class of potential semigroup models to be considered in inverse problems in the future.

Mathematical outline
In Section 2, the CRS formalism is introduced following Hordijk andSteel (2004, 2017).More precisely, a CRS uses the datum of a chemical reaction network, i.e. a finite set of chemicals X together with a finite set of net chemical reactions R. In addition, a set of catalysis data C ⊂ X × R is specified by stipulating that for each (x, r) ∈ C, the reaction r is catalyzed by the chemical x.Finally, a subset F ⊂ X, called food set, of constantly supplied chemicals is given.The kinetic rate constants of the chemical reaction network are not part of the datum of a CRS.Within the CRS formalism, the notion of self-sustainment has been formalized under the name of pseudo-RAF by Steel (2015) and Hordijk and Steel (2017).
In Section 3.1, the catalytic function of chemicals is given the structure of a semigroup, which is additionally equipped with a partial order and an idempotent addition.To begin with, to each reaction r ∈ R, a function φ r is assigned as the set-map φ r : X → X on the power set X := P(X F ) of non-food chemicals X F = X \ F .The function φ r gives the set of non-food products of the reaction r if and only if the set of non-food reactants is contained in its argument.Such functions have an idempotent addition via (φ r + φ r )(Y ) = φ r (Y ) ∪ φ r (Y ) for any Y ⊂ X F and any r, r ∈ R. The function φ x of a chemical x ∈ X is defined as the sum of the reactions catalyzed by it: The semigroup model of a CRS is generated by the functions {φ x } x∈X through addition + and through the composition of functions •.Thus, S is a semigroup with respect to both + and • and hence it is called a semigroup model of the CRS.For any subset Y ⊂ X F , the semigroup model S(Y ) is defined as S(Y ) = φ x x∈Y ∪F .Moreover, S is endowed with a partial order given by φ ≤ ψ iff φ(Y ) ⊂ ψ(Y ) for all Y ⊂ X F .The unique maximal element of S(Y ) is denoted by Φ Y -it represents all catalytic functionality that can be exhibited by the set Y on the whole CRS.In Section 3.2, elementary properties of the semigroup models are established.In a nutshell, these properties ensure that the two operations and the partial order on S are compatible.
In Section 4, the semigroup models are used to derive theorems characterizing self-sustaining CRS and subCRS and their corresponding sets of chemicals.Theorem 4.1 concisely states that a CRS is self-sustaining if and only if the set of chemicals X F is able to fully reproduce itself.In the semigroup formalism this reads as 2) and that the equality X F = Φ X F (X F ) is a sufficient condition to be a self-sustaining set of chemicals (Proposition 4.3).
Finally, a discrete dynamics on the state space X is defined by the self-action of the chemicals on themselves, i.e. by Y → Φ Y (Y ) for Y ∈ X.It is shown that the dynamics with the initial condition X F leads to a fixed point, denoted by X * s F and, using a combination of the tools developed in this article, it is proven that the maximal self-sustaining set chemicals of any CRS is given by this fixed point (Theorem 4.13).
In Section 4.4, new concepts are introduced into CRS theory, which are motivated by the tools from the preceding sections.The containment of a selfsustaining set of chemicals X F in the set of chemicals which it generates, i.e.X F ⊂ Φ X F (X F ), suggests that such self-sustaining sets should not be observable in real biological systems.Instead, they will continue to produce chemicals according to the dynamics which is shown to stabilize at the self-sustaining set of chemicals X * s F (Proposition 4.16).The set X * s F is called the functional closure of X F and it is conjectured that within a CRS such sets comprise biologically relevant functional modules of a CRS.To determine the lattice of all functionally closed sets of chemicals, a restricted dynamics on This dynamics has a fixed point Y * rs 0 for any initial condition Y 0 ∈ X.The desired lattice is given by the set of fixed points where the M i are defined by the recursion for i ≥ 0 and where for any Y ∈ X.This is proven in Theorem 4.22 and provides an explicit description, which can be algorithmically implemented, of the lattice.
In a companion article by Loutchko (2022), the self-generating properties of CRS are investigated in an analogous fashion.Although the logical structure of the line of reasoning is analogous to the one presented here, the proofs themselves require more technical setup, which heavily relies on a representation of the semigroup elements as decorated rooted trees.In this regard, Section 4 of this article can be seen as a blueprint to the work in Loutchko (2022).The current article is aimed as an introduction to semigroup models of CRS, whereas the companion article is focused on their structure and provides more technical tools.

Basic Notions
The catalytic reaction system (CRS) formalism is introduced following Hordijk and Steel (2004).A chemical reaction network is a finite set of chemicals X together with a finite set of net chemical reactions R. Thereby, a reaction r ∈ R is given by a pair of sets r = (dom(r), ran(r)) which satisfy dom(r), ran(r) ⊂ X and dom(r) ∩ ran(r) = ∅ and are called the domain and the range of the reaction 1 The latter condition ensures that one is dealing with a net chemical reaction.Catalysis and autocatalysis is treated in Definition 2.1 below by giving additional data on the catalyzed reactions.The support supp(r) of a 1 Usually, a net chemical reaction is denoted as r : a1A1 + a2A2 + ... + anAn −→ b1B1 + b2B2 + ...+bmBm, where ai, bj ∈ N and Ai, Bj ∈ X such that Ai = Bj for all i = 1, ..., n and j = 1, ..., m.In the definition used here, the stoichiometric information is discarded and dom(r) = {Ai} n i=1 and ran(r) = {Bj } m j=1 are used instead.
In addition, for a set of reactions R ⊂ R, the domain, range and support are defined as Classically, a set of rate constants together with the stoichiometry of each r ∈ R would lead to a system of coupled ordinary differential equations for the time evolution for the concentration of each chemical x ∈ X given by a kinetic model such as mass action kinetics.However, the CRS formalism does not utilize this detailed kinetic information but instead emphasizes the catalytic function of the chemicals in X.Moreover, a food set F ⊂ X is specified.This set is to be thought of as the set of externally supplied chemicals, which are always readily available to the system.The abbreviation for the set of all non-food chemicals will be used.Often, a subset of X F will be denoted by X F , which implicitly carries the information of the corresponding subset X = X F ∪ F of X.
Definition 2.1.A catalytic reaction system (CRS) is a tuple (X, R, C, F ) where X is a finite set of chemicals, R is a finite set of reactions, C ⊂ X × R is the catalysis data, and F ⊂ X is the constantly present food set.For a pair (x, r) ∈ C, the reaction r is said to be catalyzed by x.The food set is required to satisfy the following closure property: (C) All reactions r ∈ R with a catalyst in F must involve reactants outside of F , i.e. they must satisfy dom(r) ∩ X F = ∅.If X = F , the CRS is said to be trivial.

It is convenient to introduce the projection
which gives all catalyzed reactions of the CRS.
Remark 2.2.In the CRS literature it is common to consider the triple (X, R, C) as the definition of a CRS and to give the food set F ⊂ X as an additional datum, cf.Hordijk and Steel (2004); Hordijk et al (2011).The tuple (X, R, C, F ) from Definition 2.1 would then be called a CRS with food set.
Because this article is concerned with tuples (X, R, C, F ) exclusively, they are simply called CRS for the sake of readability.The closure condition (C) is not commonly used in the CRS literature.However, it poses no serious restrictions but merely serves to exclude trivial cases of self-sustainment, wherein chemicals in X F are produced purely from the food set by reactions with catalysts in the food set.
Following Bonchev and Mekenyan (2012), a CRS can be represented as a directed bipartite graph with a partition of the edges into edges corresponding to reactions and edges corresponding to catalysis.As an example, consider the graph in Fig. 1.The vertices represented by solid disks correspond to the chemicals X and the vertices represented by circles correspond to reactions R. Solid directed edges from chemicals to a reaction indicate that the respective chemicals are the reactant of the reaction, whereas solid directed edges from a reaction to chemicals are present for the products of the respective reaction.Dashed edges from a chemical x to a reaction r represent elements (x, r) in the catalysis data C.The food set is indicated by a circle, which encloses the chemicals belonging it.The stoichiometry of the reactions is not shown in the graph.
The sets R | X and C | X represent the maximal set of reactions supported on X and the maximal catalysis data with reactions supported on X and catalysts in X , respectively.
Note that a subCRS is determined by solely the two subsets X ⊂ X and R ⊂ R | X .The set C is the maximal catalysis data for reactions in R that are catalyzed by some chemical in X .A subCSR (X , R , C , F ) always satisfies condition (C): By Definition 2.3, a reaction r ∈ R satisfies dom(r) ⊂ X and therefore dom(r) The subCRS of a CRS are ordered by inclusion, i.e. two subCRS are related by ( For a set of non-food chemicals X F ⊂ X F , the maximal subCRS with the set of chemicals X is given by ( (2.2)

Catalytic and self-sustainment properties
Self-sustaining CRS are characterized by the property that all non-food chemicals are products of catalyzed reactions which use only chemicals produced by the reactions themselves and the food set.Self-sustaining CRS have been discussed in Hordijk and Steel (2017) and Steel (2015), where they are called pseudo-RAF.In this section, self-sustaining CRS and, based on them, selfsustaining sets of chemicals are defined.Finally, the precise connection to the definition of pseudo-RAF as given by Hordijk and Steel (2017) is discussed.
Note that it is not necessary that all reactions in R are catalyzed but only that the CRS has enough catalyzed reactions to satisfy condition (S).A subCRS is said to be self-sustaining if it satisfies the Definition 2.4.For a given set of chemicals X ⊂ X, the level of catalysis can differ between subCRS which have X as the set of chemicals.If all catalyzed reactions of the full CRS (X, R, C, F ) which have a catalyst and support in X are included in R , then the respective subCRS is said to be closed.
i.e. if all catalyzed reactions with catalyst and support in X are included in R .
The CRS (X, R, C, F ) is closed by definition.Moreover, it has a maximal, possibly trivial, self-sustaining subCRS given by the union of all its self-sustaining subCRS (the union of two given subCRS is the smallest subCRS for which both are subCRS).This maximal self-sustaining subCRS is necessarily closed.
A set of chemicals X F ⊂ X F generates CRS(X F ) via formula (2.2) and thus the notion self-sustainment is inherited by it: Definition 2.6.A set of chemicals X F ⊂ X F is said to be a self-sustaining set of chemicals if the maximal subCRS generated by it, CRS(X F ), is selfsustaining.The empty set ∅ ⊂ X F is said to be the trivial self-sustaining set of chemicals.
If X F is a self-sustaining set of chemicals, then CRS F (X F ) is automatically closed due to the maximality of R | X and C | X .Therefore, the notion of self-sustainment on the level of chemicals does not encompass non-closed CRS.
Example 2.7.The CRS in Fig. 2 is self-sustaining in the sense that all non-food chemicals X F = {a, b, c} are produced by the set of reactions R = {r 1 , r 2 , r 3 }.The set of reactions satisfies X F ⊂ ran(R) = {a, b, c} and dom(R) = {a, b, c, d} ⊂ ran(R) ∪ F = {a, b, c, d}.Note that none of the chemicals can be generated from the food set alone.Remark 2.8 (Relation to the notion of pseudo-RAF commonly used in the literature).The definition of a pseudo-RAF given by Hordijk and Steel (2017) (see also Steel et al (2013); Steel (2015); Hordijk et al (2015)) is based on a Therefore, given a subCRS (X , R , C , F ), which is self-sustaining according to Definition 2.4, the set π R (C ) is a pseudo-RAF set of reactions.Vice versa, given a pseudo-RAF set of reactions R ⊂ R, the subCRS (X , R , C , F ) with X := supp(R ) and C := C ∩ (X × R ) is self-sustaining according to Definition 2.4.Therefore, both definitions are equivalent modulo the inclusion of uncatalyzed reactions in the sets of reactions in the definition used in this article2 .
The self-sustaining sets of chemicals introduced in Definition 2.6 correspond to closed pseudo-RAF sets of reactions via X F → R | X and, vice versa, a closed pseudo-RAF set of reactions R yields the corresponding self-sustaining set of chemicals as X F := supp(R ) ∩ X F .

The semigroup model of a CRS
The catalytic function of the chemicals gives rise to an algebraic structure generated by the simultaneous and subsequent catalytic functionality.In this section, this structure is formalized mathematically and leads to the notion of a semigroup model of a CRS.Throughout this section, let the CRS (X, R, C, F ) be fixed.

Construction
The state of the CRS is defined by the presence or absence of each of the nonfood chemicals, i.e. by a subset Y ⊂ X F (the chemicals in the food set are always present).Thus the state space X of the CRS is defined to be the power set of X F X := P(X F ).
The function of a given chemical x ∈ X is defined via the reactions it catalyzes, i.e. by the way it acts on the state space X.This definition is inspired by the work of Rhodes and Nehaniv (2010).
For any two maps φ, ψ : X → X, the sum (φ + ψ) : X → X and product (φ • ψ) : X → X are given by for all Y ⊂ X F .The function φ x : X → X of a chemical x ∈ X is defined as the sum over all reactions catalyzed by x, i.e.
The multiplication • is the usual composition of maps and therefore associative.The addition is associative, commutative and idempotent.The two operations • and + have obvious interpretations in terms of the function of enzymes on a CRS: The sum of two functions φ x + φ y with x, y ∈ X describes the joint or simultaneous function of two chemicals x and y on the CRS -it captures the reactions catalyzed by both x and y.The composition of two functions φ x • φ y with x, y ∈ X describes their subsequent function: first y and then x act on the state space by their respective catalytic functions.
Recall that the full transformation semigroup T (A) of a finite discrete set A is the set of all maps {f : A → A}, where the semigroup operation • is the composition of maps.Definition 3.2.Let (X, R, C, F ) be a CRS.Its semigroup model S is the smallest subsemigroup of the full transformation semigroup T (X) closed under • and + that contains {φ x } x∈X and the zero function given by 0(Y ) = ∅ for all Y ⊂ X F .The semigroup model is said to be generated by the set {φ x } x∈X , indicated by the notation As a subsemigroup of T (X), the semigroup S is automatically a finite semigroup.
Remark 3.3.The object S is called a semigroup model, because S is a semigroup with respect to both operations • and +.The correct description of S in terms of universal algebra is an algebra of type (2, 2, 0), cf.Almeida (1995).However, to avoid confusion with the more commonly used notions of an algebra (e.g.matrix algebras, operator algebras, algebras over rings, etc.), this terminology is not used.When referring to the actual semigroups (S, •) and (S, +), the term semigroup is used instead of semigroup model.
Remark 3.4.Rhodes and Nehaniv (2010) have introduced and studied similar semigroups derived from chemical reaction networks.These semigroups were constructed as subsemigroups of the full transformation semigroup on a set of metabolites induced by functions of enyzmes similar to the definition given here.However, in their work, the catalysts were not part of the network.More importantly, they did not define and use the operation of addition and also did not consider the natural partial order introduced in Remark 3.7.Therefore, most results of this article cannot be obtained with the construction of Rhodes and Nehaniv.Moreover, in the definition given here, the chemicals which are not produced by a function φ ∈ S disappear after the application of the function to any Y ∈ X, whereas they are retained in the model of Rhodes and Nehaniv.Yet, this property is crucial for obtaining the results in Section 4.
Remark 3.5.Generally, a map φ : X → X is to be defined on all subsets Y ⊂ X F , i.e. the assignment Y → φ(Y ) needs to be given independently for all Y ⊂ X F .However, in the case of the constructed semigroup models, all maps φ ∈ S respect the partial order on X given by inclusion of sets, i.e.
for all Y, Z ⊂ X F .This follows directly from the Definition 3.1.Therefore, it is enough to specify any map φ ∈ S on some set I of generating sets {Y i } i∈I with Y i ⊂ X F by explicitly giving φ(Y i ) for all i ∈ I and by defining for an arbitrary Y ⊂ X F .The {Y i } i∈I and {φ(Y i )} i∈I are thereby required to satisfy the condition (3.5).Usually, the generators {Y i } i∈I will be taken as the sets of non-food reactants involved in a given function φ ∈ S.This is a convenient notational simplification as the state space X grows exponentially with the number of chemicals in the network.Finally, the following notation for constant maps is used throughout the text: Example 3.6.As an example, the semigroup model S for the CRS shown in checks that these functions, together with 0 are closed under addition and multiplication.Thus the semigroup model S is the set equipped with the operations • and + given in Tables 1 and 2.
Table 1 The multiplication table for S. The order of composition is row • column.

Elementary properties
The interplay of the two operations on a semigroup model S, the partial order on S and the partial order on the state space X are all mutually compatible and the respective elementary properties are established in this section.
Remark 3.7.The partial order on S is given by φ ≤ ψ ⇔ φ(Y ) ⊂ ψ(Y ) for all Y ⊂ X F for φ, ψ ∈ S. For S endowed with this partial order, the notation (S, ≤) is used.
Lemma 3.8.Let S be a semigroup model of a CRS.The partial order defined above is preserved under the operations • and +, i.e. for any φ, φ , ψ, ψ ∈ S the following relations hold Proof This follows directly from the relation (3.5).
The operations • and + on S have the following distributivity properties.
Remark 3.11.The inequality in (3.11) can be strict.In the example shown in Fig. 4, the function φ a • (φ e + φ f ) is non-zero, while φ a • φ e + φ a • φ f is the zero function.Interestingly, the property (3.11) reads: "The result of applying a test function χ to the sum of two functions φ and ψ can be larger than the result of applying the test function to the individual functions and then taking the sum."This is reminiscent of a characterization of emergence, which is often stated as "the whole is larger than the sum of its parts".
By definition, the semigroup S captures all possibilities of joint and subsequent functions of chemicals on the chemical state space X.In particular, this allows to determine the functions of arbitrary subsets Y ⊂ X F as follows.Proof It suffices to show that any element ψ ∈ S(Y ) satisfies ψ ≤ Φ Y .But this is a direct consequence of Lemma 3.9(I) as Φ Y = ψ + φ∈S(Y )\{ψ} φ by construction.
Remark 3.14.If Z ⊂ Y ⊂ X F , then Lemma 3.9(I) implies Φ Z ≤ Φ Y .In particular, S has a unique maximal element, given by Φ X F .
Remark 3.15.Any subCRS (X , R , C , F ) has a semigroup model given by Definition 3.2.This model is denoted by S (X , R ).It is a subsemigroup of the full transformation semigroup T (P(X F )) on the power set of X F .A function φ ∈ S (X , R ) can be extended to a function ext(φ) ∈ T (X) by defining for all Y ⊂ X F .This gives a homomorphic embedding of S (X , R ) into T (X), but ext(S (X , R )) is neither a subsemigroup of S(X F ) nor of S.
Because the generators {φ x } x∈X ⊂ T (P(X F )) of S (X , R ) and the generators {φ x } x∈X ⊂ T (X) of S(X F ) satisfy ext(φ x ) ≤ φ x for all x ∈ X , the the inequality for the maximal functions Φ X F and Φ X F of S (X , R ) and S(X F ) follows from Lemma 3.8.

Characterization of self-sustaining CRS
In this section, it is illustrated how the semigroup model of a CRS provides a natural language to formulate and prove statements regarding CRS in a concise manner.The specific focus here lies on the application to self-sustaining CRS.In Section 4.1, it is shown that a CRS is self-sustaining if and only if its function Φ X F satisfies Φ X F (X F ) = X F (Theorem 4.1) and it follows that any self-sustatining set of chemicals X F ⊂ X F satisfies X F ⊂ Φ X F (X F ) (Corollary 4.2).Moreover, the condition X F = Φ X F (X F ) is sufficient for X F to be a self-sustaining set of chemicals (Proposition 4.3).This condition is, however, not necessary.In Section 4.2, a discrete dynamics is introduced by considering the repeated action of a set of chemicals, and the elementary properties of the dynamics are established.In Section 4.3 it is proven that the maximal selfsustaining set of chemicals of a CRS is the fixed point of the dynamics with the initial condition given by the presence of all chemicals of the CRS (Theorem 4.13).As a corollary, it follows that a CRS with a nilpotent semigroup model cannot have nontrival self-sustaining subCRS.This results establishes a link between the combinatorial theory of finite semigroups and the the theory of self-sustaining chemical reaction networks.Finally, a self-sustaining set of chemicals X F is in general not stable under the dynamics but converges to a fixed point X * s F which contains X F .This fixed point is a self-sustaining set of chemicals itself and is termed the functional closure of X F .The importance of functionally closed sets of chemicals is discussed and a structure theorem on the lattice of all functionally closed sets of chemicals is proven (Theorem 4.22).
Throughout this section, fix a CRS (X, R, C, F ) and let S be its semigroup model.

Characterization of self-sustaining CRS
Recall that the self-sustainment property of a CRS in Definition 2.4 requires all chemicals in X F to be produced from chemicals in X by catalyzed reactions.Putting this description into mathematical language, one would expect a selfsustaining CRS to satisfy Φ X F (X F ) = X F .This is precisely the statement of the following theorem.
Theorem 4.1.A CRS is self-sustaining if and only if its maximal function Φ Proof If the CRS is self-sustaining, then there must be a set of reactions R ⊂ π R (C) such that ran(R ) = X F .For each reaction r ∈ R , choose a catalyst y(r) ∈ X.Then the function is an element of S and satisfies φ(X F ) = X F .The maximal function Φ X F is bounded from below by φ and therefore also satisfies Φ X F (X F ) = X F .
To prove the reverse, assume that Φ X F (X F ) = X F holds.The function Φ X F must be of the form for some subset of generating functions {φy} y∈Y with Y ⊂ X and for some functions ψy ∈ S5 .The function ψ := y∈Y φy satisfies ψ(X F ) = X F , as otherwise Φ X F could not have X F in its image.Thus, the set of reactions satisfies the condition (S) as the condition dom(R ) ⊂ ran(R ) ∪ F = X is trivially satisfied.
Corollary 4.2.If X F ⊂ X F is a self-sustaining set of chemicals, then the inclusion X F ⊂ Φ X F (X F ) holds.
Proof Let Φ X F be the maximal function of the semigroup model S (X , R | X ) for the subCRS generated by X F .By Theorem 4.1, the equality Φ X F (X F ) = X F holds.
Moreover, let Φ X F be the maximal function of the subsemigroup model S(X F ) < S.
Then the inequality (3.12) yields the desired inclusion The inclusion X F ⊂ Φ X F (X F ) proven in the above corollary can be strict in the case that X contains catalysts that catalyze reactions with products outside of X but with reactants in X .Therefore, the equality X F = Φ X F (X F ) cannot be a necessary condition for self-sustaining sets of chemicals.It is, however, a sufficient one: for some subset of generating functions {φy} y∈Y with Y ⊂ X and for some ψy ∈ S(X F ). Define the function ψ := y∈Y ψy.The function Φ X F is bounded above by ( y∈Y φy) • ψ, but due to its maximality in S(X F ) it must be equal to this function, i.e.Φ X F = ( y∈Y φy) • ψ with ψ ∈ S(X F ), or, equivalently Moreover, the relation ψ ≤ Φ X F holds, again due to the maximality of Φ X F , and this implies ψ(X F ) ⊂ X F .This means that in the calculation of Φ X F (X F ) only those φr in the representation (4.1) with dom(r) ⊂ ψ(X F ) ∪ F ⊂ X play a role.In other words, choosing the set of reactions R as This means that X F = ran(R ).Additionaly, dom(R ) ⊂ X holds by definition, and thus the set R satisfies the condition (S).As R ⊂ R | X , this implies that X F is a self-sustaining set of chemicals.
Remark 4.4.Although the statement of Proposition 4.3 appears trivial at first glance, one needs to take care of the fact that Φ X F is a function on the power set of X F and not on the power set of X F .Therefore, it could potentially include the formation of chemicals in X F via reaction pathways which include intermediate chemicals outside of X .The essence of the proof is to show, based on the maximality of Φ X F in S(X F ), that such pathways do not exist under the condition X F = Φ X F (X F ).

Sustaining dynamics on a Semigroup Model
There is natural discrete dynamics on a CRS based on its semigroup model.
Starting with any set of chemicals Y 0 ⊂ X F , the a maximal function Φ Y0 (cf.Definition 3.12) acts on the set itself.This yields the maximal set Y 1 = Φ Y0 (Y 0 ) that can be produced from Y 0 and the food set using the functionality supported on Y 0 and the food set.This argument applies iteratively and gives rise to the sustaining dynamics on a CRS.
Definition 4.5.The sustaining dynamics of a CRS with the initial condition Y 0 ⊂ X F is generated by the propagator where Φ Y is the function of Y ⊂ X F .Analogously, the dynamics is parametrized by Z ≥0 as Note that the propagator D s deletes all elements that are in Y but not in Φ Y (Y ).
Remark 4.6.Because the state space X is finite, for the sequence (Y n ) n∈Z ≥0 generated by D s under the initial condition Y 0 , there exist minimal nonnegative integers k and m = 0 such that Y k = Y k+m .This gives rise to periodic behavior, i.e.Y k+i = Y k+i+nm for all i = 0, ..., m − 1 and all n ∈ N. If m = 1, then Y k is a fixed point and the dynamics is said to stabilize at Y k .A fixed point which results from the initial condition Y 0 will be denoted by Y * s 0 .If m > 1, the dynamics has period m and is oscillatory.Both behaviors are possible in CRS.
Remark 4.7.According to Theorem 4.1, if the CRS is self-sustaining, then X F is a fixed point for the dynamics with initial condition Y 0 = X F .
Example 4.8.Fig. 5 shows a CRS with X = {a, b, c}, food set F = ∅ and the respective reactions shown in the Figure .If the initial condition Y 0 is a proper subset of X F , the dynamics has period 3.For example, the dynamics with the initial condition The elementary properties of the sustaining dynamics are described in the following propositions.Proposition 4.9.Let (Y n ) n∈Z ≥0 be the sustaining dynamics with initial condition Y 0 .If the semigroup (S, •) of the CRS is nilpotent, then the dynamics stabilizes at ∅, i.e. there exists a natural number N such that Because S is nilpotent, there exists an index N such that S N = {0}.This implies that Yn = ∅ for all n ≥ N .
A useful result is that the dynamics with initial condition X F cannot have periodic behavior, but always has a fixed point.It is a consequence of the following more general proposition.
holds for all n ∈ Z ≥0 and the dynamics stabilizes at the fixed point Y * s 0 .
Proof The proof proceeds by induction.By hypothesis This implies the ordering of the respective functions Φ Yn ≤ Φ Yn−1 by Remark 3.14.Together with Remark 3.5 this yields Thus the dynamics is given by a descending chain of sets Because X F is finite, the chain stabilizes.
Corollary 4.11.A dynamics (Y n ) n∈Z ≥0 with initial condition Y 0 = X F always leads to a fixed point.
Proof This follows from Φ X F (X F ) ⊂ X F and the previous proposition.

Identification of self-sustaining sets of chemicals
In this section, the main theorem concerning the maximal self-sustaining set of chemicals of a CRS is stated and its biological significance is discussed.Its proof is merely a combination of the previously proven results.
The following lemma is required to ensure that the sustaining dynamics is well-behaved with respect to self-sustaining sets of chemicals.Lemma 4.12.If X F ⊂ X F is a self-sustaining set of chemicals and if Y is a set that satisfies X F ⊂ Y ⊂ X F , then the inclusion Proof The chain of inclusions follows from the Corollary 4.2 and the Remarks 3.5 and 3.14.Now the main theorem can be proven: Theorem 4.13 (On the maximal self-sustaining set of chemicals).For any CRS, the maximal self-sustaining set of chemicals is the fixed point of the sustaining dynamics (Y n ) n∈Z ≥0 with the initial condition Y 0 = X F , i.e. it is the set X * s F .
Proof By Corollary 4.11, the dynamics stabilizes at a the fixed point X * s F .Being a fixed point, the set X * s F satisfies and is thus a self-sustaining set of chemicals by Proposition 4.3.Let X F ⊂ X F be any self-sustaining set of chemicals.By inductively applying the Lemma 4.12 to the sets (Yn) n∈Z ≥0 , it follows that X F ⊂ X * s F , which yields the maximality of X * s F .
Remark 4.14.The result of this theorem is closely related to an algorithm to determine the maximal pseudo-RAF set of reactions introduced by Hordijk et al (2015).Therein, a dynamics {R n } n∈Z ≥0 on the power set P(R) of reactions with the initial condition R 0 = R is used.The propagator R n → R n+1 is defined by the operation This is equivalent to the dynamics Y → Φ Y (Y ) with the initial condition Y 0 = X F via the mutually inverse mapping Theorem 4.13 gives to the following corollary.
Proof If there was a nontrivial self-sustaining subCRS and thus a nonempty selfsustaining set of chemicals, there would be a maximal self-sustaining set of chemicals F and is therefore nonzero.
This corollary has importance when studying the semigroups that arise from self-sustaining CRS or CRS with nontrivial self-sustaining subCRS as it weeds out all nilpotent semigroups (S, •), which is the largest class of finite semigroups, cf.Satoh et al (1994); Almeida (1995), as potential semigroup models.

Functionally closed self-sustaining sets of chemicals
In the Theorem 4.13, it was shown how to algorithmically identify the maximal self-sustaining set of chemicals as the fixed point X * s F of the sustaining dynamics.For any given CRS, the lattice of self-sustaining subCRS is of importance to gain a deeper understanding of the modular structure the system.However, not all self-sustaining subCRS carry the same biological importance.For example, subCRS which are not closed according to Definition 2.5 should be considered as purely theoretical constructs because any subCRS occurring in the biophysical reality will always be closed.But the closure property as given in the Definition 2.5 only accounts for the closure on the level of reactions and not on the level of the functions of chemicals.This leads to the possibility that for a self-sustaining set of chemicals X F ⊂ X F , the inclusion X F ⊂ Φ X F (X F ) is strict, i.e. that there are elements in X F \ X F which are produced from X by functionality supported on X .Therefore, a self-sustaining set X F which is strictly included in Φ X F (X F ) will not be stable but will produce the chemicals Φ X F (X F ) over time.Then the chemicals in Φ X F (X F ) might catalyze the production of even more chemicals from Φ X F (X F ) and the food set.The following analogue of Proposition 4.10 ensures that this dynamics will lead to a fixed point.Proposition 4.16.Let (Y n ) n∈Z ≥0 be the sustaining dynamics such that Y 0 ⊂ Y 1 .Then Y n ⊂ Y n+1 holds for all n ∈ Z ≥0 and the dynamics stabilizes at the fixed point Y * s 0 .
Proof Analogous to the proof of Proposition 4.10.
Once the fixed point X * s F is reached, no further chemicals will be produced from the set X * s F ∪ F by the functionality supported on it.By Proposition 4.3, the fixed point X * s F is a self-sustaining set of chemicals.Because X * s F contains the original self-sustaining set of chemicals X F , it should be thought of as the functional closure of X F .This suggests the following definition.
Definition 4.17.For a self-sustaining set of chemicals X F , the fixed point of the sustaining dynamics X The corresponding subCRS (X , R | X , C | X , F ) is said to be a functionally closed subCRS6 .This definition has not been proposed in the CRS literature thus far to the best of the author's knowledge.One reason might be that it is cumbersome to formulate in the standard CRS terminology.However, it is a natural definition when the language of semigroup models is available.The functionally closed sets of chemicals of any given CRS are important objects to understand the modular structure of the CRS, because they correspond to core functional modules of the CRS.Note that due to Proposition 4.3, all functionally closed sets of chemicals are self-sustaining.
Example 4.18.Consider the CRS shown in Fig. 1.The subCRS generated by X F = {c, d} is self-sustaining, but not functionally closed as Φ X F (X F ) = X F yields the set of all non-food chemicals, which is functionally closed.In fact, X F is the only nontrivial functionally closed set of chemicals of the given CRS.
It is possible to algorithmically determine the hierarchy of all functionally closed sets of chemicals of any given CRS.This is based on the following modification of the sustaining dynamics.
Definition 4.19.The reduced sustaining dynamics of a CRS with the initial condition Y 0 ⊂ X F is generated by the propagator The trajectory {Y n } n∈Z ≥0 of the dynamics is parametrized by Z ≥0 as Remark 4.20.Note that for the initial condition Y 0 = X F , the reduced sustaining dynamics yields the same trajectory as the sustaining dynamics, because Φ Yn (Y n ) ⊂ Y n is guaranteed by Proposition 4.10.
The reduced sustaining dynamics behaves well with respect to functionally closed sets of chemicals: Lemma 4.21.The reduced sustaining dynamics stabilizes for any initial condition Y 0 ⊂ X F .Its fixed point, which is denoted by Y * rs 0 , is the maximal functionally closed set of chemicals that is contained in Y 0 .
Proof By definition, the trajectory of the dynamics is given by a descending chain of sets Let X F ⊂ Y 0 be a functionally closed (and therefore self-sustaining) set of chemicals contained in Y 0 By Lemma 4.12 it is contained in Φ Y0 (Y 0 ) and thus in Y 0 ∩ Φ Y0 (Y 0 ).An inductive application of this argument proves that X F ⊂ Yn for all n ∈ Z ≥0 and thus X F ⊂ Y * rs 0 , which shows the maximality of Y * rs 0 .
This suggests to define, for any set Y ⊂ X F , the set and, furthermore, to define iteratively for i ∈ Z ≥0 .This construction yields an (algorithmic) description of all functionally closed sets of chemicals for any given CRN: Theorem 4.22 (On the functionally closed subsets of chemicals).There exists an N ∈ Z ≥0 such that M i = {∅} for all i > N .Moreover, the set is the set of all functionally closed sets of chemicals.
Proof For each Y ∈ M i+1 , there exists a set in M i which strictly contains Y by construction .Therefore, choosing N :=| X * s F | proves the first statement.The maximal functionally closed set of chemicals X * s F is contained in M by construction.Let Y ⊂ X * s F be any functionally closed set of chemicals.Then there exists a sequence of maximal length, which consists of functionally closed sets Then Y i ∈ M i by construction and thus Yn ∈ M n for some n ≤ N .Therefore, M contains all functionally closed sets of chemicals.The reverse inclusion follows from Theorem 4.13 and Lemma 4.21, which state that all elements of M are functionally closed sets of chemicals.
The set M can be constructed algorithmically and the Theorem 4.22 is thus applicable to the analysis of the CRS of real biological systems.Moreover, only the knowledge of the functions Φ Y of sets of chemicals Y ⊂ X F is required to determine both X * s F and M. The knowledge of the full semigroup model is, on the contrary, not required.
Functionally closed sets of chemicals should be important to gain insight into the modular structure of self-sustaining CRS.Moreover, this notion could be useful to analyze the evolutionary aspects of self-sustaining CRS.For example, if for a given chemical, there exists a unique minimal functionally closed set of chemicals containing it, then the chemical should be considered as a part of the module represented by the respective functionally closed set.If, however, there are multiple minimal functionally closed sets containing this chemical, then it should be considered as a mediator between these sets and would more likely have appeared when the respective modules were combined.

Discussion
In this work, it was shown that the CRS formalism has a natural algebraic structure induced by the simultaneous and subsequent functions of catalysts.The constructed semigroups contain all possible functional combinations and thus faithfully reflect the catalytic properties of the network.Moreover, the partial order on S allows to assign a well-defined catalytic function to any subset of chemicals.These functions respect the partial order on subsets of chemicals via inclusion and allow to define a sustaining and a reduced sustaining dynamics of the CRS.Finally, the interplay of these structures yields a characterization of the maximal self-sustaining set of chemicals.Moreover, a closer inspection of the sustaining dynamics naturally leads to the definition of functionally closed sets of chemicals.Finally, a combination of the methods developed in this article allows to give a characterization of the lattice of all functionally closed sets of chemicals.Such sets of chemicals should play an important role in the analysis of the modular structure of CRS and pose valuable targets for the analysis of CRS corresponding to real biological systems, such as the ones constructed by Sousa et al (2015) and Xavier and Kauffman (2022).
Self-sustaining chemical reaction networks are an important area of research and this work introduces new techniques to field, which are based on the potentially powerful methods from semigroup theory.For example, Corollary 4.15 shows that a CRS with nilpotent semigroup cannot contain any nontrivial self-sustaining subCRS.This is an important fact by itself because most semigroups are nilpotent (any magma7 with the product of any three elements equal to zero is automatically a semigroup) and this weeds out these objects in the study of self-sustaining networks.In semigroup theory, combinatorial problems are an important and developed field and with the construction provided in this article, such methods can now be applied to the combinatorics of self-sustaining CRS.However, all central results given here require a representation of the semigroup model as a subsemigroup of the full transformation semigroup T (X) and are based on particular properties of this representation.It would be interesting to find purely algebraic descriptions of semigroup models of CRS and to restate the main results purely algebraically, i.e. with without reference to this representation.
Moreover, there is an equivalence between finite semigroups and finite automata established by Schützenberger (1965).Thus the semigroup models developed here suggest to investigate the computational capabilities of catalytic reaction systems as a future direction of research.In this regard, it is interesting to study the inverse problem, i.e. to determine which finite semigroups can be realized as semigroup models of CRS and to analyze their computational properties.It is clear that not all semigroups can be interpreted as semigroup models of some CRS, because for a general finite semigroup, a partial order satisfying Lemma 3.8 does not exist.
Further interesting questions in this direction arise for the semigroups of infinite reaction networks and the classification of their computational properties.The definitions given here extend directly to infinite networks, but the arguments based on finiteness of S and X used in many proofs then require modification and in some cases the analogous results do not hold.For example, the discrete dynamics can lead to a steadily growing network instead of a fixed point or periodic orbit.Another possibility is the extension of the state space from {0, 1} X F to R X F ≥0 by taking into account the concentrations of the chemicals.In this case, the dynamics is governed by the classical kinetic rate equations and following the line of thought presented in this work could lead to the development of a notion of function and causality for such classical models.
The main motivation for the construction of algebraic models for chemical reaction networks is a natural possibility of coarse-graining through taking quotients by congruences.In this approach, the possible coarse-graining procedures are given by the lattice of congruences on the algebraic structure.This has the advantage that the coarse-grained model is naturally equipped with the same structure as the original model and that consecutive coarse-graining procedures over several scales are feasible.This approach will be investigated in detail in a forthcoming publication.
Finally note that self-generating CRS, which are called RAF in the literature, can be characterized in an analogous fashion as presented for self-sustaining CRS in this work.The only difference is that the sustaining dynamics Y → Φ Y (Y ) needs to be replaced by the generative dynamics Y → Φ Y (∅).However, the proofs require a deeper understanding of the structure of the semigroups, which is provided in a companion article by Loutchko (2022).

Fig. 1
Fig. 1 Example of a graphical representation of a CRS.The CRS consists of five chemicals X = {a, b, c, d, e} and four reactions a + b → c, c + b → d, b + d → e and c + d → e, which are catalyzed by d, a, e and d, respectively.The food set is given by F = {a, b}.

Fig. 2
Fig. 2 An example of a self-sustaining CRS.

Fig. 3 Fig. 3
Fig.3The CRS used to construct the semigroup model S in Example 3.6.

Fig. 5
Fig. 5 Example of a CRS with possible oscillatory dynamics.The food set is the empty set.

Table 2
The addition table for S. All functions φ satisfy φ + φ = φ giving the corresponding elements on the diagonal.The commutativity of addition yields the lower left half of the table.