# A Dialectica-Like Interpretation of a Linear MSO on Infinite Words

## Abstract

We devise a variant of Dialectica interpretation of intuitionistic linear logic for Open image in new window , a linear logic-based version \(\mathsf {MSO}\) over infinite words. Open image in new window was known to be correct and complete w.r.t. Church’s synthesis, thanks to an automata-based realizability model. Invoking Büchi-Landweber Theorem and building on a complete axiomatization of \(\mathsf {MSO}\) on infinite words, our interpretation provides us with a syntactic approach, without any further construction of automata on infinite words. Via Dialectica, as linear negation directly corresponds to switching players in games, we furthermore obtain a complete logic: either a closed formula or its linear negation is provable. This completely axiomatizes the theory of the realizability model of Open image in new window . Besides, this shows that in principle, one can solve Church’s synthesis for a given \(\forall \exists \)-formula by only looking for proofs of either that formula or its linear negation.

## Keywords

Linear logic Dialectica interpretation MSO on Infinite Words## 1 Introduction

Monadic Second-Order Logic (\(\mathsf {MSO}\)) over \(\omega \)-words is a simple yet expressive language for reasoning on non-terminating systems which subsumes non-trivial logics used in verification such as \(\mathsf {LTL}\) (see e.g. [2, 30]). \(\mathsf {MSO}\) on \(\omega \)-words is decidable by Büchi’s Theorem [6] (see e.g. [24, 29]), and can be completely axiomatized as a subsystem of second-order Peano’s arithmetic [28]. While \(\mathsf {MSO}\) admits an effective translation to finite-state (Büchi) automata, it is a non-constructive logic, in the sense that it has true (*i.e.*provable) \(\forall \exists \)-statements which can be witnessed by no continuous stream function.

On the other hand, Church’s synthesis [8] can be seen as a decision problem for a strong form of constructivity in \(\mathsf {MSO}\). More precisely (see e.g. [12, 32]), Church’s synthesis takes as input a \(\forall \exists \)-formula of \(\mathsf {MSO}\) and asks whether it can be realized by a finite-state causal stream transducer. Church’s synthesis is known to be decidable since Büchi-Landweber Theorem [7], which gives an effective solution to \(\omega \)-regular games on finite graphs generated by \(\forall \exists \)-formulae. In traditional (theoretical) solutions to Church’s synthesis, the game graphs are induced from deterministic (say parity) automata obtained by McNaughton’s Theorem [19]. Despite its long history, Church’s synthesis has not yet been amenable to tractable solutions for the full language of \(\mathsf {MSO}\) (see e.g. [12]).

In recent works [25, 26], the authors suggested a Curry-Howard approach to Church’s synthesis based on intuitionistic and linear variants of \(\mathsf {MSO}\). In particular, [26] proposed a system Open image in new window based on (intuitionistic) linear logic [13], in which via a translation Open image in new window , the provable Open image in new window -statements exactly correspond to the realizable instances of Church’s synthesis. Realizer extraction for Open image in new window is done via an external realizability model based on alternating automata, which amounts to see every formula \(\varphi (a)\) as a formula of the form \((\exists u)(\forall x)\varphi _{\mathcal {D}}(u,x,a)\), where \(\varphi _{\mathcal {D}}\) represents a deterministic automaton.

In this paper, we use a variant of Gödel’s “Dialectica” functional interpretation as a syntactic formulation of the automata-based realizability model of [26]. Dialectica associates to \(\varphi (a)\) a formula \({\varphi ^D}(a)\) of the form \((\exists u)(\forall x){{\varphi }_D}(u,x,a)\). In usual versions formulated in higher-types arithmetic (see e.g. [1, 16]), the formula \({{\varphi }_D}\) is quantifier-free, so that \({\varphi ^D}\) is a prenex form of \(\varphi \). This prenex form is constructive, and a constructive proof of \(\varphi \) can be turned to a proof of \({\varphi ^D}\) with an explicit witness for \(\exists u\). Even if Dialectica originally interprets intuitionistic arithmetic, it is structurally linear, and linear versions of Dialectica were formulated at the very beginning of linear logic [21, 22, 23] (see also [14, 27]).

We show that the automata-based realizability model of [26] can be obtained by a suitable modification of the usual linear Dialectica interpretation, in which the formula \({{\varphi }_D}\) essentially represents a deterministic automaton on \(\omega \)-words and is in general not quantifier-free, and whose realizers are exactly the finite-state accepting strategies in the model of [26]. In addition to provide a syntactic extraction procedure with internalized and automata-free correctness proof, this reformulation has a striking consequence, namely that there exists an extension \(\mathsf {LMSO}(\mathfrak C)\) of Open image in new window which is complete in the sense that for each closed formula \(\varphi \), it either proves \(\varphi \) or its linear negation \(\varphi \multimap \bot \). Since \(\mathsf {LMSO}(\mathfrak C)\) has realizers for all provable Open image in new window -statements, its completeness contrasts with the classical setting, in which due to provable non-constructive statements, one can not decide Church’s synthesis by only looking for proofs of \(\forall \exists \)-statements or their negations. Besides, \(\mathsf {LMSO}(\mathfrak C)\) has a linear choice axiom which is realizable in the sense of both \({(-)^D}\) and [26], but whose naive \(\mathsf {MSO}\) counterpart is false.

The paper is organized as follows. We present our basic setting in Sect. 2, with a particular emphasis on particularities of (finite-state) causal functions to model strategies and realizers. Our variant of Dialectica and the corresponding linear system are discussed in Sect. 3, while Sect. 4 defines the systems Open image in new window and \(\mathsf {LMSO}(\mathfrak C)\) and shows the completeness of \(\mathsf {LMSO}(\mathfrak C)\).

