Parallel operations Episode 8 0 Parallel conjunction and disjunction Free versus strict games The...

Post on 24-Dec-2015

220 views 0 download

Tags:

transcript

Parallel operations

Episode 8

0

• Parallel conjunction and disjunction• Free versus strict games• The law of the excluded middle for parallel disjunction• Resource-consciousness• Differences with linear logic• Parallel quantifiers • DeMorgan’s laws for parallel operations• Evolution trees and evolution sequences

Parallel conjunction and disjunction 8.1

AB and AB are simultaneous (parallel) plays of A and B.

Chess Checkers

⊤ wins in AB iff ⊤ wins in both A and B

⊤ wins in AB iff ⊤ wins in A or B or both

No choice is made, but rather the play proceeds on two “boards”.

Which game is the easiest for the machine to win?8.2

Comparing, by easiness to win, the four games AB, AB, A⊓B, A⊔B:

1 (easiest)

2

3

4 (hardest)

Free versus strict games8.3

Imagine you are playing over the Internet Chess with Xiaoping from China, and Checkers with Rajeev from India. The two adversaries form your environment. Yet they do not even know about each other’s existence, so there is no communication or coordination between them.

YOU

ENVIRONMENTRajeevXiaoping

In the initial position, it is certainly your move as you are white on both boards.

We say that a game is strict iff, in every position, at most one player has legal moves. Not-necessarily-strict games are said to be free. Both Chess and Checkers are strict games, and so are their ⊓,⊔-combinations. On the other hand, the games Chess Checkers and Chess Checkers, as well as most tasks performed in the reallife by computers or humans are properly free.

Free versus strict games8.3

We say that a game is strict iff, in every position, at most one player has legal moves. Not-necessarily-strict games are said to be free. Both Chess and Checkers are strict games, and so are their ⊓,⊔-combinations. On the other hand, the games Chess Checkers and Chess Checkers, as well as most tasks performed in the reallife by computers or humans are properly free.

Imagine you are playing over the Internet Chess with Xiaoping from China, and Checkers with Rajeev from India. The two adversaries form your environment. Yet they do not even know about each other’s existence, so there is no communication or coordination between them.

YOU

ENVIRONMENTRajeevXiaoping

In the initial position, it is certainly your move as you are white on both boards.

But once you make your first move ---say, on the left board --- the picture changes.

The next move could be either Xiaoping’sreply,or your opening move against Rajeev.Both you and Environment have legal moves.

Chess Chess: a really easy game8.4

The copycat (mimicking) strategy wins the game!

Both you and your adversary have legal moves in this position, but it is a good idea to wait till the adversary moves (otherwise he loses because,in Chess, the player who fails to make a move on his turn is consideredto have lost).

Chess Chess: a really easy game8.4

The copycat (mimicking) strategy wins the game!

Now only you have legal moves and you lose if don’t move. Move on the left board by mimicking the adversary’s move on the other board.

Chess Chess: a really easy game8.4

The copycat (mimicking) strategy wins the game!

Again both you and your adversary have legal moves. Wait till the adversary moves (otherwise he loses).

Chess Chess: a really easy game8.4

The copycat (mimicking) strategy wins the game!

Copy the adversary’s move again, and so on.

Chess Chess: a really easy game8.4

The copycat (mimicking) strategy wins the game!

Genarally, the principle AA, unlike A⊔A, is valid in computabilitylogic.

This, however, should not suggest that all classical tautologies retain validity. See next slide.

Resource-counsciusness 8.5

Classical logic is resource-blind: it sees no difference between, say, A and AA. Therefore, the formula A(AA) is a tautology as is AA. Computability logic, on the other hand, is resource-conscious, and in it A is by no means the same as AA or AA. And the principle A(AA), unlike AA, is not valid.

Why does the copycat strategy fail for the following three-board game?

#1 #2 #3

Resource-counsciusness 8.5

Classical logic is resource-blind: it sees no difference between, say, A and AA. Therefore, the formula A(AA) is a tautology as is AA. Computability logic, on the other hand, is resource-conscious, and in it A is by no means the same as AA or AA. And the principle A(AA), unlike AA, is not valid.

Why does the copycat strategy fail for the following three-board game?

#1 #2 #3

Resource-counsciusness 8.5

Classical logic is resource-blind: it sees no difference between, say, A and AA. Therefore, the formula A(AA) is a tautology as is AA. Computability logic, on the other hand, is resource-conscious, and in it A is by no means the same as AA or AA. And the principle A(AA), unlike AA, is not valid.

