# A String Diagram Cal ulus for Predi ate Logi

and C. S. Peir e's System Beta

Geraldine Brady and Todd H. Trimble
1998 November 8; revised 2000 June 22
Abstra t
In the late nineteenth entury, C. S. Peir e developed a graphi al system for handling the

rst-order al ulus of relations. This system, alled
Beta, is reformulated here in modern terms, using developments in ategori al logi and geometri al representations of monoidal ategories. First,
we de

ne the notion of ( ategori al predi ate) theory as a parti ular ase
of Lawvere's hyperdo trines (with Boolean

bers and satisfying the Be kChevalley ondition), and express the syntax of

" akin to the Feynman diagrams in theoreti al physi s. obtaining Peir e's al ulus as a result. and developed for al ulations in general monoidal ategories by Joyal-Street. the goal of the paper is to give a geometri presentation for the monoidal 2- ategory of relations of a free theory on a predi ate language. This geometri presentation is based on \string diagrams. so that terms in .rst-order logi in terms of free theories on predi ate languages. Observing that ea h ( ategori al predi ate) theory gives rise to (and is embedded in) a monoidal 2- ategory of relations. The al ulus of string diagrams is extended by adjoining rewrite rules.

is shown to be sound and omplete with respe t to . The geometri al ulus whi h so arises. and inferen es between terms are represented by ertain rewrites of diagrams.rstorder logi are represented by deformation equivalen e lasses of ertain string diagrams. whi h we identify with Peir e's system Beta.

Peir e developed a remarkable al ulus of planar graphs for expressing logi al formulae and inferen es.: 18C10. beginning in 1870. 1 . Class. 01A55 1 Introdu tion Toward the end of the 19th entury.e. S. evolved as a way of handling the \logi of relatives" (i. 1991 Math. had invented as an outgrowth of his studies on Boolean algebra ([15℄). Subj. the Ameri an logi ian C. the al ulus of relations) whi h Peir e.rst-order logi . 03G30. 18D10. he expli itly refers to this al ulus as his \ hef d'oeuvre.. 18B10. Although little was published in Peir e's lifetime on existential graphs. Existential graphs. 18F99." and as an outline of the logi of the future. as he alled them.

