From QBFs to MALL and Back via Focussing

In this work we investigate how to extract alternating time bounds from ‘focussed’ proof systems. Our main result is the obtention of fragments of MALLw\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {MALL} {\mathsf {w} }$$\end{document} (MALL\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {MALL} $$\end{document} with weakening) complete for each level of the polynomial hierarchy. In one direction we encode QBF satisfiability and in the other we encode focussed proof search, and we show that the composition of the two encodings preserves quantifier alternation, yielding the required result. By carefully composing with well-known embeddings of MALLw\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {MALL} {\mathsf {w} }$$\end{document} into MALL\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {MALL} $$\end{document}, we obtain a similar delineation of MALL\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {MALL} $$\end{document} formulas, again carving out fragments complete for each level of the polynomial hierarchy. This refines the well-known results that both MALLw\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {MALL} {\mathsf {w} }$$\end{document} and MALL\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {MALL} $$\end{document} are PSPACE\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {PSPACE}$$\end{document}-complete. A key insight is that we have to refine the usual presentation of focussing to account for deterministic computations in proof search, which correspond to invertible rules that do not branch. This is so that we may more faithfully associate phases of focussed proof search to their alternating time complexity. This presentation seems to uncover further dualities, at the level of proof search, than usual presentations, so could be of proof theoretic interest in its own right.


Introduction and motivation
Proof search is one of the most general ways of deciding formulas of expressive logics, both automatically and interactively.In particular, proof systems can often be found to yield optimal decision algorithms, in terms of asymptotic complexity.To this end, we now know how to extract bounds for proof search in terms of various properties of the proof system at hand.For instance we may establish: • nondeterministic time bounds via proof complexity, e.g.[CR79, Kra95, CN10]; • (non)deterministic space bounds via the depth of proofs or search spaces, and loop-checking, e.g.[BI03, HSZ96, Ono98]; • deterministic or co-nondeterministic time bounds via systems of invertible rules, see e.g.[TS96,NVPR08].However, despite considerable progress in the field, there still remains a gap between the obtention of (co-)nondeterministic time bounds, such as NP or coNP, and E-mail address: a.das@bham.ac.uk.Date: March 5, 2020.The author was supported by a Marie Sk lodowska-Curie fellowship, ERC project 753431, while conducting this research.
space bounds such as PSPACE.Phrased differently, while we have many logics we know to be PSPACE-complete (intuitionistic propositional logic, various modal logics, etc.), we have very little understanding of their fragments corresponding to subclasses of PSPACE.
An alternative view of space complexity is in terms of alternating time complexity, where a Turing machine may have both existential (i.e.nondeterminstic) and universal (i.e.co-nondeterministic) branching states.In this way PSPACE is known to be equivalent to alternating polynomial time [CKS81].This naturally yields a hierarchy of classes delineated by the number of alternations permitted in an accepting run, known as the polynomial hierarchy (PH) [Sto76], of which both NP and coNP are special cases.An almost exact instantiation of this (in a non-uniform setting) is the QBF hierarchy, where formulae are distinguished by their number of quantifier alternations in prefix notation.This raises the following open-ended question: Question 1.How do we identify natural fragments of PSPACE-complete logics complete for levels of the polynomial hierarchy?In particular, can proof theoretic methods help?
In previous work, [Das17], we considered this question for intuitionistic propositional logic, obtaining partial answers for certain expressive fragments.In this work we consider the case of multiplicative additive linear logic (MALL) [Gir87], and its affine variant which admits weakening (MALLw); both of these are often seen as the prototypical systems for PSPACE since their inference rules constitute the abstract templates of terminating proof search.Indeed, both MALL and MALLw are well-known to be PSPACE-complete [LMSS90,LMSS92], results that are subsumed by this work.1By considering a 'focussed' presentation of MALL(w), we analyse proof search to identify classes of theorems belonging to each level of PH.To demonstrate the accuracy of this method, we also show that these classes are, in fact, complete for their respective levels, via encodings from true quantified Boolean formulas (QBFs) of appropriate quantifier complexity, cf.[CKS81].
The notion of focussing is a relatively recent development in structural proof theory that has emerged over the last 20-30 years, e.g.[And92,Lau02,LM09].Focussed systems elegantly delineate the phases of invertible and non-invertible inferences in proofs, allowing the natural obtention of alternating time bounds for a logic.Furthermore, they significantly constrain the number of local choices available, resulting in reduced nondeterminism during proof search, while remaining complete.This result is known as the 'focussing' or 'focalisation' theorem.Such systems thus serve as a natural starting point for identifying fragments of PSPACE-complete logics complete for levels of PH.
One shortfall of focussed systems is that, in their usual form, they do not make adequate consideration for deterministic computations, which correspond to invertible rules that do not branch, and so the natural measure of complexity there ('decide depth') can considerably overestimate the alternating time complexity of a theorem.In the worst case this can lead to rather degenerate bounds, exemplified in [Das17] where an encoding of SAT in intuitionistic logic requires a linear decide depth, despite being NP-complete. 2To deal with this issue [Das17] proposed a more controlled form of focussing called over-focussing, which allows deterministic steps within synchronous phases, but as noted there this method is not available in MALL due to the context-splitting rule.Instead, in this work we retain the classical abstract notion of focussing, but split the usual invertible, or 'asynchronous', phase into a 'deterministic' phase, with non-branching invertible rules, and a 'co-nondeterministic' phase, with branching invertible rules.In this way, when expressing proof search as an alternating predicate, a ∀ quantifier needs only be introduced in a co-nondeterministic phase.It turns out that this adaptation suffices to obtain the tight bounds we are after.
This is an extended version of the conference paper Focussing, MALL and the polynomial hierarchy [Das18] presented at IJCAR '18.The main differences in this work are the following: • More proof details are provided throughout, in particular for the various intermediate results of Sects.4, 5 and 6. • A whole new section, Sect.7, is included which extends the main results of [Das18] to pure MALL, i.e. without weakening.• The exposition is generally expanded, with further commentary and insights throughout.In general, Sects.2-6 of [Das18] cover the same content as their respective sections in this work, although theorem numbers are different.
This paper is structured as follows.In Sect. 2 we present preliminaries on QBFs and alternating time complexity, and in Sect. 3 we present preliminaries on MALL(w) and focussing.In Sect. 4 we present an encoding of true QBFs into MALLw, tracking the association between quantifier complexity and alternation complexity of focussed proof search.In Sect. 5 we explain how provability predicates for focussed systems may be obtained as QBFs, with quantifier complexity calibrated appropriately with alternation complexity (the 'focussing hierarchy').In Sect.6 we show how this measure of complexity can be feasibly approximated to yield a bona fide encoding of MALLw back into true QBFs.Furthermore, we show that the composition of the two encodings preserves quantifier complexity, thus yielding fragments of MALLw complete for each level of the polynomial hierarchy.Sect.7 extends this approach to pure MALL via carefully composing with a certain encoding of MALLw into MALL.Finally, in Sect.8 we give some concluding remarks and further perspectives on our presentation of focussing.

