arXiv:2003.00644v2 [cs.LO] 8 Jul 2020 00Cprgthl yteonrato() ulcto rights Publication owner/author(s). the by held Copyright 2020 © eitoueanvlvrato S ahnscle Sepa- called machines BSS of variant novel a introduce We C SN978-1-4503-7104-9/20/07...$15.00 ISBN ACM btatn ihcei spritd ocp tews,o republis or otherwise, copy To permitted. is credit with Abstracting t,ta eatc,idpnec oi,ra arithmetic. real logic, independence semantics, team ity, Keywords: statistics and bility oACM. to Germany Saarbrücken, 2020, 8–11, July ’20, [email protected]. LICS from permissions specific Request prior fee. requires a lists, to and/or redistribute to or servers on post computation t hoyadlogic and theory ity hps://doi.org/10.1145/3373718.3394773 hono be must author(s) the fo than Copyrights others page. by first owned the work on this citation of full ponents c the f that and work and notice advantage this this commercial cop or bear of that profit provided part for fee distributed or or without made all granted not of is use copies classroom hard or or personal digital make to Permission seta hoyo h el)adhnele between lies hence ex- and true reals) the the of to theory reducible istential time polynomial problems of class ceie aua rgeto h opeiyclass complexity the of char- fragment constants natural real a without acterises machines S-BSS on NP inputs C Concepts: CCS logic. independence probabilistic of complexity PSPACE hnsi onal ijituino lsdst nthe in sets closed of union disjoint of topology ma- usual countable S-BSS a on language is NP NP every in chines that included and strictly machines is BSS machines on S-BSS on NP that show We machines. S-BSS by time polynomial nondeterministic decidabl in languages for a characterisation develop logical and short) Fagin-type in (S-BSS machines BSS Branching rate Abstract Atos22.Ti steato’ eso ftewr.I spost is It work. the of version author’s the is This 2020. ©Authors ok Y S,https://doi.org/10.1145/3373718.3394773. USA, NY, York, nPoednso h 5hAna C/EESmoimo oi nCompu in Logic on Symposium ACM/IEEE Annual 35th the of Proceedings in ecitv opeiyo elcmuainand computation real of complexity Descriptive ial eapyorrslst eemn h data the determine to results our apply we Finally . lmSu-ml ahns ecitv complex- descriptive machines, Blum-Shub-Smale • ; [email protected] • ahmtc fcomputing of Mathematics R hoyo computation of Theory [email protected] n a a e Bussche den Van Jan oevr eetbihta nBoolean on that establish we Moreover, . nvriyo Helsinki of University . ; asl University Hasselt ik Hannula Miika iieMdlTheory Model Finite rbblsi neednelogic independence probabilistic Belgium Finland → ; oesof Models Complex- → permission NP dhr o orproa s.Ntfrrdsrbto.Tedfiiiev definitive The redistribution. for Not use. personal your for here ed Proba- licensed ∃ e are ies com- r R opies ,to h, and red. (a or e e cec LC 2) uy81,22,Sabükn emn,A Germany, Saarbrücken, 2020, 8–11, July ’20), (LICS Science ter where itm.22.Dsrpiecmlxt fra computation real of complexity Descriptive 2020. Virtema. Format: Reference ACM tig fras hl h ou spiaiyo languages on primarily is focus the While reals. of strings e oteramo S ahns uha nondeterministic as ( such machines, time BSS polynomial Many of step. realm trans- the theory time to complexity fer single classical a from compute in classes can reals complexity which over and functions numbers rational real that arbitrary registers store with can machines access random essentially are machines Blum-Shub-Smale ad n in and hand, nqaiisadeulte.Kont be to Known equalities. and inequalities ypsu nLgci optrSine(IS’0,Jl 8–11 July ’20), Germany. Saarbrücken, (LICS Science Computer in Logic on Symposium In logic. independence abilistic is sltda opeiycasi t w ih n[ in right own theory. its in graph class geometric complexity in a role as considerable isolated central exis- First attracting its The today to question. is due open reals interest the major of a theory is tential theory this of plexity form the of are and reals the about true are reals that the sentences of theory existential The Introduction 1 ∃ rbe fdcdn hte oyo a egaddby [ guarded guards be of number can given polygon a a whether deciding of problem e scmlt for classi- complete been as have fied problems geometric decade and past algebraic the several In reductions. polynomial-time under reals ik anl,Jh otnn a a e ush,adJonni and Bussche, den Van Jan Kontinen, Juha Hannula, Miika R h xseta hoyo h el scoeycnetdto connected closely is reals the of theory existential The sdfie stecoueo h xseta hoyo the of theory existential the of closure the as defined is ϕ saqatfirfe rtmtcfruacontaining formula arithmetic quantifier-free a is [email protected]..jp PSPACE [email protected] nvriyo Helsinki of University okioUniversity Hokkaido ∃ NP asl University Hasselt x uaKontinen Juha on Virtema Jonni 1 ∃ C,NwYr,N,USA, NY, York, New ACM, . . . R R nteohrhn [ hand other the on vrlnugscnitn ffinite of consisting languages over ) Belgium Finland eeteapei h r gallery art the is example recent a ; Japan ∃ x 1 n rceig fte3t nulACM/IEEE Annual 35th the of Proceedings BSmciefrsot which short) for machine (BSS ]. ϕ ( x 1 , . . . , ossso first-order all of consists x n NP ) , 6 rinwspublished was ersion ,teeatcom- exact the ], hr nteone the on -hard 15 pages. M New CM, n prob- and hps://doi.org/10.1145/3373718.3394773 2020, , 25 ], LICS ’20, July 8–11, 2020, Saarbrücken, Germany M. Hannula, J. Kontinen, J. Van den Bussche, and J. Virtema

