Fully Abstract Models of the Probabilistic λ -calculus

We compare three models of the probabilistic λ -calculus: the probabilistic Böhm trees of Leventis, the probabilistic concurrent games of Winskel et al., and the weighted relational model of Ehrhard et al. Probabilistic Böhm trees and probabilistic strategies are shown to be related by a precise correspondence theorem , in the spirit of existing work for the pure λ -calculus. Using Leventis’ theorem (probabilistic Böhm trees characterise observational equivalence), we derive a full abstraction result for the games model. Then, we relate probabilistic strategies to the weighted relational model, using an interpretation-preserving functor from the former to the latter. We obtain that the relational model is also fully abstract.


Introduction
The interest in probabilistic programs in recent years, driven in particular by applications in machine learning and statistical modelling, has triggered the need for theoretical foundations, going beyond the pioneering work of Kozen [14] and Saheb-Djahromi [21].Although a variety of approaches exist, we focus on the probabilistic λ-calculus Λ + , which extends the pure (untyped) λ-calculus with a probabilistic choice operator.The extension is natural and applications are quick to arise -see for instance [3].But in order for Λ + to become a useful formal model for probabilistic computation, the extensive classical theory of the λ-calculus must be readapted.
Among the existing research in this direction, we are especially interested in the work of Ehrhard, Pagani and Tasson [11], and of Leventis [16,17].In [11], the authors define an operational semantics for Λ + and study a model in the category of probabilistic coherence spaces, an existing model [9] of Probabilistic PCF.They prove an adequacy theorem for Λ + , and this result also applies to the weighted relational model, of which probabilistic coherence spaces are a refinement.

Syntax
The set Λ + of terms of the probabilistic λ-calculus is defined by the following grammar, where p ranges over the interval [0, 1] and x over an infinite set Var: Write Λ + 0 for the set of closed terms, i.e. those with no free variables.The operator + p represents probabilistic choice, so that a term of the form M + p N has two possible reduction steps: to M , with probability p, and to N , with probability 1 − p. Accordingly, the reduction relation we consider is a Markov process over the set Λ + , and corresponds to a probabilistic variant of the standard head-reduction.It is defined inductively: For M, N ∈ Λ + , there may be many reduction paths from M to N .The weight of a path π : M p1 − → . . .pn −→ N is the product of the transition probabilities: w(π) = n i=1 p i .The probability of M reducing to N is then defined as Pr(M → N ) = π:M → * N w(π).
The normal forms for this reduction are terms of the form λx 0 . . .x n−1 .y M 0 . . .M k−1 , where n, k ∈ N and M i ∈ Λ + for all i.Such terms are called head-normal forms (hnfs).A pure λ-term has at most one hnf called -if it exists -its hnf, though of course, this does not hold in the presence of probabilities.
Given a set H of hnfs, we set Pr(M → H) = H∈H Pr(M → H).The probability of convergence of a term M , denoted Pr ⇓ (M ), is the probability of M reducing to some hnf: Pr ⇓ (M ) = Pr(M → {H ∈ Λ + | H hnf}). Finally we say that two terms M and N are observationally equivalent, written M = obs N , if for all contexts C[ ], Pr ⇓ (C[M ]) = Pr ⇓ (C[N ]).

Infinitely extensional Böhm trees for pure λ-terms
There are several notions of infinite normal forms for pure λ-terms, including e.g. the Böhm trees [2] and the Lévy-Longo trees, among others.The normal forms for the probabilistic λ-terms considered in this paper build on the infinitely extensional Böhm trees (also called Nakajima trees), which provide a notion of infinitely η-expanded normal form.
The infinitely extensional Böhm tree of M is in general an infinite tree, which can be defined as the limit of a sequence of finite-depth approximants.In fact those approximants will suffice for the purposes of this paper: given a λ-term M and d ∈ N, the tree BT d (M ) is ⊥ if d = 0 or if M has no head-normal form, and In order to deal with issues of α-renaming, we adopt the same convention as Leventis [16], whereby the infinite sequence of abstracted variables at the root of a tree of depth d > 0 is labelled x d 0 , x d 1 , . . .so that any tree is determined by the pair (y, (T n ) n∈N ) of its head variable and sequence of subtrees.