Preliminaries on logic and computational complexity
In this section we will recall some basic theory of Boolean logic, and its connections to alternating time complexity.
This section follows Sect. 2 of [Das18], except that we include constants (or 'units') for generality here, and we also include a presentation of 'Boolean Truth Trees' in Sect.2.2.
2.1.Second-order Boolean logic.Quantified Boolean formulas (QBFs) are obtained from the language of classical propositional logic by adding 'second-order' 2 Indeed, a similar gross overestimation presents in this work if we had used decide depth as our measure of complexity, cf.Fig. 3. quantifiers, varying over propositions.Formally, let us fix some set Var of propositional variables, written x, y etc. QBFs, written ϕ, ψ etc., are generated as follows: We write f and t for the classical truth constants false and true respectively, so that they are not confused with the units from linear logic later.
The formula x stands for the negation of x, and all formulas we deal with will be in De Morgan normal form, i.e. with negation restricted to variables as in the grammar above.Nonetheless, we may sometimes write ϕ to denote the De Morgan dual of ϕ, generated by the following identities: A formula is closed (or a sentence) if all its variables are bound by a quantifier (∃ or ∀).We write |ϕ| for the number of occurrences of literals (i.e.x or x) in ϕ.
An assignment is a function α : Var → {0, 1}, here construed as a set α ⊆ Var in the usual way.We define the satisfaction relation between an assignment α and a formula ϕ, written α ϕ, in the usual way: Definition 2 (Second-order Boolean logic).A QBF ϕ is satisfiable if there is some assignment α ⊆ Var such that α ϕ.It is valid if α ϕ for every assignment α ⊆ Var.If ϕ is closed, then we may simply say that it is true, written ϕ, when it is satisfiable and/or valid.
Second-order Boolean logic (CPL2) is the set of true QBFs.
In practice, when dealing with a given formula ϕ, we will only need to consider assignments α that contain variables occurring in ϕ.We will assume this later when we discuss predicates (or 'languages') computed by open QBFs.
We point out that, from the logical point of view, it suffices to work with only closed QBFs, with satisfiability recovered by prenexing ∃ quantifiers and validity recovered by prenexing ∀ quantifiers.
, then so is ∀x.ϕ.Notice that ϕ ∈ Σ q k if and only if ϕ ∈ Π q k , by the definition of De Morgan duality.We have only defined the classes above for 'prenexed' QBFs, i.e. with all quantifiers at the front.It is well known that any QBF is equivalent to such a formula.For this reason we will henceforth assume that any QBF we deal with is in prenex normal form.In this case we call its quantifier-free part, i.e. its largest quantifier-free subformula, the matrix.

Boolean Truth Trees.
In this work we will not need to formally deal with any deduction system for CPL2, although we point out that there is a simple system whose proof search dynamics closely match quantifier complexity, e.g.studied in [Let02].We will briefly present a simplified system in order to exemplify the connection with alternating time complexity.
Boolean Truth Trees (BTTs) are a proof system whose lines are closed prenexed QBFs.Its inference rules are as follows, where τ varies over true quantifier-free sentences, i.e. true (∨, ∧)-combinations of f and t.Note that we could have further broken down the tr rule into several local computation rules, but that is independent of the current analysis.
Example 4. Temporarily write for the exclusive-or function, i.e. x y is true if either x is true or y is true but not both.The following is a BTT proving ∀x.∃y.(x y): Notice that a ∀ step is invertible, i.e. its conclusion is true just if every premiss is true.On the other hand, an existential formula is true just if some ∃ step applies.In this way we can describe the proof search process itself by some 'alternating' predicate whose matrix is just a truth-checker for quantifier-free sentences, a deterministic computation.It is not hard to see that the alternations between ∀ and ∃ in such a predicate will, in this case, match the quantifier complexity of the input formula, by inspection of the rules.In order to make all of this more precise, we will need to speak more formally about alternating predicates and alternating complexity.

