Towards an algebra of negation (work in progress) Paul-Andr Mellis - - PowerPoint PPT Presentation

towards an algebra of negation
SMART_READER_LITE
LIVE PREVIEW

Towards an algebra of negation (work in progress) Paul-Andr Mellis - - PowerPoint PPT Presentation

Towards an algebra of negation (work in progress) Paul-Andr Mellis CNRS, Universit Paris Denis Diderot Foundational Methods in Computer Science Halifax 31 May 2008 1 Proof-knots Aim: formulate an algebra of these logical knots 2 A


slide-1
SLIDE 1

Towards an algebra of negation

(work in progress)

Paul-André Melliès CNRS, Université Paris Denis Diderot Foundational Methods in Computer Science Halifax 31 May 2008

1

slide-2
SLIDE 2

Proof-knots

Aim: formulate an algebra of these logical knots

2

slide-3
SLIDE 3

A proof of the drinker’s formula

Axiom A(x0) ⊢ A(x0) Right Weakening A(x0) ⊢ ∀x.A(x), A(x0) Right ⇒ ⊢ A(x0) ⇒ ∀x.A(x), A(x0) Axiom B ⊢ B Left ⇒ (A(x0) ⇒ ∀x.A(x)) ⇒ B ⊢ A(x0), B Left ∀ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ A(x0), B Right ∀ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ ∀x.A(x), B Left Weakening ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B}, A(y)0 ⊢ ∀x.A(x), B Right ⇒ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ A(y)0 ⇒ ∀x.A(x), B Axiom B ⊢ B Left ⇒ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B}, (A(y)0 ⇒ ∀x.A(x)) ⇒ B ⊢ B, B Left ∀ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B}, ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ B, B Contraction ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ B, B Contraction ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ B Right ⇒ ⊢ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⇒ B

3

slide-4
SLIDE 4

Starting point: game semantics

Every proof of formula A initiates a dialogue where Proponent tries to convince Opponent Opponent tries to refute Proponent An interactive approach to logic and programming languages

4

slide-5
SLIDE 5

Duality

Proponent Program plays the game A Opponent Environment plays the game ¬ A Negation permutes the rôles of Proponent and Opponent

5

slide-6
SLIDE 6

Duality

Opponent Environment plays the game ¬ A Proponent Program plays the game A Negation permutes the rôles of Opponent and Proponent

6

slide-7
SLIDE 7

A brief history of games and linear logic

1977 André Joyal A category of games and strategies 1986 Jean-Yves Girard Linear logic 1992 Andreas Blass A semantics of linear logic Samson Abramsky 1994 Radha Jagadeesan A category of history-free strategies Pasquale Malacaria 1994 Martin Hyland A category of innocent strategies Luke Ong A schism between game semantics and linear logic

7

slide-8
SLIDE 8

Sequential game semantics

A proof π alternating sequences of moves A proof π Game semantics: an interleaving semantics of proofs.

8

slide-9
SLIDE 9

An interleaving semantics

The boolean game B: V F q

true

  • false

question

  • Player in red

Opponent in blue

9

slide-10
SLIDE 10

An interleaving semantics

The tensor product of two boolean games B1 et B2:

false2

  • true1
  • q2
  • q1
  • true1
  • false2
  • q1
  • q2
  • 10
slide-11
SLIDE 11

A step towards true concurrency: bend the branches!

false2

  • true1
  • q2
  • q1
  • true1
  • false2
  • q1
  • q2
  • 11
slide-12
SLIDE 12

Asynchronous games: tile the diagram!

V ⊗ F V ⊗ q

false2

q ⊗ F

true1

  • V ⊗ ∗

q2

q ⊗ q

true1

  • false2

∗ ⊗ F

q1

  • q ⊗ ∗

true1

  • q2

∗ ⊗ q

q1

  • false2
  • ∗ ⊗ ∗

q1

  • q2
  • 12
slide-13
SLIDE 13

Asynchronous game semantics

A proof π1 trajectories in asynchronous transition spaces A proof π2 Main result: innocent strategies are positional.

13

slide-14
SLIDE 14

Illustration: the strategy (true ⊗ false)

V ⊗ F V ⊗ q

false2

q ⊗ F

true1

  • V ⊗ ∗

q2

q ⊗ q

true1

  • false2

∗ ⊗ F

q1

  • q ⊗ ∗

true1

  • q2

∗ ⊗ q

q1

  • false2
  • ∗ ⊗ ∗