Leventis' probabilistic trees
Infinitely extensional Böhm trees for the λ-calculus have striking properties: they characterise observational equivalence of terms, and as a model they yield the maximal consistent sensible λ-theory (see [2] for details).In his PhD thesis, Leventis [16] proposes a notion of probabilistic Böhm tree which plays the same role for Λ + .Intuitively, because a term of We can then assign trees to individual terms: Definition 2. Given M ∈ Λ + and d ∈ N, its probabilistic Böhm tree of depth d is the tree PT d (M ) ∈ PT d defined as follows: where for any hnf H = λz 0 . . .z n−1 .yP 0 . . .P k−1 , the value tree of depth d of H is defined as Consider for example the term M 1 = λxy.x(y + 1 3 (λz.z)),a head-normal form.Figure 1a outlines the first steps in the construction of its value tree of depth d, for some fixed d ≥ 2; note that we use the symbol δ t to denote the distribution in which t has probability 1, and all other trees 0.
Infinitely extensional probabilistic Böhm trees precisely characterise observational equivalence in Λ + ; writing M = PT N if for every d ∈ N, PT d (M ) = PT d (N ), we have: Theorem 3 (Leventis [16]).For any M, N ∈ Λ + , M = obs N if and only if M = PT N .
So infinitely extensional probabilistic Böhm trees provide a fully abstract interpretation of the probabilistic λ-calculus.We will see now that similar trees arise as probabilistic strategies when interpreting λ-terms in a denotational games model.

Strategies and event structures
Moving towards our game semantics of Λ + , we will first introduce our probabilistic strategies as a more economical, syntax-free presentation of probabilistic Böhm trees.The usual correspondence between Böhm trees and innocent strategies [12,13] is thus naturally extended to the probabilistic and nondeterministic case.
First, we notice that the precise name given to variables in e.g. Figure 1a does not matter.Techniques like De Bruijn levels or indices do not apply here since we abstract infinitely many variables at each level -however, a variable occurrence is uniquely identified by a pointer to the node where it was abstracted, along with a number n, expressing that the variable where VT d−1 (x d l ) (for l ∈ N) and VT d−1 (λz.z) are ) . . .
) . . .and so on.⊕ 0  was the (n + 1)-th introduced at this node.For example, the variable x d 0 is expressed with a pointed to the initial node, along with number 0. As a consequence of this representation, we can omit the abstractions: at each node, there are always countably many variables being introduced, and their name does not matter as they will be referred to differently.
Next, we split each node of the Böhm tree into two: first a node intuitively carrying the abstractions (the target of pointers -we refer to these nodes as negative), and one carrying the variable occurrence (the source of pointers -we refer to those as positive).Besides bringing us closer to games, this allows us to easily distinguish the two kinds of branching of probabilistic Böhm trees.The different arguments of a variable node form a negative branching: each comes with its own (implicit) distinct set of fresh variables, and a subtree (by convention, we annotate by n the negative node corresponding to the nth argument).In contrast, for a probabilistic choice such as 1  3 1a, the two subtrees start by defining the same variables -so instead we represent this using a positive branching, where we further annotate the first node of each branch with its probability.
Altogether, and ignoring the wiggly line for now, the reader may check that the diagram of Figure 1b matches the Böhm tree of Figure 1a according to these conventions (the correspondence will be made formal in Section 4).Read from top to bottom, these diagrams have an interactive flavour: they describe the actions of a player ⊕ depending on those of its opponent .Our formalisation in terms of strategies will follow this intuition.

Probabilistic Böhm trees as probabilistic event structures
Now, we formalise the representation introduced above as a probabilistic strategy in the sense of [24], i.e. a form of probabilistic event structure.In this section we only provide this as a static representation, and leave the mechanism to compose strategies for Section 3. Our strategies (such as the one of Figure 1b) involve a partial order: the dependency relation (going from top to bottom); a relation indicating conflict and generated by probabilistic choice; and an annotation for probabilities.These are naturally formalised as probabilistic concurrent strategies [24] (though for the purposes of this paper we will only make use of sequential such strategies).We first recall the definition of event structures.C S L 2 0 1 8

