Proof nets for sumproduct logic Willem Heijltjes LFCS School of - - PowerPoint PPT Presentation

proof nets for sum product logic
SMART_READER_LITE
LIVE PREVIEW

Proof nets for sumproduct logic Willem Heijltjes LFCS School of - - PowerPoint PPT Presentation

Proof nets for sumproduct logic Willem Heijltjes LFCS School of Informatics University of Edinburgh Kananaskis, 11-12 June 2011 This talk. . . Part 1 Background Sumproduct nets without units Sumproduct nets with units


slide-1
SLIDE 1

Proof nets for sum–product logic

Willem Heijltjes

LFCS School of Informatics University of Edinburgh

Kananaskis, 11-12 June 2011

slide-2
SLIDE 2

This talk. . .

Part 1

◮ Background ◮ Sum–product nets without units ◮ Sum–product nets with units ◮ Results and future work

Part 2

◮ Proofs

slide-3
SLIDE 3

Motivation: proof nets

For a given logic,

◮ Syntax: proofs, terms ◮ Semantics: games, complete partial orders, coherence spaces,

Kripke frames, categories But: many proofs may correspond to the same semantic entity The aim of proof nets is to obtain a 1-1 correspondence between syntax and semantics

slide-4
SLIDE 4

Motivation: sum–product logic

◮ A.k.a. additive linear logic

“Simple” fragment of linear logic, but units are hard (Girard)

◮ Categorical semantics: free products and coproducts

(Joyal)

◮ Game-semantics: two communicating games of binary choice

(Cockett, Seely)

◮ Process semantics: “the logic of message passing”

(Cockett)

slide-5
SLIDE 5

Sum–product logic

Categorical (free) finite products and coproducts (over C) X := A ∈ ob(C) | 0 | 1 | X + X | X × X Morphisms f : X → Y

slide-6
SLIDE 6

Sum–product logic

Categorical (free) finite products and coproducts (over C) X := A ∈ ob(C) | 0 | 1 | X + X | X × X Morphisms f : X → Y Additive linear logic X := A | 0 | ⊤ | X ⊕ X | X & X Proofs of X ⊢ Y (or X ⊸ Y , or X ⊥ & Y ) Free lattice completions of a poset (P, ≤) x := a ∈ P | ⊥ | ⊤ | x ∨ x | x ∧ x Justifications that x ≤ y

slide-7
SLIDE 7

Idiosyncrasies of free (co)products

Zero and one are units 0 + X ∼ = X 1 × X ∼ = X and products and coproducts are perfectly dual But there is no distributivity | = 0 × X ∼ = 0 | = 1 + X ∼ = 1 | = X × (Y + Z) ∼ = (X × Y ) + (X × Z) (there may not even be a single arrow from left to right!)

slide-8
SLIDE 8

Sum–product logic

A

a

− → B

?

− → X X

!

− → 1 X

f

− → Yi X

ιi◦f

− → Y0 + Y1 X0

f

− → Y X1

g

− → Y X0 + X1

[f ,g]

− → Y X

f

− → Y0 X

g

− → Y1 X

〈f ,g〉

− → Y0 × Y1 Xi

f

− → Y X0 × X1

f ◦πi

− → Y X

id

− → X X

f

− → Y Y

g

− → Z X

g◦f

− → Z

slide-9
SLIDE 9

Cut elimination / subformula property

Whitman’s Theorem for free lattices (1940s) e.g.: u ∧ v ≤ x ∨ y only if u ≤ x ∨ y

  • r

v ∧ u ≤ x

  • r

v ≤ x ∨ y

  • r

v ∧ u ≤ y Joyal: Free Bicompletions of Categories (1995) a morphism f : V0 × V1 → X0 + X1 has one of these forms V0 × V1

πi

− → Vi

g

− → X0 + X1 V0 × V1

h

− → Xj

ιj

− → X0 + X1 and if it has both, then V0 × V1

πi h

Vi

k g

Xj

ιj

X0 + X1

slide-10
SLIDE 10

Softness

Joyal: Free Bicompletions of Categories (1995) For any (small) diagrams D : I → C and E : J → C: colim

I×J (hom(Dop, E))

colim

J

(hom(lim

I D, E))

colim

I

(hom(Dop, colim

J

E)) hom(lim

I D, colim J

E)

slide-11
SLIDE 11

Proof identity

Proofs equal up to permutations denote the same morphism X1

f

− → Y0 X0 × X1

f ◦π1

− → Y0 X0 × X1

ι0◦(f ◦π1)

− → Y0 + Y1 = X1

f

− → Yi X1

ιi◦f

− → Y0 + Y1 X0 × X1

(ι0◦f )◦π1

− → Y0 + Y1

?

− → Y0

?

− → Y1

〈?,?〉

− → Y0 × Y1 =

?

− → Y0 × Y1