## 2 Preliminaries

We often write \((\tau )\sigma \) for the type \(\sigma \rightarrow \tau \). Given an \(\omega \)-word (or stream) \(B\in \varSigma ^\omega \) and \(n \in \mathbb {N}\), we write \(B\mathord \upharpoonright n\) for the finite word \(B(0).\cdots .B(n-1) \in {\varSigma }^{*}\).

**Church’s Synthesis and Causal Functions.**Church’s synthesis consists in the automatic extraction of stream functions from input-output specifications (see e.g. [12, 31]). These specifications are in general asked to be \(\omega \)-regular, or equivalently definable in \(\mathsf {MSO}\) over \(\omega \)-words. In practice, proper subsets of \(\mathsf {MSO}\) (and even of \(\mathsf {LTL}\)) are assumed (see e.g. [5, 11, 12]). As an example, the relation

*n*of its output from a prefix of length

*n*of its input. Hence

*F*is causal if it is induced by a map \(f : \varSigma ^+ \rightarrow \varGamma \) as follows:

The finite-state (f.s.) causal functions are those induced by Mealy machines. A Mealy machine \(\mathcal {M} : \varSigma \rightarrow \varGamma \) is a DFA over input alphabet \(\varSigma \) equipped with an output function \(\lambda : Q_{\mathcal {M}} \times \varSigma \rightarrow \varGamma \) (where \(Q_{\mathcal {M}}\) is the state set of \(\mathcal {M}\)). Writing \({\partial }^{*}: {\varSigma }^{*}\rightarrow Q_{\mathcal {M}}\) for the iteration of the transition function \(\partial \) of \(\mathcal {M}\) from its initial state, \(\mathcal {M}\) induces a causal function via Open image in new window .

Causal and f.s. causal functions form categories with finite products. Let \(\mathbb {S}\) be the category whose objects are alphabets and whose maps from \(\varSigma \) to \(\varGamma \) are causal functions \(F : \varSigma ^\omega \rightarrow \varGamma ^\omega \). Let \(\mathbb {M}\) be the wide subcategory of \(\mathbb {S}\) whose maps are finite-state causal functions.^{1}

### Example 1.

- (a)
Usual functions \(\varSigma \rightarrow \varGamma \) lift to (pointwise, one-state) maps \(\varSigma \rightarrow _{\mathbb {M}} \varGamma \). For instance, the identity \(\varSigma \rightarrow _{\mathbb {M}} \varSigma \) is induced by the Mealy machine with \({\langle \partial ,\lambda \rangle } : (-,\mathsf {a}) \mapsto (-, \mathsf {a})\).

- (b)
Causal functions \(\mathbf {1}\rightarrow _{\mathbb {S}} \varSigma \) correspond exactly to \(\omega \)-words \(B\in \varSigma ^\omega \).

- (c)
The conjunction of (2) with either side of (1) is realized by the causal function \(F : \mathbf {2}\rightarrow _{\mathbb {M}} \mathbf {2}\) induced by the machine \(\mathcal {M} : \mathbf {2}\rightarrow \mathbf {2}\) displayed on Fig. 1 (left, where a transition \(\mathsf {a}|\mathsf {b}\) outputs \(\mathsf {b}\) from input \(\mathsf {a}\)), taken from [31].

### Proposition 1

The Cartesian product of \(\varSigma _1,\dots ,\varSigma _n\) (for \(n \ge 0\)) in \(\mathbb {S},\mathbb {M}\) is given by the product of sets \(\varSigma _1 \times \dots \times \varSigma _n\) (so that \(\mathbf {1}\) is terminal).

**The Logic**\({{\mathbf {\mathsf{{MSO}}}}}\mathbf{(M). }\) Our specification language \(\mathsf {MSO}(\mathbf {M})\) is an extension of \(\mathsf {MSO}\) on \(\omega \)-words with one function symbol for each f.s. causal function. More precisely, \(\mathsf {MSO}(\mathbf {M})\) is a many-sorted first-order logic, with one sort for each simple type \(\tau \in \mathrm {ST}\), and with one function symbol of arity \((\sigma _1,\dots ,\sigma _n;\tau )\) for each map Open image in new window . A term \(\mathtt {t}\) of sort \(\tau \) (notation \(\mathtt {t}^\tau \)) with free variables among \(x_1^{\sigma _1},\dots ,x_n^{\sigma _n}\) (we say that \(\mathtt {t}\) is of arity \((\sigma _1,\dots ,\sigma _n;\tau )\)) thus induces a map Open image in new window . Given a valuation Open image in new window for \(i \in \{1,\dots ,n\}\), we then obtain an \(\omega \)-word\(\mathsf {MSO}(\mathbf {M})\) extends \(\mathsf {MSO}\) with \(\exists x^\tau \) and \(\forall x^\tau \) ranging over Open image in new window and with sorted equalities \(\mathtt {t}^\tau \doteq \mathtt {u}^\tau \) interpreted as equality over Open image in new window . Write \(\models \varphi \) when \(\varphi \) holds in this model, called the

*standard*model. The full definition of \(\mathsf {MSO}(\mathbf {M})\) is deferred to Sect. 4.1.

An instance of Church’s synthesis problem is given by a closed formula \((\forall x^\sigma )(\exists u^\tau )\varphi (u,x)\). A positive solution (or realizer) of this instance is a term \(\mathtt {t}(x)\) of arity \((\sigma ;\tau )\) such that \((\forall x^\sigma )\varphi (\mathtt {t}(x),x)\) holds.

**Eager Functions.**A causal function \(\varSigma \rightarrow _{\mathbb {S}} \varGamma \) is eager if it can produce a prefix of length \(n+1\) of its output from a prefix of length

