<<

Complete Axioms for Categorical Fixed-point Operators

Alex Simpson∗ and Gordon Plotkin† LFCS, Division of Informatics, University of Edinburgh, JCMB, King’s Buildings, Edinburgh, EH9 3JZ als,gdp @dcs.ed.ac.uk { }

Abstract an associated fixed-point operator. Not only are there many familiar order-theoretic variations on the notions of com- We give an axiomatic treatment of fixed-point operators plete partial order and continuous , but there are in categories. A notion of iteration operator is defined, em- also many categories of “domains” based on somewhat dif- bodying the equational properties of iteration theories. We ferent principles — for example, categories of games and prove a general completeness theorem for iteration opera- strategies [21], realizability-based categories [20] and cate- tors, relying on a new, purely syntactic characterisation of gories of abstract geometric structures [12]. Thus one needs the free iteration theory. generally applicable methods for establishing properties of We then show how iteration operators arise in axiomatic the associated fixed-point operators. . One result derives them from the existence In this paper, we analyse the equational properties of of sufficiently many bifree algebras (exploiting the universal fixed-point operators in arbitrary categories of “domain- property Freyd introduced in his notion of algebraic com- like” structures. In Section 2, we consider the basic notions pactness). Another result shows that, in the presence of a of (parameterized) fixed-point operator, Conway operator parameterized natural numbers object and an equational and iteration operator, developed from analogous notions lifting monad, any uniform fixed-point operator is neces- in Bloom and Esik’s´ study of iteration theories [3]. Our defi- sarily an iteration operator. nitions are straightforward adaptations of Bloom and Esik’s´ to the general setting of a category with finite products. In particular, the notion of iteration operator is intended to 1. Introduction capture all desirable equational properties of a fixed-point operator, as exemplified by the many completeness results Fixed points play a central roleˆ in domain theory. Tra- for the free iteration theory in [3]. ditionally, one works with a category such as Cppo, the As in the case of the fixed-point operator on Cppo, we category of ω-continuous functions between ω-complete also consider a notion of (parameterized) uniformity for pointed partial orders. This possesses a least-fixed-point (parameterized) fixed-point operators. We define this in operator, whose properties are well understood. For exam- general assuming a suitable functor J : from a S → D ple, a theorem of Bekic˘ states that least simultaneous fixed category of “strict” maps. In practice, (parameterized) S points can be found in sequence by a form of Gaussian elim- uniformity serves two purposes. First, it is often satisfied ination, see e.g. [33]. More generally, the equational theory by a unique (parameterized) fixed-point operator, and so between fixed-point terms (µ-terms), induced by the least- characterises that operator. Second, any parametrically uni- fixed-point operator, has been axiomatized as the free iter- form Conway operator is an iteration operator, so parame- ation theory of Bloom and Esik´ [3]. (This theory is known terized uniformity is a convenient tool for establishing that to be decidable.) Also, Eilenberg [6] and Plotkin [25] gave the equations of an iteration operator are satisfied. an order-free characterisation of the least-fixed-point opera- In Section 3, we examine the equational theory of itera- tor as the unique fixed-point operator satisfying a condition tion operators. We use a syntax of multisorted fixed-point known as uniformity, expressed with respect to the subcate- terms (µ-terms), which can be interpreted in any category gory Cppo of strict maps in Cppo, see e.g. [15]. with an iteration operator. In any such category, Bloom ⊥ Nowadays, one appreciates that Cppo is one of many and Esik’s´ axioms for iteration theories [3] are sound. possible categories of “domain-like” structures, each with Bloom and Esik´ provide numerous completeness theorems,

