Interaction Combinators
Interaction Combinators
Interaction Combinators
Interaction Combinators
View metadata, citation and similar papers at core.ac.uk brought to you by CORE
provided by Elsevier - Publisher Connector
Yves Lafont*
Institut de Mathematiques de Luminy, UPR 9016 du CNRS,
163 avenue de Luminy, case 930, 13288 Marseille Cedex 9, France
E-mail: lafontiml.univ-mrs.fr
INTRODUCTION
This paper addresses the following question: what are the fundamental laws of
computation? Of course, the answer depends on the choice of a particular model
of computation. Let us mention some of them:
This calculus is Turing complete and it has a nice logical interpretation, at least in
the typed case. However, the rule is more complicated than it seems: is it reasonable
69 0890-540197 25.00
Copyright 1997 by Academic Press
All rights of reproduction in any form reserved.
File: 643J 264301 . By:DS . Date:06:08:01 . Time:09:33 LOP8M. V8.0. Page 01:01
Codes: 3658 Signs: 1886 . Length: 58 pic 2 pts, 245 mm
70 YVES LAFONT
T 6 x T, x 6 T T, F 6 F F.
Our interaction nets are deterministic in a strong sense: not only the result, but also
the computation is unique, up to trivial commutations. In particular, it is not
possible to encode ``parallel or.'' We shall not address the question of deciding
whether this should be considered as a good or a bad point.
From the viewpoint of computability, our interaction nets are equivalent to the
Turing machines, but from the viewpoint of computation, there is something more,
for instance parallelism (in the sense of distributed computation). To express this
rigorously, we introduce a natural notion of translation of interaction system
preserving the essential properties of computations, such as the complexity and the
degree of parallelism.
By definition, a universal interaction system has the property that any other inter-
action system can be translated into it. Turing machines can be seen as particular
interaction systems, but such systems are intrinsically sequential and cannot be
universal in the above sense, even if they come from universal Turing machines. On
the other hand, it is proved that a system of interaction combinators is universal
(Section 2). This suggests an answer to our original question, at least within the
framework of interaction nets: the fundamental laws of computation are commutation
and annihilation.
Our system of interaction combinators has been obtained by a kind of distilla-
tion, starting from some more complicated system suggested by Samson Abramsky
for implementing the proof boxes of linear logic (see [Mac94]). Independently,
Simon Gay has also obtained a universal system, with eight symbols instead of
three (see [Gay95]). Our system is simpler because it uses the same symbols for
different purposes. Among the other related systems, let us mention the infinite one
introduced by John Lamping for the optimal reduction of *-calculus (see [Lam90])
and the variants proposed by Georges Gonthier, Martin Abadi, and Jean-Jacques
Levy, in connection with linear logic (see [GAL92a, GAL92b]).
File: 643J 264302 . By:DS . Date:06:08:01 . Time:09:33 LOP8M. V8.0. Page 01:01
Codes: 3516 Signs: 2966 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 71
Apart from its simplicity, the system of interaction combinators has an unexpected
interpretation in terms of reversible 2-stack machines which seems to throw a bridge
between distributed and sequential computation (Section 3). This section benefited
from discussions with Vincent Danos and Laurent Regnier.
1. INTERACTION NETS
The origin of our favorite model of computation is explained in [Laf 95]. Here,
it is introduced from scratch, without explicit reference to proof theory.
1.1. Nets
From now on, a symbol : will always be given with its arity n0. An occurrence
of such a symbol is called a cell, and is pictured as follows:
Such a cell has one principal port and n auxiliary ports. It is well understood that
the latter are not interchangeable. For instance, one can number them from 1 to n,
keeping 0 for the principal port. In practice, the ports will always be implicitly
numbered in clockwise order. In particular, the second picture is obtained from the
first one by a rotation of 180%. If n=0, there is no auxiliary port, and the cell is
pictured as follows:
A net is a graph consisting of a finite number of cells and an extra set of free
ports, each port being connected to another one by means of a wire. For instance,
here is a net built with the symbols :, ;, and #, of respective arities 2, 1, and 0:
This net has three free ports, x, y, and z. Note that a net is not necessarily connected,
and that a wire may connect two ports of the same cell. In fact, we shall also allow
cyclic wires which do not connect any ports:
File: 643J 264303 . By:XX . Date:04:08:01 . Time:10:03 LOP8M. V8.0. Page 01:01
Codes: 2573 Signs: 1556 . Length: 52 pic 10 pts, 222 mm
72 YVES LAFONT
Here, a port is either an element of X, or a pair (c, i) where c # C and i ranges from
0 to the arity of l(c). The nonempty w must define a partition of all ports. In this
paper, we shall avoid such cumbersome descriptions, but the reader may check that
our arguments can always be formalized in this way.
If : is a symbol of arity n, an :-cell can be seen as a net with n+1 free ports.
More generally, a tree is a net { with one distinguished free port, called the root.
It is either a single wire, in which case the root is fixed arbitrarily, or it is obtained
by plugging the n auxiliary ports of a cell into the roots of smaller trees { 1 , ..., { n :
In that case, the root is the free port which is connected to the principal port of this
cell.
A wiring is a net | without cell and without cyclic wire. So it is just a pairing
of its free ports. In particular, a wiring has an even number of free ports. A per-
mutation _ of [1, ..., n] defines a wiring with 2n free ports, which is represented as
follows:
In both cases, x i is connected to y _(i) . For instance, the wiring corresponding to the
identity on [1, 2, 3] is pictured as follows:
File: 643J 264304 . By:XX . Date:04:08:01 . Time:10:06 LOP8M. V8.0. Page 01:01
Codes: 2231 Signs: 1356 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 73
1. 2. Interaction
Fix a finite alphabet 7 with m symbols : 1 , ..., : m of respective arities n 1 , ..., n m .
An interaction rule is a reduction of the form
where & i, j is a net with n i +n j free ports. Note that cells can only interact pairwise,
through their principal ports. Cyclic wires may be created when such a rule is
applied inside a net, and this is why they have been allowed in the definition of nets.
The above rule is clearly equivalent to
where & ij , is obtained by exchanging the n i first free ports with the n j last ones
in & i, j .
An interaction system is a set of interaction rules which can be applied without
any ambiguity. More precisely:
v if a rule is given for : i , : j , then no other rule is given for : i , : j , or for : j , : i ;
v if a symbol : i interacts with itself 1 then & i, i =& i, i .
In particular, an interaction system is necessarily finite, with at most m(m+1)2
rules. Alternatively, such a system can be described by a partially defined square
matrix (& i, j ) 1i, jm satisfying the following symmetry condition:
v if & i, j is defined, so is & j, i , and & j, i =& i, j .
Later we shall add the technical condition that the & i, j are reduced nets.
Proposition 1. If a net + reduces in one step to & and to &$, with &{&$, then &
and &$ reduce in one step to a common !:
Proof. In an instance of the left member of a rule, the cells are connected
through their principal ports, so that two such instances are necessarily disjoint and
the corresponding rules can be applied independently. Q.E.D.
This strong confluence property has the following consequence: if a net + reduces
to an irreducible net & in n steps, then any reduction starting from + eventually
1
In [Laf 90], symbols were not allowed to interact with themselves, but it appeared later that this was
too restrictive.
File: 643J 264305 . By:XX . Date:04:08:01 . Time:10:07 LOP8M. V8.0. Page 01:01
Codes: 3049 Signs: 1778 . Length: 52 pic 10 pts, 222 mm
74 YVES LAFONT
reaches & in n steps. Moreover, if one abstracts from the irrelevant order of applica-
tion of rules, there is only one possible reduction from + to &. So we can say that
interaction nets are a deterministic and asynchronous model of computation. In
fact, we think that any computation of that kind can be modeled by means of inter-
action nets, but of course, an assertion of this kind cannot be proved.
If T(q, a)=(a$, +, q$), and being in state q, the machine reads a from the tape, then
it writes a$, moves right, and goes to state q$:
If T(q, a)=(a$, &, q$), the machine has the same behavior, except that it moves left.
By doubling the number of states, one can always assume that the direction of the
move depends only on q$. One says that q$ comes from the left in the first case, and
that it comes from the right in the second case.
All states and letters are now considered as symbols of arity 1. The above
configuration is simulated by the net
depending on whether q comes from the left or from the right. Similarly, the above
transition is simulated by the rule
File: 643J 264306 . By:XX . Date:04:08:01 . Time:10:08 LOP8M. V8.0. Page 01:01
Codes: 2395 Signs: 1570 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 75
depending on whether q comes from the left or from the right. Of course, all this
assumes that we have an infinite net! To simulate computations with a finite net,
one must add a new symbol of arity 0 corresponding to the boundary of (the
written part of) the tape, and some appropriate rules to cope with this new symbol.
The details are left to the reader.
So it appears that interaction nets are complete from the viewpoint of computa-
bility. Similarly, the register machines and the stack machines can be simulated in
a fairly obvious way.
where q$i =T(q i&1 , q i , q i+1 ). In particular, this means that all cells change at the
same time.
Two symbols q and q are introduced for each state q, and also two symbols pq
and pq for each pair p, q. The above configuration is simulated by
File: 643J 264307 . By:XX . Date:07:08:01 . Time:05:29 LOP8M. V8.0. Page 01:01
Codes: 2355 Signs: 1267 . Length: 52 pic 10 pts, 222 mm
76 YVES LAFONT
where q$=T( p, q, r) and r$=T(q, r, s). This simply means that a transition is
decomposed into two steps: each cell interacts first with its left (or right) neighbor,
and then with the other one. In this way, the global synchronization is no more
needed.
The main difference between the system for Turing machines and the one for
cellular automata appears in the structure of the right members of rules: in the first
case, only one free port is connected to a principal port, whereas in the second case,
both free ports are connected to principal ports. In fact, a system of the first kind
can only model sequential computation.
Now we shall build a simple interaction system for unary arithmetics, using the
following symbols: s (successor) of arity 1, 0 of arity 0, + and _, both of arity 2.
The first two symbols are used to represent natural numbers in unary form. One
starts from the usual equations defining addition and multiplication:
Since addition is defined by induction on the first argument, we shall always plug
this argument into the principal port of +, and similarly for _. Therefore, the
ports will be interpreted in the following unusual way:
Note that the argument y is used twice in the first equation defining the multiplication,
and it is not used at all in the second one. For that reason, two extra symbols are
needed, $ (duplicator) of arity 2 and = (eraser) of arity 0, with the following inter-
pretation:
File: 643J 264308 . By:XX . Date:04:08:01 . Time:10:09 LOP8M. V8.0. Page 01:01
Codes: 2529 Signs: 1547 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 77
The idea is that a net representing a natural number should be duplicated when it is
connected to the principal port of a $, and it should be erased when it is connected
to the principal port of an =. One gets the following rules for multiplication:
Two kinds of configuration may lock a computation: irreducible cuts and vicious
circles. A cut consists of two cells connected through their principal ports:
For a given interaction system, there are two kinds of cuts: the reducible ones and
the irreducible ones. For instance, in the case of unary arithmetics, a cut between
File: 643J 264309 . By:XX . Date:04:08:01 . Time:10:12 LOP8M. V8.0. Page 01:01
Codes: 2031 Signs: 1058 . Length: 52 pic 10 pts, 222 mm
78 YVES LAFONT
FIG. 1. 2_2=4.
File: 643J 264310 . By:XX . Date:04:08:01 . Time:10:12 LOP8M. V8.0. Page 01:01
Codes: 795 Signs: 396 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 79
where { is a tree and | is a wiring which does not connect upper ports. If ? has
n+1 ports, one says that ? is a principal net of arity n, because it can be considered
File: 643J 264311 . By:XX . Date:04:08:01 . Time:10:13 LOP8M. V8.0. Page 01:01
Codes: 2788 Signs: 1944 . Length: 52 pic 10 pts, 222 mm
80 YVES LAFONT
as a generalized symbol of arity n. In the non-degenerate case, the free port which
is connected to a principal port is called the root of ?. In the degenerate case, the
choice of the root is arbitrary. We shall need a result which follows easily from the
above decomposition:
Lemma 1. Let ? be a principal net with n+1 free ports x 0 , x 1 , ..., x n , the root
being x 0 . Then, for i=1, ..., n, there is a unique principal path from x i to x 0 . Except
in the degenerate case, there is no other principal path between free ports.
1.7. Translations
Proposition 3. If & is a reduced net, when 8(&) is a reduced net. The converse
holds if 8 strict.
Lemma 1 is used for the last two statements. One simply has to be careful in the
non-strict case. For instance, it may happen that 8(&) contains a vicious circle, and
& contains no vicious circle, but a cut. It may also happen that & contains a cut, and
8(&) is reduced. Q.E.D.
File: 643J 264312 . By:XX . Date:04:08:01 . Time:10:13 LOP8M. V8.0. Page 01:01
Codes: 2943 Signs: 2110 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 81
8 b 8 &1 =id 7$ . In that case, it is easy to see that each 8(:) is necessarily of the
following form,
The * stands for a reduction of arbitrary length, possibly 0. Remember that & i, j
is supposed to be reduced, and so is 8(& i, j ) by Proposition 3. Therefore, if 8 is
strict, the left member is not reduced, and the reduction cannot be of length 0.
Similarly, if 8 is invertible, the reduction must be of length 1. In general, let L
(resp. M) be the minimal (resp. the maximal) length of all those reductions. By the
above remark, L>0 if 8 is strict, and L=M=1 if 8 is invertible. Obviously, one
has:
2. INTERACTION COMBINATORS
This section is the heart of the paper. It is entirely devoted to the universality of
the system of interaction combinators.
File: 643J 264313 . By:XX . Date:04:08:01 . Time:10:16 LOP8M. V8.0. Page 01:01
Codes: 2136 Signs: 1318 . Length: 52 pic 10 pts, 222 mm
82 YVES LAFONT
One can already notice that the process of reduction does not always terminate.
Figure 3 shows a net which reduces to itself in four steps. In fact, we shall prove
that, despite its simplicity, this system is universal in the following sense:
Theorem 1. Any interaction system can be translated into the system of inter-
action combinators.
In order to prove this, we shall introduce several constructions which are inspired
by the rules of linear logic: the multiplexors and the transpositors (inspired by the
multiplicative rules), the menus and the selectors (inspired by the additive rules),
and the codes, the copiers, and the decoder (inspired by the exponential rules).
File: 643J 264314 . By:XX . Date:04:08:01 . Time:10:17 LOP8M. V8.0. Page 01:01
Codes: 2379 Signs: 1455 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 83
where @ p, q is the involutive permutation of [1, ..., 2p+q] which exchanges 1 with
2, 3 with 4, and so on until 2p. Here is a possible implementation of these
transpositors:
The needed rule is ##. Note that $ is not suitable for that purpose.
File: 643J 264315 . By:XX . Date:04:08:01 . Time:10:19 LOP8M. V8.0. Page 01:01
Codes: 1933 Signs: 981 . Length: 52 pic 10 pts, 222 mm
84 YVES LAFONT
File: 643J 264316 . By:XX . Date:04:08:01 . Time:10:20 LOP8M. V8.0. Page 01:01
Codes: 1895 Signs: 759 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 85
Both statements are proved by induction, using #=, $=, and ==. In fact, (i) holds
more generally for principal nets and (ii) for reduced nets.
File: 643J 264317 . By:XX . Date:04:08:01 . Time:10:21 LOP8M. V8.0. Page 01:01
Codes: 2249 Signs: 1156 . Length: 52 pic 10 pts, 222 mm
86 YVES LAFONT
an identity. To sum up, one can assume that in all cases, . j, i = i, j , _ j, i =_ i, j , and
_ i, j is involutive.
Now, assume that the alphabet [: 1 , ..., : m ] can be ordered in such a way that the
net . i, j , when defined, contains only symbols which are strictly smaller than : j (and
symmetrically, i, j =. j, i contains only symbols which are strictly smaller than : i ).
It is easy to see that the process of reduction always terminates in such a system.
File: 643J 264318 . By:XX . Date:04:08:01 . Time:10:21 LOP8M. V8.0. Page 01:01
Codes: 1080 Signs: 541 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 87
2.5. Duplication
Intuitively, the package 1i above represents the finite tree of all possible futures
of a cell. In the general case, this tree may be infinite, but it is possible to replace
this actual infinity by a potential one: it suffices to use something like a genetic
code. Duplication is clearly essential for this purpose.
Unfortunately, the analogue of Lemma 2 for duplication does not hold, because
$ cannot duplicate $ (whereas = can erase =). Nevertheless, a package ? without $
can be duplicated as follows:
Lemma 3 (Duplication).
Both statements are proved by induction, using #$, $= and $$. Note that the rule
$$ is forced by (ii), and this is why $ cannot duplicate $. Again, (i) holds more
generally for principal nets and (ii) for reduced nets without $.
File: 643J 264319 . By:XX . Date:04:08:01 . Time:10:22 LOP8M. V8.0. Page 01:01
Codes: 2390 Signs: 1441 . Length: 52 pic 10 pts, 222 mm
88 YVES LAFONT
Now to cope with this impossibility of duplicating arbitrary packages? This is the
crucial point of our proof.
File: 643J 264320 . By:XX . Date:04:08:01 . Time:10:23 LOP8M. V8.0. Page 01:01
Codes: 2056 Signs: 1153 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 89
FIG. 9. Decoding.
File: 643J 264321 . By:XX . Date:04:08:01 . Time:10:24 LOP8M. V8.0. Page 01:01
Codes: 583 Signs: 87 . Length: 54 pic 1 pts, 228 mm
90 YVES LAFONT
The reader is invited to complete the proof of Theorem 1 by working out the
analogue of Fig. 7 for this translation.
A more detailed study shows that, in fact, both ## and $$ are necessary. On the
other hand, it happens that the system remains universal if one removes $=, but this
is not a significant simplification.
One may also wonder whether there is a universal interaction system with less
symbols. Starting from the interaction combinators, Denis Bechet proposed a
universal interaction system with only two symbols and three rules (private com-
munication), but one of his rules is quite complicated. Also, it is easy to see that
one symbol is not enough. Therefore, we conjecture that our system of interaction
combinators is essentially the simplest one satisfying Theorem 1.
3. SEMANTICS OF COMBINATORS
File: 643J 264322 . By:XX . Date:04:08:01 . Time:10:24 LOP8M. V8.0. Page 01:01
Codes: 2867 Signs: 2075 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 91
3.1. Execution
Let & be a net of combinators which reduces to some wiring |, as in Fig. 11.
Looking carefully at the rules of interaction, one sees that it is possible to compute
| without reducing &, just by travelling in &. This will be called the execution of &.
During this execution, one carries a pair (u, v) where u (the #-stack) and v (the
$-stack) are finite strings over the alphabet [p, q]. We shall write 1 for the empty
string. The letter p (resp. q) corresponds to the first (resp. the second) auxiliary port
of # or $. One travels according to the following rules (Fig. 12):
v if one enters a cell through an auxiliary port, one pushes the corresponding
letter onto the relevant stack, and one exits through the principal port;
v if one enters a cell through the principal port, one pops p or q from the
relevant stack, and one exits through the corresponding auxiliary port (in the case
of a $-cell) or through the other one (in the case of a #-cell). If the relevant stack
is empty, one stops.
Of course, one considers that the =-stack is always empty. An example of execution
is given in Fig. 13.
&
Let & be an arbitrary net of combinators. One writes (x, u, v) ^ (x$, u$, v$) if,
starting from the free port x with the pair (u, v), one eventually reaches the free port
x$ with the pair (u$, v$). One writes u for the string obtained by exchanging p with
q in u.
File: 643J 264323 . By:XX . Date:04:08:01 . Time:10:25 LOP8M. V8.0. Page 01:01
Codes: 2375 Signs: 1600 . Length: 52 pic 10 pts, 222 mm
92 YVES LAFONT
& &
(ii) if (x, u, v) ^ (x$, u$, v$) then (x$, u$, v$) ^ (x, u, v), and conversely (rever-
sibility);
& &
(iii) if (x, u, v) ^ (x$, u$, v$), then for any u" and v", (x, uu", vv") ^ (x$, u$u", v$v")
(monotonicity);
& +
(iv) if + reduces to &, then ^ and ^ are the same (invariance).
File: 643J 264324 . By:XX . Date:04:08:01 . Time:10:25 LOP8M. V8.0. Page 01:01
Codes: 871 Signs: 287 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 93
Proof. The first three statements are obvious. The fact that u becomes u in the
reverse computation comes from our definition of the execution in the case of a
#-cell. It is of course related to the fact that ## exchanges the ports. For the last
statement, it suffices to check that the execution is invariant by each rule. Clearly,
the execution has been defined in such a way that it is invariant by ## and $$. Here
is a typical case for ##:
The execution is also invariant by #$, because the two stacks are independent. Here
is a typical case:
3.2. Equivalence
Say that two nets of combinators + and & with the same free ports are equivalent
+ &
if ^ and ^ are the same. This is obviously a congruence: if one replaces a subnet
of & by an equivalent one, the resulting net is equivalent to &. Furthermore, the
invariance property tells us that + and & are equivalent whenever + reduces to &.
|
In the case of a wiring |, one has (x, 1, 1) ^ (x$, 1, 1) if and only if x is connected
to x$ in |. Therefore, if a net & reduces to a wiring | as in Fig. 11, this | can be
obtained by executing &, as in Fig. 13. Note also that two wirings are equivalent if
and only if they are equal. In order to characterize the equivalence of reduced nets,
we shall use the rules of Fig. 14, which can be applied in both directions.
Say that a free port x of a reduced net & accepts a pair (u, v) if there is a free port
&
x$ and a pair (u$, v$) such that (x, u, v) ^ (x$, u$, v$). Of course, this notion depends
only on the equivalence class of &. Say that x is passive if it is not connected to a
File: 643J 264325 . By:XX . Date:04:08:01 . Time:10:26 LOP8M. V8.0. Page 01:01
Codes: 2584 Signs: 1650 . Length: 52 pic 10 pts, 222 mm
94 YVES LAFONT
principal port, and say that x is #-active (resp. $-active, =-active) if & can be trans-
formed by means of the rules of Fig. 14, in such a way that x is connected to the
principal port of a #-cell (resp. a $-cell, an =-cell). Again, these notions depend only
on the equivalence class of &:
The first statement follows easily from the decomposition of Proposition 2, and the
other ones are proved by induction on the number of cells.
Proposition 6. If + and & are reduced nets of combinators with the same free
ports, then + is equivalent to & if and only if + can be transformed into & by means
of the rules of Fig. 14.
Proof. It is easy to see that the execution is invariant by these rules. It remains
to show that, if + is equivalent to &, then + can be transformed into & by means of
the rules of Fig. 14. This is proved by induction on the number of cells in &. If all
free ports are passive, then + and & are the same wiring. Otherwise, there is a free
port x of & which is connected to the principal port of a cell, for instance a #-cell.
In other words, x is #-active, and + can be transformed in such a way that x is
connected to the principal port of a #-cell. One can remove the #-cell in both cases,
and apply the induction hypothesis to the remaining nets. Q.E.D.
p*p=q*q=1, p*q=q*p=0.
The letters p and q are called positive, and the other letters are called negative.
A reduced monomial is an expression of the form uu$, where u consists of positive
File: 643J 264326 . By:XX . Date:04:08:01 . Time:10:26 LOP8M. V8.0. Page 01:01
Codes: 2827 Signs: 1984 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 95
letters and u$ consists of negative ones. By the above equations, the product of two
such monomials is either a reduced monomial or 0. For instance,
(pp*q*)(qppq*)=(pp*)(ppq*)=ppq*,
(pp*q*)(qqpq*)=(pp*)(qpq*)=0.
So one can show that any element of R can be uniquely written as a finite sum of
reduced monomials. In particular, the strings of positive letters can be identified
with the corresponding monomials in R. Moreover, the duality can be extended to
the whole ring R in such a way that it satisfies the following properties:
u**=u, u*u=1.
Let & be an arbitrary net of combinators. If x and x$ are free ports of &, a direct
path P from x to x$ is a path from x to x$ such that, if one enters through an
auxiliary port (resp. the principal port), then one exits through the principal port
(resp. an auxiliary port). For each type of crossing, one introduces an element of
the ring R R as in Fig. 15. The weight |P| is the product of all these elements, in
reverse order. For instance, the weight of the path in Fig. 13 is
(q*qq*q) (q*p*pq*qq)=1 1.
The weight is invariant by reduction. In fact, if one considers the interaction rules
for # and $, it appears that the equations defining R correspond to the rules of
annihilation (## and $$) and the commutation (u 1)(1 v)=(1 v)(u 1) to the
rule of commutation (#$).
&
Clearly, (x, u, v) ^ (x$, u$, v$) if and only if there is a direct path P from x to x$
such that |P| (u v)=u$ v$. This is just a reformulation of the execution.
Let & be a reduced net with n free ports x 1 , ..., x n . By proposition 2, one sees that
there is a finite number of direct paths in &. So it makes sense to consider the sum
a i, j of all |P| where P is a direct path from x j to x i . This defines an n_n matrix
A with coefficients in R R. Consider for instance the following net:
File: 643J 264327 . By:XX . Date:04:08:01 . Time:10:27 LOP8M. V8.0. Page 01:01
Codes: 2786 Signs: 1878 . Length: 52 pic 10 pts, 222 mm
96 YVES LAFONT
There are two direct paths from x 1 to x 2 , and vice versa. The matrix of this net is:
0 p q*+q p*
A=
\q* q+p* p 0
.
+
The matrix of a reduced net will always satisfy the following symmetry property:
a j, i =,(a i, j ) where , is the anti-automorphism of R R defined by
Note also that two reduced nets have the same matrix if and only if they are
equivalent.
If + is a net with n free ports, k cuts, and no vicious circle, it can be decomposed
as follows,
where +$ is a reduced net with n+2k free ports. If + reduces to a reduced net &, then
the matrix A of & can be obtained by means of the execution formula
A= tJ(A$+A$KA$+A$KA$KA$+ } } } ) J
= tJA$(I&KA$) &1 J,
where
v A$ is the matrix of +$,
v I is the matrix of the identity on [1, ..., n+2k],
v J is the matrix of the inclusion of [1, ..., n] into [1, ..., n+2k],
v K is the matrix of the partial permutation which is undefined on [1, ..., n]
and which exchanges the elements of [n+1, ..., n+2k] pairwise.
The execution formula makes sense because, in that case, the matrix KA$ is nilpotent.
Our execution is revertible, but the backward execution does not follow exactly
the same rules as the forward execution: the #-stack u must be replaced by u. This
File: 643J 264328 . By:XX . Date:05:08:01 . Time:06:46 LOP8M. V8.0. Page 01:01
Codes: 2506 Signs: 1244 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 97
File: 643J 264329 . By:XX . Date:04:08:01 . Time:10:28 LOP8M. V8.0. Page 01:01
Codes: 2085 Signs: 1473 . Length: 52 pic 10 pts, 222 mm
98 YVES LAFONT
File: 643J 264330 . By:XX . Date:04:08:01 . Time:10:29 LOP8M. V8.0. Page 01:01
Codes: 1492 Signs: 590 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 99
In particular, this shows that the modified system of combinators has the same
expressive power as the original one.
The system of directed combinators itself has some interesting properties. First,
it is an extension of the system of multiplicative proof-nets (see [Laf 95]). Further-
more, it has a lot of automorphisms which operate on the set
One can show that the group of automorphisms has order 16 and is isomorphic to
the group of symmetries of a rectangle parallelepiped with square basis (Fig. 19).
4. DISCUSSION
If a net & reduces to a wiring |, one may wonder whether the execution is an
efficient algorithm for computing |. This question was already raised by Vincent
Danos and Laurent Regnier in [DR95]. They considered a linear *-term which
corresponds to the following net:
File: 643J 264331 . By:XX . Date:04:08:01 . Time:10:29 LOP8M. V8.0. Page 01:01
Codes: 1992 Signs: 1072 . Length: 52 pic 10 pts, 222 mm
100 YVES LAFONT
Clearly, such a net reduces to a single wire in a linear number of steps, whereas
one can show that the execution takes exponential time! Therefore, the practical
interest of this execution is not clear, even if one ignores the parallel aspects of the
reduction.
One may also wonder whether our translation of interaction systems into the
system of combinators can be seen as a process of compilation. This would mean
that we have a physical machine suitable for the reduction of nets of combinators.
The problem is that, even if the rules are simple, the geometry of the net may
become very complicated during the computation. In fact, we only know that the
reduction of interaction nets can be easily and efficiently implemented on a tradi-
tional sequential machine, but from this viewpoint, the translation into the system
of combinators does not seem to be useful.
From a more theoretical viewpoint, one may also wonder whether there are
typed versions of our various systems of combinators. In other words, is there
a logic behind the interaction combinators ? A simple solution has been given by
the author, and independently by Peter Selinger (private communication), but
this would lead us too far away from our issue, and we prefer to reserve it for
subsequent publication.
REFERENCES
[Baw86] Bawden, A. (1986), Connection graphs, in ``Proceedings of ACM Conference on Lisp and
Functional Programming,'' pp. 258265.
[DR95] Danos, V., and Regnier, L. (1995), Proof-nets and the Hilbert space, in ``Advances in Linear
Logic'' (J.-Y. Girard, Y. Lafont, and L. Regnier, Eds.), London Mathematical Society
Lecture Note Series, Vol. 222, pp. 307328, Cambridge Univ. Press, Cambridge, UK.
[Gay95] Gay, S. J. (1995), Combinators for interaction nets, in ``Proceedings of the Second Imperial
College Department of Computing Workshop on Theory and Formal Methods'' (C. L.
Hankin, I. C. Mackie, and R. Nagarajan, Eds.), Imperial College Press.
[Gir89] Girard, J.-Y. (1989), Geometry of interaction I: Interpretation of system F, in ``Proceedings,
Logic Colloquium '88'' (Ferro et al., Eds.), pp. 221260, North-Holland, Amsterdam.
[Gir95] Girard, J.-Y. (1995), Linear logic: Its syntax and semantics, in ``Advances in Linear Logic''
(J.-Y. Girard, Y. Lafont, and L. Regnier, Eds.), London Mathematical Society Lecture Note
Series, Vol. 222, pp. 142, Cambridge Univ. Press, Cambridge, UK.
[GAL92a] Gonthier, G., Abadi, M., and Levy, J.-J. (1992), The geometry of optimal lambda reduction,
in ``Proceedings of 19th ACM Symposium on Principles of Programming Languages
(POPL '92),'' Assoc. Comput. Mach., New York.
[GAL92b] Gonthier, G., Abadi, M., and Levy, J.-J. (1992), Linear logic without boxes, in ``Proceedings
of 7th Annual Symposium on Logic in Computer Science (LICS '92),'' IEEE Press, New York.
[Laf 90] Lafont, Y. (1990), Interaction nets, in ``Proceedings of 17th ACM Symposium on Principles
of Programming Languages (POPL '90),'' pp. 95108, Assoc. Comput. Mach., New York.
[Laf 95] Lafont, Y. (1995), From proof-nets to interaction nets, in ``Advances in Linear Logic''
(J.-Y. Girard, Y. Lafont, and L. Regnier, Eds.), London Mathematical Society Lecture Note
Series, Vol. 222, pp. 225247, Cambridge Univ. Press, Cambridge, UK.
File: 643J 264332 . By:DS . Date:06:08:01 . Time:09:33 LOP8M. V8.0. Page 01:01
Codes: 6147 Signs: 3357 . Length: 52 pic 10 pts, 222 mm
INTERACTION COMBINATORS 101
[Lam90] Lamping, J. (1990), An algorithm for optimal lambda calculus reduction, in ``Proceedings
of 17th ACM Symposium on Principles of Programming Languages (POPL '90),''
pp. 1646, Assoc. Comput. Mach., New York.
[Mac94] Mackie, I., (1994) ``The Geometry of Implementation (An Investigation into Using the
Geometry of Interaction for Language Implementation),'' Ph.D. thesis, Imperial College of
Science, Technology, and Medicine, London.
Printed in Belgium
File: 643J 264333 . By:DS . Date:06:08:01 . Time:09:33 LOP8M. V8.0. Page 01:01
Codes: 1145 Signs: 497 . Length: 52 pic 10 pts, 222 mm