On Algebras with Effectful Iteration

For every finitary monad T on sets and every endofunctor F on the category of T -algebras we introduce the concept of an ffg-Elgot algebra for F , that is, an algebra admitting coherent solutions for finite systems of recursive equations with effects represented by the monad T . The goal of this paper is to study the existence and construction of free ffg-Elgot algebras. To this end, we investigate the locally ffg fixed point φF , the colimit of all F -coalgebras with free finitely generated carrier, which is shown to be the initial ffg-Elgot algebra. This is the technical foundation for our main result: the category of ffg-Elgot algebras is monadic over the category of T -algebras.


Introduction
Terminal coalgebras yield a fully abstract domain of behavior for a given kind of state-based systems whose transition type is described by an endofunctor F . Often one is mainly interested in the study of the semantics of finite coalgebras. For instance, regular languages are the behaviors of finite deterministic automata, while the terminal coalgebra of the corresponding functor is formed by all formal languages. For endofunctors on sets, the rational fixed point introduced by Adámek, Milius and Velebil [ ] yields a fully abstract domain of behavior for finite coalgebras. However, in recent years there has been a lot of interest in studying coalgebras over more general categories than sets. In particular, categories of algebras for a (finitary) monad T on sets are a paradigmatic setting; they are used, for instance, in the generalized determinization framework of Silva et al. [ ] and yield coalgebraic language equivalence [ ] as a semantic equivalence of coalgebraic systems with side effects modelled by the monad T . In the category C of T -algebras, several notions of 'finite' object are natural to consider, and each yields an ensuing notion of 'finite' coalgebra: ( ) free objects on finitely many generators (ffg objects) yield precisely the coalgebras that are the target of generalized determinization; ( ) finitely presentable (fp) objects are the ones that can be presented by finitely many generators and relations and yield the rational fixed point; and ( ) finitely generated (fg) objects, which are the ones presented by finitely many generators (but possibly infinitely many relations). Taking the colimits of all coalgebras with ffg, fp, and fg carriers, respectively, yields three coalgebras ϕF , F and ϑF which, under suitable assumptions on F , are all fixed points of F [ , , ]. Our present paper is devoted to studying the fixed point ϕF , which we call the locally ffg fixed point of F . For a finitary endofunctor F preserving surjective and non-empty injective morphisms in C , the three fixed points are related to each other and the terminal coalgebra νF as follows: where denotes a quotient coalgebra and a subcoalgebra. The three righthand fixed points are characterized by a universal property both as a coalgebra and (when inverting their coalgebra structure) as an algebra [ , , ]; see [ ] for one uniform proof. We recall this in more detail in Section . .
The main contribution of the present paper is a new characterization of the locally ffg fixed point ϕF by a universal property as an algebra. As already observed by Urbat [ ], as a coalgebra, ϕF does not satisfy the expected finality property since coalgebra homomorphisms from coalgebras with ffg carrier into ϕF may fail to be unique. A simple initiality property of ϕF as an algebra was recently established by Milius [ , Theorem . ]: ϕF is the initial ffg-Bloom algebra for F , where an ffg-Bloom algebra is an F -algebra equipped with an operation that assigns to every F -coalgebra carried by an ffg object a coalgebra-toalgebra morphism subject to a functoriality property. Equivalently, the ffg-Bloom algebras for F form the slice category ϕF/ Alg F [ , Proposition . ]. Here we introduce the notion of an ffg-Elgot algebra (Section ), which is an algebra for F equipped with an operation that allows to take solutions of effectful iterative equations (see Remark . ) subject to two natural axioms. These axioms are inspired by and closely related to the axioms of (ordinary) Elgot algebras [ ], which we recall in Section . We then prove that ϕF is the initial ffg-Elgot algebra (Theorem . ), which strengthens the previous initiality result.
In addition, we study the construction of free ffg-Elgot algebras. In the case of ordinary Elgot algebras, it was shown [ ] that the rational fixed point (F (−)+Y ) is a free Elgot algebra on Y . In addition, the category of Elgot algebras is the Eilenberg-Moore category for the corresponding monad on C . In the present paper, we prove that free ffg-Elgot algebras exist on every object Y of C . But is it true that the free ffg-Elgot algebra on Y is ϕ(F (−) + Y )? We do not know the answer for arbitrary objects Y , but if Y is a free T -algebra (on a possibly infinite set of generators), the answer is affirmative (Theorem . ).
Finally, we prove that the category of ffg-Elgot algebras is monadic over C , i.e. ffg-Elgot algebras are precisely the Eilenberg-Moore algebras for the monad that assigns to a given object Y of C its free ffg-Elgot algebra (Theorem . ). This paper is a revised and extended version of our conference paper [ ] containing full proofs.
Related Work and History. While our new notion of an ffg-Elgot algebra is directly based on the previous notion of Elgot algebra [ ], studying operators taking solutions of recursive equation systems and their properties goes back a long way. The most well-known examples of such structures are probably the iteration theories of Bloom and Ésik [ ] whose work is based on Elgot's seminal work [ ] on the semantics of iterative specifications. Algebras for iteration were first studied by Nelson [ ] (see also Tiuryn [ ] for a related concept). Our work grows out of the coalgebraic approach to the semantics of iteration which started with Moss' work [ ] on parametric corecursion. Independently, and almost at the same time, it was also realized by Ghani et al. [ , ] and Aczel et al. [ , ] that final coalgebras for parametrized functors F (−) + Y give rise to a monad, whose structure generalizes substitution of infinite trees over a signature. Later it was shown by Milius [ ] that one can approach this monad through algebras with unique solutions of recursive equations. The monad arising from the parametrized rational fixed points (F (−) + Y ) was introduced in [ ] based on a category-theoretic generalization of Nelson's notion of iterative algebra. This generalizes Courcelle's regular trees [ ] and their substitution. The monad of free ffg-Elgot algebras is a new example of a monad arising from parametrized coalgebras.
Outline of the Paper. We begin in Section by recalling a number of preliminaries, e.g. on varieties and 'finite' objects in such categories. This material might be skipped by readers who are familiar with it. We also recall background on the four fixed points in ( . ), and, as a first highlight, we present in Proposition . an example of the locally ffg fixed point ϕF in a setting where the other three are trivial.
Section is a brief recap on Elgot algebras and so can be skipped by expert readers who have seen them before.
The concept of ffg-Elgot algebras is introduced in Section . Readers who would like to see the connection of ffg-Elgot algebras to effectful iterative equations should jump right to Remark . , where this connection is explained. The main technical results of our paper then follow as already explained. First, Theorem . shows that ϕF is the initial ffg-Elgot algebra. Second, Theorem . establishes, for a free object Y of our base variety C , a one-to-one correspondence of pairs consisting of an ffg-Elgot algebra A for F and a morphism Y → A with ffg-Elgot algebras for F (−) + Y . This result turns out to be a key ingredient of the construction of free ffg-Elgot algebras from coalgebras for F (−) + Y (see Construction . and Theorem . ) for a free object Y . Monadicity of ffg-Elgot algebras is etablished in Section . .
We conclude the paper in Section . Finally, in the short appendix a technical result concerning the construction of ϕF is presented.
We denote by C ffg the full subcategory of ffg objects of C . Analogously to the fact that every object of C is a filtered colimit of fp objects, every object X is a sifted colimit of the canonical diagram C ffg /X → C ; this follows from [ , Proposition . ]. .

Relation between the object classes.
We already mentioned that every fp object is fg (but not conversely, in general). Clearly, every ffg object is fp, but not conversely in general (e.g. consider any fp monoid which is not of the form X * for some finite set X). So, in general, we have full embeddings In rare cases, all three object classes coincide; e.g. in Set (considered as a variety) and the category of vector spaces over a field. The equation C fg = C fp holds true, for example, for all locally finite varieties (i.e. where ffg objects are carried by finite sets), e.g. Boolean algebras, distributive lattices or join-semilattices); for positively convex algebras [ ], commutative monoids [ , ], abelian groups, and more generally, in any category of (semi-)modules for a semiring S that is Noetherian in the sense of Ésik and Maletti [ ]. That means that every subsemimodule of an fg semimodule is fg itself. For example, the following semirings are Noetherian: every finite semiring, every field, every principal ideal domain such as the ring of integers and therefore every finitely generated commutative ring by Hilbert's Basis Theorem. The tropical semiring (N ∪ {∞}, min, +, ∞, 0) is not Noetherian [ ]. The usual semiring of natural numbers is not Noetherian either, but for the category of N-semimodules (= commutative monoids), C fp = C fg still holds. .