Alternating time complexity.
In computation we are used to the distinction between deterministic and nondeterministic computation.Intuitively, conondeterminism is just the 'dual' of nondeterminism: at the machine level it is captured by 'nondeterministic' Turing machines where every run is accepting, not just some run as in the case of usual nondeterminism.From here alternating Turing machines generalise both the nondeterministic and co-nondeterministic models by allowing both universally branching states and existentially branching states.
Intuitions aside, we will now introduce the necessary concepts assuming only a familiarity with deterministic and nondeterministic Turing machines and their complexity measures.The reader may find a comprehensive introduction to relevant machine models and complexity classes in [Pap94].
For a language L of strings over some finite alphabet, we write NP(L) for the class of languages accepted in polynomial time by some nondeterministic Turing machine which may, at any point, query in constant time whether some word is in L or not.We extend this to classes of languages C, writing NP(C) for L∈C NP(L).
We also write coC for the class of languages whose complements are in C.
Definition 5 (Polynomial hierarchy, [Sto76]).We define the following classes: The polynomial hierarchy (PH) is We may more naturally view the polynomial hierarchy as the bounded-quantifieralternation fragments of QBFs we introduced earlier.For this we construe Σ q k and Π q k as classes of finite languages, by associating with a QBF ϕ(x 1 , . . ., x n ) (with all free variables indicated) the class of (finite) assignments α ⊆ {x 1 , . . ., x n } satisfying it.These assignments may themselves may be seen as binary strings of length n which encode their characteristic functions in the usual way.
Definition 6 (Evaluation problems).Let C be a set of QBFs.C-evaluation is the problem of deciding, given a formula ϕ(x) ∈ C, with all free variables indicated, and an assignment α ⊆ x, whether α ϕ(x).
(2) {ϕ ∈ Π q k : ϕ is closed and true} is Π p k -complete.Proof.Membership is immediate from Thm. 7, evaluating under the assignment ∅.For hardness, notice that we may always simplify a QBF under an assignment α to a closed formula as follows: first, replace all free variable occurrences x with t if x ∈ α and f otherwise.Now simply apply the following rewrite rules,