*n*of its input. More precisely, an eager \(F : \varSigma \rightarrow _{\mathbb {S}} \varGamma \) is induced by a map \(f : {\varSigma }^{*}\rightarrow \varGamma \) as

We write \(F : \varSigma \rightarrow _{\mathbb {E}} \varGamma \) when \(F : \varSigma \rightarrow _{\mathbb {S}} \varGamma \) is eager and \(F : \varSigma \rightarrow _{\mathbb {EM}} \varGamma \) when *F* is f.s. eager. All functions \(F : \varSigma \rightarrow _{\mathbb {M}} \mathbf {1}\), and more generally, constants functions \(F : \varSigma \rightarrow _{\mathbb {S}} \varGamma \) are eager. Note also that if \(F : \varSigma \rightarrow _{\mathbb {S}} \varGamma \) is eager, then \(F : \varSigma \rightarrow _{\mathbb {EM}} \varGamma \). On the other hand, if \(F : \varSigma \rightarrow _{\mathbb {EM}} \varGamma \) is induced by an eager machine \(\mathcal {E}\) then *F* is finite-state causal as being induced by the Mealy machine with same states and transitions as \(\mathcal {E}\), but with output function \((q,\mathsf {a}) \mapsto \lambda _{\mathcal {E}}(q)\).

Eager functions do not form a category since the identity of \(\mathbb {S}\) is not eager. On the other hand, eager functions are closed under composition with causal functions.

### Proposition 2

If *F* is eager and *G*, *H* are causal then \(H \mathbin \circ F \mathbin \circ G\) is eager.

Isolating eager functions allows a proper treatment of strategies in games and realizers w.r.t. the Dialectica interpretation. Since \(\varSigma ^+ \rightarrow \varGamma \simeq {\varSigma }^{*}\rightarrow \varGamma ^\varSigma \), maps \(\varSigma \rightarrow _{\mathbb {E}} \varGamma ^\varSigma \) are in bijection with maps \(\varSigma \rightarrow _{\mathbb {S}} \varGamma \). This easily extends to machines. Given a Mealy machine \(\mathcal {M} : \varSigma \rightarrow \varGamma \), let \(\varvec{\varLambda }(\mathcal {M}) : \varSigma \rightarrow \varGamma ^\varSigma \) be the eager machine defined as \(\mathcal {M}\) but with output map taking \(q \in Q_{\mathcal {M}}\) to \((\mathsf {a} \mapsto \lambda _{\mathcal {M}}(q,\mathsf {a})) \in \varGamma ^\varSigma \).

### Example 2

Recall the Mealy machine \(\mathcal {M} : \mathbf {2}\rightarrow \mathbf {2}\) of Ex. 1.(c). Then \(\varvec{\varLambda }(\mathcal {M}) : \mathbf {2}\rightarrow \mathbf {2}^\mathbf {2}\) is the eager machine displayed in Fig. 1 (right, where the output is indicated within states).

*F*)

*G*for \(@(F,G)\). Consider a Mealy machine \(\mathcal {M} : \varSigma \rightarrow \varGamma \) and the induced eager machine \(\varvec{\varLambda }(\mathcal {M}) : \varSigma \rightarrow \varGamma ^\varSigma \). We have

Eager functions admit fixpoints similar to those of contractive maps in the topos of tree (see e.g. [4, Thm. 2.4]).

### Proposition 3

If *F* is induced by the eager machine \(\mathcal {E} : \varSigma \times \varGamma \rightarrow \varSigma ^\varGamma \), then \(\mathop {\mathrm {fix}}(F)\) is induced by the eager \(\mathcal {H} : \varGamma \rightarrow \varSigma ^\varGamma \) defined as \(\mathcal {E}\) but with \( \partial _{\mathcal {H}} : (q,\mathsf {b}) \mapsto \partial _{\mathcal {E}}\big (q,\, ((\lambda _{\mathcal {E}}(q))\mathsf {b} , \mathsf {b}) \big ) \).

**Games.**Traditional solutions to Church’s synthesis turn specifications to infinite two-player games with \(\omega \)-regular winning conditions. Consider an \(\mathsf {MSO}(\mathbf {M})\) formula \(\varphi (u^\tau ,x^\sigma )\) with no free variable other than

*u*,

*x*. We see this formula as defining a two-player infinite game \(\mathcal {G}(\varphi )(u^\tau ,x^\sigma )\) between the

*Proponent*\(\mathsf {P}\) (\(\exists \)loïse), playing moves in Open image in new window and the

*Opponent*\(\mathsf {O}\) (\(\forall \)bélard), playing moves in Open image in new window . The Proponent begins, and then the two players alternate, producing an infinite play of the form

### Theorem 1

**(**[7]**).** Let \(\varphi (u^\tau ,x^\sigma )\) be an \(\mathsf {MSO}(\mathbf {M})\)-formula with only *u*, *x* free. Then either there is an eager term \(\mathtt {u}(x)\) of arity \((\sigma ;\tau )\) such that \(\models (\forall x)\varphi (\mathtt {u}(x),x)\) or there is an eager term \(\mathtt {x}(u)\) of arity \((\tau ;(\sigma )\tau )\) such that \(\models (\forall u)\lnot \varphi (u,\varvec{\mathrm {e}}(\mathtt {x})(u))\). It is decidable which case holds and the terms are computable from \(\varphi \).

