Coalgebra Encoding for Efficient Minimization
CCoalgebra Encoding for Efficient Minimization
Hans-Peter Deifel ! (cid:18) Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany
Stefan Milius ! (cid:18) Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany
Thorsten Wißmann ! (cid:18) Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany
Abstract
Recently, we have developed an efficient generic partition refinement algorithm, which computesbehavioural equivalence on a state-based system given as an encoded coalgebra, and implementedit in the tool CoPaR. Here we extend this to a fully fledged minimization algorithm and tool byintegrating two new aspects: (1) the computation of the transition structure on the minimized stateset, and (2) the computation of the reachable part of the given system. In our generic coalgebraicsetting these two aspects turn out to be surprisingly non-trivial requiring us to extend the previoustheory. In particular, we identify a sufficient condition on encodings of coalgebras, and we showhow to augment the existing interface, which encapsulates computations that are specific for thecoalgebraic type functor, to make the above extensions possible. Both extensions have linear runtime. Surprisingly, all information necessary for computing the reachable part of a coalgebra isalready present in the data structures that we previously developed only for the computation ofbehavioural equivalence.
Theory of computation → Models of computation; Theory ofcomputation → Logic and verification
Keywords and phrases
Coalgebra, Partition refinement, Transition systems, Minimization
The task of minimizing a given state-based system has arisen in different contexts throughoutcomputer science and for various types of system, such as standard deterministic automata,tree automata, transition systems, Markov chains, probabilistic or other weighted systems.In addition to the obvious goal of reducing the mere memory consumption of the statespace, minimization often appears as a subtask of a more complex problem. For instance,probabilistic model checkers benefit from minimizing the input system before performingthe actual model checking algorithm, as e.g. demonstrated in benchmarking by Katoen etal. [30].Another example is the graph isomorphism problem. A considerable portion of inputinstances can already be decided correctly by performing a step called colour refinement [9],which amounts to the minimization of a weighted transition system wrt. weighted bisimilarity.Minimization algorithms typically perform two steps: first a reachable subset of the stateset of the given system is computed by a standard graph search, and second, in the resultingreachable system all behaviourally equivalent states are identified. For the latter step oneuses partition refinement or lumping algorithms that start by identifying all states and theniteratively refine the resulting partition of the state set by looking one step into the transitionstructure of the given system. There has been a lot of research on efficient partition refinementprocedures, and the most efficient algorithms for various concrete system types have a runtime in O ( m log n ), for a system with n states and m transitions, e.g. Hopcroft’s algorithm fordeterministic automata [28] and the algorithm by Paige and Tarjan [34] for transition systems,even if the number of action labels is not fixed [41]. Partition refinement of probabilistic Coalgebra Encoding for Efficient Minimization systems also underwent a dynamic development [18, 52], and the best algorithms for Markovchain lumping now match the complexity of the relational Paige-Tarjan algorithm [21, 29, 42].For the minimization of more complex system types such as Segala systems [6,24] (combiningprobabilities and non-determinism) or weighted tree automata [27], partition refinementalgorithms with a similar quasilinear run time have been designed over the years.Recently, we have developed a generic partition refinement algorithm [48] and implementedit in the tool CoPaR [19, 51]. This generic algorithm computes the partition of the state setmodulo behavioural equivalence for a wide variety of stated-based system types, includingall the above mentioned ones. This genericity in the system type is achieved by workingwith coalgebras for a functor which encapsulates the specific types of transitions of the inputsystem. More precisely, the algorithm takes as input a syntactic description of a set functorand an encoding of a coalgebra for that functor and then computes the simple quotient,i.e. the quotient of the state set modulo behavioural equivalence. The algorithm workscorrectly for every zippable set functor (Definition 2.7). It matches, and in some cases evenimproves on, the run-time complexity of the best known partition refinement algorithms formany concrete system types [51, Table 1].The reasons why this run-time complexity can be stated and proven generically are: first,the encoding allows us to talk about the number of states and, in particular, the number oftransitions of an input coalgebra. But more importantly, every iterative step of partitionrefinement requires only very few system-type specific computations. These computations areencapsulated in the refinement interface [48], which is then used by the generic algorithm.An important feature of our coalgebraic algorithm is its modularity: in the tool the usercan freely combine functors with already implemented refinement interfaces by products,coproducts and functor composition. A refinement interface for the combined functor isthen automatically derived. In this way more structured systems types such as (simple andgeneral) Segala systems and weighted tree automata can be handled.In the present paper, we extend our algorithm to a fully fledged minimizer. In previouswork [3] it has been shown that for set functors preserving intersections, every coalgebraequipped with a point, modelling initial states, has a minimization called the well-pointedmodification . Well-pointedness means that the coalgebra does not have any proper quotients(i.e. it is simple ) nor proper pointed subcoalgebras (i.e. it is reachable ), in analogy to minimaldeterministic automata being reachable and observable (see e.g. [5, p. 256]). The well-pointedmodification is obtained by taking the reachable part of the simple quotient of a given pointedcoalgebra [3] (and the order of these operations can be reversed for functors preserving inverseimages [50, Sec. 7.2]). Our previous work on coalgebraic minimization algorithms has focusedon computing the simple quotient. Here we extend our algorithm by two missing aspectsof minimization and provide their correctness proofs: the computation of (1) the transitionstructure of the minimized system, and (2) the reachable states of an input coalgebra.One may wonder why (1) is a step worth mentioning at all because for many concretesystem types this is trivial, e.g. for deterministic automata where the transitions betweenequivalence classes are simply defined by choosing representatives and copying their transitionsfrom the input automaton. However, for other system types this step is not that obvious,e.g. for weighted automata where transition weights need to be summed up and transitionsmight actually disappear in the minimized system because weights cancel out. We foundthat in the generic coalgebraic setting enabling the computation of the (encoding of) thetransition structure of the minimized coalgebra is surprisingly non-trivial, requiring us toextend the theory behind our algorithm.In order to be able to perform this computation generically we work with uniform .-P. Deifel, S. Milius, T. Wißmann 3 encodings , which are encodings that satisfy a coherence property (Definition 3.8). We provethat all encodings used in our previous work are uniform, and that the constructions enablingmodularity of our algorithm preserve uniformity (Prop. 3.10). We also prove that uniformencodings are subnatural transformations, but the converse does not hold in general. Inaddition, we introduce the minimization interface containing the new function merge (to beimplemented together with the refinement interface for each new system type) which takescare of transitions that change as a result of minimization. We provide merge operations forall functors with explicitly implemented refinement interfaces (Example 4.4), and show thatfor combined system types minimization interfaces can be automatically derived (Prop. 4.11);similarly as for refinement interfaces. Our main result is that the (encoded) transitionstructure of the minimized coalgebra can be correctly computed in linear time (Thm. 4.9).Concerning extension (2), the computation of reachable states, it is well-known thatevery pointed coalgebra has a reachable part (being the smallest subcoalgebra) [3, 49].Moreover, for a set functor preserving intersections it coincides with the reachable part of thecanonical graph of the coalgebra [3, Lem. 3.16]. Recently, it was shown that the reachablepart of a pointed coalgebra can be constructed iteratively [49, Thm. 5.20] and that thiscorresponds to performing a standard breadth-first search on the canonical graph. Themissing ingredient to turn our previous partition refinement algorithm into a minimizer is torelate the canonical graph with the encoding of the input coalgebra. We prove that for afunctor with a subnatural encoding, the encoding (considered as a graph) of every coalgebrais contained in its canonical graph (Proposition 5.5) and for zippable functors the reverseinclusion also holds (Theorem 5.6). Surprisingly, these results require no extension of therefinement interface; all information necessary for a reachability analysis is already present,even though our original refinement interface was geared only towards partition refinement.Putting everything together, we obtain an algorithm that computes the well-pointedmodification of a given pointed coalgebra. Both additions can be implemented with linearrun time in the size of the input coalgebra and hence do not add to the run-time complexityof the previous partition refinement algorithm. We have provided such an implementationwith the new version of our tool CoPaR.
Reachability in Coalgebraic Minimization
There are several works on coalgebraic minimiz-ation, ranging from abstract constructions to concrete and implemented algorithms [1, 32, 33,47, 48], that compute the simple quotient [25] of a given coalgebra. These are not concernedwith reachability since coalgebras are not equipped with initial states in general.In Brozozowski’s automata minimization algorithm [16], reachability is one of the mainingredients. This is due to the duality of reachability and observability described by Arbiband Manes [4], and this duality is used twice in the algorithm. Consequently, reachabilityalso appears as a subtask in the categorical generalizations of Brozozowski’s algorithm [10,14, 15, 33, 36]. These generalizations concern automata processing input words and so do notcover minimization of (weighted) tree automata. Segala systems are not treated either. Dueto the dualization, Brzozowki’s classical algorithm for deterministic automata has doublyexponential time complexity in the worst case (although it performs well on certain types ofnon-deterministic automata, compared to determinization followed by minimization [39]).
Our algorithmic framework [48] is defined on the level of coalgebras for set functors, followingthe paradigm of universal coalgebra [37]. Coalgebras can model a wide variety of systems.
Coalgebra Encoding for Efficient Minimization
In the following we recall standard notation for sets and functions as well as basic notionsfrom the theory of coalgebras. We fix a singleton set 1 = {∗} ; for each set X , we have aunique map ! : X →
1. We use the notation ⟨· · ·⟩ , resp. [ · · · ], for the unique map inducedby the universal property of a product, resp. coproduct. We also fix two sets 2 = { , } and 3 = { , , } and use the former as a set of boolean values with 0 and 1 denoting false and true , respectively. For each subset S of a set X , the characteristic function χ S : X → S and 0 to elements of X \ S . To simplify notation, we define thethree-valued characteristic function χ CS : X → S ⊆ C ⊆ X . It sends elements of S to 2, elements of C \ S to 1 and elements of X \ C to 0. We denote by Set the category ofall sets and maps.Recall that an endofunctor F : Set → Set assigns to each set X a set F X , and to eachmap f : X → Y a map F f : F X → F Y , preserving identities and composition, that is wehave F id X = id F X and F ( g · f ) = F g · F f . We denote the composition of maps by · writteninfix, as usual. An F -coalgebra is a pair ( X, c ) that consists of a set X of states and a map c : X → F X called (transition) structure . A morphism h : ( X, c ) → ( Y, d ) of F -coalgebras isa map h : X → Y preserving the transition structure, i.e. F h · c = d · h . Two states x, y ∈ X of a coalgebra ( X, c ) are behaviourally equivalent if there exists a coalgebra morphism h with h ( x ) = h ( y ). ▶ Example 2.1.
Coalgebras and the generic notion for behavioural equivalence instantiateto a variety of well-known system types and their equivalences: The finite powerset functor P f maps a set to the set of all its finite subsets and functions f : X → Y to P f f = f [ − ] : P f X → P f Y taking direct images. Its coalgebras arefinitely branching (unlabelled) transition systems and coalgebraic behavioural equivalencecoincides with Milner and Park’s (strong) bisimilarity. Given a commutative monoid ( M, + , monoid-valued functor M ( − ) maps a set X to the set of finitely supported functions from X to M . These are the maps f : X → M ,such that f ( x ) = 0 for all except finitely many x ∈ X . Given a map h : X → Y and a finitely supported function f : X → M , M ( h ) ( f ) : M ( X ) → M ( Y ) is defined as M ( h ) ( f )( y ) = P x ∈ X,h ( x )= y f ( x ). Coalgebras for M ( − ) correspond to finitely branchingweighted transition systems with weights from M . If a coalgebra morphism h : ( X, c ) → ( Y, d ) merges states s , s , then for all transitions x m −−→ s , x m −−→ s in ( X, c ) theremust be a transition h ( x ) m + m −−−−−→ h ( s ) = h ( s ) in ( Y, d ) and similarly if more than twostates are merged. Coalgebraic behavioural equivalence captures weighted bisimilarity [31,Prop. 2].Note that the monoid may have inverses: if s = − s , then the transitions in the aboveexample cancel each other out, leading to a transition h ( x ) −→ h ( s ) with weight 0, whichin fact represents the absence of a transition. This happens for example for the monoid( R , + ,
0) of real numbers. A simple minimization algorithm for real weighted transition(i.e. R ( − ) -coalgebras) systems is given by Valmari and Franceschinis [42]. These systemssubsume Markov chains which are precisely the coalgebras for the finite probabilitydistribution functor D , a subfunctor of R ( − ) . Given a signature Σ consisting of operation symbols σ , each with a prescribed naturalnumber, its arity ar ( σ ), the polynomial functor F Σ sends each set X to the set of (shallow)terms over X , specifically to the set { σ ( x , . . . , x n ) | σ ∈ Σ , ar ( σ ) = n, ( x , . . . , x n ) ∈ X n } . The action of F on a function f : X → Y is given by F Σ f ( σ ( x , . . . , x n )) = σ ( f ( x ) , . . . , f ( x n )). A coalgebra structure c : X → F Σ X assigns to a state x ∈ X anexpression σ ( x , . . . , x n ), where σ is an output symbol and x to x n are the successorstates. Two states are behaviourally equivalent if their tree-unfoldings, obtained by .-P. Deifel, S. Milius, T. Wißmann 5 repeatedly applying the coalgebra structure c , yields the same (infinite) Σ-tree. For a fixed alphabet A , the functor given by F X = 2 × X A is a special case of a polynomialfunctor over a signature with two symbols of arity | A | . An F -coalgebra c : X → × X A is the same as a deterministic automaton without an initial state: the structure c assignsa pair ( b, t ) to each x ∈ X , where the boolean value b ∈ t : A → X assigns to each input letter from a ∈ A the successor state of x under a . Here, behavioural equivalence coincides with language equivalence in the usualautomata theoretic sense. The bag functor B sends a set X to the set of finite multisets over X and functions f : X → Y to B f : B X → B Y given by B f ( { [ x , . . . , x ] } ) = { [ f ( x ) , . . . , f ( x ) ] } , wherewe use the multiset braces { [ and ] } to differentiate from standard set notation; in particular { [ x, x ] } ̸ = { [ x ] } . Coalgebras for B are finitely branching transition systems where multipletransitions between any two states are allowed, or equivalently, weighted transitionsystems with positive integers as weights. This follows from the fact that the bag functoris (naturally isomorphic to) the monoid-valued functor for the monoid ( N , + , B -coalgebra by turning everyedge into two directed edges with weight 1. Then two states are behaviourally equivalent iffthey are identified by colour refinement , also called the 1-dimensional Weisfeiler-Lehmanalgorithm (see e.g. [9, 17, 45]). ▶ Example 2.2 (Modularity) . New system types can be constructed from existing ones byfunctor composition. For example, labelled transition systems (LTSs) are coalgebras for thefunctor
F X = P f ( A × X ), which is the composite of P f and A × − for a label alphabet A ,and precisely the bisimilar states in an F -coalgebra are behavioural equivalent. Composingfurther, Segala systems (or probabilistic LTSs [24]) are coalgebras for
F X = P f ( A × D X ),for which coalgebraic behavioural equivalence instantiates to probabilistic bisimilarity [7].Another example are weighted tree automata [27] with weights in a commutative monoid M and input signature Σ; they are coalgebras for the composed functor F X = M (Σ X ) , forwhich behavioural equivalence coincides with backwards bisimilarity [20]. Simple, Reachable, and Well-Pointed Coalgebras
Minimizing a given pointed coalgebrameans to compute its well-pointed modification. We now briefly recall the correspondingcoalgebraic concepts. For a more detailed and well-motivated discussion with examples, seee.g. [2, Sec. 9].First, a quotient coalgebra is represented by a surjective coalgebra morphism, for whichwe write q : ( X, c ) ↠ ( Y, d ), and a subcoalgebra is represented by an injective coalgebramorphism m : ( S, s ) ↣ ( X, c ).A coalgebra (
X, c ) is called simple if it does not have any proper quotient coalgebras [25].That is, every quotient q : ( X, c ) ↠ ( Y, d ) is an isomorphism. Equivalently, distinct states x, y ∈ X are never behaviourally equivalent. Every coalgebra has an (up to isomorphism)unique simple quotient (see e.g. [2, Prop. 9.1.5]). ▶ Example 2.3. 1.
A deterministic automaton regarded as a coalgebra for
F X = 2 × X A is simple iff it is observable [5, p. 256], that is, no distinct states accept the same formallanguage. A finitely branching transition system considered as a P f -coalgebra is simple, if it hasno pairs of strongly bisimilar but distinct states; in other words if two states x, y arestrongly bisimilar, then x = y . Coalgebra Encoding for Efficient Minimization A similar characterization holds for monoid-valued functors (such as the bag functor)wrt. weighted bisimilarity.A pointed coalgebra is a coalgebra (
X, c ) equipped with a point i : 1 → X , equivalently adistinguished element i ∈ X , modelling an initial state. Morphisms of pointed coalgebras arethe point-preserving coalgebra morphisms, i.e. morphisms h : ( X, c, i ) → ( Y, d, j ) satisfying h · i = j . Quotients and subcoalgebras of pointed coalgebras are defined wrt. these morphisms.A pointed coalgebra ( X, c, i ) is called reachable if it has no proper subcoalgebra, thatis, every subcoalgebra m : ( S, s, j ) ↣ ( X, c, i ) is an isomorphism. Every coalgebra has aunique reachable subcoalgebra (see e.g. [2, Prop. 9.2.6]). The notion of reachable coalgebrascorresponds well with graph theoretic reachability in concrete examples. We elaborate onthis a bit more in Section 5. ▶ Example 2.4. 1.
A deterministic automaton considered as a pointed coalgebra for
F X =2 × X A (with the point given by the initial state) is reachable if all of its states arereachable from the initial state. A pointed P f -coalgebra is a finitely branching directed graph with a root node. It isreachable precisely when every node is reachable from the root node. Similarly, for monoid-valued functors such as the bag functor, reachability is preciselygraph theoretic reachability, where a transition weight of 0 means ‘no edge’.Finally, a pointed coalgebra (
X, c, i ) is well-pointed if it is reachable and simple. Everypointed coalgebra has a well-pointed modification , which is obtained by taking the reachablepart of its simple quotient (see [2, Not. 9.3.4]). For a functor preserving inverse images, onemay reverse the two constructions: the well-pointed modification is the simple quotient ofthe reachable part of a given pointed coalgebra [50, Sec. 7.2]. This is the usual order inwhich minimization of systems is performed algorithmically. However, for a functor thatdoes not preserve inverse images, quotients of reachable coalgebras need not be reachableagain [50, Ex. 5.3.27], possibly rendering the usual order incorrect.Thus, our present paper is concerned with the minimization problem for coalgebras, thatis the problem to compute the well-pointed modification of a given pointed coalgebra interms of its encoding. ▶ Remark 2.5.
From previous results (see [48, Prop. 2.13] and [49, Thm. 4.6]) one obtainsthe following sufficient condition for reductions of reachability and simplicity. Given a familyof maps σ X : F X → GX , then every F -coalgebra ( X, c ) yields a G -coalgebra ( X, σ X · c ) andwe can reduce minimization tasks from F -coalgebras to G -coalgebras as follows: Suppose that σ : F → G is sub-cartesian , that is the naturalitysquares are pullbacks for every injective map m : X ↣ Y . Thenthe reachable part of a pointed F -coalgebra ( X, c, i ) is obtainedfrom the reachable part of the G -coalgebra ( X, σ X · c, i ). F X GXF Y GY σ X F m Gmσ Y Suppose that F is a subfunctor of G via σ : F ↣ G . Then the problem of computing thesimple quotient for F -coalgebras reduces to that for G -coalgebras: the simple quotient of( X, σ X · c ) yields that of ( X, c ).Consequently, if F is a subfunctor of G via a subcartesian σ the minimization problem for F -coalgebras reduces to that for G -coalgebras. For example, the distribution functor D is asubcartesian subfunctor of R ( − ) . (For details see the appendix.) Preliminaries on Bags
The bag functor defined in Example 2.1 plays an important role inour minimization algorithm, not only as one of many possible system types, but bags are .-P. Deifel, S. Milius, T. Wißmann 7 also used as a data structure. To this end, we use a couple of additional properties of thisfunctor. ▶ Remark 2.6. Since B can also be regarded as a monoid-valued functor for ( N , + , b = { [ x , . . . , x n ] } ∈ B X may be identified with a finitely supported function X → N , assigning to each x ∈ X its multiplicity in b . We shall often make use of thisfact and represent bags as functions. The set B X itself is a commutative monoid with bag-union as the operation and theempty bag { [] } as the identity element. In fact, this is the free commutative monoid over X .It therefore makes sense to consider the monoid-valued functor ( B X ) ( − ) for a monoid ofbags. Note that for every pair of sets A, X , the set ( B X ) ( A ) of finitely supported functionsfrom A to B X is isomorphic to B ( A × X ) as witnessed by the following isomorphism(where swap , curry and uncurry are the evident canonical bijections): group = (cid:0) B ( A × X ) B ( swap ) −−−−−→ B ( X × A ) curry −−−→ ( B A ) ( X ) (cid:1) , and ungroup = (cid:0) ( B A ) ( X ) uncurry −−−−→ B ( X × A ) B ( swap ) −−−−−→ B ( A × X ) (cid:1) . Note that since swap is self-inverse and curry , uncurry are mutually inverse, group and ungroup are mutually inverse, too. In symbols: group · ungroup = id ( B A ) ( X ) , ungroup · group = id B ( A × X ) . (1)We often need to filter a bag of tuples B ( A × X ) by a subset S ⊆ X . To this end wedefine the maps fil S : B ( A × X ) → B ( A ) for sets S ⊆ X and A by fil S ( f ) = (cid:0) a X x ∈ S f ( a, x ) (cid:1) = { [ a | ( a, x ) ∈ f, x ∈ S ] } , where the multiset comprehension is given for intuition. Zippable Functors
One crucial ingredient for the efficiency of the generic partition refine-ment algorithm [48] is that the coalgebraic type functor is zippable: ▶ Definition 2.7 [48, Def. 5.1] . A set functor F is called zippable if the following maps areinjective for every pair A, B of sets: F ( A + B ) ⟨ F ( A +!) ,F (!+ B ) ⟩ −−−−−−−−−−−−→ F ( A + 1) × F (1 + B ) . Zippability of a functor allows that partitions are refined incrementally by the algorithm [48,Prop. 5.18], which in turn is the key for allowing a low run time complexity of the imple-mentation. For additional visual explanations of zippability, see [48, Fig. 2]. We shall needthis notion in the proof of Proposition 3.7, and later proofs use this result.It was shown in op.cit. that all functors in Example 2.1 are zippable. In addition, zippablefunctors are closed under products, coproducts and subfunctors. However, they are notclosed under functor composition, e.g. P f P f is not zippable [48, Ex. 5.10]. The Trnková Hull
For purposes of universal coalgebra, we may assume without loss ofgenerality that set functors preserve injections. Indeed, every set functor preserves nonemptyinjections (being the split monomorphisms in
Set ). As shown by Trnková [40, Prop. II.4and III.5], for every set functor F there exists an essentially unique set functor ¯ F whichcoincides with F on nonempty sets and functions, and preserves finite intersections (whenceinjections). The functor ¯ F is called the Trnková hull of F . Since F and ¯ F coincide onnonempty sets and maps, the categories of coalgebras for F and ¯ F are isomorphic. Coalgebra Encoding for Efficient Minimization
In order to make abstract coalgebras tractable for computers and to have a notion of thesize of a coalgebra structure in terms of nodes and edges as for standard transition systems,our algorithmic framework encodes coalgebras using a graph-like data structure. To this end,we require functors to be equipped with an encoding as follows. ▶ Definition 3.1 [48, Def. 6.1] . An encoding of a set functor F consists of a set A of labels and a family of maps ♭ X : F X → B ( A × X ), one for every set X . An encoding of a coalgebra c : X → F X is given by ⟨ F ! , ♭ X ⟩ · c : X → F × B ( A × X ). ▶ Example 3.2.
We recall a number of encodings [48]. Our encoding for the finite powerset functor P f resembles unlabelled transition systemsby taking the singleton set A = 1 as labels. The map ♭ X : P f ( X ) → B (1 × X ) ∼ = B ( X ) isthe obvious inclusion, i.e. ♭ X ( t )( ∗ , x ) = 1 if x ∈ t and 0 otherwise. The monoid-valued functor M ( − ) has labels from A = M and ♭ X : M ( X ) → B ( M × X ) isgiven by ♭ X ( t )( m, x ) = 1 if t ( x ) = m ̸ = 0 and 0 otherwise. For a polynomial functor F Σ , we use A = N as the label set and define the maps ♭ X : F Σ X → B ( N × X ) by ♭ X ( σ ( x , . . . , x n )) = { [ (1 , x ) , . . . , ( n, x n ) ] } . The bag functor B itself also has A = N as labels and ♭ X ( t )( n, x ) = 1 if t ( x ) = n and 0otherwise. This is just the special case of the encoding for a monoid-valued functor forthe monoid ( N , + , F -coalgebras to that of coalgebras for B ( A × − ) (cf. Remark 2.5). In fact, the notions ofbehavioural equivalence for F -coalgebras and coalgebras for B ( A × − ), respectively, can beradically different. If ♭ X is natural in X , then behavioural equivalence wrt. F implies thatfor B ( A × − ), but not necessarily conversely. However, we do not assume naturality of ♭ X since it fails in all of our examples except one: ▶ Proposition 3.3.
The encoding ♭ X : F Σ X → B ( A × X ) for the polynomial functor F Σ is anatural transformation. ▶ Example 3.4.
The encoding ♭ X : P f ( X ) → B (1 × X ) ∼ = B ( X ) in Example 3.2.1 is notnatural. Indeed, consider the map ! : 2 →
1, for which we have B (!) · ♭ ( { , } ) = B (!) { [ 0 , } = { [ ∗ , ∗ ] } ̸ = { [ ∗ ] } = ♭ ( {∗} ) = ♭ · P f (!)( { , } ) . Similar examples show that the encodings in Example 3.2 item 2 for all non-trivial monoidsand item 4 are not natural.An important feature of our algorithm and tool is that all implemented functors canbe combined by products, coproducts and functor composition. That is, the functorsfrom Example 3.2 are implemented directly, but the algorithm also automatically handlescoalgebras for more complicated combined functors, like those in Example 2.2, e.g. P f ( A × − ).The mechanism that underpins this feature is detailed in previous work [20, 48] and dependscrucially on the ability to form coproducts and products of encodings: ▶ Construction 3.5 [20, 48] . Given a family of functors ( F i ) i ∈ I with encodings ( ♭ X,i ) i ∈ I and( A i ) i ∈ I , we obtain the following encodings with labels A = ‘ i ∈ I A i : for the coproduct functor F = ‘ i ∈ I F i we take ♭ X : a i ∈ I F i X ‘ i ∈ I ♭ X,i −−−−−−→ a i ∈ I B ( A i × X ) [ B ( in i × X )] i ∈ I −−−−−−−−−→ B (cid:0) a i ∈ I A i × X (cid:1) . .-P. Deifel, S. Milius, T. Wißmann 9 for the product functor F = Q i ∈ I F i we take ♭ X : Y i ∈ I F i X → B ( a i ∈ I A i × X ) ♭ X ( t )( in i ( a ) , x ) = ♭ i ( pr i ( t ))( a, x ) , where in i : A i → ‘ j A j and pr i : Q j F j X → F i X denote the canonical coproduct injec-tions and product projections, respectively. ▶ Remark 3.6.
Since zippable functors are not closed under composition modularity cannotbe achieved by simply providing a construction of an encoding for a composed functor (atleast not without giving up on the efficient run-time complexity). Functor composition isreduced to coproducts making a detour via many-sorted sets. Here is a rough example ofhow this works: given a coalgebra c : X → F GX , it can be turned into a 2-sorted coalgebra( c, d ) : (
X, Y ) → ( F Y, GX ), for a suitably chosen set Y of intermediate states. The lattercoalgebra is then combined into the coalgebra X + Y c + d −−−−→ F Y + GX [ F inr ,G inl ] −−−−−−−−→ ( F + G )( X + Y )for the coproduct of F and G , where inl : X → X + Y and inr : Y → X + Y are the twocoproduct injections. Full details may be found in [48, Sec. 8].In addition to the generic representation of coalgebras that encodings provide, our partitionrefinement algorithm requires functors to admit a refinement interface . A refinement interfacefor a functor F with an encoding ♭ X consists of two functions called update and init that needto fulfil certain coherence conditions, which we do not recall here because they are not neededto present our results. These functions encapsulate the functor specific operations at theheart of the refinement step and are invoked by the generic algorithm. Detailed explanationscan be found in [48] and [20, Section 3.2]. For the present work (see Theorem 5.6) we onlyneed the following new result about refinement interfaces. It states that every encodingsuitable for partition refinement does not lose information about the behaviour of the system.Indeed, the maps ♭ X : F X → B ( A × X ) are ‘almost’ injective. More precisely, note that ♭ X itself need not be injective, e.g. for DFAs it only retrieves information about successor statesbut disregards the ‘finality’ of states. However, pairing ♭ X with F ! : F X → F ▶ Proposition 3.7.
For every zippable set functor F with an encoding and a refinementinterface, the map ⟨ F ! , ♭ X ⟩ : F X → F × B ( A × X ) is injective for every finite set X . Proof (Sketch).
First, one proves that for all S ⊆ C ⊆ X there are maps r CS : F × B ( A × X ) → F F χ CS = F r CS · ⟨ F ! , ♭ X ⟩ using the axioms of the refinement interface. Thenone can show that the family of maps ( F χ CS ) S ⊆ C ⊆ X is jointly injective, using that F is azippable functor and X is finite. It follows that ⟨ F ! , ♭ X ⟩ is injective, too. ◀ If one is only interested in all pairs of behaviourally equivalent states in a given coalgebra,then it suffices to leave the encodings unrestricted and work with the refinement interface.In order to obtain the quotiented transition structure and the reachable states, we requirethat functor encodings fulfil an additional coherence axiom: ▶ Definition 3.8.
An encoding ♭ X for a set functor F is called uniform if it fulfils thefollowing property for every x ∈ X : F X B ( A × X ) B ( A ) F B ( A × ♭ X F χ { x } fil { x } ♭ fil { } (2) Intuitively, the condition in Definition 3.8 expresses that in an encoded coalgebra, theedges (and their labels) to a state x do not change if other states y, z ∈ X \ { x } are identifiedby a possible partition on the state space. Diagram (2) expresses the extreme case of such apartition, particularly the one where all elements of X except for x are identified in a block,with x being in a separate singleton block.Fortunately, requiring uniformity does not exclude any of the existing encodings that werecalled above. ▶ Proposition 3.9.
All encodings from Example 3.2 are uniform.
Uniform encodings interact nicely with the modularity constructions: ▶ Proposition 3.10.
Uniform encodings are closed under product and coproduct.
That is, given functors ( F i ) i ∈ I with uniform encodings ( ♭ i ) i ∈ I , then the encodings for thefunctors ‘ i ∈ I F i and Q i ∈ I F i , as defined in Construction 3.5, are uniform.Admittedly, the condition in Definition 3.8 is slightly technical. However, we will nowprove that it sits strictly between two standard properties, naturality and subnaturality . ▶ Proposition 3.11. 1.
Every natural encoding is uniform. Every uniform encoding is a subnatural transformation.
The converses of both of the above implications fail in general. For the converse of 1 wesaw a counterexample in Example 3.4, and for the converse of 2 we have the followingcounterexample. ▶ Example 3.12.
Consider the following encoding for the functor
F X = X × X × X givenby A = 3 + 3 and ♭ X : F X → B ( A × X ) ♭ X ( x, y, z ) = ( { ( inl , x ) , ( inl , y ) , ( inl , z ) } if y = z, { ( inr , x ) , ( inr , y ) , ( inr , z ) } if y ̸ = z. This encoding is subnatural, since the value of y = z is preserved by injections under F . Butit is not uniform, for if x ̸ = y ̸ = z , then we have fil { } ( ♭ ( F χ { x } ( x, y, z ))) = fil { } ( ♭ (1 , , { inl } ̸ = { inr } = fil { x } ( ♭ ( x, y, z )) . The previous coalgebraic partition refinement algorithm and its tool implementation inCoPaR compute for a given encoding of a coalgebra (
X, c ) the state set of its simplequotient q : ( X, c ) ↠ ( Y, d ), that is the partition Y of the set X corresponding to behaviouralequivalence. But the algorithm does not compute the coalgebra structure d of the simplequotient (and note that it is not given the structure c explicitly, to begin with). Here we willfill this gap. We are interested in computing the encoding Y d −→ F Y ♭ Y −−→ B ( A × Y ) given theencoding X c −→ F X ♭ X −−→ B ( A × X ) of the input coalgebra and the quotient map q : X ↠ Y .The edge labels in the encoding of the quotient coalgebra relate to the labels in theencoded input coalgebra in a functor specific way. For example, for weighted transition Recall that a set-indexed family of maps σ X : F X → GX is subnatural if the square in Remark 2.51commutes for every monomorphism m : X ↣ Y . .-P. Deifel, S. Milius, T. Wißmann 11 systems, the labels are the transition weights, which are added whenever states are identified.In contrast, for deterministic automata (or when F is a polynomial functor), the labels(i.e. input symbols) on the transitions remain the same even when states are identified.Thus, when computing the encoding of the simple quotient, the modification of edgelabels is functor specific. Algorithmically, this is reflected by specifying a new interfacecontaining one function merge , which is intended to be implemented together with therefinement interface (Section 3) for every functor of interest. The abstract function merge isthen used in the generic Construction 4.8 in order to compute the encoding of the simplequotient. ▶ Definition 4.1. A minimization interface for a set functor F equipped with a functorencoding ♭ X : F X → B ( A × X ) is a function merge : B ( A ) → B ( A ) such that the followingdiagram commutes for all S ⊆ X : F X B ( A × X ) B ( A ) F B ( A × B ( A ) ♭ X F χ S fil S merge ♭ fil { } (3)Intuitively, merge expresses what happens on the labels of edges from one state to oneblock. It receives the bag of all labels of edges from a particular source state x to a set of states S that the minimization procedure identified as equivalent. It then computes the edgelabels from x to the merged state S of the minimized coalgebra in a functor specific way.Figure 1 depicts this process for a monoid-valued functor (cf. Example 2.1.2). In this example, x S merge x S Figure 1
Example application of merge for the monoid-valued functor. merge sums up the labels (which are monoid elements), resulting in a correct transition labelto the new merged state.Before we give formal definitions of merge for the functors of interest, let us show thatthere is a close connection between properties of merge and the encoding; this will simplifythe definition of merge later (Example 4.4).First, if merge receives the bag of labels from a source state to a single target state, thenthere is nothing to be merged and thus merge should simply return its input bag. Moreover,we can even characterize uniform encodings by this property: ▶ Lemma 4.2.
Given a minimization interface, the following are equivalent: merge ( fil { x } ( ♭ X ( t ))) = fil { x } ( ♭ X ( t )) for all t ∈ F X . ♭ X is uniform. Similarly, the property that merge is always the identity characterizes natural encodings: ▶ Lemma 4.3.
For every encoding ♭ X : F X → B ( A × X ) , the following are equivalent: The identity on B A is a minimization interface. ♭ X is a natural transformation.In this case, the identity on B A is the unique minimization interface. ▶ Example 4.4. 1.
For the finite powerset functor P f ( − ), with labels A = 1, we define merge : B → B merge ( ℓ )( ∗ ) = min(1 , ℓ ( ∗ )). For monoid-valued functors M ( − ) with A = M , merge is defined as merge ( ℓ ) = ( { [ Σ ℓ ] } Σ ℓ ̸ = 0 { [] } otherwise,where Σ : B ( M ) → M is defined by Σ { [ m , . . . , m n ] } = m + · · · + m n . The encoding for the polynomial functor F Σ for a signature Σ is a natural transformationand hence its minimization interface is given by merge = id (see Lemma 4.3). ▶ Proposition 4.5.
All merge maps in Example 4.4 are minimization interfaces and run inlinear time in the size of their input bag.
Having merge defined for the functors of interest, we can now use it to compute the encodingof the simple quotient. ▶ Assumption 4.6.
For the remainder of this section we assume that F ̸ = ∅ .This is w.l.o.g. since F ∅ if and only if F X = ∅ for all sets X , for which there is only onecoalgebra (which is therefore its own simple quotient already). ▶ Proposition 4.7.
Suppose that the set functor F is equipped with a uniform encoding ♭ X : F X → B ( A × X ) and a minimization interface merge . Then the diagram below commutesfor every map q : X → Y , F X B ( A × X ) B ( A × Y ) B ( A ) ( Y ) F Y B ( A × Y ) B ( A ) ( Y ) ♭ X F q B ( A × q ) group merge ( Y ) ♭ Y ungroup (4)Note that the dashed arrow is not simply the identity map because ♭ X fails to be natural formost functors of interest (Example 3.4). Proof (Sketch).
One first proves that merge preserves empty bags: merge ( { [] } ) = { [] } . Thecommutativity of desired diagram (4) is proven by extending it by every evaluation map ev ( y ) : B ( A ) ( Y ) → B ( A ), y ∈ Y , which form a jointly injective family. The extended diagramfor y ∈ Y is then proven commutative using (2) for y , (3) for S = q − [ y ], which is also usedin the form χ { y } · q = χ S in addition to two easy properties of ev and fil : fil { y } = ev ( y ) · group and fil { y } ·B ( A × q ) = fil S . ◀▶ Construction 4.8.
Given the encoded F -coalgebra ( X, ♭ X · c ), the quotient q : X ↠ Y , anda minimization interface for F , we define the map e : Y → B ( A × Y ) as follows: given anelement y ∈ Y , choose any x ∈ X with q ( x ) = y and put e ( y ) := ( ungroup · merge ( Y ) · group · B ( A × q ) · ♭ X · c )( x ) , where the involved types are as follows: X F X B ( A × X ) B ( A × Y ) B ( A ) ( Y ) Y B ( A × Y ) B ( A ) ( Y ) cq ♭ X B ( A × q ) group merge ( Y ) e ungroup (5) .-P. Deifel, S. Milius, T. Wißmann 13 For the well-definedness and the correctness of Construction 4.8, we need to provethat (5) commutes. Moreover, observe that c is not directly given as input, and that thestructure d : Y → F Y of the simple quotient is not computed; only their encodings ♭ X · c and e = ♭ Y · d are. ▶ Theorem 4.9.
Suppose that q : ( X, c ) ↠ ( Y, d ) represents a quotient coalgebra. ThenConstruction 4.8 correctly yields the encoding e = ♭ Y · d given the encoding ♭ X · c and thepartition of X associated to q .If merge runs in linear time (in its parameter), then Construction 4.8 can be implementedwith linear run time (in the size of the input coalgebra ♭ X · c ). In the run time analysis, a bit of care is needed so that the implementation of group haslinear run time, see the appendix for details. From Proposition 4.5 we see that for everyfunctor from Example 2.1, Construction 4.8 can be implemented with linear runtime.
Modularity in the system type is gained by reducing functor composition to products andcoproducts (Remark 3.6). Since we want the construction of the minimized coalgebrastructure to benefit from the same modularity, we need to verify closure under product andcoproduct for the notions required in Proposition 4.7. We have already done so for uniformencodings (Proposition 3.10); hence it remains to show that minimization interfaces can alsobe combined by product and coproduct: ▶ Construction 4.10.
Given a family of functors ( F i ) i ∈ I together with uniform encodings ♭ i : F i X → B ( A i × X ) and minimization interfaces merge i : B ( A i ) → B ( A i ), we define merge for the (co)product functors Q i ∈ I F i and ‘ i ∈ I F i as follows: merge : B ( ‘ i ∈ I A i ) → B ( ‘ i ∈ I A i ) merge ( t )( in i a ) = merge i ( filter i ( t ))( a ) , where filter i : B ( ‘ j ∈ I A j ) → B ( A i ) is given by filter i ( f )( a ) = f ( in i ( a )).Curiously, the definition of merge is the same for products and coproducts, e.g. because thelabel sets are the same (see Construction 3.5). However, the correctness proofs turns out tobe quite different. Note that for coproducts, all labels in the image of fil S · ♭ X are in the samecoproduct component. Thus, filter i never removes elements and acts as a mere type-castwhen the above merge is used in accordance with its specification. ▶ Proposition 4.11.
The merge function defined in Construction 4.10 yields a minimizationinterface for the functors Q i ∈ I F i and ‘ i ∈ I F i . It can be implemented with linear run-time ifeach merge i is linear in its input. ▶ Corollary 4.12.
The class of set functors having a minimization interface contains allpolynomial and all monoid-valued functors and is closed under product and coproduct.
Consequently, Construction 4.8 correctly yields encoded quotient coalgebras for those functors.Note that all functors from Example 4.4 are contained in this class. Furthermore, functorcomposition can be dealt with by using coproducts as explained in Remark 3.6.
Having quotiented an encoded coalgebra by behavioural equivalence, the remaining task isto restrict the coalgebra to the states that are actually reachable from a distinguished initial state. For an intersection preserving set functor, the reachable part of a pointed coalgebracan be constructed iteratively, and this reduces to standard graph search on the canonicalgraph of the coalgebra [49, Cor. 5.26f], which we now recall. Throughout, P denotes the(full) powerset functor. The following is inspired by Gumm [26, Def. 7.2]: ▶ Definition 5.1.
Given a functor F : Set → Set , we define a family of maps τ FX : F X → P X by τ FX ( t ) = { x ∈ X | t −→ F X does not factorize through F ( X \ { x } ) F i −→ F X } , where i : X \ { x } , → X denotes the inclusion map.The canonical graph of a coalgebra c : X → F X is the directed graph X c −→ F X τ FX −−→ P X. The nodes are the states of (
X, c ) and one has an edge from x to y whenever y ∈ τ FX ( c ( x )).Note that for a pointed coalgebra ( X, c, i ) its canonical graph is equipped with the samepoint i : 1 → X , that is, the canonical graph is equipped with a root node i ( ∗ ) ∈ X . Aswe pointed out in Section 2, reachability of the pointed P -coalgebra ( X, τ FX · c, i ) preciselymeans that every x ∈ X is reachable from the root node in the canonical graph. ▶ Example 5.2. 1.
For a deterministic automaton considered as a coalgebra for
F X =2 × X A the canonical graph is precisely its usual underlying state transition graph. For the finite powerset functor P f , it is easy to see that τ P f X : P f X , → P X is the inclusionmap. Thus, the canonical graph of a P f -coalgebra (a finitely branching graph) is itself. For the functor B ( A × − ) the maps τ B ( A ×− ) X : B ( A × X ) → P X act as follows { [ ( a , x ) , . . . , ( a n , x n ) ] } 7→ { x , . . . , x n } . Hence, if we view a coalgebra X → B ( A × X ) as a finitely-branching graph whose edgesare labelled by pairs of elements of A and N , then the canonical graph is that same graphbut without the edge labels. This holds similarly also for other monoid-valued functors.To perform reachability analysis on encoded coalgebras, we would like that the canonicalgraph of a coalgebra and its encoding coincide. This clearly follows when, given a setfunctor F with encoding ♭ X : F X → B ( A × X ), the following equation holds for every set X : τ FX = (cid:0) F X ♭ X −−−→ B ( A × X ) τ B ( A ×− ) X −−−−−−−→ P X (cid:1) . (6) ▶ Assumption 5.3.
For the rest of this section we assume that F is an intersection preservingset functor equipped with a subnatural encoding ♭ X : F X → B ( A × X ). ▶ Remark 5.4.
That F preserves intersections is an extremely mild condition for set functors.All the functors in Example 3.2 preserve intersections. Furthermore, the collection of inter-section preserving set functors is closed under products, coproducts, and functor composition.A subfunctor σ : F ↣ G of an intersection preserving functor G preserves intersections if σ is a cartesian natural transformation, that is all naturality squares are pullbacks.For readers familiar with that notion, let us note that for every finitary set functor theTrnková hull ¯ F (see p. 7) preserves intersections [2, Cor. 8.1.17].We are now ready to show the desired equality (6) by point-wise inclusion in eitherdirection. Under the running Assumption 5.3 it follows that the encoding of a coalgebra canonly mention states that are in the coalgebra’s canonical graph: ▶ Proposition 5.5.
For every t ∈ F X we have that τ B ( A ×− ) X ( ♭ X ( t )) ⊆ τ FX ( t ) . .-P. Deifel, S. Milius, T. Wißmann 15 Proof (Sketch).
This is shown by contraposition. If x is not in τ FX ( t ), then we know thatthe map t : 1 → F X factorizes through F ( X \ { x } ) F i −→ F X (cf. Definition 5.1). Using thesubnaturality square of ♭ for the map i then yields x ̸∈ τ B ( A ×− ) X ( ♭ X ( t )). ◀ For the converse inclusion, we additionally require that F meets the assumptions of thepartition refinement algorithm: ▶ Theorem 5.6. If F is zippable and equipped with a refinement interface, then the canonicalgraph of a finite coalgebra coincides with that of its encoding. For every finite set X one proves the equation (6): τ FX = τ B ( A ×− ) X · ♭ X . It suffices to provethe reverse of the inclusion in Proposition 5.5 – again by contraposition. This time theargument is more involved using that the encoding ♭ is essentially injective (Proposition 3.7),and that F preserves intersections. (For details see the appendix.)As a consequence of Theorem 5.6, the states in the reachable part of a pointed coalgebra( X, c, i ) are precisely the states reachable from the node i ( ∗ ) ∈ X in the (underlying graphof the) encoding ♭ X · c : X → B ( A × X ), cf. Example 5.23. Thus, given (the encoding of) apointed coalgebra ( X, c, i ), its reachable part can be computed in linear time by a standardbreadth-first search on the encoding viewed as a graph (ignoring the labels).This holds for all the functors in Example 3.2 and every functor obtained from them byforming products, coproducts and functor composition.
We have shown how to extend a generic coalgebraic partition refinement algorithm to a fullyfledged minimization algorithm. Conceptually, this is the step from computing the simplequotient of a coalgebra to computing the well-pointed modification of a pointed coalgebra. Toachieve this, our extension includes two new aspects: (1) the computation of the transitionstructure of the simple quotient given an encoding of the input coalgebra and the partition ofits state space modulo behavioural equivalence, and (2) the computation of the encoding ofthe reachable part from the encoding of a given pointed coalgebra. Both of these new stepshave also been implemented in the Coalgebraic Partition Refiner CoPaR, together with a newpretty-printing module that prints out the resulting encoded coalgebra in a functor-specifichuman-readable syntax.There are a number of questions for further work. This mainly concerns broadening thescope of generic coalgebraic partition refinement algorithms. First, we will further broadenthe range of system types that our algorithm and tool can accommodate, and provide supportfor base categories beside the sets as studied in the present work, e.g. nominal sets, whichunderlie nominal automata [13, 38].Concerning genericity, there is an orthogonal approach by Ranzato and Tapparo [35],which is variable in the choice of the notion of process equivalence – however within the realmof standard labelled transition systems (see also [23]). Similarly, Blom and Orzan [11, 12] usea technique called signature refinement , which handles strong and branching bisimulation aswell as Markov chain lumping (see also [44]).It also remains for further work to employ parallelization in the computation of thewell-pointed modification, which has been achieved for many concrete system types [8, 11, 12,22, 44, 46]. We will explore in future work whether these symbolic and distributed methods,possibly generic in the equivalence notion, can be extended to the coalgebraic generality.
References Jiří Adámek, Filippo Bonchi, Barbara König, Mathias Hülsbusch, Stefan Milius, and AlexandraSilva. A coalgebraic perspective on minimization and determinization. In Lars Birkedal, editor,
Proc. Foundations of Software Science and Computation Structures (FoSSaCS) , volume 7213of
Lecture Notes Comput. Sci. , pages 58–73. Springer, 2012. Jiří Adámek, Stefan Milius, and Lawrence S. Moss. Initial algebras, terminal coalgebras, andthe theory of fixed points of functors. draft book, July 2020. URL: . JiříAdámek, Stefan Milius, Lawrence S. Moss, and Lurdes Sousa. Well-pointed coalgebras.
Log. Methods Comput. Sci. , 9(2):1–51, 2014. Michael A. Arbib and Ernest G. Manes. Adjoint machines, state-behaviour machines, andduality.
J. Pure Appl. Algebra , 6:313–344, 1975. Michael A. Arbib and Ernest G. Manes.
Algebraic Approaches to Program Semantics . Textsand Monographs in Computer Science. Springer, 1986. Christel Baier, Bettina Engelen, and Mila Majster-Cederbaum. Deciding bisimilarity andsimilarity for probabilistic processes.
J. Comput. Syst. Sci. , 60:187–231, 2000. doi:10.1006/jcss.1999.1683 . Falk Bartels, Ana Sokolova, and Erik de Vink. A hierarchy of probabilistic system types.
Theoretical Computer Science , 327:3–22, 2004. Damien Bergamini, Nicolas Descoubes, Christophe Joubert, and Radu Mateescu. BISIMU-LATOR: A modular tool for on-the-fly equivalence checking. In
Tools and Algorithms forthe Construction and Analysis of Systems, TACAS 2005 , volume 3440 of
Lecture Notes inComput. Sci. , pages 581–585. Springer, 2005. doi:10.1007/b107194 . Christoph Berkholz, Paul S. Bonsma, and Martin Grohe. Tight lower and upper bounds forthe complexity of canonical colour refinement.
Theory Comput. Syst. , 60(4):581–614, 2017. doi:10.1007/s00224-016-9686-0 . Nick Bezhanishvili, Marcello Bonsangue, Helle Hvid Hansen, Dexter Kozen, Clemens Kupke,Prakash Panangaden, and Alexandra Silva. Minimisation in logical form. Technical report,Cornell University, May 2020. available at https://arxiv.org/abs/2005.11551 . Stefan Blom and Simona Orzan. Distributed branching bisimulation reduction of state spaces.In
Parallel and Distributed Model Checking, PDMC 2003 , volume 89 of
Electron. Notes Theor.Comput. Sci. , pages 99–113. Elsevier, 2003. Stefan Blom and Simona Orzan. A distributed algorithm for strong bisimulation reduction ofstate spaces.
STTT , 7(1):74–86, 2005. doi:10.1007/s10009-004-0159-4 . Mikołaj Bojańczyk, Bartek Klin, and Slawomir Lasota. Automata theory in nominal sets.
Log.Methods Comput. Sci. , 10(3), 2014. doi:10.2168/LMCS-10(3:4)2014 . Filippo Bonchi, Marcello Bonsangue, Helle Hvid Hansen, Prakash Panangaden, Jan Rutten,and Alexandra Silva. Algebra-coalgebra duality in Brzozowski’s minimization algorithm.
ACMTrans. Comput. Log. , 15(1):3:1–3:29, 2014. Filippo Bonchi, Marcello Bonsangue, Jan Rutten, and Alexandra Silva. Brzozowski’s algorithm(co)algebraically. In Robert L. Constable and Alexandra Silva, editors,
Logic and ProgramSemantics, Kozen Festschrift , volume 7230 of
Lecture Notes in Comput. Sci. , pages 12–23.Springer, 2012. Janusz A. Brzozowski. Canonical regular expressions and minimal state graphs for definiteevents. In J. Fox, editor,
Mathematical Theory of Automata , volume 12 of
MRI SymposiaSeries , pages 529–561. Polytechnic Institute of Brooklyn, Polytechnic Press, 1962. Jin-Yi Cai, Martin Fürer, and Neil Immerman. An optimal lower bound on the numberof variables for graph identification.
Combinatorica , 12(4):389–410, 12 1992. doi:10.1007/bf01305232 . Stefano Cattani and Roberto Segala. Decision algorithms for probabilistic bisimulation. In
Concurrency Theory, CONCUR 2002 , volume 2421 of
Lecture Notes in Comput. Sci. , pages371–385. Springer, 2002. .-P. Deifel, S. Milius, T. Wißmann 17 CoPaR: The Coalgebraic Partion Refiner, February 2021. Available at https://git8.cs.fau.de/software/copar . Hans-Peter Deifel, Stefan Milius, Lutz Schröder, and Thorsten Wißmann. Generic partitionrefinement and weighted tree automata. In Maurice H. ter Beek, Annabelle McIver, andJosé N. Oliveira, editors,
Formal Methods – The Next 30 Years , pages 280–297, Cham, 102019. Springer International Publishing. doi:10.1007/978-3-030-30942-8_18 . Salem Derisavi, Holger Hermanns, and William Sanders. Optimal state-space lumpingin markov chains.
Inf. Process. Lett. , 87(6):309–315, 2003. doi:10.1016/S0020-0190(03)00343-0 . Hubert Garavel and Holger Hermanns. On combining functional verification and performanceevaluation using CADP. In
Formal Methods Europe, FME 2002 , volume 2391 of
Lecture Notesin Comput. Sci. , pages 410–429. Springer, 2002. doi:10.1007/3-540-45614-7 . Jan Groote, David Jansen, Jeroen Keiren, and Anton Wijs. An O ( m log n ) algorithm forcomputing stuttering equivalence and branching bisimulation. ACM Trans. Comput. Log. ,18(2):13:1–13:34, 2017. doi:10.1145/3060140 . Jan Friso Groote, Jao Rivera Verduzco, and Erik P. de Vink. An efficient algorithm todetermine probabilistic bisimulation.
Algorithms , 11(9):131, 2018. doi:10.3390/a11090131 . H. Peter Gumm.
Thomas Ihringer: Algemeine Algebra. Mit einem Anhang über UniverselleCoalgebra von H. P. Gumm , volume 10 of
Berliner Studienreihe zur Mathematik . HeldermannVerlag, 2003. H. Peter Gumm. From T -coalgebras to filter structures and transition systems. In José LuizFiadeiro, Neil Harman, Markus Roggenbach, and Jan Rutten, editors, Algebra and Coalgebrain Computer Science , volume 3629 of
Lecture Notes in Comput. Sci. , pages 194–212. SpringerBerlin Heidelberg, 2005. doi:10.1007/11548133_13 . Johanna Högberg, Andreas Maletti, and Jonathan May. Backward and forward bisimulationminimization of tree automata.
Theoret. Comput. Sci. , 410:3539–3552, 2009. John Hopcroft. An n log n algorithm for minimizing states in a finite automaton. In Theoryof Machines and Computations , pages 189–196. Academic Press, 1971. Dung Huynh and Lu Tian. On some equivalence relations for probabilistic processes.
Fund.Inform. , 17:211–234, 1992. Joost-Pieter Katoen, Tim Kemna, Ivan Zapreev, and David Jansen. Bisimulation minimisationmostly speeds up probabilistic model checking. In
Tools and Algorithms for the Constructionand Analysis of Systems, TACAS 2007 , volume 4424 of
Lecture Notes in Comput. Sci. , pages87–101. Springer, 2007. doi:10.1007/978-3-540-71209-1 . Bartek Klin. Structural operational semantics for weighted transition systems. In Jens Palsberg,editor,
Semantics and Algebraic Specification: Essays Dedicated to Peter D. Mosses on theOccasion of His 60th Birthday , volume 5700 of
Lecture Notes in Comput. Sci. , pages 121–139.Springer, 2009. Barbara König and Sebastian Küppers. A generalized partition refinement algorithm, instanti-ated to language equivalence checking for weighted automata.
Soft Comput. , 22:1103–1120,2018. Nick Nick Bezhanishvili, Clemens Kupke, and Prakash Panangaden. Minimization via duality.In Luke Ong and R. de Queiroz, editors,
Proc. WoLLIC , volume 7456 of
Lecture Notes inComput. Sci.
Springer, 2012. Robert Paige and Robert E. Tarjan. Three partition refinement algorithms.
SIAM J. Comput. ,16(6):973–989, 1987. Francesco Ranzato and Francesco Tapparo. Generalizing the Paige-Tarjan algorithm byabstract interpretation.
Inf. Comput. , 206:620–651, 2008. doi:10.1016/j.ic.2008.01.001 . Jurriaan Rot. Coalgebraic minimization of automata by initiality and finality. In Lars Birkedal,editor,
Proc. MFPS , volume 325 of
Electron. Notes Theor. Comput. Sci. , pages 253–276.Elsevier, 2016. J.J.M.M. Rutten. Universal coalgebra: a theory of systems.
Theoret. Comput. Sci. , 249(1):3–80,October 2000. doi:10.1016/S0304-3975(00)00056-6 . Lutz Schröder, Dexter Kozen, Stefan Milius, and Thorsten Wißmann. Nominal automata withname binding. In
Foundations of Software Science and Computation Structures, FOSSACS2017 , volume 10203 of
Lecture Notes in Comput. Sci. , pages 124–142, 2017. doi:10.1007/978-3-662-54458-7 . Deian Tabakov and Moshe Vardi. Experimental evaluation of classical automata constructions.In G. Sutcliffe and A. Voronkov, editors,
Proc. LPAR , volume 3835 of
Lecture Notes inArtificial Intelligence , pages 396–411. Springer, 2005. Věra Trnková. On a descriptive classification of set functors I.
Comment. Math. Univ. Carolin. ,12:143–174, 1971. Antti Valmari. Bisimilarity minimization in O ( m log n ) time. In Applications and Theory ofPetri Nets, PETRI NETS 2009 , volume 5606 of
Lecture Notes in Comput. Sci. , pages 123–142.Springer, 2009. doi:10.1007/978-3-642-02424-5 . Antti Valmari and Giuliana Franceschinis. Simple O ( m log n ) time Markov chain lumping. In Tools and Algorithms for the Construction and Analysis of Systems, TACAS 2010 , volume6015 of
Lecture Notes in Comput. Sci. , pages 38–52. Springer, 2010. Antti Valmari and Petri Lehtinen. Efficient minimization of dfas with partial transition. In
Theoretical Aspects of Computer Science, STACS 2008 , volume 1 of
LIPIcs , pages 645–656.Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Germany, 2008. Tom van Dijk and Jaco van de Pol. Multi-core symbolic bisimulation minimization.
J. Softw. Tools Technol. Transfer , 20(2):157–177, 2018. Boris Weisfeiler.
On Construction and Identification of Graphs . Springer, 1976. doi:10.1007/bfb0089374 . Anton Wijs. Gpu accelerated strong and branching bisimilarity checking. In Christel Baierand Cesare Tinelli, editors,
Proc. Tools and Algorithms for the Construction and Analysis ofSystems (TACAS) , volume 9035 of
Lecture Notes in Comput. Sci. , pages 368–383. Springer,2015. Thorsten Wißmann, Hans-Peter Deifel, Stefan Milius, and Lutz Schröder. From genericpartition refinement to weighted tree automata minimization.
Form. Asp. Comput. , 2020. Toappear. Thorsten Wißmann, Ulrich Dorsch, Stefan Milius, and Lutz Schröder. Efficient and modularcoalgebraic partition refinement.
Log. Methods. Comput. Sci. , 16(1):8:1–8:63, 2020. Thorsten Wißmann, Stefan Milius, Jérémy Dubut, and Shin-ya Katsumata. A coalgebraicview on reachability.
Comment. Math. Univ. Carolin. , 60(4), 2019. Thorsten Wißmann.
Coalgebraic Semantics and Minimization in Sets and Beyond . Phd thesis,Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU), 2020. URL: https://opus4.kobv.de/opus4-fau/frontdoor/index/index/docId/14222 . Thorsten Wißmann, Hans-Peter Deifel, Stefan Milius, and Lutz Schröder. From genericpartition refinement to weighted tree automata minimization, 2020. accepted for publicationin
Formal Aspects of Computing ; available online at https://arxiv.org/abs/2004.01250 . arXiv:2004.01250 . Lijun Zhang, Holger Hermanns, Friedrich Eisenbrand, and David Jansen. Flow Faster:Efficient decision algorithms for probabilistic simulations.
Log. Meth. Comput. Sci. , 4(4), 2008. doi:10.2168/LMCS-4(4:6)2008 . .-P. Deifel, S. Milius, T. Wißmann 19 A Additional Notation in Omitted Proofs
Recall that the quotients of a set X , represented by surjective maps X ↠ P are in one-to-onecorrespondence with partitions on X . More generally, every map f : X → Y induces anequivalence relationker( f ) = { ( x , x ) ∈ X × X | f ( x ) = f ( x ) } called the kernel of f . If f : X ↠ Y is surjective, then ker( f ) is the equivalence relationcorresponding to the partition Y on X . B Omitted ProofsB.1 Proofs for Section 2Details for Remark 2.5
Recall that a (sub)natural transformation σ from a functor F to a functor G is a set-indexedfamily of maps σ X : F X → GX such that for every (injective) function f : X → Y we have F X GXF Y GY σ X F f Gfσ Y A subnatural transformation σ : F → G is called subcartesian if the above naturality “squares”are pullbacks for every injective map f .Given a natural transformation σ : F → G every F -coalgebra ( X, c ) yields a G -coalgebra( X, σ X · c ).Recall that F is a subfunctor of G if there is a natural transformation σ : F → G all ofwhose components are injective maps.In the following proposition point 1 is standard, for point 2 see [48, Prop. 2.13], andpoint 3 can be gleaned from [49, Thm. 4.6]. We provide a full proof for the convenience ofthe reader. ▶ Proposition B.1.
Let σ : F → G be natural transformation. Behavioural equivalence wrt. F implies that for G . If F is a subfunctor of G via σ , then the problem of computing the simple quotient for F -coalgebras reduces to that for G -coalgebras. If σ is subcartesian, then the problem of computing the reachable part for pointed F -coalgebras reduces to that for pointed G -coalgebras. Consequently, if F is a subfunctor of G via a subcartesian σ the minimization problem for F -coalgebras reduces to that for G -coalgebras. Proof. 1.
This follows from the fact that for every morphism h : ( X, c ) → ( Y, d ) of F -coalgebras we have the following commutative diagram due to the naturality of σ : X F X GXY F Y GY ch σ X F h Ghd σ Y (7)This actually shows that the object assignment ( X, c ) ( X, σ X · c ) is a functor from thecategory Coalg F of all F -coalgebras to the category Coalg G of all G -coalgebras, whichacts as the identity on morphisms. We first prove that the above functor
Coalg F → Coalg G preserves and reflects quotientcoalgebras if σ X is injective.For preservation, note that every quotient q : ( Y, d ) ↠ ( X, c ) yields the quotient q : ( Y, σ Y · d ) ↠ ( X, σ X · c ) wrt. the functor G , cf. Diagram (7).For reflection, let ( X, c ) be an F -coalgebra and let q : ( X, σ X · c ) ↠ ( Y, d ′ ) be any quotientof G -coalgebras. Since q is surjective and σ Y injective we obtain a unique coalgebrastructure d : Y → F Y such that q is a morphism of F -coalgebras: X F X GXY F Y GY cq F q σ X Gqd d ′ σ Y The desired reduction is now obvious since the simple quotient of an F -coalgebra ( X, c )coincides with that of the G -coalgebra ( X, σ X · c ). We first prove that the functor
Coalg F → Coalg G induced by σ preserves and reflectspointed subcoalgebras.Preservation is clear by using Diagram (7) and the fact that a morphism h : ( X, c, i ) → ( Y, d, j ) of pointed coalgebras preserves the point: h · i = j .For reflection, let ( X, c, i ) be any F -coalgebra and let m : ( S, s ′ , j ) ↣ ( X, σ X · c, i ) be asubcoalgebra. Then from the fact that σ is subcartesian we obtain a unique coalgebrastructure s : S → F S such that m : ( S, s, j ) → ( X, c, i ) is a pointed subcoalgebra wrt. F : S F S GSX F X GX sm s ′ σ S F m Gmc σ X This implies that the reachable parts of (
X, c, i ) wrt. F and ( X, σ X · c, i ) wrt. G coincide,which clearly establishes the desired reduction. ◀ For further use we collect a few properties of the filter function fil S . ▶ Lemma B.2. 1.
The maps fil S : B ( A × X ) → B ( A ) are natural in A . For every x ∈ X , we have fil { x } = ev ( x ) · group , (8) where ev : X → Y X → Y is the evaluation of the exponential Y X (in curried form). The function ⟨ fil { x } ⟩ x ∈ X : B ( A × X ) → ( B A ) X has a codomain restriction to ( B A ) ( X ) ,and this is equal to the function group . For every function f : X → Y and S ⊆ X , fil S = fil f [ S ] · B ( A × f ) . (9) Proof. 1.
This was proved in previous work [48, Rem. 6.5]. Given x ∈ X , a ∈ A and f ∈ B ( A × X ), fil { x } ( f )( a ) = X y ∈{ x } f ( a, y ) = f ( a, x ) = ( λb.f ( b, x ))( a )= ev ( x )( λy.λb.f ( b, y ))( a ) = ev ( x )( group ( f ))( a ) . .-P. Deifel, S. Milius, T. Wißmann 21 The first part of the statement is clear, and the second part follows from item 2. Given t ∈ B ( A × X ) , f : X → Y, S ⊆ X and a ∈ A : fil f [ S ] ( B ( A × f )( t ))( a ) = X y ∈ f [ S ] B ( A × f )( t )( a, y ) = X y ∈ f [ S ] X x ∈ Xf ( x )= y t ( a, x )= X x in Xf ( x ) ∈ f [ S ] t ( a, x ) = X x ∈ S t ( a, x ) = fil S ( t )( a ) . ◀ B.2 Proofs for Section 3Proof of Proposition 3.3
Proof.
Given f : X → Y and σ ( x , . . . , x n ) ∈ F Σ X , we calculate B ( A × f )( ♭ X ( σ ( x , . . . , x n ))) = B ( A × f ) { (1 , x ) , . . . , ( n, x n ) } = { (1 , f ( x )) , . . . , ( n, f ( x n )) } = ♭ Y ( σ ( f ( x ) , . . . , f ( x n )))= ♭ Y ( F Σ f ( σ ( x , . . . , x n ))) . ◀ Proof of Proposition 3.7 ▶ Lemma B.3.
Given a functor F with a refinement interface, we have for all sets S ⊆ C ⊆ X a map r CS : F × B ( A × X ) → F with r CS · ⟨ F ! , ♭ X ⟩ = F χ CS . F X F F × B ( A × X ) F χ CS ⟨ F ! ,♭ X ⟩ r CS Proof.
First, we define maps v X and v C by the commutativity of the left-hand parts of thediagrams below, respectively. We also observe that precomposing these maps with ⟨ F ! , ♭ X ⟩ yields w ( X ) and w ( C ), respectively, using the axioms of the refinement interface (note thatthe left-hand triangle in the right-hand diagram commutes by the left-hand diagram): F × B ( A × X ) F XF × B A W v X := F ×B pr Axiom init ⟨ F ! ,♭ X ⟩ w ( X ) init F × B ( A × X ) F XW × B
A W v C := ⟨ v X , fil C · pr ⟩ Axiom update ⟨ F ! ,♭ X ⟩ w ( C ) ⟨ w ( X ) , fi l C · ♭ X ⟩ pr · update Now we can define r CS by the commutativity of the left-hand part in the diagram below and x x x x x n − · · · x x x x x n − · · · x x x x x n − · · · x x x x x n − · · · x x x x x n − · · · x x x x x n − · · · x x x x x n − · · · x x x x x n − · · · X/χ C S : X/q : X/χ C S : X/q : X/χ C S : X/q : X/χ C S : X/q : Figure 2
The partitions for q k in the proof of Proposition 3.7 show that is has the desired property: F × B ( A × X ) F XW × B
A F r CS := ⟨ v C , fil S · pr ⟩ Axiom update
Def. v C ⟨ F ! ,♭ X ⟩ F χ CS ⟨ w ( C ) , fi l S · ♭ X ⟩ pr · update ◀ Proof of Proposition 3.7.
Let X = { x , . . . , x n − } . We define the following family of subsetsof X : S i = { x i } , C i = { x i , . . . , x n − } for 0 ≤ i < n. For every k , 0 ≤ k ≤ n , we define the map q k := ⟨ χ C i S i ⟩ ≤ i CkSk ⟩ ≤ k Proof. First, note that for every bag b ∈ B ( A × X ) and every pair ( a, x ) ∈ A × X we have fil { x } ( b )( a ) = b ( a, x ). For the finite powerset functor P f ( − ), we have A = 1 and ♭ : P f X → B (1 × X ) ∼ = B ( X )given by ♭ ( t )( ∗ , x ) = ( x ∈ t, ∈ P f χ { x } ( t ) ⇔ x ∈ t . We then have fil { x } ( ♭ ( t ))( ∗ ) = ♭ ( t )( ∗ , x ) = ( x ∈ t fil { } ( ♭ ( P f χ { x } ( t )))( ∗ ) = ♭ ( P f χ { x } ( t ))( ∗ , 1) = ( ∈ P f χ { x } ( t )0 otherwise= ( x ∈ t The monoid-valued functor M ( − ) for a given monoid M has labels A = M and ♭ : M ( X ) →B ( M × X ) given by ♭ ( t )( m, x ) = ( t ( x ) = m ̸ = 0 , M ( χ { x } ) ( t )(1) = t ( x ). We then have fil { x } ( ♭ ( t ))( m ) = ♭ ( t )( m, x ) = ( t ( x ) = m ̸ = 00 otherwise, fil { } ( ♭ ( M ( χ { x } ) ( t )))( m ) == ♭ ( M ( χ { x } ) ( t ))( m, 1) = ( M ( χ { x } ) ( t )(1) = m ̸ = 00 otherwise= ( t ( x ) = m ̸ = 00 otherwise. The polynomial functor F Σ for a signature Σ has labels A = N , and the map ♭ : F Σ X →B ( N × X ) is given by ♭ ( σ ( x , . . . , x n )) = { (1 , x ) , . . . , ( n, x n ) } . Since this ♭ is natural byProposition 3.3, the desired result follows from Proposition 3.11(1). ◀ Proof of Proposition 3.10 Proof. 1. For the coproduct of ( F i ) i ∈ I , ♭ X : ‘ i ∈ I F i X → B ( ‘ i ∈ I A i × X ) is defined inConstruction 3.5 as ♭ X : a i ∈ I F i X ‘ i ∈ I ♭ X,i −−−−−−→ a i ∈ I B ( A i × X ) [ B ( in i × X )] i ∈ I −−−−−−−−−→ B (cid:0) a i ∈ I A i × X (cid:1) . We evaluate both sides of the condition for uniform encodings: fil { x } ( ♭ ( in i t ))( in j a ) = ♭ ( in i t )( in j a, x )= ([ B ( in k × X )] k ∈ I ( ‘ k ∈ I ♭ k )( in i t ))( in j a, x )= ([ B ( in k × X )] k ∈ I in i ( ♭ i ( t )))( in j a, x )= ( i ̸ = j♭ i ( a, x ) otherwise, fil { } ( ♭ (( ‘ k ∈ I F k ) χ { x } ( in i t )))( in j a ) == ♭ (( ‘ k ∈ I F k ) χ { x } ( in i t ))( in j a, ♭ ( in i F i χ { x } ( t ))( in j a, ( i ̸ = j♭ i ( F i χ { x } t )( a, 1) otherwise,and ♭ i ( F i χ { x } t )( a, 1) = ♭ i ( t )( a, x ) by the assumption that ♭ i is uniform. Therefore, bothsides agree. For the product Q i ∈ I F i we define ♭ X : Q i ∈ I F i X → B ( ‘ i ∈ I A i × X ) in Construction 3.5as ♭ X ( t )( in i ( a ) , x ) = ♭ i ( pr i ( t ))( a, x ) . We evaluate both sides again: fil { x } ( ♭ ( t ))( in i a ) = ♭ ( t )( in i a, x ) = ♭ i ( pr i t )( a, x ) fil { } ( ♭ ( Y k ∈ I F k χ { x } ( t )))( in i a ) == ♭ ( Y k ∈ I F k χ { x } t )( in i a, ♭ i ( pr i ( Y k ∈ I F k χ { x } ( t )))( a, ♭ i ( F i χ { x } ( pr i t ))( a, ♭ i ( pr i t )( a, x ) , where the last line uses the fact that ♭ i is uniform. ◀ Proof of Proposition 3.11 In order to prove that uniform encodings are subnatural we use the following lemma: ▶ Lemma B.4. The following diagram commutes for all uniform encodings: F F B ( A × B A, ! F { [] } ♭ fil { } .-P. Deifel, S. Milius, T. Wißmann 25 where { } , → { , } = 2 is the obvious inclusion map. Proof. The following diagram commutes for all n ∈ N : F F (1 + N ) B ( A × (1 + N )) F B ( A × B ( A ) . F inl F F χ { inr n } ♭ N (Def. 3.8) fil { inr n } ♭ fil { } Let t ∈ F fil { } ( ♭ ( F t ))) is nonempty andcontains the element a . Then, by the above diagram we have a ∈ fil { inr n } ( ♭ N ( F inl ( t ))) andtherefore( a, inr n ) ∈ ♭ N ( F inl ( t )) for all n ∈ N . However, this contradicts the finiteness of the bag ♭ N ( F inl ( t )). ◀ We are now ready to prove the main proposition: Proof of Proposition 3.11. 1. Given an encoding ♭ X : F X → B ( A × X ) which is naturalin X , we have the following commutative diagram: F X B ( A × X ) B ( A ) ,F B ( A × ♭ X F χ { x } B ( A × χ { x } ) fil { x } ♭ Y fil { } Indeed, the left-hand square commutes due to the naturality of ♭ and the right-handtriangle commutes by Lemma B.2(4). Let ♭ X : F X → B ( A × X ) be a uniform encoding. First we show that the family (cid:0) B ( A × Y ) fil { y } −−−→ B ( A ) (cid:1) y ∈ Y is jointly monic. Indeed, recall from Lemma B.2 that themorphism ⟨ fil { y } ⟩ y ∈ Y is equal to group : B ( A × Y ) → ( B A ) ( Y ) , which is an isomorphism,whence a split mono. It therefore suffices to prove that the following diagram commutesfor all y ∈ Y and all monomorphisms m : X ↣ Y : F X B ( A × X ) B ( A × Y ) F Y B ( A × Y ) B A ♭ X F m B ( A × m ) fil { y } ♭ Y fil { y } (11)We distinguish two cases: a. If y ∈ m [ X ], equivalently, y = m ( x ) for an x ∈ X , the following diagram commutes: F X B ( A × X ) B ( A × Y ) F Y F B ( A × B ( A ) B ( A × Y ) ♭ X F m F χ { x } (Def. 3.8) B ( A × m ) fil { x } fil { m ( x ) } F χ { m ( x ) } ♭ Y ♭ fil { } fil { m ( x ) } (Def. 3.8) Therefore, (11) commutes for y = m ( x ) ∈ m [ X ]. b. If y ∈ ( Y \ m [ X ]), equivalently, χ { y } · m = 0!, then the following diagram commutes: F X B ( A × X ) B ( A × Y ) F F Y F B ( A × B A B ( A × Y ) ♭ X F m F ! ! B ( A × m ) ( y ̸∈ m [ X ]) fil { y } ! F (Lem. B.4) { [] } F χ { y } ♭ Y ♭ (Def. 3.8) fil { } fil { y } Therefore, (11) also commutes for y ̸∈ m [ X ]. ◀ B.3 Proofs for Section 4Proof of Lemma 4.2 Proof. To see this, instantiate (3) for S = { x } and compare it with the diagram (2) ofDefinition 3.8: F X B ( A ) B ( A × X ) F B ( A ) fil { x } · ♭ X F χ { x } ♭ X (3) merge fil { x } fil { } · ♭ We see that the upper inner part of the diagram commutes if and only if the outside does.This establishes the desired equivalence. ◀ Proof of Lemma 4.3 We first establish the following easy lemma: ▶ Lemma B.5. For every map f : X → Y and subset S ⊆ Y we have X Y fχ f − S ] χ S Proof. Indeed, we have χ S ( f ( x )) = 1 ⇔ f ( x ) ∈ S ⇔ x ∈ f − [ S ] ⇔ χ f − [ S ] ( x ) = 1 . ◀ Proof of Lemma 4.3. ⇒ 1: The required axiom (3) for merge = id follows by combiningthe given naturality of ♭ X with Equation (9): F X B ( A × X ) B ( A ) F B ( A × ♭ X F χ S B ( A × χ S ) fil S ♭ fil { } .-P. Deifel, S. Milius, T. Wißmann 27 ⇒ 2: Suppose merge = id is a minimization interface. Then the axiom (3) simplifies asfollows: F X B ( A × X ) B ( A ) .F B ( A × ♭ X F χ S fil S ♭ fil { } (12)In order to show that ♭ is a natural transformation we use that the family (cid:0) B ( A × Y ) fil { y } −−−→B ( A ) (cid:1) y ∈ Y is jointly monic. Hence, it suffices to prove that the following diagram commutesfor all functions f : X → Y and y ∈ Y : F X B ( A × X ) B ( A × Y ) F Y B ( A × Y ) B A ♭ X F f B ( A × f ) fil { y } ♭ Y fil { y } (13)Indeed, let y ∈ Y and S ⊆ X be the inverse image of y under f : S = f − [ y ]. Then thefollowing diagram commutes: F X B ( A × X ) B ( A × Y ) F Y F B ( A × B ( A ) B ( A × Y ) ♭ X F f F χ S B.5 (12) B ( A × f ) fil S fil { y } F χ { y } ♭ Y ♭ fil { } fil { y } (12) for S = { y } Therefore, (13) commutes for all f : X → Y and y ∈ Y as desired. ◀ Proof of Proposition 4.5 Proof. 1. For the finite powerset functor P f ( − ), with A = 1, we define merge by merge ( ℓ )( ∗ ) = min(1 , ℓ ( ∗ )) . To show that the axiom holds, we calculate both sides: fil { } ( ♭ ( P f χ S ( t )))( ∗ ) = ♭ ( P f χ S ( t ))( ∗ , ( ∈ P f χ S ( t )0 otherwise = ( S ∩ t ̸ = ∅ merge ( fil S ( ♭ ( t )))( ∗ ) = min(1 , fil S ( ♭ ( t ))( ∗ ))= min(1 , X x ∈ S ♭ ( t )( ∗ , x ) | {z } x ∈ t ⇒ , else 0 )= ( S ∩ t ̸ = ∅ merge can be implemented in constant time, since it just needs to check if its inputbag is empty and return one of two possible constants, depending on that result. For monoid-valued functors M ( − ) with A = M , merge is defined as merge ( ℓ ) = ( { [ Σ ℓ ] } Σ ℓ ̸ = 0 { [] } otherwise.To show that this fulfils the required property, we first need the following facts:( M ( χ S ) t )(1) = X x ∈ Xχ S ( x )=1 t ( x ) = X x ∈ S t ( x ) , andΣ( fil S ( ♭ ( t ))) = X m ∈ M m · ( fil S ( ♭ ( t )))( m )= X m ∈ M m · X x ∈ S ♭ ( t )( m, x ) ! = X x ∈ S X m ∈ M m · ♭ ( t )( m, x ) | {z } t ( x )= m ̸ =0else 0 = X x ∈ S t ( x )Now we have that fil { } ( ♭ ( M ( χ S ) t ))( m ) = ♭ ( M ( χ S ) t )( m, ( P x ∈ S t ( x ) = m ̸ = 00 otherwiseand also merge ( fil S ( ♭ ( t )))( m ) = ( fil S ( ♭ ( t ))) = m ̸ = 00 otherwise= ( P x ∈ S t ( x ) = m merge has to sum up the monoid elements in its input bag, it runs in lineartime in the size of that bag, provided that addition of monoid elements is a constant-timeoperation. For the polynomial functor F Σ , the encoding ♭ : F Σ X → B ( N × X ) is already natural(see Proposition 3.3). Thus, merge = id is a minimization interface by Lemma 4.3 withconstant run-time. ◀ Proof of Proposition 4.7 We first prove the following technical proposition about merge: ▶ Proposition B.6. Suppose F is not the constant empty set functor ( CX = ∅ , F ̸ = C ) andis equipped with a subnatural encoding and a minimization interface merge . Then we have merge ( { [] } ) = { [] } . .-P. Deifel, S. Milius, T. Wißmann 29 Proof. Consider the diagram for the injective χ ∅ : 1 ↣ F B ( A × B AF B ( A × B A ♭ F χ ∅ fil ∅ B ( A × χ ∅ ) merge ♭ fil { } Note that F Set -functors except for the constant empty set functor,which is excluded by assumption. Hence, there is some x ∈ F merge ( { [] } ) = merge ( fil ∅ ( ♭ ( x ))) ( fil ∅ always returns { [] } )= fil { } ( ♭ ( χ ∅ ( x ))) ( merge axiom)= fil { } ( B ( A × χ ∅ )( ♭ ( x )))) ( ♭ subnatural)= { [] } (1 is not in the image of χ ∅ )as desired. ◀ We now proceed to prove Proposition 4.7: Proof. First, observe that for every function f : X → Y the following squares commute: X Z XY Z Y f Z ev ( z ) f ev ( z ) for every z ∈ Z . (14)We verify that the following diagram commutes for every y ∈ Y , where we define S = q − [ y ]: F X B ( A × X ) B ( A × Y ) B A ( Y ) B AF B ( A × B AF Y B ( A × Y ) B A ( Y ) F q ♭ X F χ S B.5 (3) fil S (9) B ( A × q ) fil { y } group ev ( y ) (8) merge ♭ (2) fil { } F χ { y } ♭ Y fil { y } group ev ( y ) (8) Instantiating (14) for f = merge yields ev ( y ) · merge Y = merge · ev ( y ). By virtue ofProposition B.6 and Assumption 4.6, merge preserves empty bags. Hence, the function merge Y : B ( A ) Y → B ( A ) Y defined as f merge · f preserves finite support and thereforerestricts to the monoid-valued functor as merge ( Y ) : B ( A ) ( Y ) → B ( A ) ( Y ) . Therefore, theoutside of the diagram together with the fact that ( ev ( y )) y ∈ Y is a jointly injective familyimplies F X B ( A × X ) B ( A × Y ) B ( A ) ( Y ) F Y B ( A × Y ) B ( A ) ( Y ) . ♭ X F q B ( A × q ) group merge ( Y ) ♭ Y group Post-composition with ungroup and the application of equation (1) now yields the desiredresult. ◀ Proof of Theorem 4.9 Proof. (1) Correctness. Combining that q is a coalgebra homomorphism with Proposition 4.7yields the following diagram, whose commutativity we discuss next: X F X B ( A × X ) B ( A × Y ) B ( A ) ( Y ) Y F Y B ( A × Y ) B ( A ) ( Y ) cq q coalgebramorphism ♭ X F q Proposition 4.7 B ( A × q ) group merge ( Y ) d e ♭ Y ungroup The two rectangles commute, and the outside of the diagram commutes by Construction 4.8.Hence, e · q = ♭ Y · d · q . Since q is surjective, we have e = ♭ Y · d as desired.(2) Runtime. For the implementation of Construction 4.8, assume that the encoded inputcoalgebra ♭ X · c : X → B ( A × X ) is given as adjacency lists and that the quotient map q : X ↠ Y is given as a partition on X . Such a partition is represented as an assignment q ′ : X ↠ { , . . . , | Y | − } which sends an element of X to the number of its block and whichcan be evaluated in O (1) (e.g. the refinable partition structure [43] represents partitionsin such a way and is in fact used by the coalgebraic algorithm [20]); in other words, weimplicitly use the bijection Y = { , . . . , | Y | − } . We now compute the composition ungroup · merge ( Y ) · group · B ( A × q ) · ♭ X · c | {z } s | {z } s | {z } s | {z } s | {z } s : X −→ B ( A × Y )from Construction 4.8 step by step: s := ♭ X · c : X → B ( A × X ) is the given input, encoded using adjacency lists, i.e. as anarray of size | X | whose entries are lists of elements from A × X . We denote its size by m := | X | + X x ∈ X | ♭ X ( c ( x )) | . For s := B ( A × q ) · s : X → B ( A × Y ), we iterate over all edges in the adjacency listsand replace every right-hand side x ∈ X of an edge by q ( x ) ∈ Y . This takes O ( m ) time( O (1) time for each of the m entries). For s := group · s : X → B ( A ) ( Y ) , we represent a map t ∈ B ( A ) ( Y ) as a list of pairs( y, t ( y )) ∈ Y × B ( A ) with t ( y ) non-empty and compute this list for all x ∈ X as follows.Allocate an array idx : Y → Z (initially − x ∈ X : a. Allocate an array p : N → Y × B ( A ) of size | s ( x ) | and initialize an integer i := 0(intuitively, i is the index of the first unused cell in p ). b. For every ( a, y ) ∈ s ( x ), we distinguish whether we have seen y in s ( x ) before:If idx( y ) < 0, then it is the first time we see y in s ( x ). Thus put idx( y ) := i ,increment i := i + 1, and define p (idx( y )) := ( y, { [ a ] } ). .-P. Deifel, S. Milius, T. Wißmann 31 If idx( y ) ≥ 0, then we have seen y before and simply append a to the secondcomponent of p (idx( y )). c. For every ( y, ℓ ) in the first i entries of p , put idx( y ) = − 1. (Thus, idx is again − d. Let s ( x ) be the first i entries of p For x ∈ X each of the above steps runs in O ( | s ( x ) | ), thus doing these for all x ∈ X runsin O ( m ) in total. For s := merge ( Y ) · s : X → B ( A ) ( Y ) , apply merge : B ( A ) → B ( A ) to every bag in thelist s ( x ) ∈ B ( A ) ( Y ) (we have represented s ( x ) as a list of elements from Y × B ( A ) inthe definition of s ). Since by assumption, merge runs in linear time, the present stepruns in O ( m ) time and moreover the size of the resulting s is still of size O ( m ). For s := ungroup · s : X → B ( A × Y ), first note that for every x ∈ X , the bag s ( x ) ∈B ( A ) ( Y ) is represented by a list of elements of Y × B ( A ), i.e. every ℓ ∈ s ( x ) is of type ℓ ∈ Y × B ( A ), thus we define s as the following multiset-comprehension: s ( x ) := { [ ( a, y ) | ( y, t ) ∈ s ( x ) , a ∈ t ] } ∈ B ( A × Y ) . This is computed in time | s ( x ) | for every x ∈ X and thus s can be computed intime O ( m ).Finally, for the definition of e : Y → B ( A × Y ), we allocate | Y | new adjacency lists, all ofthem empty initially. Then, for every x ∈ X , we put e ( q ( x )) := s ( x ) if e ( q ( x )) is empty (andskip otherwise). By the well-definedness of Construction 4.8 it does not matter which x ∈ X defines the outgoing edges of q ( x ) ∈ Y . This takes | X | < m time. Thus, all steps s , . . . , s and the final definition of e take O ( m ) time in total. ◀ Proof of Proposition 4.11 We first note a few technicalities before proceeding to the proof of Proposition 4.11. ▶ Remark B.7. We observe that for every i ∈ I , we have filter i ( merge ( t ))( a ) = merge ( t )( in i a ) = merge i ( filter i ( t ))( a ) . (15) In order to show that merge in Construction 4.10 indeed constitutes a lawful minimizationinterface, we use a different, but equivalent, definition of ♭ for Q i ∈ I F i : ♭ ′ = Q i ∈ I F i X Π i ∈ I ♭ i −−−−→ Q i ∈ I B ( A i × X ) concat −−−−→ B ( ‘ i ∈ I A i × X ) , (16)with concat given by concat ( t )( in i a, x ) = pr i ( t )( a, x ). This is indeed equivalent to theoriginal definition: ♭ ′ ( t )( in i a, x ) = concat ( Q j ∈ I ♭ j ( t ))( in i a, x )= pr i ( Q j ∈ I ♭ j ( t ))( a, x ) = ♭ i ( pr i ( t ))( a, x )= ♭ ( t )( in i a, x ) . We also need another auxiliary definition similar to concatconcat ′ : Q i ∈ I B ( A i ) → B ( ‘ i ∈ I A i ) concat ′ ( t )( in i a ) = pr i ( t )( a ) , (17) for which we observe the following properties: Q j ∈ I B ( A j ) B ( ‘ j ∈ I A j ) B ( A i ) concat ′ pr i filter i (18) Q i ∈ I B ( A i × X ) B ( ‘ i ∈ I A i × X ) Q i ∈ I B ( A i ) B ( ‘ i ∈ I A i ) concat Q i ∈ I fil S fil S concat ′ (19)Indeed, we have fil S ( concat ( t ))( in i a ) = X x ∈ S concat ( t )( in i a, x )= X x ∈ S pr i ( t )( a, x ) = fil S ( pr i ( t ))( a )= pr i ( Q j ∈ I fil S ( t ))( a )= concat ′ ( Q j ∈ I fil S ( t ))( in i , a )and filter i ( concat ′ ( t ))( a ) = concat ′ ( t )( in i a ) = pr i ( t )( a ) . The function filter i behaves as expected when injecting all elements of a bag into acoproduct and then immediately filtering this bag. Specifically, we have that filter i ·B ( in j ) = ( id i = j, { [] } ! i ̸ = j. (20)We are now ready to prove the main proposition: Proof of Proposition 4.11. 1. For the product functor Q i ∈ I F i , the following diagram com- .-P. Deifel, S. Milius, T. Wißmann 33 mutes for all i ∈ I : B ( ‘ j ∈ I A j × X ) Q j ∈ I F j X Q j ∈ I B ( A j × X ) Q j ∈ I B ( A j ) B ( ‘ j ∈ I A j ) F i X B ( A i × X ) B ( A i ) F i B ( A i × ) B ( A i ) B ( ‘ j ∈ I A j ) Q j ∈ I F j Q j ∈ I B ( A j × ) Q j ∈ I B ( A j ) B ( ‘ j ∈ I A j ) B ( ‘ j ∈ I A j × ) fi l S Q j ∈ I ♭ j p r i Q j ∈ I F j χ S ♭ ′ N a t u r a li t y o f p r i N a t u r a li t y o f p r i D e f . o f ♭ ′ ( ) concat Q j ∈ I fi l S ( ) p r i concat ′ fi l t e r i merge ( ) F i χ S ♭ i A x i o m merge i fi l S merge i ( ) ♭ i fi l { } ( ) fi l t e r i p r i Q j ∈ I ♭ j ♭ ′ N a t u r a li t y o f p r i D e f . o f ♭ ′ ( ) concat Q j ∈ I fi l { } ( ) p r i concat ′ fi l t e r i fi l { } Observe that for any two f, g ∈ B ( ‘ j ∈ I A j ) with f ̸ = g , there exists a j ∈ I such that filter j ( f ) ̸ = filter j ( g ): Let w.l.o.g. be x = in i a ∈ ‘ j ∈ I A j such that f ( x ) ̸ = g ( x ). Then wehave filter i ( f )( a ) = f ( in i a ) = f ( x ) ̸ = g ( x ) = g ( in i a ) = filter i ( g )( a ) . Hence, the family ( filter i ) i ∈ I is a point-separating source and therefore jointly monic.The desired equation merge · fil S · ♭ ′ = fil { } · ♭ ′ · Q j ∈ I F j χ S thus follows from the diagramabove. For the coproduct functor ‘ i ∈ I F i , we assume without loss of generality that F i ̸ = ∅ forall i ∈ I because summands which are constantly ∅ may be omitted from the coproductwithout changing it.We need to show merge ( fil S ( ♭ ( in i t )))( in j a ) = fil { } ( ♭ (( ‘ k ∈ I F k χ S )( in i t )))( in j a ) for every in i t ∈ ‘ k ∈ I F k X and in j a ∈ ‘ k ∈ I A k .We calculate as follows: merge ( fil S ( ♭ ( in i t )))( in j a )= merge j ( filter j ( fil S ( ♭ ( in i t ))))( a ) Def. of merge = merge j ( filter j ( fil S ([ B ( in k × X )] k ∈ I (( ‘ k ∈ I ♭ k )( in i t )))))( a ) Def. of ♭ = merge j ( filter j ( fil S ([ B ( in k × X )] k ∈ I ( in i ♭ i ( t )))))( a ) ‘ ♭ k · in i = in i · ♭ i = merge j ( filter j ( fil S ( B ( in i × X )( ♭ i ( t )))))( a ) [ f k ] · in i = f i = merge j ( filter j ( B ( in i )( fil S ( ♭ i ( t )))))( a ) Lemma B.2.1From here we proceed by case distinction. If i = j , we have merge i ( filter i ( B ( in i )( fil S ( ♭ i ( t )))))( a )= merge i ( fil S ( ♭ i ( t )))( a ) Remark B.7(3)= fil { } ( ♭ i ( F i χ S ( t )))( a ) Axiom of merge i = filter i ( B ( in i )( fil { } ( ♭ i ( F i χ S ( t )))))( a ) Remark B.7(3)= B ( in i )( fil { } ( ♭ i ( F i χ S ( t ))))( in i a ) Def. of filter i = fil { } ( B ( in i × X )( ♭ i ( F i χ S ( t ))))( in i a ) Lemma B.2.1= fil { } ([ B ( in k × X )] k ∈ I ( ‘ k ∈ I ♭ k ( ‘ k ∈ I F k χ S ( in i t ))))( in i a ) UMP of ‘ = fil { } ( ♭ ( ‘ k ∈ I F k χ S ))( in i a ) Def. of ♭ In the second case, i ̸ = j , we have merge j ( filter j ( B ( in i )( fil S ( ♭ i ( t )))))( a )= merge j ( { [] } )( a ) Remark B.7= { [] } ( a ) Proposition B.6 & Assumption 4.6= filter j ( B ( in i )( fil { } ( ♭ i ( F i χ S ( t )))))( a ) Remark B.7The remainder of the calculation is completely analogous to the first case. Since both the product and coproduct of functors share the same definition of merge ,its linear run-time complexity only needs to be verified once. To this end, we representbags B ( A ) as (linked) lists of elements from A (in lieu of maps A → N ) and rewrite thedefinition of merge such that it uses concat ′ from (17): merge ( t )( in j a ) = merge j ( filter j ( t ))( a ) Construction 4.10= pr j ( ⟨ merge i · filter i ⟩ i ∈ I ( t ))( a ) Def. of ⟨· · ·⟩ = concat ′ ( ⟨ merge i · filter i ⟩ i ∈ I ( t ))( in j a ) (17)Hence, merge is the composition B (cid:0)‘ i ∈ I A i (cid:1) ⟨ filter i ⟩ i ∈ I −−−−−−−→ Q i ∈ I B ( A i ) Π i ∈ I merge i −−−−−−−−→ Q i ∈ I B ( A i ) concat ′ −−−−−−→ B (cid:0)‘ i ∈ I A i (cid:1) . This composition can be readily implemented by the following algorithm. Given a bag t ∈ B (cid:0)‘ i ∈ I A i (cid:1) , let n be the number of elements in t and do: .-P. Deifel, S. Milius, T. Wißmann 35 a. Allocate an array of length | I | initially containing an empty bag of type B ( A i ) inthe i th component for all i ∈ I (this array represents an element of Q i ∈ I B ( A i )). b. Insert each label in i a from t into the i th bag; this implements ⟨ filter i ⟩ i ∈ I above. c. For each i ∈ I , apply merge i on the i th bag. d. Concatenate the resulting | I | lists (encoding bags of type B ( A i )) stored in our arrayto one list encoding the result bag of type B (cid:0)‘ i ∈ I A i (cid:1) .Each of those steps runs in O ( | I | + n ) time if merge i has linear run-time for every i ∈ I .Since | I | is constant, this amounts to O ( n ) overall. ◀ B.4 Proofs for Section 5 Gumm [26, Def. 7.2] defined the maps τ FX : F X → P X differently. We show that his definitionis equivalent to ours. ▶ Lemma B.8. The definition of τ FX in Definition 5.1 is equivalent to Gumm’s definition inop.cit. Proof. Before showing the equivalence, we need to recall other definitions that are used byGumm [26]. Recall that a filter G on a set X is a nonempty family G ⊆ P ( X ) that is closedunder binary intersection and supersets. The filter functor F is the Set -functor that sends aset X to the set of all filters on X (its definition on maps is not relevant to this proof). Fora given Set -functor F : Set → Set and sets U ⊆ X , the set[ F XU ] := F ( i : U , → X )[ F U ] ⊆ F X denotes the image of F i : F U → F X , where i : U , → X is the inclusion map. The notation[ F XU ] is monotone in U [26, Lemma 1], that is, V ⊆ U implies [ F XV ] ⊆ [ F XU ]. Moreover, onecan easily prove for t ∈ F X that t ∈ [ F XU ] ⇐⇒ t : 1 → F X factorizes through F i. (21)Using this notation, we define the following family of maps: µ X : F X → F X µ X ( t ) := (cid:8) U ⊆ X (cid:12)(cid:12) t ∈ [ F XU ] (cid:9) . For t ∈ F X , the intersection of all elements in µ X ( t ) yields a subset of X : \ µ X ( t ) = { x ∈ X | ∀ U ∈ µ X ( t ) : x ∈ U } ∈ P X. This is the definition of τ FX in op.cit . In order to prove that this definition is equivalent toours in Definition 5.1, we will prove that τ FX ( t ) = \ µ X ( t ) for all t ∈ F X. We have the following chain of equal sets, whose equality is established by performing equivalent rewrites in the comprehension formula: \ µ X ( t ) = { x ∈ X | ∀ U ∈ µ X ( t ) : x ∈ U } (Def. T )= { x ∈ X | ∀ U ⊆ X : t ∈ [ F XU ] → x ∈ U } (Def. µ X )= { x ∈ X | ∀ U ⊆ X : x ̸∈ U → t ̸∈ [ F XU ] } (Contraposition)= { x ∈ X | ∀ U ⊆ X with x ̸∈ U : t ̸∈ [ F XU ] } = { x ∈ X | ∀ U ⊆ X \ { x } : t ̸∈ [ F XU ] } = { x ∈ X | t ̸∈ [ F XX \{ x } ] } ( ∀ -instance & [ F XU ] monotone in U )= { x ∈ X | t : 1 → F X does not factor through F ( i : X \ { x } → X ) } (21)= τ XF ( t ) Def. τ XF ( t )This completes the proof. ◀ Proof of Proposition 5.5 Proof. We prove τ B ( A ×− ) X ( ♭ X ( t )) ⊆ τ FX ( t ) by contraposition. If x ∈ X is not in τ FX ( t ), thenwe show that it is not in τ B ( A ×− ) X ( ♭ X ( t )) by proving that the following diagram commutes:1 F X B ( A × X ) F ( X \ { x } ) B ( A × ( X \ { x } ) tt ′ ♭F i ♭ B ( A × i ) First, observe that x ̸∈ τ FX ( t ) implies that the map t : 1 → F X factorizes through F ( X \{ x } ) F i −→ F X (cf. Definition 5.1), and we therefore obtain t ′ as shown in the left triangle. Theright rectangle commutes by the subnaturality of ♭ . Therefore, 1 t −→ F X ♭ −→ B ( A × X ) factorsthrough B ( A × X \ { x } ) B ( A × i ) −−−−−→ B ( A × X ) and thus x can not be in τ B ( A ×− ) X ( ♭ ( t )). We haveshown that x ̸∈ τ FX ( t ) implies x ̸∈ τ B ( A ×− ) X ( ♭ ( t )); equivalently, we have τ B ( A ×− ) X ( ♭ ( t )) ⊆ τ FX ( t )as required. ◀ Proof of Theorem 5.6 Proof. Having established one inclusion in Proposition 5.5 already, we prove the remaininginclusion τ FX ( t ) ⊆ τ B ( A ×− ) X ( ♭ X ( t )) by contraposition: x ̸∈ τ B ( A ×− ) X ( ♭ X ( t )) = ⇒ x ̸∈ τ FX ( t ) for all x ∈ X. To this end, suppose that x ∈ X satisfies x ̸∈ τ B ( A ×− ) X ( ♭ X ( t )). This implies that there existssome t ′ ∈ B ( A × ( X \ { x } )) such that the diagram below commutes:1 F X B ( A × X ) B ( A × ( X \ { x } )) t t ′ ♭ X B ( A × i ) with XX \ { x } . i For a fixed b ∈ { , } , we define the injective auxiliary map ( x ⇝ b ) by( x ⇝ b ) : X → ( X \ { x } ) + 2 ( x ⇝ b )( y ) = ( b if y = xy otherwise. .-P. Deifel, S. Milius, T. Wißmann 37 We will now prove the following equality F ( x ⇝ t ) = F ( x ⇝ t ) (22)We have the following commutative diagrams (for b = 0 , F ( X \ { x } + 2) F × B ( A × ( X \ { x } + 2)) F X F × B ( A × X )1 F × B ( A × ( X \ { x } )) ⟨ trivial , subnaturality ⟩ ⟨ F ! ,♭ X \{ x } +2 ⟩ F ( x ⇝ b ) ⟨ F ! ,♭ X ⟩ F ×B ( A × ( x ⇝ b )) t ⟨ F ! · t, t ′ ⟩ (Def. of t ′ ) F ×B ( A × i ) F ×B ( A × inl ) Note that the lower right outside path via t ′ does not mention b at all. Hence, we have: ⟨ F ! , ♭ X \{ x } +2 ⟩ ( F ( x ⇝ t )) = ( F × B ( A × inl ))( F !( t ) , t ′ )= ⟨ F ! , ♭ X \{ x } +2 ⟩ ( F ( x ⇝ t )) . By assumption F has a refinement interface, and so we know that the map ⟨ F ! , ♭ X \{ x } +2 ⟩ is injective by Proposition 3.7. Thus, we obtain the desired equation (22). Rephrased as adiagram, we see that the outside of the following diagram commutes: F X F ( X \ { x } + 2) F ( X \ { x } ) F X F ( x ⇝ F i F i F ( x ⇝ t tt ′′ Regarding the square, note that X \ { x } is the intersection of the injective maps ( x ⇝ 0) : X ↣ X \ { x } + 2 and ( x ⇝ 1) : X ↣ X \ { x } + 2. Since F preserves intersections, wethus see that the above square is a pullback. Since the outside commutes, we obtain the abovedashed map t ′′ : 1 → F ( X \ { x } ) with F i · t ′′ = t . By the definition of τ FX (see Definition 5.1),this implies that x ̸∈ τ FX ( t ), as desired.), as desired.