∗Research supported by EPSRC grant GR/K06109. demonstrating that the iteration theory axioms are also com- †Research supported by EPSRC grant GR/M56333. plete for deriving the valid equations in many familiar cat- egories with iteration operators. The first main contribu- tion spaces (Kleisli exponentials [22, 28]), and a (parameter- tion of this paper is a precise characterisation of the circum- ized) natural numbers object. These conditions are always stances in which the iteration theory axioms are complete satisfied by the categories of predomains that arise in ax- (Theorem 1). This result accounts for all the examples in iomatic and synthetic domain theory [10, 12, 20, 11, 26, 30]. [3]. It shows that, in non-degenerate categories, the sound- Theorem 4 states that such categories support at most one ness of the iteration theory axioms implies their complete- uniform operator (a T -fixed-point operator), and ness. This explains the ubiquity of completeness results for moreover it determines a unique parametrically uniform the free iteration theory. Conway operator on the associated category of domains. Our completeness theorem follows from a new, purely Thus, in the presence of a lifting monad and a parameter- syntactic characterisation of the free iteration theory as ized natural numbers object, uniformity alone implies all a maximal theory satisfying two properties: closed con- equational properties of fixed points. sistency and typical ambiguity (Theorem 2). This result, which is of interest in its own right, was inspired by Stat- 2. Fixed-point operators man’s characterisation of βη-equality in the simply-typed λ-calculus [31]. In this section we give an overview of the various no- The remainder of the paper is devoted to providing con- tions of fixed-point operator we shall be concerned with. ditions for establishing the existence (and uniqueness) of We work with a category, , with distinguished finite prod- parametrically uniform Conway operators (hence iteration ucts, to be thought of as aD category of “domains”. We write operators). In one common setting, which arises in ax- 1 for the terminal object. iomatic domain theory [13, 10, 12], one has that the cate- gory of “domains” is obtained as the co-Kleisli category Definition 2.1 (Fixed-point operator) A fixed-point oper- D of a comonad on the category of strict maps . (For exam- ator is a family of functions ( )∗ : (A, A) (1,A) S - · D → D ple, is the co-Kleisli category of the lifting comonad such that, for any f : A A, f f ∗ = f ∗. Cppo ◦ on Cppo .) In axiomatic domain theory, satisfies a cu- ⊥ Definition 2.2 (Parameterized fixed-pt. op.) A parame- rious property, first identified by Freyd [13,S 14]: a wide terized fixed-point operator is a family of functions class of endofunctors on have initial algebras whose in- S ( )† : (X A, A) (X,A) satisfying: verses are final coalgebras (in Freyd’s terminology, is · D × → D S algebraically compact). Following [7], we call such ini- 1. (Naturality.) tial/final algebras/coalgebras bifree algebras. (In the exam- For any g : X - Y and f : Y A - A, ple of Cppo , every Cppo-enriched endofunctor has a - × f † g = (f (g id ))† : X A. bifree algebra⊥ [10].) ◦ ◦ × A In Section 5, we give a quick overview of initial algebras, 2. (Parameterized fixed-point property.) final coalgebras and bifree algebras, including a couple of For any f : X A - A, × - minor new propositions. Then, in Section 6, we show how f idX , f † = f † : X A. bifree algebras in can induce properties of fixed-point op- ◦ h i erators in . ThisS programme was begun by Freyd and oth- Observe that a parameterized fixed-point operator corre- D X ers [13, 5, 24, 28]. A further step was taken by Moggi, who, sponds to a family of fixed-point operators ( )∗ in the co- · in unpublished work, gave a direct verification of the Bekic˘ Kleisli categories X ( ) of X ( ) comonads. In this D × − × − equality. Here, we give the complete story, showing how the formulation, naturality states that, for any g : X - Y , presence of sufficiently many bifree algebras determines a the induced functor Hg : Y ( ) X ( ) preserves D × − → D × − unique parametrically uniform Conway operator (hence it- the fixed-point operators in the sense that, for any endomor- - eration operator). phism in Y ( ), given by a morphism f : Y A A D × − × in , it holds that H (f ∗Y ) = (H f)∗X . In Section 7 we show how the Conway operator iden- D g g tities can be established without assuming the existence of In practice, well-behaved fixed-point operators satisfy the bifree algebras used in Section 6. This is possible when many other equations that do not follow from the fixed-point the category of “strict” maps arises as the category of al- property alone. S gebras for a “lifting monad” on a suitable category of “pre- Definition 2.3 (Dinaturality) A fixed-point operator is domains” . (For example, Cppo is the category of alge- said to be dinatural if, for every f : A - B and bras for theC usual lifting monad on⊥ the category Cpo of, not - g : B A, it holds that (f g)∗ = f (g f)∗. necessarily pointed, ω-complete partial orders.) Axiomati- ◦ ◦ ◦ cally, we assume that is a category with finite products, a Definition 2.4 (Conway operator) A Conway operator is monad embodying theC equational properties of partial map a parameterized fixed-point operator that, in addition, satis- classifiers (an equational lifting monad [4]), partial func- fies: 3. (Parameterized dinaturality.) (Here Am is the m-fold power A ... A, and - m ×1 × For any f : X B - A and g : X A - B, ∆m : A A is the diagonal.) × × - f id , (g π , f )† = (f π , g )† : X A. ◦ h X ◦ h 1 i i ◦ h 1 i The complex formulation of the commutative identities 4. (Diagonal property.) means that they can be hard to establish in practice. One way of reducing the complexity is to look for simpler For any f : X A A - A, (f (id ∆)) = X † equational axiomatizations. For example, Esik´ [9] has re- (f ) : X -× A×(where ∆ : A ◦- A ×A is the † † cently proved that it suffices to consider certain instances diagonal map). × of the commutative identities generated, in an appropriate It is easily seen that (parameterized) dinaturality implies the sense, by finite groups. However, in many situations, it is (parameterized) fixed-point property, so 2 of Definition 2.2 more convenient to derive the commutative identities from is redundant in the axiomatization of Conway operators. (more easily established) non-equational properties that im- The reason for singling out dinaturality is that it is a con- ply them. Many examples of such properties are given by cept that makes sense for unparameterized fixed-point op- Bloom and Esik´ [3]. In this paper we shall be concerned erators. It is also a powerful property. In special circum- with one such property: (parameterized) uniformity. stances, it alone characterises a unique well-behaved fixed- To define (parameterized) uniformity, we suppose given point operator [29]. a category with finite products and the same objects as , Mainly, however, we shall be interested in well behaved together withS a functor J : that strictly preservesD parameterized fixed-point operators, and the notion of Con- finite products and is the identityS → D on objects. We use the way operator is appropriate. Conway operators are so symbol for maps in , and we call morphisms in named because their axioms correspond to those of the Con- in the image of◦ J strict. (WeS really just need the subcategoryD way theories of Bloom and Esik´ [3]. They have also arisen of consisting of strict maps, but the functorial formulation independently in work of M. Hasegawa [16] and Hyland, willD be helpful in Section 6. Observe that morphisms given who established a connection with Joyal, Street and Verity’s purely by the finite product structure on are strict.) notion of trace [18]. The definition of trace makes sense D Definition 2.7 (Uniformity) A fixed-point operator is said in any braided monoidal category. Hasegawa and Hyland to be uniform (with respect to J) if, for any f : A - A, showed that, in the special case that the monoidal product g : B - B and h : A B, Jh f = g Jh implies is cartesian, traces are in one-to-one correspondence with ◦ ◦ ◦ g∗ = Jh f ∗. Conway operators. ◦ There are many alternative axiomatizations for Conway Definition 2.8 (Parameterized uniformity) A parameter- operators. The axioms for a trace provide one possibility. ized fixed-point operator is said to be parametrically uni- Other options are discussed in [3, 16]. The following im- form if, for any f : X A - A, g : X B - B portant property often appears in variant axiomatizations. and h : A B, Jh× f = g (id ×Jh) implies ◦ ◦ ◦ X × g† = Jh f †. Proposition 2.5 (Bekic˘ property) For any Conway opera- ◦ tor, given f, g : X A B - A B, it holds that Observe that parameterized uniformity is just the state- h i × × × - f, g † = h, (g ( idX , h idB))† : X A B, ment that the fixed-point operator ( )∗X in each co-Kleisli h i h ◦ h i × i- × · where h = (f idX A, g† )† : X A. category X ( ) is uniform with respect to the composite ◦ h × i D × − In spite of such consequences, there are basic equalities functor X ( ). Hasegawa gives an interesting S → D → D × − that Conway operators do not necessarily satisfy; for exam- reformulation of parameterized uniformity directly in terms of a trace [16]. If is defined to be the subcategory of ple, it is not true in general that f ∗ = (f f)∗ for an en- S domorphism f. The commutative identities◦ of Bloom and morphisms given purely by the finite product structure on Esik´ [3] ensure that such “missing” equalities do hold. , then parameterized uniformity is exactly the functorial daggerD implication for base morphisms of [3]. Definition 2.6 (Iteration operator) An iteration operator is a Conway operator that, in addition, satisfies: Proposition 2.9 Any parametrically uniform Conway op- erator is an iteration operator. 5. (Commutative identities.) The proof is an easy application of the strictness of all diag- Given f : X Am - A and morphisms onals - m. ρ , . . . , ρ :×Am - Am such that each ρ = ∆m : A A 1 m i The converse to proposition 2.9 does not hold in general, pi1, . . . , pim is a tuple of projections (i.e. each pij is h i m - see [8]. one of the m projections π1, . . . , πm : A A), it holds that 1Strictly speaking, we consider only instances of the commutative iden- tities of [3] in which their “surjective base morphism” ρ is a diagonal ∆m. f (idX ρ1), . . . , f (idX ρm) † = The general commutative identities of [3] follow from such instances, us- h ◦ × ◦ × i - m ∆ (f (id ∆ ))† : X A ing properties of Conway operators. m ◦ ◦ X × m 3. Completeness We now axiomatize Conway theories, in which µ corre- sponds to a Conway operator, and iteration theories, identi- fying the equational properties of an iteration operator. In this section we introduce Bloom and Esik’s´ iteration theories [3], using a syntax of multisorted fixed-point terms Definition 3.1 (Conway theory) A theory is said to be a ( -terms). We prove a very general completeness theorem µ Conway theory if it satisfies two axioms: T (Theorem 1) for the free iteration theory relative to interpre- tations in categories with iteration operators. The complete- 1. (Dinaturality.) ness theorem follows from a new syntactic characterisation For any t(~z, yτ ): σ and t (~z, xσ): τ, of the free iteration theory (Theorem 2). 0 µx. t[t0/y] = t[µy. t0[t/x]/y]: σ. We assume given a nonempty collection of base types T ` (or sorts), over which α, β, . . . range. Types σ, τ, . . . are 2. (Diagonal property.) either base types or product types σ ... σ (for 1 × × n For t(~z, xσ, yσ): σ, µx. t[x/y] = µx. µy. t : σ. n 0). We use σn as an abbreviation for the n-fold T ` power≥ σ ... σ. We assume also a signature given × × These axioms are just the multisorted version of the axiom- by a Σ of function symbols, each with an associated atization given by Corollary 6.2.5 of [3], where dinaturality typing information of the form (α1, . . . , αn; β) (there is no and the diagonal property are called the composition iden- loss of generality in considering only base types here). We tity and the double dagger identity respectively. loosely refer to both (α1, . . . , αn; β) and n as the arity of the function symbol. Constants are considered as func- Definition 3.2 (Iteration theory) We say that a Conway tion symbols with arity 0. We assume a countably infi- theory is an iteration theory if it satisfies the following nite set of variable symbols x, y, . . . A variable is a pair, axiom schema.T written xσ, consisting of a variable symbol and a type (we omit the type superscript when convenient). Terms and 3. (Amalgamation.) their types are given by: each variable xσ is a term of σ σ For any terms t1, . . . , tn(~z, x1 , . . . , xn): σ and type σ; if t1, . . . , tn are terms of (base) types α1, . . . , αn s(~z, yσ): σ, suppose t [y, . . . , y / x , . . . , x ] s, i 1 n ≡ and f is a function symbol of arity (α1, . . . , αn; β) then for all i with 1 i n, then it follows that is a term of (base) type ; if are ≤ ≤ Tn ` f(t1, . . . , tn) β t1, . . . , tn µ x1, . . . , xn . t1, . . . , tn = µy. s, . . . , µy. s : σ . terms of types σ , . . . , σ then t , . . . , t is a term of type h i h i h i 1 n h 1 ni σ ... σ ; if t is a term of type σ ... σ then Amalgamation is very close to the commutative identities 1 × × n 1 × × n π t, where 1 i n, is a term of type σ ; if t is a term of [3] (as in Definition 2.6). An alternative formulation is i ≤ ≤ i of type σ then µxσ. t is a term of type σ. As usual, the employed in [17], whose alphabetic identification identity variable x is bound by µ in µx. t. We identify terms up to is equivalent to amalgamation. α-equivalence, writing t t0 for the identity of terms. We We write for the smallest Conway theory (generated σ1 σk ≡ F write t(x1 , . . . , xk ): τ for a term of type τ all of whose by the given base types and signature), and for the small- σ1 σk I free variables are contained in x1 , . . . , xk . We call a term est iteration theory. As is shown in [3], completely cap- with no free variables closed. We write the substitution of n tures the valid identities in a wide class ofI models, includ- terms t1, . . . , tn for n distinct free variables x1, . . . , xn (of ing Cppo. We write ∗ for the smallest iteration theory I the correct types) in a term t as t[t1, . . . , tn / x1, . . . , xn]. in which all closed terms (with identical types) are equated. σ1 σn Given t(~y, x1 , . . . , xn ): σ1 ... σn, we use the con- Although ∗ is not a closed-consistent theory, it is nonethe- σ1 σ×n × I venient notation µ x1 , . . . , xn . t to represent the term less consistent. In fact, ∗ exactly captures the valid identi- σ1 ... σn h i I µx × × . t[π1x, . . . , πnx / x1, . . . , xn]. ties in Cppo . Our aim in this section is to prove a general A theory, , is a typed congruence relation on terms that: completeness⊥ theorem, accounting for all such complete- T contains the product equations, i.e. π t . . . , t = t ness results for and ∗. T ` ih 1 ki i and t = π t, . . . , π t (for t : σ ... σ ); and is First, we considerI I the interpretation of µ-terms in any T ` h 1 k i 1 × × k closed under substitution (i.e. if t = t0 and s : σ then category with finite products and a family of functions σ σ T ` D t[s/x ] = t0[s/x ]). For any theory, t = t0 if and ( )† : (X A, A) (X,A) satisfying the naturality T ` σ σ Tσ `... σ · D × → D only if (t = t0)[ x 1 , . . . , x n /x 1× × n ] where property of Definition 2.2. An interpretation is determined T ` h 1 n i x1, . . . , xn are fresh variables. Thus a theory is determined by a function [[ ]] from base types to objects of , together by its equations between terms whose only free variables with a function· mapping each function symbolDf, of arity are of base type. We say that is consistent if there are two (α , . . . , α ; β), to a map [[f]] : [[α ]] ... [[α ]] - [[β]]. T 1 k 1 × × k terms t, t0 of the same type such that t = t0. We say The first function extends (using products) to one from ar- that is closed-consistent if there areT two 6` such terms that bitrary types to objects of , and the second extends to T σ1D σk are closed. one mapping any term t(x1 , . . . , xk ): τ to a morphism [[t]] : [[σ ]] ... [[σ ]] - [[τ]]. Such an interpretation 2. If is a closed-consistent typically ambiguous Con- 1 × × k T determines a theory [[ ]] defined by [[ ]] t(~x) = t0(~x) iff way theory then . T · T · ` T ⊆ I [[t]] = [[t0]]. We have no reason to favour one interpretation 3. If is a consistent typically ambiguous Conway the- in over another, so we shall be more interested in the the- T D ory then ∗. ory determined by the category itself. This theory, , is T ⊆ I defined by t(~x) = t (~x) iff, for all interpretationsTD [[ ]] 0 The proof is outlined in the next section. in , it holdsTD that` [[t]] = [[t ]]. · 0 The theorem characterises as the greatest element in DIt is immediate from the definitions that if ( ) is a Con- ∗ † the of consistentI typically ambiguous way operator then is a Conway theory (i.e. · ). It D D Conway theories (ordered by inclusion). Also, when Σ is is also straightforwardT (although not quite immediate)F ⊆ T that nonempty, is the maximum closed-consistent typically if ( )† is an iteration operator then is an iteration the- I · TD ambiguous Conway theory. (If Σ is empty then is not ory (i.e. ). Further, if every hom-set (1,X) is a I I2 ⊆ TD D closed-consistent, indeed = ∗.) For countable Σ, there singleton (i.e. if 1 is a zero object in ) then ∗ . I I D I ⊆ TD are 2ℵ0 typically ambiguous Conway theories (this follows Theorem 1 (Completeness) If ( )† on is an iteration op- from the analysis of the group identities in [9]). erator then: · D Theorem 1 follows easily from Theorem 2. First observe that for any and ( )† (natural in X), the theory is al- 1. If there exists a hom-set (1,X) containing at at least D · TD D ways typically ambiguous (because any ( )∗ and θ deter- two distinct morphisms then = . mine a mapping between interpretations).· Also is con- TD I TD 2. If 1 is a zero object and there exists a hom-set (X,Y ) sistent if and only if is non-trivial (i.e. not equivalent D to the terminal category);D and it is closed-consistent if and containing two distinct morphisms then = ∗. TD I only if Σ is nonempty and there exists a hom-set (1,X) D The only examples not captured by one of the conditions with at least two distinct elements. With these observations, above are categories equivalent to the terminal category, Theorem 1 is immediate. in which case is theD inconsistent theory. TD We prove the theorem by obtaining a syntactic charac- 4. Proof of Theorem 2 terisation of the free iteration theory. Suppose that ( )∗ is any function from base types to types. Suppose also· that The first part of the proof follows the standard proof of θ is a function mapping each function symbol f of arity the completeness of the free iteration theory relative to an α1∗ α∗n (α1, . . . , αn; β) to a term fθ(z1 , . . . , zn ): β∗. Then interpretation in regular trees, see, in particular, Sections 5.4 ( )∗ extends (by substitution) to an endofunction on types. · and 6.4–5 of [3] (see also the recent [17]). We outline the Similarly, θ extends to a function on terms, mapping each main steps, because the associated notion of normal form σ1 σk σ1∗ σk∗ t(x1 , . . . , xk ): τ to a term tθ(x1 , . . . , xk ): τ ∗, de- and its properties are needed for Lemma 4.3. fined inductively on the structure of t by: The notion of normal form is defined for terms s(xα1 , . . . , xαk ): σ (with only free variables of base type), xσθ = xσ∗ 1 k by induction on the structure of σ. For base types β, the f(t , . . . , t )θ = fθ[t θ, . . . , t θ / z , . . . , z ] β 1 n 1 n 1 n normal forms are terms π (µ y 1 , . . . , yβm . u , . . . , u ) (µxσ. t)θ = µxσ∗ . (tθ) 1 h 1 m i h 1 mi where β1 is β such that, for each i with 1 i m, one of t1, . . . , tn θ = t1θ, . . . , tnθ ≤ ≤ h i h i three possibilities holds for ui: (i) ui is yi (note it cannot be (πit)θ = πi(tθ). yj for j = i); (ii) ui is a free variable from x1, . . . , xk; (iii) u is of6 the form f (y , . . . , y ) for some function We say that is typically ambiguous if t = t0 : σ i i pi(1) pi(ai) T T ` symbol f (with arity a ) and function p : 1, . . . , a implies, for all ( )∗ and θ as above, tθ = t0θ : σ∗. In i i i i · T ` { } → the terminology of [9], is typically ambiguous iff it con- 1, . . . , m . For product types σ1 ... σn the normal T {forms are} terms s , . . . , s where× each×s is in normal tains the vector forms of all its equations. , and ∗ are h 1 ni i all examples of typically ambiguous theories.F I In eachI case, form. The restriction to free variables of base type is just a syntactic convenience to avoid considering additional sub- one proves that t = t0 implies tθ = t0θ by a straightforward terms (such as projections on variables of product type). induction on the derivation of t = t0.