e. are geometri al representations of propositional assertions. the initial part of his system.) Next ome Beta graphs.. whi h geometri ally represent . i.Existential graphs were developed in three stages of logi al omplexity. Boolean ombinations of propositional variables. (A rigorous modern formulation of system Alpha an be found in [4℄. Alpha graphs.

The basi operation. as Peir e re ognized. involved existential quanti.rst-order relational expressions. the relational produ t or omposition. was seen by Peir e as analogous to Boolean onjun tion (and so there is a lose tie-in between his rules for Alpha and rules for Beta) but.

Beta ould be used as a vehi le for expressing inferen es in predi ate logi . Thus. parti ularly those involving logi al quanti. ation as an essential omponent. as Peir e per eived.

ation. in the same way that .

rst-order relational al ulus adequately aptures the language of .

and that he suggests possibilities for \geometrizing" higher-order logi . whi h Peir e never brought to fruition and indeed were highly spe ulative by his own admission. there are Gamma graphs. temporal logi . and \variable sets" (toposes). Our reading is that Peir e was hinting at ideas found in modal logi . but lari. Finally.rstorder logi .

is their metaphori al ba kground: Peir e. as between atoms in a mole ular on. ation of these points will have to await a future paper. A remarkable feature about Beta graphs. guided by analogies with hemistry. the fo us of the present paper. pi tured an n-ary relation as something like an element with \valen y n." Composition of relations R and S is then pi tured as a \bonding" between two or more elements.

where we say for example that the variable y is \bound" in the omposite expression. z. with a di erent set of s ienti. and S is a predi ate expression with free variables y.guration. w. y. w) is pi tured by drawing a \line of identity" onne ting R to S : x z R y w S This metaphor of hemi al bonding a ords well with modern logi al terminology. if R is a predi ate expression with free variables x. y) ^ S (y. For instan e. z. then the relational omposite expressed by 9y R(x. Now.

. The idea is that the lines or edges in a string diagram represent linear spa es (e. in order to make rigorous the use of su h diagrams in generalized tensor al ulus.g. (Thus an operator of the form V1 : : : Vm ! W1 : : : Wn is represented by a node in ident to m edges oming from above and n edges 2 . Joyal and Street ([10℄) have introdu ed a mathemati al theory of so- alled string diagrams. ontexts in mind (namely. Hilbert spa e representations of Lie groups). and nodes where lines meet represent intertwining operators. the use of graphs in parti le physi s and relativity a la Feynman and Penrose).

whereby string diagrams are viewed as morphisms in a freely generated monoidal ategory.from below.) As Joyal and Street show. The basi insight behind our approa h to Peir e's system Beta is that the al ulus of relations is pro. the appropriate language for formalizing string diagrams is monoidal (or tensor) ategory theory.

f. (More exa tly. where relations are ertain morphisms between sets whi h ompose by relational omposition. we deal with formal relations viewed as arrows between types.tably viewed as a ertain type of monoidal ategory (or rather a monoidal bi ategory. working in a typed ategori al representation of . [6℄).

In se tion 2. the graphs that result are essentially the same as Peir e's Beta graphs. This paper is organized as follows. applying the ma hinery of string diagrams to present su h monoidal ategories. and the use of Peir e's \sep lines" to handle logi al negation.) Then.rst-order logi . su h as surgeries on string diagrams. The details of this approa h require several ingredients not found in the string diagram al ulus of [10℄. we give a purely ategori al formulation of .

rst-order logi based on Lawvere's notion of hyperdo trine ([11℄. and the . we need a parti ular variant of hyperdo trines: where the base need only be artesian. not artesian losed.

and su h that the Be k-Chevalley ondition is satis.bers are Boolean algebras.

ed). This gives a presentation of .

we sket h part of the onstru tion of this free hyperdo trine. in terms of a hyperdo trine freely generated from a predi ate language. In se tion 3. and more espe ially the notion of surgery needed to give geometri presentations of monoidal ategories. In se tion 4. emphasizing that it is embedded in a formal al ulus of relations whi h is onstru ted geometri ally as the paper progresses. we introdu e a variant of Joyal-Street string diagrams. as well as relations whi h re e t the adjoint relationship between re-indexing and quanti.rstorder logi whi h avoids the usual synta ti ma hinery of variables. We use string diagrams and surgeries to onstru t the base ategory of the free hyperdo trine.

ation. together with the Be k-Chevalley ondition. whi h expresses the Boolean algebra stru tures on the . In se tion 5. we \fold in" the rules of Peir e's system Alpha.

bers. we prove our main theorem: that the monoidal bi ategory whi h was onstru ted geometri ally in the pre eding se tions is isomorphi to the monoidal bi ategory of relations generated by the free hyperdo trine whi h represents . this ompletes our des ription of Peir e's Beta. In se tion 6.

That is to say. that Beta is sound and omplete with respe t to .rst-order logi (relative to a given predi ate language).

2 Languages and theories De.rst-order logi .

de. a set of   sorts S . a typing fun tion  : P ! S amounts to a fun tor  : S  ! S et.nition 1 A (predi ate) language onsists of a set of predi ates P . and a typing fun tion  : P !S . To get  from  . where S is the free monoid on S . Viewing a set S as a dis rete ategory and the free monoid on S  as a  monoidal ategory.

ne (w) as the set  1 (fwg). To get  from 3 .

de.

and if p 2 P .ne P as the disjoint sum w2S (w). de.

 : S ! S et). we usually view a language as a pair (S.ne  (p) as w whenever p 2 (w). De. In what follows.

a morphism of languages (S. S et0 ! where the . 0 ) onsists 0 of a fun tion f : S ! S together with a natural transformation  :  ! 0 f  . P. 0 Equivalently. The model then assigns to ea h predi ate p of type hs1 . : : : . say F (s). then (p) has type hfs1. also denoted S et0.  P S et ! S et. P 0 ! (S 0) ) 0 0 onsists of a pair of fun tions f : S ! S . fsni. ) ! (S 0 . A model assigns to ea h sort s 2 S a set. P 0. onsider a set-theoreti model of a predi ate language. : : : . sni a subset (p) of the produ t F s1  : : :  F sn. Now let  be the omposite fun tor given by .nition 2 A morphism or translation of languages (S. This gives a fun tion F : S ! Ob(S et). sni. : : : . As an example of a morphism. from S to the lass of sets.  : P ! P ompatible with the typing fun tions: if p has type hs1. P ! S ) ! (S 0.

: : : . Sn to their artesian produ t and the se ond map is the ( ontravariant) power set fun tor: this gives a large predi ate language (S et0 . ) may be des ribed as a morphism (F. Then a set-theoreti model of a language (S. A ertain amount of this stru ture suÆ es to model the semanti aspe ts of . su h as the Boolean algebra stru tures on power sets. The language of sets arries a lot of extra stru ture.rst map sends a list of sets S1. ) ! (S et0 .  : S et0 ! S et). ) : (S. ) into the language of sets.

We abstra t this stru ture in the following de.rst-order logi .

nition. based on Lawvere's theory of hyperdo trines [11℄: De.

nition 3 A ( ategori al predi ate) theory onsists of a ategory C with .

the following diagram ommutes: k TA 9f   C / / TP 9h  TC / T B: g 4 . together with a ontravariant fun tor T : C ! B ool (or a ovariant fun tor C op ! B ool) mapping to the ategory of Boolean algebras. su h that (1) For ea h morphism f : A ! B in C . (2) Given a pullba k k P A / f h  B g in C .nite produ ts. f  = T (f ) : T B ! T A has a left adjoint 9f : T A ! T B .

P f : P B ! P A sends a subset D  B to its inverse image f 1(D)  A. P : S etop ! Bool) in whi h we regard the ontravariant power set fun tor as valued in the ategory of Boolean algebras. the left adjoint 9f : P A ! P B orresponds to taking dire t images along f . The adjun tion of (1) says () f (C )  D if and only if C  f 1(D): As is well known. dire t images model existential quanti. In this ase.The ar hetypal example of a theory is the theory of sets (S et.

b). b) relative to some set-theoreti model. In order to apture the taking of dire t images in Boolean algebras more general than power sets. and so we require that ea h f  = T f have a left adjoint 9f . for example. b)g is the extension of the formula 9ap(a. ation: if.  : A  B ! B is proje tion to the se ond fa tor. It follows that universal quanti. and if C  A  B is the extension of a predi ate p(a. then the image (C ) = fb j 9a 2 A : p(a. one rewrites () as 9f C  D if and only if C  f  D.

ation. de.

ned by 8f = :9f :. Condition (2). is right adjoint to f . alled the Be k-Chevalley ondition. also holds in the theory of sets (as the reader an easily verify) and .

gures prominently in type-theoreti versions of .

To translate between the version given here and standard presentations of .rst-order ategori al logi .

belong to the same Boolean algebra. variables are not needed. so that E (p)  E (q) makes sense. relative to a given model. if we wish to ompare the logi al strengths of formulas p and q whose types do not mat h. we may retype them by pulling them ba k to expressions f p and gq over a ommon type T (synta ti ally: adjoin some dummy free variables). At the semanti level. q unless they have the same type. the reader should bear in mind that here we never write an inferen e p ` q between p. however. (Synta ti ally. and ompare the retyped expressions.) Thus. this ensures that their extensions E (p) and E (q).rst-order logi . The Be k-Chevalley ondition ensures that the meaning or interpretation of quanti. in our approa h. it means that p and q have the same free variables.

ation is preserved under su h retyping operations. T : C op ! Bool). To translate between theories (C. we introdu e the following de.

nition: De.

T ) ! (C 0 . the following diagram ommutes: TA A / 9f  TB B 5 T 0F A 9F f  / T 0 F B: .nition 4 A morphism or translation of0 theories (C. T 0) onsists of a produ t-preserving fun tor F : C ! C together with a natural transformation  : T ! T 0 F op su h that for all morphisms f : A ! B in C .

produ ts are not anoni ally given. but are de.By \produ t-preserving" we mean that the map hF A . F B i : F (A  B) ! is an isomorphism. In our framework.

In order to have adequate ontrol over this feature. as usual. De. only up to isomorphism.ned. we need a further level of stru ture.

T ) ! (C 0 . a modi. ). ): (C. (G.nition 5 Given two translations (F. T 0).

ation (F. and modi. translations between theories. ) ! (G. ) between them is a natural transformation F ! G su h FA  FB that the following diagram ommutes: T  EE EE EE EE E" / T 0 F op tt t tt tt 0 op tz t T  : T 0Gop We thus have a 2- ategory of theories.

onstru ted as follows. The fun tor C0 ! S et is de. T ) has an underlying language. ations between translations. The set of sorts of the language is the set of obje ts C0 = Ob(C ). Ea h theory (C.

ned up to isomorphism as a omposite jj  T C! Bool ! S et. C0 ! where j j : Bool ! S et is the underlying-set fun tor and  sends a .

If (F. Thus. jT 0 j  jj : jT j ! jT 0jF0 . ) : (C. Hen e. gives an underlying morphism between underlying languages. || || | | 0  || jT j  / C0  where : F  ! F0 is a anoni al isomorphism whi h arises by virtue of preservation of produ ts by F . T 0) is a theory morphism. so in general there are many underlying languages of a theory. there is no unique hoi e of produ t. but they are all anoni ally isomorphi . so we have an underlying fun tor U : T h ! Lang 6 . the pasting of the 2- ells.nite list of obje ts in C to their produ t. it is harmless to suppose that we have hosen an underlying language UT for every theory T . Of ourse. T ) ! (C 0 . then we have a diagram C0  / + (F0 ) (C00 ) C BB F BB jT j BB BB +jj S> et .

The syntax of .from the ategory of theories to the ategory of languages.

rst-order logi may be des ribed as the onstru tion of a theory F L whi h is freely generated from a language L. uniquely up to invertible modi. This means that given a modeling  : L ! UT of a language L in a theory T . one an extend to a translation ^ : F L ! T between theories.

ation: the ategory of translations and modi.

The onstru tion we give of F L avoids the usual variable-based synta ti ma hinery in favor of ategori al and geometri ally based onstru tions whi h are intimately onne ted with Peir e's system Beta. T ) is equivalent to the dis rete ategory or set of morphisms Lang(L. in a 2-natural sense. 3 The free theory of a language The ategory of types C of F L is the \free ategory with . ations T h(F L. UT ).

" Let F in be the ategory of .nite produ ts" generated by the set of sorts S of L. and may be des ribed by means of \wreath produ ts.

: : : . : : : . An obje t (m. a morphism is a fun tion f together with a list h1 . xmi of obje ts in D. mg as a dis rete ategory. then there is a ategory F in D whose obje ts are pairs (m. It is easy to show that F in D is the free ategory with . If D is any ategory. where f : m ! n is a morphism in F in and  : x ! yf is a natural transformation. : : : .nite ardinals f1. mg !x D). ). : : : . xmi there are m morphisms ki : (1. : : : . x) amounts to a list hx1 . hx1 . xmi). the morphisms (m. y) are pairs (f. : : : . for ea h obje t hx1 . so that (F in R D)0 = D0. where i : xi ! yfi. : : : . m i of morphisms in D. where the image 1 ! m is fig and where ki : xi ! xi is the identity. In parti ular. x) ! (n. These morphisms are inje tions whi h realizeRhx1 . where m 2 F in0 and x is a fun tor on f1. f1. : : : . xmi as the oprodu t mi=1xi in R F in D. ng (empty if n = 0) and Rfun tions between them. xi ) ! (m.

nite sums (D) generated by D. in the sense that if E is any ategory with .

the ategory of types of F L is de. S  ! S et). E ) between the fun tor ategory on the left and the ategory of oprodu t-preserving fun tors on theR right. Given a predi ate language L = (S. then (S ) = F in R S and (S ) = (S )op. The free ategory with produ ts is similarly formed as (D) = (F in Dop)op . E ) ' C oprod(F in D. there is a (2-)natural equivalen e R C at(D.nite sums ( oprodu ts). If D is a dis rete ategory S .

ned to be (S ). The reader should think of (S )0 = 7 . To omplete the des ription of F L. we need to onstru t an appropriate fun tor (S )op ! Bool (or (S ) ! Bool).

S0 as the olle tion of types of the free theory. and of F orm P (T )  = T 2S0 T 2S0 ! S0  P 1   = T 2S0 as the olle tion of all formulas or terms in the free theory. .

on a .e. (S ) must be allowed to a t both ontravariantly F orm ! S0 (by pullba k operations f  ) and ovariantly (by existentially quantifying).bered over the olle tion of types.. and of ourse lo ally (i.

xn i as formal n-ary relations of type x1  : : :  xn and. : : : . following Peir e.g. of relations R : A ! B between sets. Working in a two-sided relational al ulus (e..ber F ormT = (T ) over a type T ) there must be an appropriate Boolean algebra stru ture. to express the stru ture in terms of geometrized al ulus of relations. it is useful to view the formulas p of type hx1 . To handle all this stru ture. where the relational omposite of A !R B !S C is de.

given R : A ! B and S : C ! D. we re all that the ategory of relations arries a monoidal produ t . )). Namely. b) ^ S (b. ) = 9bR(a. R S : A  C ! B  D is de.ned by RS (a.

b) ^ S ( . and the monoidal unit is the terminal set 1. hb. where the obje ts are obje ts of C and whose morphisms A ! B are relations. this is a monoidal 2- ategory. Remark 1 If C is any regular ategory. i.! A  B. then there is a monoidal ategory Rel(C ).ned by (R S )(ha. moni arrows R . sin e relations of type A ! B may be partially ordered by in lusion.. i. di) = R(a.e. there is a monoidal bi ategory S pan(C ) of spans in C . In fa t. d). Similarly. if C has .

Our strategy for onstru ting the theory F L on a language L (with S as set of sorts) will be as follows.. The theory F L is retrieved as follows. more generally. In fa t. We build a monoidal (2-) ategory of relations where the set of obje ts or 0- ells is S . relations℄ p : T ! 1 to the unit 1 of S ) and monoidal sub ategories (S ) and (S ). if and only if C is a lextensive ategory [5℄). ompa t losed ategories and. We remark that is not the artesian produ t in Rel(C ) (in fa t. generated from predi ates p 2 (T ) in L (viewed as morphisms [i. Remark 2 R el(C ) is ompa t losed: ea h fun tor A { has a right adjoint of the form A { (by taking A = A).nite limits. -autonomous ategories whose monoidal produ t is the artesian produ t are equivalent to posets).e. the artesian produ t is given by taking oprodu ts in C . Formulas of type T in F L will be de.

ned as morphisms T ! 1. Pullba k operations and quanti.

ations will then be de.

ned as spe ial ases of relational omposition. Conjun tion of two formulas R : A ! 1 and S : A ! 1 is de.

ned as the omposite Æ S 1 1  A! A A R! =1 8 .

Se ond. to in orporate negation operations.in whi h we pull ba k along the diagonal Æ : A ! A  A in (S ). The extension is twofold. we give presentations of monoidal ategories by means of surgery rules on string diagrams ([3℄). used in [11℄. The omplete olle tion of deformations and surgery rules on diagrams is the geometri orrelate of the rules of inferen e in the . we follow Peir e and introdu e so- alled \sep lines": simple losed urves whi h surround subdiagrams of string diagrams (and regarded as negating these subdiagrams when viewed as subexpressions). The desired monoidal ategory is formed by extending the method of string diagrams and their deformations. First.

After presenting the ategories (S ) and (S ). and may be viewed as a modern formulation of Peir e's system Beta. we onstru t a monoidal 2- ategory Rel+ (L) whi h gives the desired relational al ulus for positive .rstorder relational al ulus. and a notion of surgery on diagrams needed to onstru t presentations of (symmetri ) monoidal ategories. 4 The geometry of positive formulas In this se tion. we begin by introdu ing a variant of the string diagram al ulus of [10℄ for symmetri monoidal ategories.

in luding the notions of topologi al graph with boundary and of tensor s heme. 4.1 Permutative diagrams De.rst-order formulas. Throughout this se tion we assume familiarity with the terminology and results of [10℄.

e. b1 ℄) is empty. b1 g) = G. (3) The omposite G G0 .. when restri ted to ea h onne ted omponent of G G0 . b0 ℄  [a1 . b1 ℄.nition 6 A permutative diagram onsists of a topologi al graph G with boundary G  G0 (i. is a smooth embedding. b1 ℄ su h that (1)  1 (fa0 .  (4) (x)  = (y) ) x = y holds for x 2 G and for all but . b1 ℄ !2 [a1 . b0 ℄  fa1 .! G ! [a0 . b0 ℄  [a1 . (2)  1 ([a0 . a subset of G0 onsisting of nodes with valen y 1)  together with a ontinuous map G ! [a0 . b0 g  [a1 .

or half-open line segment. if (x) = (a. b0 ℄  [a1 . again by (3). then by (3). (x) = (a. for ea h x 2 G0 G. then (K ) lies entirely above or entirely below (x). then for 9 . These axioms have the following onsequen es: by (1) and (2). In that ase. K is a losed. Let I = G0 G be the set of \interior" nodes. If x 2 I is an endpoint of (the losure of) K . We refer to the onditions of the pre eding senten e by saying K lies above/below x (2 K ).nitely many x 2 G. b). open. b) is interior to the re tangle [a0 . b1 ℄. If K is a onne ted omponent of G I .

Thus.all suÆ iently small  > 0. Finally. if we onsider the set of omponents Ki su h that x 2 Ki and Ki lies above/below x. by (4). for x 2 I there is a left-to-right order x=. (Ki ) \ (Kj ) \ ([a0 . b0 ℄ fb  Æg) is empty whenever i 6= j . then there exists  > 0 so small that for 0 < Æ < . the line y = b   interse ts (K ) exa tly on e.

given by the order of the horizontal (abs issa) oordinates of (Ki ) \ ([a0.x on those omponents Ki lying above/below x. b0℄ fb  Æg). De.

where hL1 . A h. : : : . 2 Km i. 2 : 0 (G I ) ! S su h that for ea h x 2 I . ) be a permutative diagram. : : : . Ln i is the order . and 1 x = h2 L1 . Km i is the order x . with I = G0 G. 1 x = h2 K1 . 2 Ln i. where hK1 . let D = (G. ! i S   S  ) be a tensor s heme. G. S. : : : . A labeling of D in T onsists of a pair of fun tions 1 : I ! A.nition 7 Let T = (A. : : : .

x . 1 : I ! A is a node-labeling fun tion. and  is a poset stru ture on the set of onne ted omponents of G I (given by taking the disjoint sum of the orders x. ). . 2. Ea h T -labeled permutative diagram is des ribed by a quadruple (. 2 : 0 (G I ) ! S is a string-labeling fun tion. 1 . where  : G ! R2 is a ontinuous map.

and Pos(0 (G I )).x. Thus. the set of fun tions I ! A. the set of ontinuous maps  : G ! R2. whereas AI . S 0(G I ). G. where Map(G. the set (G. R2). given a tensor s heme T and a graph with boundary (G. G). where x ranges over I ). G) may be topologized as a subspa e of Map(G. T ) of all T -labeled permutative diagrams over (G. is given the ompa t-open topology. are given the dis rete topologies. the set of poset stru tures on 0(G I ). De. R2)  AI  S 0(G I )  Pos(0 (G I )).

De. b0 ℄ fb1 g) and in (t)(G) \ ([a0 . as do the linear orders on the sour e and target strings of nodes x 2 I . G. The left-right orders on points in (t)(G) \ ([a0 . A deformation is thus a homotopy through T -labeled diagrams.nition 8 A deformation of T -labeled permutative diagrams is a path : I ! (G. b0 ℄ fa1 g) remain onstant as well by ondition (4). T ). where the node labelings and string labelings remain onstant.

T ).ning T -labeled diagrams to be deformation equivalent if there is a path between them in (G. ea h deformation-equivalen e lass has a well-de. G.

ned domain and odomain in S . de.

we need the following de. naturally equivalent (as a symmetri monoidal ategory) to the free symmetri monoidal ategory on the tensor s heme T . [10℄) Deformation-equivalen e lasses of T -labeled permu- tative diagrams are the morphisms of a symmetri stri t monoidal ategory.ned as the ordered lists of labels of strings whi h abut these respe tive ordered lists of points. To exhibit the symmetri monoidal stru ture. Proposition 1 ( f.

nition: 10 .

De.

d1℄ is a permutative diagram. d0 ℄ [ 1. b1℄ su h that  1 (f 0. The pullba k or restri tion is denoted res . d0g  [ 1 . b0℄  f 1. b0℄  [a1. is a topologi al graph with boundary. H ) ! [ 0 . d1℄) is empty and  1 ([a0.nition 9 Let  : G ! [a0 . with H =  1 ([ 0. and that  : (H. It is straightforward that H =  1([ 0 . d0 ℄  f 1. d1 ℄ . d0 ℄  [ 1 . d1 g)  fx 2 G I j (x) = (y) ) x = yg. d0℄  [ 1.! [a0. d1 g). the restri tion of  to ea h of the re tangular se tors shown de. b0 ℄  [a1 . A subdiagram onsists of the pullba k of  along a subre tangle [ 0 . Indeed. b1 ℄ be a permutative diagram. d1℄).

smi and v = ht1 . tensor produ t).e. a . b0℄ and 1 = a1 or d1 = b1.e. . morphism omposition). d0 ℄ = [a0.nes a permutative diagram in an analogous manner: b1 d1 . any permutative diagram G is omposed of diagrams of the following types: . then there are two verti ally juxtaposed permutative subdiagrams of G. the symmetry isomorphism u v ! v u is represented by a diagram in whi h ea h string labeled si rosses ea h string labeled tj . . and we regard G as their verti al omposite (i. . Similarly. . Given two obje ts u = hs1 . and G is their horizontal omposite (i.. . d1℄ = [a1. : : : . c1 a1 a0 c0 d0 b0 If [ 0. Up to deformation. b1℄ and 0 = a0 or d0 = b0 . : : : . tni. where the .. then there are two horizontally juxtaposed permutative subdiagrams. if [ 1 .

and the third orresponds to an element a 2 A of the tensor s heme (with strings labeled appropriately by letters of (a).  (a)). orresponding to a symmetry isomorphism.rst diagram is a single S -labeled string. we will use a s hemati to indi ate subdiagrams and their domains and odomains: 11 . the se ond is a rossing of two (S -labeled) strings. In the sequel.

for example. umi and hv1. : : : . our notion of deformation equivalen e entails equalities of the following type within a subdiagram: S s t f g u v = s t g f u . v where. De. v 2 are word labels hu1. of ourse. smi and t = ht1. : : : . The equality. 4. more pre isely. vni. the rossing of the \strings" labeled s and t is a s hemati shorthand for a multiple string rossing of multipli ity mn. u. tni. : : : . : : : . et . is the geometri re e tion of the naturality of the symmetry isomorphism. where ui labels the ith string from the left along the top edge of the subdiagram.2 Surgery Our theory also makes use of ertain \surgeries" on permutative diagrams. if s = hs1. As an example of this usage.u f v indi ates a subdiagram f with domain u and odomain v.

d0 ℄  [ 1 . d0 ℄  [ 1 . b1℄ be a permutative diagram. Suppose : H 0 ! [ 0 . d0 ℄  f 1. d0 ℄  [ 1 . with subdiagram res  : H ! [ 0 . d1 ℄. d1 g in [ 0 . De. b0℄  [a1.nition 10 Let  : G ! [a0. d1 ℄. d1 ℄ is a permutative diagram su h that res  and have the same C 1 germs on their boundaries: restri t to the same fun tion on some neighborhood of [ 0 .

with underlying graph G0 de.ne a new permutative diagram [H=H 0 ℄.

b1℄ de. G0 = G. and [H=H 0 ℄ : G0 ! [a0. b0℄  [a1.ned by (G H ) [ H 0 .

More formally. then a T surgery rule is a pair of (deformation-equivalen e lasses of) T -labeled diagrams of the form ( : H ! R2. A ! S   S ) is a tensor s heme. : H 0 ! R2) whi h have identi al domain and 12 .ned by  2 G H. we all this the surgi al repla ement of H by H 0. S. This onstru tion permits onsideration of equivalen e relations on symmetri monoidal ategories freely generated from a tensor s heme. 0 [H=H ℄(x) = ((xx)) ifif xx 2 H 0: Abusing language. if T = (A.

Given a set of T -surgery rules. odomain (as words in S ). de.

A permutative diagram presentation of a symmetri monoidal ategory M is de. ) is a pair of representatives of a T -surgery rule. where (. generated by the relation G . G0 . where G0 is obtained from G by surgi al repla ement of one T -labeled subdiagram  : H ! R2 by another : H 0 ! R2 .ne an equivalen e relation on deformation-equivalen e lasses of T -diagrams.

v) denotes the set of deformation lasses of T -diagrams with sour e u and target v. The same idea applies to progressive string diagrams for monoidal ategories in the sense of Joyal-Street.e.and surgery-equivalen e is isomorphi to M . In the sequel. Example 1 Let T be the tensor s heme given by S = 1. on the set of T -surgeries (identifying f and g if f . if the inverse of every surgery rule is a surgery rule.ned to be a tensor s heme T together with a set of T -surgery rules su h that the symmetri monoidal ategory of T -labeled permutative diagrams modulo deformation. f ). i A ! S   S  as indi ated in the string diagrams m u . Thus. and h.. if hom(u. The poset stru ture oin ides with the equivalen e relation in ase the set of T -surgeries is already a symmetri relation on diagrams. we will sometimes stipulate that ertain surgery rules are invertible. ug. v) indu ed by the re exive transitive losure . T -surgeries are also used to onstru t ertain symmetri monoidal ategories enri hed in the ategory of posets. Namely. g and g . where rossings of strings are not allowed. i. one may onsider the poset stru ture on hom(u. Let R be the equivalen e relation generated by the surgery moves 13 . We now give two examples for the monoidal ase. A = fm. then instead of onsidering the equivalen e relation generated by a set of T -surgeries.

m m m m . m m The monoidal ategory. is isomorphi to the simpli al ategory  (of . u u . generated by deformation lasses of planar progressive diagrams modulo these surgery moves.

we present the ategory (S ).3 Presentation of (S ) and (S ) Next. returning to the symmetri monoidal ase. and h. Example 2 Let T be the tensor s heme given by S = 1. A = fi. The monoidal ategory with presentation hT. Ri is pre isely the ubi al ategory 2. in luding the empty ordinal). Æ1g. 4. Let R be the equivalen e relation generated by the surgery moves d0 d1 i i .nite ordinals and weakly in reasing maps. Æ0. i A ! S   S  as indi ated in the string diagrams d0 i d1 . (S ) is generated by deformation lasses of permutative diagrams on a tensor 14 .

A h.  i : A ! S   S . we . To des ribe the surgery moves. whi h are based partly on naturality requirements for diagonal maps Æ and proje tion maps . S.s heme (A . ! i S   S  ). and s s ds es s s to indi ate the sour e-target fun tion h. with A = fÆs j s 2 S g [ fs j s 2 S g.

If u = hs1.rst need to des ribe derived arrows Æw and w for w 2 S . sni and if v = us. we de. : : : .

ne Æv indu tively as u u du s u s ds s . : : : . Similarly. where it is understood that the sour e of Æu onsists of n strings with the label sequen e hs1. v is de. sni and the target of 2n strings with the label sequen e s1 : : : sn s1 : : : sn .

we have 15 .ned indu tively as u s eu es . The s hema for the surgery rules is as follows: given a subdiagram f .

we have the following theorem. Peir e alls a on. we drop the labels Æ and  sin e no ambiguity will result in our diagrams. d u whi h orrespond to triangular equations for the adjoint pair  a . modulo the surgery rules (S1). Displaying this set of surgery rules by (S1). and we also have u u d (S1) u u u e e . where  is the diagonal fun tor (S ) ! (S )  (S ) and  is the produ t (S )  (S ) ! (S ).u u f d u u f f v v . d v v v (S1) u f u v e . is isomorphi to (S ). e whi h orrespond to naturality of Æ and . The opposite ategory (S ) is obtained by inverting all diagrams of (S ). In pra ti e. Theorem 1 The symmetri monoidal ategory generated by the tensor s heme A = fÆs j s 2 S g [ fs j s 2 S g.

4. we will use this terminology in the sequel.guration of strings whi h meet at a Æ a \ligature." and a string ending at an  a \loose end".4 Pullba ks and quanti.

we follow Peir e and view all onstru ts of the theory (the elements of F orm(L). As also remarked. and also of (S ) and (S )) as formal relations whi h 16 .ers As we remarked earlier. both (S ) and (S ) a t ( ontravariantly) on the set of formulas F orm(L) of the free theory F L of a language L = (S. S  ! S et).

Thus. taking the generating tensor s heme to be A [ A [ P h. we will present a monoidal 2- ategory Rel+(L). 1). the empty target) will be referred to as positive geometri formulas. where P is the set of predi ates of L. with 1 the unit of S . and where h.. we need surgery rules (S2) to re e t the adjoint relationship between pullba k operations f  and existential quanti. The olle tion of diagrams with given sour e and target will be partially ordered.e. via a olle tion of surgery rules des ribed under (S2) and (S3). Those (deformation lasses of) permutative diagrams generated by this tensor s heme and with target 1 (i. an be omposed horizontally (the relational or horizontal produ t R S ) and verti ally (the relational omposite RS ).  i(p) = (type of p. The a tions by (S ) and (S ). ! i S   S  . where A ! S   S  and   A ! S  S are the tensor s hemes used to present (S ) and (S ). emerge as operations derived from horizontal and verti al ompositions. In addition to the surgery rules used to present (S ) and (S ). whi h are viewed here and by Peir e as more basi . by pulling ba k and existentially quantifying.

we de. we will see that these rules are also derivable from Peir e's so- alled Alpha rules. If p is a positive geometri formula of sour e type v and if f : u ! v is a morphism of (S ) viewed as a permutative diagram. Later in this paper.ers 9f .

p If q is of sour e type u and f is as before.ne f p as the diagram u f v . then f op : v ! u in (S ) is obtained by inverting the diagram for f . and we de.

The unit and ounit of the adjun tion 9f a f  are expressed by surgery rules (noninvertible in general): 17 .ne 9f q as v f op u q .

v f v A basi example on erns existential quanti.u f u . v f op u (S2) v f op u .

 : s ! 1 in (S )): the ..e. ation via the taking of dire t images along a proje tion map (i.

Remark 3 These moves denote the unit and ounit of 9f a f  where f = s : s ! 1.rst move. is already in Peir e's work and is alled \breaking in positive regions": s s . Both the unit and ounit moves of the pre eding example are instan es of Peir e's weakening rule. To get from the right to the left.2. given in x4. s . s Proof: The equality means that ea h diagram an be derived from the other through surgeries. for the unit 1 ! f 9f . we apply a unit 18 . s This is the ase where f = s : s ! e. Lemma 1 s s s = s . Noti e that we have dropped the label  (as the label is super uous).

. where f = Æs. where the . apply the sequen e = . To get from left to right.

= Cf. Remark 4 The equality of Lemma 1 may be viewed as an instan e of Peir e's iteration rule.rst step is a lo al breaking. The next two lemmas follow from Theorem 1: we isolate them for future onvenien e. Lemma 2 . the se ond step indi ates a de omposition into subdiagrams.2. given in x4. e. Lemma 3 asserts o ommutativity. and the third applies surgery rules for (S ) and (S ) to these subdiagrams. 19 . [5℄: ea h obje t u has a omonoid stru ture. d. q.

.Lemma 3 . we introdu e surgery rules (S3) whi h orrespond to the Be k-Chevalley ondition.5 Be k-Chevalley rules Next. These on ern pullba ks in (S ) or pushouts in (S ) = F in R S . and ultimately to get an eÆ ient set of rules whi h are ne essary and suÆ ient for Be k-Chevalley. to visualize these pushouts geometri ally. = 4.

For example. The feature means essentially that the arguments below. written in the ase for F in. sin e F in admits all pushouts. (2) A labeling of ea h onne ted omponent of a F in-diagram by an element of S . our next observation yields the following result: Proposition 2 (S ) ((S )) admits all . apply generally to F in R S .rst we observe that a (permutative) diagram for a morphism in F in R S has two ingredients: (1) A diagram for the underlying map in F in (the ase S = 1). and onne ted omponents of larger diagrams preserve this feature. Condition (2) is lear: ea h string of a generating diagram Æsop or ops in the tensor s heme for (S ) is labeled by the same element s 2 S .

 h /P may be visualized as the set of onne ted omponents of a permutative diagram obtained by gluing together the diagrams for A !f B and A !g C along the set of nodes orresponding to A. for example. we may hoose. as in A f / B g k  C . 20 . Topologi ally it makes no di eren e whether these diagrams read \top-down" or \bottom-up" (we get the same onne ted omponents regardless).nite pushouts (pullba ks). we observe that a pushout P . Se ond.

so that it suÆ es to analyze the possibilities in F in for the following three ases:  pushing out a mono along a mono. and the remaining morphisms h. we are obliged to in lude a surgery rule whi h permits surgi al repla ement of ea h of the two pre eding diagrams by the other. Sin e g9f = 9hk by Be k-Chevalley. We observe that epi-mono fa torization in F in indu es epi-mono fa torization in F in R S . 21 . and we al ulate the set of onne ted omponents of the omposite diagram to get the pushout. Example 3 1 2 C g 1 2 3 A f 1 2 B has one onne ted omponent. so P = 1. we study geometri representations of pushouts in F in along lines similar to those of Example 3.C g A f B This is the diagram used for the omposite operation g9f . where h and k are diagonal maps in (S ). To get a omplete set of surgery rules whi h apture the Be k-Chevalley ondition. k 1 2 B The se ond diagram represents the omposite 9hk. k of the pushout in F in are given as: 1 2 C h 1 P .

The . pushing out a mono along an epi.  pushing out an epi along an epi.

if g : n ! n + 1 is a moni and n !f m is any map in F in. The last possibility is slightly more interesting. follows from instan es of deformation equivalen e for permutative diagrams as displayed in the equation. then (without loss of generality) the gluing of diagrams of f and g is represented by the left-hand diagram below: n + 1 n + 1 n n h f g m + 1 n f f . Ea h epi de omposes into a sequen e of epis of type n +1 ! n. but simple to analyze nonetheless. in the se ond diagram. and the Be k-Chevalley equality g9f = 9k h. . one an arrange the diagrams (by manipulating symmetry isomorphisms and Lemma 3) until one has a subdiagram. k m m m m and now. thus. for g moni . so that the pushout P has ardinality m+1.rst two possibilities are ases where Be k-Chevalley holds automati ally: any moni in F in de omposes into a sequen e of moni s of type n ! n +1. ea h of the onne ted omponents of f (one for ea h element in m) rosses the dotted line exa tly on e. In pushing out one epi of this type along another. involving a pushout of two instan es of the epi 2 ! 1 (possibly \expanded" by appli ations of m  { or {  m).

tting into one of the following ases: 22 .

it follows from a deformation resulting in. Summarizing. .. The Be k-Chevalley equality pertaining to ase (1) follows from Lemma 1. or This leaves ase (2). the Be kChevalley ondition is equivalent to ertain deformations plus (invertible) surgery moves 23 . dis ussed in the prior example. . For ase (3). (1) (2) or (3) or . respe tively.

only the rules (S2) for adjun tions 9f a f  hange the obordism type of su h surfa e diagrams. Remark 5 An interesting alternative to the string diagram representations of Peir e's system Beta. 5 Rules for . for example. In the sequel. These surfa e diagrams give oriented obordisms between sets of ir les. (S3) . may be presented as a wreath produ t C2 R S . among the surgery rules dis ussed thus far. involves onsideration of \surfa e diagrams" (see [12. we refer to this fa t by alling the rules of (S1) and (S3) obordism rules. instead of representing morphisms in (S ) and (S ) by planar immersions of one-dimensional topologi al graphs. then the symmetri monoidal ategory generated by (S ) and (S ) (as symmetri monoidal sub ategories). whose morphisms are two-dimensional obordisms with onne ted omponents labeled in S . Thus. if C2 denotes the symmetri monoidal ategory of two-dimensional obordisms. Thus. the graph of Æ is thi kened out to a \pair of pants").. one thi kens the graphs out to two-dimensional surfa es with boundary (by embedding the graphs in R3 and taking their normal bundles. and the surgery rules (S1) together with the Be k-Chevalley rules (S3) are aptured pre isely by obordism equivalen e. 1℄). and subje t to the Be k-Chevalley equations. as given here. In this formulation.

we omplete our formulation of Peir e's system Beta. .rst-order diagrams In this se tion.

we adjoin surgery rules to re e t Boolean algebra stru ture." and orrespondingly expanding our notion of deformation between su h diagrams. after giving rules of interpretation of these diagrams.1 Negation To in orporate negation. we essentially follow Peir e and introdu e the following de.rst by expanding our lass of diagrams so as to in lude \lines of negation. Se ond. 5.

nition: 24 .

De.

d0 g  [ 1 .nition 11 A sep line (on a Rel+(L)-diagram with underlying graph G ! [a0. d1 ℄) is empty. b1℄ su h that (1)  1 (f 0 . b0℄[a1. d0 ℄ fd1 g) ontains no node labeled by an element of A(S ) [ P. d0 ℄  f 1 g) ontains no node labeled by an element of A(S ) [ P . d1℄  [a0. and  1 ([ 0 . d0℄[ 1. (2)  1 ([ 0 . b0℄[a1. b1℄) is the boundary of a re tangle [ 0 . A .

rst-order diagram onsists of a Rel+(L)-diagram together with a .

A .nite olle tion of noninterse ting sep lines.

rst-order form (or form for short) is a .

A .rst-order diagram with empty target.

rst-order subdiagram of a .

relative to any given sep line of D. d1 ℄. The intention is that a sep line negates the region it en loses. together with all of the sep lines ontained in [ 0. d0 ℄  [ 1. d1℄ of the underlying Rel+ (L)-diagram of D (su h that [ 0 .rst-order diagram D onsists of a subdiagram  : H ! [ 0. A subform is su h a subdiagram with empty target. d1 ℄. Keeping the notation used in the pre eding de. d0 ℄  [ 1 . d0℄  [ 1. ontains the sep line or is exterior to it).

d0 Æ℄  [ 1 + Æ.nition. d1 Æ℄ de. the re tangle [ 0 + Æ.

The semanti s of pla ing a sep line around su h a region. S  ! S et) ! (S et0 . S et0 ! S et). the subdiagram is interpretable (independently of suÆ iently small Æ) as a relation R . where A is the interpretation of the sour e of the subdiagram.! A  B on sets A and B . as in the prior de. and under some model (S. and B of its target.nes a subdiagram for all suÆ iently small Æ.

if there are no nodes between two su h sep lines. where one sep line is interior to another. \Sepping" an be iterated. A further intention is that there is a spa e of . is to take the omplement of R in A  B.nition. then the appropriate semanti s of multiple seppings is the iterating of negations or omplementations.

T ) . where the last fa tor denotes the free ommutative topologi al monoid on the spa e of quadruples ( 0 .! Map(G. and that the logi al interpretation of a . d1 ) representing sep lines). R2)  AI  S 0(G I )  P os(0(G I ))  exp(R4). 1. G.rst-order diagrams on a graph G labeled in a tensor s heme T (topologized as a subspa e (G. d0.

e.. along a path in the spa e of .rst-order diagram is invariant under deformation (i.

De.rst-order diagrams).

nition 12 A deformation of T -labeled .

G. T ). as required in the de. and over \ rossing points" (where  : G ! R2 is not inje tive). this means that the top of the sep line in a diagram undergoing deformation is allowed to pass ba k and forth over nodes labeled as Æ. It orresponds to the fa t that pullba k operations f .rst-order diagrams is a path : I ! (G. ommute with negation :.  in A(S). In pra ti e. for f a morphism in (S ).

nition of ( ategori al predi ate) theory 25 .

Sin e the ategory of relations is self-dual.(where f  = T (f ) is a morphism of Boolean algebras). For the reader's onvenien e. we present a few examples of . the bottoms of sep lines may pass ba k and forth a ross nodes labeled in A(S) and over rossing points.

deformations. and their interpretations as formulas in .rst-order diagrams.

distin t variables are assigned to ea h sort of the sour e and ea h sort of the target. In these examples. Horizontal juxtapositions of subdiagrams are interpreted as onjun tions. variables whi h label strings whi h meet at a boundary between two subdiagrams are identi. or strings whi h meet at a ligature. and the strings abutting these nodes have been labeled.) In interpreting subdiagrams. two distin t variables are expli itly asserted to be equal if they label the same strings. In interpreting verti al omposites.rst-order logi . p and q are predi ates or formulas labeling nodes. and are then assigned to ea h string whose losure is interior to the subdiagram. (It is hoped that this last onvention will assist the reader in making the translation into the standard variable-based notation whi h a ompanies these diagrams. even though our approa h es hews variables. solid re tangles denote sep lines and a dotted line represents the boundary of a diagram or subdiagram. not by the appropriate sorts but by variable terms of those sorts.

.e. Example 4 x x 5 [x = y] [x = y] . y y In the .ed (i. should be literally the same).

Example 5 z x y 9z [z = x ^ z = y℄. the sour e variable x and the target variable y are asserted to be equal. the equality is negated by the sep line.rst diagram. in the se ond diagram. 26 .

In the next example. However. this is also an equality predi ate (with two free variables x. variables are identi. Example 5. When verti ally omposing two subdiagrams. as an arrow of the form 1 ! X  X mated with the identity X ! X . a deformation equivalen e between diagrams is interpreted as an equality between formulas.As in Example 4. y). Example 4 should be interpreted as an identity arrow X ! X in the monoidal ategory of relations. Example 6 p x y x y x = p y x :(p(x) ^ [y = y℄) = :p(x) ^ [y = y℄.

This asserts that there exist two distin t elements x.g. y whi h satisfy p. Example 8 = z x y p p x p 27 z y p . Example 7 z x y p p 9x9y:(9z [z = x ^ z = y℄) ^ p(x) ^ p(y)..ed a ross boundaries (e. the instan es of x or y in the example).

" Observe that the .9z 9x9y(z = x ^ z = y) ^ p(x) ^ q(y) ^ :[z = z ℄ = (9x9y9z[z = x ^ z = y℄ ^ p(x) ^ q(y)) ^ ?. where ? denotes \false.

Example 9 z x y p z = x y p p p 9x9y9z :[z = x ^ z = y℄ ^ p(x) ^ p(y) = 9x9y9u9v9z [z = u ^ z = v℄ ^ :[u = x ^ v = y℄ ^ p(x) ^ p(y): This says that there exist two elements of a given type.rst of these expressions is self ontradi tory. and at least one of them satis.

and (S3) to the lass of . We extend the surgery rules (S1).es p. (S2).

We say that su h a subdiagram is oddly en losed if it is in the open interior of an odd number of sep lines. relative to any given sep line . Sin e (S1) and (S3) are already invertible by de. then the inverse of (S1). If a subdiagram is evenly en losed. and (S3) may be applied to it. (S2). and (S3) may be applied to it. if it is oddly en losed. First. (S2). then (S1). is interior or exterior to . su h a surgery rule an only be applied to a subdiagram whi h.rst-order diagrams as follows. and evenly en losed otherwise.

. \rules of obordism". f. If we drop (S2) for now and retrieve it later from Alpha. However. remark 5) given thus far. Example 10 The following moves are valid inside a single sep line: u .nition. this onvention has an e e t only on the unit and ounit rules (S2). . (S3) (i. as mentioned earlier. u u 28 . we may say that the sep-parity onvention has no e e t on the rules (S1)." given below.e. (S2) is derivable from the rules of \system Alpha.

an expression may be added (just as an inferen e may be weakened by adding an extra hypothesis). Example 4). (1) Given a . 5. For instan e. one adds an assertion whi h equates two variables ( f. in the se ond move above.where in the graph at the beginning of the se ond move both strings are labeled by the same sort. from evenly en losed regions. an expression may be deleted (just as an inferen e is weakened by deleting a on lusion).2 Boolean algebras and system Alpha We formulate the remainder of Peir e's rules (based on his system Alpha [4℄) as follows. Peir e would view this example as an instan e of Alpha weakening: to oddly en losed regions.

rst-order diagram G and a .

a .rst-order subdiagram p whose underlying Rel+(L)-diagram is a subdiagram of a Rel+(L)-subdiagram of G of the form u p . v where the \empty" subdiagram D onsists only of the loose ends labeled u and v.

is invertible. (2) The following dire ted move may be applied whenever a . alled Alpha iteration. provided that D is en losed by any sep line whi h en loses p: u u p p p . v v This surgery rule.rst-order diagram deformation-equivalent to p may be (smoothly) atta hed to the u-string and v-string inside D.

rst-order subdiagram p is evenly en losed: 29 .

e. (3) Two nested sep lines may be inserted or removed. This is the Alpha rule. provided that no nodes lie in the region between them. weakening p p .. v v This surgery rule is reversed if p is oddly en losed. As shown in [4℄.u u p .g. This invertible rule is alled double sep elimination/introdu tion. the Alpha rules may be exploited to put a Boolean algebra stru ture on the set of (deformation lasses of) .

rst-order diagrams with given sour e and target. in the ontext of this paper. The a tual ase onsidered in [4℄ is. Given diagrams f. g : u ! v. the ase where one restri ts to diagrams of the form T ! 1 whi h have no subdiagrams belonging to (S ) ( orresponding to quanti. v and the negation of f is given by surrounding the diagram f by a sep line. their onjun tion is u g f .

Then deformation lasses of propositional forms. the remaining set of surgeries we all propositional surgeries.er-free formulas). is essentially equivalent to a typed form of propositional logi . (S2) must be removed). That is to say: if we de. modulo propositional surgeries..g. we all these \propositional forms." This restri tion puts some obvious restri tions on whi h surgeries are allowed (e.

ne a propositional theory 30 .

as in de.

nition 3 but drop onditions (1) and (2) in that de.

nition (i. if we drop quanti..e.

ation). and if we de.

ne a translation of propositional theories as in de.

nition 4 but drop the quanti.

is isomorphi (as a (S )-. then we have the following result: Theorem 2 (see [4℄) Deformation lasses of propositional forms on a predi ate language L. modulo propositional surgery. ation-preservation ondition.

g for f. f . v): Y Lemma 3 f g f Y deiteration g f f deformation g f Lemma 2 cobordism weakening Y deformation double sep Y elimination g g We also present the \dual" of modus ponens. modulo all of the surgery rules. As an example. we present \modus ponens" (f ) g) ^ f .bration) to the free propositional theory on L. It is straightforward to extend the methods of [4℄ to show that deformation lasses of diagrams in hom(u. (g ) (f ^ g)): 31 . v). g 2 hom(u. form a Boolean algebra.

Y double sep introduction f Y Y cobordism f weakening f g f deformation Y iteration g f Y g Lemma 2 g g f deformation Similarly. and . a latti e (using the sepparity onvention and double-sep elimination/introdu tion). a Heyting algebra (using modus ponens and its dual above). it is easy to show that equivalen e lasses of diagrams u ! v form a meet-semilatti e (using iteration and weakening).

we show that the . 6 Soundness and ompleteness of Beta In this se tion.nally a Boolean algebra (Heyting algebra plus double-sep elimination/introdu tion).

rst-order relational al ulus (and inferen es therein) is expressed pre isely by .

rst-order diagrams and deformations and surgery rules thereon. T ) We begin by re alling the relationship between .1 The monoidal 2- ategory R ( el C. 6.

rst-order logi and .

whereby ea h theory (C. T ).rst-order relational al ulus. Obje ts of Rel(S et. For the theory of sets. Rel(S et. T ) gives rise to a monoidal 2- ategory Rel(C. T ) an be retrieved in turn from Rel(C. ea h theory (C. B. : : :. P ) are sets A. T ) of two-sided relations. As we shall see. B) is de. and hom(A. S etop !P Bool) is onstru ted as follows.

B)  hom(C. B  D) is de. The monoidal produ t hom(A.ned as P (A  B) (viewed as the set of relations from A to B). D) ! hom(A  C.

P (A  B )  P (C  D) ! P (A  B  C  D) ! 32 .ned as a omposite  P (A  C  B  D).

where the .

S (b. b) ^ S (b. C ) ! hom(A. Composition of morphisms (i. )) 7! 9bR(a.e. b). B)  hom(B.rst map sends a pair of subsets to their produ t. ) may be de. C ) (R(a. relational produ t) hom(A. and the se ond one arises from middle-four inter hange..

)) 7! R(a. to obtain a formal al ulus of relations Rel(C. b). Before establishing the monoidal ategory axioms on Rel(C. T ). we . T ). S (b0. ) 7! 9b R(a. ): The idea is to generalize this onstru tion for the theory of sets to any theory (C. b) ^ S (b.ned as a omposite 9 P (A  C ) P (A  B 2  C ) (1Æ!1) P (A  B  C ) ! P (A  B )  P (B  C ) ! (R(a. b) ^ S (b. T ).

T ).rst generalize a few well-known results whi h on ern the ovariant power set fun tor P : S et ! S et. Given a theory (C. let 9 : C ! Bool denote the ovariant fun tor de.

We de. where j j is the underlying poset fun tor. Let M : C ! P os be the omposite B b jj 9 Bool ! C! P os.ned on obje ts by 9A = T A and on morphisms f : A ! B by 9f = 9f : T A ! T B.

" (Frob) 9f (f B ^ {) = B ^ 9f {.jT  ji jT X j  jT Y j hjT  j! jT (X  Y )j  jT (X  Y j ^! jT (X  Y )j: X Y Lemma 4 The map  is natural. for A 2 T X and B 2 T Y . we apply Be k-Chevalley (BC) in onjun tion with \Frobenius re ipro ity (Frob). The map  is given by a omposite .e.  is the map from a singleton 1 whi h names the element \true": the maximal element in the Boolean algebra T 1. i.ne stru ture maps  : MX  MY ! M (X  Y ) and  : 1 ! M 1.. Proof: We must show that TX  TY 9f 9g  T X0  T Y 0  Y X / /  0  0 X Y T (X  Y )  T (X  Y ) T (X 0  Y 0 )  T (X 0  Y 0 ) ^ ^ /T (X  Y ) 9f g / T (X 0  Y 0 )  ommutes. 33 . we have X 0 9f A ^ Y 0 9g B = 9f g (X A ^ Y B ): To prove this.

Proof: The statement is the onjun tion of Lemma 4 together with the statement that the following diagrams ommute: TX  TY 1Y Z  T Z XY 1/ T (X  Y )  T Z T X  T (Y  Z ) XY.. whi h is left to the reader. for the .Z / T (X  Y  Z ). . We have X 0 9f A ^ Y 0 9g B BC = 9f 1X A ^ 91g Y B Frob = 91g ((1  g)9f 1X A ^ Y B) BC = 91g (9f 1(1  g)X A ^ Y B) Frob = 91g 9f 1 ((1  g)X A ^ (f  1)Y B) fun = 9f g (X A ^ Y B): q: e: d: Theorem 3 The triple (M. is straightforward. e.     TX o and TX  TY  / T (X  Y )  TY T   TX  T (Y /  X ):  The ommutativity of these diagrams.Y Z   1  TX  1 / T1  TX M T (1  X ).g. X.  ) : C ! P os is a lax monoidal fun tor.whi h obtains by taking left adjoints on the equation f (B ) {) = (f B ) f {).

symmetry. the following diagram ommutes: T X0  T Y 0 f  g  TX  TY  / T (X 0  Y 0 ) (f g)  34 /T (X  Y ):  . Lemma 5 Given f : X ! X 0. e. resp. third) diagram. d. g : Y ! Y 0.) together with fun toriality and the fa t that maps of the form f  preserve onjun tion ^.rst (se ond. q. one ombines asso iativity (identity.

q. d. e. Now we de.The fa t that the diagram Proof: T X0  T Y 0 f  g  TX  TY  0  0 X Y / T (X 0  Y 0 )  T (X 0  Y 0 ) ^ T (X 0  Y 0 ) / (f g) (f g)  Y X / T (X  Y )  T (X  Y )  (f g) ^ / T (X  Y )  ommutes is trivial: ommutativity of the left square follows from fun toriality. the right square ommutes be ause (f  g) is a Boolean map.

i. the hom set hom(A. Obje ts of Rel(C. R 2 M (A  B )i. T ) are R types. B) is partially ordered by the relation  oming from the Boolean algebra stru ture on M (A  B).e. T ). B. obje ts of C . and instan es R  S may be regarded as 2- ells.) A monoidal produ t is de. (Observe that 2- ell isomorphisms are equalities. Morphisms A ! B are triples hA..ne the monoidal 2- ategory Rel(C.

ned on obje ts A. On morphisms. : : : by taking artesian produ ts in C . the monoidal produ t hom(A. B)  hom(C. D) ! hom(A  C. B. B  D) is de.

C ) is de. M (A  B )  M (C  D) ! M (A  B  C  D) ! where the se ond map is M (or jT j) applied to a middle-four inter hange. Composition hom(A. C ) ! hom(A.ned as the omposite   M (A  C  B  D). B)  hom(B. The unit of is the obje t 1 2 C .

we give a sket h as follows.ned by the omposite  M (AB )M (B C ) ! M (AB 2 C ) (1ÆB 1) ! M (AB C ) M (1B 1) ! M (AC ). Asso iativity of verti al omposition amounts 35 . and in other proofs in this se tion. and in a similar way M (A1  : : :  An ) to A1 : : : An . and the unit is the equality predi ate   ! 1 ! M 1 ! MA MÆ A M (A  A): Lemma 6 Rel(C. unless n = 1 (where we write MA1 instead). To save spa e. we abbreviate M (A  B) to AB. Proof: In this. most details are left to the reader. T ) is a (poset-enri hed) ategory.

one of the the unit laws for verti al omposition follows from Mq8 1  AB OO  1qqqq 1  1 / MA  AB OO MÆA 1/ AA  AB OOO Lem 4 NNNNN  OO NNN q q NN  OOOO q q  q ' (11) / N' (1) /  AB AB AAB AAAB << oo ooo o << o o BC o (AB ) fun oooo  << ooo ooo (1Æ1) << oo (Æ(1)Æ1)  o w o w Thm 4 << / AB gg AAB g AB << o g g o g g << 1 ooo fun ggggg << oooggggggg(1g1) o < o ooggggg swg OOO Lem 5 OO  OOOO ' 1 q: e: d: Before pro eeding further. orresponds to the move : AB A D A D C B . whi h lo ally have the form: 36 . for example. C B R S R U (RS)U S U R(SU) whi h may be de omposed into a sequen e of four moves.to ommutativity of a diagram of the form (1ÆB 1) / 1 (11)1/ 1 / AB  BC  CD ABBC  CD ABC  CD AC  CD    1 Lem 5 Lem 4 Thm 3 1(1ÆC 1)   / ABBCCD (1ÆB 1) /   AB  BCCD (1ÆC 1) Lem 5   AB  BCD 1(11) Lem 4  AB  BD  / ABBCCD (11) /   (11) fun (1ÆC 1)  (1ÆB 1) / BC (11) ABCD (11) BC  ABBD ABCCD (1ÆB 1) /  ACCD (1ÆC 1) /  ACD (11) fun  / ABD  / AD: (11) Similarly. whi h were subsequently translated into ommutative squares. we point out that both of the pre eding ommutative diagram proofs were dis overed with the help of beta diagram moves. Asso iativity.

" \fun " in the ommutative diagram proof of asso iativity. Thus. ommutative diagram proofs (of this result and of others in this subse tion) may be analyzed into two distin t omponents: one whi h involves instan es of Theorem 3 and Lemmas 4 and 5 (and whi h are onne ted with assertions that interpretations of ertain beta diagrams are independent of the order in whi h the diagrams are onstru ted). In the spirit of the beta methodology. the translation from Beta to ommutative 37 . we therefore express proofs of ertain results in this subse tion using ertain beta moves whi h are ertainly shorter. and in our opinion easier to omprehend. than proofs involving large ommutative diagrams. (And in these ases.(1) BC (2) func (3) func (4) BC These moves are subsequently translated into the squares labeled \BC. and another involving instan es of fun toriality of T and M and \BC" (whi h are onne ted with ertain deformations and surgery rules applied to these beta diagrams).

B . T ) is fun torial with respe t to verti al omposition in Rel(C. The proof that the lower triangle of (2) ommutes is given as follows: 38 . T ). is ir ular). The next result expresses beta surgery equivalen es whi h translate into parts of the diagrams for the unit laws in the ourse of proving Lemma 6 (parts labeled \fun " and \BC").diagrams is straighforward enough to remove any obje tion that this pro edure. Lemma 8 The monoidal produ t of Rel(C. (2) the following inter hange diagram ommutes: AS / A  CKK AD KKKR S KKK R C R D K  BC K%  B  D: B S / The proof that A { preserves omposition is given as follows: A A B D A B A D BC A B A D Lemma 7 . Lemma 7 = = . prior to establishing that Beta is sound. Proof: It suÆ es to show that (1) A { and { B are fun torial for obje ts A. func C R (A S C C R q R) (A q S) S R A S q (RS) The remaining details of (1) are left to the reader.

C B B func S R C R S R Remaining details of (2) are left to the reader. we observe that is symmetri monoidal: the asso iativity. symmetry.A C B D B C A A D BC C B Lemma 7 . Finally. and unit onstraints may be de.

Rel(C. T ) is a ompa t symmetri monoidal 2- ategory. q. The adjun tion whi h expresses ompa tness. d. De. T ) from Rel(C. q. e. d. T ) is a symmetri monoidal ategory enri hed in the ategory of posets. Proof: By the pre eding results. follows immediately from M ((X  Y )  Z ) = M (X  (Y  Z )). via a fun tor C ! Rel(C. T ) given below (their naturality will be left as an exer ise). e. hom(X Y. Theorem 4 Rel(C.ned as those indu ed from onstraints for (C. T ). Next. ). (Y Z )). Z ) = hom(X. we show how to retrieve the theory (C.

Lemma 9 C ! Rel(C.g/ i) MA  MB AB  AC Lem 5 () fun    Lem 4 (h1. T ) and from C op ! Rel(C.gi)/ PPP PPP fun (h1. T ). both a ting as identities on obje ts.gf i) PPPP' 39   AB ABBC  (h1.1i) 1 / M1    / (h1. T ) is similar: 1 O 1  = 1  M1   / M1  M1 Thm 3  11  (h1. and whi h send a morphism f : A ! B to the value 1 under the omposite given respe tively as: M (h1. T ) are fun torial.f i) M (hf.f i) BC (1Æ1)   / MA (h1.1i)   1 ! M 1 ! MA ! M (A  B ).ne fun tors C ! Rel(C. T ) preserves ompositions in the following diagram.gf i) / ABC PP / (11)  D AC: S . 1 ! M 1 ! MA ! M (B  A): It is trivial that ea h of these morphism assignments preserves identities. Proof: We show C ! Rel(C. T ) and C op ! Rel(C. the ase for C op ! Rel(C.f ih1.f i)(h1.f.

T ) are stri t monoidal fun tors. T ) and C op ! Rel(C. Let F orm denote the set of 1- ells of Rel(C. T ) whi h are of the form A ! 1.q. By de. in view of the observation pre eding Theorem 4. d. It is now lear that both C ! Rel(C. e.

nition of Rel(C. where omp is whi h one may ompose with Rel(C. T )1 C0 F orm omp de. T ). T )1 C0 F orm. there is a natural bije tion F orm  = P T A: A2C0 Let C1 C0 F orm denote the pullba k of the domain or typing fun tion F orm ! C0 along the odomain fun tion C1 ! C0 . T ) indu es a map C1 C0 F orm ! Rel(C. ! F orm. The fun tor C ! Rel(C.

ned by omposition in Rel(C.f i1) / AB 1 fun (f 1 ) OOO OOO OO 1 Ofun OO' (11) A1:  q. Proof: B 18 JJ / M 1  B1 88 JJ 88 JThm JJ 3 8 =8 JJJ%  88 1 888 B 88 88   1 1 B1  1 / (h1. The result is a map P F orm: C1 C0 F orm ! Lemma 10 P (A !f B. T ).f i1) / ABB 1  (h1. T )1 C0 F orm omp where the . e.f i1) BC (1Æ1)   / A1 O (h1. (C op )1 C0 F orm ! Rel(C. B !p 1) = A f!p 1.f i)/ 1 MA  B 1 AB  B 1 Lem 5  (1) /  AB 1  Lem 4  (h1. d. ! C0 along F orm ! A similar onstru tion results by pulling ba k (C op )1 od C0 and forming the omposite Q of ! F orm.

T ). one may show that f q Q(B ! A. B ! 1) = A 9!g 1. T ) is ompletely retrieved from the stru ture of the monoidal 2- ategory Rel(C. If A f! B denotes a morphism in C op.rst map is indu ed from C op ! Rel(C. T ): op f Theorem 5 The fun tors C op !T Bool and C !9 Bool of a theory. then by imitating the proof of Lemma 10. viewed as . the stru ture of a theory (C. In this way.

brations. are isomorphi to the (split) .

40 ! C0 .brations (Form ! C0 . P ). Q). (Form .

6.2 Soundness and Completeness Let .

(L) denote the monoidal ategory of .

rst-order diagrams modulo deformation equivalen e. There is a re exive transitive relation .

on .

let .(L). generated by surgery rules.

(L)= .

denote the poset-enri hed ategory where hom(u. v) arries the poset stru ture indu ed from .

. The goal of this subse tion is to prove Theorem 6 There is an isomorphism of ( ompa t. monoidal) poset-enri hed ategories  .

(L)= .

where ((S ).  : (S )op ! B ool) is the free ( ategori al predi ate) theory on L. =! Rel((S ). It is in this sense that Peir e's Beta is isomorphi to . ).

The proof pro eeds as follows. First. we onstru t a fun tor q : .rst-order relational al ulus.

) whi h is the identity on obje ts and whi h is de.(L) ! Rel((S ).

ned on morphisms by indu tion on the rank of representative .

rst-order diagrams. where the rank is de.

then we show that q respe ts the surgery relations on .ned as the number of sep lines and interior and rossing nodes. We show that the fun tor q respe ts deformation equivalen e.

The theorem follows easily from there. Let D be a .. and then show that q is a surje tion of 2- ategories.

rst-order diagram. To de.

ne q(D). the idea is to partition D into .

then by indu tion the value of q on ea h subdiagram will have been de. in su h a way that D an be obtained through a su ession of horizontal and verti al ompositions. If ea h subdiagram has a lesser rank than D.rst-order subdiagrams: to tile the re tangle R in whi h D is immersed into subre tangles.

ned. and we de.

The only trouble is that not all tilings an be sensibly interpreted as omposites. as in Lemma 1). ). Re all that two subdiagrams are (horizontally or verti ally) omposed by \erasing" an edge they have in ommon (given by a dotted line.ne q(D) as the orresponding iterated omposite in the monoidal ategory Rel((S ). De.

41 . The basi instan e of an un omposable tiling is the \pinwheel.nition 13 (see [7℄): A tiling of a re tangle is omposable if repeatedly re- pla ing two tiles with a ommon edge by a single tile whi h is their union an eventually redu e the tiling to a single tile." .

For example. onsider the .and we will take advantage of deformation equivalen e to ensure that this will not o ur.

rst-order diagram D given by . Suppose D is a . whereupon it be omes possible to tile D into omposable subdiagrams as shown by the dotted lines. we deform two of the sep lines to obtain . where the solid re tangular lines are sep lines. In order to evaluate q(D).

[If this ondition is not met.rst-order diagram whi h is not surrounded by a sep line. up to deformation equivalen e. we an de.

one of the following ases holds:  D has two or more maximal sep lines. it is relatively trivial to de ompose D into a omposable tiling.  D has no sep lines.. a de omposition into subdiagrams of lesser rank than D. i. In the . Sin e D is not deformable to a diagram surrounded by a single sep line. where D0 is obtained by removing the outermost sep line of D. In the latter two ases.  D has one maximal sep line and nodes exterior to that sep line.℄ A sep line of D is maximal if it is not interior to any other sep line.ne q(D) as :q(D0 ).e.

rst ase: sin e the sep lines are disjoint. D an be tiled so that ea h tile de.

nes a .

we de.rst-order subdiagram and ontains at most one maximal sep line (whi h we assume to be in the tile's interior). and we just need to ensure that this tiling is omposable. This ne essitates the following abstra t onsiderations on tilings. given in [7℄. Given a tiling of a re tangle.

where A 1 B if the right edge of A meets the left edge of B in more than one point.ne partial orders 1 and 2 on the set of tiles A. and A 2 B if the top edge of A meets the bottom 42 . B. : : :.

so that. the pinwheel tiling given above may be referred to in terms of its tileorder. If a pinwheel (arising from a tiling of a .edge of B in more than one point. for example.) Tilings of re tangles may be abstra tly hara terized in terms of su h double orders ( alled tileorders). (The partial orders 1 and 2 are the re exive transitive losures of these two relations. Theorem 7 (see [7℄) A tileorder fails to be omposable if and only if every sequen e of ompositions eventually yields a tileorder ontaining a pinwheel as a sub-double-order.

as we indi ated earlier: . Now we de. Then. without loss of generality. All one needs to do here is to apply an isotopy to the tile a ting as the identity on a neighborhood of the tile's boundary. as des ribed above) is rea hed. The only obstru tion o urs when one of the dotted lines of the de omposition passes through a (maximal) sep line of a tile.rst-order diagram. so that the de omposition an be arried out. and whi h shrinks the sep line and the re tangle it surrounds into a smaller subre tangle. we may assume that the sep line lies above or below the dotted line. we simply de ompose it further.

ne q : .

) by indu tion. by tiling a (deformation equivalen e lass of a) .(L) ! Rel((S ).

and omposing their values q(D0 ) in the monoidal ategory Rel((S ).1 after de. If D has rank less than 2.rst-order diagram D into subdiagrams D0 of lesser rank in the manner given above. then without loss of generality. D is either one of the primitive diagrams given in the dis ussion of x3. ).

q(D) is hA. ). p 2 ( (p)1)i in Rel((S ). or ould have a node labeled p 2 P in the predi ate language. ). D ould be a single string or ould have a single rossing node.  1 ! 1 ! A ! and A is the sour e/target of D. In the former ase. :EA 2 (A  A)i. Lemma 11 The fun tor q : . or ould have a node labeled Æ or op. where q(D) is the image of a diagonal orop proje tion map under (S ) ! Rel((S ). where q(D) is an identity or a symmetry isomorphism. where q(D) is the evident morphism h (p). ). where q(D) is the image of (S )op ! Rel((S ). where EA is the equality predi ate: 9 (A  A). 1. In the ase where D onsists only of a sep line surrounding strings. A. or the se ond diagram of Example 4.nition 9. or ould have a single node labeled Æ or .

) is well-de.(L) ! Rel((S ).

ned. Æ 43 .

The well-de.

In ases (1) and (2). as in Theorem 4. But ases (2) and (3) are essentially onsequen es of the theory of [10℄ (plus the fa t that Rel((S ). ) is self-dual). during a deformation t 7! Dt. q is well-de. a node of Dt rosses a sep line of Dt. the argument for this ase essentially follows from Lemma 10 plus the fa t that f . We must also show (3) that q(D) is independent of the tiling of D. for f a morphism of (S ). (2) the ase of the deformation where two nodes inter hange their relative heights. ) is a symmetri monoidal ategory). is dual (here we invoke the fa t that A { is adjoint to itself. preserves negation. Thus. so that Rel((S ). we may onsider separately the ase (1a) where a node rosses the top of a sep line. where a node rosses the bottom of a sep line. Case (1b). we must show that q(Dt) is independent of t.nedness of q may be analyzed into three distin t omponents: (1) the ase where. As for ase (1).

we must verify that q indu es a well-de.ned. e. Next. d. q.

ned map .

(L)= .

) by showing that if f . ! Rel((S ).

g. Now the partial order . then q(f )  q(g).

But q respe ts (S1) by Theorem 5 and onstru tion of (S ) (Theorem 1). (S2). and similarly (S2) and (S3) by Theorem 5 and onditions (1) and (2) of De. is generated from surgery rules (S1). (S3) [taking into a ount the sep-parity onvention℄ and the rules of Alpha.

The fa t that the rules of Alpha are respe ted by q is overed under the Soundness Theorem of [4℄: the hardest rule to verify is iteration. Thus we have proved Lemma 12 (Soundness of Beta): The map q~ : .nition 3. but this essentially follows from re ursive appli ation of the Boolean equations f ^ :(f ^ g) = f ^ :g f ^ (g ^ h) = f ^ (f ^ g ^ h): Details are left to the reader.

(L)= .

) in- Proof: du ed from q is well-de. ! Rel((S ).

Lemma 13 (Completeness of Beta): The poset-enri hed fun tor q~ : .ned.

(L)= .

) is surje tive on 1- ells and on 2- ells. Statement (b) follows easily from statement (a): from (a). (b) all relations of the form A ! B in Rel((S ). Proof: Surje tivity on the level of 1- ells may be de omposed into two parts: (a) showing that relations of the form A ! 1 in Rel((S ). we have that every relation of the form hA  B. ) are in the image of q. ! Rel((S ). 1. ) are in the image of q. R 2 T (A  B)i is the image of a orresponding beta diagram of the form A B R 44 .

) (Theorem 4) and of . The orresponding relation hA. B. R 2 T (A  B)i is then the image of A B R Here impli it use is made of ompa tness of Rel((S ).under q.

(L)= .

(see Lemma 7). i. are formed by applying rules (i){(iv). elements in w2S (w). whi h are a ompanied by the .e. As for statement (a): Relations of the form A ! 1 orrespond bije tively to elements in w2S (w) by Theorem 5.. Formulas.

sn 1 p (ii) If p.rst-order diagrams whose image under q is the given formula: (i) p 2 w2S (w) is an element of w2S (w) (image of s . v p 45 . :p 2 (w) (image of w w w . . . . then p ^ q 2 (w). w p (iv) If p 2 (v) and V !f W in (S ). q 2 (w). then 9f p 2 (w) (image of w f op . q p p q (iii) If p 2 (w) and V !f W in (S ). p w . then f p 2 (v) (image of v f .

) follows from a relation f .This ompletes the proof of statement (a). Surje tivity on the level of 2- ells is proved by showing that every instan e of the relation p  q between 1- ells in Rel((S ). so that q is surje tive on 1- ells.

g in .

(L)= .

. i. Be k-Chevalley by (S3). the redu tion of statement (b) by statement (a) earlier in this proof). . the adjun tions 9f a f  by (S2).e. instan es of p  q here follow purely from the axioms of theories and equations of (S ). e. It suÆ es to he k the ase where p.3. As we saw in x3. q : A ! 1. d. q. Thus the surje tivity at the 2- ell level is lear. and the Boolean algebra axioms are overed by the dis ussion at the end of x4. Proof of Theorem 6: Let . where p and q are formulas of the free theory F L ( f. But by freeness. the equations of (S ) are overed by (S1).2.

 .

(L)1  .

(L)1 and .  .

(L)1  .

(L)1 denote the re exive and transitive relations on the 1- ells of .

(L) indu ed by pulling ba k the 2- ell relations  in .

(L)= .

) along the respe tive quotient maps . and inq Rel((S ).

(L) ! .

(L)= .

and .

). It suÆ es to show .(L) ! Rel((S ).

 . That . =.

. . That . follows from Lemma 12.

Higher-dimensional algebra and topologi al quantum . d. follows from Lemma 13. Dolan. C. q. The proof is omplete. Referen es [1℄ J. e. Baez and J. The authors are very grateful to Saunders Ma Lane for his sustained support and his interest in this paper.

Walters. Theory and Appli ation of Categories. Algebra. C. Walters. Trimble. Seely. J. F. [7℄ R. Pure Appl. 49{77. Diagrams and the on ept of logi al system. H. J. Pure Appl. Introdu tion to extensive and distributive ategories. B. 46 .C. [6℄ A. Carboni and R. Barwise (Oxford University Press. Oxford. S. [2℄ J. 1 (1995). 1996). G. G. S. [4℄ G. A forbidden-suborder hara terisation of binarily- omposable diagrams in double ategories. Pure Appl. Walters. ed. [3℄ R. [5℄ A. F. R. H. Co kett. and R. Brady and T. Barwise and E. J. Hammer. R. 229{296. Carboni. Algebra 84 (1993). 36 (11) (1995). J. submitted to J. 145{158. A. S. and R. and T. Algebra 49 (1987). Cartesian bi ategories I. Dawson. F. La k. Carboni. A. Natural dedu tion and oheren e for weakly distributive ategories. 6073{6105. A ategori al interpretation of C. La k. in Logi al Reasoning with Diagrams.F. 146{153.eld theory. Blute. C. Peir e's propositional al ulus Alpha. J. Allwein and J. Math. Algebra 113 (1996). Phys. Pure Appl. Trimble. 11{32.

1971). Graduate Texts in Mathemati s 5 (Springer. Trimble. H. Existential Graphs I: Alpha hhttp://faith. Joyal and R. S. Providen e. Peir e. and S edrov. in Math. [12℄ M. Berlin. [10℄ A.. 1990). 55{112.u hi ago. Studies 49 (1963). Lawvere. Pro . Symposia in Pure Mathemati s XVII (AMS. resulting from an ampli. 28{46. 1{14. The geometry of tensor al ulus I. Natural asso iativity and ommutativity. Ma Intyre and T. Categories. [13℄ S. to appear in Adv. Ri e Univ.. Ma Lane. [9℄ S. Allegories (North Holland. Ma Lane. Categories for the Working Mathemati ian.[8℄ Freyd. Kurtz and G. 1970). Street. Amsterdam. [11℄ F. A. A. [15℄ C. 88 (1991). Adv. Equality in hyperdo trines and omprehension s hema as an adjoint fun tor. Brady. Des ription of a notation for the logi of relatives. W. P.edu/peir e/i (1997). s. [14℄ S. in Math. The geometry of Gray- ategories.

D. [18℄ J. Zeman. Peir e. Vol. The existential graphs of C. eds. Cambridge. Colle ted Papers of Charles Sanders Peir e. Peir e. D. Weiss. 1964. Weiss. The existential graphs of Charles S. J. Vol. Hartshorne and P. S. S. Thesis. Existential graphs (1903) Published in: C. 1963. ation of the on eptions of Boole's al ulus of logi (1870) Reprinted in: C. 47 . University of Illinois. Colle ted Papers of Charles Sanders Peir e. [17℄ D. Hartshorne and P. Peir e. eds. Thesis.D. 1933). [16℄ C.. University of Chi ago. 3 (Harvard University Press. 1933). Cambridge. Ph. 331{410. Roberts. Ph. 4 (Harvard University Press. 27{98..