Why does the copycat strategy fail for the following three-board game?

#1 #2 #3

Resource-counsciusness 8.5

Classical logic is resource-blind: it sees no difference between, say, A and AA. Therefore, the formula A(AA) is a tautology as is AA. Computability logic, on the other hand, is resource-conscious, and in it A is by no means the same as AA or AA. And the principle A(AA), unlike AA, is not valid.

Why does the copycat strategy fail for the following three-board game?

#1 #2 #3

Resource-counsciusness 8.5

Classical logic is resource-blind: it sees no difference between, say, A and AA. Therefore, the formula A(AA) is a tautology as is AA. Computability logic, on the other hand, is resource-conscious, and in it A is by no means the same as AA or AA. And the principle A(AA), unlike AA, is not valid.

Why does the copycat strategy fail for the following three-board game?

#1 #2 #3

Resource-counsciusness 8.5

Classical logic is resource-blind: it sees no difference between, say, A and AA. Therefore, the formula A(AA) is a tautology as is AA. Computability logic, on the other hand, is resource-conscious, and in it A is by no means the same as AA or AA. And the principle A(AA), unlike AA, is not valid.

Why does the copycat strategy fail for the following three-board game?

#1 #2 #3

Resource-counsciusness 8.5

Classical logic is resource-blind: it sees no difference between, say, A and AA. Therefore, the formula A(AA) is a tautology as is AA. Computability logic, on the other hand, is resource-conscious, and in it A is by no means the same as AA or AA. And the principle A(AA), unlike AA, is not valid.

Why does the copycat strategy fail for the following three-board game?

#1 #2 #3

Resource-counsciusness 8.5

Classical logic is resource-blind: it sees no difference between, say, A and AA. Therefore, the formula A(AA) is a tautology as is AA. Computability logic, on the other hand, is resource-conscious, and in it A is by no means the same as AA or AA. And the principle A(AA), unlike AA, is not valid.

Why does the copycat strategy fail for the following three-board game?

#1 #2 #3

Resource-counsciusness 8.5

Classical logic is resource-blind: it sees no difference between, say, A and AA. Therefore, the formula A(AA) is a tautology as is AA. Computability logic, on the other hand, is resource-conscious, and in it A is by no means the same as AA or AA. And the principle A(AA), unlike AA, is not valid.

Why does the copycat strategy fail for the following three-board game?

It is impossible to synchronize #1 with both #2 and #3. Even thoughoriginally #2 and #3 are the same game Chess, they may evolve in different ways and thus generate different runs, one won and one lost.

#1 #2 #3

Differences with linear logic 8.6

#1 #2 #3 #4 #5 #6 #7 #8

The above game can also be easily won using copycat, as long as the right pairsof boards are chosen for mutual synchronization (matching). A failed matching decision:

#1 #2 #3 #4 #5 #6 #7 #8⊤ ⊤ ⊥ ⊥ ⊤⊤⊥⊥

⊤ ⊥ ⊥ ⊤⊥ ⊥⊥

A successful matching decision:

#1 #2 #3 #4 #5 #6 #7 #8

((PP)(PP))((PP)(PP)) is an example of a formula valid incomputability logic but not provable in linear logic or affine logic.

Parallel quantifiers 8.7

Parallel universal quantifier :

xA(x) = A(0) A(1) A(2) A(3) ...

Parallel existential quantifier :

xA(x) = A(0) A(1) A(2) A(3) ...

Fact 8.1. When applied to elementary games (=predicates), the parallel operations again generate elementary games, and coincide with the corresponding classical operations. The parallel operations are thus conservative generalizations of classical operations from predicates to all games. The same is the case for negation .

Formal definitions 8.8

Definition 8.2.

(a) The game A0A1 is defined by:

(b) The game A0A1 is defined by:

(c) The game xA(x) is defined by:

(d) The game xA(x) is defined by:

• LreA0A1 iff every move of starts with 0. or 1. and, for both i{0,1}, i.Lre

Ai.• Wne

A0A1 = ⊤ iff WneA00. =WnA11. = ⊤.

Below and later we use the notation . It means the result of deleting from run all moves except those that start with string , and then further deleting the prefix in the remaining moves. Example: 1.0, 2.1, 1.1.21. = 0, 1.2.

• LreA0A1 iff every move of starts with 0. or 1. and, for both i{0,1}, i.Lre

Ai.• Wne