16:6
Fully Abstract Models of the Probabilistic λ-calculus Definition 4.An event structure [22] is a tuple (E, ≤, Con) where E is a set of events, ≤ a partial order indicating causal dependency, and Con a non-empty set of consistent finite subsets of E, such that The event structures we consider additionally have a polarity function pol : E → {+, −} indicating for each event whether it is a move of Player (+) or Opponent (−).We call them event structures with polarity (esps).
We fix some notation.Write e e for immediate causality, i.e. e < e with no events in between.Write C(E) for the set of finite configurations of E, i.e. those finite x ⊆ E such that x ∈ Con and x is down-closed: if e ≤ e ∈ x then e ∈ x.If E has polarity, we sometimes annotate an event e to specify its polarity, as in e + , e − .If x, y ∈ C(E), write x ⊆ + y (resp. x ⊆ − y) if x ⊆ y and every event in y \ x has positive (resp.negative) polarity.
Ignoring probabilities and pointers, the diagram of Figure 1b is an esp: ≤ is the transitive reflexive closure of , and consistent sets are those finite sets whose down-closure do not contain two events related by the immediate conflict . We now equip esps with probabilities, which comes in the form of a [0, 1]-valued function called a valuation.
For the forest-like event structures required to represent probabilistic λ-terms, it suffices to fix, for each Opponent event, a probability distribution on the Player events that immediately follow, as in Figure 1b.But to compose them we apply the more general machinery of [24], where valuations assign a coefficient to each configuration and not simply to each event.For x ∈ C(E), the coefficient v(x) is the probability that the configuration x will be reached in an execution, provided the Opponent moves in x occur.The following definition is from [24]: Definition 5. A probabilistic event structure with polarity consists of an esp (E, ≤ , Con, pol) and a valuation, that is, a map v : where I ranges over non-empty subsets of {1, . . ., n} such that i∈I x i is a configuration.
Leaving aside pointers the diagram of Figure 1b represents a probabilistic esp, setting the valuation of a configuration x to be 1 3 (resp. 23 ) if it contains the event annotated with 1 3 (resp. 23 ), and 1 otherwise -a configuration cannot contain both labelled events.Probabilistic strategies are certain probabilistic esps, equipped with a labelling map into the game they play on.Games are themselves esps, with the following particular shape:

P. Clairambault and H. Paquet 16:7
Usually in game semantics, arenas represent types.For our untyped language, strategies representing terms all play on a universal arena U , introduced soon.For now though, we define a probabilistic strategy playing on arbitrary arena A as an esp, labelled by A. Definition 7. A probabilistic strategy on A consists of a probabilistic esp S, and a labelling function σ : S → A on events, preserving polarity, and such that: (1) σ preserves configurations: for every x ∈ C(S), σx ∈ C(A); (2) σ is locally injective: if s, s ∈ x ∈ C(S) and σs = σs , then s = s ; (3) σ is receptive: 1) and ( 2) express that σ is a map of event structures from S to A. Conditions (3) and ( 4) are there to restrict the behaviour of Player: they prevent any further constraints from being put on Opponent events than those already specified by the game.
The diagram of Figure 1b presents a probabilistic strategy σ : S → A -or more precisely the diagram presents S, with the pointers being representations of the immediate dependency in A of positive moves (though we do not display A for lack of space).
Winskel [24], building on previous work [20], showed how to compose probabilistic strategies and organise them into a category.But his games are affine, and cannot deal with the replication of resources.In recent work [5], we have extended probabilistic strategies with symmetry, that augments the expressivity of esps by allowing interchangeable copies of the same event.In the next section we introduce probabilistic strategies with symmetry, and give the interpretation of Λ + .Because of this replication of resources the interpretation of the term M 1 of Figure 1 will be an expansion of Figure 1b, taking into account Opponent's replications -and in general, our correspondence theorem will associate a probabilistic Böhm tree with its expansion in that sense, formulated as a probabilistic strategy.

3
Game semantics for Λ + In this section we construct our game semantics for Λ + .The category of games we use is close to our earlier concurrent games model of probabilistic PCF [5], in which we introduce a universal arena inspired from [13].

Games and strategies with symmetry
Symmetry in event structures [23] can be presented via isomorphism families: Definition 8.An isomorphism family on an event structure E is a set E of bijections between configurations of E, such that: E contains all identity bijections, and is closed under composition and inverse of bijections.For every θ : For every θ : x ∼ = y ∈ E and every extension x ⊆ x ∈ C(E), there exists a (non-necessarily unique) y ⊆ y ∈ C(E) and an extension θ ⊆ θ such that θ : x ∼ = y ∈ E.
As usual [23], it follows from these axioms that any θ ∈ E is an order-isomorphism, i.e. preserves and reflects the order.An event structure with symmetry is a pair (E, E), with E an isomorphism family on E. If E has polarity, then we ask that every θ ∈ E preserves it, and call (E, E) an event structure with symmetry and polarity (essp).