α1 αk Theorem 2 Lemma 4.1 For any term t(x1 , . . . , xk ): σ, there exists a term s in normal form such that t = s : σ. 1. The only consistent typically ambiguous iteration the- F ` ories are and ∗. We next define two interpretations of normal forms I I 2Note that the existence of ( ) implies that (1,X) is always of base type as (regular) trees. Consider a term † α nonempty. · D u(xα1 , . . . , x k ): β ... β of the form 1 k 1 × × m µ y1, . . . , ym . u1, . . . , um subject to the restrictions im- Lemma 4.3 Suppose is a typically-ambiguous Conway h i h i α1 T αk posed in the definition of normal form. For mnemonic ben- Theory, s, s0(x1 , . . . , xk ): β are normal forms and efit, we henceforth use y (where 1 i m) to represent s = s0. i ≤ ≤ T ` the term πi(u). To each such term yi we assign trees, [[yi]] 1. If is closed-consistent then [[s]] = [[s0]]. and [[yi]]∗, whose nodes are labelled by elements from the T set Σ+ = Σ β1 ,..., βm xα1 , . . . , xαk . ∪ {⊥ ⊥ } ∪ { 1 k } 2. If is consistent then [[s]]∗ = [[s0]]∗. Formally, such a tree, t, is a partial function from N∗ (fi- T + nite sequences of natural numbers) to Σ whose domain of PROOF For statement 1, suppose [[s]] = [[s0]]. Let r : σ definition is nonempty, closed under prefixes and satisfies: be any closed term. We show that r =6 µyσ. y. Thus T ` T for any w N∗, t(wn) is defined if and only if t(w) Σ, is not closed-consistent. ∈ ∈ 1 n arity(t(w)) and the result type of t(wn) is the Let w N∗ be a sequence of minimum length such ≤ ≤ ∈ n-th argument type of t(w). Given such a tree, t, and an that [[s]](w) = [[s0]](w) (both [[s]](w) and [[s0]](w) are there- 6 element w N∗ such that t(w) is defined, we write t@w fore defined). Without loss of generality, we assume that ∈ for the subtree w0 t(ww0). We say that t is regular if the [[s]](w) = . We shall define a suitable ( )∗ and θ (as in set of all its subtrees,7→ t@w t(w) is defined , is finite. the definition6 ⊥ of typical ambiguity) allowing· us to bring the { | } To define [[yi]], we first define a partial function ρi from disagreement between [[s]] and [[s0]] up to the top level. N∗ to 1, . . . , m . On the empty sequence, , define ρi() = We write w as n1 . . . nd (where d 0), and wi for { } ≥ i. On a nonempty sequence wn, ρi(wn) is defined iff ρi(w) its prefix n1 . . . ni (where 0 i d). For each base is defined, u is f (y , . . . , y ) and 1 n type α, define α = σd+1,≤ where≤σ is the type of the ρi(w) j pj (1) pj (aj ) ≤ ≤ ∗ aj; in which case ρi(wn) = pj(n). Finally, we define a closed term r. For each function symbol f, of arity + σd+1 σd+1 d+1 function λ : 1, . . . , m Σ by: if ui is yi then λ(i) = (α1, . . . , αn; β0), we define fθ(z1 , . . . , zn ): σ βi { } → ; if ui is a free variable x then λ(i) = x; and if ui is by fθ = uf , . . . , uf where: ⊥ h 1 d+1i fi(ypi(1), . . . , ypi(ai)) then λ(i) = fi. The desired tree [[yi]] is defined as the composition [[y ]] = λ ρ . i i πi+1(zni ) if 1 i d and [[s]](wi 1) = f We define from as follows.◦ Say that is f ≤ ≤ − [[yi]]∗ [[yi]] w ui = r if i = d + 1 and [[s]](w) = f  σ open in [[yi]] if there exists w0 such that [[yi]](ww0) µy . y otherwise. α1 αk ∈  x1 , . . . , xk . Say that w is closed in [[yi]] if [[yi]](w) is defined{ and w is} not open. Say that w is minimally closed if Then, as in the definition of typical ambiguity, θ determines σd+1 σd+1 d+1 it is closed, but no proper prefix is. Then [[yi]]∗(w) is defined terms sθ, s0θ(x1 , . . . , xk ) of type σ . By typical d+1 if and only if w is either open in [[yi]] or minimally closed. In ambiguity, sθ = s0θ. Define terms t1, . . . , tk : σ Tσ ` σ the case that w is open, define [[yi]]∗(w) = [[yi]](w). In the by: ti is µy . y, . . . , µy . y if [[s]](w) = xi, and ti is βρ (w) h i 6 case that w is minimally closed, define [[yi]]∗(w) = i . r, . . . , r if [[s]](w) = xi (only the last component of α1 ⊥αk h i ~ Given a normal form of base type, s(x1 , . . . , xk ): β, these tuples is important). We write [t/~x] for the sub- σd+1 σd+1 we have that s π1(u) for some u of the form above. Ac- stitution [t , . . . , t /x , . . . , x ]. By the substitu- ≡ 1 k 1 k cordingly, we have trees [[s]] = [[y1]] and [[s]]∗ = [[y1]]∗ asso- tion property of theories, sθ[~t/~x] = s0θ[~t/~x]. How- T ` ciated to s itself. ever, we prove below that π1(sθ[~t/~x]) = r and π (s θ[~t/~x]) = µyσ. y. ThusF ` indeed r = µyσ. y. α1 αk 1 0 Lemma 4.2 For normal forms s, s0(x1 , . . . , xk ): β: F ` T ` For the proof that π1(sθ[~t/~x]) = r, sup- pose is whereF ` is a term of the form 1. If [[s]] = [[s0]] then s = s0. s π1(u) u I ` µ y , . . . , y . u , . . . , u . As earlier, we write y for h 1 mi h 1 mi i 2. If [[s]]∗ = [[s0]]∗ then ∗ s = s0. the term π (u). We write ρ for the partial function ρ from I ` i 1 to 1, . . . , m used in the definition of [[s]]. By working The lemma is proved by defining, for every regular tree t, N∗ from i{= d + 1 down} to i = 1, one calculates that, for any i a canonical normal form t . One then proves that, for ev- t with 1 i d + 1, it holds that ery normal form s, s = t and ∗ s = t . ≤ ≤ I ` [[s]] I ` [[s]]∗ This requires various consequences of amalgamation. Sim- ~ πi(yρ(wi 1)θ[t/~x]) = r. ilar arguments can be found in Sections 5.4 and 6.4–5 of [3] F ` − and also in [17]. The lemma follows. The desired equality is just the special case i = 1. σ The argument thus far has established the known com- The proof that π1(s0θ[~t/~x]) = µy . y is very simi- pleteness of the iteration theory axioms relative to regular lar, again proving anF equality ` for i = d+1 which propagates trees. To prove Theorem 2, we show that distinct regular down to the desired case for i = 1, using the normal form trees can never be identified in a typically ambiguous way expansion of s0. The crucial fact required in the argument without losing (closed) consistency. The proof adapts the is that [[s0]](wi 1) = [[s]](wi 1) if and only if i d, which “Bohm-out”¨ method from the λ-calculus [1]. follows from the− choice of w−. ≤ σ - - For statement 2, suppose [[s]]∗ = [[s0]]∗. Let x be any phism from a : FA A to b : FB B is a mor- variable. We show that xσ =6 µyσ. y. Thus is not phism f : A - B such that f a = b F f. An initial consistent. T ` T F -algebra is an initial object in the◦ category◦ of F -algebras Let w N∗ be a sequence such that: (i) and homomorphisms. ∈α1 αk [[s]]∗(w) x , . . . , x ; and (ii) [[s0]]∗(w) is undefined The results below summarise some properties of initial ∈ { 1 k } or [[s0]]∗(w) = [[s]]∗(w). (Such a sequence w can always be algebras. Propositions 5.3 and 5.4 appear to be new. 6 found, by swapping s and s0 if necessary.) Proposition 5.1 (Lambek) If a : FA - A is an initial As before, write w as n1 . . . nd (where d 0), and wi ≥ F -algebra then a is an isomorphism. for n1 . . . ni (where 0 i d). For each base type α, d+1 ≤ ≤ define α∗ = σ . For each function symbol f, of arity 2 σd+1 σd+1 d+1 Proposition 5.2 (Freyd [13]) If F has an initial algebra (α1, . . . , αn; β0), we define fθ(z1 , . . . , zn ): σ - f f then F has an initial algebra, a : FA A say, and by fθ = u , . . . , u where: 2 h 1 d+1i a F a is an initial F -algebra. Conversely, if has binary products◦ and F has an initial algebra then so doesC F 2. f πi+1(zn ) if [[s]]∗(wi 1) = f u = i − i µyσ. y otherwise. Proposition 5.3 For functors and š F : G : between any two categories andC →, if Da : GF A D- →A C σd+1 σd+1 d+1 C D θ determines terms sθ, s0θ(x1 , . . . , xk ): σ . By is an initial GF -algebra in then F a is an initial FG- d+1 C typical ambiguity, sθ = s0θ. Define t1, . . . , tk : σ algebra in . σ T ` σ D by: ti is µy . y, . . . , µy . y if [[s]]∗(w) = xi, and ti is σ h σ σ i 6 µy . y, . . . , µy . y, x if [[s]]∗(w) = x . By substitu- Proposition 5.4 Suppose idempotents in split, F is a re- h i i C tion, sθ[~t/~x] = s0θ[~t/~x]. Then, much as above, tract of G in the category of endofunctors on , and G has T ` σ σ - C π1(sθ[~t/~x]) = x and π1(s0θ[~t/~x]) = µy . y. an initial algebra b : GB B. Then F also has an FThus ` xσ = µyσ. y as required.F ` initial algebra a : FA - A where A is a retract of B. T ` ƒ - We now complete the proof of Theorem 2. We have An F -coalgebra is a morphism a0 : A FA, and already seen that and ∗ are typically ambiguous Con- a final F -coalgebra is a terminal object in the evident cate- I I way theories. Consistency can be shown easily by giving a gory of F -coalgebras and homomorphisms. A bifree alge- non-trivial semantics. To show that contains any closed- bra for F is a morphism a : FA - A such that a is an I consistent typically-ambiguous Conway theory, let be initial F -algebra and a 1 is a final F -coalgebra (a is an iso- T − any such theory. We must show that t = t0 implies morphism by Lambek’s result above). All the propositions T ` t = t0. As is determined by its equations between above have evident analogues applying to final coalgebras I ` T terms whose only free variables are of base type, it suffices and bifree algebras. to show the implication for such terms t, t0. Suppose then One word of warning, in addition to algebras and coal- that t = t0 : σ. By Lemma 4.1, there exist normal gebras for endofunctors (as discussed above), we shall also T ` forms s, s0 such that t = s and t0 = s0, so also make considerable use of algebras for monads and coalge- F ` F ` s = s0. One shows, by induction on σ, that s = s0 bras for comonads. To avoid ambiguity, we shall always T ` I ` hence t = t0. If σ is a base type then this follows from refer to such (co)algebras as (co)monad (co)algebras. LemmasI ` 4.3 and 4.2. For product types, the induction step is easy. The maximality of ∗ amongst consistent typically- 6. Fixed points from bifree algebras ambiguous Conway theoriesI is established similarly. In this section we show how parametrically uniform 5. Initial and bifree algebras Conway operators arise in axiomatic domain theory. We work in a very general setting in which the category of In the remainder of the paper, we show that parametri- “domains” arises as the co-Kleisli category of a comonadD cally uniform Conway operators arise from universal prop- on the category of “strict maps”. erties in axiomatic approaches to semantics. A principal Suppose thenS that is a category with finite products, tool we use is the notion of bifree algebra, embodying the and (L, ε, δ) is a comonadS on . We write for the co- fundamental universal property introduced by Freyd in his Kleisli category of the comonad,SJ : forD the functor work on algebraic compactness [13], which combines the which is the right-adjoint part of theS pair → D of adjoint func- properties of initial algebras and final coalgebras. In this tors determined by (and determining) the comonad, and section, we briefly review the relevant concepts. K : for the left-adjoint part. Then J is the identity Given an endofunctor F on a category , an F -algebra on objectsD → S and, as it is a right adjoint, has finite products is a morphism a : FA - A. An F -algebraC homomor- and J preserves them. Thus we are inD a situation to apply the concepts introduced in Section 2. As there, we use the c (f g): A B - A B, where c is the symmetry ◦ × × × symbol for morphisms in . We shall find condi- map for product. Then q∗ = (q q)∗ = (g f)∗, (f g)∗ , tions on and◦ L such that has aS parametrically uniform where the last equality is obtained◦ by uniformity.h ◦ It follows◦ i S D Conway operator, indeed a unique one. that q (g f)∗, (f g)∗ = (g f)∗, (f g)∗ , which We begin with a fundamental proposition relating bifree implies◦ the h desired◦ equality.◦ i h ◦ ◦ i algebras and fixed-point operators. In the remainder of the section, we obtain conditions that imply that has a parametrically uniform Conway opera- Proposition 6.1 If L : has a bifree algebra then tor. The mainD strategy is to instantiate Proposition 6.1 by has a unique uniformS fixed-point → S operator. If L2 has a D varying the comonad. This will allow us to derive all the bifree algebra then this fixed-point operator is dinatural. properties of Conway operators by assuming the existence of enough bifree algebras. The first example of such an ap- Although a similar result is proved in [13], here, in stat- plication is to obtain a parameterized fixed-point operator. ing the proposition with respect to an arbitrary comonad on , we are placing the result in what we believe to be its Proposition 6.5 If every endofunctor L(X ( )) on has S natural general setting. The possibilities this provides are a bifree algebra then has a unique parametrically× − S uni- thoroughly exploited in the proofs of Proposition 6.5 and form parameterized fixed-pointD operator. Theorem 3 below. That said, the proof of Proposition 6.1, outlined below, is essentially due to Freyd [13]. The proof is by instantiating Proposition 6.1 using the end- ofunctors L(X ( )) as comonads. The comonad struc- Let s : LΦ Φ be the bifree algebra for L on . The × − L-algebra s : LΦ ◦ Φ corresponds to an endomorphismS ture is most easily seen by considering the composite func- ◦ - - s :Φ - Φ in . The next two lemmas give the critical tor X ( ), which has a left adjoint, D S D D × − properties of s in . thereby exhibiting X ( ) as the co-Kleisli category of D the composite comonadD × on− . Indeed, by the remarks af- Lemma 6.2 For any f : A - A there exists a unique ter Definitions 2.2 and 2.8,S the parameterized fixed-point uf :Φ A such that f Juf = Juf s. property, parameterized uniformity, and uniqueness all fol- ◦ ◦ ◦ low directly from Proposition 6.1 when interpreted in the Lemma 6.3 There exists a unique map : 1 - Φ such appropriate co-Kleisli categories. It only remains to verify ∞ that s = . the naturality of the induced ( )† operator in its parameter. ◦ ∞ ∞ · A comonad morphism ν :(L1, ε1, δ1) (L2, ε2, δ2), The proof that has a unique uniform fixed-point operator between two comonads on , is a natural⇒ transformation follows swiftlyD from Lemmas 6.2 and 6.3. The argument is S ν : L1 L2 that preserves the counit and comultiplica- carried out directly in . Define ( )∗ : (A, A) (1,A) ⇒ D · D → D tion in the evident way (see [2, 3.6] for the dual notion by f ∗ = Ju . Then ( )∗ is a fixed-point operator by: § f ◦ ∞ · of monad morphism). Any such comonad morphism in- f f ∗ = f Ju = Ju s = Ju = f ∗. ◦ ◦ f ◦ ∞ f ◦ ◦ ∞ f ◦ ∞ duces a functor H : 2 1 between the associated co- For uniformity, suppose we have h, g with Jh f = g Jh, Kleisli categories (itD is the→ identity D on objects, and a mor- as in Definition 2.7 Then ◦ ◦ J(h uf ) s = Jh f Juf = phism from A to B in 2, given by f : L2A B in , , so (by◦ the uniqueness◦ ◦ of ◦). Thus D ◦ S g J(h uf ) h uf = ug ug gets mapped to the morphism from A to B in 1 given by indeed◦ ◦ ◦ . For D Jh f ∗ = Jh Juf = Jug = g∗ f νA : L1A B in ). ◦ ◦0 ◦ ∞ ◦ ∞ ◦ ◦ S uniqueness, suppose ( )∗ is any fixed-point operator. Then · s 0 = by the uniqueness part of Lemma 6.3. If, further, Lemma 6.6 Suppose ν :(L1, ε1, δ1) (L2, ε2, δ2) is a ∗ ⇒ 0 ∞ ( )∗ is uniform then, because f Juf = Juf s, we have comonad morphism, where both L1 and L2 have bifree al- · 0 0 ◦ ◦ gebras in . Let and be the associated co-Kleisli f ∗ = Juf s∗ = Juf = f ∗. 1 2 ◦ ◦ ∞ categories,S let H :D D be the ν-induced functor, and It remains to prove the dinaturality claim of Proposition D2 → D1 6.1. Suppose that L2 has a bifree algebra. (By Proposition let ( )∗1 and ( )∗2 be the unique uniform fixed-point opera- tors· in and· . Then, for any f : A - A in , it 5.2, this itself implies that L has a bifree algebra.) Again, D1 D2 D2 the argument follows Freyd [13]. holds that H(f ∗2 ) = (Hf)∗1 .

Lemma 6.4 For any f : A - A in , it holds that The proof, which uses the construction of the uniform fixed- D point operators given after Lemmas 6.2 and 6.3, is routine. f ∗ = (f f)∗. ◦ To derive the naturality of ( )† from lemma 6.6, consider The lemma is first proved for s :Φ - Φ, using the fact any g : X - Y in (the co-Kleisli· category of L) as in that s Ls : L2Φ Φ is a bifree L2-algebra, as given Definition 2.2. Then D(g ( )) : X ( ) Y ( ) by Proposition◦ 5.2. It follows◦ for arbitrary f by uniformity. is a comonad morphism× between− comonads× − ⇒ on ×, and− Dinaturality is an easy consequence of the lemma. Given K(g J( )) : L(X ( )) L(Y ( )) isD a cor- f : A - B and g : B - A, consider the map q = responding× − comonad morphism,× − ⇒ between× comonads− on , S that induces the functor Hg : Y ( ) X ( ) between We end this section by observing that it is a simple ap- its co-Kleisli categories. Thus,D by× the− discussion→ D × − after Defi- plication of Proposition 5.3 to show that the requirement nition 2.2, Lemma 6.6 does indeed imply naturality. of the existence of sufficiently many bifree algebras in is In order to obtain that the unique parametrically uni- equivalent to requiring the existence of bifree algebras inS . D form ( )† is also a Conway operator, we require yet more We write T : for the induced monad (given by the bifree algebras.· We say that has sufficiently many bifree composite JKD) on → D. algebras if all endofunctorsSL(X L(X ( ))) and D × × − Proposition 6.7 has sufficiently many bifree algebras if L(X ( ) ( )) on have bifree algebras. S × − × − S and only if all endofunctors of the form T (X T (X ( ))) × × − Theorem 3 If has sufficiently many bifree algebras then and T (X ( ) ( )) on have bifree algebras. S × − × − D has a unique parametrically uniform parameterized In spite of the above reformulation, we believe that it is D fixed-point operator, and it is a Conway operator. usually more appropriate to consider the bifree algebras as living in . A common application of the results in this To prove the theorem, suppose that has sufficiently S S section will involve using a category that is algebraically many bifree algebras. By Proposition 5.2, all endofunctors compact [13, 14], in which case the existenceS of sufficiently L(X ( )) on have bifree algebras. So by Proposi- many bifree algebras in is guaranteed. The canonical ex- tion 6.5,× −has a uniqueS parametrically uniform parameter- S D ample of this situation is when is Cppo , which is al- ized fixed-point operator. Moreover, parameterized dinatu- gebraically compact with respectS to Cppo-enriched⊥ endo- rality follows from ordinary dinaturality given by Proposi- functors [10]. The results in this section thus apply to the tion 6.1, when the comonad is instantiated to L(X ( )). × − co-Kleisli category of any comonad on Cppo whose un- It remains to prove the diagonal property. To this end, derlying functor is Cppo-enriched, not just to⊥ the lifting observe that on any category with finite products, the end- comonad. A degenerate case is the identity comonad, show- ofunctor ( ) ( ) can be endowedC with the structure of − × − ing that it is also possible for itself to be algebraically a comonad; in fact this can be done in two inequivalent compact (although this implies thatD 1 is a zero object in ). ways. In both cases the counit is π : A A - A. D 1 × The two possible comultiplications are π1, π2, π2, π1 and - h i 7. Fixed points and lifting monads π1, π2, π2, π2 : A A A A A A. (In the first hcase the coalgebrasi × of the comonad× are× involutions× in , in In Section 6, we took a category of “strict” maps as basic, the second case the coalgebras are idempotents.) Strangely,C and derived the relevant properties of fixed points in a cat- the proof below works equally well with either choice of egory of “domains” determined as the co-Kleisli category comultiplication. of a comonad on . In many examples, however, the cat- Consider the comonad ( ) ( ) on the category S − × − egory is itself obtained as the category of algebras for a X ( ), and write dX for its co-Kleisli category. The S D × − D “lifting” monad on a category of “predomains”. In this sec- chain of right adjoints X ( ) dX shows × − tion, we investigate such situations in general. Surprisingly, that arises as theS co-Kleisli → D → D category→ of D a comonad dX the strong properties of a lifting monad allow all assump- withD underlying functor L(X ( ) ( )) on . Because tions about the existence of bifree algebras to be dropped. L(X ( ) ( )) has a bifree× algebra,− × Proposition− S 6.1 rel- Instead, the mere existence of uniform non-parameterized ativizes× to− give× − that has a unique uniform fixed-point dX fixed-points suffices to determine a unique parametrically operator. In terms ofD this says that there exists a unique D uniform Conway operator. family ( )‡ : (X A A, A) (X,A) satisfying: · D × × → D Let be a category with finite products and a strong C 1. For any f : X A A - A, monad (T, η, µ, t) (see e.g. [22, 23]). We write for the × × - K f idX , f ‡, f ‡ = f ‡ : X A. Kleisli category of the monad, and we write I : ◦ h i for the associated (left-adjoint) functor. We assumeC → that K - - 2. For any f : X A A A, g : X B B B has Kleisli exponentials, i.e. that, for every X in the and h : A × B×, h f = g (id× × Jh Jh) C C ◦ ◦ ◦ X × × functor I(X ( )) : has a right adjoint (see e.g. implies g‡ = Jh f ‡. × − C → K ◦ [22, 28]). These assumptions give the structure required to model Moggi’s computational -calculus [22]. The diagonal property is proved by showing that the two λ We wish to consider a notion of fixed-point in suit- operations, mapping f : X A A - A to (f ) † † able for adding a recursion operator to the computationalC λ- and (f (id ∆)) : X × - ×A respectively (defined X † calculus. Because of the existence of Kleisli exponentials, using the◦ parametrically× uniform parameterized fixed-point it suffices to consider a non-parameterized notion. operator on ), both satisfy the characterising properties of D ( )‡ above. Therefore the two operations are equal, hence Definition 7.1 (Uniform T -fixed-pt. op.) A uniform T - · (f (id ∆))† = (f †)†. fixed-point operator is a a family of functions ◦ X × ( )∗ : (T A, T A) (1,TA) such that: Proposition 7.4 Under the conditions of Theorem 4, if all · C → C idempotents in split and has a uniform T -fixed-point - C C 1. For any f : TA TA, f f ∗ = f ∗. operator then has sufficiently many bifree algebras. ◦ S 2. For any f : TA - TA, g : TA - TA and The proof is outlined in Section 8. h : TA - TB, if h µ = µ T h and g h = h f To derive Theorem 4 from Proposition 7.4, one first ◦ ◦ ◦ ◦ then g∗ = h f ∗. shows that all the structure on (parameterized natural ◦ number object, equational liftingC monad, Kleisli exponen- One familiar setting in which a (unique) uniform T -fixed- tials) extends to its Karoubi envelope, Split( ), (see [19, point operator exists is when has a fixpoint object in the C C p. 100, Exercise 2]). Moreover, if has a uniform T - sense of Crole and Pitts [5], see [24, 28]. In this paper, we fixed-point operator then so does SplitC( ). By definition, take the weaker notion of uniform T -fixed-point operator all idempotents split in Split( ). Thus, byC Proposition 7.4, as primitive. However, we shall see circumstances below in Split( ) has sufficiently manyC bifree algebras (Split( ) is which the two notions are equivalent. indeedS the category of algebras for the monad on SplitS( )). In this section, our aim is to show how T -fixed-point Hence, by Theorem 3, Split( ) has a unique parametri-C operators give rise to fixed-point operators as considered cally uniform parameterized fixed-pointD operator, and it is earlier in the paper. To this end, we write for the cate- S a Conway operator. However, it is easily shown that para- gory of algebras of the monad T (the Eilenberg-Moore cat- metrically uniform parameterized fixed-point operators and egory) and L for the comonad on induced by the adjunc- Conway operators on and on Split( ) are in one-to-one tion with . Let be the co-KleisliS category of L, and D D C D correspondence. Theorem 4 follows by Proposition 7.2. let J : be the induced functor (as in Section 6). One other consequence of Proposition 7.4 is that, by ConcretelyS → Dcan be described as the category whose ob- D Proposition 5.3, the existence of a bifree L-algebra on jects are Eilenberg-Moore algebras for T , with hom-sets: is equivalent to the existence of a bifree T -algebra on S. a b (TA - A, T B - B) = (A, B). Freyd observed that any bifree T -algebra is a fixpoint ob-C D C ject [5]. We have already mentioned that any fixpoint ob- Proposition 7.2 There is a one-to-one correspondence be- ject determines a uniform T -fixed-point operator. Thus, in tween uniform T -fixed-point operators on and parametri- the circumstances of Proposition 7.4, the existence of a - C T cally uniform parameterized fixed-point operators on . fixed-point operator is equivalent to that of a fixpoint object. D Our aim is to show that, under suitable conditions, there is a unique uniform T -fixed-point operator, and that the unique 8. Proof of Proposition 7.4 parametrically uniform parameterized fixed-point operator determined is a Conway operator. We have a category , with finite products, parameter- C One condition is that have a parameterized natural ized natural numbers object, equational lifting monad and 0 C s numbers object 1 - N - N (see [19, p. 71, Ex- Kleisli exponentials, in which every idempotent splits. One ercise 4] — this is the appropriate notion of natural num- consequence of idempotents splitting is that, for every Y in , the functor F (Y ( )) : (where F : bers object for non-cartesian-closed categories). The other C × − C → S C → S assumption is one on the monad. is the standard “free algebra” functor) has a right adjoint ( )Y : . Essentially this means that for any object − S → C Definition 7.3 (Equational lifting monad [4]) A strong X of that lies in the image of the forgetful U : C S → C monad (T, η, µ, t) is said to be an equational lifting (we henceforth call such objects algebra carrying), and ev- monad if it is commutative and also satisfies the equation ery object Y of , the exponential XY exists in (the ob- - Y C C t ∆ = T η, idX : TX T (TX X). ject X is constructed as a retract of the Kleisli exponential ◦ h i × TXY ). It also implies that is cartesian closed. In [4], it is shown that equational lifting monads exactly D capture the equational properties of partial map classifiers. Lemma 8.1 For every algebra-carrying X, the endofunc- tors X ( ): and X ( ) ( ): have Theorem 4 Suppose has a parameterized natural num- final coalgebras.× − C → C × − × − C → C bers object and T is anC equational lifting monad. Then has at most one uniform -fixed-point operator. Moreover,C Lemma 8.2 For every object X of , the endofunctors T S if such an operator exists then the associated unique param- X ( ): and X ( ) ( ): have final × − S → S × − × − S → S eterized fixed-point operator on is a Conway operator. coalgebras. D The bulk of the work in the proof of Theorem 4 goes into Lemma 8.3 L is a retract of (L1) ( ) in the category of × − proving the proposition below. endofunctors on . S Lemma 8.4 All endofunctors L(X L(X ( ))) and by Proposition 5.3, HKHK has a final coalgebra in . L(X ( ) ( )) have final coalgebras× in ×. − By Proposition 8.5.2, HKHK is -enriched. Hence,K by × − × − S Proposition 8.5.3, has a bifree HKHKD -algebra. Thus, Briefly, the final coalgebras of Lemma 8.1 both have carrier again by PropositionK 5.3, has a bifree KHKH-algebra, N X , which is used to encode infinite sequences and full bi- i.e. there is a bifree algebraS for L(X L(X ( ))). The nary trees. Lemma 8.2 follows by proving that the forgetful argument for L(X ( ) ( )) is similar.× This× − completes from the category of coalgebras for X ( ) on to the the proof of Proposition× − 7.4.× − category of coalgebras for X ( ) on ×is monadic− S and so creates the terminal object (similarly× − forC X ( ) ( )). For Lemma 8.3, the retraction is given by the× pair− × of mor-− 9. Discussion - phisms T !, a : TA (T 1) A and (T π2) t0 : h -i × - ◦ (T 1) A TA in (where t0 : T 1 A T (1 A) Theorem 4 has applications to an axiomatic approach is the× “costrength”of C). The verification× that this pair× has to denotational semantics. The conditions on are ex- T C the required properties is the only place in which the equa- actly suited to modelling a call-by-value version, PCFv, of tional lifting monad equation (Definition 7.3) is used. Fi- PCF with product types (as considered in e.g. [33]). The nally, Lemma 8.4 follows from Lemmas 8.2, 8.3 and Propo- monad and Kleisli exponentials interpret Moggi’s compu- sition 5.4. tational λ-calculus [22], which is the core of PCFv. The Now that final coalgebras for the desired functors have natural numbers object is used to interpret the arithmetic been constructed in , it remains to show that they are operations. Intuitively, the assumption of an equational lift- bifree. We achieve thisS by some more manœuvring between ing monad expresses that nontermination is the only com- categories, using Proposition 5.3 to transfer universal prop- putational effect in PCFv. We suggest that a uniform T - erties from one place to another. In fact, we shall exploit fixed-point operator is the natural structure for interpreting properties of the Kleisli category . recursion. By Theorem 4, there is at most one such oper- As T is a commutative strongK monad, is a symmet- ator, and so the interpretation of recursion is uniquely de- ric monoidal category and I : is monoidalK (where termined. Moreover, the interpretation of recursion satisfies cartesian product is taken as theC → monoidal K product on ). all desirable equational properties. C We write for the monoidal product on , and L0 for the An interesting aspect of the proposed notion of model underlying⊗ functor of the comonad on inducedK by T . is that all ingredients in the model correspond to syntac- K tic features of the language. Thus the free category with the Proposition 8.5 identified structure corresponds to a term model constructed 1. can be construed as a -enriched category. out of PCFv programs quotiented by the equivalence in- K D duced by the categorical structure. Then the interpretation 2. and L0 can be construed as -functors on . of PCFv terms in an arbitrary model is given by the unique ⊗ D K structure preserving functor from the free model. Thus the 3. For any -enriched endofunctor F on , an isomor- D - K denotational semantics of PCFv is recast in the framework phism a : FA A in is an initial F -algebra if of Lawvere’s functorial semantics. 1 K and only if a− is a final F -coalgebra. The categorical structure of the models determines a The proof is given in [28]. In outline, 1 is proved using rudimentary equational logic for proving operational equal- Kleisli exponentials, and 2 is then routine. For 3, the idea is ities between PCFv programs. On the one hand, this logic to use the uniform fixed-point operator in to establish that supports a “denotational” form of reasoning, using cate- the property of being an initial F -algebrasD is equivalent to a gorical universal properties. On the other, by interpreting self dual property (called special F -invariance), and hence the equalities in the free model, any argument has a direct equivalent to the property of being a final F -coalgebra; see “operational” reading as following a chain of equalities be- Theorem 5.2 of [28]. tween PCFv programs. Thus one might argue that the no- To finish the proof of Proposition 7.4, consider, for ex- tion of model provides a denotational framework for direct ample, the functor L(X L(X ( ))) : . We write operational reasoning. One wonders how powerful the in- K : for the “comparison”× × − functorS from → S Kleisli cat- duced proof principles are. egoryK to → Eilenberg-Moore S category. We write H : Another question of power is how far our approach of for the composite: S → S deriving equational properties of recursion from categorical universal properties can be extended to derive properties of X ( ) U I × −- - - higher-order recursion. A natural syntax for higher-order S S C K recursion is given by the simply-typed λ-calculus extended Then L(X L(X ( ))) = KHKH : . By with a typed fixed-point combinator. It can be shown that Lemma 8.4,×KHKH× has− a final coalgebraS in →. S Thus, the desired equational theory between such terms is that in- S duced by a suitable notion of η-expanded typed Bohm¨ trees, [13] P. Freyd. Algebraically complete categories. In Cate- that this theory is co-r.e. and satisfies a characterisation as a gory Theory, Proceedings Como 1990, Springer LNM 1488, maximally-consistent typically ambiguous theory (cf. [31] 1991. and our Theorem 2). A major open question is whether the [14] P. Freyd. Remarks on algebraically compact categories. In theory is decidable. The restricted case of equalities be- Applications of Categories in Computer Science, pages 95– 106. LMS Lecture Notes 177, Cambridge University Press, tween so-called recursion schemas has recently been settled 1992. in the positive by the long awaited proof of the decidability [15] C. Gunter. Semantics of Programming Languages. MIT of language equivalence for DPDAs [27]. It would be re- Press, 1992. markable if the proof rules in Stirling’s tableau approach to [16] M. Hasegawa. Models of Sharing Graphs: A Categorical decidability [32] could be derived from category-theoretic Semantics of let and letrec. Distinguished Dissertation universal properties. Series, Springer-Verlag, 1999. Another interesting (and less ambitious!) direction for [17] A. Hurkens, M. McArthur, Y. Moschovakis, L. Moss, and research is to investigate the equational theory induced by G. Witney. The logic of recursive equations. Journal of Symbolic Logic, 63(2):451–478, 1998. Hasegawa’s notion of uniform trace [16], which gener- [18] A. Joyal, R. Street, and D. Verity. Traced monoidal cate- alises parametrically uniform Conway operators to symmet- gories. Mathematical Proceedings of the Cambridge Philo- ric monoidal categories. In particular, Hasegawa considers sophical Society, 119:447–468, 1996. traced cartesian-center monoidal categories as models of [19] J. Lambek and P. Scott. Introduction to Higher Order Cate- cyclic sharing graphs. Perhaps there is a completeness the- gorical Logic. Cambridge University Press, 1986. orem for uniform traces with respect to an equational theory [20] J. Longley and A. Simpson. A uniform account of domain induced by suitable unfoldings of such graphs. theory in realizability models. Math. Struct. in Comp. Sci., 7:469–505, 1997. [21] G. McCusker. Games and Full Abstraction for a Functional References Metalanguage with Recursive Types. Distinguished Disser- tation Series, Springer-Verlag, 1998. [22] E. Moggi. Computational lambda-calculus and monads. In [1] H. Barendregt. The Lambda Calculus, its Syntax and Se- Proceedings of 4th Annual Symposium on Logic in Com- mantics. North Holland, Second edition, 1984. puter Science, pages 14–23, 1989. [2] M. Barr and C. Wells. Toposes, Triples and Theories. [23] E. Moggi. Notions of computation and monads. Information Springer-Verlag, 1985. and Computation, 93(1), 1991. [3] S. Bloom and Z. Esik.´ Iteration Theories. EATCS Mono- [24] P. Mulry. Strong monads, algebras and fixed points. In Ap- graphs on Theoretical Computer Science, Springer-Verlag, plications of Categories in Computer Science, pages 202– 1993. 216. LMS Lecture Notes 177, Cambridge University Press, [4] A. Bucalo, C. Fuhrmann,¨ and A. Simpson. Equational lift- 1992. ing monads. Proceedings CTCS ’99, Electronic Notes in [25] G. Plotkin. Domains. The “Pisa” notes. Available from Computer Science, 29, 1999. http://www.dcs.ed.ac.uk/home/gdp/, 1983. [5] R. Crole and A. Pitts. New foundations for fixpoint compu- [26] B. Reus and T. Streicher. General synthetic domain theory tations: FIX-hyperdoctrines and the FIX-logic. Information — a logical approach. Math. Struct. in Comp. Sci., 9:177– and Computation, 98:171–210, 1992. 223, 1999. [6] S. Eilenberg. The Category . Unpublished manuscript. [27] G. Senizergues. The equivalence problem for deterministic C [7] M. Escardo´ and T. Streicher. Induction and recursion on the pushdown automata is decidable. In Automata, Languages partial real line with applications to Real PCF. Theoretical and Programming. Springer LNCS 1256, 1997. Computer Science, 210(1):121–157, 1999. [28] A. Simpson. Recursive types in Kleisli cate- [8] Z. Esik.´ Independence of the equational axioms of iteration gories. Unpublished manuscript, available from theories. Journal of Computer and System Science, 36:66– http://www.dcs.ed.ac.uk/home/als/, 1992. [29] A. Simpson. A characterisation of the least-fixed-point 76, 1988. operator by dinaturality. Theoretical Computer Science, [9] Z. Esik.´ Group axioms for iteration. Information and Com- 118:301–314, 1993. putation, 148:131–180, 1999. [30] A. Simpson. Computational adequacy in an elementary [10] M. Fiore. Axiomatic Domain Theory in Categories of Partial topos. In Computer Science Logic, Proceedings CSL ’98, Maps. Distinguished Dissertation Series, Cambridge Uni- pages 323–342. Springer LNCS 1584, 1999. versity Press, 1996. [31] R. Statman. λ-definable functionals and βη conversion. [11] M. Fiore and G. Plotkin. An extension of models of ax- Archiv fur Math. Logik und Grund., 23:21–26, 1983. iomatic domain theory to models of synthetic domain the- [32] C. Stirling. Decidability of DPDA Equivalence. To appear in ory. In Proceedings of CSL 96, pages 129–149. Springer Theoretical Computer Science, 2000. Tech. Report LFCS- LNCS 1258, 1997. 99-411, University of Edinburgh. [12] M. Fiore, G. Plotkin, and A. Power. Complete cuboidal sets [33] G. Winskel. The Formal Semantics of Programming Lan- in axiomatic domain theory. In Proceedings of 12th Annual guages. MIT Press, 1993. Symposium on Logic in Computer Science, 1997.