A0A1 = ⊥ iff WneA00. =WnA11. = ⊥.

• LrexA(x) iff every move of starts with c. for some c{0,1,2,...} and, for

each such c, c.LreA(c).

• WnexA(x) = ⊤ iff, for all constants c, Wne

A(c) c. = ⊤.

• LrexA(x) iff every move of starts with c. for some c{0,1,2,...} and, for

each such c, c.LreA(c).

• WnexA(x) = ⊥ iff, for all constants c, Wne

A(c) c. = ⊥.

DeMorgan’s laws for parallel operations 8.9

Thus, as seen from Definition 8.2, a player makes move in the ith component of a parallel combination of games by prefixing with “i.”. Any other moves are considered illegal.

Notice also the perfect symmetry between and , and , ⊤ and ⊥. Therefore, just as for the choice operations, DeMorgan’s laws hold:

(A B) = A B A B = (A B)

(A B) = A B A B = (A B)

xA = xA xA = xA

xA = xA xA = xA

Game trees for parallel combinations 8.10.a

Such trees tend to be very big. As an example, let us see the game trees for AB and AB, where A = p⊔q and B = r⊓(s⊔t)(p,q,r,s,t{⊤,⊥})

A

p q

B

r ⊥

s t

0 1

0 1

0 1

AB⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Game trees for parallel combinations 8.10.a

Such trees tend to be very big. As an example, let us see the game trees for AB and AB, where A = p⊔q and B = r⊓(s⊔t)(p,q,r,s,t{⊤,⊥})

A

p q

B

r ⊥

s t

0 1

0 1

0 1

AB⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Game trees for parallel combinations 8.10.a

Such trees tend to be very big. As an example, let us see the game trees for AB and AB, where A = p⊔q and B = r⊓(s⊔t)(p,q,r,s,t{⊤,⊥})

A

p q

B

r ⊥

s t

0 1

0 1

0 1

AB⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p q ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Game trees for parallel combinations 8.10.a

Such trees tend to be very big. As an example, let us see the game trees for AB and AB, where A = p⊔q and B = r⊓(s⊔t)(p,q,r,s,t{⊤,⊥})

A

p q

B

r ⊥

s t

0 1

0 1

0 1

AB⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Game trees for parallel combinations 8.10.b

Such trees tend to be very big. As an example, let us see the game trees for AB and AB, where A = p⊔q and B = r⊓(s⊔t)(p,q,r,s,t{⊤,⊥})

A

p q

B

r ⊥

s t

0 1

0 1

0 1

AB⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Game trees for parallel combinations 8.10.b

Such trees tend to be very big. As an example, let us see the game trees for AB and AB, where A = p⊔q and B = r⊓(s⊔t)(p,q,r,s,t{⊤,⊥})

A

p q

B

r

s t

0 1

0 1

0 1

AB⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

⊥ ⊤

Game trees for parallel combinations 8.10.b

Such trees tend to be very big. As an example, let us see the game trees for AB and AB, where A = p⊔q and B = r⊓(s⊔t)(p,q,r,s,t{⊤,⊥})

A

p q

B

r

s t

0 1

0 1

0 1

AB⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ r ⊥⊥

pr p

ps pt

qr q

qs qt

pr qr p q s t

ps pt qs qt ps qs pt qt

⊥ ⊤

Evolution trees 8.11

r ⊥

s t

0 1

0 1

0 1

⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Drawing evolution trees may be another helpful visualization method. The evolution tree for a game G is obtained from the game tree for G through replacing in it every node (position) by the game G to which G has “evolved” in position .

p q

Evolution trees 8.11

p

r ⊥

s t

0 1

0 1

0 1

⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Drawing evolution trees may be another helpful visualization method. The evolution tree for a game G is obtained from the game tree for G through replacing in it every node (position) by the game G to which G has “evolved” in position .

q

Evolution trees 8.11

p r ⊥

s t

0 1

0 1

0 1

⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Drawing evolution trees may be another helpful visualization method. The evolution tree for a game G is obtained from the game tree for G through replacing in it every node (position) by the game G to which G has “evolved” in position .

q

p⊔q

Evolution trees 8.11

p

⊤ 0 1

0 1

0 1

⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Drawing evolution trees may be another helpful visualization method. The evolution tree for a game G is obtained from the game tree for G through replacing in it every node (position) by the game G to which G has “evolved” in position .

q

p⊔q

s t

s⊔tr

Evolution trees 8.11

p 0 1