**Curry-Howard Approaches.**Following the complete axiomatization of \(\mathsf {MSO}\) on \(\omega \)-words of [28] (see also [26]), one can axiomatize \(\mathsf {MSO}(\mathbf {M})\) with a deduction system based on arithmetic (see Sect. 4.1). Consider an instance of Church’s synthesis \((\forall x^\sigma )(\exists u^\tau )\varphi (u,x)\). Then we get from Theorem 1 the alternativefor an eager term \(\mathtt {u}(x)\) or a causal term \(\mathtt {x}(u)\). By enumerating proofs and machines, one thus gets a (naive) syntactic algorithm for Church’s synthesis. But it seems however unlikely to obtain a complete classical system in which the provable \(\forall \exists \)-statements do correspond to the realizable instances of Church’s synthesis, because \(\mathsf {MSO}(\mathbf {M})\) has true but unrealizable \(\forall \exists \)-statements. Besides, note that while it is possible both for realizable and unrealizable instances to haveIn previous works [25, 26], the authors devised intuitionistic and linear variants of \(\mathsf {MSO}\) on \(\omega \)-words in which, thanks to automata-based polarity systems, proofs of suitably polarized existential statements correspond exactly to realizers for Church’s synthesis. In particular, [26] proposed a system Open image in new window based on (intuitionistic) linear logic [13], such that via a translation Open image in new window , provable Open image in new window -statements exactly correspond to realizable instances of Church’s synthesis, while (4) exactly corresponds to alternatives of the formThis paper goes further. We show that the automata-based realizability model of [26] can be obtained in a syntactic way, thanks to a (linear) Dialectica-like interpretation of a variant of Open image in new window , which turns a formula \(\varphi \) to a formula \({\varphi ^D}\) of the form \((\exists u)(\forall x){{\varphi }_D}(u,x)\), where \({{\varphi }_D}(u,x)\) essentially represents a deterministic automaton. While the correctness of the extraction procedure of [25, 26] relied on automata-theoretic techniques, we show here that it can be performed syntactically. Second, by extending Open image in new window with realizable axioms, we obtain a system \(\mathsf {LMSO}(\mathfrak C)\) in which, using an adaptation of the usual

*Characterization Theorem*for Dialectica stating that Open image in new window (see e.g. [16]), alternatives of the form (6) imply that for a closed \(\varphi \),

*linear*negation. We thus get a complete

*linear*system with extraction of suitably polarized \(\forall \exists \)-statements. Such a system can of course not have a standard semantics, and indeed, \(\mathsf {LMSO}(\mathfrak C)\) has a functional choice axiom which is realizable in the sense of both \({(-)^D}\) and [26], but whose translation to \(\mathsf {MSO}(\mathbf {M})\) (which precludes (5)) is false in the standard model.

## 3 A Monadic Linear Dialectica-Like Interpretation

*realizers*of \(\varphi \). Even if Dialectica originally interprets intuitionistic arithmetic, it is structurally linear: in general, realizers of contractiononly exist when the term language can decide \({{\varphi }_D}(u,x,a)\), which is possible in arithmetic but not in all settings. Besides, linear versions of Dialectica were formulated at the very beginning of linear logic [21, 22, 23] (see also [14, 27]).

In this paper, we use a variant of Dialectica as a syntactic formulation of the automata-based realizability model of [26]. The formula \({{\varphi }_D}\) essentially represents a deterministic automaton on \(\omega \)-words and is in general not quantifier-free. Moreover, we extract f.s. causal functions, while the category \(\mathbb {M}\) is not closed. As a result, a realizer of \(\varphi \) is an *open* (eager) term \(\mathtt {u}(x)\) of arity \((\sigma ;\tau )\) satisfying \({{\varphi }_D}(\mathtt {u}(x),x)\). While it is possible to exhibit realizers for contraction on closed \(\varphi \) thanks to the Büchi-Landweber Theorem, this is generally not the case for open \(\varphi (a)\). We therefore resort to working in a linear system, in which we obtain witnesses for
Open image in new window
-statements (and thus for realizable instances of Church’s synthesis), but not for all \(\forall \exists \)-statements.

Fix a set of atomic formulae \(\mathrm {At}\) containing all \((\mathtt {t}^\tau \doteq \mathtt {u}^\tau )\), and a standard interpretation extending Sect. 2 for each \(\alpha \in \mathrm {At}\).

### 3.1 The Multiplicative Fragment

Our linear system is based on *full* *intuitionistic* *linear* *logic* (see [15]). The formulae of the multiplicative fragment \(\mathsf {MF}\) are given by the grammar:

Each formula \(\varphi \) of \(\mathsf {MF}\) can be mapped to a classical formula \(\lfloor \varphi \rfloor \) (where \({\varvec{\mathrm {I}}}\), \(\multimap \), \(\otimes \), Open image in new window are replaced resp. by Open image in new window ). Hence \(\lfloor \varphi \rfloor \) holds whenever \(\vdash \varphi \)

The Dialectica interpretation of \(\mathsf {MF}\) is the usual one rewritten with the connectives of \(\mathsf {MF}\), but for the disjunction
Open image in new window
that we treat similarly as \(\otimes \). To each formula \(\varphi (a)\) with only *a* free, we associate a formula \({\varphi ^D}(a)\) with only *a* free, as well as a formula \({{\varphi }_D}\) with possibly other free variables. For atomic formulae we let Open image in new window . The inductive cases are given on Fig. 3, where \({\varphi ^D}(a) = (\exists u)(\forall x){{\varphi }_D}(u,x,a)\) and \({\psi ^D}(a) = (\exists v)(\forall y){{\psi }_D}(v,y,a)\).

Dialectica is such that \({\varphi ^D}\) is equivalent to \(\varphi \) via possibly non-intuitionistic but constructive principles. The tricky connectives are implication and universal quantification. Similarly as in the intuitionistic case (see e.g. [1, 16, 33]), \({(\varphi \multimap \psi )^D}\) is prenex a form of \({\varphi ^D}\multimap {\psi ^D}\) obtained using \((\mathsf {LAC})\) together with linear variants of the *Markov* and *Independence of premises* principles. In our case, the equivalence
Open image in new window
also requires additional axioms for \(\otimes \) and
Open image in new window
. We give details for the full system in Sect. 3.3.