0 0 over some numerical domain (e.g., reals or complex num- BP(S-NP[0,1]) BP(NPR) bers), also Boolean inputs (strings over {0, 1}) can be con- NP ⊆ = ∗ ⊆ = ⊆ PSPACE sidered. In this context ∃R corresponds to the Boolean part ∃[0, 1]≤ ∃R 0 0 of NPR (BP(NPR)), obtained by restricting NPR to Boolean inputs and limiting the use of machine constants to 0 and 1, 0 0 S-NP[0,1] NPR as feasibility of Boolean combinations of polynomial equa- ≡ ∗ ⊂∗ ≡ tions is complete for both of these classes [5, 26]. L-ESO[0,1][+, ×, ≤, 0, 1] ESOR[+, ×, ≤, 0, 1] BSS computations can also be described logically. This re- ≡ ∗ search orientation was initiated by Grädel and Meer who FO(⊥⊥c) showed that NPR is captured by a variant of existential second- Table 1. Known complexity results and logical character- order logic (ESOR) over metafinite structures [15]. Metafinite isations together with the main results of this paper. The structures are two-sorted structures that consist of a finite results of this paper are marked with an asterisk (*). The structure, an infinite domain with some arithmetics (such as top figure is with respect to Boolean inputs; on the bottom the reals with multiplication and addition), and weight func- figure, the inputs can include real numbers. tions bridging the two sorts [13]. Since the work by Grädel and Meer, others (see, e.g., [8, 18, 24]) have shed more light upon the descriptive complexity over the reals mirroring the +, , , R development of classical descriptive complexity. In addition languages (denoted by S-NP[0,1]) with L-ESO[0,1][ × ≤ (r)r ∈ ] to metafinite structures, the connection between logical de- that is a natural sublogic of ESOR. Likewise, we isolate a finability encompassing numerical structures and computa- fragment ∃[0, 1]≤ of the ∃R and show that 0 tional complexity has received attention in constraint databases it coincides with the class of Boolean languages in S-NP[0,1]. [2, 14, 23]. A constraint database models, e.g., geometric Moreover we establish a topological characterisation of the data by combining a numerical context structure, such as the languages decidable by S-BSS machines; we show that, un- real arithmetic, with a finite set of quantifier-free formulae der certain natural restrictions, languages decidable by S- defining infinite database relations [20]. BSS machines are countable disjoint unions of closed sets In this paper we investigate the descriptive complexity of in the usual topology of Rn. The topological characterisa- -called probabilistic independence logic in terms of the BSS tion separates the languages decidable by BSS machines and model of computation and the existential theory of the re- S-BSS machines, respectively. Moreover it enables us to sep- als. Probabilistic independence logic is a recent addition to 0 0 arate the complexity classes S-NP[0,1] and NPR. Finally we the vast family of new logics in team semantics. In team se- show the equivalence of the logics L-ESO[0,1][+, ×, ≤, 0, 1] mantics [27] formulae are evaluated with respect to sets of 0 and FO(⊥⊥c), implying that FO(⊥⊥c)≡ S-NP[0,1]. Table 1 sum- assignments which are called teams. During the past decade marises the main results of the paper. research on team semantics has flourished with interesting Structure of the paper. Section 2 gives the basic defini- connections to fields such as database theory [17], statistics tions on descriptive complexity, BSS machines, and logics [7], hyperproperties [22], and quantum information theory on R-structures required for this paper. Section 3 focuses [19], just to mention a few examples. The focus of this arti- in giving logical characterisations of variants of NP on S- cle is probabilistic team semantics that extends team based BSS machines. In Section 4 we establish the aforementioned logics with probabilistic dependency notions. While the first topological characterisation of S-BSS decidable languages. ideas of probabilistic teams trace back to [11, 19], the system- In Section 5 we prove a hierarchy of the related complexity atic study of the topic was initiated by the works [9, 10]. 0 0 classes; in particular we separate S-NP and NPR. Section At the core of probabilistic independence logic FO(⊥⊥ ) [0,1] c 6 deals with probabilistic team semantics and establishes is the concept of conditional independence. The models of that FO(⊥⊥ )≡ S-NP0 . Section 7 concludes the paper. this logic are finite first-order structures but the notion of a c [0,1] team is replaced by a probabilistic team, i.e., a discrete prob- ability distribution over a finite set of assignments. In [10] it 2 Preliminaries was observed that probabilistic independence logic is equiv- A vocabulary is relational (resp., functional) if it consists of alent to a restriction of ESOR in which the weight functions only relation (resp., function) symbols. A structure is rela- are distributions. The exact complexity and relationship of tional if it is defined over a relational vocabulary. We let FO(⊥⊥c) to ESOR and NPR was left as an open question; in Var1 and Var2 denote disjoint countable sets of first-order this paper we present a (strict) sublogic of ESOR and a (strict) and function variables (with prescribed arities), respectively. subclass of NPR that both capture FO(⊥⊥c). We write xì to denote a tuple of first-order variables and |ìx | Our contribution. In this paper we introduce a novel to denote the length of that tuple. The arities of function variant of BSS machines called Separate Branching BSS ma- variables f and relation symbols R are denoted by ar(f ) and chines (S-BSS machines for short) and characterise its NP ar(R), respectively. If f is a function with domain Dom(f ) Real computation and probabilistic team semantics LICS ’20, July 8–11, 2020, Saarbrücken, Germany and A a set, we define f ↾ A to be the function with do- {+, ×, SUM}, E ⊆ {=,<, ≤}, and C ⊆ R. The set of τ ∪ σ- main Dom(f ) ∩ A that agrees with f for each element in formulae of ESOR[O, E,C] is defined via the grammar: its domain. Given a finite set D, a function f : D → [0, 1] ϕ ::= x = y | ¬x = y | iej | ¬iej | R(ìx) | ¬R(ìx) | that maps elements of D to elements of the closed interval = ∧ | ∨ | ∃ | ∀ | ∃ , [0, 1] of real numbers such that s ∈D f (s) 1 is called a ϕ ϕ ϕ ϕ xϕ xϕ f ψ Í (probability) distribution. where i and j are numerical σ-terms constructed using op- erations from O and constants from C, and e ∈ E, R ∈ τ is 2.1 R-structures a relation symbol, f is a function variable, x and y are first- Let τ be a relational vocabulary. A τ -structure is a tuple order variables and xì a tuple of first-order variables, and ψ A = A A (A, (R )R ∈τ ), where A is a nonempty set and each R an is a τ ∪(σ ∪ {f })-formula of ESOR[O, E,C]. ar(R)-ary relation on A. The structure A is a finite structure if τ and A are finite sets. In this paper, we consider struc- Note that the syntax of ESOR[O, E,C] allows first-order tures that enrich finite relational τ -structures by adding real subformulae to appear only in negation normal form. This numbers (R) as a second domain sort and functions that map restriction however does not restrict the expressiveness of tuples over A to R. the language. The semantics of ESOR[O, E,C] is defined via R-structures Definition 2.1. Let τ and σ be respectively a finite rela- and assignments analogous to first-order logic; note that tional and a finite functional vocabulary, and let X ⊆ R. An first-order variables are always assigned to a value in A whereas X -structure of vocabulary τ ∪ σ is a tuple functions map tuples over A to R. In addition to the clauses A A of first-order logic, we have the following semantical clauses: A = (A, R, (R )R ∈τ , (g )g ∈σ ), A = A A A = A = | s iej ⇔[i]s e [j]s , | s ¬iej ⇔ 6| s iej, where the reduct of A to τ is a finite relational structure, A A = ∃ A = ar(f ) R and each g is a weight function from Aar(g) to X . Addition- | s fϕ ⇔ [h/f ]| s ϕ for some h : A → , (1) A ally, an d[0, 1]-structure is defined analogously, with the where A[h/f ] is the expansion of A that interprets f as h. exception that the weight functions gA are distributions. Given S ⊆ R, we define ESOS [O, E,C] as the variant of , , ar(f ) An assignment is a total function s : Var → A that ESOR[O E C] in which (1) is modified such that h : A → 1 , , assigns a value for each first-order variable. The modified S, and ESOd[0,1][O E C] as the variant in which (1) is mod- ar(f ) assignment s[a/x] is an assignment that maps x to a and ified such that h : A → [0, 1] is a distribution, that is, Σ = aì∈Aar(f )h(ìa) 1. Note that in the setting of ESOd[0,1][O, E,C] agrees with s for all other variables. A Next, we define a variant of functional existential second- the value f of a 0-ary function symbol f is always 1. order logic with numerical terms (ESOR) that is designed Loose fragment. For both S ⊆ R and S = d[0, 1], de- to describe properties of R-structures. As first-order terms fine L-ESOS [O, E,C] as the loose fragment of ESOS [O, E,C] we have only first-order variables. For a set σ of function in which negated numerical atoms ¬iej are disallowed. We symbols, the set of numerical σ-terms i is generated by the want to point out that as long as = ∈ E and 0, 1 ∈ C, the logic following grammar: L-ESOS [O, E,C] subsumes existential second-order logic over = + finite structures (a precise formulation is given later by Propo- i :: c | f (ìx)| i × i | i i | SUMyì i, sition 3.1). where c ∈ R is a real constant denoting itself, f ∈ σ, and xì Expressivity comparisons. Fix a relational vocabulary τ and yì are tuples of first-order variables from Var such that 1 and a functional vocabulary σ. Let L and L′ be some log- the length of xì is ar(f ). The value of a numerical term i in A ics over τ ∪ σ defined above, and let X ⊆ R or X = d[0, 1]. a structure A under an assignment s is denoted by [i] . In s For a formula ϕ ∈ L, define StrucX (ϕ) to be the class of addition to the natural semantics for the real constants, we X -structures A of vocabulary τ ∪ σ such that A |= ϕ. We have the following rules for the numerical terms: ′ write L ≤X L if for all sentences ϕ ∈ L there is a sen- A A A A A ′ X = X [f (ìx)] := f (s(ìx)), [i × j] := [i] ·[j] , tenceψ ∈ L such that Struc (ϕ) Struc (ψ ). As usual, the s s s s = R A A A A A shorthand ≡X stands for ≤X in both directions. For X , [i + j] := [i] + [j] , [SUM i] := [i] , yì s Õ s[ìa/ìy] we write simply ≤ and ≡. |ìy | aì∈A In plain words, the subscript S in ESOS [O, E,C] consti- where +, ·, are the addition, multiplication, and summa- tutes the class of functions available for quantification, whereas X tion of realÍ numbers, respectively. the superscript X in Struc (ϕ) constitutes the class of func- tions available for function symbols in the vocabulary. Thus, X Definition 2.2 (Syntax of ESOR). Let τ be a finite relational ϕ ∈ ESOS [O, E,C] defines a class Struc (ϕ), even if S and X vocabulary and σ a finite functional vocabulary. Let O ⊆ are different. LICS ’20, July 8–11, 2020, Saarbrücken, Germany M. Hannula, J. Kontinen, J. Van den Bussche, and J. Virtema

∗ ∗ 2.2 Blum-Shub-Smale Model fM : R → R of a machine M is now defined in the obvious R∗ R∗ = We will next give a definition of BSS machines (see e.g. [3]). manner. A function f : → is computable if f fM R∗ We define R∗ := {Rn | n ∈ N}. The size |x | of x ∈ Rn is for some machine M. A language L ⊆ is decided by a BSS R∗ R∗ defined as n. TheÐ space R∗ can be seen as the real analogue machine M if its characteristic function χL : → is fM . Σ∗ Σ R of for a finite set . We also define ∗ as the set of all Deterministic complexity classes. A machine M runs in = R R sequences x (xi )i ∈Z where xi ∈ . The members of ∗ (deterministic) time t : N → N, if M reaches the output in are thus of the form (..., x−2, x−1, x0, x1, x2,...). Given an t(|x |) steps for each input x ∈ I. The machine M runs in R∗ R element x ∈ ∪ ∗ we write xi for the ith coordinate of polynomial time if t is a polynomial function. The complex- R ∗ x. The space ∗ has natural shift operations. We define shift ity class PR is defined as the set of all subsets of R that are R R R R = left σl : ∗ → ∗ and shift right σr : ∗ → ∗ as σl (x)i : decided by some machine M running in polynomial time. xi+1 and σr (x)i := xi−1. Nondeterministic complexity classes. A language L ⊆ Definition 2.3 (BSS machines). A BSS machine consists of R∗ is decided nondeterministically by a BSS machine M, if an input space I = R∗, a state space S = R , and an output ∗ ′ = ′ R∗ space O = R∗, together with a connected directed graph x ∈ L if and only if fM ((x, x )) 1, for some x ∈ , ,..., whose nodes are labelled by 1 N . The nodes are of five when a slightly different input mapping gI : I → S, which different types. ′ ′ places an input (x1,..., xn, x1,..., xm) in the state 1. Input node. The node labeled by 1 is the only input (..., 0, n,m, x ,..., x , x ′,..., x ′ ,...) ∈ S, node. The node is associated with a next node β(1) 1 n 1 m ′ and the input mapping gI : I → S. where the sizes of x and x are respectively placed on the 2. Output node. The nodelabeled by N is the only output first two coordinates, is used. When we consider languages node. This node is not associated with any next node. that a machine M decides nondeterministically, we call M Once this node is reached, the computation halts, and nondeterministic. Sometimes when we wish to emphasize the result of the computation is placed on the output that this is not the case, we call M deterministic. Moreover, space by the output mapping gO : S → O. we say that M is [0,1]-nondeterministic, if the guessed strings 3. Computation nodes. A computation node m is associ- x ′ are required to be from [0, 1]∗. L is decided in time t : N → N ated with a next node β(m) and a mapping gm : S → , if, for every x ∈ L, M reaches the output 1 in t(|x |) steps S such that for some c ∈ R and i, j, k ∈ Z the mapping for some x ′ ∈ R∗. Themachine runs in polynomial time if t is gm is identity on coordinates l , i and on coordinate a polynomial function. The class NPR consists of those lan- i one of the following holds: guages L ⊆ R∗ for which there exists a machine M that non- • gm (x)i = xj + xk (addition), deterministically decides L in polynomial time. Note that, in ′ • gm (x)i = xj − xk (subtraction), this case, the size of x above can be bounded by a polyno- • gm (x)i = xj × xk (multiplication), mial (e.g., the running time of M) without altering the defini- • gm (x)i = c (constant assignment). tion. The complexity class NPR has many natural complete 4. Branch nodes. A branch nodem is associated with nodes problems such as 4-FEAS, i.e., the problem of determining β−(m) and β+(m). Given x ∈ S the next node is β−(m) whether a polynomial of degree four has a real root [4]. if x ≤ 0, and β+(m) otherwise. 0 Complexity classes with Boolean restrictions. If we re- 5. Shift nodes. A shift node m is associated either with strict attention to machines M that may use only c ∈ {0, 1} shift left σ or shift right σ , and a next node β(m). l r in constant assignment nodes, then the corresponding com- The input mapping gI : I → S places an input (x1,..., xn) plexity classes are denoted using an additional superscript 0 in the state 0 (e.g., as in NPR). Complexity classes over real computa- tion can also be related to standard complexity classes. For (..., 0, n, x1,..., xn, 0,...) ∈ S, a complexity class C over the reals, the Boolean part of C, where the size of the input n is located at the zeroth coordi- written BP(C), is defined as {L ∩ {0, 1}∗ | L ∈ C}. nate. The output mapping gO : S → O maps a state to the string consisting of its first l positive coordinates, where l Descriptive complexity. Similar to Turing machines, also is the number of consecutive ones stored in the negative BSS machines can be studied from the vantage point of de- coordinates starting from the first negative coordinate. For scriptive complexity. To this end, finite R-structures are en- instance, gO maps coded as finite strings of reals using so-called rankings that stipulate an ordering on the finite domain. Let A be an R- (..., 2, 1, 1, 1, n, x , x , x , x ,...) ∈ S, 1 2 3 4 structure over τ ∪ σ where τ and σ are relational and func- to (x1, x2, x3) ∈ O. A configuration at any moment of com- tional vocabularies, respectively. A ranking of A is any bijec- putation consists of a node m ∈ {1,..., N } and a current tion π : Dom(A) → {1,..., |A|}. A ranking π and the lexico- k k state x ∈ S. The (sometimes partial) input-output function graphic ordering on N induce a k-ranking πk : Dom(A) → Real computation and probabilistic team semantics LICS ’20, July 8–11, 2020, Saarbrücken, Germany

