The Internal Operads of Combinatory Algebras

We argue that operads provide a general framework for dealing with polynomials and combinatory completeness of combinatory algebras, including the classical $\mathbf{SK}$-algebras, linear $\mathbf{BCI}$-algebras, planar $\mathbf{BI}(\_)^\bullet$-algebras as well as the braided $\mathbf{BC^\pm I}$-algebras. We show that every extensional combinatory algebra gives rise to a canonical closed operad, which we shall call the internal operad of the combinatory algebra. The internal operad construction gives a left adjoint to the forgetful functor from closed operads to extensional combinatory algebras. As a by-product, we derive extensionality axioms for the classes of combinatory algebras mentioned above.


Introduction
Combinatory algebras [3,11] are fundamental in several areas of theory of computation.They can be thought as models of the λ-calculus, in which the λ-abstraction is not a primitive ingredient but a derived construct.This paper addresses a seemingly naive and easy-to-answer question on this ability of modelling λ-abstractions in combinatory algebras: what are the correct interpretations of variables?For the classical (cartesian) combinatory algebras, our approach basically agrees with that of Hyland [12].However, our work is motivated by non-classical variants of combinatory algebras, especially by a difficulty in formulating the braided combinatory algebras along the line of our previous work [9].Technically, we build our framework on top of the case of planar combinatory algebras [19,20].

Polynomials and Combinatory Completeness
Recall that an (total) applicative structure (also called a magma) (A, •) is a set A equipped with a binary function ( )•( ) : A×A → A called application.In this paper we only deal with total applicative structures, i.e., applications are always defined.As is customary, applications are assumed to be left associative, and the infix • is often omitted.
We are mainly interested in applicative structures which can model the λ-calculus.So we are to handle variables and abstractions.Usually, we proceed as follows.
• the planar case: when P is a semi-closed planar operad, P(0) is a BI( ) • -algebra of Tomita [19]; • the linear case: when P is a semi-closed symmetric operad, P(0) is a BCI-algebra [1,10]; • the braided case: when P is a semi-closed braided operad, P(0) is a BC ± I-algebra, a braided variant of BCI-algebras [9]; and • the classical case: when P is a semi-closed cartesian operad, P(0) is an SK-algebra [12].
It remains to see how to construct polynomials, or more generally operads, on top of a combinatory algebra.

Taking Polynomials Seriously
Often, polynomials of P[x 1 , . . ., x n ] are identified with certain functions from A n to A. Many studies on combinatory algebras employ this "polynomials as functions" view either explicitly or implicitly (e.g.formulating polynomials as formal expressions while saying that two polynomials are equal when they express the same function).
There also are cases handling polynomials as a "polynomial combinatory algebra" in the algebraic manner [7,18], in which variables are taken as indeterminates.This approach allows a cleaner treatment of abstractions where the problem of ξ-rule disappears [18], and mathematically preferable than the "polynomials as functions" approach.However, for the planar, linear and braided cases, polynomials do not form a combinatory algebra, and we cannot apply the same strategy.
Note that operads obtained in the "polynomials as functions" way are always well-pointed: the global section multi-functor into Set is faithful.Hence many of the conventional approaches actually consider only well-pointed operads.It still works reasonably well for the classical, linear and planar cases (modulo the problem of ξ-rule).However, the same cannot be applied to the braided case: well-pointed braided operads are always symmetric, hence the information on braids is lost.Thus existing approaches are too restrictive.Is there an alternative way of constructing operads from combinatory algebras which can cover the braided case?