Linear logic and proof search
Linear logic was introduced by Girard [Gir87] to decompose the mechanics of cutelimination by means of different connectives.It naturally subsumes both classical and intuitionistic logic by various embeddings, and has furthermore been influential in the theoretical foundations of logic programming via the study of focussing, which constrains the level of nondeterminism in proof search, cf.[And92, DMS10,CMS08].In this work we only consider the fragment multiplicative additive linear logic (MALL) and its version with 'weakening'(MALLw).
This section mostly follows Sect. 3 of [Das18], mainly differing in that we here include units in the formulation of MALL and MALLw, for generality, and give some further proof details.
3.1.Multiplicative additive linear logic.For convenience, we work with the same set Var of variables that we used for QBFs.To distinguish them from QBFs, we use the metavariables A, B, etc. for MALL(w) formulas, generated as follows: The system (cut-free) MALL, where i ∈ {0, 1}.
⊥, 1, , are called multiplicative connectives, and 0, ⊤, , are called additive connectives.Like for QBFs, we have restricted negation to the variables, thanks to De Morgan duality in MALL.Again, we may write A for the De Morgan dual of A, which is generated similarly to the case of QBFs: Due to De Morgan duality, we will work only with 'one-sided' calculi for MALL and MALLw, where all formulas occur to the right of the sequent arrow.This means we will have fewer cases to consider for formal proofs, although later we will also informally adopt a two-sided notation when it is convenient, cf.Rmk.14.
Definition 9 (MALL(w)).A cedent, written Γ, ∆ etc., is a multiset of formulas, delimited by commas ',', and a sequent is an expression ⊢ Γ. 3 The system (cut-free) MALL is given in Fig. 1.MALLw, a.k.a.affine MALL, is defined in the same way, only with the (id ) rule and (1) rule replaced by the following analogues: (2) We have not included the 'cut' rule, thanks to cut-elimination for linear logic [Gir87].We will only study cut-free proofs in this paper.Notice that, following the tradition in linear logic, we write '⊢' for the sequent arrow, though we point out that the deduction theorem does not actually hold w.r.t.linear implication.For the affine variant, we have simply built weakening into the initial steps, since it may always be permuted upwards in a proof: Proposition 10 (Weakening admissibility).The following rule, called weakening, is admissible in MALLw: Proof.This is a routine (and indeed well-known) argument by induction on the size of a subproof that roots a weakening step.The initial sequents of MALLw are already closed under weakening, and have the following inductive cases: 3.2.(Multi-)focussed systems for proof search.Focussed systems for MALL (and linear logic in general) have been widely studied [And92, Lau02, DMS10, CMS08].The idea is to associate polarities to the connectives based on whether their introduction rule is invertible (negative) or their dual's introduction rule is invertible (positive).Now bottom-up proof search can be organised in a manner where, once we have chosen a positive principal formula to decompose (the 'focus'), we may continue to decompose its auxiliary formulas until the focus becomes negative.The main result herein is the completeness of such proof search strategies, known as the focussing theorem (a.k.a. the 'focalisation theorem').
It is known that 'multi-focussed' variants, where one may have many foci in parallel, lead to certain 'canonical' representations of proofs for MALL [CMS08].Furthermore, the alternation behaviour of focussed proof search can be understood via a game theoretic approach [DMS10].However, such frameworks unfortunately fall short of characterising the alternating complexity of proof search in a faithful way.The issue is that the usual focussing methodology does not make any account for deterministic computations, which correspond to invertible rules that do not branch.Such rules are usually treated just like the other invertible rules, which in general comprise the 'co-nondeterministic' stages of proof search.
For these reasons we introduce a bespoke presentation of (multi-)focussing for MALL, with a designated deterministic phase dedicated to invertible non-branching rules, in particular the rule.To avoid conflicts with more traditional presentations, we call the other two phases nondeterministic and co-nondeterministic rather than 'synchronous' and 'asynchronous' respectively.This terminology also reinforces the intended connections to computational complexity.
Henceforth we use a, b, etc. to vary over atomic formulas.We also use the following metavariables to vary over formulas with the indicated main connectives: M : 'negative and not deterministic' N : 'negative' , O : 'deterministic' , , a P : 'positive' , Q : 'positive and not deterministic' The system (cut-free) FMALL, where P ′ and M must be nonempty and i ∈ {0, 1}.
'Vectors' are used to vary over multisets of associated formulas, e.g.P varies over multisets of P -formulas.We may sometimes view these as sequences or even sets for convenience.Sequents may now contain a single delimiter ⇓ or ⇑.
Definition 11 (Multi-focussed proof system).We define the (multi-focussed) system FMALL in Fig. 2. The system FMALLw is the same as FMALL but with the (id ) and (1) rules replaced by the rules (wid ) and (w1) from (2).
A proof of a formula A is simply a proof of the sequent ⊢ A, i.e. there is no need to pre-decorate with arrows, as opposed to usual presentations, thanks to the deterministic phase.The rules D and D are called decide and co-decide respectively, while R and R are called release and co-release respectively.
Notice that the determinism of plays no role in this one-sided calculus, but in a two-sided calculus we would have a deterministic left rule that is analogous to the given rule (on the right).This is the same as how the 'negativity' (in the sense of non-invertibility on the left) of plays no role in this calculus.One may argue that a on the left is morally just a , but such a simplification sacrifices the duality of connectives being reflected in terms of duality in computational complexity: if is deterministic, then so should be its dual, .Indeed, in the above classification, O-formulas are dual to O-formulas, P -formulas dual to N -formulas, and Q-formulas dual to M -formulas.
As usual for multi-focussed systems, the analogous focussed system can be recovered by restricting rules to only one focussed formula in nondeterministic phases.Moreover, in our presentation, we may also impose the dual restriction, that there is only one formula in 'co-focus' during a co-nondeterministic phase: always a singleton.If a proof is both focussed and co-focussed then we say it is bi-focussed.
The notion of 'co-focussing' is not usually possible for (multi-)focussed systems since the invariant of being a singleton is not usually maintained in an asynchronous phase, due to the rule.However we treat as deterministic rather than conondeterministic, and we can see that the -rule indeed maintains the invariant of having just one formula on the right of ⇑.
Theorem 13 (Focussing theorem).We have the following: (1) The class of bi-focussed FMALL-proofs is complete for MALL.
(2) The class of bi-focussed FMALLw-proofs is complete for MALLw.
Evidently, this immediately means that FMALL (FMALLw), as well as its focussed and co-focussed subsystems, are also complete for MALL (resp.MALLw).The proof of Thm. 13 follows routinely from any other completeness proof for focussed MALL, e.g.[And92,Lau02].The only change in our presentation is in the organisation of phases, for which we may think of bi-focussed proofs as certain annotated focussed proofs.
To aid our exposition, we will sometimes use a 'two-sided' notation and extra connectives so that the intended semantics of sequents are clearer.Strictly speaking, this is just a shorthand for one-sided sequents: the calculi defined in Figs. 1 and 2 are the formal systems we are studying.
We write A ⊸ B as shorthand for the formula A B, and A ⊸ + B as shorthand for the formula A B. Sometimes we will write, e.g., a step, which, by definition, corresponds to a correct application of in FMALL(w).

An encoding from CPL2 to MALLw
In this section we present an encoding of true QBFs into MALLw.(We will later adapt this into an encoding into MALL in Sect.7.) The former were also used for the original proof that MALL is PSPACE-complete [LMSS90, LMSS92], though our encoding differs from theirs and leads to a more refined result, cf.Sect.6.This section mostly follows Sect. 4 from [Das18], except with some further details in proofs and the exposition.Henceforth we assume that all QBFs are in prenex normal form and free of truth constants f and t (e.g. by Eqn. 1).

4.1.
Positive and negative encodings of quantifier-free evaluation.The base cases of our translation from QBFs to MALLw will be quantifier-free Boolean formula evaluation.This is naturally a deterministic computation, being polynomialtime computable.(In fact, Boolean formula evaluation is known to be ALOGTIMEcomplete [Bus87].)However one issue is that this determinism cannot be seen from the point of view of MALLw, since the only deterministic connective ( , on the right) is not expressive enough to encode evaluation.
Nonetheless we are able to circumvent this problem since MALLw is at least able to see that quantifier-free evaluation is in NP ∩ coNP, via a pair of corresponding encodings.For non-base levels of PH this is morally the same as being deterministic, as we will see more formally over the course of this section.
Definition 15 (Positive and negative encodings).Let ϕ be a quantifier-free Boolean formula.We define: • ϕ − is the result of replacing every ∨ in ϕ by and every ∧ in ϕ by .
• ϕ + is the result of replacing every ∨ in ϕ by and every ∧ in ϕ by .For an assignment α ⊆ Var and a list of variables x = (x 1 , . . ., x k ), we write α(x) for the cedent {x i : ∈ α, i ≤ k}.We write α n (x) for the cedent consisting of n copies of each literal in α(x).
Proposition 16.Let ϕ be a quantifier-free Boolean formula with free variables x and let α be an assignment.For n ≥ |ϕ|, the following are equivalent: (1) α ϕ.
Proof. 2 =⇒ 1 and 3 =⇒ 1 are immediate from the 'soundness' of MALLw with respect to classical logic, by interpreting or as ∧ and or as ∨.
• For any quantifier-free Boolean formula ϕ with |ϕ| ≤ n, if α ϕ then MALLw proves α n (x) ⊢ ϕ + .We proceed by induction on the number of connectives in Λ or ϕ.The bases case is simple (relying on affinity) and the inductive cases are as follows, where: • i = 0 or i = 1, depending on whether α ϕ 0 or α ϕ 1 , respectively; and, • l and m are chosen so that l ≥ |ϕ| and m ≥ |ψ|; and, • the derivations marked IH are obtained from the inductive hypothesis.