k − {1,..., |A| } for k ∈ N. Furthermore, π induces the follow- x0 ≥ ϵ+, β (m) if x0 ≤ ϵ−, and otherwise the input is A A ing encoding encπ (A). First we define encπ (R ) and encπ (f ) rejected. for R ∈ τ and f ∈ σ: Note that for a given S-BSS machine it is easy to write an • Let R ∈ τ be a k-ary relation symbol. The encoding A k equivalent BSS machine. A priori it is not clear whether the encπ (R ) is a binary string of length |A| such that the A converse is possible; in fact, we will later show that in some jth symbol in encπ (R ) is 1 if and only if (a1,..., ak ) ∈ A cases the converse is not possible. R , where π (a ,..., a ) = j. k 1 k We can now define the variants of the complexity classes • Let f ∈ σ be a k-ary function symbol. The encod- 0 0 A k PR, PR, NPR, and NPR that are obtained by replacing BSS ing encπ (f ) is string of real numbers of length |A| A A machines with S-BSS machines in the definitions of the com- such that the jth symbol in encπ (f ) is f (ìa), where 0 plexity classes. Furthermore, we define NP[0,1], and NP , πk (ìa) = j. [0 1] as the variants of NPR, and NP0 in which the input x may The encoding enc (A) is then the concatenation of the string R π be any element from R∗ but the guessed element x ′ must (1,..., 1) of length |A| and the encodings of the interpre- be taken from [0, 1]∗. Let C be one of the aforementioned tations of the relation and function symbols in τ ∪ σ. We complexity classes. We define S-C to be the variant of C, denote by enc(A) any encoding enc (A) of A. π where, instead of BSS machines, S-BSS machines are used. Let C be a complexity class and ESO [O, E,C] a logic, S If C includes the superscript 0, this means that not only the where O ⊆ {+, ×, SUM}, E ⊆ {=,<, ≤}, C ⊆ R, and S ⊆ R parameter c in constant assignment, but also ϵ and ϵ+ in or S = d[0, 1]. Let X ⊆ R or X = d[0, 1], and let S be an ar- − separate branching are from {0, 1}. bitrary class of X -structures over τ ∪ σ that is closed under isomorphisms. We write enc(S) for the set of encodings of structures in S. Consider the following two conditions: 3 Descriptive complexity of (i) enc(S) = {enc(A) | A ∈ StrucX (ϕ)} for some ϕ ∈ nondeterministic polynomial time in ESOS [O, E,C][τ ∪ σ]}, S-BSS (ii) enc(S) ∈ C. We now show that S-NP[0,1] corresponds to a numerical vari- If (i) implies (ii), we write ESOS [O, E,C] ≤X C, and if the ant of ESO in which quantified functions take values from vice versa holds, we write C ≤X ESOS [O, E,C]. If both di- the unit interval and numerical inequality atoms only ap- rections hold, then we write ESOS [O, E,C] ≡X C. We omit pear positively. Later we show that both of these restrictions the subscript X in the notation if X = R. are necessary in the sense that removing either one lifts + The following results due to Grädel and Meer extend Fa- expressiveness to the level of ESOR[ , ×, ≤, (r)r ∈R] which gin’s theorem to the context of real computation.1 captures NPR. On the other hand, we give a logical proof, based on topological arguments, that S-NP < NPR. The + [0,1] Theorem 2.4 ([15]). ESOR[ , ×, ≤, (r)r ∈R]≡ NPR and proof of Theorem 3.3 is a nontrivial adaptation of the proof + 0 ESOR[ , ×, ≤] ≡ NPR. of Theorem 2.4 (see [15, Theorem 4.2]). In the proof we ap- ply Lemma 3.2 and, by Proposition 3.1, assume without loss 2.3 Separate Branching BSS of generality built-in ESO definable predicates on the finite We now define a restricted version of the BSS model which part. − branches with respect to two separated intervals (−∞, ϵ ] ( + ) + Let 0 and 1 be distinct constants, d a k 1 -ary distri- and [ϵ , ∞). We will later relate these BSS machines to cer- bution, and R a k-ary relation on a finite domain A of size tain fragments of ESOR and the existential theory of the re- n. We say that d is the characteristic distribution of R (w.r.t. als. 0 and 1) if aì ∈ R implies d(ìa, 1) = 1 , and aì < R implies nk (ì, ) = 1 Definition 2.5 (Separate Branching BSS Machine). Sepa- d a 0 nk . The next proposition implies that it is possi- rate branching BSS machines (S-BSS machines for short) are ble to simulate existential quantification of ESO definable otherwise identical to the BSS machines of Definition 2.3, ex- predicates on the finite domain using function (or distribu- cept that the branch nodes are replaced with the following tion) quantification; in particular, we may assume without separate branch nodes. loss of generality built-in predicates such as a linear order- ing and its induced successor relation on the finite domain. • Separate branch nodes. A separate branch node m is + Clearly, any predicate that is ESO-definable over finite struc- associated with ϵ , ϵ+ ∈ R, ϵ < ϵ+, and nodes β (m) − − tures is also ESO-definable (w.r.t. the finite domain) over R- and β−(m). Given x ∈ S the next node is β+(m) if structures. , , , ∃ 1Only the first equivalence is explicitly stated in [15]. The second, how- Below, we write L-ESOS [O E C X ] to denote the exten- ever, is a simple corollary, using the fact that 0 and 1 can be identified in sion of L-ESOS [O, E,C] by existential quantification of rela- ESOR[+, ×, ≤]; these two are the only idempotent reals for multiplication, tions over the finite domain with the usual semantics. and 0 is the only idempotent real for addition. LICS ’20, July 8–11, 2020, Saarbrücken, Germany M. Hannula, J. Kontinen, J. Van den Bussche, and J. Virtema

◦ Proposition 3.1. Let {0, 1} ⊆ S and O, E,C be arbitrary. (t1 ≤ t2) as For every formula ϕ ∈ L-ESOS [O, E,C, ∃X ] there exist for- ′ ∈ [ , ∪ {=}, ∪ { , }] ′′ ∈ g (ìx ) = 1 ∧ g (ìx ) = 1 mulas ϕ L-ESOS O E C 0 1 and ϕ L- Ü  Û si si rj rj ESOd[0,1][O, E ∪ {=},C] such that, for every R-structure A I ⊆I i ∈I J ⊆J j ∈J and assignment s, ∧ gs (ìxs ) = 0 ∧ gr (ìxr ) = 0 A |= ⇔ A |= ′ ⇔ A |= ′′. Û i i j j s ϕ s ϕ s ϕ i ∈I\I j ∈J\J Proof. The sentence ϕ′ (ϕ′′, resp.) is obtained from ϕ by a ∧ + ≤ + . translation that is the identity function, except that, for second- Õ si Õ rj Õ si Õrj  order variables X of arity k, we rewrite the quantifications i ∈I j ∈J\J i ∈I\I j ∈J ∃X as ∃f , where f is a k-ary ((k + 1)-ary, resp.) function X X Finally the subformula θ makes sure that the signs of the variable, and the atoms X (ìx) and ¬X (ìx) by f (ìx) = 1 and X terms in p ∈ M propagate correctly from subterms to terms. f (ìx) = 0 (f (ìx, 1) = u(ìx) and f (ìx, 0) = u(ìx), resp.), re- X X X Define θ as spectively. Here, u is the k-ary uniform distribution which ′ ′ is definable in L-ESO , [=] by ∀xìxì u(ìx) = u(ìx ).  d[0 1] ∀xì gp (ìx) = 0 ∨ gp (ìx) = 1 ∧ gc = 1 ∧ gd = 0 Û  + p ∈M Lemma 3.2. If {0, 1} ⊆ C, we have L-ESO[0,1][ , ×, ≤,C]≡ c ∈M∩[0,∞] , L-ESO[−1,1][+, ×, ≤,C]. d ∈M∩[−∞ 0) = = Proof. Left-to-right direction is straightforward; the quan- ∧ gq (ìxq) gr (ìxr ) ∧ gp (ìxp ) 1 Û   ∃ [+, ×, ≤, ] p,q,r ∈M tification f ψ in L-ESO[0,1] C can be simulated in p=q×r L-ESO[−1,1][+, ×, ≤,C] by the formula ∃f (∀xì 0 ≤ f (ìx) ∧ψ ). ∨ gq (ìxq) = 0 ∧ gr (ìxr ) = 1 ∧ gp (ìxp ) = 0 The converse direction is nontrivial. Let ϕ be an arbitrary  [+, ×, ≤, ] L-ESO[−1,1] C -formula. We will show how to con- ∨ gq (ìxq) = 1 ∧ gr (ìxr ) = 0 ∧ gp (ìxp ) = 0 . ′  struct an equivalent L-ESO[0,1][+, ×, ≤,C]-formulaϕ . By the  standard Skolemization argument we may assume that ϕ is Note that the sign function maps terms of value 0 to either in the prenex normal form. Moreover, we assume that ev- 0 or 1, since for the purpose of the construction the sign of ery atomic formula of the form t1 ≤ t2 is written such that 0 valued terms does not matter.  t1 and t2 are multivariate polynomials where function terms f (ìx) play the role of variables; this normal form is obtained +, , , R Theorem 3.3. L-ESO[0,1][ × ≤ (r)r ∈ ]≡ S-NP[0,1]. by using the distributive laws of addition and multiplication.