C S L 2 0 1 8 16:8 Fully Abstract Models of the Probabilistic λ-calculus
We illustrate this definition by presenting as an essp the universal arena -the game that Λ + strategies will play on.It is an infinitely deep tree, with at every level, ω available moves, corresponding to calls from one of the players to a variable in context.There are ω 'symmetric' copies of each move.Formally: Definition 9.The esp (U, ≤, Con, pol) is defined as having: events: U = (N × N) * , finite sequences of ordered pairs; causality: s ≤ t if s is a prefix of t; consistency: no conflicts, Con = P fin (U ); In a pair (m, n) ∈ N × N, m represents the variable address (the subscript in Figure 1b) and n is the copy index of the move (not displayed in Figure 1b).
We now add symmetry to U , following the intuition that different copies of the same move should be interchangeable.The isomorphism family U is generated by an equivalence relation ∼ on events, defined as the smallest equivalence relation satisfying s ∼ s =⇒ s • (m, n) ∼ s • (m, n ) for any s, s ∈ U and m, n, n ∈ N.Then, a bijection θ : x ∼ = y between configurations of U is in U whenever for all e ∈ x, e ∼ θ(e).
The elements of U are reindexing bijections, which may update the copy indices of moves in a configuration.In the sequel, we will identify strategies differing only by the choice of positive copy indices, hence we need to formally identify the bijections in U which do not affect Opponent's copy indices.Because of the dual nature of games we must do the same for Player; thus we define ∼ + and ∼ − to be the smallest equivalence relations on U satisfying: for any s, s , m, n, n .Just like ∼ generates U , the relations ∼ + and ∼ − generate isomorphism families U + and U − , respectively.
In general, the compositional mechanism will require all arenas to come with similar data: Definition 10.A ∼-arena is a tuple A = (A, A, A − , A + ) with A an arena, and A, A − , and A + isomorphism families on A, such that A − and A + are subsets of A; if θ ∈ A − ∩ A + then θ is an identity bijection; if θ ∈ A − and θ ⊆ − θ ∈ A then θ ∈ A − (where the notation ⊆ − makes sense since bijections preserve polarity); if θ ∈ A + and θ ⊆ + θ ∈ A then θ ∈ A + .In particular, ∼-arenas are certain thin concurrent games, in the terminology of [7,8].

The category PG
We now define a category with objects the ∼-arenas, and morphisms probabilistic ∼-strategies.
Let us first define some constructions on games: if A is a ∼-arena, its dual A ⊥ is the ∼-arena obtained by reversing the polarity of events in A, and swapping the positive and negative isomorphism families.If A and B are ∼-arenas, their parallel composition A B is the tuple (A B, A B, A − B − , A + B + ), where A B is the esp with events A + B (the tagged disjoint union), componentwise causal dependency and polarity, and consistent sets those of the form X A X B for X A ∈ Con A and X B ∈ Con B ; and where the parallel composition A B of isomorphism families A and B comprises bijections of the form θ : = y A and θ B : x B ∼ = y B in the component iso families.Note that we will often make use of the parallel composition i∈I A i of a family of ∼-arenas; it is defined analogously.
With that in place, a probabilistic ∼-strategy from A to B is a probabilistic ∼strategy on the ∼-arena A ⊥ B. Given σ : S → A ⊥ B and τ : T → B ⊥ C, we can form their interaction as the pullback in the category of event structures with symmetry (and without polarity).The interaction is probabilistic: ), and likewise for (Π 2 x) T .The resulting map τ σ : T S → A B C is not quite a probabilistic ∼-strategy, because σ and τ play on dual versions of B, making ambiguous the polarity of some events.
So as in [20,6], the composition of S and T is obtained after hiding those moves of the interaction which act as synchronisation events -the moves e ∈ T S such that (τ σ)e = (2, b) for some b ∈ B. The remaining set of events (so-called visible) induces an event structure T S with all structure inherited from T S, and polarity induced from A ⊥ C. Any configuration x ∈ C(T S) has a unique witness [x] ∈ C(T S).The isomorphism family T S comprises bijections θ : x ∼ = y such that there is θ : [x] ∼ = [y] in T S with θ ⊆ θ .We get a map τ σ : T S → A ⊥ C which satisfies all the conditions for a probabilistic ∼-strategy, with v T S (x) = v T S ([x]) for every x ∈ C(T S).

Copycat
As usual in game semantics, the identity morphism on a ∼-arena A will be a probabilistic ∼-strategy cc A : C C A → A ⊥ A called copycat, in which Player deterministically copies the behaviour of Opponent -so any Opponent move immediately triggers the corresponding Player move in the dual game, with probability 1. Formally, C C A has the same events, polarity, and consistent subsets as A ⊥ A and the extra immediate causal dependencies Copycat has an isomorphism family C C A which we do not define here for lack of space (it can be found e.g. in [8]).Together with the valuation v C C A (x) = 1 for all x ∈ C(C C A ), this turns copycat into a probabilistic ∼-strategy.
Recall that strategies are considered up to weak isomorphism (Definition 13).Doing so crucially relies on the thinness axiom on strategies, which implies [8] that weak isomorphism is stable under composition, so that we may perform a quotient and retain a well-defined notion of composition.Though identity and associativity laws for strategies only hold up to isomorphism, the quotient will turn them into strict equalities.So as in [5], we have: Lemma 14.There is a category PG having objects: ∼-arenas morphisms A + → B: weak isomorphism classes of probabilistic ∼-strategies on A ⊥ B.