q1

  • q2
  • Strategies seen as

closure operators

  • n complete lattices

14

slide-15
SLIDE 15

Part 1 The topological nature of negation

At the interface between topology and algebra

15

slide-16
SLIDE 16

Cartesian closed categories

A cartesian category C is closed when there exists a functor ⇒ :

Cop × C

−→

C

and a natural bijection ϕA,B,C :

C(A × B , C)

  • C(A , B ⇒ C)

C B A ×

  • C

B A ⇒

16

slide-17
SLIDE 17

The free cartesian closed category

The objects of the category free-ccc(C) are the formulas A, B ::= X | A × B | A ⇒ B | 1 where X is an object of the category C. The morphisms are the simply-typed λ-terms, modulo βη-conversion.

17

slide-18
SLIDE 18

The simply-typed λ-calculus

Variable x :X ⊢ x :X Abstraction Γ, x :A ⊢ P :B Γ ⊢ λx.P :A ⇒ B Application Γ ⊢ P :A ⇒ B ∆ ⊢ Q :A Γ, ∆ ⊢ PQ :B Weakening Γ ⊢ P :B Γ, x :A ⊢ P :B Contraction Γ, x :A, y :A ⊢ P :B Γ, z :A ⊢ P[x, y ← z] :B Permutation Γ, x :A, y :B, ∆ ⊢ P :C Γ, y :B, x :A, ∆ ⊢ P :C

18

slide-19
SLIDE 19

Proof invariants

Every ccc D induces a proof invariant [−] modulo execution. free-ccc(C)

[−]

D

C

  • Hence the prejudice that proof theory is intrinsically syntactical...

19

slide-20
SLIDE 20

However, a striking similarity with knot invariants

A tortile category is a monoidal category with

B B A A

A A

A A∗ A A∗

braiding twists duality unit duality counit The free tortile category is a category of framed tangles

20

slide-21
SLIDE 21

Knot invariants

Every tortile category D induces a knot invariant free-tortile(C)

[−]

D

C

  • A deep connection between algebra and topology

first noticed by Joyal and Street

21

slide-22
SLIDE 22

Dialogue categories

A symmetric monoidal category C equipped with a functor ¬ :

Cop

−→

C

and a natural bijection ϕA,B,C :

C(A ⊗ B , ¬ C)

  • C(A , ¬ ( B ⊗ C ) )

¬ C B A ⊗

  • ¬

C B A ⊗ 22

slide-23
SLIDE 23

The free dialogue category

The objects of the category free-dialogue(C) are dialogue games constructed by the grammar A, B ::= X | A ⊗ B | ¬A | 1 where X is an object of the category C. The morphisms are total and innocent strategies on dialogue games. As we will see: proofs are 3-dimensional variants of knots...

23

slide-24
SLIDE 24

A presentation of logic by generators and relations

Negation defines a pair of adjoint functors

C

L

Cop

R

  • witnessed by the series of bijection:

C(A, ¬ B)

  • C(B, ¬ A)
  • Cop(¬ A, B)

24

slide-25
SLIDE 25

The 2-dimensional topology of adjunctions

The unit and counit of the adjunction L ⊣ R are depicted as η : Id −→ R ◦ L L R η ε : L ◦ R −→ Id R L ε Opponent move = functor R Proponent move = functor L

25

slide-26
SLIDE 26

A typical proof

L L L L L R R R R R

Reveals the algebraic nature of game semantics

26

slide-27
SLIDE 27

A purely diagrammatic cut elimination

R L

27

slide-28
SLIDE 28

The 2-dimensional dynamic of adjunction

ε η L L

=

L L η ε R R

=

R R

Recovers the usual way to compose strategies in game semantics

28

slide-29
SLIDE 29

Interlude: a combinatorial observation

Fact: there are just as many canonical proofs

2p

  • R

¬ · · · ¬ A ⊢

2q

  • R

¬ · · · ¬ A as there are increasing functions [p] −→ [q] between the ordinals [p] = {0 < 1 < · · · < p − 1} and [q]. This fragment of logic has the same combinatorics as simplices.

29

slide-30
SLIDE 30

The two generators of a monad

Every increasing function is composite of faces and degeneracies: η : [0] ⊢ [1] µ : [2] ⊢ [1] Similarly, every proof is composite of the two generators: η : A ⊢ ¬¬A µ : ¬¬¬¬A ⊢ ¬¬A The unit and multiplication of the double negation monad

30