Functors and Liftings
We will consider coalgebras for functors F on the variety C . In many cases F is a lifting of a functor on many-sorted sets, i.e. there is a functor F 0 : Set S → Set S such that the square below commutes, where U : C → Set S denotes the forgetful functor.
It is well-known [ , ] that liftings of a given functor F 0 on Set S to C , the variety given by the monad (T, η, µ), are in bijective correspondence with distributive laws of that monad over the functor F 0 . This means natural transformations λ : T F 0 → F 0 T such that the following two diagrams commute: Given a distributive law λ of T over F 0 , the corresponding lifting F assigns to a T -algebra (A, a) the T -algebra (F 0 A, F 0 a · λ A ). It was observed by Turi and Plotkin [ ] that a final coalgebra for F 0 lifts to a final coalgebra for the lifting F . Indeed, denoting by ξ : νF 0 → F 0 (νF 0 ) the final coalgebra for F 0 , we obtain a canonical T -algebra structure on νF 0 by corecursion, i.e. as the unique coalgebra homomorphism a : T (νF 0 ) → νF 0 in the diagram below: It is easy to verify that a is an Eilenberg-Moore algebra and that this turns νF 0 into the final coalgebra for the lifting F . Note that the above square expresses that (νF 0 , a, ξ) is a λ-bialgebra, and it is the final one [ ].
Coalgebras for lifted functors are significant because the targets of finite coalgebras X under generalized determinization [ ] are precisely those coalgebras for the lifting F that are carried by ffg objects (T X, µ X ). In more detail, generalized determinization is the process of turning a given coalgebra c : X → F 0 T X in Set S into a coalgebra for the lifting F : one uses the freeness of T X and the fact that F T X is a T -algebra to extend c to a T -algebra homomorphism c * : T X → F T X. The coalgebraic language semantics [ ] of (X, c) is then the final semantics of c * . A classical instance of this is the language semantics of non-deterministic automata considered as coalgebras X → {0, 1} × (P f X) Σ ; here the generalized determinization with T = P f and F 0 = {0, 1} × X Σ on Set is the well-known subset construction turning a non-deterministic automaton into a deterministic one. .

Four Fixed Points
Fixed points of a functor F are (co)algebras whose structure is invertible. Let us now consider a finitary endofunctor F : C → C on our variety. Then F has a terminal coalgebra [ , Theorem . ], which we denote by νF . Its coalgebra structure νF → F (νF ) is an isomorphism by Lambek's lemma [ ], and so νF is a fixed point of F . The terminal coalgebra νF is fully abstract w.r.t. behavioural equivalence: given F -coalgebras (X, c) and (Y, d), two states x ∈ X and y ∈ Y are called behavioural equivalent if there exists a pair of coalgebra homomorphisms f : (X, c) → (Z, e) and g : (Y, d) → (Z, e) such that f (x) = g(y). Behavioural equivalence instantiates to well-known notions of indistinguishability of system states, e.g. for F = P f , it is strong bisimilarity of states in finitely branching transitions systems, and for F X = {0, 1} × X Σ it yields the language equivalence of states in deterministic automata. One can show that two states are behaviourally equivalent if and only if they are identified under the unique coalgebra homomorphisms into νF . There are three further fixed points of F obtained from 'finite' coalgebras, where 'finite' can mean each of the three notions discussed in Subsection . .

More precisely, denote by
Coalg F the category of all F -coalgebras. We consider its full subcategories given by all coalgebras with fp, fg, and ffg carriers, respectively, and we denote them as shown below: Since the three subcategories above are essentially small, we can form coalgebras as the colimits of the above inclusions as follows: Note that the latter two colimits are filtered; in fact, Coalg fg F and Coalg fp F are clearly closed under finite colimits in Coalg F , whence they are filtered categories. The first colimit is a sifted colimit since its diagram scheme Coalg ffg F is closed under finite coproducts [ , Lemma . ]. In what follows, the objects of Coalg ffg F are called ffg-coalgebras. We now discuss the three coalgebras above in more detail.
The rational fixed point is the coalgebra F . This is a fixed point as proved by Adámek, Milius and Velebil [ ]. In addition, F is characterized by a universal property both as a coalgebra and as an algebra: ( ) As a coalgebra, F is the terminal locally finitely presentable (lfp) coalgebra, where a coalgebra is called lfp if it is a filtered colimit of a diagram formed by coalgebras from Coalg fp F [ ].
( ) As an algebra, F is the initial iterative algebra for F .
An iterative algebra is an F -algebra a : F A → A such that every fp-equation, i.e. a morphism e : X → F X + A with X fp, has a unique solution in A. The latter means that there exists a unique morphism e † such that the following square commutes : This notion is a categorical generalization of iterative Σ-algebras for a singlesorted signature Σ originally introduced by Nelson [ ]; see also Tiuryn [ ] for a closely related concept.
The locally finite fixed point is the coalgebra ϑF . This coalgebra was recently introduced and studied by Milius, Pattinson and Wißmann [ , ] for a finitary endofunctor F preserving non-empty monos. They proved ϑF to be a fixed point of F and characterized by two universal properties analogous to the rational fixed point: ( ) As a coalgebra, ϑF is the terminal locally finitely generated (lfg) coalgebra, where a coalgebra is called lfg if it is a colimit of a directed diagram of coalgebras in Coalg fg F .
( ) As an algebra, ϑF is the initial fg-iterative algebra for F , where fg-iterative is simply the variation of iterative above where the domain object of e : X → F X +A is required to be fg in lieu of fp.
The locally ffg fixed point is the coalgebra ϕF . Recently, Urbat [ ] has proved that ϕF is indeed a fixed point of F , provided that F preserves sifted colimits. Actually, in loc. cit. the coalgebra ϕF is defined to be the colimit of all Fcoalgebras whose carrier is a split quotient of an ffg object. However, this is the same colimit as above, as we prove in the Appendix. Moreover, loc. cit. provides a general framework that allows to prove uniformly that all four coalgebras F , F , ϑF and νF are fixed points. In addition, a uniform proof of the universal properties of F , ϑF and νF is given.
Somewhat surprisingly, the coalgebra ϕF fails to have the finality property w.r.t. to coalgebras in Coalg ffg F : Urbat [ , Example . ] gives such a counterexample, see Section . below. This also shows that ϕF cannot have a universal property as some kind of iterative algebra (i.e. where solutions are unique).
Note that in a diagram we usually denote identity morphisms simply by the (co)domain object.

