Lecture 15: Realisability, $PoLR_!$ not fully abstract

Lecture 15

\[Φ = (x_1: u^1: A_1, …, x_n: u^n: A_n)\\ \underline Φ = (x_1: A_1, …, x_n: A_n)\] \[a ∈ \vert [A] \vert \\ \vert a \vert^A ⊆ \lbrace M \; \mid \; ⊢ M: A \rbrace\\ u^0 ∈ \vert ! [A] \vert\\ \underbrace{\vert u^0 \vert^A}_{= \bigcap_{a ∈ u^0} \vert a \vert^A} ⊆ \lbrace M \; \mid \; ⊢ M: A\rbrace\] \[\vert ζ \vert^ι = \lbrace M \; \mid \; ⊢ M \, β_{wh} \underline 0 \rbrace\\ \vert \overline{suc}(u^0) \vert^ι = \lbrace M \; \mid \; ⊢ M: ι \qquad M \, β_{wh}^\ast \underline {suc} (N), N ∈ \vert u^0 \vert^ι_! \rbrace\\ \vert (u^0, b) \vert^{A → B} = \lbrace M \; \mid \; ⊢ M: A → B \quad ∀ N ∈ \vert u^0 \vert^A_!, (M)N ∈ \vert b \vert^B\rbrace\]

Lemma 1: $⊢ M: A$ and $⊢ M’:A$

