Proper Semirings and Proper Convex Functors

Esik and Maletti introduced the notion of a proper semiring and proved that some important (classes of) semirings -- Noetherian semirings, natural numbers -- are proper. Properness matters as the equivalence problem for weighted automata over a semiring which is proper and finitely and effectively presented is decidable. Milius generalised the notion of properness from a semiring to a functor. As a consequence, a semiring is proper if and only if its associated"cubic functor"is proper. Moreover, properness of a functor renders soundness and completeness proofs for axiomatizations of equivalent behaviour. In this paper we provide a method for proving properness of functors, and instantiate it to cover both the known cases and several novel ones: (1) properness of the semirings of positive rationals and positive reals, via properness of the corresponding cubic functors; and (2) properness of two functors on (positive) convex algebras. The latter functors are important for axiomatizing trace equivalence of probabilistic transition systems. Our proofs rely on results that stretch all the way back to Hilbert and Minkowski.


Introduction
In this paper we deal with algebraic categories and deterministic weighted automata functors on them. Such categories are the target of generalized determinization [10,22,23] and enable coalgebraic modelling beyond sets. For example, non-deterministic automata, weighted, or probabilistic ones are coalgebraically modelled over the categories of join-semilattices, semimodules for a semiring, and convex sets, respectively. Moreover, expressions for axiomatizing behavior semantics often live in algebraic categories.
In order to prove completeness of such axiomatizations, the common approach [4,21,23] is to prove finality of a certain object in a category of coalgebras over an algebraic category. Proofs are significantly simplified if it suffices to verify finality only w.r.t. coalgebras carried by free finitely generated algebras, as those are the coalgebras that result from generalized determinization.
In recent work, Milius [16] proposed the notion of a proper functor on an algebraic category that provides a sufficient condition for this purpose. This notion is an extension of the notion of a proper semiring introduced by Esik and Maletti [8]: A semiring is proper if and only if its "cubic" functor is proper. A cubic functor is a functor S × (−) A where A is a finite alphabet and S is a free algebra with a single generator in the algebraic category. Cubic functors model deterministic weighted automata which are models of determinizations of non-deterministic and probabilistic transition systems.
Properness is the property that for any two states that are behaviourally equivalent in coalgebras with free finitely generated carriers, there is a zig-zag of homomorphisms (called a chain of simulations in the original works on weighted automata and proper semirings) that identifies the two states and whose nodes are all carried by free finitely generated algebras.
Even though the notion of properness is relatively new for a semiring and very new for a functor, results on properness of semirings can be found in more distant literature as well. Here is a brief history, to the best of our knowledge: -The Boolean semiring was proven to be proper in [3].
-Finite commutative ordered semirings were proven to be proper in [7,Theorem 5.1]. Interestingly, the proof provides a zig-zag with at most seven intermediate nodes. -Any euclidean domain and any skew field were proven proper in [1,Theorem 3]. In each case the zig-zag has two intermediate nodes.
-The semiring of natural numbers N, the Boolean semiring B, the ring of integers Z and any skew field were proven proper in [2, Theorem 1]. All zigzags were spans, i.e., had a single intermediate node with outgoing arrows. -Noetherian semirings were proven proper in [8,Theorem 4.2], commutative rings also in [8,Corollary 4.4], and finite semirings as well in [8,Corollary 4.5], all with a zig-zag being a span. Moreover, the tropical semiring is not proper, as proven in [8,Theorem 5.4].
Having properness of a semiring, together with the property of the semiring being finitely and effectively presentable, yields decidability of the equivalence problem (decidability of trace equivalence) for weighted automata.
In this paper, motivated by the wish to prove properness of a certain functor F on convex algebras used for axiomatizing trace semantics of probabilistic systems in [23], as well as by the open questions stated in [16,Example 3.19], we provide a framework for proving properness. We instantiate this framework on known cases like Noetherian semirings and N (with a zig-zag that is a span), and further prove new results of properness: -The semirings Q + and R + of non-negative rationals and reals, respectively, are proper. The shape of the zig-zag is a span as well. -The functor [0, 1] × (−) A on PCA is proper, again the zig-zag being a span.
-The functor F on PCA is proper. This proof is the most involved, and interestingly, provides the only case where the zig-zag is not a span: it contains three intermediate nodes of which the middle one forms a span.
Our framework requires a proof of so-called extension and reduction lemmas in each case. While the extension lemma is a generic result that covers all cubic functors of interest, the reduction lemma is in all cases a nontrivial property intrinsic to the algebras under consideration. For the semiring of natural numbers it is a consequence of a result that we trace back to Hilbert; for the case of convex algebra [0, 1] the result is due to Minkowski. In the case of F , we use Kakutani's set-valued fixpoint theorem.
It is an interesting question for future work whether these new properness results may lead to new complete axiomatizations of expressions for certain weighted automata.
The organization of the rest of the paper is as follows. In Sect. 2 we give some basic definitions and introduce the semirings, the categories, and the functors of interest. Section 3 provides the general framework as well as proofs of properness of the cubic functors. Sections 4, 5 and 6 lead us to properness of F on PCA. For space reasons, we present the ideas of proofs and constructions in the main paper and defer all detailed proofs to the arXiv-version [24].