Relations between the Fixed Points.
Recall that a quotient of a coalgebra is represented by a coalgebra homomorphism carried by a regular epimorphism (= surjective algebra morphism) in C . Suppose we have a finitary functor F on C preserving surjective morphisms and non-empty injective ones. Then the subcoalgebra ϑF of νF is a quotient of F , which in turn is a quotient of ϕF [ , ]; see ( . ): ϕF F ϑF νF.
Whenever C fp = C fg , we clearly have Coalg fp F = Coalg fg F and hence F ∼ = ϑF (i.e. F is fully abstract w.r.t. behavioral equivalence). If C fp = C fg = C ffg , F and ϑF coincide with ϕF as well. Moreover, Milius [ ] introduced the notion of a proper functor (generalizing the notion of a proper semiring of Ésik and Maletti [ ]) and proved that a functor F is proper if and only if the three fixed points coincide, i.e. the picture above collapses to ϕF ∼ = F ∼ = ϑF → νF .
Loc. cit. also shows that on a variety C where fg objects are closed under taking kernel pairs, every endofunctor mapping kernel pairs to weak pullbacks in Set is proper [ , Proposition . ].
Instances of the three fixed points ϕF , ϑF and F have mostly been considered for proper functors (where the three are the same, e.g. for functors on Set), or else on algebraic categories where C fp = C fg (where F ∼ = ϑF , i.e. the rational and locally finite fixed points coincide). We shall see in Section . that ϕF can be different from F and ϑF (even when the latter two are isomorphic). Before that we illustrate the relationship of F and ϑF to νF by a number of well-known important examples: Examples . . ( ) For the set functor F X = {0, 1} × X Σ , whose coalgebras are deterministic automata with the input alphabet Σ, the terminal coalgebra is formed by all formal languages on Σ and the three fixed points are formed by all regular languages.
( ) For a signature Σ = (Σ n ) n<ω of operation symbols with prescribed arity we have the associated polynomial endofunctor on Set given by F Σ X = n<ω Σ n × X n . Its terminal coalgebra is carried by the set of all (finite and infinite) Σ-trees, i.e. rooted and ordered trees where each node with n-children is labelled by an n-ary operation symbol. The three fixed points are all equiv to the subcoalgebra given by rational (or regular [ ]) Σ-trees, i.e. those Σ-trees that have only finitely many different subtrees (up to isomorphism) This characterization is due to Ginali [ ]. For example, for the signature Σ formed by a binary operation symbol * and a constant c the following infinite Σ-tree (here written as an infinite term) is rational: c * (c * (c * · · · ))); These are mild assumptions; e.g. if C is single-sorted and F a lifting of a set functor, then these conditions are fulfilled. Note that these conditions are fulfilled in particular by every locally finite variety and every category of semirings for a Noetherian semiring and any lifted endofunctor whose underlying Set functor preserves weak pullbacks.
in fact, up to isomorphism its only subtrees are the whole tree and the single-node tree labelled by c).
( ) Consider the endofunctor F X = S × X Σ on the category of semimodules for the semiring S. The fixed point ϑF , which is isomorphic to F if S is Noetherian, is formed by all formal power series (i.e. elements of S Σ * ) recognizable by finite S-weighted automata. From the Kleene-Schützenberger theorem [ ] (see also [ ]) it follows that these are, equivalently, the rational formal power-series.
( ) For F X = k × X on Set the terminal coalgebra is carried by the set k ω of all streams on k, and the three fixed points are equal; they are formed by all eventually periodic streams (also called lassos). If k is a field, and we consider F as a functor on vector spaces over k, we obtain rational streams [ ].
( ) Recall [ ] that a positively convex algebra is a set X equipped with finite convex sum operations. This means that for every n and p 1 , . . . , p n ∈ [0, 1] with n i=1 p i ≤ 1 we have an n-ary operation assigning to x 1 , . . . , x n ∈ X an element n + i=1 p i x i subject to the following axioms: For n = 1 we write the convex sum operation for p ∈ [0, 1] simply as px. Positively convex algebras together with maps preserving convex sums in the obvious sense form the category PCA. Note that PCA is (isomorphic to) the Eilenberg-Moore category for the monad D of finitely supported subprobability distributions on sets. Sokolova and Woracek [ ] have recently proved that the functor F X = [0, 1] × X Σ and its subfunctorF mapping a set X to the set of all pairs (o, f ) in [0, 1] × X Σ satisfying ∀s ∈ Σ : ∃p s ∈ [0, 1], x s ∈ X : o + s∈Σ p s ≤ 1, f (s) = p s x s are proper functors on PCA. Hence, for those functors our three fixed points coincide. In particular, the latter functorF is used to capture the complete trace semantics of generative probabilistic transition systems [ ]. Hence, forF , our three fixed points collect precisely the probabilistic traces of finite such systems.
( ) Given an alphabet Σ, for the functor F X = {0, 1} × X Σ on the category of idempotent semirings the locally finite fixed point ϑF is formed by all context-free languages [ ]. Descriptions of F and ϕF are unknown in this case.
More generally, consider first the category of associative S-algebras for the commutative semiring S, i.e. S-semimodules equipped with an additional monoid structure such that multiplication is an S-semimodule morphism in each of its arguments. This is the Eilenberg-Moore category for the monad S − assigning to each set X the set of S-polynomials of over X, i.e. functions X * → S with finite support. This is not quite the category C , but one considers Σ-pointed S-algebras, where Σ is an input alphabet, i.e. S-algebras A equipped with a map Σ → A. The corresponding monad is S − + Σ . The terminal coalgebra for the functor F X = S × X Σ on C is again carried by the set of all formal power series over Σ, and the locally finite fixed point ϑF is formed by all constructively Remark . . The rational fixed point F and the locally finite one, ϑF , are defined and studied more generally than in the present setting, namely for finitary functors F on a locally finitely presentable category C (see Adámek and Rosický [ ] for an introduction to locally presentable categories); see [ , ] for F and [ , ] for ϑF .
The following are instances of F and ϑF for F on a locally finitely presentable category C : ( ) Consider the functor category Set F , where F is the category of finite sets and maps and denote by V : F → Set is the full embedding. Further, consider the endofunctor F X = V + X × X + δ(X) with δ(X)(n) = X(n + 1). This is a paradigmatic example of a functor arising from a binding signature for which initial semantics was studied by Fiore et al. [ ].
The final coalgebra νF is carried by the presheaf of all λ-trees modulo αequivalence [ ]. In fact, the functor νF assigns to n the set of all (finite and infinite) λ-trees in n free variables (note that such a tree may have infinitely many bound variables). Moreover, F is carried by the rational λ-trees, where an α-equivalence class is called rational if it contains at least one λ-tree which has (up to isomorphism) only finitely many different subtrees (see op. cit.).
The coalgebra of all λ-trees with finitely many free variables modulo αequivalence also appears as the final coalgebra for a very similar functor on the category of nominal sets [ ]. Moreover, the rational λ-trees form its rational fixed point [ ]. Similarly for any functor on nominal sets arising from a binding signature [ , ].
( ) Courcelle's algebraic trees [ ] occur as a locally finite fixed point. In more detail, fix a polynomial functor H Σ : Set → Set and consider the category C = H Σ /Mnd f (Set) of H Σ -pointed finitary monads M on Set, i.e. those equipped with a natural transformation H Σ → M . The assignment M → H Σ M + Id provides an endofunctor F : C → C whose terminal coalgebra is carried by the monad T Σ assigning to a set X the set of all Σ-trees over X. The locally finite fixed point ϑF is the monad A Σ of algebraic Σ-trees [ ]. Note that in this category C , fp and fg objects do not coincide. Hence, it is unclear whether ϑF and F are isomorphic.
In the setting of general locally finitely presentable categories, there is no analogy to ϕF , of course. .

