Lecture 18: PCF Böhm trees, Innocent strategies, Hyland-Ong Games
Lecture 18
NB: this term is not allowed
Exercise: Show that any real PCF term reduces to a some (infinite) Böhm tree.
⟹ Infinite Böhm trees are
NB: so
Typing rules:
First goal: Compile PCF Btrees into “strategies” written using the following vocabulary:
The vocabulary will consist of moves of the form
with the convention that
: Opponent (O) : Player (P)
and
- If
is O for , then is a P for - If
is P for , then is a O for
NB: this is reminiscient of values of
+ an equipement of pointers from P moves back to O moves
cf. picture
Innocent Strategies
Innocent strategies: between memoryless ones and those retaining complete history.
Warmup Example:
Kierstead (student of Curry (who was working on higher-order recursive functions)) terms:
From now on,
cf. picture
We will define a cartesian closed category of Hyland-Ong Games.
-
Morphisms = innocent strategies
Two equivalent forms:
-
meager (set of views):
-
where Opponent moves point to their direct Player parent move
-
composition via abstract machines
-
-
fat (set of plays)
- composition is defined in one line
NB: it’s similar to what we had with sequential algorithms: meager (AM) vs. fat (abstract algorithms)
-
Example: cf. picture
Kierstead applied to
Arenas (HO)
An arena is given by
where
stands for the moves-
- if
, then is an O - if
, then and are of opposite polarities
- if
Cartesian Product
where
Function Space
And the rules are the same as the ones of the product, except the intial rules:
Strategies (morphisms in our category)
A play is an alternating sequence of moves in
- if
points to for , then
(cf. picture)
- A strategy:
-
is a set
of even-length plays closed under even prefixes
NB: definition by Russ Harmer. It is very practical for non-determinism.
- A strategy
is deterministic: -
if moreover: whenever
, where the ’s point in , it comes that
Innocent strategies
- A strategy
of is called innocent (Hyland Ong (HO)): -
if for all
(ranging over plays of ):where the view of a play is defined as:
Exercise: When we had the interaction
- A view:
-
is a sequence
such that
Meager strategies
Given an innocent strategy
Prop:
is injective.
Innocent strategies can be composed in two ways:
- either as strategies (parallel composition + hiding)
- or as meager strategies (abstract machines)
Parallel composition
Let
be a strategy of be a strategy of
Then we define
NB:
- Hiding: because the everything related to
has been kept private (hidden) in the final result -
Parallel composition: because
and are obtained from the same - This definition works even without determinism nor innocence, but the equivalence with meager strategies holds only when we have innocence
Next time:
-
give a precise definition of the compilation from PCF Böhm trees to innocent strategies
-
Suggest: the characterisation of the image of this compilation (which is injective: two different Böhm tress give rise to different strategies)
-
Well-parenthesisation: exclude
catch
andor_tester
-
How to interpret some imperative features in the setting of HO games (imperative features ⟶ non-innocent strategies)
Leave a comment