0 1

0 1

⊥⊤

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Drawing evolution trees may be another helpful visualization method. The evolution tree for a game G is obtained from the game tree for G through replacing in it every node (position) by the game G to which G has “evolved” in position .

q

p⊔q

s t

s⊔t

r⊓(s⊔t)

r

Evolution trees 8.11

p 0 1

0 1

0 1

(p⊔q)(r⊓(s⊔t))

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p⊤ q⊤ ⊥r ⊥⊥

pr p⊥

ps pt

qr q⊥

qs qt

pr qr p⊥ q⊥ ⊥s ⊥t

ps pt qs qt ps qs pt qt

Drawing evolution trees may be another helpful visualization method. The evolution tree for a game G is obtained from the game tree for G through replacing in it every node (position) by the game G to which G has “evolved” in position .

q

p⊔q

s t

s⊔t

r⊓(s⊔t)

r

Evolution trees8.11

p 0 1

0 1

0 1

(p⊔q)(r⊓(s⊔t))

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

Drawing evolution trees may be another helpful visualization method. The evolution tree for a game G is obtained from the game tree for G through replacing in it every node (position) by the game G to which G has “evolved” in position .

q

p⊔q

s t

s⊔t

r⊓(s⊔t)

r

p(r⊓(s⊔t)) q(r⊓(s⊔t)) (p⊔q)r (p⊔q)(s⊔t)

pr p(s⊔t) qr q(s⊔t) pr qr p(s⊔t) q(s⊔t) (p⊔q)s (p⊔q)t

ps pt qs qr ps pt qs qt ps qs pt qt

Similarly for instead of

Evolution sequences8.12

(p⊔q)(r⊓(s⊔t))

0.0 0.1 1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

1.0 1.1

0.0 0.1

1.0 1.1 1.0 1.1 0.0 0.1 0.0 0.1

0.1 1.00.0 1.1

p(r⊓(s⊔t)) q(r⊓(s⊔t)) (p⊔q)r (p⊔q)(s⊔t)

pr p(s⊔t) qr q(s⊔t) pr qr p(s⊔t) q(s⊔t) (p⊔q)s (p⊔q)t

ps pt qs qr ps pt qs qt ps qs pt qt

Each legal run induces an evolution sequence --- the sequence of the games from the corresponding branch of the evolution tree.

Evolution sequences8.12

(p⊔q)(r⊓(s⊔t))

0.1

1.1

1.0

q(r⊓(s⊔t))

q(s⊔t)

qs

Each legal run induces an evolution sequence --- the sequence of the games from the corresponding branch of the evolution tree.

Evolution sequences8.12

(p⊔q)(r⊓(s⊔t))

q(r⊓(s⊔t))

q(s⊔t)

qs

Each legal run induces an evolution sequence --- the sequence of the games from the corresponding branch of the evolution tree.

Evolution sequences8.12

Each legal run induces an evolution sequence --- the sequence of the games from the corresponding branch of the evolution tree.

Let us see the evolution sequence induced by the run 1.7, 0.7, 0.49, 1.49 for the

game ⊔x⊓y(yx2) ⊓x⊔y(y=x2).

0.

Position Game Move

⊔x⊓y(yx2) ⊓x⊔y(y=x2)

4. 4972 49=721.7, 0.7, 0.49, 1.49

1.7

1. ⊔x⊓y(yx2) ⊔y(y=72)1.7 0.7

2. ⊓y(y72) ⊔y(y=72)1.7, 0.7 0.49

3. 4972 ⊔y(y=72)1.7, 0.7, 0.49 1.49

The run hits ⊤, so the machine wins.

Evolution sequences for parallel quantification8.13

In a similar way can visualize - and -games as infinite - and -combinations.

Position Game x(Odd(x)⊔Odd(x))

x6(Odd(x)⊔Odd(x)) Odd(7) x8(Odd(x)⊔Odd(x))7.1

Who is the winner? Machine

Move Game x(Odd(x)⊔Odd(x))0.0

Odd(0) x1( Odd(x)⊔Odd(x))

Who is the winner in this infinite run? Machine

1.1

Odd(0) Odd(1) x2( Odd(x)⊔Odd(x))2.0

Odd(0) Odd(1) Odd(2) x3( Odd(x)⊔Odd(x))3.1

Odd(0) Odd(1) Odd(2) Odd(3) x4( Odd(x)⊔Odd(x))4.0... ...Are there any (legal) finite runs of this game won by the machine? No