A Nontrivial Example of the Locally ffg Fixed Point
We now present a new example where only ϕF is interesting whereas the other three fixed points are trivial. We consider the monad T on Set whose algebras are the algebras with one unary operation u (with no equation): The unit η and multiplication µ of this monad are given by η X (x) = (0, x) and µ X (n, (m, x)) = (n + m, x). Since T X is the free algebra with one unary operation on X, its elements (n, x) correspond to terms u n (x). Let F be the identity functor Id on the category C = Set T . The final coalgebra for Id is lifted from Set: it is the trivial algebra on 1 with id 1 as its coalgebra structure. Since 1 is clearly finitely presented by one generator x and the relation u(x) = x, both of the diagrams Coalg fp Id and Coalg fg Id have a terminal object. This is then their colimit, whence Id ∼ = ϑId ∼ = 1.
However, ϕId is non-trivial and interesting. An ffg-coalgebra T X γ − → T X may be viewed (by restricting it to its generators in X) as obtained by generalized the stream generated by x. Since the set X is finite, this stream is eventually periodic, i.e. of the form s = s 0 s ω 1 for finite lists s 0 and s 1 of natural numbers. (Here (−) ω means infinite iteration.) Two eventually periodic streams s = s 0 s ω 1 and t = t 0 t ω 1 with s 1 = (s 1,0 , . . . , s 1,p−1 ) and t 1 = (t 1,0 , . . . , t 1,q−1 ) are called i.e. the two lists s 1 and t 1 have the same arithmetic mean (or, equivalently, the entries of the two lists s q 1 and t p 1 of length p · q have the same sum). For instance, the streams s = (1, 2, 7, 4)(1, 3, 2) ω = (1, 2, 7, 4, 1, 3, 2, 1, 3, 2, 1, 3, 2, . . .) and t = (5, 6)(0, 4) ω = (5, 6, 0, 4, 0, 4, 0, 4, 0, 4, . . .) are equivalent. Note that the above notion of equivalence is well-defined, i.e. not depending on the choice of the finite lists s 0 , s 1 and t 0 , t 1 in the representation of s and t. In fact, given alternative representations s = s 0 s ω 1 and t = t 0 t ω 1 with s 1 = (s 1,0 , . . . , s p−1 ) and t 1 = (t 1,0 , . . . , t 1,q−1 ), the lists s p 1 and s p 1 are equal up to cyclic shift, as are the lists t q 1 and t q 1 . Therefore from ( . ) it follows that Dividing by p · q yields the required result: Remark . . ( ) In the proof of Proposition . further below we use the following well-known fact about colimits of sets. For every diagram D : there exists a zig-zag of morphisms of D whose D-image connects x and y.
( ) Moreover, if D is a filtered diagram, then condition (b) can be substituted by the condition that when two elements x, y ∈ Di are merged by c i then they are also merged by Dh : Di → Dj for some morphism h : i → j of D.
Proposition . . The coalgebra ϕId is carried by the set of equivalence classes (cf. ( . )) of eventually periodic streams.
In more detail, the unary operation and the coalgebra structure are both given by id : ϕId → ϕId, and for every Id-coalgebra (T X, γ X ) with X finite, the colimit injection γ X : T X → ϕId maps (m, x) ∈ T X to the equivalence class of the stream generated by x.
Proof. ( ) We first show that the above morphisms (−) form a cocone. Given an ffg-coalgebra (T X, γ X ) for Id and elements (m, x), (n, y) ∈ T X with γ X (m, x) = (n, y), the stream generated by y is the tail of the stream generated by x, and thus the two streams are equivalent. This shows that γ X is a coalgebra homomorphism.
To show that the morphisms (−) form a cocone, suppose that h : (T X, γ X ) → (T Y, γ Y ) is a homomorphism in Coalg ffg Id, and let (m, x) ∈ T X and (n, y) ∈ T Y with h(m, x) = (n, y) be given. We need to show that the streams generated by x and y are equivalent. Denote by the states reached from (m, x) and (n, y), resp., after j steps. Since h is a coalgebra homomorphism, one has h(m j , x j ) = (n j , y j ) for all j. Since X is finite, there exist natural numbers k ≥ 0 and p > 0 with x k = x k+p . Then the eventually periodic stream generated by x is given by Since h(m k , x k ) = (n k , y k ) and h(m k+p , x k+p ) = (n k+p , y k+p ), one has y k = y k+p , which implies that y generates the stream To show that the streams generated by x and y are equivalent, it suffices to verify that m k+p − m k = n k+p − n k , as this entails that To prove the desired equation, we compute where the last equality uses that h(m k , x k ) = (n k , y k ) and that h is a morphism of C . This implies n k+p = m k+p − m k + n k .
( ) We prove that the cocone (−) is a colimit cocone. Since sifted colimits in Coalg Id are formed as in C and thus as in Set, we can apply Remark . : we will show that (a) the morphisms γ X are jointly surjective and (b) given ffg-coalgebras (T X, γ X ) and (T Y, γ Y ) and two states (m, x) ∈ T X and (n, y) ∈ T Y merged by γ X and γ Y , there exists a zig-zag in Coalg ffg Id connecting the two states. Statement (a) is clear because finite stream coalgebras generate precisely the eventually periodic streams. For (b), we adapt the argument of the first part of our proof and continue to use the notation ( . ). Since X and Y are finite, there exist natural numbers k ≥ 0 and p > 0 with x k = x k+p and y k = y k+p . As the streams generated by x and y are equivalent, one has m k+p − m k = n k+p − n k . Consider the ffg-coalgebra (T Z, γ Z ) with Z = {z 0 , z 1 , . . . , z k+p−1 }, and γ Z defined on the generators by Form the morphisms g : T Z → T X and h : T Z → T X given on generators by Then g is a coalgebra homomorphism. Indeed, for j < k + p − 1 we have and moreover Analogously for h. Thus we have constructed a zig-zag in Coalg ffg Id connecting (m, x) and (n, y), as required.
Observe that every non-empty ffg-coalgebra (T X, γ X ) admits infinitely many coalgebra homomorphisms into ϕId. For instance, any constant map into ϕId is one. This shows that, in general, the coalgebra ϕF is not final w.r.t. the ffg-coalgebras.

Recap: Elgot Algebras
In this section we briefly recall the notion of an Elgot algebra [ ] and some key results in order to contrast this with our subsequent development of ffg-Elgot algebras in Section . Throughout this section we assume the endofunctor F : C → C to be finitary.
Recall from Section . that an fp-equation is a morphism where X is an fp object (of variables) and A an arbitrary object of parameters. Furthermore, if A carries the structure of an F -algebra a : F A → A, then a solution of e in A is a morphism e † : X → A such that the square ( . ) commutes.
Notation . . We use the following notation for fp-equations: ( ) Given a pair of fp-equations e : X → F X + Y and f : Y → F Y + Z we combine them into the following fp-equation

Definition . [ ].
An Elgot algebra is a triple (A, a, †) where (A, a) is an F -algebra and † is an operation assigning to every fp-equation in A a solution, subject to the following two conditions: Remark . . Later we will need the following properties of • and : For the proof of the first two see [ , Remark . ]. The remaining one is easy to prove by considering the three coproduct components of X + Y + Z separately. We leave this as an exercise for the reader.
Note that, in lieu of weak functoriality, † was previously required to satisfy (full) functoriality [ ]; this states that for every pair of fp-equations e : However, this makes no difference:

Lemma . . Functoriality and Weak Functoriality are equivalent properties of †.
Proof. Functoriality clearly implies Weak Functoriality. In order to prove the converse, let e : X → F X + A, f : Y → F Y + A be fp-equations, and let m : (X, e) → (Y, f ) be a coalgebra morphism. Given an algebra (A, a), write A as the filtered colimit of its canonical diagram C fp /A (cf. Section . ). The functor F X + (−) preserves filtered colimits, and so F X + A is the filtered colimit of the diagram formed by all morphisms F X + h : F X + Z → F X + A, where h ranges over C fp /A. Since X is fp, the morphism e : X → F X + A factors through one of these morphisms, i.e. there exists a morphism h : Z → A with Z fp and e : X → F X + Z such that e = h • e : We do not claim that m is a coalgebra homomorphism from (X, e ) to (Y, f ). However, the corresponding equation holds when postcomposed by the colimit injection F Y + h: By Remark . ( ), there exists a morphism h : Z → A with Z fp and a connecting morphism z : the left-hand square commutes when postcomposed with F Y + z; thus, since the upper and lower parts as well as the right-hand square commute, so does the outside, as desired. By Weak Functoriality, we thus conclude
( ) Cpo enrichable algebras. Recall that a complete partial order (cpo, for short) is a partially ordered set having joins of ω-chains. Cpos form a category CPO whose morphisms are the continuous functions, i.e. functions preserving joins of ω-chains. Let F 0 : Set → Set be a functor having a locally continuous lifting F : CPO → CPO, i.e. a lifting such that the derived mappings CPO(X, Y ) → CPO(F X, F Y ) are continuous for all cpos X and Y . (For example, every polynomial functor F Σ associated to the signature Σ has a lifting to CPO.) Suppose further that a : F A → A is an algebra where A is a cpo with a least element ⊥ and a is continuous. Then A is an Elgot algebra w.r.t. the operation † assigning to an fp-equation its least solution. More precisely, given an fp-equation e : X → F 0 X + A (in Set), consider X as a cpo with discrete order. Then we obtain the following continuous endomap on CPO(X, A), the cpo of continuous functions from X to A: (cf. ( . )), and we let e † be its least fixed point (which exists by Kleene's fixed point theorem). For details see [ , . -. ].
( ) CMS enrichable algebras. A related example is based on complete metric spaces, i.e. metric spaces in which every Cauchy sequence has a limit. Here one considers the category CMS of complete metric spaces with distances in [0, 1] and non-expanding maps, i.e. maps f : . Note that for two complete metric spaces X and Y the set of non-expanding maps CMS(X, Y ) forms a complete metric space with the supremum metric Let F 0 : Set → Set be a functor having a locally contracting lifting to CMS, i.e. a lifting F : CMS → CMS for which there exists some ε < 1 such that for all (Again, polynomial set functors have locally contracting liftings to CMS.) Now suppose that a : F A → A is a non-empty algebra such that A carries a complete metric space and a is a non-expanding map. Then A is iterative, whence an Elgot algebra. In fact, for every equation e : X → F X + A consider X as a discrete metric space (i.e. all distances are 1) and consider the endofunction on which is ε-contracting for the ε above. Then, by Banach's fixed point theorem, this function has a unique fixed point, viz. the unique solution of e. For details see [ , .
( ) As a concrete instance of the previous point one can obtain fractals as solutions of equations. For example, let A be the set of closed subsets of the unit interval [0, 1] equipped with the following binary operation: Then A is an algebra for F 0 X = X × X on Set, and this F 0 has the locally contracting lifting F (X, d) = (X × X, 1 3 d max ), where d max denotes the usual maximum metric on the cartesian product. One sees that A is an algebra for F when equipped with the so-called Hausdorff metric. Hence, it is an Elgot algebra. For example, let X = {x} and let e : X → F X + A be given by e(x) = (x, x). Then e † (x) is the well-known Cantor set.
We have already mentioned in Section . that the rational fixed point F is an initial iterative F -algebra. Moreover, for every object Y , the rational fixed point (F (−) + Y ) is a free iterative algebra on Y . Thus, the object assignment Y → (F (−) + Y ) yields a monad R on C .

Theorem . ([ ]). The category of Eilenberg-Moore algebras for the monad R is isomorphic to the category of Elgot algebras for F .
Thus, in particular, (F (−) + Y ) is not only a free iterative algebra, but it is also a free Elgot algebra on Y , whence F is the initial Elgot algebra.

FFG-Elgot Algebras
The rest of our paper is devoted to studying the fixed point ϕF , the colimit of all ffg-coalgebras for F , in its own right and establish a universal property of it as an algebra. Recall that by a variety C we mean a finitary, many sorted variety. That is, C is (isomorphic to) the category of Eilenberg-Moore algebras for a finitary monad T on Set S , where S is a set of sorts.
Assumption . . Throughout the rest of the paper we assume that C is a variety of algebras and that F : C → C is an endofunctor preserving sifted colimits.
Examples . . ( ) For the monad T representing C , all functors that are liftings of a finitary functor F 0 on Set S (via a distributive law of T over F 0 ) preserve sifted colimits. Indeed, finitary functors F 0 : Set S → Set S preserve them [ , Proposition . ]. Since the forgetful functor U : C → Set S preserves and reflects sifted colimits, it follows that every lifting of F 0 preserves sifted colimits, too.
The following examples are not liftings of set functors.
( ) The functor F X = X + X, where + denotes the coproduct of C , preserves sifted colimits. More generally, every coproduct of sifted-colimit preserving functors preserves them too. Similarly for finite products of sifted-colimit preserving functors. Thus, all polynomial functors on C preserve sifted colimits.
( ) Let C be an entropic variety (see e.g. [ ]) aka commutative variety (see e.g. [ ]), i.e. such that the usual tensor product ⊗ (representing bimorphisms) makes it a symmetric monoidal closed category. (Examples include sets, vector spaces, join-semilattices, or abelian groups.) Then the functor F X = X ⊗ X preserves sifted colimits. To see this, it suffices to show that (a) F is finitary and (b) it preserves reflexive coequalizers (see Remark . ). First note that since C is symmetric monoidal closed, we know that each functor X ⊗ − and − ⊗ X is a left adjoint and therefore preserves all colimits. Ad (a). Suppose that D : D → C is a filtered diagram with colimit injections a d : Dd → A for d ∈ D. We need to prove that all a d ⊗ a d : Dd ⊗ Dd → A ⊗ A form a colimit cocone. That is, for every morphism f : X → A ⊗ A with X fp, (i) there exists some d ∈ D and g : X → Dd ⊗ Dd with (a d ⊗ a d ) · g = f and (ii) given g, h : X → Dd ⊗ Dd that yield f in this way, there exists a morphism m : d → d in D such that Dm ⊗ Dm merges g and h [ , Lemma . ].
To prove (i), we use that − ⊗ A is finitary to obtain some d ∈ D and f : can choose morphisms m : d →d and n : d →d in D. Let g = (Dm ⊗ Dn) · f . Then we have For (ii), use first that − ⊗ A is finitary and choose some morphism o : d → d such that It follows that (Dd ⊗ a d ) merges (Do ⊗ Dd) · g and (Do ⊗ Dd) · h. Now use that Dd ⊗ − is finitary and choose a morphism p : d → d in D such that (Dd ⊗ Dp) also merges those two morphisms. Finally, use that D is filtered to choose two morphisms q : d →d and r : d →d such that q · o = r · p, and let us call this last morphism m : d →d. Then Dm ⊗ Dm merges g and h: Ad (b). Let f, g : A → B be a (not necessarily reflexive) pair, and let c : B → C be its coequalizer. Use that all functors − ⊗ X and X ⊗ − preserve coequalizers to see that in the following diagram, whose parts commute in the obvious way, all rows and columns are coequalizers: By the ' -by-lemma' [ , Lemma . ], it follows that the diagonal yields a coequalizer too, i.e. c ⊗ c is a coequalizer of the pair f ⊗ f, g ⊗ g, as desired.
( ) Combining the previous argument with induction, we see that sifted-colimit preserving functors on an entropic variety C are stable under finite tensor products. Thus, all tensor-polynomial functors on C preserve sifted colimits.
Under our assumptions we know that ϕF is a fixed point of F [ ], and we will henceforth denote the inverse of its coalgebra structure by t : F (ϕF ) → ϕF .
The following is a variation of Definition . where the variable objects X are now restricted to be ffg objects: Definition . . By an ffg-equation is meant a morphism e : X → F X +A where X is an ffg object (of variables) and A an arbitrary object (of parameters). An ffg-Elgot algebra is a triple (A, a,  †) where (A, a) is an F -algebra and † is an operation e : X → F X + A e † : X → A assigning to every ffg-equation in A a solution (cf. ( . )) and satisfying Weak Functoriality . ( ) and Compositionality . ( ) with X, Y and Z restricted to ffg objects.
Remark . . ( ) Note that in categories where fp objects are ffg, e.g. in the category of sets or vector spaces, (ordinary) Elgot algebras and ffg-Elgot algebras are the same concept. However, in the present setting this may not be the case.
( ) Since fp-equations have variable objects X such that C (X, −) preserves filtered colimits, one could expect that ffg-equations will have X as those objects for which C (X, −) preserves sifted colimits. Indeed, that would yield the same colimit ϕF , as we prove in the Appendix.
( ) We do not know whether, for ffg-Elgot algebras, Weak Functoriality implies Functoriality. The proofs of our main results (in particular Proposition . and Theorem . ) do not work when Weak Functoriality is replaced by Functoriality.
Remark . . In the case where F : Set T → Set T is a lifting of a functor F 0 : Set → Set (via a distributive law λ), an F -algebra is given by a set A equipped with both a T -algebra structure α : T A → A and an F 0 -algebra structure a : F 0 A → A such that a is a T -algebra homomorphism, i.e. one has α · T a = a · F α · λ A . Morphisms of F -algebras are those maps that are both T -algebra and F 0 -algebra homomorphisms. Now one may think of ffg-equations and their solutions as modelling effectful iteration. Indeed, let X 0 be a finite set of variables and consider any map This may be regarded as a system of recursive equations with variables from X 0 and parameters in A, where for every recursive call a side effect in T might happen. If (A, α, a) is an F -algebra, a solution of such a recursive system should assign to each variable in X 0 an element of A, i.e. we have a map e † 0 : X 0 → A, such that the square below commutes (here we write + for disjoint union): ] y y Indeed, from e 0 we may form the map where ⊕ denotes the coproduct in C , which may be different from disjoint union. Then its unique extension T X 0 → F T X 0 ⊕ A to a T -algebra morphism is an ffg-equation, and a solution T X 0 → A of this in the sense of Definition . is precisely the same as an extension of a solution for e 0 in the above sense.
Construction . . We aim at proving that ϕF is the initial ffg-Elgot algebra. For that we first construct a solution e † : X → ϕF for every ffg-equation e : X → F X + ϕF . Recall that ϕF = colim D for the inclusion D : Coalg ffg F Coalg F and denote the colimit injections by c : C → ϕF for every ffg-coalgebra (C, c). Thus F X + ϕF = colim(F X + D) with colimit injections F X + c . Since X is an ffg-object, this sifted colimit is preserved by C (X, −). Thus, the diagram with colimit injections given by postcomposition with F X + c . By Remark . ( ), every ffg-equation e : X → F X+ϕF thus factorizes through one of the colimit injections F X + c , i.e. for some ffg-coalgebra c : C → F C and w : X → F X + C we have the commutative triangle below: We see that w is an ffg-equation. We combine it with the ffg-equation c (having the initial object 0 as parameter, see Definition . ) to w c : X + C → F (X + C), which is an object of Coalg ffg F . Finally, we put We prove below that e † is indeed a solution of e in the algebra ϕF (cf. ( . )) and verify some properties used later.
Recall the category elD of elements ofD: its objects are triples (C, c, w) where (C, c) ∈ Coalg ffg F and w ∈D(C, c), i.e. w : X → F X + C, and a morphism into Given two factorizations (F X + c ) · w = e = (F X + c ) · w, we thus see that the colimit injection F X + c takes the element w to the same value to which the colimit injection F X + c takes w. This implies that w and w lie in the same connected component of elD. Therefore it suffices to prove ( . ) under the assumption that a morphism h from w to w exists in elD: then that equation holds in the whole connected component. Thus, we have the following commutative diagram: the left-hand square and the middle one commute by the preceding diagram, and the right-hand square commutes trivially. Since the colimit injections (−) form a compatible family, we obtain (w c) = (w c) · (X + h). Precomposed with inl this yields the desired equation ( . ).
( ) We show that e † is a solution of e in ϕF .
( a) First note that the following triangle commutes: To this end, we just need to verify that inr is a morphism in Coalg ffg F from (C, c) to (X + C, w c), which is established by the commutative diagram below: The commutative triangle ( . ) together with (w c) · inl = e † yield the following commutative triangle: We conclude that the following diagram commutes: the left-hand part follows from the definition of w c, the upper one is the definition of e † , the right-hand one uses that (w c) is a coalgebra homomorphism, and the lower one is the triangle ( . ).
We are ready to prove that e † is a solution of e, which means that the outside of the following diagram commutes: The upper part has just been established in ( . ). The left-hand part commutes by ( . ), the lower left-hand square commutes because c is a coalgebra homomorphism, and the three remaining parts commute trivially.