*open*

*eager*terms: from a proof of \(\varphi (a^\kappa )\) we extract a realizer of \((\forall a)\varphi (a)\), that is an open eager term \(\mathtt {u}(x,a)\) s.t. \(\vdash {{\varphi }_D}(@(\mathtt {u}(x,a),a),x,a)\). Composition of realizers (in part. required for the cut rule) is given by the fixpoints of Proposition 3. Note that a realizer of a closed \(\varphi \) is a finite-state winning \(\mathsf {P}\)-strategy in \(\mathcal {G}(\lfloor {{\varphi }_D} \rfloor )(u,x)\).

### 3.2 Polarized Exponentials

It is well-known that the structure of Dialectica is linear, as it makes problematic the interpretation of contraction:

In our case, the Büchi-Landweber Theorem implies that all closed instances of contraction have realizers which are correct in the standard model. But this is in general not true for open instances.

### Example 3

### Example 4

*n*exists, and such that Open image in new window otherwise. The game induced by \({{((\forall a)(\varphi \multimap \varphi \otimes \varphi ))}_D}\) is \(\mathcal {G}(\varPhi )(X,{\langle x_1,x_1,a\rangle })\), where \(\varPhi \) is

Hence we can not realize contraction while remaining correct w.r.t. the standard model. On the other hand, Dialectica induces polarities generalizing the usual polarities of linear logic (see e.g. [17]). Say that \(\varphi (a)\) is *positive* (resp. *negative*) if \({\varphi ^D}(a)\) is of the form \({\varphi ^D}(a) = (\exists u^\tau ){{\varphi }_D}(u,-,a)\) (resp. \({\varphi ^D}(a) = (\forall x^\sigma ){{\varphi }_D}(-,x,a)\)). Quantifier-free formulae are thus both positive and negative.

### Example 5

Polarized contraction

gives realizers of all instances of itself. Indeed, with say \({\varphi ^D}(a) = (\exists u){{\varphi }_D}(u,-,a)\) and \({\psi ^D}(a) = (\forall y){{\psi }_D}(-,y,a)\), \(\varvec{\varLambda }(\pi _1)\) (for \(\pi _1\) a \(\mathbb {M}\)-projection on suitable types) gives eager terms \(\mathtt {U}(u,a)\) and \(\mathtt {Y}(y,a)\) such that

*Simulation Theorem*[10, 20]). Formulae which are both positive and negative (notation \((-)^\pm \)) correspond to deterministic automata, and are called

*deterministic*. We letSo Open image in new window and Open image in new window are always deterministic. The corresponding exponential contraction axioms are interpreted by themselves. This leads to the following polarized fragment \(\mathsf {PF}\) (the deduction rules for exponentials are given on Fig. 4):

### 3.3 The Full System

The formulae of the full system \(\mathsf {FS}\) are given by the following grammar:

Deduction in \(\mathsf {FS}\) is given by Figs. 2, 4 and (7). We extend \(\lfloor - \rfloor \) to \(\mathsf {FS}\) with Open image in new window . Hence \(\lfloor \varphi \rfloor \) holds when \(\vdash \varphi \) is derivable. The Dialectica interpretation of \(\mathsf {FS}\) is given by Fig. 3 and (8), (9) (still taking Open image in new window for atoms). Note that \({(-)^D}\) preserves and reflects polarities.

### Theorem 2

**(Soundness).** Let \(\varphi \) be closed with \({\varphi ^D}= (\exists u^\tau )(\forall x^\sigma ){{\varphi }_D}(u,x)\). From a proof of \(\varphi \) in \(\mathsf {FS}\) one can extract an eager term \(\mathtt {u}(x)\) such that \(\mathsf {FS}\) proves \((\forall x^\sigma ){{\varphi }_D}(\mathtt {u}(x),x)\).

As usual, proving
Open image in new window
requires extra axioms. Besides \((\mathsf {LAC})\), we use the following (*linear*) *semi-intuitionistic* *principles* \((\mathsf {LSIP})\), with polarities as shown:

*deterministic*

*exponential*axioms \((\mathsf {DEXP})\):

All these axioms but \((\mathsf {LAC})\) are true in the standard model (via \(\lfloor - \rfloor \)). Moreover:

### Proposition 4

The axioms \((\mathsf {LAC})\) and \((\mathsf {LSIP})\) are realized in \(\mathsf {FS}\). The axioms \((\mathsf {DEXP})\) are realized in \(\mathsf {FS}+(\mathsf {DEXP})\).

### Theorem 3

**(Characterization).** We have

### Corollary 1

**(Extraction).** Consider a closed formula Open image in new window with \(\delta \) deterministic. From a proof of \(\varphi \) in \(\mathsf {FS}+(\mathsf {LAC})+(\mathsf {LSIP})+(\mathsf {DEXP})\) one can extract a term \(\mathtt {t}(x)\) such that \(\models (\forall x^\sigma )\lfloor \delta (\mathtt {t}(x),x) \rfloor \).

Note that \(\mathsf {FS}+(\mathsf {DEXP})\) proves Open image in new window for all deterministic \(\delta \).

### 3.4 Translations of Classical Logic

are provable possibly with extra axioms that we require to realize themselves. In part., (10) implies \((\mathsf {DEXP})\), and Open image in new window should give deterministic formulae. While \({(-)}^T\) and \({(-)}^Q\) can be adapted accordingly, (10) induces axioms which make the resulting translations equivalent to the deterministic Open image in new window -translation of [26]:

### Proposition 5

The scheme (10) is equivalent in \(\mathsf {FS}\) to \((\mathsf {DEXP}) + (\mathsf {PEXP})\), where \((\mathsf {PEXP})\) are the following *polarized* *exponential* axioms, with polarities as shown:

### Proposition 6

If \(\varphi \) is provable in many-sorted classical logic with equality then \(\mathsf {FS}+(\mathsf {DEXP})\) proves Open image in new window .

### Proposition 7

The axioms \((\mathsf {PEXP})\) are realized in \(\mathsf {FS}+(\mathsf {LSIP})+(\mathsf {DEXP})+(\mathsf {PEXP})\). Corollary 1 thus extends to \(\mathsf {FS}+(\mathsf {LAC})+(\mathsf {LSIP})+(\mathsf {DEXP})+(\mathsf {PEXP})\).

Note that Open image in new window is deterministic and that Open image in new window .

## 4 Completeness

### 4.1 The Logic \(\mathsf {MSO}(\mathbf {M})\)

\(\mathsf {MSO}(\mathbf {M})\) is many-sorted first-order logic with atomic formulae \(\alpha \in \mathrm {At}\). Its sorts and terms are those given in Sect. 2, and standard interpretation extends that of Sect. 2 as follows: \(\mathrel {\dot{\subseteq }}\) is set inclusion, \(\mathsf {E}\) holds on \(B\) iff \(B\) is empty, \(\mathsf {N}\) (resp. \(\mathsf {0}\)) holds on \(B\) iff \(B\) is a singleton \(\{n\}\) (resp. the singleton \(\{0\}\)), and \(\mathsf {S}(B,C)\) (resp. \(B\mathrel {\dot{\le }}C\)) holds iff \(B= \{n\}\) and \(C= \{n+1\}\) for some \(n \in \mathbb {N}\) (resp. \(B= \{n\}\) and \(C= \{m\}\) for some \(n \le m\)). We write \(x^\iota \) for variables \(x^o\) relativized to \(\mathsf {N}\), so that \((\exists x^\iota )\varphi \) and \((\forall x^\iota )\varphi \) stand resp. for Open image in new window and \((\forall x^o)(\mathsf {N}(x) \rightarrow \varphi )\). Moreover, \(x^\iota \mathrel {\dot{\in }}\mathtt {t}\) stands for \(x^\iota \mathrel {\dot{\subseteq }}\mathtt {t}\), so that \(\mathtt {t}^o\mathrel {\dot{\subseteq }}\mathtt {u}^o\) is equivalent to \((\forall x^\iota )(x \mathrel {\dot{\in }}\mathtt {t} \rightarrow x \mathrel {\dot{\in }}\mathtt {u})\).

The logic \({\mathsf {MSO}^+}\) [26] is \(\mathsf {MSO}(\mathbf {M})\) restricted to the type \(o\), hence with only terms for Mealy machines of sort \((\mathbf {2},\dots ,\mathbf {2};\mathbf {2})\). The \(\mathsf {MSO}\) of [26] is the purely relational (term-free) restriction of \({\mathsf {MSO}^+}\). Recall from [26, Prop. 2.6], that for each Mealy machine \(\mathcal {M} : \mathbf {2}^p \rightarrow \mathbf {2}\), there is an \(\mathsf {MSO}\)-formula Open image in new window such that for all \(n \in \mathbb {N}\) and all Open image in new window , we have Open image in new window iff Open image in new window holds.

*y*,

*z*,

*X*are fresh.The theory \(\mathsf {MSO}(\mathbf {M})\) is complete. Thus provability in \(\mathsf {MSO}(\mathbf {M})\) and validity in the standard model coincide. This extends [26, Thm. 2.11 (via [28])].

### Theorem 4

**(Completeness of** \(\mathsf {MSO}(\mathbf {M})\)**).** For closed \(\mathsf {MSO}(\mathbf {M})\)-formulae \(\varphi \), we have \(\models \varphi \) if and only if \(\vdash _{\mathsf {MSO}(\mathbf {M})} \varphi \).

### 4.2 The Logic \(\mathsf {LMSO}\)

The system Open image in new window is \(\mathsf {FS}+(\mathsf {LSIP})+(\mathsf {DEXP})+(\mathsf {PEXP})\) extended with Fig. 5 and

Let Open image in new window . Note that \(\vdash _{\mathsf {MSO}(\mathbf {M})} \lfloor \varphi \rfloor \) whenever Open image in new window . Proposition 6 extends so that similarly as in [26] we have

### Proposition 8

If \(\vdash _{\mathsf {MSO}(\mathbf {M})} \varphi \) then Open image in new window . In part., for a realizable instance of Church’s synthesis \((\forall x^\sigma )(\exists u^\tau )\varphi (u,x)\), we have Open image in new window .

Moreover, the soundness of \({(-)^D}\) extends to Open image in new window . It follows that \(\mathsf {LMSO}(\mathfrak C)\) is coherent and proves exactly the realizable Open image in new window -statements.

### Theorem 5

**(Soundness).** Let \(\varphi \) be closed with \({\varphi ^D}= (\exists u^\tau )(\forall x^\sigma ){{\varphi }_D}(u,x)\). From a proof of \(\varphi \) in \(\mathsf {LMSO}(\mathfrak C)\) one can extract an eager term \(\mathtt {u}(x)\) such that Open image in new window proves \((\forall x^\sigma ){{\varphi }_D}(\mathtt {u}(x),x)\).

### Corollary 2