Categorical structure
PG itself is a compact closed category, but we are interested in the subcategory PG − , where ∼-arenas and strategies are negative (that is, all initial moves are negative), and strategies are moreover well-threaded (meaning that events in S depend on a unique initial move).Finally there is a linear exponential comonad [18] ! on PG − .Given A ∈ PG − , the ∼-arena !A is an expanded version of A with countably many copies of every move.Accordingly, the esp !A is simply i∈ω A, and the bijections in !A are those θ : i∈I x i ∼ = j∈J y j such that there exists a permutation π : I ∼ = J and bijections θ i ∈ A with θ((i, a)) = (πi, θ i a) for all (i, a) ∈ i∈I x i .Recall that A is negative, so the set !A + of positive bijections (those in which only Player moves are reindexed) comprises those θ ∈ !A for which I = J and π : I → J is the identity function, and such that each θ i ∈ A + .On the other hand, bijections in !A − can consist of any π : I ∼ = J, so long as θ i ∈ A − for all i.
We leave out all further details of the categorical structure of PG − , including the various constructions on morphisms.It can be shown that PG − , together with the data above, is a model of Intuitionistic Linear Logic.From here it is standard that the Kleisli category for ! is a ccc: → B is the evaluation morphism.

Interpretation of Λ +
We finally come to our interpretation of Λ + terms as probabilistic strategies.We start by imposing one key new condition on strategies: sequential innocence.The cut-down model will be closer to the language, allowing us to prove a correspondence result in Section 4. We assume from now on that all strategies are negative and well-threaded: Definition 16.A probabilistic ∼-strategy σ : S → A is sequential innocent if a subset X ⊆ S is a configuration if and only if it is an Opponent-branching tree (that is, causality is tree-shaped and if a b and a c in X then pol(a) = +) and σX ∈ C(A); for every x, y, z ∈ C(S) such that x = y ∩ z and y ∪ z ∈ C(S), either v(x) = 0 or Less formally, innocence forces the independence (causal and probabilistic) of Opponentforking branches of the strategy.Sequential innocent probabilistic ∼-strategies are closed under composition, stable under weak isomorphism, and copycat verifies all conditions, so we can consider the subcategory PG si ! of PG !consisting of those strategies.It is easy to check that PG si ! is still a ccc; it is the category we will use to interpret Λ + , and in what follows we refer to PG si !-strategies simply as Λ + -strategies.

A reflexive object
Recall the ∼-arena U defined in 3.1.It is a reflexive object, meaning that there are maps λ ∈ PG si !(U ⇒ U, U) and app ∈ PG si !(U, U ⇒ U) such that app λ = id U ⇒U .It is easy to see that there is an isomorphism of essps ρ : U ∼ = U ⇒ U. To turn this into a isomorphism is PG si !, we can lift it to a copycat-like strategy which "plays following ρ".Details of this lifting are omitted but can be found in [8].
Closed terms of the probabilistic λ-calculus are interpreted as probabilistic strategies on U. Open terms M with free variables in Γ are interpreted as Λ + -strategies M Γ : U Γ + → U, where U Γ = ˘x∈Γ U.The interpretation of the λ-calculus constructions is standard, using that U is a reflexive object in a ccc: In order to give an interpretation to the probabilistic choice operator, we must define the sum of two strategies.Let σ : S → (U Γ ) ⊥ U and τ : T → (U Γ ) ⊥ U be Λ + -strategies, and let p ∈ [0, 1].The essp S + p T has a unique initial Opponent move (as do S and T -wlog call this move ε), and continues as either S or T non-deterministically.That is, it has events C S L 2 0 1 8

16:12
Fully Abstract Models of the Probabilistic λ-calculus {ε} (S \ {ε}) (T \ {ε}), and all structure induced from S and T , with X ∈ Con S+pT iff X ∈ Con S or X ∈ Con T .We define v S+pT (x) to be 1 if x = ∅, {ε}, pv S (x) if x ∈ C(S), and (1 − p)v T (x) if x ∈ C(T ).The obvious map σ + p τ : S + p T → (U Γ ) ⊥ U is a Λ + -strategy, and the interpretation of the syntactic + p is simply M + p N Γ = M Γ + p N Γ .We have: Theorem 17 (Adequacy).For any M ∈ Λ + 0 , writing σ : S → U for M , we have where x + is the set of positive events of x.
We only state the result at this point; it will follow directly from the interpretation-preserving functor of Section 5 and the adequacy of the weighted relational model for Λ + .A direct corollary of Theorem 17 is the following soundness result: In fact we will prove in Section 5 that the converse, full abstraction, also holds modulo a mild (effective) quotient.It will also follow that the weighted relational model itself is also fully abstract, which was open.These facts rely on Leventis' result [16] along with the formal correspondence between strategies and Böhm trees, to which we now move on.