Proper Functors
We start with a brief introduction of the basic notions from algebra and coalgebra needed in the rest of the paper, as well as the important definition of proper functors [16]. We refer the interested reader to [9,11,20] for more details. We assume basic knowledge of category theory, see e.g. [14] or [24,Appendix A].
Let C be a category and F a C-endofunctor. The category Coalg(F ) of Fcoalgebras is the category having as objects pairs (X, c) where X is an object of C and c is a C-morphism from X to F X, and as morphisms f : (X, c) → (Y, d) those C-morphisms from X to Y that make the diagram on the right commute.
All base categories C in this paper will be algebraic categories, i.e., categories Set T of Eilenberg-Moore algebras of a finitary monad 1 in Set. Hence, all base categories are concrete with forgetful functor that is identity on morphisms.
In such categories behavioural equivalence [13,25,26] can be defined as follows. Let (X, c) and (Y, d) be F -coalgebras and let x ∈ X and y ∈ Y . Then x and y are behaviourally equivalent, and we write x ∼ y, if there exists an Fcoalgebra (Z, e) and Coalg(F )-morphisms f : (X, c) → (Z, e), g : (Y, d) → (Z, e), with f (x) = g(y).
The notions of monads and algebraic categories are central to this paper. We recall them in [24, Appendix A] to make the paper better accessible to all readers.
If there exists a final coalgebra in Coalg(F ), and all functors considered in this paper will have this property, then two elements are behaviourally equivalent if and only if they have the same image in the final coalgebra. If we have a zig-zag diagram in Coalg(F ) w w n n n n f3 9 9 P P P P · · · f4 y y s s s s f2n−1 which relates x with y in the sense that there exist elements z 2k ∈ Z 2k , k = 1, . . . , n − 1, with (setting z 0 = x and z 2n = y) , and whose nodes (Z j , e j ) all have free and finitely generated carrier.

Remark 2.2.
In the definition of properness the condition that intermediate nodes have free and finitely generated carrier is necessary for nodes with incoming arrows (the nodes Z 2k−1 in (1)). For the intermediate nodes with outgoing arrows (Z 2k in (1)), it is enough to require that their carrier is finitely generated. This follows since every F -coalgebra with finitely generated carrier is the image under an F -coalgebra morphism of an F -coalgebra with free and finitely generated carrier.
Moreover, note that zig-zags which start (or end) with incoming arrows instead of outgoing ones, can also be allowed since a zig-zag of this form can be turned into one of the form (1) by appending identity maps.