slide-31
SLIDE 31

The two generators in sequent calculus A ⊢ A

2

A , ¬A ⊢

1

A ⊢ ¬¬A A ⊢ A

6

A , ¬A ⊢

5

¬A ⊢ ¬A

4

¬A , ¬¬A ⊢

3

¬A ⊢ ¬¬¬A

2

¬¬¬¬A , ¬A ⊢

1

¬¬¬¬A ⊢ ¬¬A

31

slide-32
SLIDE 32

The two generators in string diagrams

The unit and multiplication of the monad R ◦ L are depicted as η : Id −→ R ◦ L

L R η

µ : R ◦ L ◦ R ◦ L −→ R ◦ L

L L L R R R µ

32

slide-33
SLIDE 33

Part 2 Tensor and negation

An atomist approach to proof theory

33

slide-34
SLIDE 34

Guiding idea

A proof π : A ⊢ B is a linguistic choreography where Proponent tries to convince Opponent Opponent tries to refute Proponent which we would like to decompose in elementary particles of logic

slide-35
SLIDE 35
slide-36
SLIDE 36

The linear decomposition of the intuitionistic arrow

A ⇒ B = (!A) ⊸ B [1] a proof of A ⊸ B uses its hypothesis A exactly once, [2] a proof of !A is a bag containing an infinite number of proofs of A. Andreas Blass discovered this decomposition as early as 1972...

35

slide-37
SLIDE 37

Four primitive components of logic

[1] the negation ¬ [2] the linear conjunction ⊗ [3] the repetition modality ! [4] the existential quantification ∃ Logic = Data Structure + Duality

36

slide-38
SLIDE 38

Tensor vs. negation

A well-known fact: the continuation monad is strong (¬¬ A) ⊗ B −→ ¬¬ (A ⊗ B) The starting point of the algebraic theory of side effects

37

slide-39
SLIDE 39

Tensor vs. negation

Proofs are generated by a parametric strength κX : ¬ (X ⊗ ¬ A) ⊗ B −→ ¬ (X ⊗ ¬ (A ⊗ B)) which generalizes the usual notion of strong monad : κ : ¬¬ A ⊗ B −→ ¬¬ (A ⊗ B)

38

slide-40
SLIDE 40

Proofs as 3-dimensional string diagrams

The left-to-right proof of the sequent ¬¬A ⊗ ¬¬B ⊢ ¬¬(A ⊗ B) is depicted as

κ+ κ+ ε B A R A B R R L L L 39

slide-41
SLIDE 41

Tensor vs. negation – conjunctive strength

κ+ : R(A LB) C −→ R(A L(B C))

  • R

C

  • A

L B −→ R

  • A

L

  • B

C Linear distributivity in a continuation framework

40

slide-42
SLIDE 42

Tensor vs. negation – disjunctive strength

κ− : L(R(A B) C) −→ A L(R(B) C) L

  • R

C

  • A

B −→

  • A

L

  • R

C B Linear distributivity in a continuation framework

41

slide-43
SLIDE 43

A factorization theorem

The four proofs η, ǫ, κ+ and κ− generate every proof of the logic. Moreover, every such proof X

ǫ

−→ κ+ −→ ǫ −→ ǫ −→

η

−→

η

−→ κ− −→ ǫ −→

η

−→ ǫ −→ κ− −→

η

−→

η

−→ Z factors uniquely as X

κ+

−→ −→

ǫ

−→ −→

η

−→ −→ κ− −→ −→ Z Corollary: two proofs are equal iff they are equal as strategies.

42

slide-44
SLIDE 44

Part 3 Revisiting the negative translation

A rational reconstruction of linear logic

43

slide-45
SLIDE 45

The algebraic point of view (in the style of Boole)

The negated elements of a Heyting algebra form a Boolean algebra.

44

slide-46
SLIDE 46

The algebraic point of view (in the style of Frege)

A double negation monad is commutative iff it is involutive. This amounts to the following diagrammatic equations:

L L R R R R

=

L L R R R R R R L L L L

=

R R L L L L

In that case, the negated elements form a ∗-autonomous category.

45

slide-47
SLIDE 47

The continuation monad is strong

(¬¬A) ⊗ B

lst

−→ ¬¬(A ⊗ B) A ⊗ ¬¬B

rst

−→ ¬¬(A ⊗ B)

46

slide-48
SLIDE 48

The continuation monad is not commutative