4
The Correspondence Theorem In [13], the authors prove an exact correspondence theorem for the pure λ-calculus: infinitely extensional Böhm trees precisely correspond to deterministic innocent strategies on a universal arena.They work in a different games framework, but the analogous phenomenon occurs in ours (the main technical difference, if we were to conduct the proof in the deterministic case, would be the explicit duplication of moves: our strategies are expanded, in order to accommodate Opponent's choice of copy index for every move).For Λ + however, the correspondence is not so exact: although terms M and M + p M have the same probabilistic Böhm tree, they have different interpretations in PG si !, where each probabilistic choice is recorded as an explicit branching point. 2 In what follows, we identify a class of Böhm tree-like probabilistic strategies for which the exact correspondence does hold, and we show that any strategy can be reduced to a Böhm tree-like one.Two strategies can then be considered equivalent if they reduce to the same.
First, given a Λ + -strategy σ : S → U, define a relation ≈ on the events of S as the smallest equivalence relation such that if s 1 ≈ s 1 , s 1 s 2 , s 1 s 2 and there is an order-isomorphism Informally, ≈ identifies events coming from the same syntactic construct in two copies of a term in an idempotent probabilistic sum, as in M + p M (where Opponent has played the same copy indices).Definition 19.We say σ is Böhm tree-like if it satisfies (1) for every x ∈ C(S), v S (x) > 0; and (2) for every s, s ∈ S, if s ≈ s then s = s .
In other words, a Böhm tree-like strategy is one with no redundant branches.Many Λ + -strategies do not satisfy this property, but all can be reduced to one that does: Definition 20.Given a Λ + -strategy σ : S → U, let S bt be the set of ≈-equivalence classes containing at least one event s such that v S ([s]) > 0 (where [s] is the down-closure of s).
It is direct to turn S bt into an essp S bt with structure induced by S. The (partial) quotient map f : S → S bt is then used to push-forward the valuation, i.e.
We can now make formal the connection between Λ + -strategies and probabilistic Böhm trees.To do so we define a bijective map from the set of Böhm tree-like Λ + -strategies of depth d on (U Γ ) ⊥ U, to the set PT We can show by induction on d: Lemma 22.For every d ∈ N and every Γ ⊆ fin Var there is a bijection Proof (sketch).In Section 2.3, we motivated the definition of probabilistic strategies via a geometric correspondence with probabilistic Böhm trees, to be expected in the light of standard definability results in game semantics.However, probabilistic strategies differ from the picture of Section 2.3 due to the necessity for Player to acknowledge Opponent's replications, spawning countably many symmetric copies of branches starting with an Opponent move.It follows however from the axioms of symmetry that events differing only by Opponent's choice of copy indices have isomorphic futures.One can, with no loss of information, focus on a sub-strategy where Opponent performs no duplication, and apply the correspondence explained in Section 2.3.
We now show that this bijection preserves the interpretation of Λ + .

Theorem 23 (Correspondence theorem). For any
, where M d is the maximal sub-strategy of M with depth ≤ d.

Proof (sketch).
The proof is by induction on d, and follows a similar argument as in the non-probabilistic case [13], with the additional difficulty of dealing with infinite width: a probabilistic Böhm tree may be a probability distribution with infinite support, and the first level of Player moves in a probabilistic strategy may be infinite.One must therefore consider finite-width approximations.
Probabilistic strategies are traditionally ordered using a probabilistic version of the prefix order: given σ : S → A and τ : T → A we say σ τ if S ⊆ T (i.e. S ⊆ T and all data is inherited), and for all x ∈ C(S), v S (x) ≤ v T (x).However the naive restriction of this order to the set of Böhm tree-like strategies is not sensible, because σ τ does not imply σ bt τ bt .An alternative is given by Leventis [16, p. 111 Under the set PT d Γ is a cpo, and we also call the corresponding order on the set of Böhm tree-like strategies (this automatically makes Ψ d Γ a continuous bijection).Leventis proves the crucial property that for every term M there is a chain t 0 , t 1 , . . . of finite-width trees satisfying PT d (M ) = t i .Replaying his argument in our game semantics, we show that the chain Ψ Using the correspondence it follows easily that: Theorem 25 (Full abstraction).The model PG si !/ = bt is fully abstract, i.e.M = obs N if and only if M = bt N .

Weighted Relational Semantics
In this final section, we consider the weighted relational model of Λ + .It lives in the category PRel !whose objects are sets and whose morphisms are certain matrices with coefficients in the set R + = R + ∪ {∞}.This interpretation of probabilistic λ-terms was first suggested in [11], where authors consider the category PCoh ! of probabilistic coherence spaces, a refinement (using biorthogonality) of the model PRel !presented here.PCoh ! has desirable properties (notably, all coefficients are finite) but because there is a faithful functor PCoh !→ PRel !preserving the interpretation of Λ + , all the results of [11] hold for the simpler model PRel !, which we focus on in this paper and proceed to define.

The weighted relational model of Λ +
We use the notation PRel ! to indicate that the model is obtained as the Kleisli category for a comonad !, much like PG ! .The underlying category PRel is a well-known model of intuitionistic linear logic (see e.g.[15]), but we skip its construction and give a direct presentation of PRel !: Definition 26.The category PRel ! is defined as follows: objects: sets; for every m ∈ M f (X) and c ∈ Z. identity: for any set X, and for any m ∈ M f (X) and a ∈ X, define

Relational collapse
We now connect the two models via a functor ↓ : PG si !→ PRel !, which intuitively forgets the causal information in a strategy, only remembering the states reached during the execution.
If (E, E) is an event structure with symmetry, write ∼ = for the equivalence relation on C(E) defined as x ∼ = y if and only if there is θ : x ∼ = y in E. For A an arbitrary negative ∼-arena, the set ↓ A is then defined as the quotient {x ∈ C(A) | x non-empty}/ ∼ =.
For any A, B, there is a bijection ↓(A ⇒ B) M f (↓ A)×↓ B, enabling morphisms of PG si

Conclusion
An immediate corollary of Theorem 31 is that the probabilistic coherence space model of [11] is fully abstract, since PCoh ! and PRel !induce the same equational theory on Λ + terms.Interestingly, the results of this paper should further entail that the interpretation of Λ + in the simpler model of Danos and Harmer [10] is also fully abstract, since one can in C S L 2 0 1 8

16:16
Fully Abstract Models of the Probabilistic λ-calculus principle map our strategies functorially to theirs.Note however that since it is not known how to state a notion of probabilistic innocence in Danos and Harmer's model, definability fails and the present work could not have been carried out there.
So using probabilistic concurrent games, we obtain probabilistic analogues of wellestablished results from the theory of the pure λ-calculus: the correspondence between Böhm trees and innocent strategies [13], and the full abstraction property of the relational model [4].

C S L 2 0 1 8 16: 4 FullyDefinition 1 .
Abstract Models of the Probabilistic λ-calculus the form λx 0 . . .x n−1 .zP 0 . . .P k−1 + p λy 0 . . .y m−1 .wQ 0 . . .Q l−1 has two hnfs, it may be represented by a probability distribution over trees of the form of that above.Accordingly, two different kinds of trees are considered: value trees, representing head-normal forms (without probability distribution at top-level), and probabilistic Böhm trees, representing general terms: For each d ∈ N, the sets PT d of probabilistic Böhm trees of depth d and VT d of value trees of depth d are defined as:

( a )
As a value tree of depth d ≥ 2.
As a probabilistic strategy.

9 ( 3 )Definition 13 .
Strategies are in turn equipped with symmetry: Definition 12.A probabilistic essp is an essp S with a valuation v : C(S) → [0, 1], such that for every θ : x ∼ = y in S, v(x) = v(y).A probabilistic ∼-strategy on a ∼-arena A consists of a probabilistic essp S, and a labelling σ : S → A, such that:(1) the underlying map σ : S → A is a strategy;(2) σ preserves symmetry: if θ :x ∼ = y ∈ S then σθ : σx ∼ = σy defined as {(σ s, σ s ) | (s, s ) ∈ θ}, is in A (that is, it is a map of essps (S, S) → (A, A)); σ is ∼-receptive: if θ ∈ S and σθ ⊆ − ψ ∈ A, there is a unique θ ⊆ θ ∈ S s.t.σθ = ψ.(4) S is thin: for θ : x ∼ = y in S with x ⊆ + x∪{s}, there is a unique t ∈ S s.t.θ∪{(s, t)} ∈ S. Finally, before we define our category of games and strategies with symmetry, let us say what it means for strategies to be the same up to Player copy indices: Probabilistic ∼-strategies σ : S → A and τ : T → A are weakly isomorphic if there is an isomorphism of essps ϕ : S → T , such that for any x ∈ C(S), v S (x) = v T (ϕx), and moreover the diagram S σ ϕ / / T τ } } A commutes up to positive symmetry, in the sense that for any x ∈ C(S), the set {(σe, τ (ϕe)) | e ∈ x} is (the graph of) a bijection in A + .
Let A and B be objects of PG − .Their tensor product A ⊗ B is simply defined as A B. The tensorial unit is the empty ∼-arena, and moreover the tensor is closed: the function space A B has events those of ( min(B) A ⊥ ) B with same polarity.The causal dependency is induced, with extra causal links {((2, b), (1, (b, a))) | b ∈ min(B), a ∈ A}.The function χ : (A B) → A ⊥ B defined as (1, (b, a)) → (1, a) and (2, b) → (2, b) allows us to characterise consistent sets and iso families concisely: Con A B is defined as the largest set making χ a map of esps, and an order-isomorphism θ between configurations of A B is in A B iff χθ ∈ A ⊥ B. PG − also has cartesian products, with A & B defined as A B, only with consistent sets restricted to those of A ∅ and ∅ B. The rest of the structure, including symmetry, is induced from A B by restriction.