The Internal Operad Construction
In this paper, we propose an alternative construction of operads from combinatory algebras: the internal operad construction.The key insight is that, instead of taking external functions as polynomials, we construct an operad just by using the elements and structure of the combinatory algebra, hence internally.As we will explain in Section 2, its basic idea is rather simple and should be unsurprising for those familar with the λ-calculus: just to express a program with m inputs and n outputs by a closed λ-term of the form λf x 1 . . .x m .fM 1 . . .M n with no free f in M i 's.The novel finding is that it works in a wide class of combinatory algebras, in which we can characterise elements of m inputs and n outputs by an equation.We show that the internal operad is the initial one among the closed operads giving rise to the combinatory algebra.In other words, the internal operad construction is left adjoint to the functor sending a closed operad P to the extensional combinatory algebra P(0).
Moreover, the internal operad construction works not only for the planar, linear and classical (nonlinear) cases but also for the braided case.This gives an answer to the difficulty of formalizing polynomials and combinatory completeness of braided combinatory algebras.
The main restriction of this approach is that the internal operad construction works only for extensional combinatory algebras.In fact, we can design extensionality axioms so that the internal operad construction works; this might be compared to Freyd's approach to extensionality [7] where he identifies axioms to make the "polynomial combinatory algebra" construction satisfy the extensional principle.The axioms obtained in this way are semantically motivated and (hopefully) understandable.We present the resulting axiomatizations for the planar, linear, braided as well as the classical cases.

Related Work
This work started with the question of how to formulate combinatory completeness of braided combinatory algebras, which came from our previous work on the braided λ-calculus [9].The notion of BC ± I-algebras also comes from that work, though its axiomatization was left open.
Hyland [12] advocated the view that (classical) combinatory algebras are semi-closed cartesian operad.Our approach can be seen as generalization of his work to planar, linear, and braided settings.The main difference would be that we put the planar -the weakest but most general -case as the basic setting, and develop other cases on top of it.
The planar combinatory algebras -BI( ) • -algebras and variations -have been studied by Tomita [19,20] as the realizers for his non-symmetric realizability models.
There are plenty of work on the graphical presentations of the λ-calculus; while many focus on the graph-theoretic or combinatorial aspects, Zeilberger's work on linear/planar λ-terms and trivalent graphs [22,23] provide a more geometric perspective on the graphs, which is closer to our approach.
Ikebuchi and Nakano's work on B-terms [13] emphasizes the role of composition and application of B as basic constructs of their calculus of B-terms as forest of binary trees, which is very close to our definition of internal operads; only the identity I and the internalization operator ( ) • are missing.Some work on knotted graphs (including [16,21]) identify the "Reidemeister-IV" move, which is used in our axiomatizations of extensional BCI-algebras and BC ± I-algebras.

Organization of This Paper
This paper is organized as follows.In Section 2, we consider the combinatory algebras of closed λ-terms as well as its graphical variants, and see how they give rise to operads internally.In Section 3, we review Tomita's BI( ) • -algebras from the viewpoint of planar operads, and introduce extensional BI( ) • -algebras.In Section 4, we introduce internal operads of extensional BI( ) • -algebras.Section 5 is devoted to the cases of linear, braided and classical combinatory algebras, which are obtained by specializing the planar case with additional structures.In Section 6, we conclude this paper by suggesting possible future work, including the preliminary observations on traced combinatory algebras.For lack of space most proofs are omitted, though they all follow from plain equational reasoning.We assume that the reader is familiar with the basic concepts of the λ-calculus and combinatory logic as found e.g., in [11].Brief summaries of the braid groups and braided operads used in this paper are given in Appendix A.

Motivating Internal Operads
2.1 The Planar, Linear, and Braided λ-calculi Let us summarize the fragments and variant of the λ-calculus to be discussed in this paper.The planar λ-calculus is an untyped linear λ-calculus with no exchange, whose terms are given by the following rules.
It is easy to see that planar terms are closed under βη-conversion.Typical planar terms include I = λf.f, B = λf xy.f (x y), and P • = λf.fP for planar closed term P .The linear λ-calculus has the rules for the planar λ-calculus and the exchange rule: x 1 , x 2 , . . ., x n ⊢ M s : permutation on {1, . . ., n} x s(1) , x s(2) , . . ., x s(n) ⊢ M exchange Non-planar linear terms include C = λf xy.f y x.
The braided λ-calculus [9] is a variant of the linear λ-calculus in which every permutation/exchange of variables is realized by a braid.Thus, for a term M with n free variables and a braid s with n strands (which can be identified with the elements of the braid group B n as explained in Appendix A below), we introduce a term [s]M in which the free variables are permutated by s: x 1 , x 2 , . . ., x n ⊢ M s : braid with n strands x s(1) , x s(2) , . . ., x s(n) ⊢ [s]M braid For instance, there are infinitely many braided C-combinators including The βη-equality on braided terms is less straightforward due to the presence of braids; see [9] for details.