Let M be the smallest set that includes every term of poly- Proof. Right-to-le direction. Suppose L ∈ S-NP[0,1] is a nomials t1 and t2 such that t1 ≤ t2 is a subformula of ϕ, and class of R-structures that is closed under isomorphisms. By is closed under taking subterms. Clearly M is a finite set, Lemma 3.2 it suffices to construct an L-ESO[−1,1][+, ×, ≤, R] for its cardinality is bounded by the length of ϕ. For each sentence ϕ such that A |= ϕ iff A ∈ L for all R-structures A. p ∈ M with m variables, we introduce an m-ary function Let M be an S-BSS machine such that M consists of N nodes, ′ ′ ∗ gp that will be interpreted as the sign function for the term and for each input x it accepts (x, x ) for some x ∈[0, 1] in ∗ ∗ p. Let xìp be the related tuple of variables. The idea is that time |x |k iff x = enc(A) for some A ∈ L, where k is some ′ gp (ìa) = 0(gp (ìa) = 1) if p(ìa) < 0(p(ìa)≥ 0). fixed natural number. We may assume that |x | is of size ∗ ∗ We are now ready to define the translation ϕ 7→ ϕ′, where |x |k . Let k be a fixed natural number such that |x |k ≤ |A|k ; such a k always exists since |enc(A)| is polynomial in |A|. ϕ = ∃f1 ... ∃fmQ1x1 ... Qnxn ψ The computation of M on a given input enc(A) can be rep- is in the normal form mentioned above. We define resented using functions f : A2k+1 → (−1, 1), g : A2k+1 → k ′ ◦ (0, 1], and h1,...,hN : A → {0, 1} such that ϕ := ∃ gp ∃f1 ... ∃fmQ1x1 ... Qnxn(θ ∧ ψ ), p ∈M (a) f (ìs, tì)/g(ìs, tì) is the content of register sì at time tì; ◦ where the recursively defined translation is homomorphic (b) hi (tì) is 1 if i is the node label at time tì, and 0 otherwise. for the Boolean connectives and identity for first-order lit- Note that sì is (k + 1)-ary because we need to store |A|k posi- erals. tive and negative register contents. We may assume k such + + For atomic formulae t1 ≤ t2 of the form s1 ··· sl ≤ that registers with index greater than |A|k do not contribute + + r1 ··· rm the translation is defined as follows. The trans- to the final outcome, i.e., their contents are never shifted to lation makes certain that every term (of polynomial) of the registers associated with the nodes of M. Construct a for- inequation after the translation has a non-negative value; mula this is done by moving terms to the other side of the inequa- tion. Denote I = {1,...,l} and J = {1,...,m}, and define ψ (f ,g,h) := θpre ∧ θinitial ∧ θcomp ∧ θaccept Real computation and probabilistic team semantics LICS ’20, July 8–11, 2020, Saarbrücken, Germany of L-ESO[−1,1][+, ×, ≤, (r)r ∈R] such that A |= ∃f ghψ iff M sum of the ordinal number of yì and rf ∗ . Clearly sì = yì+rf ∗ is accepts enc(A). By Proposition 3.1 we may assume a built- expressible in our logic. We then add the following to θinitial: in ordering ≤ and its induced successor relation S and fin ∀ = + = ∗ , , sìyì sì yì rf ∗ → f (ìs, 0ì) f (ìy)× g(ìs, 0ì) (5) constants 0 1 max on the finite domain. Likewise, we may Û   f ∗ ∈τ extend ≤fin to order also k-tuples from the finite domain. + Under such ordering we then write xì 1 (xì − 1) for the Note that (2) and (5) imply that f (ìs, 0ì) ∈ (−1, 1); for, by element succeeding (preceding) a k-tuple xì, and nì for the n- (2), |f (s, 0)| = 1 leads to g(s, 0) = 0 which contradicts (5). th k-tuple. First, θpre is the conjunction of a formula stating The interpretations of relations in σ are treated analogously. that the ranges of g and h are as stated, and another formula For all the remaining positions sì > sì0 we stipulate that 0 ≤ 2 ∀yì f (ìy) + g(ìy) = 1, (2) f (ìs, 0ì) ≤ g(ìs, 0ì), and for all positions sì < sì0 we stipulate that f (ìs, 0ì) = 0. In the first case f (ìs, 0ì)/g(ìs, 0ì) is some value where f (ìy)2 is a shorthand for f (ìy)× f (ìy). Observe that (2) guessed from the unit interval [0, 1] and in the second case implies f (ìy) f (ìy) it is 0. We conclude that (3) holds by this construction. = . Computation configurations. Then we define θ such that g(ìy) (1 − f (ìy)2) comp Also, x 7→ x/(1 − x 2) is a bijection from (−1, 1) to R. That ì (A, f ,g,h) |= θcomp the range of f is (−1, 1) will follow from the remaining con- ì juncts of ψ , described below. iff (f ,g,h) satisfies (a) and (b) at time tì > 0ì. (6) Initial configuration. We give a description of θinitial such that We let

(A, f ,g,hì)|= θ = ∀ìì (ì) = ∨ ′ (ì) = ∧ initial θcomp : s t  Ü hm t 0 hm t 0 1≤m

, , , , coordinates −2 −1 1 respectively contain 0 1 1;wealsoneed Ciaì holds for the calculated value of the variables. For each l to state that the machine is in node N at the last step: aì = (a1,..., al ) ∈ {0,...,d − 1} , placed on the coordinates = = = b1,...,bl , the machine uses x0 and cì for retrieving and plac- θaccept : hN (max ì ) 1 ∧ fsì +1,maxì gsì +1,maxì 0 0 ing g (ìa + ),...,g (ìa ) on the coordinates b + ,...,b . = = il +1 l 1 in n l 1 n ∧ fsì −1,maxì gsì −1,maxì ∧ fsì −2,maxì 0. 0 0 0 The machine then retrieves the index iaì and checks whether ì We conclude that A |= ∃f ghì ψ iff M accepts enc(A). Ciaì holds true with respect to the values on coordinates b. Once this process is completed for all value combinations Le-to-right direction. Let ϕ ∈ L-ESO[ , ][+, ×, ≤, R] be 0 1 l a sentence over some vocabulary σ ∪ τ . As in the previous (a1,..., al ) ∈ {0,...,d − 1} the computation halts with ac- lemma, we may assume that ϕ is of the form cept. The contents of the input are accessed using shifts which ∃ ∃ f1 ... fmQ1x1 ... Qnxn ψ, fix the contents of the allocated coordinates. That is, we use X where ψ is quantifier-free. We may further may transform operations σl , where X is a finite set of coordinates, such X = X = ϕ to an equivalent form that σl (x)i xi if i ∈ X , and otherwise σl (x)i xj where {0} ∃ ∃ ∃ ∃ ∀ ∀ ′ j = min{k ∈ N | k > i, k < X }. For instance, σ is obtained f1 ... fm gil +1 ... gin xi1 ... xil ψ , (7) l by first swapping x0 and x1 and then shifting left. ′ where gij are Skolem functions on the finite domain and ψ ì ì Also, if Ciaì contains a numerical atom f (t0) ≤ g(t1) × is obtained from ψ by replacing each occurrence of xi , l + j h(tì2), then the values of its constituent function terms with 1 ≤ j ≤ n, with g (ìx ). Note that (7) is an intermediate ij j respect to bì are placed on coordinates i, j, k. The machine expression which is not anymore in L-ESO[0,1][+, ×, ≤, R]. ′ then sets xa ← xi − xj × xk , and if xa ≤ 0, then it continues We may assume ψ is in disjunctive normal form i ∈I Ci , to the next atom in C , and else it rejects. If C contains where I is a finite set of indices. Ô iaì iaì a relational atom R(ìx0), then the value of its characteristic Suppose the relational and function symbols in σ ∪ τ ∪ function with respect to bì is placed on coordinate a. If x = {f ,..., f } are of arity at most n′ ≥ n. First, a fixed ini- a 1 m 1, then the machine moves to the next atom in C , and else tial segment of negative coordinates is allocated with the iaì it rejects. Negated relational atoms are treated analogously, following intention: and the stated branching is straightforward to implement • one coordinate a for separate branching, with separate branch nodes. • three coordinates i, j, k for numerical identity atoms, It follows from our construction that M runs in polyno- ì • two sequences of coordinates b = (b1,...,bn) and cì = mial time and accepts (x, x ′) iff items 1 and 2 hold. Hence, (c1,...,cn′ ) for elements of the finite domain. +, , , R  we conclude that L-ESO[0,1][ × ≤ (r)r ∈ ]≤ S-NP[0,1]. We construct a machine M which runs in polynomial time and accepts (x, x ′) iff Suppose we above consider (i) guesses from R instead of [ , ] 1. x = enc(A) where A is a model over σ ∪ τ , and 0 1 , or (ii) BSS instead of S-BSS machines. Then slightly modified proofs yield (i) L-ESOR[+, ×, ≤, (r) R] ≡ S-NP , 2. (x, x ′) is a concatenation of enc((A, fì,gì)) and indices r ∈ R and (ii) ESO[ , ][+, ×, ≤, (r)r ∈R]≡ NP[ , ]. Furthermore, log- i ∈ I such that (A, fì,gì, aì) |= C for each aì ∈ Al . 0 1 0 1 aì iaì ical constants r ∈ R \ {0, 1} are only needed to capture ì + − We may suppose that f and (ìg, (iaì)aì∈Al ) are respectively en- c in constant assignment and ϵ , ϵ in separate branching, coded as strings of reals and integers. and for the converse direction only those machine constants Let p′ be a polynomial such that for each A over σ ∪τ we r ∈ R\{0, 1} which explicitly occur in the logical expression have p′(|A|) = enc(A). The machine first checks whether are needed. Thus we obtain the following corollary. there is a natural number d such that p′(d) = |x |. For this, it ′ Corollary 3.4. first sets xi ← 1 and xa ← x0 − p (xi ), where initially x0 = + |x |. If xa = 0, then x0 ← xi , and if xa ≥ 1, then xi ← xi + 1 1. L-ESOR[ , ×, ≤, (r)r ∈R]≡ S-NPR, + 0 and the process is repeated. Otherwise, if xa < {0}∪[1, ∞), 2. L-ESOR[ , ×, ≤, 0, 1]≡ S-NPR, +, , , , 0 the input is rejected. This type of branching can be imple- 3. L-ESO[0,1][ × ≤ 0 1]≡ S-NP[0,1], mented repeating separate branching twice. Provided that 4. ESO[0,1][+, ×, ≤, (r)r ∈R]≡ NP[0,1], the input is not rejected, this process terminates with x0 = d +, , , , 0 5. ESO[0,1][ × ≤ 0 1]≡ NP[0,1]. where p′(d) = |x |. The machine then checks whether item 1 holds; given |A| this is straightforward. Checking that (x, x ′) In the following two sections we investigate how S-BSS is a concatenation of enc((A, fì,gì)), for some functions fì,gì, computability relates to BSS computability, and in particular how S-NP relates to NPR. On the one hand it turns out and some indices iaì is analogous. [0,1] R It remains to be checked that the last claim of item 2 that S-NP[0,1] is strictly weaker than NP . On the other hand l holds. We go through all tuples aì ∈ A , calculate the val- both obvious strengthenings of S-NP[0,1], namely S-NPR and ues of the Skolem functions, and check that the disjunct NP[0,1], collapse to NPR. Real computation and probabilistic team semantics LICS ’20, July 8–11, 2020, Saarbrücken, Germany