Lemma 15 .
There is a cartesian closed category PG − !having objects: negative ∼-arenas morphisms A + → B: (weak isomorphism classes of) negative and well-threaded probabilistic ∼-strategies on !A ⊥ B. With a slight abuse of notation, we shall keep using for composition in the Kleisli category PG − ! .We use the following notations for the cartesian closed structure: A ⇒ B is the function space !A B, cur is the bijection PG − !(A & B, C) ∼ = PG − !(A, B ⇒ C), and ev A,B : (A ⇒ B) & A + Γ d of probabilistic Böhm trees of depth d with free variables in Γ.Let us say first what we mean by the depth of a strategy: Definition 21.The depth of a Λ + -strategy σ : S → U, depth(σ), is the maximum number of Player moves in a chain s 0 • • • s n in S, and ∞ if such chains have unbounded length.

PRelM
id X (m, a) = 1 if m = [a] ! is cartesian closed, with X & Y = X Y and X ⇒ Y = M f (X) × Y .There is a reflexive object D in PRel !, supporting the interpretation of Λ + , and defined as the least fixed point of the operation mapping X to the set M f (X)(ω) of quasi-finite sequences of finite multisets over X, i.e. with all but finitely many elements equal to [ ]. Concretely, D is the lub of the chain D 0 , D 1 , . . .where D 0 = ∅ and D i+1 = M f (D i ) (ω) for all i.It is the case that D ∼ = D ⇒ D; the set-theoretical bijection and its lifting to a PRel !isomorphism can be found in[11].Terms of Λ + are interpreted in the standard way, withM + p N Γ PRel !(d) = p M Γ PRel !(d)+ (1 − p) N ΓPRel !(d) for every d ∈ D. We have:Theorem 27 (Adequacy[11]).For any M ∈ Λ + 0 , the map M PRel !: D → R + satisfiesPr ⇓ (M ) =d∈D2 PRel !(d).

