Compressing Polarized Boxes Beniamino Accattoli Carnegie Mellon University
B. Accattoli (CMU)
Compressing Polarized Boxes
1 / 39
linear logic and boxes
Proof nets: the graphical syntax for linear logic. Brought new deep perspectives about normalization: 1
Optimal reductions;
2
Implicit computational complexity;
3
Explicit substitutions;
4
Strong normalization.
Key tool: boxes for the promotion rule, the heart of the system. This work: a new understanding of boxes, via polarity.
B. Accattoli (CMU)
Compressing Polarized Boxes
2 / 39
Multiplicative Linear Logic (MLL)
Identity rules:
Multiplicative rules:
B. Accattoli (CMU)
` A⊥ , A
ax
` Γ, A ` ∆, B ⊗ ` Γ, ∆, A ⊗ B
Compressing Polarized Boxes
` Γ, A
` A⊥ , ∆ cut ` Γ, ∆
` Γ, A, B ` ` Γ, A ` B
3 / 39
Proof nets for MLL
` A⊥ , A
ax
ax A⊥
π :
σ :
` Γ, A
` ∆, A⊥ ` Γ, ∆
π? cut
σ? A cut A⊥
Γ
∆
π?
π :
A
Γ
` Γ, A, B
`
` Γ, A ` B
`
B
A`B
π :
σ :
` Γ, A
` ∆, B
` Γ, ∆, A ⊗ B
B. Accattoli (CMU)
A
π? Γ ⊗
A
B
⊗
σ? ∆
A⊗B
Compressing Polarized Boxes
4 / 39
Cut-elimination for MLL
ax
A A⊥ cut
A
A⊥ B ⊥
A
`
B
⊗
A
→ax
→`
cut
P⊥
Q⊥ P cut
Q
cut
No duplication/erasure of subnets ⇒ Everything works fine
B. Accattoli (CMU)
Compressing Polarized Boxes
5 / 39
Multiplicative Exponential Linear Logic (MELL)
MLL + Exponential rules:
B. Accattoli (CMU)
` Γ, A d ` Γ, ?A
`?Γ, A ! `?Γ, !A
` Γ, ?A, ?A c ` Γ, ?A
`Γ w ` Γ, ?A
Compressing Polarized Boxes
6 / 39
Exponential Cut-elimination Consider the following cut with contraction: π
ρ
:
:
` ?A⊥ , ?A⊥ , Γ
`?∆, A c ! `?∆, !A ` ?A⊥ , Γ cut `?∆, Γ
Its elimination requires to duplicate ρ: ρ ρ :
`?∆, A ! `?∆, !A
:
`?∆, A ! `?∆, !A
π : ⊥
` ?A , ?A⊥ , Γ
`?∆, ?A⊥ , Γ `?∆, ?∆, Γ c .. . c `?∆, Γ
cut
cut
Similarly, weakening induces erasure of sub-proofs. B. Accattoli (CMU)
Compressing Polarized Boxes
7 / 39
Na¨ıve proof nets for MELL π :
`Γ w ` Γ, ?A
π?
w
Γ
π
?A
π?
:
A
` Γ, A d ` Γ, ?A
d ?A
π
π?
:
` Γ, ?A, ?A c ` Γ, ?A
Γ
?A ?A
π
π?
:
` ?Γ, A ! ` ?Γ, !A
B. Accattoli (CMU)
?A
c
?Γ
Compressing Polarized Boxes
A
! !A
8 / 39
How to eliminate cuts? Na¨ıve translation of promotion: π
π?
:
` ?Γ, A ! ` ?Γ, !A
A
!
?Γ
!A
Given this cut in a generic net: ?A⊥ ?A⊥
A
c
!
?A⊥
cut
!A
There is no way of recovering the sub-proof to duplicate. Then !-rules are represented as boxes: π π?
:
` ?Γ, A ! ` ?Γ, !A B. Accattoli (CMU)
A
! ?Γ
Compressing Polarized Boxes
!A 9 / 39
Exponential cut elimination implemented using boxes w ?A
⊥
A⊥
P
d
cut!A ?A⊥
?A⊥
cut
A
?∆
A⊥
A
P
cut Γ
!A
!
... ?B1 ?Bk
!B cut
! ?Γ
→c
! ... ?A⊥ ?A⊥ !A cut cut
! !A . . .
c
c
... ?B1 ?Bk
→
P ! A
B. Accattoli (CMU)
w
Γ
P !
...
?B1 . . . ?Bk
→d
!
?A⊥ ?A⊥
c
w
→w
! ... !A cut ?B ?Bk 1
?∆
Compressing Polarized Boxes
!B cut
!
?Γ 10 / 39
Boxes
Boxes solve the problem of defining cut-elimination. However, the solution is drastic, equivalent to give up. Some fragments seem to have an inherent notion of box. Where does the problem lie? Is there a logic feature that internalizes boxes?
B. Accattoli (CMU)
Compressing Polarized Boxes
11 / 39
Last rule 1 Main problem: in proof nets there is no last rule. Re-consider: π :
ρ : `?∆, !A
!
` ?A⊥ , Γ `?∆, Γ
c
→
`?∆, !A
cut
π :
`?∆, A !
`?∆, !A
`?∆, A
` ?A⊥ , ?A⊥ , Γ
`?∆, A
ρ :
ρ : !
` ?A⊥ , ?A⊥ , Γ
`?∆, ?A⊥ , Γ `?∆, ?∆, Γ . . . `?∆, Γ
cut
cut
c c
In sequent calculus: rule occurrence r 7→ sub-proof ending on r . No such thing in proof nets! B. Accattoli (CMU)
Compressing Polarized Boxes
12 / 39
Last rule 2
Intuition: Internalizing a notion of last rule will internalize boxes Partially internalized boxes: Olivier Laurent’s polarized MELL. Abstract last rule = last positive rule. This work: totally internalized boxes for MELLP. Expressiveness: MELLP codes classical logic/λµ-calculus.
B. Accattoli (CMU)
Compressing Polarized Boxes
13 / 39
Outline
1
Polarized MELL
2
Compressing polarized boxes
B. Accattoli (CMU)
Compressing Polarized Boxes
14 / 39
Polarization Formulas: P, Q ::= X N, M ::= X ⊥
| 1 | P ⊗Q | ⊥ | N `M
| !N | ?P
Sequents: `Γ;P
or
`Γ;
Multiplicative rules: ` Γ; P
` ∆, P ⊥ ; [Q] cut ` Γ, ∆; [Q] ` Γ; [P] ⊥ ` Γ, ⊥; [P]
` Γ, N, M; [P] ` ` Γ, N ` M; [P] B. Accattoli (CMU)
ax
` P ⊥; P
`; 1
1
` Γ; P ` ∆; Q ⊗ ` Γ, ∆; P ⊗ Q
Compressing Polarized Boxes
15 / 39
Laurent’s MELLP: adding exponentials Exponential rules: ` Γ; [P] w ` Γ, N; [P]
` Γ; P ` Γ, ?P;
d
` Γ, N, N; [P] c ` Γ, N; [P]
` Γ, N; ` Γ; !N
!
Difference with linear logic: Promotion, contraction, and weakening do not need the ? modality. Important: Only positives are duplicated/erased. Positives are last rules and every positive will have a box. B. Accattoli (CMU)
Compressing Polarized Boxes
16 / 39
`; 1
1
1
` P ⊥; P
1 ax
ax
π?
` Γ; P ` ∆; Q ⊗ ` Γ, ∆; P ⊗ Q
P⊥
P
P
Q
Γ
θ? ⊗
∆
P⊗Q
` Γ; P
` ∆, P ⊥ ; [Q] ` Γ, ∆; [Q]
π? cut
θ? ⊥ cut P
P Γ
∆
[Q]
π? ` Γ, N, M; [P] ` Γ, N ` M; [P]
`
N Γ
`
M [P]
N`M
B. Accattoli (CMU)
Compressing Polarized Boxes
17 / 39
w
` Γ, N; [P]
` Γ; P ` Γ, ?P;
π?
w
` Γ; [P]
N
Γ
[P]
π? d
P
d
Γ
?P
π? ` Γ, N, N; [P] ` Γ, N; [P]
c
N Γ
N
c
[P]
N
` Γ, N; ` Γ; !N
π? !
! Γ
B. Accattoli (CMU)
N
Compressing Polarized Boxes
!N
18 / 39
Positive Trees ` Γ; P
` ∆, P ⊥ ; [Q] cut ` Γ, ∆; [Q] ` Γ; [P] ⊥ ` Γ, ⊥; [P]
` Γ, N, M; [P] ` ` Γ, N ` M; [P]
ax
` P ⊥; P
`; 1
1
` Γ; P ` ∆; Q ⊗ ` Γ, ∆; P ⊗ Q
` Γ; [P] w ` Γ, N; [P]
` Γ; P ` Γ, ?P;
d
` Γ, N, N; [P] c ` Γ, N; [P]
` Γ, N; ` Γ; !N
!
Note: positives have a forest structure. B. Accattoli (CMU)
Compressing Polarized Boxes
19 / 39
Positive Tree Positive connectives: 1, ⊗, !. Explicit boxes for ! ⇒ induced box for every positive: H
H
→
! N1
!
N ... k
N1
Q
P
⊗ P⊗Q
P⊥
→
ax P
P⊥
N ... k
Q
P
→
ax P
1 ⊗
→
1
P⊗Q
My contribution: explicit boxes for ! can be made implicit.
B. Accattoli (CMU)
Compressing Polarized Boxes
20 / 39
Generalized rewriting rule
Laurent uses the positive tree to generalize box rules: T (+) w
+
→w
...
cut N1
B. Accattoli (CMU)
w
...
w
N1
...
Nk
Nk
Compressing Polarized Boxes
21 / 39
Polarized cut-elimination 1
ax P⊥ cut
P
ax
N
N⊥ cut
N
P⊥ Q
⊥
`
P
→ax+
Q
P
⊗
P
→ax−
→`
N
P⊥
Q⊥ P cut
Q
cut
cut
B. Accattoli (CMU)
Compressing Polarized Boxes
22 / 39
Polarized cut-elimination 2 N⊥
N⊥
E d
!N cut
w P⊥
cut
!
P
→d
... N1
+
w
T (+)
→w
...
c P
P cut
w
N1 . . . Nk
P⊥ P⊥
+
...
T (+)
→c
... N1
P cut
T (+) ...
+
+
Q
... M1 Mh
B. Accattoli (CMU)
cut
P
+
T (+) ... N1
Nk
→
E !
cut ... M1 Mh
Compressing Polarized Boxes
c
c
Nk
E
T (+) ...
P cut
N1
!
Nk
Nk
P⊥ P⊥
⊥
... N1
Nk
N1
E
N cut
P
...
+
Nk
T (+) ... N1
Nk
23 / 39
Outline
1
Polarized MELL
2
Compressing polarized boxes
B. Accattoli (CMU)
Compressing Polarized Boxes
24 / 39
Matching property ` Γ; P
` ∆, P ⊥ ; [Q] cut ` Γ, ∆; [Q] ` Γ; [P] ⊥ ` Γ, ⊥; [P]
` Γ, N, M; [P] ` ` Γ, N ` M; [P]
ax
` P ⊥; P
`; 1
1
` Γ; P ` ∆; Q ⊗ ` Γ, ∆; P ⊗ Q
` Γ; [P] w ` Γ, N; [P]
` Γ; P ` Γ, ?P;
d
` Γ, N, N; [P] c ` Γ, N; [P]
` Γ, N; ` Γ; !N
!
Matching property: every !-rule is enabled by a d-rule. B. Accattoli (CMU)
Compressing Polarized Boxes
25 / 39
Materializing the matching property 1 Consider: w !
1 d
w !
w
1 d
w
Problem: without box the content is disconnected. Idea: let’s materialize the matching property with an additional edge. w !
i
1 d
w
The content and the positive sub-graphs are now connected. The induced box: the positive tree plus the negative trees on it.
B. Accattoli (CMU)
Compressing Polarized Boxes
26 / 39
Quotient and weakenings Let’s do it again: w !
1 d
w !
w
1 d
w
We do not recover the original box: w !
i
1 d
w
w !
1 d
w
Interpretation: we are quotienting proof nets with explicit boxes. Remark: weakenings are not attached! ⇒ improvement over Francois Lamarche’s essential nets. B. Accattoli (CMU)
Compressing Polarized Boxes
27 / 39
Box borders
Let’s do it again: w !
1 d
w
w !
1 d
i
1
1
d
d
!
!
w
i
Remark: we are not attaching the border of the box. ⇒ improvement over Ian Mackie’s interaction nets technique.
B. Accattoli (CMU)
Compressing Polarized Boxes
28 / 39
Implicit boxes Recipe: Take a cut-free proof net. Matching: every !-box has a unique dereliction at level 0. Remove the explicit box and add the matching edge. Then: The induced boxes define a net with explicit boxes. Induced boxes are locally reconstructable. There is a simple correctness criterion (i.e. not ad-hoc). It is a canonical representation (i.e. no choice). B. Accattoli (CMU)
Compressing Polarized Boxes
29 / 39
Summing up
In a cut-free proof net the explicit box of a ! can be replaced by a single edge in a canonical and more parallel way.
B. Accattoli (CMU)
Compressing Polarized Boxes
30 / 39
Cuts Cuts introduce a problem: ax
ax cut
!
d
The positive sub-graph is no longer connected. Let’s iterate the same idea: ax
!
B. Accattoli (CMU)
ax cut
i i
d
Compressing Polarized Boxes
31 / 39
Example ax ax
w w c N M ` ! d N`M ?!P
P
⊗ d
P
?(P ⊗ P)
⊥
w !
w cut
w
1
c ! d
?1
cut
ax ax
w w c N M ` ! d N`M
i
⊗ d i
w !
w cut
w
P
⊗ d
P
?(P ⊗ P)
?!P ⊥
⊥
ax ax
w w `
1 d
i
1 d
w w
1
c ! d
1 d
1
?1
cut
w cut ⊥
ax ax
w w `
!
i
⊗ d i
w !
w
i
1 d
cut
w
1 cut
cut
Implicit box: one dereliction plus the cuts at level 0. Induced box: positive tree plus negative sub-trees. Novelty: ` commutes with box borders! B. Accattoli (CMU)
Compressing Polarized Boxes
32 / 39
Cut elimination ax
X⊥ cut
X
!
P⊥ Q
X
Q
P
`
→ax−
⊗ !
→`
i !0
→ax+ !
X⊥
N
N⊥
d
!
c P⊥
!
P cut
P⊥ P⊥
+
+
i
P
cut
!
i
P
+
N1
N1
w →w Nk
!0
i i
!00
+ c
i
(+) ...
N cut
(+) ...
P
i
⊥
→d
i
(+) ... cut
!
Nk
w
B. Accattoli (CMU)
P cut
→c
... N1
i
cut
(+)
cut
i
!00
P⊥ P⊥
Q
i
i
X⊥
i
cut
!
ax X cut
Q⊥ P
P⊥
cut
!
i
N⊥
X⊥
!
⊥
X
...
c ...
Nk
w
N1 . . . Nk
!
Compressing Polarized Boxes
33 / 39
Side effects 1 Cut elimination has ’side effects’. Consider the weakening rule: w P
⊥
cut
!
P
+
w
(+) ... N1
→w Nk
...
w
N1 . . . Nk
!
i
It automatically pushes the created weakenings out of boxes: w !
+ cut i
(+)
...
... N1
→w
!
Nk
...
w
w
... N1 Nk
Similarly for contraction.
B. Accattoli (CMU)
Compressing Polarized Boxes
34 / 39
No commutative cuts
There is no commutative rule. It is included inside the axiom and dereliction rules. The axiom rule: ax
X⊥ cut
X
!
X
X
→ax− !
i
and its action through box borders: P
ax
... P cut
!
B. Accattoli (CMU)
+
(+) ... N1
Nk
→ax−
i
Compressing Polarized Boxes
+ P
(+)
N1
... Nk
!
35 / 39
No commutative cuts 2 The dereliction rule: N⊥ i !0
N
d
!
N⊥ i
→d
cut
!00
N cut
!0
i
i i
!00
and an example of its action:
i !0
d0
... cut
!00
B. Accattoli (CMU)
w !
i
1 d
w cut
→d
i i !0
1 d
...
!00
i
Compressing Polarized Boxes
36 / 39
Cut-elimination On η-expanded nets: Cut elimination is strongly normalizing (SN). Confluence requires assoc., comm., and neutrality for contractions. Then: Church-Rosser modulo and SN modulo hold. The general case: More and wilder ’side effects’. Difficult critical pairs and known techniques do not work. By-product: new simpler proof of SN for linear logic (RTA 2013).
B. Accattoli (CMU)
Compressing Polarized Boxes
37 / 39
Conclusions An alternative representation of boxes: Simple; Canonical; More parallel; Provided of a correctness criterion; A local reconstruction of boxes; Results on the dynamics.
New perspective on polarity. It already lead to new understanding of SN for linear logic.
B. Accattoli (CMU)
Compressing Polarized Boxes
38 / 39
THANKS!
B. Accattoli (CMU)
Compressing Polarized Boxes
39 / 39