slide-12
SLIDE 12

Proof identity

Cockett and Seely: Finite Sum–Product Logic (2001) ιi ◦ (f ◦ πj) = (ιi ◦ f ) ◦ πj [ ιi ◦ f , ιi ◦ g] = ιi ◦ [ f , g] 〈f ◦ πi, g ◦ πi〉 = 〈f , g〉 ◦ πi [ 〈f0, g0〉, 〈f1, g1〉] = 〈[ f0, f1], [ g0, g1]〉 ?1 = !0 〈?, ?〉 = ? [ !, !] = ! πi ◦ ? = ? ! ◦ ιi = ! Cut-free proofs up to these permutations denote the same categorical morphism—and proof identity is decidable.

slide-13
SLIDE 13

Proof identity

Cockett and Santocanale (2009): Proof identity for sum–product logic is tractable Equality of f , g : X → Y can be decided in time O((hgt(X) + hgt(Y )) × |X| × |Y |) (where hgt(X) is the height and |X| the total size of the syntax tree of X)

slide-14
SLIDE 14

Proof nets (without units)

Hughes (2002), Hughes and Van Glabbeek (2005) A

a

− → B

A a B

Xi

f

− → Y X0 × X1

f ◦πi

− → Y

f × π0 π1

X0

f

− → Y X1

g

− → Y X0 + X1

[ f ,g]

− → Y

f + g

slide-15
SLIDE 15

Proof nets (without units)

Hughes (2002), Hughes and Van Glabbeek (2005) X

f

− → Yi X

ιi◦f

− → Y0 + Y1

f + ι0 ι1

X

f

− → Y0 X

g

− → Y1 X

〈f ,g〉

− → Y0 × Y1

f × g

slide-16
SLIDE 16

Example: construction

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-17
SLIDE 17

Example: construction

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-18
SLIDE 18

Example: construction

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-19
SLIDE 19

Example: construction

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-20
SLIDE 20

Example: construction

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-21
SLIDE 21

Example: construction

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-22
SLIDE 22

Example: construction

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-23
SLIDE 23

Example: construction

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-24
SLIDE 24

Example: construction

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-25
SLIDE 25

Example: construction

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-26
SLIDE 26

Switching

A net X

R

− → Y has

◮ a source object X ◮ a target object Y ◮ a labelled relation R from the leaves in X to the leaves in Y

Any such triple is a net if it satisfies the switching condition:

+ ×

After choosing one branch for each coproduct in X and each product in Y there must be exactly one path from left to right.

slide-27
SLIDE 27

Example: switching

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-28
SLIDE 28

Example: switching

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-29
SLIDE 29

Example: switching

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-30
SLIDE 30

Example: switching

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-31
SLIDE 31

Example: switching

A × A B × + B A + × C C

(A × B) + (A × C) − → A × (B + C)

slide-32
SLIDE 32

Non-example: switching

A A × × B B + + A C × C

A × (B + C) − → (A × B) + (A × C)

slide-33
SLIDE 33

Non-example: switching

A A × × B B + + A C × C

A × (B + C) − → (A × B) + (A × C)

slide-34
SLIDE 34

Non-example: switching

A A × × B B + + A C × C

A × (B + C) − → (A × B) + (A × C)

slide-35
SLIDE 35

Non-example: switching

A A × × B B + + A C × C

A × (B + C) − → (A × B) + (A × C)

slide-36
SLIDE 36

Non-example: switching

A A × × B B + + A C × C

A × (B + C) − → (A × B) + (A × C)

slide-37
SLIDE 37

Non-example: switching

A A × × B B + + A C × C

A × (B + C) − → (A × B) + (A × C)

slide-38
SLIDE 38

Non-example: switching

A A × × B B + + A C × C

A × (B + C) − → (A × B) + (A × C)

slide-39
SLIDE 39

Non-example: switching

A A × × B B + + A C × C

A × (B + C) − → (A × B) + (A × C)

slide-40
SLIDE 40

Non-example: switching

A A × × B B + + A C × C

A × (B + C) − → (A × B) + (A × C)

slide-41
SLIDE 41

Non-example: switching

A A × × B B + + A C × C

A × (B + C) − → (A × B) + (A × C)

slide-42
SLIDE 42

Equalities factored out

A f B × + A B A f g B × × A B

ι0 ◦ (f ◦ π0) = (ι0 ◦ f ) ◦ π0 〈f ◦ π0, g ◦ π0〉 = 〈f , g〉 ◦ π0

A f B + + A g B A f k B + × A m g B

[ ι0 ◦ f , ι0 ◦ g] = ι0 ◦ [ f , g] 〈[ f , g], [ k, m]〉 = [ 〈f , k〉, 〈g, m〉]

slide-43
SLIDE 43

The units

For initial and terminal maps ? : 0 → Y or ! : X → 1 the objects X and Y may be a product or coproduct. These (unlabelled) links are added:

1

Links are no longer restricted to the leaves. For example:

A + + A

The switching condition is unaffected. Omitting the label factors out an additional equality:

? !

1

1

slide-44
SLIDE 44

The full net calculus

A a B 1 f + ι0 ι1 f + g f × g f × π0 π1

slide-45
SLIDE 45

The unit equations

ιi ◦ ? = ?

+

  • +

. . . define an equational theory (⇔) over nets, via graph rewriting

slide-46
SLIDE 46

The unit equations

ιi ◦ ? = ? 〈?, ?〉 = ?

+ ×

  • +

×

. . . define an equational theory (⇔) over nets, via graph rewriting

slide-47
SLIDE 47

The unit equations

ιi ◦ ? = ? 〈?, ?〉 = ? [ !, !] = ! ! ◦ πi = !

+ × + 1 × 1

  • +

× + 1 × 1

. . . define an equational theory (⇔) over nets, via graph rewriting

slide-48
SLIDE 48

Example

1 1 × × + + × 1 1 ×

slide-49
SLIDE 49

Example

1 1 × × + + × 1 1 ×

slide-50
SLIDE 50

Example

1 1 × × + + × 1 1 ×

slide-51
SLIDE 51

Example

1 1 × × + + × 1 1 ×

slide-52
SLIDE 52

Example

1 1 × × + + × 1 1 ×

slide-53
SLIDE 53

Example

1 1 × × + + × 1 1 ×

slide-54
SLIDE 54

Example

1 1 × × + + × 1 1 ×

slide-55
SLIDE 55

Example

1 1 × × + + × 1 1 ×

slide-56
SLIDE 56

Example

1 1 × × + + × 1 1 ×

slide-57
SLIDE 57

Example

1 1 × × + + × 1 1 ×

slide-58
SLIDE 58

Example

1 1 × × + + × 1 1 ×

slide-59
SLIDE 59

Example

1 1 × × + + × 1 1 ×

slide-60
SLIDE 60

Example

1 1 × × + + × 1 1 ×

slide-61
SLIDE 61

Example

1 1 × × + + × 1 1 ×

slide-62
SLIDE 62

Example

1 1 × × + + × 1 1 ×

slide-63
SLIDE 63

Example

1 1 × × + + × 1 1 ×

slide-64
SLIDE 64

Example

1 1 × × + + × 1 1 ×

slide-65
SLIDE 65

Example

1 1 × × + + × 1 1 ×

slide-66
SLIDE 66

Example

1 1 × × + + × 1 1 ×

slide-67
SLIDE 67

Example

1 1 × × + + × 1 1 ×

slide-68
SLIDE 68

The problem

We would like canonical representations for the equivalence classes

  • f proof nets generated by (⇔).

A standard approach is to rewrite towards a normal form, using a confluent and terminating rewrite relation. The first question is then whether restricting the equivalences of (⇔) to a single direction can provide a suitable rewrite relation.

slide-69
SLIDE 69

Rewriting towards the leaves

× 1

⇒ ⇒

× 1

? ⇒ ⇒

× 1

slide-70
SLIDE 70

Rewriting towards the roots

1 × +

⇒ ⇒

1 × + 1 × +

⇒ ⇒ ?

slide-71
SLIDE 71

Rewriting towards the roots

1 × +

⇒ ⇒

1 × + 1 × +

⇒ ⇒ ? A first attempt at a solution: a new type of link

1 × +

slide-72
SLIDE 72

Rewriting towards the roots

A id A + × 1

⇒ ⇒

A id A + × 1 A id A + × 1

⇒ ⇒ ?

slide-73
SLIDE 73

Rewriting towards the roots

A id A + × 1

⇒ ⇒

A id A + × 1 A id A + × 1

⇒ ⇒ ? The following breaks the switching condition (and makes no sense)

A id A + × 1

slide-74
SLIDE 74

The solution

Confluent rewriting seems impossible without breaking the switching condition. So: break it. Then there is a simple confluent and normalising rewrite relation: saturation ( ).

+

+ +

slide-75
SLIDE 75

The solution

Confluent rewriting seems impossible without breaking the switching condition. So: break it. Then there is a simple confluent and normalising rewrite relation: saturation ( ).

×

× ×

slide-76
SLIDE 76

The solution

Confluent rewriting seems impossible without breaking the switching condition. So: break it. Then there is a simple confluent and normalising rewrite relation: saturation ( ).

+ 1

+ 1 + 1

slide-77
SLIDE 77

The solution

Confluent rewriting seems impossible without breaking the switching condition. So: break it. Then there is a simple confluent and normalising rewrite relation: saturation ( ).

× 1

× 1 × 1

slide-78
SLIDE 78

Example

1 + + 1

slide-79
SLIDE 79

Example