Encoding quantifiers in MALLw.
As we said before, we do not follow the 'locks-and-keys' approach of [LMSS90,LMSS92].Instead we follow a similar approach to Statman's proof that intuitionistic propositional logic is PSPACE-hard [Sta79], adapted to minimise proof search complexity.
The basic idea is that we would like to encode quantifiers as follows: (3) ∃x.ϕ The issue is that such a naive approach would induce an exponential blowup, due to the two occurrences of ϕ in each line above.This idea was considered by Statman in [Sta79], for intuitionistic propositional logic, where he avoided the blowup by using Tseitin extension variables, essentially fresh variables used to abbreviate complex formulas, e.g.(x ≡ ϕ).The issue is that this can considerably complicate the structure of proofs, since, in order to access the abbreviated formula, we must pass both a positive and negative phase induced by ≡.
Instead, we use an observation from [Das17] that ϕ occurs only positively in (3) above, and so we only need one direction of Tseitin extension.Doing this carefully will allow us to control the structure proofs in a way that is consistent with the alternation complexity of the initial QBF, as we will see later.
Lemma 18.Let ϕ(x) be a QBF with all free variables displayed and matrix ϕ 0 , with |ϕ 0 | = n.Then α ϕ if and only if MALLw proves α n (x) ⊢ y, [ϕ] for any assignment α and any y disjoint from x.
Proof.We proceed by induction on the number of quantifiers in ϕ.For the base case, when ϕ is quantifier-free, we appeal to Prop.16.The left-right direction follows directly by weakening (cf.Prop.10), while the right-left direction follows after observing that y does not occur in [ϕ] or α n (x); thus y may be deleted from a proof (along with its descendants) while preserving correctness.
For the inductive step, in the left-right direction we give appropriate bi-focussed proofs in Figs. 3 and 4, where: ±x in Fig. 3 is chosen to be x if x ∈ α and x otherwise; the derivations marked IH are obtained by the inductive hypothesis; and the derivation marked . . . in Fig. 4 is analogous to the one on the left of it. 4 For the right-left direction, we need only consider the other possibilities that could occur during bi-focussed proof search, by the focussing theorem, Thm. 13.For the ∃ case, bottom-up, one could have chosen to first decide on [ϕ] ⊸ y in the antecedent.The associated ⊸ l step would have to send the formula (x n ⊸ y) (x n ⊸ y) to the right premiss (for y), since otherwise every variable occurrence in that premiss would be distinct and there would be no way to correctly finish proof search.Thus, possibly after weakening, we may apply the inductive hypothesis to the left premiss (for [ϕ]).A similar analysis of the upper ⊸ l step in Fig. 3 means that any other split will allow us to appeal to the inductive hypothesis after weakening.For the ∀ case the argument is much simpler, since no matter which order we 'co-decide', we will end up with the same leaves.(This is actually exemplary of the more general phenomenon that invertible phases of rules are 'confluent', cf.[And92, CMS08, LM09].)In particular, -steps may be permuted as follows: Proof.Follows immediately from Lemma 18, setting y = ∅.
4 Note that, for the derivations for the innermost quantifier (∃ or ∀), the topmost R or R step of Figs. 3 or 4 (resp.)does not occur.