4 Characterisation of S-BSS decidable and cìt are the initial configuration and a terminal configu- languages ration, respectively, and, for 1 ≤ m < t, cìm+1 is a succes- sor configuration of cì . Each configuration is a string of We give a characterisation of languages decidable by S-BSS m O( ) machines using the ideas from the previous section. The real numbers of length t . We can use a similar technique goal of this section is to establish the following theorem: as in the right-to-left direction of Theorem 3.3 and encode the contents of registers by pairs of real numbers from the Theorem 4.1. Every language that can be decided by a) a unit interval [0, 1]. In order to encode the computation, it deterministic S-BSS machine, or b) a [0, 1]-nondeterministic suffices to encode the values of O(t 2) registers; thus O(t 2) S-BSS machine in time t, for some function t : N → N, is a variables suffice. We then construct a formula of existential countable disjoint union of closed sets in the usual topology of loose [0, 1]-guarded real arithmetic of size O(t 2) that first ex- Rn . istentially quantifies O(t 2)-many variables in order to guess the whole computation of M on the given input and then The result complements an analogous characterisation of expresses, using perhaps at most polynomially many extra BSS-decidable languages thus giving insight on the differ- variables, that the computation is correct and accepting. We ence of the computational powers of BSS machines and S- omit further details, for the encoding is done in a similar BSS machines. manner as in the right-to-left direction of Theorem 3.3.  Theorem 4.2 ([3, Theorem 1]). Every language decidable by a (deterministic) BSS machine is a countable disjoint union of Given a deterministic S-BSS machine M, it is easy to see n N semi-algebraic sets. that the sets Lt (M), for n, t ∈ , are disjoint. However, the same does not need to hold for nondeterministic machines, These characterisationsare based on thefact that the com- putation of BSS and S-BSS machines can be encoded by for- for the time it takes to accept an input string x might depend on the guessed value for the string x ′ (and there may be mul- mulae of first-order real arithmetic. tiple accepting runs with different values for x ′). This prob- Existential theory of the real arithmetic. Formulae of lem can be evaded for languages L that can be decided by a the existential real arithmetic are given by the grammar [0, 1]-nondeterministic S-BSS machine N in time f ,forsome function f : N → N. In this case Ln(N ) = Ln (N ), for ϕ ::= i ≤ i | i < i | ϕ ∧ ϕ | ϕ ∨ ϕ | ∃xϕ, (8) ≤f (n) N = n = each n ∈ . Now since L(M) n,t ∈N Lt (M) and L(N ) where i stands for numerical terms given by the grammar n Ð n ∈N L (N ) where the unions are disjoint, we obtain the i ::= 0 | 1 | x | i × i | i + i, followingÐ characterisation. where x is a first-order variable. The semantics is defined Theorem 4.4. Every language decidable by a) a determin- R, +, , , , over a fixed structure ( × ≤ 0 1) of real arithmetic in istic S-BSS machine or b) a [0, 1]-nondeterministic S-BSS ma- the usual way. Relations definable by such formulae with chine in time t, for some t : N → N, is a countable disjoint additional real constants are called semi-algebraic. union of relations defined by existential loose [0, 1]-guarded Let M be an S-BSS machine and n, t ∈ N positive natu- n n real arithmetic formulae that may use real constants from ral numbers. We denote by Lt (M) (L ≤t (M), resp.) the set of some finite set. strings s ∈ Rn accepted by M in time exactly (at most, resp.) t, and define Ln (M) := L(M) ∩ Rn. The following restricted The rest of this section is dedicated on proving the fol- fragment of ∃FO is enough to encode S-BSS computations. lowing theorem, which together with Theorem 4.4 implies Theorem 4.1. Existential theory of the loose [0, 1]-guarded real arith- metic. Formulae of the existential loose [0, 1]-guarded real Theorem 4.5. Every relation defined by some existential loose arithmetic are defined as in (8), but without i < i and replac- [0, 1]-guarded real arithmetic formula ϕ(x ,..., x ) with real ∃ ∃ 1 n ing xϕ with x(0 ≤ x ≤ 1 ∧ ϕ). constants is closed in Rn . Lemma 4.3. Given a deterministic or [0, 1]-nondeterminis- Point-set topology. The proof of the theorem relies on tic S-BSS machine M and positive n, t ∈ N it is possible to some rudimentary notions and knowledge from point-set construct, in polynomial time, formulas ϕ andψ of loose [0, 1]- topology summarised in the following two lemmas (for ba- guarded real arithmetic, with free variables x ,..., x , that 1 n sics of point-set topology see, e.g., the monograph [28]). In may use real constants used in M such that order to simplify the notation, for a topological space X , we n { s(x1),..., s(xn) | (R, +, ×, ≤, (r)r ∈R) |=s ϕ} = L (M), use X to denote also the underlying set of the space. Like-  t R + = = n wise, in this section, we let [0, 1] denote the topological { s(x1),..., s(xn) | ( , , ×, ≤, (r)r ∈R) | s ψ } L ≤t (M).  space that has domain [0, 1] and the metric of Euclidean Proof. For a given input of length n, the computation of M distance. consists of t many configurations cì1,... cìt of M, where cì1 LICS ’20, July 8–11, 2020, Saarbrücken, Germany M. Hannula, J. Kontinen, J. Van den Bussche, and J. Virtema

0 < 0 < R Lemma 4.6. Let X and Y be topological spaces, f : X → Y a 1. S-NP[0,1] NPR and S-NP[0,1] NP , continuous function, A and B closed sets in X , and C a closed 2. L-ESO[0,1][+, ×, ≤, 0, 1] < ESOR[+, ×, ≤, 0, 1], set in Y . Then + + 3. L-ESO[0,1][ , ×, ≤, (rr ∈R)] < ESOR[ , ×, ≤, (r)r∈R]. • ∩ ∪ −1[ ] X , A B, A B, and f C are closed in X , Proof. We prove 1. by showing that there are languages in • × × the product A C is closed in the product space X Y , NP0 that are not in S-NP . The claims 2. and 3. then fol- • if Y ⊇ A is a subspace of X then A is closed in Y . R [0,1] low from the logical characterisations of Corollary 3.4.