1 + + 1

slide-80
SLIDE 80

Example

1 + + 1

slide-81
SLIDE 81

Example

1 + + 1

slide-82
SLIDE 82

Example

1 + + 1

slide-83
SLIDE 83

Example

1 + + 1

slide-84
SLIDE 84

Example

1 + + 1

slide-85
SLIDE 85

Example

1 + + 1

slide-86
SLIDE 86

Example

1 + + 1

slide-87
SLIDE 87

Example

1 + + 1

slide-88
SLIDE 88

Example

1 + + 1

slide-89
SLIDE 89

Example

1 + + 1

slide-90
SLIDE 90

Results

The saturation relation ( ) is confluent rewrite steps add links, depending on the presence of other links strongly normalising bounded by the number of possible links (|X| × |Y | for X

R

− → Y ) linear-time (in |X| × |Y |); saturation steps are constant-time

slide-91
SLIDE 91

Results

The saturation relation ( ) is confluent rewrite steps add links, depending on the presence of other links strongly normalising bounded by the number of possible links (|X| × |Y | for X

R

− → Y ) linear-time (in |X| × |Y |); saturation steps are constant-time Write X

σR

− → Y for the normal form (the saturation) of a net X

R

− → Y and call it a saturated net

slide-92
SLIDE 92

Results

Saturation gives a decision procedure for sum–product logic: X

R

− → Y ⇔ X

S

− → Y ⇐ ⇒ X

σR

− → Y = X

σS

− → Y Completeness (⇒) R ⇔ R′ ⇔ . . . . . ⇔ S

  • .............
  • .

. . . . . .

  • Soundness (⇐)

is the hard part

slide-93
SLIDE 93

Saturated nets

A saturated net X

σR

− → Y combines the links of all equivalent nets σR =

  • { S | X

S

− → Y ⇔ X

R

− → Y }

slide-94
SLIDE 94

Saturated nets

A saturated net X

σR

− → Y combines the links of all equivalent nets σR =

  • { S | X

S

− → Y ⇔ X

R

− → Y } call links occurring in the same saturation step neighbours, and an equivalence class of neighbouring links a neighbourhood Correctness: (tentative) relation of links R ⊆ X × Y is a saturated net if and only if it is saturated, and for every switching the links switched on form a non-empty neighbourhood.

slide-95
SLIDE 95

Saturated nets

A saturated net X

σR

− → Y combines the links of all equivalent nets σR =

  • { S | X

S

− → Y ⇔ X

R

− → Y } call links occurring in the same saturation step neighbours, and an equivalence class of neighbouring links a neighbourhood Correctness: (tentative) relation of links R ⊆ X × Y is a saturated net if and only if it is saturated, and for every switching the links switched on form a non-empty neighbourhood. Morally, this is a requirement for evidence that all maps expressed in a net commute.

slide-96
SLIDE 96

The category of saturated nets

The category of saturated nets is the free completion with finite (nullary and binary) products and coproducts of a base category C. Identities are nets X

σidX

− → X where idX is the identity relation on the leaves of X.

A idA A 1 1

id0 = ?0 id1 = !1

idX + + idY idX × × idY

idX+Y = [ ι0 ◦ idX, ι1 ◦ idY ] idX×Y = 〈idX ◦ π0, idY ◦ π1〉

slide-97
SLIDE 97

The category of saturated nets

The category of saturated nets is the free completion with finite (nullary and binary) products and coproducts of a base category C. Identities are nets X

σidX

− → X where idX is the identity relation on the leaves of X. Saturation is necessary: nets idX are equivalent to other nets.

+ + 1 1

+ + 1 1 ∗ ∗ + + 1 1

slide-98
SLIDE 98

The category of saturated nets

The category of saturated nets is the free completion with finite (nullary and binary) products and coproducts of a base category C. Composition is relational composition followed by (re-)saturation.

A A 1 × + + + B B 1 1 × + 1 1 × + 1

slide-99
SLIDE 99

Future work: bicompletions

For products, these are the diagrams

× ×

slide-100
SLIDE 100

Future work: bicompletions

For products, these are the diagrams

× ×

Possibly, equalisers can be added in the following way

R S

E

R S

E

slide-101
SLIDE 101

Conclusion

Saturated nets are canonical proof nets for additive linear logic and give a combinatorial description of free sum–product categories

◮ Based on a simple rewriting algorithm ◮ Complicated correctness proof ◮ Possibly expands to give a direct syntactic account of Joyal’s

construction on free bicompletions

◮ Relevant to concurrent games and communication by message

passing

slide-102
SLIDE 102

Questions?

slide-103
SLIDE 103

Example

A A + × 1 × + 1

(A + 0) × 0 − → (A × 1) + 1

slide-104
SLIDE 104

Example

A A + × 1 × + 1

(A + 0) × 0 − → (A × 1) + 1