A formal account of nets
Lionel Vaux (Talk | contribs) (→Conventions: … were useless) |
Lionel Vaux (Talk | contribs) (various fixes and complements on connections) |
||
Line 104: | Line 104: | ||
is the list of ''passive'' ports. |
is the list of ''passive'' ports. |
||
− | A ''net'' is the data of a wiring <math>(P,W)</math> and of a set <math>C</math> of disjoint cells on |
+ | A ''net'' is the data of a wiring <math>(P,W)</math>, of a set <math>C</math> of disjoint cells on |
− | <math>P</math>. It follows from the definitions that each port <math>p\in P</math> appears in |
+ | <math>P</math>, and of a number <math>L\in\mathbf N</math> (the number of ''loops''). It follows |
− | exactly one wire and in at most one cell: we say <math>p</math> is ''free'' if it is |
+ | from the definitions that each port <math>p\in P</math> appears in exactly one wire and in |
− | not part of a cell, and <math>p</math> is ''internal'' otherwise. We write <math>\textrm{fp}(R)</math> for |
+ | at most one cell: we say <math>p</math> is ''free'' if it is not part of a cell, and |
− | the set of free ports of a net <math>R</math>. |
+ | <math>p</math> is ''internal'' otherwise. Moreover, we say <math>p</math> is ''dangling'' if |
+ | <math>p</math> is free and <math>W(p)</math> is internal. We write <math>\textrm{fp}(R)</math> for the set of |
||
+ | free ports of a net <math>R</math>. |
||
Generally, the “names” of internal ports of a net are not relevant, but free |
Generally, the “names” of internal ports of a net are not relevant, but free |
||
Line 119: | Line 119: | ||
* for all <math>p\in P</math>, <math>W'(\phi(p))=\phi(W(p))</math>; |
* for all <math>p\in P</math>, <math>W'(\phi(p))=\phi(W(p))</math>; |
||
* for all <math>c\in C</math>: |
* for all <math>c\in C</math>: |
||
+ | * <math>L=L'</math>. |
||
Observe that under these conditions <math>\psi</math> is uniquely induced by <math>\phi</math>. |
Observe that under these conditions <math>\psi</math> is uniquely induced by <math>\phi</math>. |
||
We say that the isomorphism <math>\phi</math> is ''nominal'' if moreover <math>p\in\textrm{fp}(R)</math> |
We say that the isomorphism <math>\phi</math> is ''nominal'' if moreover <math>p\in\textrm{fp}(R)</math> |
||
implies <math>p=\phi(p)</math>. |
implies <math>p=\phi(p)</math>. |
||
− | === Rewriting === |
+ | === Subnets === |
We say two nets are disjoint when their sets of ports are. |
We say two nets are disjoint when their sets of ports are. |
||
Line 130: | Line 131: | ||
<math>I\subseteq \textrm{fp}(R)</math> and <math>I'\subseteq \textrm{fp}(R')</math>. |
<math>I\subseteq \textrm{fp}(R)</math> and <math>I'\subseteq \textrm{fp}(R')</math>. |
||
We then write <math>R\bowtie_f{R'}</math> for the net |
We then write <math>R\bowtie_f{R'}</math> for the net |
||
− | with wiring <math>W\bowtie_f{W'}</math> and cells |
+ | with wiring <math>W\bowtie_f{W'}</math>, cells |
− | <math>C\cup C'</math>. |
+ | <math>C\cup C'</math> and loops <math>\Inner{R}{R'}_f=L+L'+\Inner{W}{W'}_f</math>. |
+ | We say this connection is ''orthogonal'' if <math>\Inner{W}{W'}_f=0</math>, and it is |
||
+ | ''modular'' if the ports in <math>I\cup I'</math> are all dangling: a modular connection is |
||
+ | always orthogonal. |
||
+ | |||
+ | We say <math>R_0</math> is a ''subnet'' of <math>R</math>, if there exists a net <math>R'</math> and a connection |
||
+ | <math>(I,I',f)</math> between <math>R_0</math> and <math>R'</math> such that <math>R=R_0\bowtie_f{R'}</math>. |
||
{{Lemma| |
{{Lemma| |
||
Line 142: | Line 143: | ||
<math>R_1\bowtie_{f\circ\phi^{-1}}{R'}</math>. |
<math>R_1\bowtie_{f\circ\phi^{-1}}{R'}</math>. |
||
}} |
}} |
||
+ | |||
+ | === Rewriting === |
||
A ''net rewriting rule'' is a pair <math>(r_0,r_1)</math> of nets |
A ''net rewriting rule'' is a pair <math>(r_0,r_1)</math> of nets |
Revision as of 09:50, 6 September 2012
The aim of this page is to provide a common framework for describing linear logic proof nets, interaction nets, multiport interaction nets, and the likes, while factoring out most of the tedious, uninteresting details (clearly not the fanciest page of LLWiki).
Contents |
Preliminaries
The short story
- the general flavor is that of multiport interaction nets;
- the top/down or passive/active orientation of cells is related with the distinction between premisses and conclusions of rules, (and in that sense, a cut is not a logical rule, but the focus of interaction between two rules);
- cuts are thus wires rather than cells/links: this fits with the intuition of GoI, but not with the most common presentations of proof nets;
- when representing proof nets, we introduce axioms explicitly as cells, so that axiom-cuts do not vanish.
Nets
Wires
A wiring is the data of a finite set P of ports and of a partition W of P by pairs (the wires): if , we write W(p) = q and W(q) = p. Hence a wiring is equivalently given by an involutive permutation W of finite domain P, without fixpoints (forall p, ): the wires are then the orbits. Another equivalent presentation is to consider W as a (simple, loopless, undirected) graph, with vertices in P, all of degree 1.
We say two wirings are disjoint when their sets of ports are. A connection between two disjoint wirings W and W' is a partial injection : , and f is a bijection . We then write for the wiring obtained by identifying the ports pairwise mapped by f, and then ``straightening`` the paths thus obtained to recover wires: notice this might also introduce loops and we write for the number of loops thus appeared.
We describe these operations a bit more formally. Write and . Then consider the graph with vertices in , and such that there is an edge between p and q iff q = W(p) or q = W'(p) or q = f(p) or p = f(q): in other words, . Vertices in are of degree 1, and the others are of degree 2. Hence maximal paths in are of two kinds:
- straight paths, with both ends in ;
- cycles, with vertices all in .
Then the wires in are the pairs {p,p'} such that p and p' are the ends of a path in . And is the number of cycles in , or more precisely the number of support sets of cycles (i.e. we forget about the starting vertice of cycles).
Lemma
Consider three wirings (P,W), (P',W') and (P'',W''), and two connections and such that . Then
and
Proof. The first equation holds because open maximal paths in correspond with those in , hence in , hence in . The second equation holds because both sides are two possible writings for the number of loops in
Nets
A signature is the data of a set Σ of symbols, together with arity functions (number of active ports, or conclusions) and (number of passive ports, or hypotheses). In the remaining, we assume such a signature is given.
A cell c with ports in P is the data of a symbol and of two disjoint lists of pairwise distinct ports: is the list of active ports and is the list of passive ports.
A net is the data of a wiring (P,W), of a set C of disjoint cells on P, and of a number (the number of loops). It follows from the definitions that each port appears in exactly one wire and in at most one cell: we say p is free if it is not part of a cell, and p is internal otherwise. Moreover, we say p is dangling if p is free and W(p) is internal. We write fp(R) for the set of free ports of a net R.
Generally, the “names” of internal ports of a net are not relevant, but free ports matter most often: internal ports are the analogue of bound variables in λ-terms. More formally, an isomorphism from net R to net R' is the data of a bijection of ports and a bijection of cells such that:
- for all , W'(φ(p)) = φ(W(p));
- for all :
- L = L'.
Observe that under these conditions ψ is uniquely induced by φ. We say that the isomorphism φ is nominal if moreover implies p = φ(p).
Subnets
We say two nets are disjoint when their sets of ports are. Let R and R' be disjoint nets, and (I,I',f) be a connection between W and W', such that and . We then write for the net with wiring , cells and loops . We say this connection is orthogonal if , and it is modular if the ports in are all dangling: a modular connection is always orthogonal.
We say R0 is a subnet of R, if there exists a net R' and a connection (I,I',f) between R0 and R' such that .
Lemma
Let R0, R1 and R' be nets such that R0 and R1
are disjoint from R,
(I,I',f) be a connection
and φ an isomorphism such that
φ(p) = φ(p') for all .
Then is nominally isomorphic to
.
Rewriting
A net rewriting rule is a pair (r0,r1) of nets such that fp(r0) = fp(r1). Then an instance of this rule is a pair (R0,R1) such that there exist:
- nets R'0 and R'1 isomorphic to r0 and r1 respectively, namely R'i = φi(ri), so that moreover φ0(p) = φ1(p) for all (in particular, fp(R'0) = fp(R'1));
- a net R'', disjoint from R'0 and R'1;
- a connection ;
such that each Ri is nominally isomorphic to .
Typing
A typing system on signature Σ is the data of a set Θ of types, an involutive negation , together with a typing discipline for each symbol, i.e. a relation . We then write for .
Then a typing for net R = (P,W,C) is a function such that:
- for all , ;
- for all of symbol σ, ;
where, in the last formula, we implicitly generalized τ to lists of ports and to lists of formulas, in the obvious, componentwise fashion. The interface of the typed net (R,τ) is then the restriction of τ to fp(R).
The idea, is that a wire {p,q} bears the type τ(q) (resp. τ(p)) in the direction (p,q) (resp. (q,p)), so that a rule reads as an inference from passive inputs (hypotheses) to active outputs (conclusions).
Observe that if (R,τ) is a typed net, and is an isomorphism, then R' is typed and its interface is : in particular, if φ is nominal, R' and R have the same interface.
Now let (R,τ) and (R',τ') be typed nets and (I,I',f) a connection so that and coincide on I. Then this induces a typing of preserving the interface on the remaining free ports.
Boxes
TODO