Proposition . . The algebra t : F (ϕF ) → ϕF together with the solution operator † from Construction . is an ffg-Elgot algebra.
Proof. Weak Functoriality. Suppose that the commutative square below and a morphism h : Z → ϕF are given, where X, Y , and Z are ffg objects.
Since Z is ffg, the morphism h factorizes through the colimit injection c of some coalgebra c : C → F C in Coalg ffg F as in the triangle below: and observe that the following diagram commutes: Consequently, in the following diagram the left-hand square commutes. The other parts are clearly commutative, and thus we see that m+C is a coalgebra homomorphism from v c to w c. Therefore which yields the desired equation (h • f ) † · m = (h • e) † , as shown by the commutative diagram below:

Compositionality.
( ) Suppose that two ffg-equations e : X → F X + Y and f : Y → F Y + ϕF are given, and factorize f through some colimit injection F Y + c of F Y + C: Then, by the definition of †, we have This implies that the ffg-equation f † • e : X → F X + ϕF factorizes as follows: y y

On Algebras with Effectful Iteration
Thus, by the definition of † again, the solution (f † • e) † : X → ϕF of f † • e is given by the coproduct injection inl : X → X + Y + C followed by the colimit injection By Remark . ( ) the last morphism is equal to [e (v c)] , thus we obtain: ( ) The equation e f : X + Y → F (X + Y ) + ϕF factorizes as follows: Precomposing this with the coproduct injection inl : X → X + Y proves the desired equality Definition . . A morphism of ffg-Elgot algebras from (A, a, †) to (B, b, ‡) is a morphism h : A → B in C preserving solutions, i.e. for every ffg-equation Identity morphisms are clearly ffg-Elgot algebra morphisms, and morphisms of ffg-Elgot algebra compose. Therefore ffg-Elgot algebras form a category, which we denote by ffg-Elgot F.

Lemma . . Morphisms of ffg-Elgot algebras are F -algebra homomorphisms.
Proof. This is completely analogous to the proof of [ , Lemma . ]. The only small modification is needed at the beginning of the proof as follows: Let C ffg /A be the slice category of all arrows q : X → A with X ffg. Since C is a variety, A is the sifted colimit of the diagram D A : C ffg /A → C given by (q : X → A) → X.
The remainder of the proof is identical.
Note that the converse of the above lemma fails in general. In fact, [ , Example . ] exhibits an (ffg-)Elgot algebra for the identity functor on Set and an algebra homomorphism on it which is not solution-preserving.
Theorem . . The triple (ϕF, t, †) is the initial ffg-Elgot algebra for F . Proof. Let (A, a, ‡) be an ffg-Elgot algebra. For the initial object 0 we denote by i A : 0 → A the unique morphism. ( ) We obtain a cocone of the diagram where U is the forgetful functor, as follows: to every ffg-coalgebra c : Since ϕF is the colimit of the embedding Coalg ffg F Coalg F and since U preserves colimits, there exists a unique morphism h : ϕF → A in C such that the following triangles C commute for all ffg-coalgebras c : C → F C.
( ) We prove that h is solution-preserving. Given an ffg-equation e : X → F X + ϕF , factorize e through one of the colimit injections F X + c of F X + ϕF : The last morphism is, due to Compositionality, equal to Thus, it remains to verify that h · e † is the same morphism. From e = c • v the definition of † yields e † = (v c) · inl and we get where the last step uses Remark . ( ).
( ) It remains to prove the uniqueness of h. Thus suppose that another solutionpreserving morphism g : ϕF → A is given. It is sufficient to prove g · c = h · c for all ffg-coalgebras c : C → F C.
Form the ffg-equation i ϕF • c = inl · c : C → F C + ϕF . Then it is easy to verify that the left coproduct injection inl : C → C + C is a coalgebra homomorphism from (C, c) to (C + C, c) where c = (inl · c) c. Therefore, the compatibility of the colimit injections (−) yields c = c · inl. Now i ϕF • c factorizes as follows: Since g preserves solutions, using Remark . ( ), and that g · i ϕF = i A : 0 → A, we thus get as required. This concludes the proof.
The following result is the key to constructing free ffg-Elgot algebras. In the case where C ffg = C fp , hence where ffg-Elgot algebras agree with ordinary ones, we thus obtain a new result about ordinary Elgot algebras. Remark . . The correspondence is given as follows: ( ) For every ffg-Elgot algebra (A, a, †) for F , we define a solution operator ‡ w.r.t. F (−) + Y as follows. Given e : X → F X + Y + A, put and e ‡ := e † h . ( ) Conversely, for every ffg-Elgot algebra (A, [a, h], ‡) for F (−) + Y , we define a solution operator † w.r.t. F as follows. Given an ffg-equation e : and e † := e ‡ .
We will show that these two constructions are mutually inverse and yield the desired bijective correspondence.
In the next two subsections we will present the proof of Theorem . . We will establish this result in two steps: first we prove it for ffg objects Y and then, using the first step, for arbitrary free objects. Readers who would like to skip the proof on first reading could jump straight to Section . . .

