Abstract
First-order linear rational arithmetic enriched with uninterpreted predicates yields an interesting and very expressive modeling language. However, already the presence of a single uninterpreted predicate symbol of arity one or greater renders the associated satisfiability problem undecidable. We identify two decidable fragments, both based on the Bernays–Schönfinkel–Ramsey prefix class. Due to the inherent infiniteness of the underlying domain, a finite model property in the usual sense cannot be established. Nevertheless, we show that satisfiable sentences always have a model that can be described by finite means. To this end, we restrict the syntax of arithmetic atoms. In the first fragment that is presented, arithmetic operations are only allowed over terms without universally quantified variables. In the second fragment, arithmetic atoms are essentially confined to difference constraints over universally quantified variables with bounded range. We will call such atoms bounded difference constraints. As bounded intervals over the rationals still comprise infinitely many values, a trivial instantiation procedure is not sufficient to solve the satisfiability problem. After a slight shift of perspective, the positive decidability result for the first fragment can be restated in the framework of combinations of theories over non-disjoint vocabularies. More precisely, we combine first-order theories that share a dense total order without endpoints.
Similar content being viewed by others
Notes
As long as we restrict the considered language to linear arithmetic sentences with integer or rational coefficients, it does not matter whether we use the rational or real numbers as domain. The two domains cannot be distinguished using sentences of this kind. This changes, however, as soon as multiplication is admitted in an unrestricted way. While the validity of first-order arithmetic sentences over the field of real numbers is decidable using quantifier elimination (see [131] for a recent survey), validity over the field of the rational numbers is undecidable [119].
Although the term EPR is used ambiguously throughout the literature, e.g. sometimes referring to BSR, sometimes only referring to BSR without equality, the alternative term should be kept in mind when looking for related literature.
We use symbols such as \({\mathbb {Q}}\), \({\mathbb {Z}}\), \({\mathbb {N}}\), and \({\mathbb {R}}\) ambiguously. Depending on the current context, we use them to address the respective sets of numbers, structures, or sorts.
Although \({{\mathcal {J}}_{\mathcal {A}}}\)-equivalence and the coloring function \(\chi _{\mathcal {A}}\) are technically defined for a different setting, we reuse the definitions in Lemma 25 and in Propositions 26 and 29 with their intended meaning without formally adapting them to the new setting.
See Footnote 5.
See Footnote 5 on page 20.
Although \(\simeq _\kappa \)-equivalence and \(\mathrel {{\widehat{\simeq }}}_\kappa \)-equivalence and the coloring function \(\chi _{\mathcal {A}}\) are technically defined for a different setting, we reuse the definitions in Lemma 39 and in Proposition 40 with their intended meaning without formally adapting them to the new setting.
See Footnote 8.
See Footnote 8.
Recall that validity in the theory of the rationals with addition and multiplication is undecidable [119].
This trick is inspired by optimizations used in the field of linear quantifier elimination over the reals [90].
References
Abadi, A., Rabinovich, A., Sagiv, M.: Decidable fragments of many-sorted logic. J. Symb. Comput. 45(2), 153–172 (2010)
Abadi, A., Rabinovich, A.M., Sagiv, M.: Decidable fragments of many-sorted logic. In: Logic for Programming, Artificial Intelligence, and Reasoning (LPAR’07), pp. 17–31 (2007)
Alagi, G., Weidenbach, C.: NRCL—a model building approach to the Bernays–Schönfinkel fragment. In: Frontiers of Combining Systems (FroCoS’15), LNCS 9322, pp. 69–84. Springer (2015)
Althaus, E., Kruglov, E., Weidenbach, C.: Superposition modulo linear arithmetic SUP(LA). In: Frontiers of Combining Systems (FroCoS’09), pp. 84–99 (2009)
Alur, R., Dill, D.L.: Automata for modeling real-time systems. In: Automata, Languages and Programming (ICALP’90), pp. 322–335 (1990)
Alur, R., Dill, D.L.: A theory of timed automata. Theor. Comput. Sci. 126(2), 183–235 (1994)
Areces, C., Fontaine, P.: Combining theories: the Ackerman and guarded fragments. In: Frontiers of Combining Systems (FroCoS’11), pp. 40–54 (2011)
Armando, A., Bonacina, M.P., Ranise, S., Schulz, S.: New results on rewrite-based satisfiability procedures. ACM Trans. Comput. Log. 10(1), 129–179 (2009)
Armando, A., Castellini, C., Giunchiglia, E., Maratea, M.: A SAT-based decision procedure for the Boolean combination of difference constraints. In: Theory and Applications of Satisfiability Testing (SAT’04), Revised Selected Papers (2004)
Bachmair, L., Ganzinger, H., Waldmann, U.: Theorem proving for hierarchic first-order theories. In: Algebraic and Logic Programming (ALP’92), pp. 420–434 (1992)
Bachmair, L., Ganzinger, H., Waldmann, U.: Refutational theorem proving for hierarchic first-order theories. Appl. Algebra Eng. Commun. Comput. 5, 193–212 (1994)
Baier, C., Katoen, J.P.: Principles of Model Checking. MIT Press, Cambridge (2008)
Barbosa, H.: New techniques for instantiation and proof production in SMT solving (nouvelles techniques pour l’instanciation et la production des preuves dans SMT). Ph.D. thesis, University of Lorraine, Nancy, France (2017)
Barrett, C., Tinelli, C.: Satisfiability modulo theories. In: Clarke, E.M., Henzinger, T.A., Veith, H., Bloem, R. (eds.) Handbook of Model Checking, pp. 305–343. Springer, Berlin (2018)
Baumgartner, P., Fuchs, A., de Nivelle, H., Tinelli, C.: Computing finite models by reduction to function-free clause logic. J. Appl. Log. 7(1), 58–74 (2009)
Baumgartner, P., Waldmann, U.: Hierarchic superposition: completeness without compactness. In: Košta, M., Sturm, T. (eds.) Fifth International Conference on Mathematical Aspects of Computer and Information Sciences (MACIS’13), pp. 8–12 (2013)
Baumgartner, P., Waldmann, U.: Hierarchic superposition with weak abstraction. In: Automated Deduction (CADE-24), LNCS 7898, pp. 39–57. Springer (2013)
Blumensath, A., Grädel, E.: Automatic structures. In: Logic in Computer Science (LICS 2000), pp. 51–62 (2000)
Blumensath, A., Grädel, E.: Finite presentations of infinite structures: automata and interpretations. Theory Comput. Syst. 37(6), 641–674 (2004)
Bonacina, M.P., Fontaine, P., Ringeissen, C., Tinelli, C.: Theory combination: beyond equality sharing. In: Description Logic, Theory Combination, and All That—Essays Dedicated to Franz Baader on the Occasion of His 60th Birthday, pp. 57–89 (2019)
Börger, E., Grädel, E., Gurevich, Y.: The Classical Decision Problem. Perspectives in Mathematical Logic. Springer, Berlin (1997)
Bouyer, P., Fahrenberg, U., Larsen, K.G., Markey, N., Ouaknine, J., Worrell, J.: Model checking real-time systems. In: Clarke, E.M., Henzinger, T.A., Veith, H., Bloem, R. (eds.) Handbook of Model Checking, pp. 1001–1046. Springer, Berlin (2018)
Bradley, A.R.: Safety analysis of systems. Ph.D. thesis, Department of Computer Science of Stanford University (2007)
Bradley, A.R., Manna, Z.: The Calculus of Computation—Decision Procedures with Applications to Verification. Texts in Theoretical Computer Science. An EATCS Series. Springer, Berlin (2007)
Bradley, A.R., Manna, Z., Sipma, H.B.: What’s decidable about arrays? In: Verification, Model Checking, and Abstract Interpretation (VMCAI’06), pp. 427–442 (2006)
Bresolin, D., Della Monica, D., Montanari, A., Sciavicco, G.: The light side of interval temporal logic: the Bernays–Schönfinkel fragment of CDT. Ann. Math. Artif. Intell. 71(1–3), 11–39 (2014)
Bryant, R.E., Lahiri, S.K., Seshia, S.A.: Modeling and verifying systems using a logic of counter arithmetic with lambda expressions and uninterpreted functions. In: Computer Aided Verification (CAV’02), pp. 78–92 (2002)
Büchi, J.R.: Weak second-order arithmetic and finite automata. Zeitschrift für mathematische Logik und Grundlagen der Mathematik 6, 66–92 (1960)
Büchi, J.R.: On a decision method in restricted second order arithmetic. In: Nagel, E., Suppes, P., Tarski, A. (eds.) Proceedings of the 1960 International Congress on Logic, Methodology and Philosophy of Science, pp. 1–11. Stanford University Press (1962)
Charatonik, W., Witkowski, P.: On the complexity of the Bernays–Schönfinkel class with datalog. In: Logic for Programming, Artificial Intelligence, and Reasoning (LPAR-17), LNCS 6397, pp. 187–201. Springer (2010)
Chocron, P., Fontaine, P., Ringeissen, C.: A gentle non-disjoint combination of satisfiability procedures. In: Automated Reasoning (IJCAR’14), pp. 122–136 (2014)
Chocron, P., Fontaine, P., Ringeissen, C.: A polite non-disjoint combination method: theories with bridging functions revisited. In: Automated Deduction (CADE-25), pp. 419–433 (2015)
Comon, H., Jurski, Y.: Multiple counters automata, safety analysis and Presburger arithmetic. In: Computer Aided Verification (CAV’98), pp. 268–279 (1998)
Comon, H., Jurski, Y.: Timed automata and the theory of real numbers. In: Concurrency Theory (CONCUR’99), pp. 242–257 (1999)
Conchon, S., Krstic, S.: Strategies for combining decision procedures. Theor. Comput. Sci. 354(2), 187–210 (2006)
Cotton, S., Asarin, E., Maler, O., Niebert, P.: Some progress in satisfiability checking for difference logic. In: Formal Modelling and Analysis of Timed Systems and Formal Techniques in Real-Time and Fault-Tolerant Systems (FORMATS/FTRTFT’04), pp. 263–276 (2004)
Cotton, S., Maler, O.: Fast and flexible difference constraint propagation for DPLL(T). In: Theory and Applications of Satisfiability Testing (SAT’06), pp. 170–183 (2006)
Cox, J., McAloon, K.: Decision procedures for constraint-based extensions of Datalog. In: Benhamou, F., Colmerauer, A. (eds.) Constraint Logic Programming, Selected Research, pp. 17–32. The MIT Press, Cambridge (1993)
Cox, J., McAloon, K., Tretkoff, C.: Computational complexity and constraint logic programming languages. Ann. Math. Artif. Intell. 5(2–4), 163–189 (1992)
Downey, P.J.: Undecidability of Presburger arithmetic with a single monadic predicate letter. Center for Research in Computer Technology, Harvard University, Technical report (1972)
Doyen, L., Frehse, G., Pappas, G.J., Platzer, A.: Verification of hybrid systems. In: Clarke, E.M., Henzinger, T.A., Veith, H., Bloem, R. (eds.) Handbook of Model Checking, pp. 1047–1110. Springer, Berlin (2018)
Ebbinghaus, H., Flum, J., Thomas, W.: Mathematical Logic, 2nd edn. Springer, Berlin (1994)
Eggers, A., Kruglov, E., Kupferschmid, S., Scheibler, K., Teige, T., Weidenbach, C.: Superposition modulo non-linear arithmetic. In: Frontiers of Combining Systems (FroCoS’11), pp. 119–134 (2011)
Emmer, M., Khasidashvili, Z., Korovin, K., Sticksel, C., Voronkov, A.: EPR-based bounded model checking at word level. In: Automated Reasoning (IJCAR’12), pp. 210–224 (2012)
Emmer, M., Khasidashvili, Z., Korovin, K., Voronkov, A.: Encoding industrial hardware verification problems into effectively propositional logic. In: Formal Methods in Computer-Aided Design (FMCAD’10), pp. 137–144 (2010)
Enderton, H.B.: A Mathematical Introduction to Logic. Academic Press, London (1972)
Fermüller, C.G., Leitsch, A., Hustadt, U., Tammet, T.: Resolution decision procedures. In: Robinson, A., Voronkov, A. (eds.) Handbook of Automated Reasoning, vol. II, pp. 1791–1849. Elsevier, Amsterdam (2001)
Ferrante, J., Rackoff, C.W.: The Computational Complexity of Logical Theories. Springer, Berlin (1979)
Fietzke, A.: Labelled superposition. Ph.D. thesis, Department of Computer Science, Saarland University (2013)
Fietzke, A., Weidenbach, C.: Superposition as a decision procedure for timed automata. Math. Comput. Sci. 6(4), 409–425 (2012)
Finkbeiner, B., Müller, C., Seidl, H., Zalinescu, E.: Verifying security policies in multi-agent workflows with loops. In: Computer and Communications Security (CCS’17), pp. 633–645 (2017)
Fontaine, P.: Combinations of theories and the Bernays–Schönfinkel–Ramsey class. In: Verification Workshop in connection with CADE-21 (VERIFY’07) (2007)
Fontaine, P.: Combinations of theories for decidable fragments of first-order logic. In: Frontiers of Combining Systems (FroCoS’09), LNCS 5749, pp. 263–278. Springer (2009)
Frühwirth, T., Abdennadher, S.: Essentials of Constraint Programming. Springer, Berlin (2003)
Gács, P., Lovász, L.: Khachiyan’s algorithm for linear programming. Math. Program. Study 14, 61–68 (1981)
Ganzinger, H.: Shostak light. In: Automated Deduction (CADE-18), pp. 332–346 (2002)
Ganzinger, H., Hagen, G., Nieuwenhuis, R., Oliveras, A., Tinelli, C.: DPLL(T): fast decision procedures. In: Computer Aided Verification (CAV’04), pp. 175–188 (2004)
Ganzinger, H., Hillenbrand, T., Waldmann, U.: Superposition modulo a shostak theory. In: Automated Deduction (CADE-19), pp. 182–196 (2003)
Ge, Y., de Moura, L.M.: Complete instantiation for quantified formulas in satisfiabiliby modulo theories. In: Computer Aided Verification (CAV’09), LNCS 5643, pp. 306–320. Springer (2009)
Ghilardi, S., Gianola, A.: Modularity results for interpolation, amalgamation and superamalgamation. Ann. Pure Appl. Log. 169(8), 731–754 (2018)
Ghilardi, S., Nicolini, E., Zucchelli, D.: A comprehensive combination framework. ACM Trans. Comput. Log. 9(2), 8:1–8:54 (2008)
Graham, R., Rothschild, B., Spencer, J.: Ramsey Theory. A Wiley-Interscience Publication, 2nd edn. Wiley, Hoboken (1990)
Habermehl, P., Iosif, R., Vojnar, T.: What else is decidable about integer arrays? In: Foundations of Software Science and Computational Structures (FOSSACS’08), pp. 474–489 (2008)
Halpern, J.Y.: Presburger arithmetic with unary predicates is \(\Pi ^1_1\) complete. J. Symb. Log. 56(2), 637–642 (1991)
Henzinger, T.A., Nicollin, X., Sifakis, J., Yovine, S.: Symbolic model checking for real-time systems. Inf. Comput. 111(2), 193–244 (1994)
Hillenbrand, T.: Superposition and decision procedures back and forth. Ph.D. thesis, Department of Computer Science, Saarland University (2008)
Hillenbrand, T., Weidenbach, C.: Superposition for bounded domains. In: Automated Reasoning and Mathematics—Essays in Memory of William W. McCune, LNCS 7788, pp. 68–100. Springer (2013)
Hoffart, J., Suchanek, F.M., Berberich, K., Weikum, G.: YAGO2: a spatially and temporally enhanced knowledge base from Wikipedia. Artif. Intell. 194, 28–61 (2013)
Horbach, M., Voigt, M., Weidenbach, C.: On the combination of the Bernays–Schönfinkel–Ramsey fragment with simple linear integer arithmetic. In: Automated Deduction (CADE’17), LNCS 10395, pp. 77–94 (2017). An extended version is available at the arXiv preprint server under the signature arXiv:1705.08792 [cs.LO]
Horbach, M., Voigt, M., Weidenbach, C.: The universal fragment of Presburger arithmetic with unary uninterpreted predicates is undecidable. ArXiv preprint arXiv:1703.01212 [cs.LO] (2017)
Ihlemann, C.: Reasoning in combinations of theories. Ph.D. thesis, Department of Computer Science, Saarland University (2010)
Ihlemann, C., Sofronie-Stokkermans, V.: On hierarchical reasoning in combinations of theories. In: Automated Reasoning (IJCAR’10), pp. 30–45 (2010)
Itzhaky, S., Banerjee, A., Immerman, N., Lahav, O., Nanevski, A., Sagiv, M.: Modular reasoning about heap paths via effectively propositional formulas. In: Principles of Programming Languages (POPL’14), pp. 385–396 (2014)
Itzhaky, S., Banerjee, A., Immerman, N., Nanevski, A., Sagiv, M.: Effectively-propositional reasoning about reachability in linked data structures. In: Computer Aided Verification (CAV’13), pp. 756–772 (2013)
Itzhaky, S., Bjørner, N., Reps, T.W., Sagiv, M., Thakur, A.V.: Property-directed shape analysis. In: Computer Aided Verification (CAV’14), pp. 35–51 (2014)
Jacobs, S.: Hierarchic decision procedures for verification. Ph.D. thesis, Department of Computer Science, Saarland University (2009)
Karbyshev, A., Bjørner, N., Itzhaky, S., Rinetzky, N., Shoham, S.: Property-directed inference of universal invariants or proving their absence. In: Computer Aided Verification (CAV’15), pp. 583–602 (2015)
Karmarkar, N.: A new polynomial-time algorithm for linear programming. Combinatorica 4(4), 373–395 (1984)
Khachiyan, L.G.: Polynomial algorithms in linear programming. USSR Comput. Math. Math. Phys. 20(1), 53–72 (1980)
Kieroński, E., Pratt-Hartmann, I., Tendera, L.: Two-variable logics with counting and semantic constraints. SIGLOG News 5(3), 22–43 (2018)
Korovin, K.: Non-cyclic sorts for first-order satisfiability. In: Frontiers of Combining Systems (FroCoS’13), LNCS 8152, pp. 214–228. Springer (2013)
Kroening, D., Strichman, O.: Decision Procedures. Texts in Theoretical Computer Science. An EATCS Series, 2nd edn. Springer, Berlin (2016)
Kruglov, E.: Superposition modulo theory. Ph.D. thesis, Department of Computer Science, Saarland University (2013)
Kruglov, E., Weidenbach, C.: Superposition decides the first-order logic fragment over ground theories. Math. Comput. Sci. 6(4), 427–456 (2012)
Kuncak, V., Piskac, R., Suter, P., Wies, T.: Building a calculus of data structures. In: Verification, Model Checking, and Abstract Interpretation (VMCAI’10), pp. 26–44 (2010)
Lamotte-Schubert, M.: Automatic authorization analysis. Ph.D. thesis, Department of Computer Science, Saarland University (2015)
Lamotte-Schubert, M., Weidenbach, C.: BDI: a new decidable clause class. J. Log. Comput. 27(2), 441–468 (2017)
Lewis, H.R.: Complexity results for classes of quantificational formulas. J. Comput. Syst. Sci. 21(3), 317–353 (1980)
Lewis, H.R.: A logic of concrete time intervals (extended abstract). In: Logic in Computer Science (LICS’90), pp. 380–389 (1990)
Loos, R., Weispfenning, V.: Applying linear quantifier elimination. Comput. J. 36(5), 450–462 (1993)
Mahfoudh, M.: Sur la Vérification de la Satisfaction pour la Logique des Différences. Ph.D. thesis, Université Joseph Fourier – Grenoble 1 (2003)
Mahfoudh, M., Niebert, P., Asarin, E., Maler, O.: A satisfiability checker for difference logic. In: Theory and Applications of Satisfiability Testing (SAT’02), pp. 222–230 (2002)
Manna, Z., Zarba, C.G.: Combining decision procedures. In: Formal Methods at the Crossroads. From Panacea to Foundational Support, 10th Anniversary Colloquium of UNU/IIST, the International Institute for Software Technology of The United Nations University, Lisbon, Portugal, Revised Papers, pp. 381–422 (2002)
Mortimer, M.: On languages with two variables. Math. Log. Q. 21(1), 135–140 (1975)
de Moura, L.M., Bjørner, N.: Satisfiability modulo theories: introduction and applications. Commun. ACM 54(9), 69–77 (2011)
Nelson, G.: Combining satisfiability procedures by equality-sharing. Contemp. Math. 29, 201–211 (1984)
Nelson, G., Oppen, D.C.: Simplification by cooperating decision procedures. ACM Trans. Program. Lang. Syst. 1(2), 245–257 (1979)
Niebert, P., Mahfoudh, M., Asarin, E., Bozga, M., Maler, O., Jain, N.: Verification of timed automata via satisfiability checking. In: Formal Techniques in Real-Time and Fault-Tolerant Systems (FTRTFT’02), pp. 225–244 (2002)
Nieuwenhuis, R., Oliveras, A.: DPLL(T) with exhaustive theory propagation and its application to difference logic. In: Computer Aided Verification (CAV’05), pp. 321–334 (2005)
Oppen, D.C.: Complexity, convexity and combinations of theories. Theor. Comput. Sci. 12, 291–302 (1980)
Otto, M.: Two variable first-order logic over ordered domains. J. Symb. Log. 66(2), 685–702 (2001)
Padon, O., McMillan, K.L., Panda, A., Sagiv, M., Shoham, S.: Ivy: safety verification by interactive generalization. In: Programming Language Design and Implementation (PLDI’16), pp. 614–630 (2016)
Pérez, J.A.N., Voronkov, A.: Encodings of bounded LTL model checking in effectively propositional logic. In: Automated Deduction (CADE-21), pp. 346–361 (2007)
Pérez, J.A.N., Voronkov, A.: Encodings of problems in effectively propositional logic. In: Theory and Applications of Satisfiability Testing (SAT’07), p. 3 (2007)
Pérez, J.A.N., Voronkov, A.: Proof systems for effectively propositional logic. In: Automated Reasoning (IJCAR’08), pp. 426–440 (2008)
Pérez, J.A.N., Voronkov, A.: Planning with effectively propositional logic. In: Programming Logics—Essays in Memory of Harald Ganzinger, LNCS 7797, pp. 302–316 (2013)
Piskac, R., de Moura, L.M., Bjørner, N.: Deciding effectively propositional logic using DPLL and substitution sets. J. Autom. Reason. 44(4), 401–424 (2010)
Policriti, A., Omodeo, E.: The Bernays–Schönfinkel–Ramsey class for set theory: decidability. J. Symb Log. 77, 896–918 (2012)
Pratt, V.R.: Two easy theories whose combination is hard. Technical report, Massachusetts Institute of Technology (1977)
Putnam, H.: Decidability and essential undecidability. J. Symb. Log. 22(1), 39–54 (1957)
Quaas, K., Shirmohammadi, M., Worrell, J.: Revisiting reachability in timed automata. In: Logic in Computer Science (LICS’17), pp. 1–12 (2017)
Rabin, M.O.: Decidability of second-order theories and automata on infinite trees. Trans. Am. Math. Soc. 141, 1–35 (1969)
Ranise, S., Ringeissen, C., Tran, D.: Nelson–Oppen, Shostak and the extended canonizer: a family picture with a newborn. In: Theoretical Aspects of Computing (ICTAC’04), Revised Selected Papers, pp. 372–386 (2004)
Ranise, S., Ringeissen, C., Zarba, C.G.: Combining data structures with nonstably infinite theories using many-sorted logic. In: Frontiers of Combining Systems (FroCoS’05), pp. 48–64 (2005)
Rebele, T., Suchanek, F.M., Hoffart, J., Biega, J., Kuzey, E., Weikum, G.: YAGO: A multilingual knowledge base from Wikipedia, Wordnet, and Geonames. In: The Semantic Web (ISWC’16), pp. 177–185 (2016)
Reynolds, A., Barbosa, H., Fontaine, P.: Revisiting Enumerative Instantiation. In: Tools and Algorithms for the Construction and Analysis of Systems (TACAS’18), pp. 112–131 (2018)
Reynolds, A., Iosif, R., Serban, C.: Reasoning in the Bernays–Schönfinkel–Ramsey fragment of separation logic. In: Verification, Model Checking, and Abstract Interpretation (VMCAI’17), pp. 462–482 (2017)
Reynolds, A., King, T., Kuncak, V.: Solving quantified linear arithmetic by counterexample-guided instantiation. Form. Methods Syst. Des. 51(3), 500–532 (2017)
Robinson, J.: Definability and decision problems in arithmetic. J. Symb. Log. 14(2), 98–114 (1949)
Rueß, H., Shankar, N.: Deconstructing Shostak. In: Logic in Computer Science (LICS’01), pp. 19–28 (2001)
Ruggieri, S., Eirinakis, P., Subramani, K., Wojciechowski, P.J.: On the complexity of quantified linear systems. Theor. Comput. Sci. 518, 128–134 (2014)
Schrijver, A.: Theory of Linear and Integer Programming. Wiley-Interscience Series in Discrete Mathematics and Optimization. Wiley, Hoboken (1999)
Scott, D.: A decision method for validity of sentences in two variables. J. Symb. Log. 27, 477 (1962)
Shankar, N., Rueß, H.: Combining Shostak theories. In: Rewriting Techniques and Applications (RTA’02), pp. 1–18 (2002)
Shelah, S.: The monadic theory of order. Ann. Math. 102(3), 379–419 (1975)
Shostak, R.E.: Deciding combinations of theories. J. ACM 31(1), 1–12 (1984)
Sofronie-Stokkermans, V.: Hierarchic reasoning in local theory extensions. In: Automated Deduction (CADE-20), pp. 219–234 (2005)
Sofronie-Stokkermans, V.: On combinations of local theory extensions. In: Programming Logics—Essays in Memory of Harald Ganzinger, LNCS 7797 pp. 392–413 (2013)
Sofronie-Stokkermans, V.: Hierarchical reasoning in local theory extensions and applications. In: Symbolic and Numeric Algorithms for Scientific Computing (SYNASC’14), pp. 34–41 (2014)
Strichman, O., Seshia, S.A., Bryant, R.E.: Deciding separation formulas with SAT. In: Computer Aided Verification (CAV’02), pp. 209–222 (2002)
Sturm, T.: A survey of some methods for real quantifier elimination, decision, and satisfiability and their applications. Math. Comput. Sci. 11(3–4), 483–502 (2017)
Sturm, T., Voigt, M., Weidenbach, C.: Deciding first-order satisfiability when universal and existential variables are separated. In: Logic in Computer Science (LICS’16), pp. 86–95. IEEE/ACM (2016). An extended version is available at the arXiv preprint server under the signature arXiv:1511.08999 [cs.LO]
Suchanek, F.M., Kasneci, G., Weikum, G.: YAGO: a large ontology from Wikipedia and WordNet. J. Web Semant. 6(3), 203–217 (2008)
Suda, M., Weidenbach, C., Wischnewski, P.: On the saturation of YAGO. In: Automated Reasoning (IJCAR’10), pp. 441–456 (2010)
Talupur, M., Sinha, N., Strichman, O., Pnueli, A.: Range allocation for separation logic. In: Computer Aided Verification (CAV’04), pp. 148–161 (2004)
Tinelli, C., Harandi, M.T.: A new correctness proof of the Nelson–Oppen combination procedure. In: Frontiers of Combining Systems (FroCoS’96), pp. 103–119 (1996)
Tinelli, C., Ringeissen, C.: Unions of non-disjoint theories and combinations of satisfiability procedures. Theor. Comput. Sci. 290(1), 291–353 (2003)
Tinelli, C., Zarba, C.G.: Combining nonstably infinite theories. J. Autom. Reason. 34(3), 209–238 (2005)
Tran, D., Ringeissen, C., Ranise, S., Kirchner, H.: Combination of convex theories: modularity, deduction completeness, and explanation. J. Symb. Comput. 45(2), 261–286 (2010)
Voigt, M.: The Bernays–Schönfinkel–Ramsey fragment with bounded difference constraints over the reals is decidable. In: Frontiers of Combining Systems (FroCoS’17), LNCS 10483, pp. 244–261 (2017). An extended version is available at the arXiv preprint server under the signature arXiv:1706.08504 [cs.LO]
Voigt, M.: A fine-grained hierarchy of hard problems in the separated fragment. In: Logic in Computer Science (LICS’17), pp. 1–12. IEEE/ACM (2017). An extended version is available at the arXiv preprint server under the signature arXiv:1704.02145 [cs.LO]
Voigt, M.: Decidable fragments of first-order logic and of first-order linear arithmetic with uninterpreted predicates. Ph.D. thesis, Department of Computer Science, Saarland University (2019). https://doi.org/10.22028/D291-28428
Voigt, M.: Separateness of variables—a novel perspective on decidable first-order fragments (2019). Submitted. A preprint version is available at the arXiv preprint server under the signature arXiv:1911.11500 [cs.LO]
Voigt, M., Weidenbach, C.: Bernays–Schönfinkel–Ramsey with simple bounds is NEXPTIME-complete. ArXiv preprint arXiv:1501.07209 [cs.LO] (2015). http://arxiv.org/abs/1501.07209
Wang, C., Gupta, A., Ganai, M.K.: Predicate learning and selective theory deduction for a difference logic solver. In: Design Automation Conference (DAC’06), pp. 235–240 (2006)
Weispfenning, V.: The complexity of linear problems in fields. J. Symb. Comput. 5(1/2), 3–27 (1988)
Wies, T., Piskac, R., Kuncak, V.: Combining theories with shared set operations. In: Frontiers of Combining Systems (FroCoS’09), LNCS 5749, pp. 366–382. Springer (2009)
Wischnewski, P.: Efficient reasoning procedures for complex first-order theories. Ph.D. thesis, Department of Computer Science, Saarland University (2012)
Acknowledgements
The author is indebted to Martin Bromberger, Pascal Fontaine, Viorica Sofronie-Stokkermans, Thomas Sturm, Christoph Weidenbach, and the anonymous reviewers for enlightening discussions and valuable remarks. Special thanks go to Pascal Fontaine, who has discovered a gap in an earlier version.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Technical Appendix
Technical Appendix
1.1 Some Results Based on Ramsey Theory
In the present section we prove Lemmas 7 and 8.
Lemma 7
Let \(n, m > 0\) be positive integers. Let \(\chi : {\mathbb {Q}}^m \rightarrow {\mathcal {C}}\) be any coloring. There is some positive integer \({\widehat{n}}\) such that for every set \(R \subseteq {\mathbb {Q}}\) with \(|R| \ge {\widehat{n}}\), i.e. R needs to be sufficiently large, there exists a subset \(Q \subseteq R\) of cardinality n such that all ascending tuples \(\langle r_1, \ldots , r_m\rangle \in Q^m\) are assigned the same color by \(\chi \).
Proof
This proof is an adaptation of the proof of Ramsey’s Theorem on page 7 in [62]. For \(n < m\) the lemma is trivially satisfied, since in this case \(Q^m\) cannot contain any ascending tuple. Hence, we assume \(n \ge m\). In order to avoid technical difficulties when defining the sequence of elements \(s_{m-1}, s_{m}, s_{m+1}, \ldots \) below, we assume for the rest of the proof that R is finite but sufficiently large. This assumption does not pose a restriction, as we could always consider a sufficiently large finite subset of R, if R were to be infinite.
We proceed by induction on \(m \ge 1\). The base case \(m=1\) is easy, since \(\chi \) can assign only finitely many colors to elements in R and thus some color must be assigned at least \(\big \lfloor \tfrac{|R|}{|{\mathcal {C}}|} \big \rfloor \) times. Hence, if R contains at least \(n |{\mathcal {C}}|\) elements, we find a uniformly colored subset Q of size n. Suppose \(m>1\). At first, we pick the \(m-2\) smallest rational numbers \(s_1< \cdots < s_{m-2}\) from R and set \(S_{m-2} := R {\setminus } \{ s_1, \ldots , s_{m-2}\}\). Thereafter, we simultaneously construct two sufficiently long but finite sequences \(s_{m-1}, s_m, s_{m+1}, \ldots \) and \(S_{m-1}, S_m, S_{m+1}, \ldots \) as follows:
Given \(S_i\), we define \(s_{i+1}\) to be the smallest rational number in \(S_i\).
Given \(S_i\) and the element \(s_{i+1}\), we define an equivalence relation \(\sim _i\) on the set \(S'_i := S_i {\setminus } \{ s_{i+1} \}\) so that \(s \sim _i s'\) holds if and only if for every sequence of indices \(j_1, \ldots , j_{m-1}\) with \(1 \le j_1< \cdots < j_{m-1} \le i+1\), we have \(\chi (s_{j_1}, \ldots , s_{j_{m-1}}, s) = \chi (s_{j_1}, \ldots , s_{j_{m-1}}, s')\). This equivalence relation partitions \(S'_i\) into at most \(|{\mathcal {C}}|^{{i+1}\atopwithdelims (){m-1}}\) equivalence classes. We choose one such class with largest cardinality to be \(S_{i+1}\).
By construction of the sequence \(s_1, s_2, s_3, \ldots \), we must have \(\chi (s_{j_1}, \ldots , s_{j_{m-1}}, s_{K}) = \chi (s_{j_1}, \ldots ,\) \(s_{j_{m-1}}, s_{K'})\) for every sequence of indices \(j_1< \ldots < j_{m-1}\) and all indices \(K, K' \ge j_{m-1}+1\). Notice that this covers all ascending m-tuples in \(\{s_1, s_2, s_3, \ldots \}^m\) starting with \(s_{j_1}, \ldots , s_{j_m-1}\), i.e. they all share the same color. We now define a new coloring \(\chi ' : \{s_1, s_2, s_3, \ldots \}^{m-1} \rightarrow {\mathcal {C}}\) so that \(\chi '(s_{j_1}, \ldots ,\) \(s_{j_{m-1}}) := \chi (s_{j_1}, \ldots , s_{j_{m-1}}, s_{j_{m-1}+1})\) for every sequence of indices \(j_1< \cdots < j_{m-1}\) (in case of \(j_{m-1}\) being the index of the last element in the sequence \(s_1, s_2, s_3, \ldots \), \(\chi '(s_{j_1}, \ldots , s_{j_{m-1}})\) shall be an arbitrary color from \({\mathcal {C}}\)). By induction, there exists a subset \(Q \subseteq \{s_1, s_2, s_3, \ldots \}\) of cardinality n, such that every ascending \((m-1)\)-tuple \({\bar{r}} \in Q^{m-1}\) is colored the same by \(\chi '\). The definition of \(\chi '\) entails that now all ascending m-tuples \({\bar{r}}' \in Q^m\) are colored the same by \(\chi \). Hence, Q is the sought set. \(\square \)
In order to prove Lemma 8, we formulate and prove two auxiliary results.
Lemma 62
Let \(n, m, p > 0\) be positive integers and let \(\chi : {\mathbb {Q}}^{m p} \rightarrow {\mathcal {C}}\) be an arbitrary coloring. Let \(R_1, \ldots , R_p\) be sufficiently large but finite subsets of \({\mathbb {Q}}\). There exist subsets \(Q_1 \subseteq R_1, \ldots , Q_p \subseteq R_p\), each of cardinality n and there is some color \(C \in {\mathcal {C}}\), such that for all ascending m-tuples \({\bar{r}}_1 \in Q_1^m, \ldots , {\bar{r}}_p \in Q_p^m\) we have \(\chi ({\bar{r}}_1, \ldots , {\bar{r}}_p) = C\).
Proof
This proof is an adaptation of the proof of Theorem 5 on page 113 in [62]. As in the proof of Lemma 7, we assume \(n \ge m\). We proceed by induction on \(p \ge 1\). The case \(p=1\) is covered by Lemma 7. Suppose \(p > 1\). We define an equivalence relation \(\sim _p\) over the set \(R_p^m\) so that \({\bar{s}}\sim _p {\bar{s}}'\) holds if and only if for all ascending tuples \({\bar{r}}_1 \in R_1^m, \ldots , {\bar{r}}_{p-1} \in R_{p-1}^m\) the colors \(\chi \big ({\bar{r}}_1, \ldots , {\bar{r}}_{p-1}, {\bar{s}}\big )\) and \(\chi \big ({\bar{r}}_1, \ldots , {\bar{r}}_{p-1}, {\bar{s}}'\big )\) are identical. This equivalence relation induces at most \(|{\mathcal {C}}|^{{{|R_1|}\atopwithdelims (){m}}\cdot \ldots \cdot {{|R_{p-1}|}\atopwithdelims (){m}}}\) equivalence classes over \(R_p^m\). It thus induces a coloring of \(\chi ' : R_p^m \rightarrow {\mathcal {C}}'_p\) where \({\mathcal {C}}'_p\) contains one color for each of these equivalence classes. By virtue of Lemma 7, we can construct a subset \(Q_p \subseteq R_p\) with n elements such that all ascending m-tuples \({\bar{r}}\in Q_p^m\) are colored identically by \(\chi '\). Let the coloring \(\chi ''\) be defined by \(\chi ''({\bar{r}}_1, \ldots , {\bar{r}}_{p-1}) := \chi ({\bar{r}}_1, \ldots , {\bar{r}}_{p-1}, {\bar{s}})\) for some fixed ascending m-tuple \({\bar{s}}\in Q_{p}^m\). By induction, we find subsets \(Q_1 \subseteq R_1, \ldots , Q_{p-1} \subseteq R_{p-1}\), each containing n elements, such that for all ascending m-tuples \({\bar{r}}_1 \in R_1^m, \ldots , {\bar{r}}_{p-1} \in R_{p-1}^m\) the colors \(\chi ''({\bar{r}}_1, \ldots , {\bar{r}}_{p-1})\) are identical. But then, the definition of \(\chi ''\) and \(\chi '\) entail that the sets \(Q_1, \ldots , Q_p\) satisfy the requirements posed by the lemma. \(\square \)
Recall that we write [K] to address the set \(\{1, \ldots , K\}\) for any positive integer \(K > 0\).
Lemma 63
Let \(n, m, p > 0\) be positive integers, let \(K \ge 0\) be a nonnegative integer and let \(\chi : {\mathbb {Q}}^m \rightarrow {\mathcal {C}}\) be an arbitrary coloring. Let \(R_1, \ldots , R_p\) be sufficiently large but finite subsets of \({\mathbb {Q}}\). Let \(q_1, \ldots , q_K\) be fixed rational numbers. Let \(\rho : [m] \rightarrow [p+K]\times [m]\) be some mapping such that \(\rho (i) = \langle K,\ell \rangle \) with \(K > p\) implies \(\ell = 1\).
There exist subsets \(Q_1 \subseteq R_1, \ldots , Q_p \subseteq R_p\), each of cardinality n, and there exists some color \(C \in {\mathcal {C}}\) such that for all ascending tuples
we have \(\chi ({\bar{r}}_{\rho (1)}, \ldots , {\bar{r}}_{\rho (m)}) = C\).
Proof
We again assume \(n \ge m\). We define a new coloring \(\chi ' : {\mathbb {Q}}^{m p} \rightarrow {\mathcal {C}}\) by
for every mp-tuple \(\langle {\bar{r}}_1, \ldots , {\bar{r}}_p\rangle \in R_1^m \times \ldots \times R_p^m\) with ascending \({\bar{r}}_1, \ldots , {\bar{r}}_p\). By Lemma 62, there exist subsets \(Q_1 \subseteq R_1, \ldots , Q_p \subseteq R_p\), each with n elements, such that for all ascending tuples \({\bar{r}}_1 \in Q_1^m, \ldots , {\bar{r}}_p \in Q_p^m\) the colors \(\chi '({\bar{r}}_1, \ldots , {\bar{r}}_p)\) are the same. By definition of \(\chi '\), the sets \(Q_1, \ldots , Q_p\) satisfy the requirements of the lemma. \(\square \)
Now we have the right tools at hand to prove Lemma 8
Lemma 8
Let \(n, m, p > 0\) be positive integers, let \(K \ge 0\) be a nonnegative integer and let \(\chi : {\mathbb {Q}}^m \rightarrow {\mathcal {C}}\) be an arbitrary coloring. Let \(R_1, \ldots , R_p\) be sufficiently large but finite subsets of \({\mathbb {Q}}\). Let \(q_1, \ldots , q_K\) be fixed rational numbers. Let \(\rho _1, \ldots , \rho _L\) be some enumeration of all mappings \(\rho _j : [m] \rightarrow [p+K]\times [m]\) for which \(\rho _{j}(i) = \langle K,\ell \rangle \) with \(K > p\) entails \(\ell = 1\). Then, there exist subsets \(Q_1 \subseteq R_1, \ldots , Q_p \subseteq R_p\), each of cardinality n, such that for all ascending tuples
and every index j, \(1\le j\le L\), we have
Proof
We again assume \(n \ge m\). We construct sequences of subsets \(S_{\ell ,0} \supseteq \ldots \supseteq S_{\ell ,L}\) for every \(\ell \), \(1\le \ell \le p\), such that
-
\(S_{\ell ,0} = R_\ell \), and
-
\(S_{\ell , j+1} \subseteq S_{\ell , j}\) is a subset of sufficient cardinality that is constructed by application of Lemma 63 for \(\rho := \rho _{j+1}\), i.e. for all ascending tuples
$$\begin{aligned} \langle s_{\langle 1,1\rangle }, \ldots , s_{\langle 1,m\rangle }\rangle&\in S_{1, j+1}^m\\ \vdots \quad&~\\ \langle s_{\langle p,1\rangle }, \ldots , s_{\langle p,m\rangle }\rangle&\in S_{p, j+1}^m \end{aligned}$$the colors \(\chi ({\bar{s}}_{\rho _{j+1}(1)}, \ldots , {\bar{s}}_{\rho _{j+1}(m)})\) are the same.
Then the sets \(S_{1, L}, \ldots , S_{p, L}\) are the sought \(Q_1, \ldots , Q_p\). \(\square \)
1.2 Proof of Lemma 13
We start with some auxiliary results that will be useful to analyze the blowup that we incur during the normal-form transformation.
The following is standard methodology in the area of difference logic, see, e.g. Section 5.7 in [82], Section 2.1 in [37], or Section 11.4.5 in [14]. Let m be any positive integer. Let \(\bar{\mathrm {x}}\) be any m-tuple of pairwise-distinct first-order variables \(x_1, \ldots , x_m\) of sort \({\mathbb {Q}}\) and let \(x_0\) be any first-order variable of sort \({\mathbb {Q}}\) that does not occur in \(\bar{\mathrm {x}}\). Let \(\varLambda (x_0, \bar{\mathrm {x}}) :=\, x_0 \!=\! 0 \wedge \varLambda '(x_0, \bar{\mathrm {x}})\) be a conjunction where \(\varLambda '(x_0, \bar{\mathrm {x}})\) is a conjunction of atoms of the form \(x - y \le c\) or \(x - y < c\) with \(x,y \in \bar{\mathrm {x}}\cup \{x_0\}\) and \(c \in {\mathbb {Z}}\).
Definition 64
(Difference constraint graph \({\mathcal {G}}_\varLambda \), cf. Definition 5.17 and Excercise 5.16 in [82]) The difference constraint graph \({\mathcal {G}}(\varLambda )\) is a weighted directed graph \(\langle V, E\rangle \) with \(V = \{x_0, x_1, \ldots ,\) \(x_m\}\) and \(E \subseteq V \times V \times {\mathbb {Q}}\) such that
-
\(\langle x, x, 0\rangle \in E\) for all \(x \in V\),
-
\(\langle x, y, c\rangle \in E\) if and only if \(\varLambda \) contains the constraint \(x - y \le c\), and
-
\(\langle x, y, c-\delta \rangle \in E\) if and only if \(\varLambda \) contains the constraint \(x - y < c\),
where we set \(\delta := \tfrac{1}{2}(m+1)^{-1}\).
A path \(\pi \) in \({\mathcal {G}}_\varLambda \) is any finite, nonempty sequence \(\langle x_{i_1}, x_{i_2}, c_1\rangle \langle x_{i_2}, x_{i_3}, c_2\rangle \ldots \langle x_{i_{\ell -1}}, x_{i_\ell }, c_\ell \rangle \) of edges from \({\mathcal {G}}_\varLambda \). We call \(\pi \) simple, if the indices \(i_1, \ldots , i_{\ell -1}\) are pairwise distinct, i.e. \(\pi \) traverses every vertex in \({\mathcal {G}}_\varLambda \) at most once, except for the end point which may coincide with the starting point but does not have to. A simple cycle in \({\mathcal {G}}_\varLambda \) is any simple path whose start and end point coincide. The length of a path in \({\mathcal {G}}_\varLambda \) is the sum of the weights associated with the edges the path traverses. Notice that \(\delta \) in Definition 64 is chosen such that the following property is satisfied. Let \(\pi \) be any simple path in \({\mathcal {G}}_\varLambda \). Let \(c_1, \ldots , c_\ell \) be the weights associated with the edges \(\pi \) traverses. We have \(\big ( \sum _{1 \le i \le \ell } \lceil c_i \rceil \big ) -1 < \sum _{1 \le i \le \ell } c_i \le \sum _{1 \le i \le \ell } \lceil c_i \rceil \).
Proposition 65
(cf. Theorem 1 in [37]) Consider the difference constraint graph \({\mathcal {G}}_\varLambda \) and suppose that we have \({\mathbb {Q}}\models \exists x_0 \bar{\mathrm {x}}.\, \varLambda (x_0, \bar{\mathrm {x}})\). Then, for every pair \(x,y \in \bar{\mathrm {x}}\cup \{x_0\}\) and every rational number r we have
-
(a)
\({\mathbb {Q}}\models \forall x_0 \bar{\mathrm {x}}.\, \varLambda (x_0, \bar{\mathrm {x}}) \rightarrow x - y \le r\) if and only if y is reachable from x in \({\mathcal {G}}_\varLambda \) and \(\lceil d_{x,y} \rceil \le r\), and
-
(b)
\({\mathbb {Q}}\models \forall x_0 \bar{\mathrm {x}}.\, \varLambda (x_0, \bar{\mathrm {x}}) \rightarrow x - y < r\) if and only if y is reachable from x in \({\mathcal {G}}_\varLambda \) and we have either \(\lceil d_{x,y} \rceil < r\) or \(d_{x,y} < \lceil d_{x,y} \rceil = r\),
where \(d_{x,y}\) is the length of a shortest simple path from x to y in \({\mathcal {G}}_\varLambda \).
In fact, a variant of Proposition 65 yields a deterministic decision procedure for the sentence \(\psi := \exists x_0 \bar{\mathrm {x}}.\, \varLambda (x_0, \bar{\mathrm {x}})\) under \({\mathbb {Q}}\) that runs in polynomial time [14, 82]: \(\psi \) is satisfied by \({\mathbb {Q}}\) if and only if there is some simple cycle in \({\mathcal {G}}_\varLambda \) that has a negative length. In other words, we then have \({\mathbb {Q}}\models \forall x_0 \bar{\mathrm {x}}.\, \varLambda (x_0, \bar{\mathrm {x}}) \rightarrow x - x \le -1\) for some \(x \in \bar{\mathrm {x}}\cup \{x_0\}\).
Now we have all pieces together to prove the existence of BSR(SLR) and BSR(BD) normal forms.
Lemma 13
For every BSR(SLR) (or BSR(BD)) clause set N there is an equisatisfiable BSR(SLR) (or BSR(BD)) clause set \(N'\) in BSR(SLR) normal form (BSR(BD) normal form) such that
-
(a)
the length of \(N'\) is at most exponential in the length of N,
-
(b)
for any clause C in \(N'\) the number of variables occurring in C is not larger than the number of variables occurring in any clause in N,
-
(c)
if N is a BSR(SLR) clause set, the number of distinct rational numbers and Skolem constants occurring in \(N'\) is linear in the length of N,
-
(d)
if N is a BSR(BD) clause set, then
-
(d.1)
the number of clauses in \(N'\) grows at most exponentially in the number of atoms \(s \ne t\) occurring in any clause in N,
-
(d.2)
the length of any clause in \(N'\) is at most polynomial in the length of the longest clause in N,
-
(d.3)
every free-sort Skolem constant occurring in \(N'\) also occurs in N, and
-
(d.4)
the absolute value of any integer in \(N'\) is linear in \(\kappa \cdot \lambda \), where \(\kappa \) is the smallest positive integer that is larger than the absolute value of any integer occurring in N, and \(\lambda \) is the smallest positive integer that is larger than the maximal number of universally quantified variables occurring in any clause in N.
-
(d.1)
Proof
(Sketch) We start with the BSR(SLR) case. First, we show how make sure that every base-sort variable that occurs in \(\varLambda \) in a clause \(\varLambda \wedge \varGamma \rightarrow \varDelta \) also occurs in \(\varGamma \) or in \(\varDelta \). Consider any BSR(SLR) clause \(\varLambda \wedge \varGamma \rightarrow \varDelta \) and let \(\bar{\mathrm {x}}\) be some nonempty tuple of base-sort variables that occur in \(\varLambda \) but neither in \(\varGamma \) nor in \(\varDelta \). Recall that all variables in clauses are implicitly universally quantified. We observe that \(\forall \bar{\mathrm {x}}.\, (\varLambda \wedge \varGamma \rightarrow \varDelta )\) is equivalent to \((\exists \bar{\mathrm {x}}.\, \varLambda ) \wedge \varGamma \rightarrow \varDelta \). Since \(\varLambda \) is a conjunction of LRA atoms, we may apply virtual substitution [90, 131] to eliminate the quantifier block \(\exists \bar{\mathrm {x}}\) and compute some disjunction of conjunctions of LRA atoms \(\bigvee _i \varLambda '_i\) that is \({\mathbb {Q}}\)-equivalent to \(\exists \bar{\mathrm {x}}.\, \varLambda \). Then, the clause \((\exists \bar{\mathrm {x}}.\, \varLambda ) \wedge \varGamma \rightarrow \varDelta \) is equivalent to the conjunction of clauses \(\bigwedge _i (\varLambda '_i \wedge \varGamma \rightarrow \varDelta )\). The length of \(\bigwedge _i (\varLambda '_i \wedge \varGamma \rightarrow \varDelta )\) is at most exponential in the length of \(\varLambda \wedge \varGamma \rightarrow \varDelta \) (cf. Theorem 3.7 in [90]), the length of each \(\varLambda _i\) is at most linear in the length of \(\varLambda \), and the set of variables occurring in any \(\varLambda '_i\) is a subset of the variables occurring freely in \(\exists \bar{\mathrm {x}}.\, \varLambda \).
In BSR(SLR) clauses the used elimination sets contain only testpoints of the form t, \(t + \varepsilon \), or \(- \infty \), where t is some LRA term occurring in N in some atom \(x \mathrel {\triangleleft }t\). Virtually substituting such a testpoint in any arithmetic atom that is admitted in BSR(SLR) yields again an atom admitted in BSR(SLR).
Next, we describe how to modify N in such a way that it can be partitioned into \(N_{{\mathbb {Q}}}\) and \(N_\mathrm {BSR}\) as required in Definition 11. Clauses of the form \(s \mathrel {\triangleleft }t \wedge \varLambda ' \wedge \varGamma \rightarrow \varDelta \), where t is neither a variable nor a Skolem constant, are replaced—under preservation of (un)satisfiability—with two clauses \(t \ne c \rightarrow {\texttt {false}}\) (which is equivalent to \(t = c\)) and \(s \mathrel {\triangleleft }c \wedge \varLambda ' \wedge \varGamma \rightarrow \varDelta \) for some fresh uninterpreted constant symbol c of sort \({\mathbb {Q}}\). Doing this exhaustively for all clauses with nonempty part \(\varGamma \) or \(\varDelta \) leads to the desired partition of N in \(N_{{\mathbb {Q}}}\) and \(N_\mathrm {BSR}\).
Now we treat the BSR(BD) case. Again, we first show how to make sure that every base-sort variable that occurs in \(\varLambda \) in a clause \(\varLambda \wedge \varGamma \rightarrow \varDelta \) also occurs in \(\varGamma \) or in \(\varDelta \). Clauses of the form \(s \not =t \wedge \varLambda ' \wedge \varGamma \rightarrow \varDelta \) are equivalently replaced with two clauses \(s < t \wedge \varLambda ' \wedge \varGamma \rightarrow \varDelta \) and \(s > t \wedge \varLambda ' \wedge \varGamma \rightarrow \varDelta \). We do this exhaustively for all atoms \(s \ne t\) that contain at least one variable not occurring in the \(\varGamma \) or \(\varDelta \) part of the respective clause. In the worst case, treating a clause in N in this way produces \(2^k\) clauses if the original clause contains k atoms \(s \not =t\) that need to be replaced.
Consider any BSR(BD) clause \(C := \varLambda ' \wedge \varLambda \wedge \varGamma \rightarrow \varDelta \) where every atom in \(\varLambda '\) contains a variable x that does not occur in \(\varLambda \), \(\varGamma \), and \(\varDelta \). Let \(\bar{\mathrm {x}}\) be some tuple listing all these variables exactly once and let \(\bar{\mathrm {v}}\) be some tuple listing all the other variables occurring in C. We assume that \(\varLambda '\) does not contain any atoms of the from \(s \not =t\). Moreover, we assume that all atoms \(s = t\) in \(\varLambda '\) have been replaced with conjunctions \(s \le t \wedge t \le s\). We observe that \(\forall \bar{\mathrm {x}}.\, (\varLambda '(\bar{\mathrm {x}}, \bar{\mathrm {v}}) \wedge \varLambda (\bar{\mathrm {v}}) \wedge \varGamma (\bar{\mathrm {v}}) \rightarrow \varDelta (\bar{\mathrm {v}}))\) is equivalent to \(\big (\exists \bar{\mathrm {x}}.\, \varLambda '(\bar{\mathrm {x}}, \bar{\mathrm {v}})\big ) \wedge \varLambda (\bar{\mathrm {v}}) \wedge \varGamma (\bar{\mathrm {v}}) \rightarrow \varDelta (\bar{\mathrm {v}})\). Since \(\varLambda '(\bar{\mathrm {x}}, \bar{\mathrm {v}})\) is a conjunction of LRA atoms, we may apply the Fourier-Motzkin elimination procedure to eliminate the variables \(\bar{\mathrm {x}}\) in \(\big (\exists \bar{\mathrm {x}}.\, \varLambda '(\bar{\mathrm {x}}, \bar{\mathrm {v}})\big )\) one by one.
Consider any \(x \in \bar{\mathrm {x}}\). In order to eliminate x from \(\exists x.\, \varLambda '(\bar{\mathrm {x}}, \bar{\mathrm {v}})\), we proceed as follows. Let \(\varLambda '_0, \varLambda '_1, \varLambda '_2\) be the shortest conjunctions satisfying the following properties:
-
(i)
every atom from \(\varLambda '\) that does not contain x occurs in \(\varLambda '_0\),
-
(ii)
for every atom in \(\varLambda '\) that contains x there is a \({\mathbb {Q}}\)-equivalent atom in \(\varLambda '_1 \wedge \varLambda '_2\),
-
(iii)
every atom in \(\varLambda '_1\) has the form \(s \le x\) or \(s < x\) where s is either an integer, a variable, or an LRA term \(y + c\) for some variable \(y \in \bar{\mathrm {x}}\cup \bar{\mathrm {v}}\) of sort \({\mathbb {Q}}\) and some integer c, and
-
(iv)
every atom in \(\varLambda '_2\) has the form \(x \le t\) or \(x < t\) where t is either an integer, a variable, or an LRA term \(y + c\) for some variable \(y \in \bar{\mathrm {x}}\cup \bar{\mathrm {v}}\) of sort \({\mathbb {Q}}\) and some integer c.
Let \(\varLambda ''\) be the conjunction of the following set of atoms
Let \(\bar{\mathrm {x}}' := \bar{\mathrm {x}}{\setminus } \{x\}\). It is well known that the two formulas \(\exists x.\, \varLambda '_1(x, \bar{\mathrm {x}}', \bar{\mathrm {v}}) \wedge \varLambda '_2(x, \bar{\mathrm {x}}', \bar{\mathrm {v}})\) and \(\varLambda ''(\bar{\mathrm {x}}', \bar{\mathrm {v}})\) are \({\mathbb {Q}}\)-equivalent (see, e.g. [122], Section 12.2). Hence, \(\exists x.\, \varLambda '(x, \bar{\mathrm {x}}', \bar{\mathrm {v}})\) can be replaced with the \({\mathbb {Q}}\)-equivalent formula \(\varLambda '_0(\bar{\mathrm {x}}', \bar{\mathrm {v}}) \wedge \varLambda ''(\bar{\mathrm {x}}', \bar{\mathrm {v}})\).
Concerning the atoms in \(\varLambda ''(\bar{\mathrm {x}}, \bar{\mathrm {v}})\) we find that every atom therein can be transformed into an equivalent atom of the form \(y \mathrel {\triangleleft }c\), \(y \mathrel {\triangleleft }z\), or \(y - z \mathrel {\triangleleft }c\) where \(y, z \in \bar{\mathrm {x}}' \cup \bar{\mathrm {v}}\), c is some integer, and \({\mathrel {\triangleleft }} \in \{<, \le , \ge , >\}\). As we need to keep at most \(4 \cdot |\bar{\mathrm {x}}' \cup \bar{\mathrm {v}}| + 8 \cdot |\bar{\mathrm {x}}' \cup \bar{\mathrm {v}}|^2\) of these atoms (at most one atom \(y \mathrel {\triangleleft }c\) for each pair \(y,\mathrel {\triangleleft }\) and at most two atoms \(y - z \mathrel {\triangleleft }d\) and \(z - y \mathrel {\triangleleft }e\) for every triple \(y, z, \mathrel {\triangleleft }\)), we may assume that the length of \(\varLambda ''(\bar{\mathrm {x}}', \bar{\mathrm {v}})\) is at most polynomial in the number of variables in \(\bar{\mathrm {x}}', \bar{\mathrm {v}}\).
We apply the described elimination procedure to eliminate the other variables in \(\bar{\mathrm {x}}\) as well, in a variable-by-variable fashion. Hence, the final conjunction \(\varLambda '''(\bar{\mathrm {v}})\) contains at most \(4 \cdot |\bar{\mathrm {v}}| + 8 \cdot |\bar{\mathrm {v}}|^2\) atoms, and we replace the clause \(C(\bar{\mathrm {x}}, \bar{\mathrm {v}})\) in N with the equivalent clause \(\varLambda '''(\bar{\mathrm {v}}) \wedge \varLambda (\bar{\mathrm {v}}) \wedge \varGamma (\bar{\mathrm {v}}) \rightarrow \varDelta (\bar{\mathrm {v}})\). In addition, we can bound the absolute value of the integers occurring in \(\varLambda '''\) as follows. It is easy to verify that we can transform \(\varLambda (\bar{\mathrm {x}}, \bar{\mathrm {v}})\) into a \({\mathbb {Q}}\)-equivalent conjunction \(\varLambda _\mathrm {diff}(\bar{\mathrm {x}}, \bar{\mathrm {v}})\) of difference constraints in the sense of Definition 64 and Proposition 65 (see the paragraph preceding Definition 64). We have mentioned right after Proposition 65 that we can check in polynomial time whether \(\exists \bar{\mathrm {x}}\bar{\mathrm {v}}.\, \varLambda _\mathrm {diff}(\bar{\mathrm {x}}, \bar{\mathrm {v}})\) is satisfied under \({\mathbb {Q}}\). In the opposite case, \(\varLambda '''\) can be replaced by \({\texttt {false}}\). Henceforth, we assume that \({\mathbb {Q}}\models \exists \bar{\mathrm {x}}\bar{\mathrm {v}}.\, \varLambda _\mathrm {diff}(\bar{\mathrm {x}}, \bar{\mathrm {v}})\).
Since \(\varLambda '''(\bar{\mathrm {v}})\) is the result of applying Fourier-Motzkin elimination to \(\exists \bar{\mathrm {x}}.\, \varLambda '(\bar{\mathrm {x}}, \bar{\mathrm {v}})\), we observe that for every atom of the form \(u - v \le c\) occurring in \(\varLambda '''(\bar{\mathrm {v}})\) we have \({\mathbb {Q}}\models \forall \bar{\mathrm {x}}\bar{\mathrm {v}}.\, \varLambda _\mathrm {diff}(\bar{\mathrm {x}}, \bar{\mathrm {v}}) \rightarrow u - v \le c\). Let \(\kappa \) be the smallest positive integer that is larger than the absolute value of any integer occurring in \(\varLambda '\). Then, by Proposition 65, we observe \(c \ge - \kappa \cdot (|\bar{\mathrm {x}}\cup \bar{\mathrm {v}}|+1)\) and, in addition, that there exists some integer k satisfying the following properties:
-
(1)
\(- \kappa \cdot (|\bar{\mathrm {x}}\cup \bar{\mathrm {v}}|+1) \;\le \; k \;\le \; \kappa \cdot (|\bar{\mathrm {x}}\cup \bar{\mathrm {v}}|+1)\), and
-
(2)
\({\mathbb {Q}}\models \forall \bar{\mathrm {x}}\bar{\mathrm {v}}.\, \varLambda '(\bar{\mathrm {x}}, \bar{\mathrm {v}}) \rightarrow u - v \mathrel {\triangleleft }k\).
This means, if \(c > \kappa \cdot (|\bar{\mathrm {x}}\cup \bar{\mathrm {v}}|+1)\), then we can replace \(u - v \le c\) in \(\varLambda '''\) with the atom \(u - v \le k\), which subsumes the former. Using similar arguments we can show the same for other atoms occurring in \(\varLambda '''\). Consequently, we may assume that \(\varLambda '''\) contains only integers whose absolute value is linear in \(\kappa \cdot (|\bar{\mathrm {x}}\cup \bar{\mathrm {v}}|+1)\). \(\square \)
1.3 Proof of Lemma 59
Lemma 59
Let N be a finite clause set as described above and let \(\lambda \) be the maximal number of rational-valued variables in any clause in N; if \(\lambda < m\), we set \(\lambda := m\). Let \((\sim _k)_{k \ge 1}\) be any family of downwards scalable equivalence relations that satisfies the following properties.
-
(a)
Each \(\sim _k\) in the family has a finite index, i.e. it induces only finitely many equivalence classes over \({\mathbb {Q}}^k\).
-
(b)
Let \(\varLambda (\bar{\mathrm {x}})\) be any conjunction of atoms \(A(\bar{\mathrm {x}}) \in \varTheta (X)\) with \(|\bar{\mathrm {x}}| \le \lambda \). For any two \({\bar{r}}, {\bar{r}}' \in {\mathbb {Q}}^{|\bar{\mathrm {x}}|}\) with \({\bar{r}}\sim _{|\bar{\mathrm {x}}|} {\bar{r}}'\) we have \({\mathcal {A}}\models \varLambda ({\bar{r}})\) if and only if \({\mathcal {A}}\models \varLambda ({\bar{r}}')\).
Moreover, let Q be any finite subset of \({\mathbb {Q}}\) such that for every k, \(1 \le k \le \lambda \), every \(S \in {\mathbb {Q}}^k/_{\sim _k}\), and every \({\bar{r}}\in S\) there is some \({\bar{q}}\in Q^k\) such that \({\bar{q}}\sim _k {\bar{r}}\).
Suppose we have \({\mathcal {A}}\models C({\bar{{\mathsf {e}}}}, {\bar{q}})\) for every clause \(C(\bar{\mathrm {u}}, \bar{\mathrm {x}}) \in N\) and all \({\bar{{\mathsf {e}}}}\in \big ({\mathcal {S}}^{\mathcal {A}}\big )^{|\bar{\mathrm {u}}|}\), \({\bar{q}}\in Q^{|\bar{\mathrm {x}}|}\). If \({\mathcal {A}}\) is \(\sim \)-uniform over Q, then we can turn \({\mathcal {A}}\) into a model \({\mathcal {B}}\) of N that is \(\sim \)-uniform over \({\mathbb {Q}}\).
Proof
We construct the structure \({\mathcal {B}}\) as follows. We set \({\mathcal {S}}^{\mathcal {B}}:= {\mathcal {S}}^{\mathcal {A}}\), and for every constant symbol c occurring in N we set \(c^{\mathcal {B}}:= c^{\mathcal {A}}\). Moreover, for every uninterpreted predicate symbol P occurring in N and for all tuples \({\bar{{\mathsf {e}}}}\in ({\mathcal {S}}^{\mathcal {A}})^{m'}\) and \({\bar{r}}\in {\mathbb {Q}}^m\) we pick some tuple \({\bar{q}}\in Q^m\) which is \(\sim \)-equivalent to \({\bar{r}}\), and we define \(P^{\mathcal {B}}\) so that
-
Claim: The structure \({\mathcal {B}}\) is \(\sim \)-uniform.
-
Proof: By construction of \({\mathcal {B}}\) and by our assumption that \({\mathcal {A}}\) is \(\sim \)-uniform over Q. \(\Diamond \)
We next show \({\mathcal {B}}\models N\). Consider any clause \(C = \varLambda \wedge \varGamma \rightarrow \varDelta \) in N and let \(\beta \) be any variable assignment ranging over \({\mathcal {S}}^{\mathcal {B}}\cup {\mathbb {Q}}\). Starting from \(\beta \), we derive a special variable assignment \(\gamma _C\) as follows. Let \(x_1, \ldots , x_{\lambda _C}\) be an enumeration of all base-sort variables occurring in C. Since \(\lambda _C \le \lambda \), there is some tuple \(\langle q_1, \ldots , q_{\lambda _C}\rangle \in Q^{\lambda _C}\) such that \(\langle q_1, \ldots , q_{\lambda _C}\rangle \sim _{\lambda _C} \big \langle \beta (x_1), \ldots , \beta (x_{\lambda _C}) \big \rangle \). We define \(\gamma _C(x_i) := q_i\) for every i, \(1 \le i \le \lambda _C\). For all other base-sort variables, \(\gamma _C\) can be defined arbitrarily. For every free-sort variable u we set \(\gamma _C(u) := \beta (u)\). Then, we observe
As we have assumed \({\mathcal {A}}\models C({\bar{{\mathsf {e}}}}, {\bar{q}})\) for all \({\bar{{\mathsf {e}}}}\in \big ({\mathcal {S}}^{\mathcal {A}}\big )^{|\bar{\mathrm {u}}|}\), \({\bar{q}}\in Q^{|\bar{\mathrm {x}}|}\), we in particular get \({\mathcal {A}},\gamma _C \models C\). By case distinction on why \({\mathcal {A}},\gamma _C \models C\) holds, we infer \({\mathcal {B}},\beta \models C\) as follows:
-
Case \({\mathcal {A}}, \gamma _C \not \models t\mathrel {\triangleleft }t'\) for some LRA atom \(t\mathrel {\triangleleft }t'\) in \(\varLambda \). Recall that we assume that for all atoms in \(\varLambda \) there are variable-renamed variants in \(\varTheta \). Hence, by (7) in combination with Condition (b), we have that \({\mathcal {A}}, \gamma _C \not \models t \mathrel {\triangleleft }t'\) entails \({\mathcal {A}}, \beta \not \models t \mathrel {\triangleleft }t'\). Since \({\mathcal {B}}\) and \({\mathcal {A}}\) interpret arithmetic terms in the same way, we conclude \({\mathcal {B}}, \beta \not \models t \mathrel {\triangleleft }t'\).
-
Case \({\mathcal {A}}, \gamma _C \not \models P(s_1, \ldots , s_{m'}, t_1, \ldots , t_m)\) for some atom \(P(s_1, \ldots , s_{m'}, t_1, \ldots , t_m)\) in \(\varGamma \), where the \(s_i\) are terms (variables or constants) of sort \({\mathcal {S}}\) and the \(t_j\) are variables over the rationals. By definition of \(\gamma _C\), we have \(\gamma _C(t_j) \in Q\) for every j, \(1 \le j \le m\). Moreover, \(\gamma _C\) and \({\mathcal {B}}\) are defined such that \({\mathcal {A}}(\gamma _C)(s_i) = {\mathcal {B}}(\beta )(s_i)\) for every i, \(1 \le i \le m'\). This together with Observation (7) and \(\sim \)-uniformity of \({\mathcal {B}}\) entails \({\mathcal {B}}, \beta \not \models P(s_1, \ldots , s_{m'}, t_1, \ldots , t_m)\).
-
Case \({\mathcal {A}}, \gamma _C \models P(s_1, \ldots , s_{m'}, t_1, \ldots , t_m)\) for some atom \(P(s_1, \ldots , s_{m'}, t_1, \ldots , t_m)\) in \(\varDelta \). In analogy to the previous case we infer \({\mathcal {B}}, \beta \models P(s_1, \ldots , s_{m'}, t_1, \ldots , t_m)\).
-
Case \({\mathcal {A}}, \gamma _C \not \models t\approx t'\) for some atom \(t\approx t' \in \varGamma \). Then, t and \(t'\) are either variables or constant symbols of the free sorts. Since \({\mathcal {B}}\) and \({\mathcal {A}}\) behave identically on free-sort constant symbols and since \(\beta (u) = \gamma _C(u)\) for every variable \(u\in V_{\mathcal {S}}\), we get \({\mathcal {B}}, \beta \not \models t\approx t'\).
-
Case \({\mathcal {A}}, \gamma _C \models t\approx t'\) for some \(t\approx t' \in \varDelta \). In analogy to the above case, we obtain \({\mathcal {B}}, \beta \models t\approx t'\).
Altogether, we have shown \({\mathcal {B}}\models N\). \(\square \)
Rights and permissions
About this article
Cite this article
Voigt, M. Decidable \({\exists }^*{\forall }^*\) First-Order Fragments of Linear Rational Arithmetic with Uninterpreted Predicates. J Autom Reasoning 65, 357–423 (2021). https://doi.org/10.1007/s10817-020-09567-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10817-020-09567-8