**(Extraction).** Consider a closed formula Open image in new window with \(\delta \) deterministic. From a proof of \(\varphi \) in \(\mathsf {LMSO}(\mathfrak C)\) one can extract a term \(\mathtt {t}(x)\) such that \(\models (\forall x^\sigma )\lfloor \delta (\mathtt {t}(x),x) \rfloor \).

### 4.3 Completeness of \(\mathsf {LMSO}(\mathfrak C)\)

The completeness of \(\mathsf {LMSO}(\mathfrak C)\) follows from a couple of important facts. First, \(\mathsf {LMSO}(\mathfrak C)\) proves the elimination of linear double negation, using (via Theorem 3) the same trick as in [26].

### Lemma 1

For all Open image in new window -formula \(\varphi \), we have \((\varphi \multimap \bot ) \multimap \bot \vdash _{\mathsf {LMSO}(\mathfrak C)} \varphi \).

Combining Lemma 1 with \((\mathsf {LAC})\) gives classical linear choice.

### Corollary 3

\( (\forall f)(\exists x)\varphi (x,(f)x) \vdash _{\mathsf {LMSO}(\mathfrak C)} (\exists x)(\forall y)\varphi (x,y) \).

The key to the completeness of \(\mathsf {LMSO}(\mathfrak C)\) is the following quantifier inversion.

### Lemma 2

\( (\forall x^\sigma )\varphi (\mathtt {t}^\tau (x),x) \vdash _{\mathsf {LMSO}(\mathfrak C)} (\exists u^\tau )(\forall x^\sigma )\varphi (u,x) \), where \(\mathtt {t}(x)\) is eager.

### Theorem 6

**(Completeness of** \(\mathsf {LMSO}(\mathfrak C)\)**).** For each closed formula \(\varphi \), either \(\vdash _{\mathsf {LMSO}(\mathfrak C)} \varphi \) or \(\vdash _{\mathsf {LMSO}(\mathfrak C)} \varphi \multimap \bot \).

## 5 Conclusion

We provided a linear Dialectica-like interpretation of \(\mathsf {LMSO}(\mathfrak C)\), a linear variant of \(\mathsf {MSO}\) on \(\omega \)-words based on [26]. Our interpretation is correct and complete w.r.t. Church’s synthesis, in the sense that it proves exactly the realizable Open image in new window -statements. We thus obtain a syntactic extraction procedure with correctness proof internalized in \(\mathsf {LMSO}(\mathfrak C)\). The system \(\mathsf {LMSO}(\mathfrak C)\) is moreover complete in the sense that for every closed formula \(\varphi \), it proves either \(\varphi \) or its linear negation. While completeness for a linear logic necessarily collapse some linear structure, the corresponding axioms \((\mathsf {DEXP})\) and \((\mathsf {PEXP})\) do respect the structural constraints allowing for realizer extraction from proofs. The completeness of \(\mathsf {LMSO}(\mathfrak C)\) contrasts with that of the classical system \(\mathsf {MSO}(\mathbf {M})\), since the latter has provable unrealizable \(\forall \exists \)-statements. In particular, proof search in \(\mathsf {LMSO}(\mathfrak C)\) for Open image in new window -formulae and their negation is correct and complete w.r.t. Church’s synthesis. The design of the Dialectica interpretation also clarified the linear structure of Open image in new window , as it allowed us to decompose it starting from a system based on usual full intuitionistic linear logic (see e.g. [3] for recent references on the subject).

An outcome of witness extraction for \(\mathsf {LMSO}(\mathfrak C)\) is the realization of a simple version of the fan rule (in the usual sense of e.g. [16]). We plan to investigate monotone variants of Dialectica for our setting. Thanks to the compactness of \(\varSigma ^\omega \), we expect this to allow extraction of uniform bounds, possibly with translations to stronger constructive logics than Open image in new window .

## Footnotes

- 1.
A subcategory \(\mathbb {D}\) of \(\mathbb {C}\) is

*wide*if \(\mathbb {D}\) has the same objects as \(\mathbb {C}\).

## References