Proof of Theorem . for the case where Y is an ffg object
Suppose that Y is an ffg object.
( a) Given an ffg-equation e : X → F X + Y + A, then e ‡ is a solution, as shown by the diagram below: and a morphism g : Z → A are given where X, X and Z are ffg objects. We need to prove From the following diagram: Here, by abuse of notation, • is used both for F and F (−) + Y . Analogously, Since † is weakly functorial, we get Express A as a sifted colimit a i : A i → A (i ∈ I) of ffg objects. Then also the morphisms F Z + Y + a i : F Z + Y + A i → F Z + Y + A form a sifted colimit cocone, and since Z is an ffg object, f factorizes through one of them: Define ffg-equationsf andf 0 by the commutative diagrams below (where inm denotes the middle coproduct injection): We now verify that [inl, inr] : X + Z → X + Y + Z is a coalgebra homomorphism from e f 0 to e f 0 . (Here we again use for both F and F (−)+Y .) This is shown by the commutative diagram below, where can in the upper row is w.r.t. F (−)+Y , and in the lower row it is w.r.t. F : as shown by the following computation: Since † is weakly functorial, we get We apply the Weak Functoriality of † also the to lower square of the diagram definingf 0 and to [h, a i ] in lieu of h and use that [h, a i ] ·f 0 =f to obtain This implies thatf since the left-hand componentf † · inl = h follows from the fact thatf † is a solution off : ] y y Thus, we conclude the proof with the following computation: with e † := e ‡ is an ffg-Elgot algebra for F .
( a) e † is a solution of e : X → F X + A: ] o o [inl,inr] y y Indeed, the upper square commutes since e ‡ is a solution of e, and for the lower one recall that e † = e ‡ .
( b) † is weakly functorial. Given a coalgebra homomorphism m from e : X → F X + Z to f : X → F X + Z and a morphism h : Z → A where X, X , and Z are ffg objects, we need to prove (h • e) † = (h • f ) † · m. From the following diagram we see that m is also a coalgebra homomorphism for F (−) + Y + Z from e to f : This implies the desired equality since (and analogously for f ) due to the following diagram: G Note that the upper path composed with can + A yields e f . The proof of compositionality now easily follows: = (e f ) † · inl def. † ( ) We prove that the two passages ( ) and ( ) in Remark . are mutually inverse.
( a) The fact that ( ) followed by ( ) yields the identity is easy to see since for every ffg-equation e : X → F X + A for F , we have as shown by the commutative diagram below: In order to show that ( ) followed by ( ) is the identity, we prove for (We do not claim that (e h ) = e.) Express A as a sifted colimit a i : A j → A (j ∈ J) of ffg objects. Then also the morphisms F X + Y + a i : F X + Y + A i → F X + Y + A form a sifted colimit cocone, and since X is an ffg object, there exists j ∈ J and a morphism e 0 such that the following triangle commutes: (Note that f = a j • f 0 for f 0 = inr.) We have that as demonstrated by the diagram below: We also have that where Indeed, the following diagram commutes using ( . ) for the right-hand part and ( . ), ( . ) for the lower left-hand one: Finally, we have a coalgebra homomorphism inl from e 0 to e 0 f 0 : This concludes the proof. .

Proof of Theorem . for an arbitrary free object
Now assume that Y is an arbitrary free object of C . We shall reduce this case to the previous situation using filtered colimits.

Notation . . Fix an F -algebra a : F A → A and a morphism h : Y → A.
Since in every variety C the free functor (left adjoint to the forgetful functor from C to Set S ) preserves colimits, we can express the free object Y as a colimit of a filtered diagram D Y of ffg objects Y i : Definition . . By a compatible family of ffg-Elgot algebras is meant a family of ffg-Elgot algebras for the functors F (−) + Y i such that for every connecting morphism y ij : Y i → Y j of the diagram D Y and every ffg-equation e : X → F X + Y i + A, one has To establish Theorem . , we prove the following more refined result: Theorem . . For every F -algebra (A, a) there is a bijective correspondence between ( ) solution operations † such that (A, a, †) is an ffg-Elgot algebra for F ,

is a compatible family of ffg-Elgot algebras, and ( ) solution operations ‡ such that (A, [a, h], ‡) is an ffg-Elgot algebra for
The proof is split into four lemmas.
Proof. By part ( ) in Subsection . , (A, [a, h i ], (−) †,i ) is an ffg-Elgot algebra for every i ∈ I. For compatibility, let e : X → F X + Y i + A be an ffg-equation and let y ij : Y i → Y j be a connecting morphism of D Y . Then the triangle below commutes: Here the first equation is the definition of (−) †,j , the second one follows from the above commutative triangle, and the last one is the definition of (−) †,i .
Lemma . . Suppose that a compatible family ( . ) of ffg-Elgot algebras is given. Then for every ffg equation e : X → F X + A the morphism is independent of the choice of i. Moreover, (A, a,  †) is an ffg-Elgot algebra for F , and the morphisms h i (i ∈ I) form a cocone of the diagram D Y .
Proof. ( ) By part ( ) in Subsection . , we know that (A, a, †) is an ffg-Elgot algebra. Let us verify that † is independent of the choice of i. Given i, j ∈ I, choose k ∈ I and connecting morphisms y ik : Y i → Y k and y jk : Y j → Y k , using that D Y is filtered. Then the following diagram commutes: Therefore, by compatibility of the family ( . ), one has as required.
( ) Next, we show that for every i ∈ I the ffg-equation Here the outside commutes by the definition of a solution, and the lower triangle commutes trivially. Therefore the upper triangle commutes, showing that h i = inm †,i .
( ) Finally, we prove that the h i 's form a cocone. Suppose that a connecting morphism y ij : Y i → Y j is given, and consider the following commutative diagram (here i A : 0 → A denotes the unique morphism from the initial object to A): Then we get Here the first equation follows from part ( ) above, the second one follows from the upper part of the above diagram and compatibility, the third one follows from the central part of the diagram via Weak Functoriality of (−) †,j , the fourth one is the lower part of the diagram, and the last equation is again part ( ).

Lemma . . Every ffg-Elgot algebra
Proof. ( ) We first show that (A, [a, h i ], (−) †,i ) is an ffg-Elgot algebra for every i ∈ I. In the following, for every ffg-equation e : Solution. Consider the diagram below: The upper part commutes because e †,i = e ‡ is the solution of e, and the other three parts commute trivially. Therefore the outside of the diagram commutes, showing that e †,i is a solution of e.
Weak functoriality. Suppose that two ffg-equations e : X → F X + Y i + Z and f : X → F X +Y i +Z are given together with a coalgebra homomorphism m from e to f and a morphism g : Z → A. Then m is also a coalgebra homomorphism w.r.t. F (−) + Y : and similarly for f , due to the following diagram: Thus, Weak Functoriality of †, i follows from that of ‡: Compositionality. Using the definition of (−) †,i , one easily verifies that for two ffg-equations e : X → F X + Y i + Z and f : Z → F Z + Y i + A one has f e = f e due to the following commutative diagram: Thus we obtain (f e) †,i = (f e) ‡ = (f e) ‡ , and we have Then compositionality of ‡ implies ( ) To prove that the given family of ffg-Elgot algebras is compatible, let e : X → F X + Y i → A be an ffg-equation and y ij : where the first equation uses the definition of (−) †,j , the second one uses that y ij is a connecting morphism, and the last equation uses the definition of (−) †,i .
Notation . . ( ) By Lemma . , for every compatible family ( . ) of ffg-Elgot algebras, the morphisms h i : Y i → A form a cocone and thus induce a unique morphism h : with i ∈ I. We put e ‡ := e †,i i (and prove below that this is independent of the choice of i).