Lemma 4.7. Let X be a topological space, Y a compact topo- Let L be a language in S-NP[0,1] and M an S-NP[0,1] S-BSS logical space, A a closed set in the product space X × Y , and f machine such that L(M) = L. Let p be a polynomial func- the projection function X × Y → X . Then the image f [A] of tion that bounds the running time of M. Fix n ∈ N. Now n = n n n A is closed in X . L L ≤p(n). By Lemma 4.3 L ≤p(n), and hence L , is defin- able by an existential loose [0, 1]-guarded real arithmetic for- Proof of Theorem 4.5. We prove the following claim by in- mula ϕ(x ,..., x ) that uses real constants from M. By Theo- duction on the structure of the formulae: Let xì be a k-tuple 1 n rem 4.5 Ln is a closed set in the product space Rn , which is of distinct variables and ϕ(ìx) an existential loose [0, 1]-guarded not true for all languages in NP0 ; for instance, a language P real arithmetic formula with real constants, and its free vari- R Rk consisting of all finite strings of positive reals can be decided ables in xì. The relation defined by ϕ(ìx) is closed in . 0 n n in NPR (using branching), but P is not closed in R .  • Assume ϕ = t1 ≤ t2. Recallthat t1(ìx) and t2(ìx) are mul- tivariate polynomials. Define g(ìx) as the multivariate 5.2 Robustness of NPR polynomial t1(ìx) − t2(ìx) and consider the preimage We have just seen that S-NP is a complexity class strictly g−1[(−∞, 0]]. Since (−∞, 0] is closed in R andg : Rk → [0,1] below NPR. We now give purely logical proofs implying that R is a continuous function, it follows that g−1[(∞, 0]] the obvious strengthenings of S-NP collapse to NPR.The is closed. Clearly g−1[(−∞, 0]] is the relation defined [0,1] proofs are based on the logical characterisations established by ϕ(ìx). in Corollary 3.4. • The cases of disjunctions and conjunctions are clear, 0 The first obvious question is: Are S-NPR and S-NPR strictly for the union and intersection of closed sets is closed. 0 below NPR and NPR? In logical terms this boils down to the • Assume ϕ = ∃y(0 ≤ y ≤ 1 ∧ψ (ìx,y)). Let Rψ be the re- expressivity of the logic L-ESOR[+, ×, ≤, (r) R]. We answer lation defined by ψ (ìx,y), which by induction hypoth- r ∈ Rk+1 ′ = Rk , to this question in the negative. esis is closed in . Define Rψ : Rψ ∩( ×[0 1]). Since [0, 1] is closed in R, it follows from Lemma 4.6 Proposition 5.2. L-ESOR[+, ×, ≤, 0, 1]≡ ESOR[+, ×, ≤] and + ′ Rk 1 Rk , ∗ L-ESOR[+, ×, ≤, (r) R]≡ ESOR[+, ×, ≤, (r) R]. that Rψ is closed both in and ×[0 1]. Let Rψ r ∈ r ∈ be the projection of R′ to its k first columns. Since R′ ψ ψ Proof. The left-to-right direction is immediate as the con- k is closed in R ×[0, 1], and [0, 1] is a compact topolog- stants 0 and 1 are definable in ESOR[+, ×, ≤]. For the con- ∗ ical space, it follows from Lemma 4.7 that Rψ is closed verse direction, note that the numerical atom ¬i ≤ j is equiv- Rk ∗  alent to the statement j < i. We show that < is definable in in . Clearly Rψ is the relation defined by ψ (ìx). L-ESOR[+, ×, ≤, 0, 1]. First note that every strictly positive 5 Hierarchy of the complexity classes real number r ∈ R can be expressed by a ratio of two real numbers n,m ∈ R such that n,m ≥ 1. Moreover note that, The main result of this section is the separation of the com- for every such n and m, the ratio n/m > 0. It is easy to see plexity classes S-NP and NPR. We have already done [0,1] that the following L-ESOR[+, ×, ≤, 0, 1]-formula most of the work required for the separation as the result = + = follows directly from the topological argument of Section ∃r∃n∃m(1 ≤ n ∧ 1 ≤ m ∧ n r × m ∧ i r j), 4.5 that more generally separates S-BSS computations from where r, n, andm are 0-ary function variables, expresses that BSS computations. The characterisations of Section 3 then i < j.  yield the separation of the related logics on R-structures. We also give logical proofs implying that the obvious strength- Theorem 2.4, Proposition 5.2, Corollary 3.4 together then R yield the following: enings of S-NP[0,1] coincide with NP . Finally we study the 0 = 0 = 0 restriction of S-NP[0,1] on Boolean inputs and establish that Corollary 5.3. S-NPR NPR and S-NPR NPR. ∃R it coincides with a natural fragment of . 0 The second natural question is: Are NP[0,1] and NP[0,1] 0 R strictly below NPR and NP ? Again, the answer is no. The 5.1 Separation of S-NP[0,1] and NP R We can now use Theorem 4.5 to prove the following: proof of the following proposition follows directly from the observation that arbitrary real numbers can be encoded as Theorem 5.1. The following separations hold: ratios x/(1−x), where x ∈[0, 1], using an additional marker Real computation and probabilistic team semantics LICS ’20, July 8–11, 2020, Saarbrücken, Germany for sign. It is crucial to note that with negated numerical Proof. Note that the right-to-le direction of this theorem atoms one can express that the denominators of such encod- follows immediately from Lemma 4.3 by noting that the only 0 ings are positive; in the loose fragment this is not possible. real constants used by S-NP[0,1] S-BSS machines M are 0 and + ≤ The encodings needed can be clearly expressed in ESO[0,1][ , ×, ≤]1,andthattheBooleaninputsto. M can be defined in ∃[0, 1] We omit the proof. by using the constants 0 and 1. Le-to-right. There exists a deterministic polynomial time Proposition 5.4. ESO [+, ×, ≤, 0, 1]≡ ESOR[+, ×, ≤, 0, 1] [0,1] Turing machine M that given an input string computes the and ESO [+, ×, ≤, (r) R]≡ ESOR[+, ×, ≤, (r) R]. [0,1] r ∈ r ∈ corresponding sentence ϕ of existential loose [0, 1]-guarded Hence Corollary 3.4 yields the following: real arithmetic. Let p be the polynomial that bounds the run- ning time of M. Without loss of generality we may assume = R 0 = 0 Corollary 5.5. NP[0,1] NP and NP[0,1] NPR. that, for any given input i of length n, the formula computed by M from input i uses only variables x ,..., x . Let M∗ Finally we consider a weakening of L-ESOR[+, ×, ≤, 0, 1] 1 p(n) by removing the constant 1 from the language. It turns out be a nondeterministic S-BSS machine that, for a given input ( ) that this small weakening has profound implications to the i of length n, first guesses p n many real numbers from the [ , ] expressivity of the logic when restricted to function-free vo- unit interval 0 1 (these will correspond to the values of the ,..., ∗ cabularies. variables x1 xp(n)). Then M simulates the run of the de- terministic polynomial time Turing machine M on input i. Proposition 5.6. Let 0 ∈ S ⊆ R. Then L-ESOS [+, ×, ≤] ≡ Let ϕ be the formula computed this way. Finally we can use FO with respect to R-structures on function-free vocabularies. M∗ to check the matrix of ϕ using the values guessed for the variables x ,..., x . We omit further details, for the eval- +, , 1 p(n) Proof. The direction FO ≤ L-ESOS [ × ≤] is self-evident. uation of the matrix can done essentially in the same way A R We give a proof for the converse. Let be an -structure of as in the left-to-right direction of Theorem 3.3.  a function-free vocabulary τ , ϕ ∈ L-ESOS [+, ×, ≤][τ ] a for- mula, and s an assignment for the first-order variables. Note 6 Probabilistic team semantics that ϕ canberegardedalsoasaformulaofL-ESO{0}[+, ×, ≤]; The purpose of this section is to characterise the descriptive we write ϕ0 to denote this interpretation. Let ϕ⊤ denote the FO-formula obtained from ϕ by removing the function quan- complexity of probabilistic independence logic [10].The for- tifications in ϕ and replacing every numerical atom i ≤ j mulae of this logic, and other logics that make use of depen- in ϕ with the formula ∃x x = x. Now note that there is a dency concepts involving quantities, are interpreted in prob- homomorphism from the first-order structure (S, +, ×, ≤) to abilistic team semantics which generalises team semantics by adding weights on variable assignments. A finite model ({0}, +, ×, ≤), and consequently, A |=s φ ⇔ A |=s φ0. Here together with a probabilistic team can then be seen as a par- we note that φ0 implies φ since the second structure is a substructure of the first, and truth of existential formulae is ticular metafinite structure, and thus a natural approach to computational complexity comes from BSS machines. preserved to extensions. Conversely, φ implies φ0 because atoms i ≤ j appear only positively, and the truth of formu- Let D be a finite set of first-order variables, A a finite set, lae with only positive literals are preserved to homomorphic and X a finite set of assignments (i.e., a team) from D to A. A probabilistic team X is then defined as a function images. Since in the evaluation of ϕ0 every numerical term is evaluated to 0 it follows that A |= ϕ ⇔ A |= ϕ .  s 0 s ⊤ X: X →[0, 1] 5.3 Separate branching on Boolean inputs and the X = such that s ∈X (s) 1. Also the empty function is con- existential theory of the reals sidered a probabilisticÍ team. We call D and A the variable 0 It is known that on Boolean inputs NPR coincides with the domain and value domain of X, respectively. ∃R complexity class (i.e., the class of problems polynomially Probabilistic independence logic (FO(⊥⊥c)) is defined as the reducible to the existential theory of the reals) [5, 26]. In this extension of first-order logic with probabilistic independence 0 section we show an analogous result for S-NP[0,1]. atoms yì⊥⊥xì zì whose semantics is the standard semantics of conditional independence in probability distributions. An- ∃ ≤ Definition 5.7. Define [0, 1] tobethesetofalllanguages (≈) ∗ other probabilistic logic, FO , is obtained by extending L ⊆ {0, 1} for which there is a polynomial-time reduc- ì ≈ ì ∗ first-order logic with marginal identity atoms x y which tion f from {0, 1} into sentences of existential loose [0, 1]- state that the marginal distributions on xì and yì are iden- R + = guarded real arithmetic such that x ∈ L iff ( , , ×, ≤, 0, 1)| tically distributed. The semantics for complex formulae are f (x). defined compositionally by generalising the team semantics We show the following theorem: of dependence logic to probabilistic teams. For details, not necessary in this paper, we refer the reader to [10]. In princi- ∃ , ≤ = 0 Theorem 5.8. [0 1] BP(S-NP[0,1]). ple, the point is that formulae of probabilistic independence LICS ’20, July 8–11, 2020, Saarbrücken, Germany M. Hannula, J. Kontinen, J. Van den Bussche, and J. Virtema logic define properties of (A, X) where A is a finite model in [10] that the logic FO(⊥⊥c, ≈) is expressively equivalent 2 and X a probabilistic team with value domain Dom(A). to L-ESOd[0,1][SUM, ×, =]. Later, it was proven in [16] that marginal identity can be expressed using independence, that Example 6.1. Suppose we flip a coin. If we get heads, we is, FO(⊥⊥ , ≈) is expressively equivalent to FO(⊥⊥ ).3 roll two dice x and y. If we get tails, we roll only x and c c copy the same value for y. Repeating this procedure infin- Theorem 6.2 ([10, 16]). FO(⊥⊥c)≡ L-ESOd[0,1][SUM, ×, =]. itely many times yields at the limit a probabilistic team (i.e., a joint probability distribution) over variables x and y satis- We will now improve this result by removing the con- fying dition that restricts function quantification to distributions. (x ⊥⊥ y ∨ x = y) ∧ ∀z x ≈ z. For this we utilize a normal form lemma from [10]. Observe that we restrict attention to d[0, 1]-structures, that is, all ∨ X X By definition ϕ ψ is true for a probabilistic team if is function symbols from the underlying vocabulary are inter- a mixture of two teams with respective properties ϕ and ψ preted as distributions. (here independence and (row-wise) identity between x and y). By definition ∀zϕ is true for a probabilistic team X if Lemma 6.3 ([10]). For every L-ESOd[0,1][SUM, ×, =]-formula ∗ the extension of X with a uniform distribution for z has the ϕ there is an L-ESOd[0,1][SUM, ×, =]-formula ϕ such that property ϕ (here identity between marginal distributions on Strucd[0,1]ϕ = Strucd[0,1]ϕ∗, where ϕ∗ is of the form ∃fì∀xθì , x and z). where θ is quantifier-free and such that its second sort iden- = = We will now show that the descriptive complexity of prob- tity atoms are of the form fi (ìu,vì) fj (ìu)× fk (ìv) or fi (ìu) abilistic independence logic is exactly S-NP0 . For this we SUMvì fj (ìu,vì) for distinct fi , fj , fk such that at most one of [0,1] them is not quantified. need some background definitions and results. = Expressivity comparisons wrt. probabilistic team se- Lemma 6.4. L-ESOd[0,1][SUM, ×, ] +, , = +, , =, , mantics. Fix a relational vocabulary τ . For a probabilistic ≡d[0,1] L-ESOd[0,1][ × ]≡d[0,1] L-ESO[0,1][ × 0 1]. X team with variable domain {x1,..., xn } and value domain Proof. We prove the claim in three steps, without relying n A, the function fX : A → [0, 1] is defined as the probabil- on multiplication at any step. By Proposition 3.1 we may = X ity distribution such that fX(s(ìx)) (s) for all s ∈ X .Fora assume that the finite domain is enriched with a successor formula ϕ ∈ FO(⊥⊥c) of vocabulary τ and with free variables function S for tuples, its transitive derivatives <, ≤, and its ,..., R {x1 xn }, the class Struc(ϕ) is defined as the class of - minimal and maximal tuples minì and maxì (of an appropriate structures A over τ ∪ {f } such that (A ↾ τ ) |=X ϕ, where A arity), obtained by the lexicographic ordering induced from fX = f and A ↾ τ is the finite τ -structure underlying A. some linear ordering ≤fin. Additionally, we may assume a Let L be any of the logics defined in Section 2. We write constant c on the finite domain. FO(⊥⊥c) ≤ L if for every formula ϕ ∈ FO(⊥⊥c) of vocabulary Step 1: L-ESOd[0,1][SUM, ×, =] ≤d[0,1] L-ESOd[0,1][+, ×, =]. τ there is a sentence ψ ∈ L of vocabulary τ ∪ {f } such that We may assume that any L-ESO [SUM, ×, =] formula is = d[0,1] d[0,1] Struc(ϕ) Struc (ψ ). Vice versa, we write L ≤ FO(⊥⊥c) of the form stated in Lemma 6.3. Thus it suffices to express if for every sentence ψ ∈ L of vocabulary τ ∪ {f } there is in L-ESO [+, ×, =] each numerical identity of the form = d[0,1] a formula ϕ ∈ FO(⊥⊥c) of vocabulary τ such that Struc(ϕ) f (ìu) = SUM f ′(ìu, xì). First, we quantify a 2m-ary distribu- d[0,1] xì Struc (ψ ). tion variable g upon which we impose: Complexity characterisations wrt. probabilistic team ∀xìyì g(ìx, minì ) + g(ìx, minì ) = f ′(ìu, xì)∧ (9) semantics. Let FO(⊥⊥c) be a logic with vocabularyτ and C a  S R yì < maxì → complexity class. Let be an arbitrary class of -structures over τ ∪ {f } that is closed under isomorphisms and where g(S(ìy), S(ìy)) + g(S(ìy), S(ìy)) = g(S(ìy),yì) + g(ìy,yì) ∧ the interpretations of f are distributions. We write enc(S)  S(ìy) < xì → for the set of encodings of structures in S. Consider the fol- lowing two conditions: g(ìx, S(ìy)) + g(ìx, S(ìy)) = g(ìx,yì) .  (i) enc(S) = {enc(A) | A ∈ Struc(ϕ)} for some ϕ ∈ ′ The point is to calculate partial sums SUMxì≤y f (ìu, xì) and FO(⊥⊥c)}. store sufficiently small fractions of them in g(ìy,yì). Suppose (ii) enc(S) ∈ C. 2 = If (i) implies (ii), we write FO(⊥⊥c)≤C, and if the vice versa In [10] equi-expressivity with ESOd[0,1][SUM, ×, ] is erroneously holds, we write C ≤ FO(⊥⊥c). stated; the results in the paper actually entail equi-expressivity with = L-ESOd[0,1][SUM, ×, ]. It is already known that probabilistic independence logic 3 In fact, FO(⊥⊥c) is expressively equivalent to FO(⊥⊥) which is the extension captures a variant of loose existential second-order logic of first-order logic with marginal independence atoms xì ⊥⊥ìy, the semantics in which function quantification ranges over distributions. of which is the standard semantics of marginal independence in probability This result was shown in two stages. First, it was proven distributions [16]. Real computation and probabilistic team semantics LICS ’20, July 8–11, 2020, Saarbrücken, Germany yì is the nth tuple. Then Observe now that each numerical atom appearing in ϕ 1 is an identity between two multivariate polynomials over g(ìy,yì) = (f ′(ìu, minì ) + ... + f ′(ìu,yì)), 2n function terms. Without loss of generality all the constituent monomials in these atoms are of a fixed degree D and have ì > ì and for x y, coefficient one; note that each monomial with degree less 1 ′ (ì, ì) = (ì, ì). than D can be appended in L-ESO , [+, ×, =, 0, 1] with a g x y n f u x [0 1] 2 quantified nullary function n taking value 1. We now re- Consequently, the sum of all g(ìx,yì) where xì ≥y ì is at most place in each numerical atom i = j function terms f (ìx) with 1. By allocating the remaining weights to (ìx,yì) such that df (ìx,c) or df (ìx)(ìx,c), depending on whether f is a function xì < yì, it follows that g is a distribution. variable or a function symbol. Thus we represent i = j in Furthermore, we quantify a 2m-ary distribution variable [ , ×, =] i = j L-ESOd[0,1] SUM as nDk nDk , wherefore not only h satisfying: its truth value, but also that of ϕ, is preserved in the trans- ∀xì[h(minì ) + h(minì ) = f (ìu)∧ formation.  xì < maxì → h(S(ìx)) + h(S(ìx)) = h(ìx)]. By combining Corollary 3.4.3, Theorem 6.2, and Lemma It follows that h(ìy) = 1 f (ìu). Consequently, g(max ì , maxì ) = 2n 6.4, we finally obtain the following result. = ′ h(max ì ) if and only if f (ìu) SUMxì f (ìu, xì). Note thath is not a distribution since the weights do not add up to 1. However, 0 Theorem 6.5. FO(⊥⊥c)≡ S-NP , . we may increment the arity of h by one and replace h(ìx) [0 1] above with h(ìx,c). Then h is a distribution if the remaining weights are pushed to h(ìx,y), where y , c. This concludes 7 Concluding remarks the proof of Step 1. Applications of logic in AI and advanced data management Step 2: We show a stronger claim: L-ESOd[0,1][+, ×, =] ≤ require probabilistic interpretations, a role that is well ful- L-ESO[0,1][+, ×, =, 0, 1]. For this, it suffices to show how to filled by probabilistic team semantics. On the other hand, in express in L-ESO[0,1][+, =, 0, 1] that a function f is a distri- the theory of computation and automated reasoning, com- bution. The following formula expresses just that: putation and logics over the reals are well established with solid foundations. In this paper we have provided bridges ∃g g(minì ) = f (minì )∧ between the two worlds. We introduced a novel variant of ∀xì(ìx < maxì → g(S(ìx)) = g(ìx) + f (S(ìx))) ∧ g(max ì ) = 1 . BSS machines and provided a logical and topological charac-  terisation of its computational power. In addition, we deter- [+, ×, =, , ] Step 3: We show a stronger claim: L-ESO[0,1] 0 1 mined the expressivity of probabilistic independence logic ≤ [ , ×, =] [0,1] L-ESOd[0,1] SUM . Suppose ϕ is some formula in with respect to the BSS model of computation. [+, ×, =, , ] L-ESO[0,1] 0 1 . Let k be the maximal arity of any There are many interesting directions of future research. function variable/symbol appearing in ϕ, and suppose n is One is to consider the additive fragment of BSS computa- the size of the finite domain; the total sum of the weights of k tion. Restricted to Boolean inputs it is known that, if unre- a function is thus at most n . We now show how to obtain stricted use of machine constants is allowed, the additive from ϕ an equivalent formula in L-ESO [SUM, ×, =]; the d[0,1] NPR branching on equality collapses to NP and branching k idea is to scale all function weights by 1/n . We have two on inequality captures NP/poly [21].Whatcanwesayabout cases: the additive fragment of S-BSS computation? Another di- Function variables. If f is an m-ary quantified function vari- rection is to devise logics that characterise other important + able, we replace it with an (m 1)-ary quantified distribution complexity classes over S-BSS machines. Grädel and Meer variable df satisfying [15] established a characterisation of polynomial time on ′ ′ R ∀xì∃d ∀ydì (ìy,c) = df (ìx,c), ranked -structures using a variant of least fixed point logic. In the setting of team semantics and classical computation, ′ + k whered is a (k 1)-ary distribution variable. Now n df (ìx,c)≤ Galliani and Hella [12] showed that the so-called inclusion 1 because d ′ is a distribution, and thus d (ìx,c)≤ 1 . f nk logic characterises polynomial time on ordered structures. Function symbols. Suppose f (ìx) is a function term which ap- Can we extend the applicability of these results to the realms pears as a term or subterm in ϕ, and f is a function symbol of S-BSS computation and probabilistic team semantics? Fi- from the underlying vocabulary. We quantify a (k + 1)-ary nally, we would like to devise natural complete problems for distribution variable df (ìx) satisfying the complexity classes defined by S-BSS machines. In par- ∀xì(SUM d (ìy,c) = f (ìx) ∧ ∀yìzdì (ìy,c) = d (ìz,c)). ticular, we would like to obtain a natural complete problem yì f (ìx ) f (ìx) f (ìx) for ∃[0, 1]≤; a weakening of the art gallery problem is one It follows that d (ìx,c) = 1 f (ìx). Since f (ìx)≤ 1, we may f (ìx) nk promising candidate. We conclude with a few open prob- define df (ìx) as a distribution. lems: LICS ’20, July 8–11, 2020, Saarbrücken, Germany M. Hannula, J. Kontinen, J. Van den Bussche, and J. Virtema