There are two canonical morphisms ¬¬A ⊗ ¬¬B ⇒ ¬¬(A ⊗ B) ¬¬A ⊗ ¬¬B −→ ¬¬(A ⊗ B) q q a q a a ¬¬A ⊗ ¬¬B −→ ¬¬(A ⊗ B) q q a q a a Left strict and Right strict and

47

slide-49
SLIDE 49

Asynchronous games

cri

a

  • aR

aL

  • qR

qL

  • aL
  • aR
  • qL
  • qR
  • q
  • Left and

Arena game models extended to propositional linear logic by identi- fying the two strategies — hence mystifying the innocent audience.

48

slide-50
SLIDE 50

Asynchronous games

aie

a

  • aR

aL qR

∼ qL aL

aR qL

  • qR

q

  • Left and

Arena game models extended to propositional linear logic by identi- fying the two strategies — hence mystifying the innocent audience.

49

slide-51
SLIDE 51

Asynchronous games

cri

a

  • aR

∼ aL

  • qR

∼ ∼ qL

  • aL

∼ aR

  • qL

qR

  • q
  • Right and

Arena game models extended to propositional linear logic by identi- fying the two strategies — hence mystifying the innocent audience.

50

slide-52
SLIDE 52

Hence, the schism between games and linear logic

The isomorphism A

  • ¬¬A

means that linear logic is static and a posteriori. Imagine that a discussion is defined by the set of its final states Linear logic originates from a model of PCF

51

slide-53
SLIDE 53

Tensorial logic

tensorial logic = a logic of tensor and negation = linear logic without A ¬¬A = the very essence of polarized logic Offers a synthesis of linear logic, games and continuations Research program: recast every aspect of linear logic in this setting

52

slide-54
SLIDE 54

A lax monoidal structure

Typically, the family of n-ary connectives (A1 · · · An) := ¬ ( ¬A1 ⊗ · · · ⊗ ¬Ak ) := R ( LA1 · · · LAk ) is still associative, but all together, and in the lax sense.

53

slide-55
SLIDE 55

A general phenomenon of adjunctions

Given a 2-monad T and an adjunction

A

L

B

R

  • every lax T-algebraic structure

TB

b

−→ B induces a lax T-algebraic structure TA TL −→ TB

b

−→ B

R

−→ A

54

slide-56
SLIDE 56

A general phenomenon of adjunctions

Consequently, every adjunction with a monoidal category B

A

L

B

R

  • induces a lax action of B on the category A

B × A

B×L

−→

B × B

⊗B

−→

B

R

−→

A

Enscopes the double negation monad and the arrow.

55

slide-57
SLIDE 57

Distributivity laws seen as lax bimodules

The distributivity law R(A LB) C

κ

−→ R(A L(B C)) may be seen as a lax notion of bimodule: (A ⊲ B) ⊳ C −→ A ⊲ (B ⊳ C) A useful extension of the notion of strong monad (case A = ∗)

56

slide-58
SLIDE 58

Part 4 A relaxed notion of Frobenius algebra

After Brian Day and Ross Street

57

slide-59
SLIDE 59

Dialogue categories

A symmetric monoidal category C equipped with a functor ¬ :

Cop

−→

C

and a natural bijection ϕA,B,C :

C(A ⊗ B , ¬ C)

  • C(A , ¬ ( B ⊗ C ) )

¬ C B A ⊗

  • ¬

C B A ⊗ 58

slide-60
SLIDE 60

A coherence law

⊗ φC φB D ¬ C B A ⊗ ⊗ D ¬ C B A ⊗ D ¬ C B A φB⊗C 59

slide-61
SLIDE 61

Frobenius objects

A Frobenius object F is a monoid and a comonoid satisfying

m d

=

m d

=

m d

an alternative formulation of cobordism

60

slide-62
SLIDE 62

Frobenius objects

Equivalently, a Frobenius object F is a monoid equipped with a form u : F −→ I such that the induced morphism

m u

= is the evaluation of a dual pair F ⊣ F.

61

slide-63
SLIDE 63

Lax 2-adjunctions in a Gray category

L L

ε η L L η ε R R

R R

62

slide-64
SLIDE 64

satisfying two coherence properties (a)

η η L L R R

is the identity 3-cell on the unit η of the 2-adjunction L ⊣ R,

63

slide-65
SLIDE 65

satisfying two coherence properties (b)

ε ε L L R R

is the identity 3-cell on the counit ε of the 2-adjunction L ⊣ R.

64