!
to be mapped to those of PRel !: if σ : S → !A ⇒ B is a Λ + -strategy and x ∈ ↓(A ⇒ B) (so x is an equivalence class of configurations), the set of witnesses of x is defined as wit S (x) = {z ∈ C(S) | σz ∈ x and the maximal moves of z have polarity +}/ ∼ = .Because v S is invariant under symmetry, we can transport σ to ↓ σ :↓(A ⇒ B) → R + via ↓ σ(x) = z∈wit S (x) v S (z)for each x ∈ ↓(A ⇒ B).One can then easily deduce from the deadlock-free lemma of[5]:Lemma 28.↓ is a functor PG si !→ PRel !.Furthermore, ↓ preserves the interpretation of Λ + terms and is well-defined on the quotiented model PG si !/ = bt :Lemma 29.↓ U ∼ = D and up to this iso, for anyM ∈ Λ + we have ↓ M PG si != M PRel ! .Lemma 30.If σ = bt τ then ↓ σ = ↓ τ .Combining the previous two lemmas and the soundness theorem, we finally get:Theorem 31 (Full abstraction).For any M, N ∈ Λ + with free variables in Γ , M = obs N if and only if M PRel != N PRel ! .

C S L 2 0 1 8 16:14 Fully Abstract Models of the Probabilistic λ-calculus
], who defines an order on the set