Operads
Recall that an (planar or non-symmetric) operad [17] P is a family of sets (P(n)) n∈N equipped with • an identity id ∈ P(1) and • a composition map sending which are subject to the unit law and associativity: serves as the set of n-ary operators, or polynomials with n variables.

(Semi-)Closed Operads and Combinatory Completeness
From an applicative structure A, we are to construct an operad P with P(0) = A and an element app ∈ P(2) corresponding to the application We say A is combinatory complete with respect to P if, for any p ∈ P(n + 1), there exists λ * (p) ∈ P(n) satisfying app(λ * (p), id ) = p; it is extensional when such λ * (p) is unique.
On the other hand, an operad P is semi-closed when there is app ∈ P(2) such that for any p ∈ P(n+1), there exists λ * (p) ∈ P(n) satisfying app(λ * (p), id ) = p, and closed when such λ * (p) is unique.
P is semi-closed ⇐⇒ A = P(0) is combinatory complete with respect to P P is closed ⇐⇒ A = P(0) is combinatory complete and extensional with respect to P

The Internal Operad of the λ-calculus
The idea of the internal operads (and internal PRO(P)) is very simple if we look at the case of the combinatory algebra of closed λ-terms, with its graphical interpretation.
We say that a closed λ-term is of arity m → n when it is βη-equal to a head normal form which can be regarded as a program with m inputs and n outputs, where the head variable f serves as the (linearly-used) continuation or the environment.There are closed terms which do not have an arity (e.g.λxy.y x), but we shall note that any closed term of the planar λ-calculus has an arity.Examples of closed terms with arity include: Note that M : m → n implies M : m + 1 → n + 1 because we take the η-rule into account: By letting I Λ (n) be the set of (βη-equivalence classes of) closed terms of arity n → 1 and by appropriately defining the composition (with the identity I : 1 → 1), we obtain a closed (cartesian) operad I Λ , which

5-6
Internal Operads of Combinatory Algebras we shall call the internal operad of the λ-calculus.The closed operad structure of I Λ will be spelled out below; but before that, we shall look at a graphical interpretation of terms with arity, which turns out to be useful in describing the operad structure.

The Internal Operad of the λ-calculus, Graphically
We can interpret closed (linear) λ-terms as rooted trivalent graphs with two kinds of nodes (the lambda nodes • λ and application nodes • @ ) [22,23] as shown in Figure 1 where the annotations show the correspon- dence to the linear λ-terms.They are subject to the βη-rules given in Figure 2. We are interested in the graphs (modulo βη-rules) of arity m → n as depicted in Figure 3, which are λf x 1 . . .x m .fM 1 . . .M n in the λ-calculus.The most basic examples of such graphs with arity are: They will be the basic primitives for the planar and linear combinatory algebras.Now we describe a few simple constructions on terms with arity.They will be of fundamental importance in describing the operad structure.

Adding lower strands
For M : m → n, we have B M : m + 1 → n + 1. graphically, applying B adds a new lower strand:

Adding upper strands
As we already noticed, M : m → n implies M : m + 1 → n + 1. Graphically, it means that we can add upper strands for free: Fig. 5.The exchange law The composition • is associative, and I : n → n serves as the unit.