If \(M \, β_{wh}^\ast \, M' ∈ \vert a \vert^A\)

then \(M ∈ \vert a \vert^A\)

(if $M \, β_{wh}^\ast \, M’ ∈ \vert u^0 \vert^A_!$, then $M ∈ \vert u^0 \vert^A_!$)

Lemma: if $a ≤_{[A]} a’$, then \(\vert a \vert^A \supseteq \vert a' \vert^A\)

(and if $u^0 ≤_{![A]} u^1$ then $\vert u^0 \vert^A_! \supseteq \vert u^1 \vert^A_!$)

Th: if \(\overbrace{x_1: u^1 : A_1, …, x_n: u^n : A_n}^{Φ} ⊢ M: a : A\)

then for all $N_1, …, N_n$ such that $∀i, \quad N_i ∈ \vert u^i \vert^{A_i}_!$ (so $⊢ N_i: A_i$) then

\[M[N_i/x_i]_i ∈ \vert a \vert^A\]

Proof: By induction on the derivation of the first sequent (cf. picture).


Consequences:

  • if $⊢ M : ι$ and $[M] ≠ ∅$, then $M$ is $β_{wh}$-normalizable.
    • in particular: if $ζ ∈ [M]$, $M \, β_{wh}^\ast \, \underline 0$
  • if $M \sim_β \underline 0$, then $M \; β_{wh}^\ast \; \underline 0$

    • so weak head reduction is sufficient for computing integers (if you get a successor of “something”, you iteratively reiterate on this “something”)
  • if $⊢ M: A$ and $⊢ M’: A$, we want to define a notion of syntactic equivalence between $M$ and $M’$. But there’s a catch: consider

    \[λx^ι. x \qquad λx^ι. if(x, \underline 0, z. \underline{suc} (z))\]

    They compute the identity, but $M \not \sim_β M’$. Good notion of equivalence:

    \[M \sim_{obs} M' \qquad \text{ if } ∀ P, ⊢ P: A → ι\\ (P)M \; β_{wh}^\ast \; \underline 0 ⟺ (P)M' \; β_{wh}^\ast \; \underline 0\]

    NB: we could have replace zero by 42, or by “it terminates”, it would have led to the same notion

  • $\sim_{obs}$ is an eq. relation
  • \[\sim_β ⊆ \sim_{obs}\]
  • \[\sim_{obs} \not ⊆ \sim_β\]

Th: if $[M] = [M’]$, then $M \sim_{obs} M’$

Proof: Assume $[M] = [M’]$. Let $P$ st

\[⊢ P: A → ι\]

Assume that

\[P(M) \; β_{wh}^\ast \; \underline 0\]

Then

\[[P(M)] = [\underline 0] = [ζ]\] \[[P] ∈ PoLR_!([A], [ι])\] \[[P(M)] = Fun ([P]) ([M]) = Fun ([P]) ([M']) = [(P)M'] \ni ζ\]

So

\[(P)M' \; β_{wh}^\ast \; \underline 0\]

and

\[M \sim_{obs} M'\]

Spectrum of equivalence relations:

\[\sim_β \quad ⊆ \quad \sim_{Scott} \quad ⊆ \quad \sim_{obs}\]

A model $ℳ$ of LPCF is fully abstract if $\sim_ℳ = \sim_{obs}$, where

\[M \sim_ℳ M' \text{ if } [M]^ℳ = [M']^ℳ\]

$PoLR_!$ is not fully abstract

Th: $PoLR_!$ is not fully abstract.

\[⊢ M: (ι → ι → ι) → ι\]

such that

\[M \sim_{obs} Ω^{(ι → ι → ι) → ι}\]

where

\[Ω^A = fix \; x^A. x \; β_{wh} \; x[Ω/x] = Ω\\ [Ω^ι] = ∅\]

Parallel-or taster (it tests if a program is a parallel or function):

\[M \; ≝ \; λf^{ι → ι → ι}. if ((f) \, \underline 0 \, Ω^ι, if ((f) \, Ω^ι \, \underline 0, if ((f) \, \underline 1 \, \underline 1, Ω, z. \underline 0), Ω), Ω)\]

Actually

\[t ∈ PoLR_!([ι] ⇒ [ι] ⇒ [ι]) ≃ PoC([ι] \& [ι], [ι])\]

then

\[[M] (t) = \lbrace ζ\rbrace \\ t (\lbrace ζ\rbrace, ∅) = \lbrace ζ\rbrace\\ t (∅, \lbrace ζ\rbrace) = \lbrace ζ\rbrace\\ t (\lbrace \overline {suc} ( \lbrace ζ \rbrace), \overline {suc} ( \lbrace ζ \rbrace)\rbrace) ≠ \lbrace ζ\rbrace, Ω\]

For example (parallel or):

\[t = \lbrace (u^0, v^0, a) \; \mid \; \begin{cases} ζ ∈ u^0 \text{ or } ζ ∈ v^0 \text{ and } a = ζ\\ \overline {suc} (∅) ∈ u^0 \text{ and } \overline {suc} (∅) ∈ v^0 \text{ and } a = \overline {suc} (∅)\\ \end{cases} \rbrace\]

So

\[M \not\sim_{Scott} Ω^{(ι → ι → ι) → ι}\]

(because it differs when applying to $t$)

So there are “aliens” in the model: parallel or doesn’t exist in the syntax, the model “believes” it does (with $t$).

To show that $M \sim_{obs} Ω^{(ι → ι → ι) → ι}$: resort to coherence space, where you can show that $[M]^{coh} = ∅$


Why $[Ω] = ∅$?

You want to prove that there exists an $a$ such that $⊢ fix \, x^A. x: a : A$.

\[\infer{⊢ fix \, x^A. x: a : A}{ \infer{x: u^0: A ⊢ x: a : A}{ ∃ a' ∈ u^0 \quad a ≤_{[A]} a'} & ∀ b ∈ u^0 ⊢ fix \, x^A. x: b : A }\]

So we need to show that $⊢ fix \, x^A. x: b : A$, and so on…



Exercise 3

$a = \overline{suc}(v^0)$

\[\infer{⊢ \underbrace{fix \, x^ι. \underline{suc}(x)}_{M}: a : ι}{ \infer{x: u^0: ι ⊢ suc(x): a: ι}{ \infer{∀ c ∈ v^0 \quad x:u^0: ι ⊢ x: c}{ \overbrace{∃ d ∈ u^0 \quad c ≤_{[ι]} d}^{v^0 ≤_{![ι]} u^0} } } & ∀ b ∈ u^0 \quad ⊢ M: b: ι }\]

So $v^0 ≤_{![ι]} u^0$.

\[a ∈ [M] ⟺ ⊢ M: a: ι ⟺ a = \overline{suc} (v^0) \quad ∀ c ∈ v^0, ∃ b ∈ [M], c ≤_{[ι]} b\] \[ℱ: \begin{cases} ℐ([ι]) &⟶ ℐ([ι]) \\ u &⟼ \lbrace \overline{suc}(v^0) \; \mid \; ∀ c ∈ v^0, ∃ b ∈ u, c ≤ b \rbrace \end{cases}\] \[u(0) = ∅\\ u(n+1) = ℱ(u(n))\\ [M] = \bigcup_{n=0}^∞ u(n)\]

$[M]$ is the least set (as defined before) st: if $a ∈ [M]$, then \(a = \overline {suc} (v^0)\)

with

\[∀ c ∈ v^0, ∃ b ∈ [M], c ≤ b\]

So $ζ \not ∈ [M]$ (it’s not a successor), but

\[\overline{suc}(∅) ∈ [M]\\ a ∈ \overline{suc}(\lbrace \overline{suc}(∅), \overline{suc}(\lbrace suc(∅) \rbrace) \rbrace)\]
\[\infer{⊢ \underbrace{λx^ι. if (x, Ω^ι, z. \underline 0)}_{M}: (u^0, b): ι → ι}{ \infer{x: u^0: ι ⊢ if (x, Ω^ι, z. \underline 0): b: ι }{ \infer{x: u^0: ι ⊢ x: suc(v^0): ι}{ \infer{∃ a ∈ u^0 \quad a ≥ \overline{suc}(v^0)}{ & } } & \overbrace{x: v^0: ι ⊢ \underline 0: b : ι}^{b \, = \, ζ \text{ (no constraint on } v^0 \text{)}} } }\] \[(u^0, b) ∈ [M] ⟺ b = ζ ∧ ∃ a ∈ u^0; a = \overline{suc}(w^0) \text{ for some } w^0\]

By substituting $x$ for $\underline 0$:

\[\infer{⊢ \underbrace{λx^ι. if (x, Ω^ι, z. x)}_{M}: (u^0, b): ι → ι}{ \infer{x: u^0: ι ⊢ if (x, Ω^ι, z. x): b: ι }{ \infer{x: u^0: ι ⊢ x: suc(v^0): ι}{ \infer{∃ a ∈ u^0 \quad a ≥ \overline{suc}(v^0)}{ & } } & \infer{x: v^0: ι ⊢ x: b : ι}{ ∃ b' ∈ v^0 \quad b ≤_{[ι]} b' } } }\]

So

$(u^0, b) ∈ [M]$ if $∃ a ∈ u^0; ∃ v^0;$

\[a ≥ suc(v^0)\]
  • $∃ b’ ∈ v^0 \quad b ≤_{[ι]} b’$
  • $a = suc(w^0)$
  • $w^0 ≥_{![ι]} v^0$
  • so there exists $b’’ ≥ b’$ such that $b’’ ∈ w^0 ≥ v^0 \ni b’$

all this is equivalent to

\[∃ w^0; suc(w^0) ∈ u^0 \text{ and } ∃ b'' ∈ w^0; b ≤ b''\]

Leave a comment