THE HERBRAND FUNCTIONAL INTERPRETATION OF THE DOUBLE NEGATION SHIFT

arXiv:1410.4353v1 [cs.LO] 16 Oct 2014
THE HERBRAND FUNCTIONAL INTERPRETATION
OF THE DOUBLE NEGATION SHIFT
´ AND PAULO OLIVA
MART´IN ESCARDO
Abstract. This paper considers a generalisation of selection functions over an arbiT
trary strong monad T , as functions of type JR
X = (X → R) → T X. It is assumed
T
throughout that R is a T -algebra. We show that JR
is also a strong monad, and that it
embeds into the continuation monad KR X = (X → R) → R. We use this to derive that
the explicitly controlled product of T -selection functions is definable from the explicitly
controlled product of quantifiers. We then prove several properties of this product in the
special case when T is the finite power set monad Pf (·). These are used to show that
when T X = Pf (X) the explicitly controlled product of T -selection functions calculates a
witness to the Herbrand functional interpretation of the double negation shift, and hence
countable choice.
§1. Introduction. G¨
odel’s functional or Dialectica interpretation was introduced in [7] as a reduction of first order arithmetic to the “finitistic” quantifierfree calculus of primitive recursive functionals (system T). Soon after G¨odel’s
paper appeared in print, Spector [12] showed how G¨odel’s interpretation of arithmetic could be extended to analysis by extending system T with what he called
bar recursion. By analysis we mean classical arithmetic in all finite types extended with countable choice and dependent choice – and hence comprehension.
Spector’s original work has given rise to several other bar recursive interpretations of analysis, whereby different proof interpretations other than the Dialetica
interpretation have been used. In such cases one was either able to continue using Spector’s original form of bar recursion (e.g. [6, 9]) or some variant of bar
recursion was proposed (e.g. [1, 2]).
As we have shown in [4, 5], there are close connections between the different
forms of bar recursion and the calculation of optimal strategies in a general class
of sequential games. This was achieved by showing that bar recursion turns
out to correspond to the iterated product of quantifiers and selection functions.
Spector’s original bar recursion can be shown to be equivalent to the iterated
product of quantifiers, whereas the restricted form needed to witness the Dialectica interpretation of DNS is equivalent to the iterated product of selection
functions.
This analogy between computability and games is based on the modelling of
players via quantifiers KR X = (X → R) → R. If X is the set of move available
to a players, and R is the set of possible outcomes, then mappings of type X → R
can be seen as describing the context a player lives in. Such contexts (a form of
Received by the editors Preprint, October 17, 2014.
1
2
´ AND PAULO OLIVA
MART´IN ESCARDO
continuation) describe the final outcome for each of the possible choices of the
player. Hence, to specify a player is to describe her preferred outcomes for each
given game context. Similarly, a selection function JR X = (X → R) → X also
takes a game context as input, but determines the optimal move for any given
game context.
In this paper we consider the iterated product of selection functions which are
T
parametrised by an arbitrary strong monad T X, i.e. JR
X = (X → R) → T X.
Using the intuition that an element of a monad T X provides “information” about
concrete elements of X, and the correspondence with games, we can view such
T
selection functions JR
X as specifying some information about the optimal move
for any given game context.
We study the (parametrised) bar recursion that arises from the iterated prodT
uct of such T -selection functions. Our first step is to show that JR
X is also a
strong monad. Since any strong monad embeds into the continuation monad,
T
it follows that we have an embedding of JR
X into KX. We make use of this
embedding to show that the iterated product of T -selection functions is in fact
primitive recursively definable from the iterated product of quantifiers, i.e. Spector’s original bar recursion.
Finally, we consider the particular case when T X is the finite power set monad
Pf (X). We prove several properties of the iterated product of selection functions
(X → R) → Pf (X), and show how it provides a witness for the Herbrand
functional interpretation [14] of double-negation shift DNS
∀nN ¬¬A(n) → ¬¬∀nN A(n)
and hence countable choice and number comprehension. As usual, our construction also straightforwardly extends to dependent choice, though we do not give
the details in this paper.
1.1. Heyting arithmetic in all finite types, and bar induction. We
work in the setting of Heyting arithmetic in all finite types, with full extensionality. This corresponds to the system E-HAω of [13]. When carrying out the
verification of the Herbrand functional interpretation of DNS we will make free
use of classical logic, in order to simplify the verification of the bar-recursive construction, hence will be working on E-PAω . Although it is well-known that full
extensionality is not normally interpreted by the functional interpretations, we
are simply assuming full extensionality in the verification of our interpretation,
which is obviously harmless.
On top of E-HAω , in the proofs of Lemmas 3.2 and 3.3 will make use of the
following form of bar induction:
Definition 1.1 (Bar induction). Let P (s) be a universal formula. We say
that bar induction holds for P (s) if the following implication holds: If
• P (s) whenever ω(s+ ) < |s|, and
• P (s) whenever ∀xP (s ∗ x)
then P (h i).
This form of bar induction implicitly assumes that the bar condition ω(s+ ) <
|s| eventually holds. This is indeed the case in all models of Spector’s bar recursion.
THE HERBRAND FUNCTIONAL INTERPRETATIONOF THE DOUBLE NEGATION SHIFT3
The quantifier-free part of the theories E-HAω and E-PAω is normally referred
to as G¨
odel’s system T. Although in T one normally only assumes the natural
numbers N as basic types, and function space constructions X → Y as the
only type constructor, in our case it will be helpful to work with extensions
e.g. containing products X × Y , finite sequences X ∗ , and even finite power sets
Pf (X). To improve readability we will also index the types of a finite or infinite
sequence as follows. Rather than working with the type N → X, we normally
use Πi∈N Xi to improve the type-checking of our constructions. Similarly, finite
sequences X ∗ can be more clearly marked as Σm Πi<m Xi . This simple use of
dependent types can be easily avoided when all Xi ’s are the same.
1.2. Strong monads. In this section we recall the basic notions about strong
monads needed in this paper. Throughout the paper we work in G¨odel’s system
T. Hence, X, Y and R should be viewed as finite types1 .
Definition 1.2 (Strong monad). Let T be a meta-level unary operation on
simple types, that we will call a type operator. A type operator T is called a
strong monad if we have a family of closed terms
ηX : X → T X
(·)† : (X → T Y ) → (T X → T Y )
satisfying (provably in T) the laws
(i) (ηX )† = idT X
(ii) g † ◦ ηY = g
(iii) (g † ◦ f )† = g † ◦ f †
where g : Y → T R and f : X → T Y .
Monads have been extensively studied in category theory [8] and more recently
in the functional programming community [10]. In a monad one would normally
have a non-uniform mapping from f : X → T Y to f † : T X → T Y . The term
“strong” here refers to the assumption that we have a uniform map (·)† : (X →
T Y ) → (T X → T Y ).
Definition 1.3 (T -algebra). Given a strong monad T , a type R is called a
T -algebra if we have a family of maps (·)∗ : (X → R) → (T X → R) satisfying
(i) g ∗ ◦ ηY = g
(ii) (g ∗ ◦ f )∗ = g ∗ ◦ f †
where g : S
Y → R and fS
: X → T Y . For any T -algebra R we can
S define the
mapping : T R → R as = (idR )∗ , and e.g. one can easily show ◦ ηR = idR .
Given f : X → Y let T f : T X → T Y be T f = (ηY ◦ f )† . As a warm up let us
consider the following property, which we will later need in the proof of Lemma
3.3.
Lemma 1.4. If f : X → Y and g : Y → X are such that g ◦ f = idX then
T g ◦ T f = idT X .
1 It will be clear, however, that what we describe would work more generally in any of the
well-known models of higher-order computability.
4
´ AND PAULO OLIVA
MART´IN ESCARDO
Proof. Let (∗) refer to the assumption g ◦ f = idX . We calculate as follows:
Tg ◦ Tf
(ηX ◦ g)† ◦ (ηY ◦ f )†
=
D1.2(iii)
((ηX ◦ g)† ◦ ηY ◦ f )†
=
D1.2(ii)
=
(ηX ◦ g ◦ f )†
(∗)
(ηX ◦ idX )†
=
(ηX )†
=
D1.2(i)
=
idT X ,
where the two unlabelled steps follows by the definition of T and the basic
property of the identity functional, respectively.
⊣
The reason we focus here on strong monads is that on such monads we can
define a binary product operation as follows:
Lemma 1.5. For any strong monad T we can define a product operation
⊗ : T X × (X → T Y ) → T (X × Y )
as
a ⊗ f = (λx.(λy.ηX×Y (x, y))† (f x))† (a)
(1)
satisfying, for q : X × Y → T R,
q † (a ⊗ f ) = (λx.(qx )† (f x))† (a)
In the case when q : X × Y → R and R is a T -algebra it satisfies
q ∗ (a ⊗ f ) = (λx.(qx )∗ (f x))∗ (a).
Proof. We calculate as follows:
q † (a ⊗ f )
(1)
=
q † ((λx.(λy.ηX×Y (x, y))† (f x))† (a))
(◦)
(q † ◦ (λx.(λy.ηX×Y (x, y))† (f x))† )(a)
=
D1.2(iii)
=
(q † ◦ (λx.(λy.ηX×Y (x, y))† (f x)))† (a)
(◦)
=
(λx.q † ((λy.ηX×Y (x, y))† (f x)))† (a)
(◦)
(λx.((q † ◦ (λy.ηX×Y (x, y))† )(f x)))† (a)
=
D1.2(iii)
=
(◦)
=
D1.2(ii)
=
(λx.((q † ◦ (λy.ηX×Y (x, y)))† (f x)))† (a)
(λx.((λy.q † (ηX×Y (x, y)))† (f x)))† (a)
(λx.(qx )† (f x))† (a).
In the case q : X × Y → R and R is a T -algebra we use properties (i) and (ii) of
Definition 1.3 instead.
⊣
THE HERBRAND FUNCTIONAL INTERPRETATIONOF THE DOUBLE NEGATION SHIFT5
§2. T -Selection Functions. In the following two sections we assume that
T is a strong monad, and that R is a T -algebra.
T
Definition 2.1 (T -selection functions). Let JR
X = (X → R) → T X, where
T
R is a T -algebra. The elements of the type JR X will be called T -selection functions.
Under the assumptions that T is a strong monad and that R is a T -algebra,
T
that JR
is also a strong monad.
T
Lemma 2.2. JR
is a strong monad, and its product operation can be explicitly
described in terms of the product operation on T as follows:
(2)
(ε ⊗ δ)(q) = a ⊗ f
where q : X × Y → R, ε : (X → R) → T X and δ : X → (Y → R) → T Y , and
f (x)
TY
δx (qx )
a
TX
ε(λxX .(qx )∗ (f x)).
=
=
Note that ⊗ on the right side of (2) denotes the product on the strong monad
T
T whereas ⊗ on the left denotes the product of the strong monad JR
. We will
in general use the same notation ⊗ for the product of any strong monad, as it
will hopefully be clear from the context which monad we are referring to.
T
T
Definition 2.3 (from JR
to KR ). Given a T -selection function ε : JR
X we
can construct a quantifier ε : KR X as
R
ε(pX→R ) = p∗ (εp).
The following lemma was first proven in [4] for the case when T is the identity
monad. We show here that in fact this holds for an arbitrary strong monad T
and T -algebra R.
T
T
Lemma 2.4. Given ε : JR
X and δ : X → JR
Y then
(ε ⊗ δ) = ε ⊗ (λx.δx )
with the
T
JR
-product
on the left and the KR -product on the right side.
Proof. We calculate as follows:
D2.3
(ε ⊗ δ)(q)
=
q ∗ ((ε ⊗ δ)(q))
L2.2
=
q ∗ (a ⊗ f )
L1.5
=
(λx.(qx )∗ (f x))∗ (a)
Def(a)
(λx.(qx )∗ (f x))∗ (ε(p))
Def(p)
p∗ (ε(p))
=
=
D2.3
=
Def(p, f )
=
D2.3
=
=
ε(p)
ε(λx.(qx )∗ (δx (qx )))
ε(λx.δx (qx ))
(ε ⊗ (λx.δx ))(q)
6
´ AND PAULO OLIVA
MART´IN ESCARDO
TX
where f (x) = δx (qx ) and p(x) = (qx )∗ (f x) and a = ε(p). The last equality
in the chain above uses the definition of the product ⊗ for the strong monad
KR X = (X → R) → R.
⊣
§3. Iterated Products and Bar Recursion. The binary product of T selection functions allows one to “merge” two T -selection functions on the types
X and Y into a T -selection function over the product type X × Y . In this
section we consider the unbounded iteration of this binary product. As with
Spector’s original bar recursion, we assume a control functional ω : Πi Xi → N
that determines when to stop the iteration.
T
T
Definition 3.1 (Iterated JR
product). Let εs : JR
X|s| and s : Πi<|s| Xi and
ω
T
ω : Πi Xi → N. Define T -EPSs (ε) : JR Σm Π|s|≤i<m Xi as
(
λq.η(h i)
if ω(s+ ) < |s|
ω
T -EPSs (ε) =
εs ⊗ λx.T -EPSω
s∗x (ε) otherwise
T
where ⊗ refers to the binary product on the strong monad JR
. Unfolding the
definition of the binary product, as in Lemma 2.2, the equation above can be also
written as
(
η(h i) if ω(s+ ) < |s|
ω
(3)
T -EPSs (ε)(q) =
a ⊗ f otherwise
where a = εs (λx.(qx )∗ (f x)) and f (x) = T -EPSω
s∗x (ε)(qx ). Note that now in a⊗ f
we are referring to the binary product of the strong monad T .
Recall that EPQ is the explicitly controlled iterated product of quantifiers with
defining equation
(
λq.q(h i)
if ω(s+ ) < |s|
ω
EPQs (φ) =
φs ⊗ λx.EPQω
s∗x (φ) otherwise.
Again, the binary product of quantifiers can be made explicitly, leading to the
equivalent definition
(
q(h i)
if ω(s+ ) < |s|
ω
(4)
EPQs (φ)(q) =
φs (λx.EPQω
s∗x (φ)(qx )) otherwise
As show in [3], EPQ is equivalent over system T to Spector’s bar recursion. The
following lemma follows by a simple iteration of Lemma 2.4.
ω
Lemma 3.2. T -EPSω
h i (ε) = EPQh i (ε).
Proof. The proof goes by bar induction on s with the bar ω(s+ ) < |s|. In
case we have reached the bar, i.e. ω(s+ ) < |s|, we have
EPQω
=
q(h i)
s (ε)(q)
D1.3(i)
=
q ∗ (η(h i))
D3.1
=
q ∗ (T -EPSω
s (ε)(q))
D2.3
T -EPSω
=
s (ε).
THE HERBRAND FUNCTIONAL INTERPRETATIONOF THE DOUBLE NEGATION SHIFT7
On the other hand, by the bar inductive assumption the result holds for s ∗ x for
all x, and hence
EPQω
= (ε ⊗ (λx.EPQω
s∗x (ε)))(q)
s (ε)(q)
(IH)
=
L2.4
(ε ⊗ (λx.T -EPSω
s∗x (ε)))(q)
=
(ε ⊗ (λx.T -EPSω
s∗x (ε)))(q)
=
T -EPSω
s (ε)(q).
⊣
It is well know that the product of selection functions of type (Xi , R) can be
simulated by a product where R is restricted to R = Πi Xi and q : Πi Xi → R
is the identity function. In fact, one can think of Spector’s restricted form of
bar recursion [12] as the iterated product of these restricted selection functions.
In terms of games, it corresponds to taking the outcome of the game to be the
sequence of moves played. The actual outcome of the game can be reconstructed
from this sequence via the outcome function. The next lemma shows that this
simulation of an arbitrary outcome type R by taking the outcome to be the
actual sequence of moves also works in this monadic setting.
Lemma 3.3. T -EPS of type (Xi , R) is definable from T -EPS of type (Xi , T Πi Xi ).
Proof. Let adds : Πi≥n Xi → Πi Xi and dropn : Πi Xi → Πi≥n Xi be the functions that append the finite sequence s of length n to the beginning of an infinite
list, and the function that drops n elements from an infinite list, respectively.
Clearly, drop|s| ◦ adds is the identity, and hence, by Lemma 1.4, T (drop|s| ) ◦
T (adds ) is the identity on T (Πi≥n Xi ) → T (Πi≥n Xi ). Given q : Πi Xi → R and
T
ε s : JR
X|s| we define εqs : JTTΠi Xi X|s| as
T X|s|
εqs (pX|s| →T Πi Xi ) = εs (λx.((qs∗x )∗ ◦ T (drop|s∗x| ))(px)).
Note that T Πi Xi is also a T -algebra with the map
(·)∗ : (X → T Πi Xi ) → (T X → T Πi Xi )
ω
q
being simply the (·)† of the monad T . We claim that T -EPSω
h i (ε)(q) = T -EPSh i (ε )(η).
Let
ω q
P (s) ≡ T -EPSω
s (ε)(qs ) = T -EPSs (ε )(η ◦ adds ).
We show P (h i) by bar induction. In the bar case we have ω(s+ ) < |s| and hence
ω q
T -EPSω
s (ε)(qs ) = η(h i) = T -EPSs (ε )(η ◦ adds ).
For the bar inductive step we assume P (s ∗ x) holds for all x and must prove
P (s). By the above we can also assume ω(s+ ) ≥ |s|. Let
f (x) = T -EPSω
s∗x (ε)(qs∗x )
a
f˜(x)
a
˜
= εs (λx.(qs∗x )∗ (f x))
q
= T -EPSω
s∗x (ε )(η ◦ adds∗x )
= εqs (λx.T (adds∗x )(f˜x)).
By the bar inductive hypothesis we have f = f˜ and hence
8
´ AND PAULO OLIVA
MART´IN ESCARDO
a
˜
=
εqs (λx.T (adds∗x )(f˜x))
(IH)
εqs (λx.T (adds∗x )(f x))
=
(εq def)
=
L1.4
=
=
εs (λx.(qs∗x )∗ (T (drop|s∗x| )(T (adds∗x )(f x))))
εs (λx.(qs∗x )∗ (f x))
a.
Therefore
T -EPSω
s (ε)(qs ) =
a⊗f
=
a
˜ ⊗ f˜
=
q
T -EPSω
s (ε )(η ◦ adds ).
⊣
The main result in this section is that Spector’s original bar recursion already
defines the explicitly controlled product of T -selection functions T -EPS. Spector
proves this in [12] for the case when T is the identity monad. The following
theorem shows that this in fact holds for any strong monad T .
Theorem 3.4. T -EPS is definable from EPQ.
ω
q
Proof. We claim that T -EPSω
h i (ε)(q) can be defined as EPQh i (ε )(η). Indeed
we have:
L3.2
q
q
=
T -EPSω
EPQω
h i (ε )(η)
h i (ε )(η)
D2.3
q
=
η ∗ (T -EPSω
h i (ε )(η))
L3.3
=
η ∗ (T -EPSω
h i (ε)(q))
=
D1.2(i)
=
η † (T -EPSω
h i (ε)(q))
T -EPSω
h i (ε)(q).
We used that the map (·)∗ for the algebra T Πi Xi is just the (·)† map for the
monad T , as discussed in the proof of Lemma 3.3.
⊣
§4. Finite Power Sets. For this section we work in a definitional extension
of G¨
odel’s system T where we consider finite subsets of any given type X also as
a type. We let Pf (X) denote the type of finite subsets of the type X. To simplify
the exposition, let us also abbreviate Pf (X → Y ) as X ⇒ Y , i.e. the type of
finite sets of functions from X to Y . We can think of the elements f : X ⇒ Pf (Y )
as functions by defining the following set-application
Pf (Y ) [
Ap(f )(xX ) =
gx.
g∈f
Hence, if f : X ⇒ Pf (Y ) then Ap(f )(·) : X → Pf (Y ). In particular, if f : (X ⇒
(Y ⇒ Pf (Z))) then Ap(Ap(f )(x))(y) stands for
[ [
hy
g∈f h∈gx
THE HERBRAND FUNCTIONAL INTERPRETATIONOF THE DOUBLE NEGATION SHIFT9
and that will be abbreviated as Ap2 (f )(x, y).
Lemma 4.1. The finite power set type operator Pf (·) is a strong monad with
operations
• η(x) = {x}
S
• f † (S) = {f (x) | x ∈ S}, for f : X → Pf (Y )
Moreover, its binary product
⊗ : Pf (X) × (X → Pf (Y )) → Pf (X × Y )
can be explicitly described as
S ⊗ f = {ha, bi | a ∈ S ∧ b ∈ f (a)}.
For the rest of the paper we shall assume thatSR = Pf (R′ ), for some R′ , so
that R is an algebra for Pf (·) with (·)∗S= (·)† and : Pf (R) → R being the usual
union operation which satisfies Si ⊆ {Si | i ∈ I} (we use this in Lemma 4.6).
Definition 4.2 (Herbrand bar recursion). Let us write hBR for the instance
of T -EPS where T = Pf (·), i.e
(
{h i}
if ω(s+ ) < |s|
ω
hBRs (ε)(q) =
{a ∗ r | a ∈ χ ∧ r ∈ hBRs∗a (ω)(ε)(qa )} otherwise
S
where χ = εs (λx. {qx (r) | r ∈ hBRs∗x (ω)(ε)(qx )}).
By Theorem 3.4 hBR is T -definable from Spector’s general form of bar recursion [11]. We now prove four lemmas about the Herbrand bar recursion hBR.
For this section we are assuming that ε and ω are fixed functionals, hence for
the sake of readability we omit these as parameters in hBRω
s (ε)(q).
Lemma 4.3. Let t = hBRh i (q) and s ∈ t, Then for all i ≤ |s| we have
s ∈ {hs0 , . . . , si−1 i ∗ r | r ∈ hBRhs0 ,... ,si−1 i (qhs0 ,... ,si−1 i )}.
The types are t : Pf (Σn Πi<n Xi ) and s : Σn Πi<n Xi .
Proof. By induction on i. If i = 0 the hs0 , . . . , si−1 i is the empty sequence
and the result follows by the assumption that s ∈ t. For the induction step
assume that i < |s| and that
s ∈ {hs0 , . . . , si−1 i ∗ r | r ∈ hBRhs0 ,... ,si−1 i (qhs0 ,... ,si−1 i )}
Since i < |s| each r in the set above must be equal si ∗ r′ for some r′ satisfying
(i) s = hs0 , . . . , si−1 , si i ∗ r′ , and
(ii) si ∗ r′ ∈ hBRhs0 ,... ,si−1 i (qhs0 ,... ,si−1 i ).
In particular, we cannot have hBRhs0 ,... ,si−1 i (qhs0 ,... ,si−1 i ) = {h i}, so it must be
the case that (∗) ω(hs0 , . . . , si−1 i+ ) ≥ |hs0 , . . . , si−1 i| = i. Hence
hBRhs0 ,... ,si−1 i (qhs0 ,... ,si−1 i ) = {a ∗ r | a ∈ χ ∧ r ∈ hBRhs0 ,... ,si−1 ,ai (qhs0 ,... ,si−1 ,ai )}
where
χ = εhs0 ,... ,si−1 i (λy Xi .
[
{qhs0 ,... ,si−1 ,yi (r) | r ∈ hBRhs0 ,... ,si−1 ,yi (qhs0 ,... ,si−1 ,yi )}).
Therefore, from (ii) we obtain that si ∈ χ and
(iii) r′ ∈ hBRhs0 ,... ,si−1 ,si i (qhs0 ,... ,si−1 ,si i ).
10
´ AND PAULO OLIVA
MART´IN ESCARDO
Finallly, from (i) and (iii) we have
s ∈ {hs0 , . . . , si−1 , si i ∗ r | r ∈ hBRhs0 ,... ,si−1 ,si i (qhs0 ,... ,si−1 ,si i )}
which concludes the proof.
⊣
Lemma 4.4. Let t = hBRh i (q) and let s ∈ t. Then ω(s+ ) < |s|.
Proof. By Lemma 4.3 we have that s ∈ {s ∗ r | r ∈ hBRs (qs )}. Hence, we
must have hBRs (qs ) = {h i} which implies ω(s+ ) < |s|.
⊣
Lemma 4.5. Let t = hBRh i (q). Assume pi and ai are sequences satisfying:
S
pi (y) =
{qha0 ,... ,ai−1 ,yi (r) | r ∈ hBRha0 ,... ,ai−1 ,yi (qha0 ,... ,ai−1 ,yi )}
ai
∈
εha0 ,... ,ai−1 i (pi ).
Let n be the least such that ω(ha0 , . . . , an−1 i+ ) < n. Then ha0 , . . . , an−1 i ∈ t.
Proof. We show, by backward induction on i (from n to 0), that
ha0 , . . . , an−1 i ∈ {ha0 , . . . , ai−1 i ∗ r | r ∈ hBRha0 ,... ,ai−1 i (qha0 ,... ,ai−1 i )}
with i = 0 being our desired result. If i = n, since ω(ha0 , . . . , an−1 i+ ) < n we
have that hBRha0 ,... ,ai−1 i (qha0 ,... ,ai−1 i ) = {h i} and the result is obvious. For the
induction step assume i > 0 and
ha0 , . . . , an−1 i ∈ {ha0 , . . . , ai i ∗ r | r ∈ hBRha0 ,... ,ai i (qha0 ,... ,ai i )}.
It follows that (i) hai+1 , . . . , an−1 i ∈ hBRha0 ,... ,ai i (qha0 ,... ,ai i ). Moreover, the
assumptions of the lemma imply
[
(ii) ai ∈ εha0 ,... ,ai−1 i (λy. {qha0 ,... ,ai−1 ,yi (r) | r ∈ hBRha0 ,... ,ai−1 ,yi (qha0 ,... ,ai−1 ,yi ))
From (i) and (ii) it follows that hai , . . . , an−1 i ∈ hBRha0 ,... ,ai−1 i (qha0 ,... ,ai−1 i ).
Hence, we can conclude
ha0 , . . . , an−1 i ∈ {ha0 , . . . , ai−1 i ∗ r | r ∈ hBRha0 ,... ,ai−1 i (qha0 ,... ,ai−1 i )}
as desired.
⊣
Lemma 4.6. Let t, pi , , ai and n be as in the lemma above, and s = ha0 , . . . , an−1 i.
Then for all i < n
q(s) ⊆
(5)
pi (ai ).
Proof. By Lemma 4.5 we have that s ∈ t. Hence, by Lemma 4.3, for i < |s|
s ∈ {ha0 , . . . , ai−1 , ai i ∗ r | r ∈ hBRha0 ,... ,ai−1 ,ai i (qha0 ,... ,ai−1 ,ai i )}.
It follows that
q(s) ∈ {q(ha0 , . . . , ai−1 , ai i ∗ r) | r ∈ hBRha0 ,... ,ai−1 ,ai i (qha0 ,... ,ai−1 ,ai i )}.
Hence
q(s)
⊆
S
{qha0 ,... ,ai−1 ,ai i (r) | r ∈ hBRha0 ,... ,ai−1 ,ai i (qha0 ,... ,ai−1 ,ai i )}
= pi (ai )
which concludes the proof.
⊣
THE HERBRAND FUNCTIONAL INTERPRETATIONOF THE DOUBLE NEGATION SHIFT
11
§5. Application: Herbrand Interpretation of DNS. In this final section we show how the product of T -selection functions with T being the finite
power-set monad witnesses the Herbrand functional interpretation of the double negation shift. Let us first briefly recall here the definition of the Herbrand
functional interpretation from [14].
Definition 5.1 ([14]). The Herbrand functional interpretation of a formula A
is defined inductively as follows. Assume (A)H = ∃aX ∀bY AH (a, b) and (B)H =
∃cV ∀dW BH (c, d). Then, the interpretation is defined as
(A → B)H
≡ ∃f, g∀aX , dW (∀b ∈ Ap(g)(a, d) AH (a, b) → BH (Ap(f )(a), d))
(∀z Z A)H
≡ ∃f Z⇒X ∀z, bAH (Ap(f )(z), b)
where in the clause for A → B the types are f : X ⇒ V and g : X × W ⇒
Pf (Y ). We only consider the {→, ∀}-fragment as this is enough to carry out the
interpretation of the double negation shift.
Example 5.2. As we will need this later, let us work out the Herbrand interpretation of negation ¬A and double-negation ¬¬A. If (A)H = ∃aX ∀bR AH (a, b)
then
(¬A)H ≡ ∃pX⇒Pf (R) ∀aX ¬∀b ∈ Ap(p)(a)AH (a, b)
and hence, classically,
(¬¬A)H ≡ ∃ε∀pX⇒Pf (R) ∃aX ∈ Ap(ε)(p)∀b ∈ Ap(p)(a)AH (a, b)
where ε : (X ⇒ Pf (R)) ⇒ Pf (X).
Assume the formula A(n) of HAω has a Herbrand functional interpretation
∃aXn ∀bR An (a, b). Then, the Herbrand functional interpretation of
DNS
:
∀n¬¬A(n) → ¬¬∀nA(n)
is equivalent to: for all δ, ϕ and q there exists an α such that
∀n, p∃a ∈ Ap(δn )(p)∀b ∈ Ap(p)(a)An (a, b) →
∃β ∈ α∀n ∈ Ap(ϕ)(β)∀b ∈ Ap(q)(β)An (βn, b)
where the types above are as follows:
δn : (Xn ⇒ Pf (R)) ⇒ Pf (Xn )
q : Πn Xn ⇒ Pf (R)
ϕ : Πn Xn ⇒ Pf (N)
Given δ, ϕ and q as above, let us define
εn : (Xn → Pf (R)) → Pf (Xn )
qˆ: Σm Πn≤m Xn → Pf (R)
ω : Πn Xn → N,
as
εn (p) =
Ap(δn )({p})
qˆ(s)
Ap(q)(s+ )
=
ω(α) = max(Ap(ϕ)(α)).
We will then apply hBR to εn , qˆ and ω.
p : Xn ⇒ Pf (R)
β : Πn Xn
α : Pf (Πn Xn ).
12
´ AND PAULO OLIVA
MART´IN ESCARDO
Theorem 5.3. Let t = hBRω
q ). We claim that α = {s+ | s ∈ t} solves
h i (ε)(ˆ
the Herbrand interpretation of DNS.
Proof. Assume
(6)
∀n, p∃a ∈ Ap(δn )(p)∀b ∈ Ap(p)(a)An (a, b).
Define the sequences an and pn inductively as follows:
S
pn (y) =
{ˆ
q(ha0 , . . . , an−1 , yi ∗ r) | r ∈ hBR(ha0 , . . . , an−1 , yi)}
an
∈
εn (pn ) = Ap(δn )({pn })
where an exists by assumption (6) taking p = {pn }. Hence
(i) ∀b ∈ Ap({pn })(an )An (an , b).
By the definition of Ap(·)(·) we have that (i) is equivalent to
(ii) ∀b ∈ pn (an )An (an , b).
Let s = ha0 , . . . , an i where n is the least such that ω(s+ ) < |s|. By Lemma 4.5
we have that s ∈ t. Let β = s+ so that β ∈ α. Note that
max(Ap(ϕ)(s+ )) = ω(s+ ) = ω(β) < |s|.
Hence, n < |s| for all n ∈ Ap(ϕ)(s+ ). Therefore, by Lemma 4.6,
(iii) Ap(q)(β) = Ap(q)(s+ ) = qˆ(s) ⊆ pn (an ), for all n ∈ Ap(ϕ)(s+ ).
By (ii) and (iii) we can conclude ∀n ∈ Ap(ϕ)(s+ )∀b ∈ Ap(q)(β)An (βn, b).
⊣
§6. Conclusion. We would like to note that in Section 5 we made no effort to
formalise the verification of the interpretation in a constructive setting. Although
it is clear to us that such formalisation is possible, attempting to do so would
complicate the verification and probably obfuscate the crucial steps of the bar
recursive construction. We hope that by simplifying the “logical component” of
the proof one can better appreciate its “computational” aspect and the use of
the “Herbrand” bar recursion.
Let us conclude by pointing out two important lines of possible future work.
First, it is clear that there are similarities between the Herbrand functional
interpretation of DNS and its bounded functional interpretation [6]. In fact,
the Herbrand and the bounded interpretations of pure arithmetic already share
many features, with very similar characteristic principles, for instance. It would
be an interesting project to nail down their common structure.
Secondly, one will have noticed that all lemmas of Section 4 were proven for
the specific case of the finite power set monad only. It is reasonable to ask
whether more general versions of such lemmas work already for the monadic bar
recursion T -EPS. The main challenge as we see it is to find the appropriate
abstract to the notion of set containment and subset inclusion. Similarly, one
might consider generalisations of the Herbrand functional interpretation whereby
the finite power set monads is replaced by an arbitrary monad, with possibly
some more extra structure.
THE HERBRAND FUNCTIONAL INTERPRETATIONOF THE DOUBLE NEGATION SHIFT
13
REFERENCES
[1] S. Berardi, M. Bezem, and T. Coquand, On the computational content of the axiom
of choice, The Journal of Symbolic Logic, vol. 63 (1998), no. 2, pp. 600–622.
[2] U. Berger and P. Oliva, Modified bar recursion, Mathematical Structures in Computer Science, vol. 16 (2006), pp. 163–183.
´ and P. Oliva, Computational interpretations of analysis via products
[3] M. H. Escardo
of selection functions, Computability in europe 2010, lncs (F. Ferreira, B. Lowe, E. Mayordomo, and L. M. Gomes, editors), Springer, 2010, pp. 141–150.
[4]
, Selection functions, bar recursion, and backward induction, Mathematical
Structures in Computer Science, vol. 20 (2010), no. 2, pp. 127–168.
[5]
, Sequential games and optimal strategies, Royal Society Proceedings A, vol.
467 (2011), pp. 1519–1545.
´ cia, The bounded functional interpretation of the double
[6] F. Ferreira and P. Engra
negation shift, The Journal of Symbolic Logic, vol. 75 (2010), no. 2, pp. 759–773.
¨
¨ del, Uber
[7] K. Go
eine bisher noch nicht ben¨
utzte Erweiterung des finiten Standpunktes,
Dialectica, vol. 12 (1958), pp. 280–287.
[8] A. Kock, Strong functors and monoidal monads, Arch. Math. (Basel), vol. 23 (1972),
pp. 113–120.
[9] U. Kohlenbach, Effective bounds from ineffective proofs in analysis: an application of
functional interpretation and majorization, The Journal of Symbolic Logic, vol. 57 (1992),
pp. 1239–1273.
[10] E. Moggi, Notions of computation and monads, Inf. Comput., vol. 1 (1991), pp. 55–
92.
[11] P. Oliva and T. Powell, On Spector’s bar recursion, Mathematical Logic Quarterly,
vol. 58 (2012), no. 4-5, pp. 356–365.
[12] C. Spector, Provably recursive functionals of analysis: a consistency proof of analysis by an extension of principles in current intuitionistic mathematics, Recursive function
theory: Proc. symposia in pure mathematics (F. D. E. Dekker, editor), vol. 5, American
Mathematical Society, Providence, Rhode Island, 1962, pp. 1–27.
[13] A. S. Troelstra, Metamathematical investigation of intuitionistic arithmetic
and analysis, Lecture Notes in Mathematics, vol. 344, Springer, Berlin, 1973.
[14] Benno van den Berg, Eyvind Martol Briseid, and Pavol Safarik, A functional interpretation for nonstandard arithmetic, Annals of Pure and Applied Logic, vol. 163 (2012),
no. 2, pp. 1962–1994.