2.6
The Closed Operad Structure of I Λ Now we shall spell out the operad structure of I Λ .For 4).With id = I, it is routine to see that this composition satisfies the unit law and associativity of operads.

5-8
Internal Operads of Combinatory Algebras Next, we look at the closed structure.Let app Hence we conclude that I Λ is a closed operad.

Towards Internal Operads of Combinatory Algebras
We have seen that, in the case of the λ-calculus and its graphical presentation, the following constructs are essential in defining the internal operad I Λ : the basic operators and the composition as well as adding strands So far, terms with arity are defined using head normal forms.However, it is possible to characterize them just by using equations involving B, I, ( ) • , with no mention to head normal forms as follows.
These suggest that the internal operad construction can be carried out in any applicative structure with B, I and ( ) • which validates the βη-equality (hence combinatory complete and extensional).
We conclude this section by noting that the condition 2 can be understood as an exchange law (B m N ) • M = M • (B n N ) as depicted in Figure 5.

The Operad of Planar Polynomials
Given an applicative structure A, we construct an operad P A , where P A (m) is the smallest class of functions from A m to A such that The elements of P A (m) are planar polynomials with m variables.(If we allow pre-composing permutations, we have linear polynomials.If projections and duplications are allowed, we have the usual (non-linear) polynomials.) The identity function id represents an occurrence of a variable.app = id • id ∈ P A (2) corresponds to the application: app(p, q) = p • q.Two planar polynomials with m-variables are equal when they are equal as functions from A m to A.

BI( ) • -algebras as Planarly Combinatory Complete Applicative Structures
Suppose that A is an applicative structure which is combinatory complete with respect to the planar polynomials P A .That is, for any p ∈ P A (n + 1), there exists λ * (p) ∈ P A (n) such that λ * (p) • id = p.In A, we have Conversely, if an applicative structure A has elements I, B and a • for all a ∈ A satisfying I a = a, B a b c = a (b c) and a • b = b a, A is combinatory complete with respect to the planar polynomials: Following Tomita [19], we call such an A a BI( ) • -algebra.Thus, BI( ) • -algebras are precisely the planarly combinatory complete applicative structures.There are several interesting BI( ) • -algebras including: the term model of the planar λ-calculus modulo β-or βη-equality; reflexive objects in monoidal closed categories; and models of Moggi's computational λ-calculus.Originally, BI( ) • -algebras were introduced in Tomita's study on non-symmetric (or planar) realizability.One of the central results in that context is that the assemblies on a BI( ) • -algebra form a closed multicategory.See [19,20] for further details, variations and examples.
Extensionality implies a lot.The extensional equality is a congruence for the λ * -abstraction, and it follows that soundness for the βη-equality holds: M = βη N in the planar λ-calculus implies [[M ]] = [[N ]] in any extensional BI( ) •algebra.Also, it is routine to see that the closed term model of the planar λβη-calculus is an extensional BI( ) • -algebra.So are the term models of the λβη-calculus, linear λβη-calculus, and even the braided λβη-calculus.As a result, completeness for the βη-equality holds:

5-10
Internal Operads of Combinatory Algebras Moreover, any extensional BI( ) • -algebra has an internally defined isomorphic BI( ) • -algebra in itself: Indeed, the axiom (app•) states that (a • holds, and (B•), (I•) and (••) imply that axioms for B, I and (−) • hold in A • .If we follow the graphical presentation in the previous section, the last three axioms can be depicted as follows, which might be more understandable: Actually, we have chosen these axioms following the graphical intuition.The internally defined BI( ) •algebra A • is part of the structure of the internal operad to be spelled out below.

Internal Operads
As explained in Section 2, the idea of internal operads of a combinatory algebra A was to use elements of arity m → 1 (Figure 6) as polynomials with m variables.Thanks to combinatory completeness, such elements of arity m → 1 are equal to elements of the form a • • B m for some a ∈ A (Figure 7).

Internal Operads of Extensional BI( ) • -algebras
For an extensional BI( ) • -algebra A, we define a closed operad I A , which we shall call the internal operad of A, by

and app I
That is, A is combinatory complete and extensional with respect to I A .
While Proposition 4.1 can be shown by direct calculation, it is much easier to make use of the notion of arities.Following our observation on arities on the closed λ-terms (Proposition 2.2), we define:  From this lemma, Proposition 4.1 easily follows.Moreover, using this notion of arity, we can define a PRO (strict monoidal category whose objects are generated from a single object) of extensional BI( ) •algebras, into which the internal operad fully faithfully embeds.As an immediate corollary, we have a sort of Scott's theorem: Corollary 4.5 For any extensional BI( ) • -algebra A, there exists a monoidal closed category D with an object U such that U is isomorphic to the internal hom [U, U ] and the induced extensional BI( ) • -algebra Indeed, we may take the presheaf category Set C op A (monoidal cocompletion of C A ) as D and let U = C A (−, 1).
In Section 5, we will consider symmetric, braided and cartesian cases.For these cases, Theorem 4.4 can be refined as follows: C A is a PROP (strict symmetric monoidal category whose objects are generated from a single object) for the symmetric case, a PROB (strict braided monoidal category whose objects are generated from a single object) for the braided case, and a Lawvere theory for the cartesian case.The appropriate variation of Corollary 4.5 also holds for each case, where D is symmetric, braided or cartesian, respectively.

Internal Operads vs Planar Polynomials
There exists a homomorphism F of closed operads from the internal operad I A to the operad P A of planar polynomials sending F does not have to be faithful.As a counterexample, let A be the extensional BI( ) • -algebra of closed terms of the braided λ-calculus [9] modulo βη-equality, with B ≡ λf xy.f (x y), I ≡ λx.x and M • ≡ λf.f M .The following two braided terms (in the syntax of [9]) give two distinct elements of I A (2).However, F M + and F M − are the same map sending (a 1 , a 2 ) to a 2 a 1 , thus the information on braids is lost in P A (2).(In fact, while P A is a closed planar operad, it is not a braided operad.On the other hand, in Section 5 we will see that I A is a closed braided operad.)

The Canonicity of Internal Operads
In fact, the internal operad is the canonical -initial -one among the closed operads corresponding to an extensional BI( ) • -algebra.

5-12
Internal Operads of Combinatory Algebras Proposition 4.6 Let A be an extensional BI( ) • -algebra and P a closed operad such that P(0) ∼ = A.
Then there is a unique homomorphism of closed operads from I A to P.
Explicitly, the homomorphism from I A to P sends (assuming P(0) = A for simplicity) t ∈ I A (m) to app P (. . .(app P (t I, id P ), id P ) . . ., id P ) ∈ P(m).More succinctly, we have Theorem 4.7 The internal operad construction A → I A gives a left adjoint to the functor from the category of closed operads (and operad homomorphisms preserving the closed structure) to that of extensional BI( ) • -algebras (and maps preserving the BI( ) • -algebra structure) sending a closed operad P to an extensional BI( ) • -algebra P(0).

Extensional BCI-algebras and Closed Symmetric Operads
An extensional BCI-algebra is an applicative structure with elements B, C and I satisfying the following axioms.
These axioms first appeared in our previous work [9].They are chosen so that the internal operad construction gives rise to a closed symmetric operad: (λ), (ρ) and (α) are for the unit law and associativity of the composition, while (cox 1,2,3 ) are the axioms of symmetric groups and (bc) is the equivariance of symmetry with respect to the application -also it is the Reidemeister move IV for trivalent graphs.
Recall that the symmetric group on n elements is generated by the adjacent transpositions σ i = (i, i+1) (1 ≤ i ≤ n − 1) subject to the following relations (known as Coxeter relations): The axioms (cox 1 ), (cox 2 ) and (cox 3 ) correspond to these axioms of symmetric groups.(cox 1 ) can be depicted as which amounts to the axiom σ i σ i = e of the symmetric groups.
(cox 2 ) is equivalent to say that C is of arity 2 → 2, and expresses the following exchange law, which corresponds to the axiom σ i σ j = σ j σ i (j < i − 1) of symmetric groups: Finally, (cox 3 ) is which is the axiom σ i+1 σ i σ i+1 = σ i σ i+1 σ i of the symmetric groups.
On the other hand, the axiom (bc) is which amounts to the Reidemeister move IV [16,21] for knotted graphs:

R-IV R-IV
A symmetric operad is an operad equipped with actions of symmetric groups satisfying equivariance conditions (see the case of braid groups below).Lemma 5.1 An extensional BCI-algebra is also an extensional BI( ) • -algebra with a • = C I a. Proposition 5.2 For an extensional BCI-algebra A, I A is a closed symmetric operad s.t.I A (0) ∼ = A. Theorem 5.3 [9] Extensional BCI-algebras are sound and complete for the linear λβη-calculus.
Theorem 5.4 The internal operad construction A → I A is left adjoint to the functor from the category of closed symmetric operads to that of extensional BCI-algebras sending P to P(0).

Extensional BC ± I-algebras and Closed Braided Operads
Extensional BC ± I-algebras are a refinement of extensional BCI-algebras in which the C-combinator is replaced by the combinators C + , C − for positive and negative braids: Internal Operads of Combinatory Algebras The double signs ± and ∓ in an equation should be taken as appropriately linked, while ⋆ indicates an arbitrary choice of + or −. (As we have (C2), assuming just an instance of ⋆ suffices.)Closed terms of the braided λ-calculus [9] modulo the βη-theory form an extensional BC ± I-algebra.For a non-syntactic example, for any group G, the crossed G-set of inifinte binary G-labelled trees [9] is an extensional BC ± I-algebra; it is obtained as a reflexive object in the ribbon category of crossed G-sets and suitable relations [8].
A braided operad [6] is an operad equipped with actions of braid groups [2,15] satisfying equivariance conditions needed for handling substitutions involving braids.For instance, Figure 8 presents an instance of the equivariance condition, which shows that substituting a term with two free variables (g 2 ) for a variable in a braided term (f s) involves replacing a strand by two parallel strands in the braid (s). 3 For further details see Appendix A. We shall note that the axiom (C2), which has no counterpart in the axioms of extensional BCI-algebras, is added for making I A braided; it amounts to an instance of the equivariance condition: (f σ 1 )(g, id ) = f (id, g) = (f σ −1 1 )(g, id ) for f ∈ I A (2) and g ∈ I A (0), where σ 1 is the generator of the braid group B 2 of two strands which corresponds to C + and σ −1 1 is its inverse (corresponding to C − ).
Theorem 5.7 Extensional BC ± I-algebras are sound and complete for the braided λβη-calculus.
Theorem 5.8 The internal operad construction A → I A is left adjoint to the functor from the category of closed braided operads to that of extensional BC ± I-algebras sending P to P(0).

Extensional SK-algebras and Closed Cartesian Operads
Instead of SK-algebras, we study BCIWK-algebras with W corresponding to λf x.f x x and K corresponding to λf x.f .(It is well known that SK and BC(I)WK are equivalent since Curry's work [5].)An extensional BCIWK-algebra is an extensional BCI-algebra with elements W and K subject to the axioms saying • W : 1 → 2 and K : 1 → 0, • W and K form a co-commutative comonoid, and Explicitly, these axioms can be given as follows.
Proposition 5.9 An extensional SK-algebra is equivalent to an extensional BCIWK-algebra.
Proposition 5.10 For an extensional BCIWK-algebra A, I A is a closed cartesian operad s.t.I A (0) ∼ = A.
Theorem 5.11 Extensional BCIWK-algebras are sound and complete with respect to the λβη-calculus.
Theorem 5.12 The internal operad construction A → I A is left adjoint to the functor from the category of closed cartesian operads to that of extensional BCIWK-algebras sending P to P(0).
This adjunction is actually an adjoint equivalence (cf. the Fundamental Theorem in [12], which covers non-extensional cases as well); the cartesian case is technically much simpler than other variations.

Conclusion and Future Work
We proposed to use (semi-)closed operads as an appropriate framework for discussing combinatory completeness of combinatory algebras.As an alternative of polynomials, we introduced internal operads which make sense for extensional planar, linear, braided as well as classical combinatory algebras.Among them, the braided case was not covered by the conventional "polynomials as functions" approach, and this fact prompted us to introduce internal operads.In our study, the planar case is of particular importance, as it serves as the common foundation of all other cases.
It is shown that the internal operad construction is left adjoint to the forgetful functor from closed operads to extensional combinatory algebras.In addition, the internal operad construction is useful for deriving extensionality axioms in a systematic, semantics-oriented way.

Future Work
There are several cases yet to be covered.It should be possible to study Tomita's bi-BDI-algebras [20] within our framework; it is likely that they correspond to (semi-)bi-closed planar operads.Also it would be interesting to study combinatory algebras corresponding to the tangled (or knotted) λ-calculus briefly mentioned in [9].For a possible direction, see the discussion on traced combinatory algebras below.Another important direction is to relax the limitations of our approach.Firstly, we cannot handle applicative structures which are not combinatory complete.For example, the extensional theory of Bterms of Ikebuchi and Nakano [13] is not covered -for lack of the I-combinator, it does not give rise to an operad.It would be nice if we could extend our framework to cover such cases.Secondly, it is desirable to have a weak internal operad construction for non-extensional combinatory algebras, which would give rise to semi-closed operads.
Finally, in this paper we did not consider partial algebras nor relation to realizability.For that direction it would be useful to have a framework generalizing both ours and Turing categories [4].

Traced Combinatory Algebras
The graph Tr shown in Figure 9 does not correspond to a λ-term, but has interpretations in some BC ± Ialgebras, e.g., those arising as a reflexive object in a ribbon category, including the crossed G-set of G-labelled infinite binary trees [9].By applying Tr, we can create trace [14] in the internal PROP/PROB, as depicted in Figure 10.Such a trace operator allows us to represent knots and tangles.For instance, the trefoil knot can be expressed as the braid closure Tr (Tr (C Thus the internal PROP is not just traced but also compact closed (ribbon in the braided case). Hasegawa

5-17
It is tempting to call such combinatory algebras with Tr traced combinatory algebras; to be more precise, a traced combinatory algebra should be an extensional BC ± I-algebra (or BCI-algebra in the symmetric case) equipped with a trace combinator Tr.The axiomatizations of traced combinatory algebras, and the corresponding tangled λ-calculus, are left as an interesting future work.

Lemma 3 . 2
In an extensional BI( ) • -algebra, the composition a • b = B a b is associative, and I is its unit: that is, a • (b • c) = (a • b) • c and I • a = a = a • I hold.

Definition 4 . 2
An element a of an extensional BI( ) • -algebra is said to be of arity m → n when a • • B m+1 = (B a) • B n holds.

Theorem 4 . 4
For any extensional BI( ) • -algebra A, we have a PRO C A whose arrows from m to n are A's elements of arity m → n.In particular, we have C A (m, 1) = I A (m).

g 2 g 3 g 1 fFig. 8 .
Fig. 8.The equivariance conditionAn extensional BC ± I-algebra is an applicative structure with elements B, C + , C − and I satisfying the following axioms.

Lemma 5 . 5 Proposition 5 . 6
An extensional BC ± I-algebra is also an extensional BI( ) • -algebra with a • = C + I a.For an extensional BC ± I-algebra A, I A is a closed braided operad s.t.I A (0) ∼ = A.
• B and a • are comonoid morphisms (the latter implies W a b = a b b and K a b = a).