slide-66
SLIDE 66

Pseudo Frobenius objects

A pseudo Frobenius object in the bicategory of modules

m d

  • m

d

  • m

d

is the same thing as a ∗-autonomous category... when the two mod- ules m and e are functors. An observation by Brian Day and Ross Street (2003)

65

slide-67
SLIDE 67

Lax Frobenius objects

Relax the self-duality equivalence

C

  • Cop

into an adjunction

C

L

Cop

R

  • this connects game semantics and quantum groups

66

slide-68
SLIDE 68

Quantum groupoids

A lax monoidal adjunction in the bicategory Comod ( k-Vect ) E

⊥ f∗

  • Vop ⊗ V

f ∗

  • where the pseudomonoids E and Vop ⊗ V and map f are ∗-autonomous.

Vop ⊣ V ⊣ Vop A definition by Brian Day and Ross Street (2003)

67

slide-69
SLIDE 69

Conclusion Logic = Data Structure + Duality

This point of view is accessible thanks to 2-dimensional algebra

68

slide-70
SLIDE 70

Appendix Application to the drinker’s formula

The expressive power of resource modalities

69

slide-71
SLIDE 71

Four primitive components of logic

[1] the negation ¬ [2] the linear conjunction ⊗ [3] the repetition modality ! [4] existential quantification ∃ A theory of witnesses – what remains of intuitionism...

70

slide-72
SLIDE 72

The drinker’s formula

Suppose that you enter in a pub, and that A(x) means that the cus- tomer x drinks. The formula ∃y(A(y) ⇒ ∀xA(x)) says that there exists a customer y (the drinker) such that if y drinks, then everybody drinks in the pub. The formula is valid in classical logic, but not in intuitionistic logic.

71

slide-73
SLIDE 73

The interactive proof of the drinker’s formula

The interactive proof goes like this: (1) Proponent chooses any customer y1, (2a) Opponent looses if he cannot find a customer x which drinks, (2b) Otherwise, Opponent finds a customer x which drinks, and men- tions it to Proponent, (3) Proponent reacts by changing his original witness y1 for y2 = x.

72

slide-74
SLIDE 74

The drinker’s formula

Krivine reformulates the formula ∃y(A(y) ⇒ ∀xA(x)) in the classically equivalent way: ∀B. ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⇒ B.

73

slide-75
SLIDE 75

The formal proof in classical logic

Axiom A(x0) ⊢ A(x0) Right Weakening A(x0) ⊢ ∀x.A(x), A(x0) Right ⇒ ⊢ A(x0) ⇒ ∀x.A(x), A(x0) Axiom B ⊢ B Left ⇒ (A(x0) ⇒ ∀x.A(x)) ⇒ B ⊢ A(x0), B Left ∀ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ A(x0), B Right ∀ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ ∀x.A(x), B Left Weakening ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B}, A(y0) ⊢ ∀x.A(x), B Right ⇒ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ A(y0) ⇒ ∀x.A(x), B Axiom B ⊢ B Left ⇒ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B}, (A(y0) ⇒ ∀x.A(x)) ⇒ B ⊢ B, B Left ∀ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B}, ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ B, B Contraction ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ B, B Contraction ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⊢ B Right ⇒ ⊢ ∀y.{(A(y) ⇒ ∀x.A(x)) ⇒ B} ⇒ B

74

slide-76
SLIDE 76

The classical formula decomposed in tensorial logic

¬ ⊗

  • !

! ¬ B ∃y ⊗

  • !

! ¬ B ⊗

  • !

¬ A(y) ∃x A(x)

75

slide-77
SLIDE 77

An equivalent formula

¬ ! ¬ ∃y ⊗

  • A(y)

¬ ∃x A(x) The repetition modality ! gives an explicit account of the fact that Proponent is allowed to change her witness.

76

slide-78
SLIDE 78

An equivalent formula

¬ ! ¬ ∃y ⊗

  • A(y)

¬ ∃x A(x) The formula explicates the exact rules of the game (and space of logical interaction)

77

slide-79
SLIDE 79

An equivalent formula

¬ ! ¬ ∃y ⊗

  • A(y)

¬ ∃x A(x) The formula is valid in tensorial logic.

78

slide-80
SLIDE 80

The intuitionistic formula decomposed in tensorial logic

∃y ⊗

  • A(y)

¬ ∃x A(x) This formula is not valid in tensorial logic, because Proponent has to choose the witness y immediately – and cannot change its mind later.

79