Some Concrete Monads and Functors
We deal with the following base categories.
-The category S-SMOD of semimodules over a semiring S induced by the monad T S of finitely supported maps into S, see, e.g., [15,Example 4.2.5]. -The category PCA of positively convex algebras induced by the monad of finitely supported subprobability distributions, see, e.g., [5,6] and [17].
For n ∈ N, the free algebra with n generators in S-SMOD is the direct product S n , and in PCA it is the n-simplex Δ n = {(ξ 1 , . . . , ξ n ) | ξ j ≥ 0, n j=1 ξ j ≤ 1}. Concerning semimodule-categories, we mainly deal with the semirings N, Q + , and R + , and their ring completions Z, Q, and R. For these semirings the categories of S-semimodules are -CMON of commutative monoids for N, -AB of abelian groups for Z, -CONE of convex cones for R + , -Q-VEC and R-VEC of vector spaces over the field of rational and real numbers, respectively, for Q and R.
We consider the following functors, where A is a fixed finite alphabet. Recall that we use the term cubic functor for the functor We chose the name since T 1 × (−) A assigns to objects X a full direct product, i.e., a full cube.
-The cubic functor F S on S-SMOD, i.e., the functor acting as The underlying Set functors of cubic functors are also sometimes called deterministic-automata functors, see e.g. [10], as their coalgebras are deterministic weighted automata with output in the semiring. -The cubic functor F [0,1] on PCA, i.e., the functor -A subcubic convex functor F on PCA whose action will be introduced in Definition 4.1. 2 The name originates from the fact that F X is a certain convex subset of Cubic functors are liftings of Set-endofunctors, in particular, they preserve surjective algebra homomorphisms. It is easy to see that also the functor F preserves surjectivity, cf. [24,Lemma D.1]. This property is needed to apply the work of Milius, cf. [16, Assumptions 3.1].

Remark 2.3.
We can now formulate precisely the connection between proper semirings and proper functors mentioned after Definition 2.1. A semiring S is proper in the sense of [8], if and only if for every finite input alphabet A the cubic functor F S on S-SMOD is proper.
We shall interchangeably think of direct products as sets of functions or as sets of tuples. Taking the viewpoint of tuples, the definition of F S f reads as A coalgebra structure c : X → F S X writes as and we use c o : X → S and c a : X → X as generic notation for the components of the map c. More generally, we define c w : X → X for any word w ∈ A * inductively as c ε = id X and The map from a coalgebra (X, c) into the final F S -coalgebra, the trace map, is then given as tr Behavioural equivalence for cubic functors is the kernel of the trace map.