Lemma . . Every compatible family ( . ) of ffg-Elgot algebras induces an ffg-Elgot algebra (A, [a, h], ‡).
Proof. We first observe that the factorization of e exists because (F i∈I is a filtered colimit cocone and X, being an ffg object, is finitely presentable. Let us show that ‡ well-defined, i.e. independent of the choice of the factorization. To see this, suppose that another factorization e = (F X + y j + A) · e j is given. Since D Y is filtered, there exists k ∈ I and connecting morphisms y ik : Y i → Y k and y jk : Y j → Y j with e k := (F X + y ik + A) · e i = (F X + y jk + A) · e j . Then compatibility of the given family of ffg-Elgot algebras shows that e †,i i = e †,k k = e †,j j , as required.
It remains to show that (A, [a, h], ‡) is an ffg-Elgot algebra.
Solution. Consider the following diagram: Weak Functoriality. Suppose that we are given ffg-equations e : X → F X +Y + Z and f : X → F X +Y +Z, where Z is an ffg object, a coalgebra homomorphism m from e to f , and a morphism g : Z → A. We choose factorizations for some i ∈ I; note that we may choose the same i for both e and f since D Y is filtered. Then in the following diagram the outside and all inner parts except the left-hand square commute: Hence, it follows that the two morphisms are merged by the colimit injection F X + y i + Z. Since X is an ffg object and D Y is filtered, some connecting morphism F X + y ij + Z with j ∈ I merges them, too. Put e j := (F X + y ij + Z) · e i and f j : Then the outside of the following diagram commutes: Now observe that g • e factorizes through g • e i as follows: and similarly (F X + y ij + A) · (g • f i ) = g • f j . Thus, we obtain the Weak Functoriality of ‡ from that of †, i: Here the first equation uses the definition of ‡ and the fact that f e = (F X + y i + A) · (f i e i ). The second equation is compositionality of (−) †,i , the third one uses that f ‡ = f †,i i by the definition of ‡, and the last equation uses the definition of ‡ and the fact that Proof of Theorem . . In order to complete the proof of Theorem . (and therefore that of Theorem . ), observe that the constructions of Lemma . and . are mutually inverse; the proof is completely analogous to parts ( a) and ( b) of the proof in Subsection . . Moreover, the constructions of Lemma . and . are clearly mutually inverse. .

Free FFG-Elgot Algebras
We will now prove that for a free object Y of C the free ffg-Elgot algebra on Y is given by the locally ffg fixed point ϕ(F (−) + Y ). We begin with a consequence of Theorem . . For the forgetful functor of ffg-Elgot algebras Proposition . . For every free object Y of C there is an isomorphism I of categories making the following triangle commutative: Proof. Using Theorem . , we just need to verify for every pair of ffg-Elgot algebras (A, [a, h], ‡) and (A , [a , h ], ‡ ) that a morphism p : A → A is solutionpreserving for F (−) + Y iff it is solution-preserving for F and satisfies h = p · h. using ( . ), that is, p · e † = (p • e) † .
(⇐) If p is solution-preserving for F and h = p · h, then for every ffg-equation e : X → F X + Y + A we know that p · e † h = (p • e h ) † (recalling e h from Remark . ( )). In order to derive p · e ‡ = (p • e) ‡ , it remains to verify that p • e h = (p • e) h , which follows from the following commutative diagram: Theorem . . For every free object Y of C , the algebra (ΦY, t Y ) with the solution operation † is a free ffg-Elgot agebra for F on Y .
Proof. We prove that η Y : Y → ΦY in Construction . is the universal morphism. ΦY is an ffg-Elgot algebra since, together with η Y , it corresponds to the initial ffg-Elgot algebra ϕ(F (−) + Y ) under the isomorphism of Proposition . . This follows from Theorem . applied to F (−) + Y . To verify its universal property, let (A, a, †) be an ffg-Elgot algebra for F and h : Y → A a morphism. Proposition . gives an ffg-Elgot algebra (A, [a, h], ⊕) for F (−) + Y with e † = e ⊕ for all ffg-equations e : X → F X + A (cf. Remark . ). Furthermore, Proposition . states that a morphism p : ΦY → A in C is solution-preserving w.r.t. F (−) + Y if and only if it is solution-preserving w.r.t. F and satisfies p · η Y = h. Therefore, the universal property of η Y : Y → ΦY w.r.t. F follows from the initiality of ΦY w.r.t. F (−) + Y . .

Monadicity of FFG-Elgot Algebras
We will now prove that the forgetful functor U F : ffg-Elgot F → C is monadic. This means that all ffg-Elgot algebras form an algebraic category over the given variety C . To this end we must first establish that its forgetful functor has a left-adjoint, which assigns to every object Y of C a free ffg-Elgot algebra on Y . So far we have seen in Theorem . that on every free object Y we have a free ffg-Elgot algebra on Y . To extend this to arbitrary objects of C we will make use of the following result.
be a colimit cocone of U F · D in C . Since F preserves sifted colimits, the forgetful functor from Alg F to C creates them, i.e. there exists a unique F -algebra structure a : F A → A making every i d an F -algebra homomorphism: Solution. e † is a solution of e: ] y y Weak Functoriality. Suppose that we are given a coalgebra homomorphism together with a morphism h : Z → A, where X, X and Z are ffg objects. Factorize h as in the triangle below: for some d ∈ D. Then the desired equality is established as follows: Compositionality. Given ffg-equations e : X → F X + Y and f : Y → F Y + A, factorize f as follows: Then we obtain This completes the proof that (A, a, †) is an ffg-Elgot algebra. Then we obtain This completes the proof.
Proof. ( ) U F has a left adjoint. Indeed, for every ffg object Y we have a free ffg-Elgot algebra ΦY by Theorem . , which defines the corresponding functor We can extend it to a left adjoint of U F as follows. Given an object Y of C , express it as a sifted colimit y i : Y i → Y (i ∈ I) of ffg objects (see Section . ). The image of that sifted diagram under Φ has a colimit colim i∈I ΦY i in the category ffg-Elgot F by Proposition . . It follows immediately that this colimit is a free ffg-Elgot algebra on Y .
Since F is a finitary functor, the forgetful functor from Alg F to C is monadic, see [ ]. Thus, by Beck's Theorem, there is a unique structure γ : F C → C such that c is an F -algebra homomorphism from (B, b) to (C, γ); moreover, c is a coequalizer of f and g in Alg F . We need to show that there is a unique solution operator * for the algebra (C, γ) such that (C, γ, * ) is an ffg-Elgot algebra and c is solution-preserving, and that c is then a coequalizer of f and g in ffg-Elgot F . Given an ffg-equation e : X → F X + C, we define Then c is solution-preserving: We prove that * satisfies the axioms of an ffg-Elgot algebra, and that it is the unique ffg-Elgot algebra structure on (C, γ) for which c is solution-preserving.
(a) e * is a solution of e: All inner parts of this diagram commute; for the left-hand component of the right-hand part, use that c is solution-preserving and thus a homomorphism of F -algebras by Lemma . .
(b) Weak Functoriality. Suppose that we have a coalgebra homomorphism and a morphism h : Z → C where X, Y and Z are ffg objects. Then We show the uniqueness of * . Suppose that + is another solution operation for (C, γ) such that c is solution-preserving. Then We finally show that c is a coequalizer of f and g. Let m : (B, b, ‡) → (D, d, +) be a solution-preserving morphism with m · f = m · g. Since C is an (absolute) coequalizer in C , there exists a unique morphism h : C → D with h · c = m. We only need to show that it is solution-preserving. Indeed, given an ffg-equation e : X → F X + C, we compute: Proof. Indeed, we have a commutative triangle of forgetful functors, where U F and V F are monadic. By Proposition . we know that ffg-Elgot F has reflexive coequalizers. Thus by [ , Corollary . . and Exercise . . ], W F is monadic, too.

Conclusions and Further Work
For a functor F on a variety C preserving sifted colimits, the concept of an Elgot algebra [ ] has a natural weakening obtained by working with iterative equations having ffg objects of variables. We call such algebras ffg-Elgot algebras. We have proved that the locally ffg fixed point ϕF , constructed by taking the colimit of all F -coalgebras with an ffg carrier, is the initial ffg-Elgot algebra for F . Furthermore, all free ffg-Elgot algebras exist, and the colimit of all ffg-coalgebras for F (−) + Y yields a free ffg-Elgot algebra on Y , whenever Y is a free object of C on some (possibly infinite) set. Finally, we have proved that the forgetful functor from the category of ffg-Elgot algebras to C is monadic.
An open problem is giving a coalgebraic construction of free ffg-Elgot algebras over arbitrary objects Y , similarly to Construction . , which only works for free object Y , cf. Theorem . . In addition, the study of the properties of the ensuing free ffg-Elgot algebra monad is also left for the future. The monad of ordinary free Elgot algebras (cf. Section ) was proved [ ] to be the free Elgot monad on the given endofunctor F . It would be interesting to see whether the above monad of free ffg-Elgot algebras is characterized by a similar universal property.
Finally, in the current setting we have the following forgetful functors: Each of those functors has a left-adjoint and is in fact monadic, and we have shown that the composite of the first two is monadic, too. We leave the question whether the composite of all three functors is monadic for further work.