• Is ∃[0, 1]≤ strictly included in ∃R? A positive answer [9] Arnaud Durand, Miika Hannula, Juha Kontinen, Arne Meier, and would be a major breakthrough, as it would separate Jonni Virtema. 2018. Approximation and dependence via multi- NP from PSPACE. team semantics. Ann. Math. Artif. Intell. 83, 3-4 (2018), 297–320. ∃ , ≤ ∃R hps://doi.org/10.1007/s10472-017-9568-4 • We know that NP ≤ [0 1] ≤ ≤ PSPACE. Can [10] Arnaud Durand, Miika Hannula, Juha Kontinen, Arne Meier, and ≤ we establish a better upper bound for ∃[0, 1] ? In par- Jonni Virtema. 2018. Probabilistic Team Semantics. In Foundations of ticular, is ∃[0, 1]≤ contained in the polynomial hierar- Information and Knowledge Systems - 10th International Symposium, chy? FoIKS 2018, Budapest, Hungary, May 14-18, 2018, Proceedings. 186–206. • We established that S-BSS computable languages are hps://doi.org/10.1007/978-3-319-90050-6_11 [11] Pietro Galliani. 2008. Game Values and Equilibria for Undetermined included in the classof BSS computablelanguagesthat Sentences of Dependence Logic. (2008). MSc Thesis. ILLC Publica- are countable disjoint unions of closed sets. Does the tions, MoL–2008–08. converse hold? [12] Pietro Galliani and Lauri Hella. 2013. Inclusion Logic and Fixed Point Logic. In Computer Science Logic 2013 (CSL 2013) (Leibniz International Proceedings in Informatics (LIPIcs)), Simona Ronchi Della Rocca (Ed.), Vol. 23. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Acknowledgments Germany, 281–295. hps://doi.org/10.4230/LIPIcs.CSL.2013.281 The first and the second author were supported by the Acad- [13] Erich Grädel and Yuri Gurevich. 1998. Metafinite Model Theory. Inf. emy of Finland grant 308712. The third and the fourth au- Comput. 140, 1 (1998), 26–81. hps://doi.org/10.1006/inco.1997.2675 thor were supported by the Research Foundation Flanders [14] Erich Grädel and Stephan Kreutzer. 1999. Descriptive Complex- ity Theory for Constraint Databases. In Computer Science Logic, grant G0G6516N. The third author was partially supported 13th International Workshop, CSL ’99, 8th Annual Conference of the by the National Natural Science Foundation of China under EACSL, Madrid, Spain, September 20-25, 1999, Proceedings. 67–81. grant 61972455, and the fourth author was an international hps://doi.org/10.1007/3-540-48168-0_6 research fellow of the Japan Society for the Promotion of Sci- [15] Erich Grädel and Klaus Meer. 1995. Descriptive complexity theory ence, Postdoctoral Fellowships for Research in Japan (Stan- over the real numbers. In Proceedings of the Twenty-Seventh Annual ACM Symposium on Theory of Computing, 29 May-1 June 1995, Las dard). Vegas, Nevada, USA. 315–324. hps://doi.org/10.1145/225058.225151 [16] Miika Hannula, Åsa Hirvonen, Juha Kontinen, Vadim Kulikov, and Jonni Virtema. 2019. Facets of Distribution Identities in Probabilis- References tic Team Semantics. In JELIA (Lecture Notes in Computer Science), Vol. 11468. Springer, 304–320. [1] Mikkel Abrahamsen, Anna Adamaszek, and Tillmann Miltzow. [17] Miika Hannula and Juha Kontinen. 2016. A finite axiomatization of ∃ R 2018. The art gallery problem is -complete. In Proceedings conditional independence and inclusion dependencies. Inf. Comput. of the 50th Annual ACM SIGACT Symposium on Theory of Com- 249 (2016), 121–137. hps://doi.org/10.1016/j.ic.2016.04.001 puting, STOC 2018, Los Angeles, CA, USA, June 25-29, 2018. 65–73. [18] Uffe Flarup Hansen and Klaus Meer. 2006. Two logical hierarchies hps://doi.org/10.1145/3188745.3188868 of optimization problems over the real numbers. Math. Log. Q. 52, 1 [2] Michael Benedikt, Martin Grohe, Leonid Libkin, and Luc (2006), 37–50. hps://doi.org/10.1002/malq.200510021 Segoufin. 2003. Reachability and connectivity queries in con- [19] Tapani Hyttinen, Gianluca Paolini, and Jouko Väänänen. straint databases. J. Comput. System Sci. 66, 1 (2003), 169 – 206. 2017. A Logic for Arguing About Probabilities in Mea- hps://doi.org/10.1016/S0022-0000(02)00034-X Special Issue on sure Teams. Arch. Math. Logic 56, 5-6 (2017), 475–489. PODS 2000. hps://doi.org/10.1007/s00153-017-0535-x [3] Lenore Blum, Felipe Cucker, Michael Shub, and Steve Smale. 1997. [20] Paris C. Kanellakis, Gabriel M. Kuper, and Peter Z. Revesz. 1995. Con- Complexity and Real Computation. Springer-Verlag, Berlin, Heidel- straint Query Languages. J. Comput. Syst. Sci. 51, 1 (1995), 26–52. berg. hps://doi.org/10.1006/jcss.1995.1051 [4] Lenore Blum, Mike Shub, and Steve Smale. 1989. On a the- [21] Pascal Koiran. 1994. Computing over the Reals with Addi- ory of computation and complexity over the real numbers: tion and Order. Theor. Comput. Sci. 133, 1 (1994), 35–47. NP- completeness, recursive functions and universal ma- hps://doi.org/10.1016/0304-3975(93)00063-B chines. Bull. Amer. Math. Soc. (N.S.) 21, 1 (07 1989), 1–46. [22] Andreas Krebs, Arne Meier, Jonni Virtema, and Martin Zimmermann. hps://projecteuclid.org:443/euclid.bams/1183555121 2018. Team Semantics for the Specification and Verification of Hy- [5] Peter Bürgisser and Felipe Cucker. 2006. Counting com- perproperties. In MFCS (LIPIcs), Vol. 117. Schloss Dagstuhl - Leibniz- plexity classes for numeric computations II: Algebraic and Zentrum fuer Informatik, 10:1–10:16. semialgebraic sets. J. Complexity 22, 2 (2006), 147–191. [23] Stephan Kreutzer. 2000. Fixed-Point Query Languages for hps://doi.org/10.1016/j.jco.2005.11.001 Linear Constraint Databases. In Proceedings of the Nineteenth [6] John F. Canny. 1988. Some Algebraic and Geometric Computations ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Data- in PSPACE. In Proceedings of the 20th Annual ACM Symposium on base Systems, May 15-17, 2000, Dallas, Texas, USA. 116–125. Theory of Computing, May 2-4, 1988, Chicago, Illinois, USA. 460–467. hps://doi.org/10.1145/335168.335214 hps://doi.org/10.1145/62212.62257 [24] Klaus Meer. 2000. Counting problems over the re- [7] Jukka Corander, Antti Hyttinen, Juha Kontinen, Johan Pensar, and als. Theor. Comput. Sci. 242, 1-2 (2000), 41–58. Jouko Väänänen. 2019. A logical approach to context-specific hps://doi.org/10.1016/S0304-3975(98)00190-X independence. Ann. Pure Appl. Logic 170, 9 (2019), 975–992. [25] Marcus Schaefer. 2009. Complexity of Some Geometric and Topolog- hps://doi.org/10.1016/j.apal.2019.04.004 ical Problems. In Graph Drawing, 17th International Symposium, GD [8] Felipe Cucker and Klaus Meer. 1999. Logics Which Capture Com- 2009, Chicago, IL, USA, September 22-25, 2009. Revised Papers. 334–344. plexity Classes Over The Reals. J. Symb. Log. 64, 1 (1999), 363–390. hps://doi.org/10.1007/978-3-642-11805-0_32 hps://doi.org/10.2307/2586770 Real computation and probabilistic team semantics LICS ’20, July 8–11, 2020, Saarbrücken, Germany

[26] Marcus Schaefer and Daniel Stefankovic. 2017. Fixed Points, Nash [27] Jouko Väänänen. 2007. Dependence Logic. Cambridge University Equilibria, and the Existential Theory of the Reals. Theory Comput. Press. Syst. 60, 2 (2017), 172–193. hps://doi.org/10.1007/s00224-015-9662-0 [28] S. Willard. 2004. General Topology. Dover Publications. hps://books.google.co.jp/books?id=-o8xJQ7Ag2cC