Properness of Cubic Functors
Our proofs of properness in this section and in Sect. 6 below start from the following idea. Let S be a semiring, and assume we are given two F S -coalgebras which have free finitely generated carrier, say (S n1 , c 1 ) and (S n2 , c 2 ). Moreover, assume x 1 ∈ S n1 and x 2 ∈ S n2 are two elements having the same trace. For Denoting by π j : S n1 × S n2 → S nj the canonical projections, both sides of the following diagram separately commute.
However, in general the maps d 1 and d 2 do not coincide. The next lemma contains a simple observation: there exists a subsemimodule Z of S n1 × S n2 , such that the restrictions of d 1 and d 2 to Z coincide and turn Z into an F S -coalgebra.
The significance of Lemma 3.1 in the present context is that it leads to the diagram (we denote In other words, it leads to the zig-zag in Coalg(F S ) This zig-zag relates x 1 with x 2 since (x 1 , x 2 ) ∈ Z. If it can be shown that Z is always finitely generated, it will follow that F S is proper. Let S be a Noetherian semiring, i.e., such that every S-subsemimodule of some finitely generated S-semimodule is itself finitely generated. Then Z is, as an S-subsemimodule of S n1 × S n2 , finitely generated. We reobtain [8,Theorem 4.2]. In fact, for any two coalgebras with free finitely generated carrier and any two elements having the same trace, a zig-zag with free and finitely generated nodes relating those elements can be found, which is a span (has a single intermediate node with outgoing arrows).
The proof proceeds via relating to the Noetherian case. It always follows the same scheme, which we now outline. Observe that the ring completion of each of N, Q + , R + , is Noetherian (for the last two it actually is a field), and that [0, 1] is the positive part of the unit ball in R.
Step 1. The extension lemma: We use an extension of scalars process to pass from the given category C to an associated category E-MOD with a Noetherian ring E. This is a general categorical argument.
To unify notation, we agree that S may also take the value [0, 1], and that T [0,1] is the monad of finitely supported subprobability distributions giving rise to the category PCA.
For the formulation of the extension lemma, recall that the starting category C is the Eilenberg-Moore category of the monad T S and the target category E-MOD is the Eilenberg-Moore category of T E . We write η S and μ S for the unit and multiplication of T S and analogously for T E . We have T S ≤ T E , via the inclusion monad morphism ι : Recall that a monad morphism ι : T S → T E defines a functor M ι : Set T E → Set T S which maps a T Ealgebra (X, α X ) to (X, ι X • α X ) and is identity on morphisms. Obviously, M ι commutes with the forgetful functors U S : Set T S → Set and U E :

if and only if the following diagram commutes (in Set)
Now we can formulate the extension lemma.

Proposition 3.5 (Extension Lemma). For every
where the horizontal arrows (ι B and ι 1 × ι A B ) are T S ≤ T E -homomorphisms, and moreover they both amount to inclusion.
Step 2. The basic diagram: Let n 1 , n 2 ∈ N, let B j be the n j -element set consisting of the canonical basis vectors of E nj , and set X j = T S B j . Assume we are given F S -coalgebras (X 1 , c 1 ) and (X 2 , c 2 ), and elements x j ∈ X j with tr c1 x 1 = tr c2 x 2 .
The extension lemma provides F E -coalgebras (E nj ,c j ) withc j | Xj = c j . Clearly, trc 1 x 1 = trc 2 x 2 . Using the zig-zag diagram (2) in Coalg(F E ) and appending inclusion maps, we obtain what we call the basic diagram. In this diagram all solid arrows are arrows in E-MOD, and all dotted arrows are arrows in C. The horizontal dotted arrows denote the inclusion maps, and π j are the restrictions to Z of the canonical projections.
for j = 1, 2. Now we observe the following properties of cubic functors.
Using this, yields This shows that Z ∩ (X 1 × X 2 ) becomes an F S -coalgebra with the restriction d| Z∩(X1×X2) . Again referring to the basic diagram, we have the following zigzag in Coalg(F S ) (to shorten notation, denote the restrictions of d, π 1 , π 2 to Z ∩ (X 1 × X 2 ) again as d, π 1 , π 2 ): This zig-zag relates Step 3. The reduction lemma: In view of the zig-zag (3), the proof of Theorem 3.3 can be completed by showing that Z∩(X 1 ×X 2 ) is finitely generated as an algebra in C. Since Z is a submodule of the finitely generated module E n1 × E n2 over the Noetherian ring E, it is finitely generated as an E-module. The task thus is to show that being finitely generated is preserved when reducing scalars. This is done by what we call the reduction lemma. Contrasting the extension lemma, the reduction lemma is not a general categorical fact, and requires specific proof in each situation.

Proposition 3.7 (Reduction Lemma).
Let n 1 , n 2 ∈ N, let B j be the set consisting of the n j canonical basis vectors of E nj , and set X j = T S B j . Moreover, let Z be an E-submodule of E n1 × E n2 . Then Z ∩ (X 1 × X 2 ) is finitely generated as an algebra in C.

A Subcubic Convex Functor
Recall the following definition from [23, p. 309]. 1. Let X be a PCA. Then For every X we have F X ⊆ F [0,1] X, and for every f : For this reason, we think of F as a subcubic functor.
The definition of F can be simplified.

Lemma 4.2. Let X be a PCA, then
From this representation it is obvious that F is monotone in the sense that Note that F does not preserve direct products. For a PCA X whose carrier is a compact subset of a euclidean space, F X can be described with help of a geometric notion, namely using the Minkowksi functional of X. Before we can state this fact, we have to make a brief digression to explain this notion and its properties. Minkowski functionals, sometimes also called gauge, are a central and exhaustively studied notion in convex geometry, see, e.g., [19, p. 34] or [18, p. 28].
We list some basic properties whose proof can be found in the mentioned textbooks.
The set X can almost be recovered from μ X .
6. If X is closed, equality holds in the second inclusion of 5. 7. Let X, Y be closed. Then X ⊆ Y if and only if μ X ≥ μ Y . Example 4.4. As two simple examples, consider the n-simplex Δ n ⊆ R n and a convex cone C ⊆ R n . Then (here ≥ denotes the product order on R n ) Another illustrative example is given by general pyramids in a euclidean space. This example will play an important role later on.
Example 4.5. For u ∈ R n consider the set where (·, ·) denotes the euclidean scalar product on R n . The set X is intersection of the cone R n + with the half-space given by the inequality (x, u) ≤ 1, hence it is convex and contains 0. Thus X is a PCA.
Let us first assume that u is strictly positive, i.e., u ≥ 0 and no component of u equals zero. Then X is a pyramid (in 2-dimensional space, a triangle).
The Minkowski functional of the pyramid X associated with u is Write u = n j=1 α j e j , where e j is the j-th canonical basis vector, and set y j = 1 αj e j . Clearly, {y 1 , . . . , y n } is linearly independent. Each vector x = n j=1 ξ j e j can be written as x = n j=1 (ξ j α j )y j , and this is a subconvex combination if and only if ξ j ≥ 0 and n j=1 ξ j α j ≤ 1, i.e., if and only if x ∈ X. Thus X is generated by {y 1 , . . . , y n } as a PCA.
The linear map given by the diagonal matrix made up of the α j 's induces a bijection of X onto Δ n , and maps the y j 's to the corner points of Δ n . Hence, X is free with basis {y 1 , . . . , y n }.
If u is not strictly positive, the situation changes drastically. Then X is not finitely generated as a PCA, because it is unbounded whereas the subconvex hull of a finite set is certainly bounded.
Now we return to the functor F . Lemma 4.6. Let X ⊆ R n be a PCA, and assume that X is compact. Then In the following we use the elementary fact that every convex map has a linear extension. Rescaling in this representation of F X leads to a characterisation of Fcoalgebra maps. We give a slightly more general statement.
Theorem 5.1. Let (X, c) be an F -coalgebra whose carrier X is a compact subset of a euclidean space R n with Δ n ⊆ X ⊆ R n + . Assume that the output map c o does not vanish on invariant coordinate hyperplanes in the sense that (e j denotes again the j-th canonical basis vector in R n ) I ⊆ {1, . . . , n}.
Then there exists an F -coalgebra (Y, d), such that X ⊆ Y ⊆ R n + , the inclusion map ι : X → Y is a Coalg( F )-morphism, and Y is the subconvex hull of n linearly independent vectors (in particular, Y is free with n generators).
The idea of the proof can be explained by geometric intuition. Say, we have an F -coalgebra (X, c) of the stated form, and letc : R n → R × (R n ) A be the linear extension of c to all of R n , cf. Lemma 4.7.
Remembering that pyramids are free and finitely generated, we will be done if we find a pyramid Y ⊇ X which is mapped into F Y byc: This task can be reformulated as follows: For each pyramid Y 1 containing X let P (Y 1 ) be the set of all pyramids Y 2 containing X, such thatc( Existence of Y can be established by applying a fixed point principle for setvalued maps. The result sufficient for our present level of generality is Kakutani's generalisation [12,Corollary] of Brouwers fixed point theorem.

Properness of F
In this section we give the second main result of the paper. In fact, for each two given coalgebras with free finitely generated carrier and each two elements having the same trace, a zig-zag with free and finitely generated nodes relating those elements can be found, which has three intermediate nodes with the middle one forming a span.
We try to follow the proof scheme familiar from the cubic case. Assume we are given two F -coalgebras with free finitely generated carrier, say (Δ n1 , c 1 ) and (Δ n2 , c 2 ), and elements x 1 ∈ Δ n1 and x 2 ∈ Δ n2 having the same trace. Since F Δ nj ⊆ R×(R nj ) A we can apply Lemma 4.7 and obtain F R -coalgebras (R nj ,c j ) withc j | Δ n j = c j . This leads to the basic diagram: At this point the line of argument known from the cubic case breaks: it is not granted that Z ∩ (Δ n1 × Δ n2 ) becomes an F -coalgebra with the restriction of d.
The substitute for Z ∩ (Δ n1 × Δ n2 ) suitable for proceeding one step further is given by the following lemma, where we tacitly identify R n1 × R n2 with R n1+n2 .
This shows that Z ∩ 2Δ n1+n2 becomes an F -coalgebra with the restriction of d. Still, we cannot return to the usual line of argument: it is not granted that π j (Z ∩ 2Δ n1+n2 ) ⊆ Δ nj . This forces us to introduce additional nodes to produce a zig-zag in Coalg( F ). These additional nodes are given by the following lemma. There co(−) denotes the convex hull.
This shows that Y j becomes an F -coalgebra with the restriction ofc j . We are led to a zig-zag in Coalg( F ): This zig-zag relates x 1 and x 2 since (x 1 , x 2 ) ∈ Z ∩ 2Δ n1+n2 . Using Minkowski's Theorem and the argument from [24,Lemma B.8] shows that the middle node has finitely generated carrier. The two nodes with incoming arrows are, as convex hulls of two finitely generated PCAs, of course also finitely generated. But in general they will not be free (and this is essential, remember Remark 2.2). Now Theorem 5.1 comes into play. Lemma 6.4. Assume that each of (Δ n1 , c 1 ) and (Δ n2 , c 2 ) satisfies the following condition: I ⊆ {1, . . . , n}. I = ∅, c j o (e k ) = 0, k ∈ I, c j a (e k ) ⊆ co({e i | i ∈ I} ∪ {0}), a ∈ A, k ∈ I. (6) Then there exist free finitely generated This shows that U j , under the additional assumption (6) on (Δ nj , c j ), becomes an F -coalgebra with the restriction ofc j . Thus we have a zig-zag in Coalg( F ) relating x 1 and x 2 whose nodes with incoming arrows are free and finitely generated, and whose node with outgoing arrows is finitely generated: w w n n n n n n n n n n n 9 9 P P P P P P P P P P P (Y 2 ,c 2 ) Removing the additional assumption on (Δ nj , c j ) is an easy exercise. Then (X, g) is an F -coalgebra, and f is an F -coalgebra morphism of (Δ n , c) onto (X, g). Corollary 6.6. Let (Δ n , c) be an F -coalgebra. Then there exists k ≤ n, an Fcoalgebra (Δ k , g), such that (Δ k , g) satisfies the assumption in Lemma 6.4 and such that there exists an F -coalgebra map f of (Δ n , c) onto (Δ k , g).
The proof of Theorem 6.1 is now finished by putting together what we showed so far. Starting with F -coalgebras (Δ nj , c j ) without any additional assumptions, and elements x j ∈ Δ nj having the same trace, we first reduce by means of x x p p p p p p p p p p p G G (U 1 ,g 1 ) ( U 2 ,g 2 ) (Δ k2 , g 2 ) o o and completes the proof of properness of F .