- 1.Avigad, J., Feferman, S.: Gödel’s functional (“Dialectica”) interpretation. In: Buss, S. (ed.) Handbook Proof Theory. Studies in Logic and the Foundations of Mathematics, vol. 137, pp. 337–405. Elsevier, Amsterdam (1998)CrossRefGoogle Scholar
- 2.Baier, C., Katoen, J.P.: Principles of Model Checking. MIT Press, New York (2008)zbMATHGoogle Scholar
- 3.Bellin, G., Heijltjes, W.: Proof nets for bi-intuitionistic linear logic. In: Kirchner, H. (ed.) FSCD. LIPIcs, vol. 108, pp. 10:1–10:18. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany (2018)Google Scholar
- 4.Birkedal, L., Møgelberg, R.E., Schwinghammer, J., Støvring, K.: First steps in synthetic guarded domain theory: step-indexing in the topos of trees. Logical Methods Comput. Sci.
**8**(4), 1–45 (2012)MathSciNetCrossRefGoogle Scholar - 5.Bloem, R., Jobstmann, B., Piterman, N., Pnueli, A., Sa’ar, Y.: Synthesis of reactive (1) designs. J. Comput. Syst. Sci.
**78**(3), 911–938 (2012)MathSciNetCrossRefGoogle Scholar - 6.Büchi, J.R.: On a decision method in restricted second-order arithmetic. In: Nagel, E., Suppes, P., Tarski, A. (eds.) Logic, Methodology and Philosophy of Science (Proc. 1960 Intern. Congr.), pp. 1–11. Stanford University Press, Stanford (1962)Google Scholar
- 7.Büchi, J.R., Landweber, L.H.: Solving sequential conditions by finite-state strategies. Transation Am. Math. Soc.
**138**, 367–378 (1969)MathSciNetzbMATHGoogle Scholar - 8.Church, A.: Applications of recursive arithmetic to the problem of circuit synthesis. In: Summaries of the SISL. vol. 1, pp. 3–50. Cornell University, Ithaca (1957)Google Scholar
- 9.Danos, V., Joinet, J.B., Schellinx, H.: A new deconstructive logic: linear logic. J. Symb. Log.
**62**(3), 755–807 (1997)MathSciNetCrossRefGoogle Scholar - 10.Emerson, E.A., Jutla, C.S.: Tree automata, mu-calculus and determinacy (extended abstract). In: FOCS. pp. 368–377. IEEE Computer Society (1991)Google Scholar
- 11.Filiot, E., Jin, N., Raskin, J.F.: Antichains and compositional algorithms for LTL synthesis. Form. Methods Syst. Des.
**39**(3), 261–296 (2011)CrossRefGoogle Scholar - 12.Finkbeiner, B.: Synthesis of reactive systems. In: Esparza, J., Grumberg, O., Sickert, S. (eds.) Dependable Software Systems Engineering, NATO Science for Peace and Security Series, D: Information and Communication Security, vol. 45, pp. 72–98. IOS Press, Amsterdam (2016)Google Scholar
- 13.Girard, J.Y.: Linear logic. Theor. Comput. Sci.
**50**, 1–102 (1987)MathSciNetCrossRefGoogle Scholar - 14.Hyland, J.M.E.: Proof theory in the abstract. Ann. Pure Appl. Logic
**114**(1–3), 43–78 (2002)MathSciNetCrossRefGoogle Scholar - 15.Hyland, M., de Paiva, V.C.V.: Full intuitionistic linear logic (extended abstract). Ann. Pure Appl. Logic
**64**(3), 273–291 (1993)MathSciNetCrossRefGoogle Scholar - 16.Kohlenbach, U.: Applied Proof Theory: Proof Interpretations and their Use in Mathematics. Springer Monographs in Mathematics. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-77533-1CrossRefzbMATHGoogle Scholar
- 17.Laurent, O., Regnier, L.: About translations of classical logic into polarized linear logic. In: Proceedings of LICS 2003, pp. 11–20. IEEE Computer Society Press (2003)Google Scholar
- 18.LLWiki: LLWiki (2008). http://llwiki.ens-lyon.fr/mediawiki/
- 19.McNaughton, R.: Testing and generating infinite sequences by a finite automaton. Inf. Control
**9**(5), 521–530 (1966)MathSciNetCrossRefGoogle Scholar - 20.Muller, D.E., Schupp, P.E.: Simulating alternating tree automata by non-deterministic automata: new results and new proofs of theorems of Rabin, McNaughton and Safra. Theor. Comput. Sci.
**141**(1&2), 69–107 (1995)CrossRefGoogle Scholar - 21.de Paiva, V.C.V.: The DIalectica categories. In: Proceedings of Categories in Computer Science and Logic, Boulder, CO, Contemporary Mathematics, vol. 92. American Mathematical Society (1987)Google Scholar
- 22.de Paiva, V.C.V.: A DIalectica-like model of linear logic. In: Pitt, D.H., Rydeheard, D.E., Dybjer, P., Pitts, A.M., Poigné, A. (eds.) Category Theory and Computer Science. LNCS, vol. 389, pp. 341–356. Springer, Heidelberg (1989). https://doi.org/10.1007/BFb0018360CrossRefGoogle Scholar
- 23.de Paiva, V.C.V.: The DIalectica categories. Technical report 213, University of Cambridge Computer Laboratory, January 1991Google Scholar
- 24.Perrin, D., Pin, J.É.: Infinite Words: Automata, Semigroups, Logic and Games. Pure and Applied Mathematics. Elsevier (2004)Google Scholar
- 25.Pradic, P., Riba, C.: A Curry-Howard approach to Church’s synthesis. In: Proceedings of FSCD 2017. LIPIcs, vol. 84, pp. 30:1–30:16. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2017)Google Scholar
- 26.Pradic, P., Riba, C.: LMSO: a Curry-Howard approach to Church’s synthesis via linear logic. In: Proceedings of LICS 2018. ACM (2018)Google Scholar
- 27.Shirahata, M.: The DIalectica interpretation of first-order classical affine logic. Theory Appl. Categ.
**17**(4), 49–79 (2006)MathSciNetzbMATHGoogle Scholar - 28.Siefkes, D.: Decidable Theories I: Büchi’s Monadic Second Order Successor Arithmetic. LNM, vol. 120. Springer, Heidelberg (1970). https://doi.org/10.1007/BFb0061047CrossRefzbMATHGoogle Scholar
- 29.Thomas, W.: Automata on infinite objects. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science, vol. B: Formal Models and Semantics, pp. 133–192. Elsevier Science Publishers (1990)Google Scholar
- 30.Thomas, W.: Languages, automata, and logic. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, vol. III, pp. 389–455. Springer, Heidelberg (1997). https://doi.org/10.1007/978-3-642-59126-6_7CrossRefGoogle Scholar
- 31.Thomas, W.: Solution of Church’s problem: a tutorial. New Perspect. Games Interact.
**5**, 23 (2008)zbMATHGoogle Scholar - 32.Thomas, W.: Facets of synthesis: revisiting Church’s problem. In: de Alfaro, L. (ed.) FoSSaCS 2009. LNCS, vol. 5504, pp. 1–14. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00596-1_1CrossRefGoogle Scholar
- 33.Troelstra, A.: Metamathematical Investigation of Intuitionistic Arithmetic and Analysis. LNM, vol. 344. Springer, Heidelberg (1973). https://doi.org/10.1007/BFb0066739CrossRefzbMATHGoogle Scholar

## Copyright information

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.