Focussed proof search as alternating time predicates
In this section we show how to express focussed proof search as an alternating polynomial-time predicate that will later allow us to calibrate the complexity of proof search with levels of the QBF and polynomial hierarchies.The notions we develop apply equally to either MALL or MALLw.
This section mostly follows Sect. 5 of [Das18] except that, as well as further general details, we include a proof of Theorem 21 (essentially Theorem 20 in [Das18]).
We will now introduce 'provability predicates' that delineate the complexity of proof search in a similar way to the QBF and polynomial hierarchies we presented earlier.Recall the notions of deterministic, nondeterministic and co-nondeterministic rules from Dfn. 11, cf.Fig. 2.
• Σ f k+1 -provable if there is a derivation of ⊢ Γ, using only deterministic and nondeterministic rules, from sequents ⊢ Γ i which are Π f k -provable.• Π f k+1 -provable if every maximal path from ⊢ Γ, bottom-up, through deterministic and co-nondeterministic rules ends at a Σ f k -provable sequent.We sometimes simply say "Γ is Σ The definition above is robust under the choice of multi-focussed, (co-)focussed or bi-focussed proof systems: while the number of D or D steps may increase, the number of alternations of nondeterministic and co-nondeterministic phases is the same.This robustness will also apply to other concepts introduced in this section.
From the definition it is not hard to see that we have a natural correspondence between the focussing hierarchy and the other hierarchies we have discussed: Theorem 21.For k ≥ 0, we have the following: ( An analogous result has been presented in previous work, [Das17].An interesting point is that, for the rule, even though there are two premisses, the rule is context-splitting, and so a nondeterministic machine may simply split into two parallel threads with no blowup in complexity. of Thm. 21.We proceed by induction on k.In the base case, a cedent is Σ f 0provable (equivalently Π f 0 -provable) just if it has a proof using only deterministic rules.Upon inspection of Fig. 2, we notice that it does not matter which order we apply deterministic rules, bottom-up, since maximal application will always lead to the same sequent at the top.This follows from a simple rule permutation argument: Thus, since deterministic rules must terminate after a linear number of steps (bottom-up), we may verify deterministic-provability by simply applying deterministic steps maximally (in any order bottom-up) and verifying that the end result is a correct initial sequent.Thus we indeed have that Σ f 0 -provability (equivalently Π f 0 -provability) is computable in P = Σ p 0 = Π p 0 .For the inductive step for 1, a cedent Γ is not Π f k+1 -provable just if there is some maximal branch of co-nondeterministic steps applied to Γ, bottom-up, that terminates in a sequent Γ ′ that is not Σ f k -provable.Any such branch has polynomialsize (by inspection of the rules), and we have from the inductive hypothesis that Σ f k -provability is computable in Σ p k .Thus we have that non-Π f k+1 -provability is computable in Σ p k+1 and so, by Dfn. 5, Π f k+1 -provability is computable in Π p k+1 .For the inductive step for 2, a cedent Γ is Σ f k+1 -provable just if there is a derivation of the form, using only deterministic and nondeterministic rules such that each Γ i is Π f k -provable.Notice that such Φ has polynomial-size in |Γ| with n i=1 |Γ i | ≤ |Γ|, by inspection of the (non)determinstic rules in Fig. 2. Thus, to check that Γ is Σ f k+1 -provable we need only guess the appropriate derivation Φ and sequents Γ 1 , . . ., Γ n , and then check that each Γ i is Π f k -provable.By the inductive hypothesis, we have that Π f k -provability is a Π p k property, so we may check on a Π k -machine that all these Γ i s are actually Π f k -provable in time . Thus we have that Σ f k+1 -provability is indeed computable in Σ p k .Corollary 22.For k ≥ 1, we have the following: (1) There are Σ q k formulas Σ f k -Prov n , constructible in time polynomial in n ∈ N, computing Σ f k -provability on all formulas A s.t.|A| = n.
(2) There are Π q k formulas Π f k -Prov n , constructible in time polynomial in n ∈ N, computing Π f k -provability on formulas A s.t.|A| = n.Proof.Follows immediately from Theorem 21 under Theorem 7.
We now give a slightly different way to view the focussing hierarchy, based on a more directly calculable measure of cedents that is similar to the notions of 'decide depth' and 'release depth' found in other works, e.g.[Nig07].We will use (a variation of) this to eventually formulate our encoding from MALLw to CPL2 in the next section.
Definition 23 ((Co-)nondeterministic complexity).Let Φ be a FMALL(w) proof.We define the following: • The nondeterministic complexity of Φ, written σ(Φ), is the maximum number of alternations, bottom-up, between D and D steps in a branch through Φ, setting σ(Φ) = 1 if Φ has only D steps.• The co-nondeterministic complexity of Φ, written π(Φ), maximum number of alternations, bottom-up, between D and D steps in a branch through Φ, setting π(Φ) = 1 if Φ has only D steps.For a cedent Γ we further define the following: Putting together the results and notions of this section, we have: Proposition 24.Let Γ be a cedent and k ≥ 0. We have the following: 6.An 'inverse' encoding from MALLw into CPL2 In this section we will use the ideas of the previous section to give an explicit encoding from MALLw to CPL2, i.e. a polynomial-time mapping from MALLwformulas to QBFs whose restriction to theorems has image in CPL2.Moreover, we will show that this encoding acts as an 'inverse' to the one we gave in Sect.4, and finally identify natural fragments of MALLw complete for each level of PH.
This section mostly follows Sect.6 of [Das18], except that we give significantly more proof details. 6.1.Approximating (co-)nondeterministic complexity.The nondeterministic and co-nondeterministic complexities σ and π we introduced in the previous section do not give us a bona fide encoding from MALLw to true QBFs since they are hard to compute.Instead we give an 'overestimate' here that will suffice for the encodings we are after.This overestimate will be parametrised by some enumeration of all formulas,5 which will drive the possible choices during proof search.However we will later show that the choice of this enumeration is irrelevant, meaning that the approximation can be flexibly calculated and is in fact polynomial-time computable.
Another option might have been, rather than taking the 'least' formula in a sequent under some enumeration, that we may view the sequent as a list instead in a calculus with an exchange rule.We avoided this in the interest of having a terminating proof system.
Throughout, we will identify enumerations with total orders in the natural way.
Definition 25 (Approximating the complexity of a sequent).Let ≺ be a total order on all MALL(w) formulas.We define the functions ⌈σ⌉ ≺ and ⌈π⌉ ≺ on sequents in Fig. 5. 6Proposition 26 (Confluence).For any two total orders ≺ and ≺ ′ on MALL(w) formulas, we have that ⌈σ⌉ To prove this, we give essentially a confluence argument for terminating relations, but we avoid using a formal rewriting argument for self-containedness.
where each δ i is either 2 or 0 depending on whether a co-nondeterministic phase is entered or not during the bi-pole induced by P i .We will have a similar derivation for ≺ ′ , with only δ 0 and δ 1 swapped, whence we conclude by commutativity and associativity of addition.
The case where a M -formula is chosen in the definition of ⌈π⌉ is similar.
From now on, we may suppress the subscript ≺ for the notions ⌈σ⌉ and ⌈π⌉.
Proof.A proof with the minimal number of alternations between nondeterministic and co-nondeterministic phases will induce a strategy ≺ on which we may evaluate ⌈σ⌉ and ⌈π⌉.These will be bounded below by their actual σ and π values.
Notice that the over-estimation for the case is particularly extreme: in the worst case we have that the entire context is copied to one branch.In fact we could optimise this somewhat, by only considering 'plausible' splittings, but it will not be necessary for our purposes.
Proof.Clearly, ⌈σ⌉ ≺ and ⌈π⌉ ≺ are polynomial-time computable for any polynomialtime enumeration ≺.So we may simply pick any polynomial-time enumeration of the formulas and appeal to Prop. 26.

Tightness of approximations in the image of [•]
. Since [ϕ] is always a relatively 'balanced' formula, we have that the overestimation just defined is in fact tight in the image of [•] from MALLw: Proposition 29 (Tightness).For k ≥ 1 we have the following: (1) Intuitively, the tightness of the approximation follows from the following two properties of the derivations in Figs. 3 and 4: • There is only one non-atomic formula per sequent, so the -overapproximation is not significant.• Weakening is only required on atomic formulas, so initial sequents need not be further broken down in the definitions of ⌈σ⌉ and ⌈π⌉.
of Prop.29.We have that σ(ϕ) = k and π(ψ) = k already from the proof of Lemma 18, so it remains to show that the approximations are tight.Definition 30 (MALLw to CPL2).For a MALLw formula A, we define: Finally, we are able to present our main result: Theorem 31.We have the following: (1) [•] is a polynomial-time encoding from CPL2 to MALLw.
Proof.We already proved 1 in Thm.19. 2 follows from the definitions of Σ f k -Prov and Π f k -Prov (cf.Cor.22), under Prop.24 and Cors.27 and 28.Finally 3 then follows by tightness of the approximations ⌈σ⌉, ⌈π⌉ in the image of [•], Prop.29.Consequently, we may identify polynomial-time recognisable subsets of MALLwformulas whose theorems are complete for levels of the polynomial hierarchy: Corollary 32.We have the following, for k ≥ 1: (1) {A : ⌈σ⌉(A) ≤ k and MALLw proves A} is Σ p k -complete.

Extending the approach to (non-affine) MALL
It is natural to wonder whether a similar result to Thm. 31 could be obtained for MALL, i.e. without weakening.The reason we chose MALLw is that it allows for a robust and uniform approach that highlights the capacity of focussed systems to obtain tight alternating time bounds for logics, without too many extraneous technicalities.However, the same approach does indeed extend to MALL with only local adaptations.We give the argument in this section.
This section is comprised of new material not present in [Das18].

Encoding weakening in MALL.
There is a well-known embedding of MALLw into MALL by recursively replacing every subformula A by ⊥ A. However, doing this might considerably increase the alternation complexity of proof search, adding up to one alternation per subformula.Instead, we notice that we need only conduct this replacement on literals, since those are the only ones that are weakened in the proofs of Sect. 4. From here we realise that the consideration of formulae of the form ⊥ a (or variants thereof) may be delayed to the end of proof search.To formalise this appropriately, we first need the following notion: Definition 33 (Weakened formulas).Let Φ be a MALLw proof whose initial idsequents are {Γ i , a i , a i } i<m and initial 1-sequents are {Γ i , 1} m≤i<n The weakened formulas of Φ is the set Ω := i<n Γ i .
We identify elements of Ω in the above definition with subformula occurrences of the conclusion of Φ in the natural way.We have the following folklore result: Lemma 34 (Weakening lemma).We have the following: (1) MALL proves A ⊢ ⊥ A.
(2) MALLw proves ⊥ A ⊢ A, with weakening only on A.
(3) Let A be a MALL(w) formula and Ω a set of subformula occurrences of A.
There is a MALLw proof Φ of A with weakened formulas among Ω if and only if MALL proves A[⊥ B/B] B∈Ω .
Proof. 1 and 2 are given by the following derivations: 3 now follows immediately from 1 and 2 under the 'deep inference' property: (4) If MALL(w) proves A(B) and B ⊢ C then it proves A(C).
This property is well known (see, e.g., [Str02]) and follows by a routine induction on the structure of A, in particular appealing to the cut-elimination property of MALL(w).For instance here are the cases when A is a or formula, where the derivations marked IH are obtained from the inductive hypothesis.The cases when A is a or formula are similar to the two cases above.

Adapting the translation [•]
for MALL.It turns out that, in the arguments of Sect.4, we only used weakenings on atomic formulae: notice that, in the proofs of Prop.16 and of Lemma 18, the only weakenings were applied on literals, and all initial sequents had the form a.
Observation 35.The proof of Thm.19 requires weakening only on literals.

This motivates the following definition:
Definition 36.For a MALL(w) formula A, write A ′ for the result of replacing every literal occurrence a with ⊥ a.
We now have the following immediately from Lemma 34: Proposition 37. MALLw proves [ϕ] if and only if MALL proves [ϕ] ′ .7.3.Dealing with ⊥ a formulas deterministically.Even though we have restricted our treatment of weakened formulas to only literals, these may still a priori increase the alternation complexity of proof search linearly under the encoding A ′ .To avoid this, we will work in a certain normal form of proofs that delays consideration of formulas of the form ⊥ a until the end of bottom-up proof search.To enforce this we must slightly 'hack' the proof systems and complexity approximations previously introduced.
For generality, let us introduce new metavariables c, d etc. varying over -clauses containing at least one ⊥: Our intention is to treat c-formulas much like atoms in proof search, in particular not decomposing them until the end.To this end, we will introduce a new focussed system FMALL ′ that enforces this within the rules.
Definition 38 (FMALL ′ ).We temporarily redefine the metavariables M, N, O, P, Q so that only O is permitted to vary over c-formulas,i.e. if P or Q is a -formula it must not be a c-formula.The proof system FMALL ′ is hence defined just as FMALL in Fig. 2, under this revision of metavariables, with the following exceptions: • a in Fig. 2 where literals in parentheses must occur in their respective formulas.These new initial sequents are deterministic.
Proof.Soundness is routine, with the new initial sequents proved using simple and ⊥ steps, along with the other initial rules.
For completeness, we proceed by induction on the size of a FMALL proof, by essentially a rule permutation argument.The critical cases are when a FMALL proof focusses on a c-formula, which we adapt as follows: where, • c, Φ is obtained from Φ by inductively adding c to each premiss of an inference step in Φ, bottom-up, except at steps where we must only add c to one premiss, say the left one.This transformation preserves the local correctness of the proof, in particular since initial sequents are closed under addition of c-formulas.
• a is a literal and Φ[c/a] is obtained from Φ by replacing every (indicated) occurrence of a by c.Since c contains a as a subformula, each initial sequent transformed in this way will again be an initial sequent.All other cases are routine, simply mimicking the given FMALL proof.It is not hard to see that the results of Sect. 5 are applicable also to the notions ⌈σ⌉ ′ and ⌈π⌉ ′ developed here.In particular Prop.26 holds also for ⌈σ⌉ ′ and ⌈π⌉ ′ and we may similarly omit the ≺-subscript henceforth.All together, this allows us to define a similar encoding from MALL formulas to QBFs.
First, appealing to Cor. 22, 7 let us henceforth fix appropriate QBFs Σ f k -Prov ′ n and Π f k -Prov ′ n , for k ≥ 1, computing Σ f k -provability and Π f k -provability in FMALL ′ , respectively, for formulas of size n.
7 Notice that this holds also for the system FMALL ′ .
Definition 41 (MALL to CPL2).For a MALL formula A, we define: We now have the following analogues of the main results of the previous section, proved by essentially the same arguments: Theorem 42.We have the following: (1) [•] ′ is a polynomial-time encoding from CPL2 to MALL.

Conclusions and further remarks
We gave a refined presentation of (multi-)focussed systems for multiplicativeadditive linear logic, and its affine variant, that accounts for deterministic computations in proof search, cf.Sect.3. We showed that it admits rather controlled normal forms in the form of bi-focussed proofs, and highlighted a duality between focussing and 'co-focussing' that emerges thanks to this presentation.The main reason for using focussed systems such as ours was to better reflect the alternating time complexity of bottom-up proof search, cf.Sect. 5. We justified the accuracy of these bounds by showing that natural measures of proof search complexity for FMALLw tightly delineate the theorems of MALLw according to associated levels of the polynomial hierarchy, cf.Sects.4 and 6.We were also able to obtain a similar delineation for MALL cf.Sect.7.These results exemplify how the capacity of proof search to provide optimal decision procedures for logics extends to important subclasses of PSPACE.As far as we know, this is the first time such an investigation has been carried out.
Our presentation of FMALL(w) should extend to logics with quantifiers and exponentials, following traditional approaches to focussed linear logic, cf.[And92,Lau02].It would be interesting to see what could be said about the complexity of proof search for such logics.For instance, the usual ∀ rule becomes deterministic in our analysis, since it does not branch: Γ, A(y) ∀ y is fresh Γ, ∀x.A(x) As a result, the alternation complexity of proof search is not affected by the ∀-rule, but rather interactions between positive connectives, including ∃, and negative connectives such as .Interpreting this over a classical setting could even give us new ways to delineate true QBFs according to the polynomial hierarchy, determined by the alternation of ∃ and propositional connectives rather than ∀.One issue here is that witnessing ∃ steps seems to significantly impact the complexity proof search.Nonetheless this would be an interesting line of future research.
Much of the literature on logical frameworks via focussed systems is based around the idea that an inference rule may be simulated by a 'bi-pole', i.e. a single alternation between an invertible and non-invertible phase of inference steps.However accounting for determinism might yield more refined simulations where, say, noninvertible rules are simulated by phases of deterministic and nondeterministic rules, but not co-nondeterministic ones.In particular this should be possible for standard translations between modal logic and first-order logic, cf.[MV15,MMV16].

Figure 3 .
Figure 3. Proof of ∃ case for left-right direction of Lemma 18.

Figure 4 .
Figure 4. Proof of ∀ case for left-right direction of Lemma 18.
is everywhere replaced by a, c, i.e.FMALL ′ has the following rules, ⊢ a, c, P ⇓ P ′ D ⊢ a, c, P, P ′ ⊢ a, c, P ⇑ M D ⊢ a, c, P, M ⊢ Γ, a, c, N R ⊢ Γ ⇑ a, c, N instead of their analogous versions written in Fig. 2. • FMALL ′ has the following additional initial sequents:
6.3.An encoding from MALLw to QBFs and main results.From Cor. 22, let us henceforth fix appropriate QBFs Σ f k -Prov n and Π f k -Prov n , for k ≥ 1, computing Σ f k -provability and Π f k -provability in FMALLw, respectively, for formulas of size n.We are now ready to define our 'inverse' encoding of [•]: