On amenability of constraint satisfaction problems

Michal R. Przybylek Faculty of , Informatics and Mechanics University of Warsaw Poland [email protected]

Abstract the theory) is crucial for our proof, as one can find coun- The authors of [22] showed that a constraint satisfaction terexamples to the claim in Intuitionistic Theories. problem (CSP) defined over rational numbers with their nat- These highly-theoretical results are of a great practical ural ordering has a solution if and only if it has a definable interest. Very many real-world decision problems of high solution. Their proof uses advanced results from topology computational complexity can be abstractly specified as the and modern . The aim of this paper is threefold. classical constraint satisfaction problems (CSP): hardware (1) We give a simple purely-logical proof of their verification and diagnosis: [9], [12], automated planning and and show that the advanced results from topology and model scheduling [10], [11], temporal and spatial reasoning [31], theory are not needed; (2) we introduce an intrinsic char- [7], air traffic managment [1], to name a few. Such problems acterisation of the statement “definable CSP has a solution are inherently finite. Although their computational cost is iff it has a definable solution” and investigate it ingeneral high (i.e. the problems are usualy NP-hard), they can be 2 intuitionistic set theories (3) we show that the results from solved in a finite time by a machine . This is in contrast with modern model theory are indeed needed, but for the implica- problems concerning behaviours of autonomous systems, tion reversed: we prove that “definable CSP has a solution iff where the classical variant of CSP is too restrictive. Such it has a definable solution” holds over a countable structure problems can be naturally specified as CSP with infinite sets if and only if the automorphism group of the structure is of variables (corresponding to the states of a system) and extremely amenable. infinite sets of constraints (corresponding to the transitions between the states of a system). These problems are, in gen- CCS Concepts • Theory of computation  Constraint eral, undecidable — no machine can solve them in a finite and programming; time. In fact, depending on the choice of the specification lan- Keywords with atoms, intuitionistic set theory, guage, such problems may be very high in the undecidability constraint satisfaction problem, Ramsey property, extremely hierarchy. For example, if we consider problems definable amenable group, Boolean prime ideal theorem in the First- of natural numbers, then every problem from the arithmetical hierarchy can be expressed as a definable CSP. Up until recently, we had known very little 1 Introduction about methods that can be used to solve infinite CSP. The In 1964 James D. Halpern [14] by using some combinato- first breakthought was at the begining of the century (see rial properties of the ordered Fraenkel-Mostowski model of [8] and also a survey article [6]), where researches applied set theory with atoms solved a long-standing open prob- algebraic and model-theoretic tools to analyze CSP over, so lem about independence of the of Choice from the called, infinite templates. This research inspired the Warsaw Boolean Prime Ideal Theorem. In 2015 Bartek Klin, Eryk Logical Group to investigate locally finite CSP — i.e. infinite Kopczynski, Joanna Ochremiak, and Szymon Torunczyk [22] CSP whose constraints are finite (see22 [ ] and [27]). by using advanced results from topology and modern model They found that a locally finite CSP defined in the theory of theory, proved that in the ordered Fraenkel-Mostowski model rational numbers with their natural ordering can be solved of set theory with atoms an equivariant (constrained1) lo- effectively. cally finite constraint satisfaction problem has a solution if and only if it has an equivariant solution. In this paper we Example 1.1 (Finite memory machine). An important type prove that these two results are essentially the same, and, in of autonomyous systems has been defined by Kaminski, Michael fact, equivalent to many other well-known / and Francez [20]. The authors called these type of systems “fi- of Boolean Set Theories. The assertion of Booleaness of the nite memory machines”, or “register machines”. A finite mem- Set Theory (i.e. that the law of excluded middle holds inside ory machine is a finite automaton augmented with a finite number of registers 푅푖 that can store natural numbers. The 1Every variable appears in at least one constraint. movement of the machine can depend on the control state, on the letter and on the content of the registers. The dependency on , ver. 1.2, 2020 2020. 2For a general reference on solving classical CSP see: [32] 1 , ver. 1.2, 2020 Michal R. Przybylek

푅1 B 푛 This graph is known as infinite Kneser graph22 [ ]. An example 푛 ≠ 푅1? 푅2 B 푅1 of a (constrained) locally finite CSP problem is the question whether a graph like G is 3-colorable. By the compactness of the first-order logic G is 3-colorable if and only if every start 푆 finite subgraph of G is 3-colorable. Figure 2 exhibits an ex- ample of a finite subgraph of G which cannot be colored by three colors {red, green, blue}. Theorem 19 in [22] implies that 푅 푛 3-colourability of any graph generated by finite memory ma- 푛 푅 2 B ≠ 2? chines can be solved effectively. 푅1 B 푅2

Figure 1. A non-deterministic machine with two registers and a single control state 푆. SET PASSW 푅

, , :

1 2 5 1 = 푥

, 2 5 START

, , 3 1 1 4 푅 ≠

푥 ? , 푅 2, 3 4, 5 := ⊥ 4, 2 5, 3

, 3 4 푅

: 푅 ≠ 푥? 푅 ≠ 푥? = AUTH AUTH AUTH 푥 TRY 1 TRY 2 TRY 3 Figure 2. A finite counterexample to 3-colorability of infinite 푅

Kneser graph. =

푅 푥 ? = ? 푥 푥 = ? 푅 the content of the registers is, however, limited — the machine GRANT can only test for (no formulas involving successor, AUTH addition, multiplication, etc. are allowed). Figure 1 shows a 2-register machine with a single control state 푆. This machine starts with a given content of the registers 푅1 and 푅2 and then at every step non-deterministically chooses a register 푅푖 and a natural number 푛 such that 푛 ≠ 푅푖 . Value 푛 EXIT CHNG AUTH PASSW is then stored in register 푅푖 , whilst register 푅1−푖 gets the value previously stored in 푅푖 . Observe that in contrast to finite automata, the graph of Figure 3. A register machine that models access control to possible configurations in the machine from Figure 1 is infinite. some parts of the system. If we run the machine with 푅푖 B 푖, then its states 푉 (i.e. single control state 푆 together with the content of the registers) will Example 1.2 . Continuing span an infinite graph G = ⟨푉, 퐸⟩ with edges 퐸 induced by the (Access-control register machine) Example 1.1, Figure 3 presents an example of a finite memory movements of the machine: machine with one register 푅, whose task is to model access

푉 = {(푆, 푛,푚) : 푛 ∈ 푅1,푚 ∈ 푅2} control to the red part of the system. The machine starts in ′ ′ ′ ′ control state “SET PASW”, where it awaits for the user to pro- 퐸 = {((푆, 푛,푚), (푆, 푛 ,푚 )) ∈ 푉 × 푉 : (푛 = 푚 ∧ 푚 ≠ 푛 ) vide a password 푥. This password is then stored in register 푅, 푛 푚′ 푚 푛′ ∨ ( ≠ ∧ = )} and the machine enters control state “START”. Inside the blue rectangle the machine can perform actions that do not require 2 On amenability of constraint satisfaction problems , ver. 1.2, 2020 authentication, whereas the actions that require authentication Tychonoff topology) is extremely amenable3 by the main theo- are presented inside the red rectangle. The red rectangle can rem in [28]. be entered by the control state “GRANT AUTH”, which can be accessed from one of three authentication states. In order to Example 1.4 (Rational numbers with finitely many con- Q ⊔ 푄 authorise, the machine moves to control state “AUTH TRY 1”, stants). Let 0 be the structure from Example 1.3 over an 푞 ∈ 푄 where it gets input 푥 from the user. If the input is the same extended signature consisting of all constants 0 for some 푄 ⊆ 푄 as the value previously stored in register 푅, then the machine finite 0 . Like in the previous example, the first order Q ⊔ 푄 휔 enters control state “GRANT AUTH”. Otherwise, it moves to theory of 0 is -categorical and the topological group of (Q ⊔ 푄 ) control state “AUTH TRY 2” and repeats the procedure. Upon automorphisms Aut 0 is extremely amenable. second unsuccessful authorisation, the machine moves to con- Example 1.5 (Ordered vector space). Let 퐻퐹 be the free ℵ0- trol state “AUTH TRY 3”. But if the user provides a wrong dimensional vector space over a finite field 퐹. By definition 퐻 password when the machine is in control state “AUTH TRY 3”, has a base that can be enumerated by any . There- 푅 the register is erased (replaced with a value that is outside of fore, we can assume that there is a base ⟨훼푞⟩푞∈Q enumerated the user’s alphabet) — preventing the machine to reach any of by rational numbers4 푞 ∈ Q. In fact we can give an explicit the control states from the red rectangle. Inside the red rectan- description of space 퐻퐹 with its standard base as follows. Let gle any action that requires authentication can be performed. 푄 us identify 퐻퐹 with a subspace of 퐹 consisting of functions For example, the user may request the change of the password. that have finite support — i.e. functions 푣 : 푄 → 퐹 with the Example of problems that we may like to ask, which can be property that the set {푞 ∈ 푄 : 푣 (푞) ≠ 0} is finite. The standard solved effectively: base ⟨훼푞⟩푞∈Q for 퐻퐹 consists of unit-mass functions: • is possible to change the password in the system without  1 if 푞 = 푟 exiting the blue zone? 훼 (푟) = 푞 0 otherwise • is it true that from every state from a blue zone we can enter a state in a red zone and move back (without Observe, that for any vector 푣 ∈ 퐻퐹 the evaluation 푣 (푞) ∈ 퐹 changing the password)? is the 푞-th coordinate of 푣 according to the standard base. Let us • is every control state in the system reachable with any choose any linear ordering ≤퐹 ⊆ 퐹 × 퐹 of the field 퐹 such that content of the register? 0 ∈ 퐹 is the least in this ordering – i.e. ∀푟 ∈퐹 0 ≤퐹 푟. The ordering of 퐹 can be extended along the standard base to 퐻 The main theoretical tool of the work on locally finite CSP a linear ordering of 퐹 in the following way. Consider a pair 푣 푤 퐻 퐷 푣,푤 푞 is Theorem 17 in [22], which says that a (constrained) locally of distinct vectors ≠ ∈ 퐹 define the set ( ) = { ∈ finite CSP defined in the theory of rational numbers with Q : 푤 (푞) ≠ 푣 (푞)} of distinct coordinates between 푣 and 푤. their natural ordering has a solution if and only if it has a By the definition of the base, 퐷(푣,푤) is finite (because every definable solution. Because definable solutions over rational vector has only finitely many non-zero coordinates in any numbers admit exhaustive search, these CSP problems can base) and non-empty (because 푣 and 푤 are distinct), thus it be solved effectively. As the authors remarks (Remark 20 contains the largest element 푚 ∈ 퐷(푣,푤). We shall set 푣 < 푤 푣 푚 푤 푚 푣,푤 퐻 푣 푤 in [22]) their Theorem 17 can be generalised to any (decid- if ( ) < ( ) and for general ∈ 퐹 define ≤ on 퐻 푣 푤 푣 푤 able) relational structure with the following two properties 퐹 as = ∨ < . 퐻 , , 푟, (see Section 2 for the explanation): (a) the structure is 휔- Consider the structure H퐹 = ⟨ 퐹 + (−) ≤⟩, with universe 퐻 퐻 퐻 categorical and (b) the automorphism group of the structure 퐹 , ≤ ⊆ 퐹 × 퐹 defined above, binary 퐻 퐻 퐻 is extremely amenable. It has been further observed in [23] +: 퐹 × 퐹 → 퐹 interpreted as the addition of vectors, and 푟 퐹 푟 퐻 퐻 (an explicit reduction is given in Section 4) that definable for each scalar ∈ an unary operation (−) : 퐹 → 퐹 푣푟 푣 퐻 CSP (in a finite signature) can be effectively reduced to defin- interpreted as the multiplication of vectors ∈ 퐹 with able CSP over finite domain. For this reason, without lossof scalar 푟. We shall call this structure the ordered vector space generality, we shall focus on CSP over finite domains. Note, over field 퐹. 휔 however, that the proofs of our Lemma 3.3 also works for a The first order theory Th(H퐹 ) of H퐹 is -categorical and slightly more general setting of locally finite CSP. the topological group of automorphisms Aut(H퐹 ) is extremely amenable (see [21]).

Example 1.3 (Rational numbers with ordering). Let Q = 3 푄, See Section 2 Definition 2.3. ⟨ ≤⟩ be the structure whose universe is interpreted as the set 4A careful reader may wonder why we have indexed the base with rational of rational numbers 푄 with a single ≤ ⊆ 푄 ×푄 numbers instead of, say, natural numbers. The reason is that we need a dense interpreted as the natural ordering of rational numbers. Then ordering on base vectors, and this can be canonically induced by the ordering the first order theory of Q is 휔-categorical, i.e. there is exactly of the rational numbers. If we used the ordering of the natural numbers, we one countable model of the theory up to an isomorphism. More- would get a non-dense ordering on base vectors, and the resulting structure would not have been 휔-categorical, nor its automorphism group would be over, the topological group of automorphism Aut(Q) (with extremely amenable. 3 , ver. 1.2, 2020 Michal R. Przybylek

Algorithm 1 K-colorability the assumption of 휔-categoricity without sacrificing effec- 휔 procedure is-k-colorable?(⟨푉, 퐸⟩, 푘) tiveness of computations. Moreover, for non- -categorical 퐾 ← {1, 2, . . . , 푘} structures we lose the correspondence between definable sets 퐶 ← 푉 × 퐾 in set theories with atoms and sets definable in the structures for 퐹 ⊆ 퐶 do (also see [29]). The case of extremal amenability is studied if isValid(퐹, 퐸) then return ⊤ in this paper. Although we will not show that effectiveness return ⊥ of algorithms to CSP is equivalent to extremal amenability procedure isValid(퐹, 퐸) of the group of automorphism of the structure (what is, ob- for 푥 ∈ 푉 do viously, not true), it will turn out that it is equivalent to the if 퐹 [푥] = ∅ then return ⊥ effectiveness of the natural algorithms like Algorithm 1. for 푦 ∈ 퐸[푥] do One may also wonder, what would happen if we did not if 퐹 [푥] ∩ 퐹 [푦] ≠ ∅ then return ⊥ restrict specification languages to complete first-order theo- return ⊤ ries (i.e. to theories of algebraic structures). In the context of effectiveness of the algorithms, non-complete first-order theories (and, generally, they positiv-existential fragments) Example 1.6 (Pure sets). Let N = {0, 1, 2,... } be a count- are studied in [29]. Such theories either have finitely many ably over empty signature Ξ. Then the first order completions, in which case working inside the theory is theory of N is 휔-categorical, i.e. there is exactly one countable equivalent to working in finitely many completions of the model of the theory up to an isomorphism. This theory is called theory, or are classified by Intuitionistic Set Theories. As we the theory of “pure sets”. Although the automorphism group shall see later, CSP problems in Intuitionistic Set Theories S∞ = Aut(N) of N is not extremely amenable, N is a reduct are very subtle and require different tools to analyse. of Q = ⟨푄, ≤⟩ (just drop the comparison relation). Therefore The structure of the paper is as follows. In the next sec- every specification in the theory of pure sets can be treated asa tion we recall some notations and results from set theory specification in the theory of rational numbers with . and model theory, which are necessary to understand our In the language of set theory with atoms, definable sets theorems from Section 3. In Section 3 we reformulate the correspond to equivariant sets of finitary type (i.e. equivari- property “symmetric CSP over finite domain has a solution ant sets that are hereditarily of a finite support, a concept iff it has a symmetric solution” as an intrinsic property ofa that will be explained in Section 2). Moreover, a careful in- topos and call it Axiom CSP. Then, we show that in Boolean spection of Theorem 17 reveals that the assumption that toposes Axiom CSP is actually equivalent to BPIT. In particu- the sets are of a finitary type is not needed for the proof lar, for every set of atoms A we have that ZFA(A) satisfies (it is needed in Theorem 19). Therefore, Theorem 17 can Axiom CSP if and only if it satisfies BPIT (Theorem 3.4). We be restated as follows: “in the ordered Fraenkel-Mostowski also show that “symmetric CSP over finite domain has a model of set theory with atoms a (constrained, locally finite) solution iff it has an symmetric solution” is equivalent to equivariant constraint satisfaction problem has a solution if a weaker axiom: “definable CSP over finite domain hasa and only if it has an equivariant solution”. solution iff it has a definable solution”. There is, however, Algorithm 1 gives a method to solve the 3-colouring prob- one caveat: for the effectivenes of computations we need a lem over 휔-categorical structures whose group of automor- slightly stronger property: “퐴0-equivariant definable CSP phism is extremely amenable. The algorithm takes for its over finite domain has a solution iff ithasan 퐴0-equivariant input an equivariant definable graph consisting of nodes definable solution”. Because equivariance is not an intrinsic 푉 and edges 퐸, and a number of 푘 colors. Then for every property of ZFA(A), therefore we have to assert Axiom CSP equivariant definable relation 퐶 : 푉 −↦−→ 퐾 the algorithm tests in every Cont(Aut(A ⊔ A0)), and then by the transfer prin- if 퐶 is functional and satisfy the colouring constraints. Upon ciple (see [30]) recover the desired property in ZFA(A) a positive test the algorithm returns ⊤. If no relation tests (Theorem 3.8). In Section 4 we investigate Axiom CSP in positively, the algorithm returns ⊥. The assumption of 휔- non-Boolean toposes pointing out many obstacles to the categoricity of the structure is crucial for the effectiveness equivalence between Boolean prime ideal theorem and pos- of the for loops — because 푉 is definable and 푘 is finite, there sible formulations of Axiom CSP. We conclude the paper in are only finitely many equivariant definable of 푉 ×퐾. Section 5. On the other hand, the assumption that the automorphism group is extremely amenable allows us to restrict to definable colourings only. 2 Set Theories with Atoms The above considerations beget question about necessity Let A be an (both operations and re- of properties (a) and (b) for the effectiveness of the algo- 퐴 휔 lations are allowed) with universum . We shall think of rithms. The case of -categoricity has been studied in the elements of A as “atoms”. A von Neumann-like hierarchy detail in [29]. Theorem 2.5 in [29] shows that we cannot drop 4 On amenability of constraint satisfaction problems , ver. 1.2, 2020

푉훼 (A) of sets with atoms A can be defined by transfinite Example 2.1 (The basic Fraenkel-Mostowski model). Let N induction [26], [13]: be the structure from Example 1.6. We call ZFA(N) the basic

• 푉0 (A) = 퐴 Fraenkel-Mostowski model of set theory with atoms. Observe (N) • 푉훼+1 (A) = P(푉훼 (A)) ∪ 푉훼 (A) that Aut is the group of all bijections (permutations) on 푉 Ð 푉 휆 푁 . The following are examples of sets in ZFA(N): • 휆 (A) = 훼<휆 훼 (A) if is a limit ordinal , , , ,... ,... Then the cumulative hierarchy of sets with atoms A is just • all sets without atoms, e.g. ∅ {∅} {∅ {∅} } 푁 , , , , ,... 푉 (A) = Ð 푉 (A). Observe, that the universe 푉 (A) • all finite subsets of , e.g. {0} {0 1 2 3} 훼 : Ord 훼 푁 , , ,... , , , ,... ,... carries a natural action (•) : Aut(A) × 푉 (A) → 푉 (A) of • all cofinite subsets of , e.g. {1 2 3 } {4 5 6 } 푁 푁 the automorphism group Aut(A) of structure A — it is just • × 푎,푏 푁 2 푎 푏 applied to the atoms of a set. If 푋 ∈ 푉 (A) is a set •{⟨ ⟩ ∈ : ≠ } 푁 ∗ Ð 푁 푘 with atoms then by its set-wise stabiliser we shall mean the • = 푘 ∈푁 •K( 푁 ) = {푁 푁 ⊆ 푁, 푁 is finite} set: Aut(A)푋 = {휋 ∈ Aut(A) : 휋 • 푋 = 푋 }; and by its point- 0 : 0 0 •P (푁 ) = {푁 : 푁 ⊆ 푁, 푁 is symmetric} wise stabiliser the set: Aut(A)(푋 ) = {휋 ∈ Aut(A) : ∀푥 ∈푋 휋 • 푠 0 0 0 푥 = 푥}. Moreover, for every 푋, these sets inherit a group Here are examples of sets in 푉 (N) which are not symmetric: structure from Aut(A). •{ 0, 2, 4, 6,... } There is an important sub-hierarchy of the cumulative hi- •{⟨ 푛,푚⟩ ∈ 푁 2 : 푛 ≤ 푚} erarchy of sets with atoms A, which consists of “symmetric • the set of all functions from 푁 to 푁 sets” only. To define this hierarchy, we have to equip Aut(A) •P( 푁 ) = {푁0 : 푁0 ⊆ 푁 } with the structure of a topological group. A set 푋 ∈ 푉 (A) is symmetric if the set-wise stabilisers of all of its descendants Example 2.2 (The ordered Fraenkel-Mostowski model). Let Q (Q) 푌 is an open set (an open subgroup of Aut(A)), i.e. for every be the structure from Example 1.3. We call ZFA the 푌 ∈∗ 푋 we have that: Aut(A) is open in Aut(A), where ∈∗ ordered Fraenkel-Mostowski model of set theory with atoms. 푌 (Q) is the reflexive-transitive closure of the membership relation Observe that Aut is the group of all order-preserving bijec- 푄 ∈. A between symmetric sets is called symmetric tions on . All symmetric sets from Example 2.1 are symmetric (Q) 푁 푄 if its graph is a symmetric set. Of a special interest is the sets in ZFA when is replaced by . Here are some further topology on Aut(A) inherited from the product topology on symmetric sets: Î 퐴 퐴퐴 •{⟨ 푝, 푞⟩ ∈ 푄2 푝 ≤ 푞} 퐴 = (i.e. the Tychonoff topology). We shall call this : 2 topology the canonical topology on Aut(A). In this topology, •{⟨ 푝, 푞⟩ ∈ 푄 : 0 ≤ 푝 ≤ 푞 ≤ 1} (A) 퐴 ⊆ 퐴 a subgroup H of Aut is open if there is a finite 0 Example 2.3 (The second Fraenkel-Mostowski model). Let such that: Aut(A)(퐴 ) ⊆ H, i.e.: group H contains a point- ∗ 0 S = ⟨푍 , −, (|−|푛)푛∈푁 ⟩ be the structure of non-zero integer wise stabiliser of some of atoms. The sub-hierarchy numbers, with unary “minus” operation (−) : 푍 ∗ → 푍 ∗ and of 푉 (A) that consists of symmetric sets according to the ∗ with unary relations |−|푛 ⊆ 푍 defined in the following way: canonical topology on Aut(A) will be denoted by ZFA(A) ∗ |푧|푛 ⇔ |푧| = 푛. We call ZFA(푍 ) the second Fraenkel-Mostowski (it is a model of Zermelo-Fraenkel set theory with atoms). ∗ 푁 model of set theory with atoms. Observe that Aut(Z ) ≈ Z2 , ∗ Remark 2.1. The above definition of hierarchy of symmetric therefore the following sets are symmetric in ZFA(푍 ): sets is equivalent to another one used in model theory. By a •{ ..., −6, −4, −2, 2, 4, 6,... } normal filter of subgroups of a group G we shall understand a •{⟨ 푥,푦⟩ ∈ 푍 ∗ × 푍 ∗ : 푥 = 3푦} filter F on the poset of subgroups of G closet under conjugation, Observe that the group Aut(A) is actually the group i.e. if 푔 ∈ G and H ∈ F then 푔H푔−1 = {푔•ℎ•푔−1 : ℎ ∈ H} ∈ F . (퐴0) of automorphism of structure A extended with constants Let F be a normal filter of subgroups of Aut(A). We say that 퐴 , i.e.: Aut(A) = Aut(A ⊔ 퐴 ). Then a set 푋 ∈ 푉 (A) a set 푋 ∈ 푉 (A) is F -symmetric if the set-wise stabilisers of 0 (퐴0) 0 is symmetric if and only if there is a finite 퐴 ∈ 퐴 such that all of its descendants 푌 belong to F — i.e. 푌 ∈∗ F . To see 0 Aut(A ⊔ 퐴 ) ⊆ Aut(A) and the canonical action of topo- that the definitions of symmetric sets and F -symmetric sets 0 푋 logical group Aut(A ⊔퐴 ) on discrete set 푋 is continuous. A are equivalent, observe first that if G is a topological group, 0 symmetric set is called 퐴 -equivariant (or equivariant in case then the set F of all open subgroups of G is a normal filter 0 퐴 = ∅) if Aut(A ⊔ 퐴 ) ⊆ Aut(A) . Therefore, the (non- of subgroups. In the other direction, if F is a normal filter of 0 0 푋 full) subcategory of ZFA(A) on 퐴 -equivariant sets and 퐴 - subgroups of a group G, then we may define a topology on G 0 0 equivariant functions (i.e. functions whose graphs are 퐴 - by declaring sets 푈 ⊆ G to be open if they satisfy the following 0 equivariant) is equivalent to the category Cont(Aut(A ⊔ A )) ⊆ property: for every 푔 ∈ 푈 there exists H ∈ F such that 푔H ⊆ 푈 . 0 SetAut (A⊔A0 ) of continuous actions of the topological group According to this topology a group U is open iff U ∈ F — just Aut(A ⊔ 퐴 ) on discrete sets. observe that for every group U and for every 푔 ∈ U we have 0 that 푔U = U; and if H ∈ F such that H = 1H ⊆ U then by Example 2.4 (Equivariant sets). In the basic Fraenkel-Mostowski the property of the filter, U ∈ F . model: 5 , ver. 1.2, 2020 Michal R. Przybylek

• all sets without atoms are equivariant D. Halpern’s proof from ZFA(Q) to ZFA(A) for any struc- • all finite subsets 푁0 ⊆ 푁 are 푁0-equivariant ture 퐴 satisfying so-called Ramsey property [19], [4]. • all finite subsets 푁 ⊆ 푁 are (푁 \ 푁 )-equivariant 0 0 Definition 2.2 (Ramsey property). A structure A has a Ram- • 푁 × 푁, 푁 (2), K(푁 ), P (푁 ) are equivariant 푆 sey property if for every open subgroup H of Aut(A), every 푓 (A)/H → { , , . . . , 푘} Definition 2.1 (Definable set). We shall say that an 퐴0- function : Aut 1 2 and every finite set equivariant set 푋 ∈ ZFA(A) is definable if its canonical ac- 퐶 ⊆ Aut(A)/H there is 휋 ∈ Aut(A) such that 푓 is constant tion has only finitely many orbits, i.e. if the relation 푥 ≡ 푦 ⇔ on 푔 • 퐶, i.e. there exists 0 ≤ 푖 ≤ 푘 such that for all 푐 ∈ 퐶 we 푥 휋 푦 have 푓 (휋 • 푐) = 푖. ∃휋 ∈Aut (A⊔A0 ) = • has finitely many equivalence classes. For an open subgroup H of Aut(A) let us denote by Aut(A)/H In 1984 Peter Johnstone [19] introduced a (seemingly) the quotient set {휋H: 휋 ∈ Aut(A)}. This set carries a nat- stronger axiom than BPIT (but strictly weaker than AC) and (Q) ural continuous action of Aut(A), i.e. for 휎, 휋 ∈ Aut(A), showed that it holds in ZFA . He called the axiom Almost we have 휎 • 휋H = (휎 ◦ 휋)H. All transitive (i.e. single or- Maximal Ideal Theorem (AMIT) and raised the question if bit) actions of Aut(A) on discrete sets are essentialy of this AMIT is strictly stronger than BPIT. This question was an- form (see for example Chapter III, Section 9 of [24]). There- swered negatively by Andreas Blass in 1986 — Theorem 1 fore, equivariant definable sets are essentially finite unions of [4] states that BPIT implies (therefore, is equivalent to) of sets of the form Aut(A)/H. Moreover, if structure A is AMIT in ZF. In that paper Andreas Blass included a prelimi- 휔-categorical (Example 2.1, Example 2.2, but not 2.3), then nary version of the theorem for set theories with atoms. As equivariant definable sets are the same as sets definable in a part of the theorem (i.e. Theorem 2 in [4]), he obtained the the first order theory of A extended with elimination of following. imaginaries [30]. Theorem 2.2 (BPIT in ZFA(A) (1986, Andreas Blass [4])). The Boolean Prime Ideal Theorem (BPIT) states that every Let 퐴 be an algebraic structure. Then 퐴 has Ramsey property ideal in a Boolean can be extended to a prime ideal if and only if for every finite 퐴0 ⊂ 퐴 every 퐴0-equivariant (we shall recall the definitions in Section 3). It is a routine has an 퐴0-equivariant prime ideal in ZFA(A). to check that BPIT follows from the [18], [17]. On the other hand, it was a long-standing open problem In 1970 Theodore Mitchell defined a certain fixed-point whether the reverse implication holds as well. In 1964 James property of a topological group (i.e. extremal amenability) D. Halpern [14] used the model of ZFA over the rational and asked if there exists a non-trivial example of such a numbers with the canonical ordering (nowadays called or- group [25]. dered Fraenkel-Mostowski model ZFA(Q)) to prove that the Definition 2.3 (Extremely amenable group). A topologi- Axiom of Choice is not a consequence of BPIT in a set the- cal group G is called extremely amenable if its every action ory with atoms — i.e, he showd that in ZFA(Q) the Axiom (•) : G × 푋 → 푋 on a non-empty compact Hausdorff space 푋 of Choice fails badly, but BPIT holds. This result was later has a fixed point. amplified in [15] to give the first proof that the Axiom of Choice is not a consequence of BPIT in ZF (without atoms). In 1975 Wojchiech Herer and Jens P. R. Christensen [16] A literal formulation of the abovementioned result is as showed that there exists a non-trivial extremely amenable follows. Let B be a Boolean algebra such that 퐵 is symmetric group. Their construction was quite artificial raising a ques- and all Boolean algebra operations are symmetric in ZFA(Q), tion if there is any “natural” example of an extremely amenable then B has a symmetric ideal in ZFA(Q). However, the main group. One answer to this question was provided in 1998 by Theorem in Section 4 from [14] says much more. Vladimir Pestov [28].

Theorem 2.1 (BPIT in ZFA(Q) (1964, James D. Halpern Theorem 2.3 (Extremal amenability (1998, Vladimir G. Pestov [21])). The topological group of automorphisms Aut(Q) (with [14])). Let B be a Boolean algebra such that 퐵 is푄0-equivariant Tychonoff topology) of the rational numbers with their natural and all Boolean algebra operations are푄0-equivariant in ZFA(Q) ordering 푄 is extremely amenable. for some finite 푄0 ⊂ 푄. Then B has an 푄0-equivariant prime ideal. Perhaps the most celebrated result in topological dynamic of recent years, was the theorem of Alexander S. Kechris, In other words, James D. Halpern showed that for every fi- Vladimir G. Pestov, and Stevo Todorcevic linking Ramsey nite푄 ⊂ 푄, BPIT holds in the Boolean topos Cont(Aut(Q ⊔ Q )) 0 0 property with extremal amenability of automorphism groups of continuous actions of the topological group Aut(Q ⊔ 푄 ) 0 ( 4.2 in [21]). on discrete sets. The key tool used in James D. Halpern’s proof is a com- Theorem 2.4 (Ramsey vs. extremal amenability (2005, Alexan- binatorial lemma about partitions of sets. It was later ob- der S. Kechris, Vladimir G. Pestov, and Stevo Todorcevic served that this lemma can be distilled to carry over James [21])). Let 퐴 be a single-sorted countable algebraic structure. 6 On amenability of constraint satisfaction problems , ver. 1.2, 2020

Then 퐴 has Ramsey property if and only if the topological • the set of variables 푉 is a definable set in ZFA(A) group of automorphisms Aut(A) (with Tychonoff topology) of • the set 퐶 of constraints is a definable set in ZFA(A) 퐴 is extremely amenable. Furthermore, if 푉 , 퐶 and 퐷 are 퐴0-equivariant, then we say 퐴 The importance of this characterisation theorem relies on that the CSP is 0-equivariant. the fact that it is relatively easy to prove that a structure sat- For the of the next theorem, we need a simple isfies Ramsey property (and we had known many examples normalisation condition on locally finite CSP. Let us call a of structures satisfying Ramsey property), but the property CSP constrained if every element of 푉 appears in at least one of extremal amenability is usually much harder and difficult constraint in 퐶. to prove (in fact, we had known very few examples of ex- tremely amenable groups). Moreover, extremal amenability Theorem 2.5 (Locally finite CSP over rational numbers is seemingly much more powerful than the Ramsey property. (2015, Bartek Klin, Eryk Kopczynski, Joanna Ochremiak, and For instance, in presence of Theorem 2.3 the groundbreaking Szymon Torunczyk [22])). An equivariant constrained locally result of James D. Halpern becomes trivial: just observe that finite CSP in ZFA(Q) has a solution if and only if it has an (Q) the set of all homomorphism from a 푄0-equivariant Boolean equivariant definable solution in ZFA . algebra the two-valued Boolean algebra 2 carries a compact Remark 20 of [22] allows us to extend this theorem in the topology (the Tychonoff topology) and the natural action of following way. Aut(Q ⊔ 푄0) is continuous. It was first observed by Andreas Blass in 2011 in [5] that Theorem 2.2 together with Theo- Theorem 2.6 (Locally finite CSP (2015, Bartek Klin, Eryk rem 2.4 give another characterisation of set theories with Kopczynski, Joanna Ochremiak, and Szymon Torunczyk [22])). atoms that satisfy BPIT. Let A be an algebraic structure whose group of automorphism In 2015 Bartek Klin, Eryk Kopczynski, Joanna Ochremiak, is extremely amenable. Then an 퐴0-equivariant constrained and Szymon Torunczyk (Theorem 17 in [22]) proved that in locally finite CSP in ZFA(A) has a solution if and only if it the ordered Fraenkel-Mostowski model of set theory with has an 퐴0-equivariant definable solution in ZFA(A). atoms a (constrained) definable equivariant locally finite As we mentioned in the introduction, we shall slightly re- constraint satisfaction problem has a solution if and only if strict the setting to CSP over finite domains. This restriction it has an equivariant solution. To understand this result we is rather technical, as it simplifies some part of the reasoning. need to recall some definitions first. Note, however, that our Lemma 3.2 works for locally finite Definition 2.4 (Constraint satisfaction problem). A con- CSP without any change to the proof. We use this sightly straint satisfaction problem (CSP) consists of a triple ⟨퐷,푉,퐶⟩, restricted conclusion of Theorem 2.6 for our axiom. where: Axiom 1 (defCSP). For every finite 푋, an 푋-equivariant de- • 퐷 is a set called the domain of the problem finable CSP over finite domain has a solution if and onlyifit • 푉 is the set of variables has an 푋-equivariant definable solution. • 퐶 is a set of constraints of the form ⟨⟨푥1, 푥2, ··· , 푥푘 ⟩, 푅⟩, 푘 where 푥푖 ∈ 푉 and 푅 ⊆ 퐷 We shall write ZFA(A) ⊨ defCSP to indicate that Ax- A solution to this problem is an assignment 푆 : 푉 → 퐷 that sat- iom defCSP holds in ZFA(A). Notice, however, that we can- not compare the strength of Axiom defCSP to other axioms isfies all constraints in 퐶, i.e.: for every ⟨⟨푥1, 푥2, ··· , 푥푘 ⟩, 푅⟩ ∈ in general set theories, because Axiom defCSP is not de- 퐶 we have that 푅(푆 (푥1), 푆 (푥2), ··· , 푆 (푥푘 )) holds. scribed in the language of the set theory (without atoms). Remark 2.2. Every constraint satisfaction problem can be pre- The main result of this paper is to find an intrinsic char- sented as a pair of relational structures V, D over a single rela- acterisation of this axiom suitable for the language of set 푅, 푘 tional signature Σ. This signature Σ consists of a pair ⟨ ⟩ for theory (Axiom CSP) and prove that over Boolean set theo- 푅 퐷푘 푥 , 푥 , . . . , 푥 , 푅 every relation ⊆ from a constraint ⟨⟨ 1 2 푘 ⟩ ⟩ ∈ ries it is equivalent to BPIT. To do this, we will first sharpen 퐶 푅 푘 . The of / ∈ Σ in V is: Axiom defCSP by removing the definability requirement 푉 푅 (푥1, 푥2, . . . , 푥푘 ) ⇔ ⟨⟨푥1, 푥2, . . . , 푥푘 ⟩, 푅⟩ ∈ 퐶 (Axiom zfaCSP) and prove that over set theories with atoms these two axioms are equivalent (Theorem 3.7). and the interpretation in D is the relation 푅 itself. Moreover, a solution 푆 : 푉 → 퐷 to the CSP becomes a homomorphism Axiom 2 (zfaCSP). For every finite 푋, an 푋-equivariant CSP from V to D. over finite domain has a solution if and only if ithasan 푋- Definition 2.5 (Locally finite constraint satisfaction prob- equivariant solution. lem). A constraint satisfaction problem ⟨퐷,푉,퐶⟩ is locally Figure 4 summarizes all of the abovementioned results. On finite in ZFA(A) if: the bottom side of the figure we have logical equivalences • the domain 퐷 of the problem is definable proved in this paper (Theorem 3.4 and Theorem 3.7). In the • every relation 푅 in any constraint of 퐶 is finite center (from the left) we have Theorem 2.5 and Theorem 2.1, 7 , ver. 1.2, 2020 Michal R. Przybylek which are special cases of Theorem 2.6 and Theorem 2.2 if 푒 : 푋 → 푌 is a surjection then for every finite 퐷 we have respectively. In the middle of the top of the diagram we have that 푒퐷 : 푋 퐷 → 푌 퐷 is a surjection. By setting 퐷 = 푌, we Theorem 2.4. Finally, on the top-left part of the figure follows obtain that 푒푌 : 푋푌 → 푌 푌 is a surjection, and so for every from the instantiation of Axiom CSP in a topos of continu- 푖 ∈ 푌 푌 there exists ℎ ∈ 푋푌 such that 푒푌 (ℎ) = 푖. In particular, 푌 푌 푌 ous actions of a topological group (Example 3.1). Thanks to for id푌 ∈ 푌 there exists 푠 ∈ 푋 such that 푒 (푠) = id푌 . But, this equivalences we can close the loop in the diagram (all 푒푌 (푠) = 푒 ◦ 푠, what completes the proof. □ statements in the top part of the diagram are equivalent). Definition 3.2 (Finitary relation). For sets 퐴, 퐵 we shall call 퐾 퐴 퐵 푃 퐴 퐵 퐴 퐵 3 The axiom in Boolean toposes ( × ) ⊆ ( × ) the set of finitary relations from to . A finitary relation 푅 is a partial function if it is single-valued, In this section we will work in the internal language of a i.e. the following holds: 푅(푎,푏) ∧ 푅(푎,푏′) ⊢ 푏 = 푏′. We will Boolean topos. A reader who is not familiar with the notion denote the set of finitary partial functions from 퐴 to 퐵 by 퐵퐴. of the internal language of a topos may read the proofs as taking place in any reasonable set theory5. We shall be In a Boolean topos a of a finite set is finite, therefore extra careful when defining set-theoretic concepts, such as if 퐴 and 퐵 are finite, then a finitary relation from 퐴 to 퐵 is finiteness, or a prime ideal. Although, in Boolean toposes just a relation from 퐴 to 퐵. In particular, there is a morphism many different definitions of such concepts coincide, this 훾0 : 퐾 (퐴 × 퐵) → 퐾 (퐴) that assigns to a finitary relation would not be the case for non-Boolean toposes studied in 푟 ∈ 퐾 (퐴 × 퐵) its domain 훾0 (푟) ∈ 퐾 (퐴) ⊆ 푃 (퐴). Section 4. Definition 3.3 (Jointly-total relations). For sets 퐴, 퐵, we shall Definition 3.1 (Kuratowski finiteness). Let 퐴 be a set. By say that a subset 푆 ⊆ 퐾 (퐴 × 퐵) of finitary relations from 퐴 to 퐾 (퐴) we shall mean the sub-join-semilatice of the powerset 퐵 is jointly total if every finite 퐴0 ∈ 퐾 (퐴) is a subdomain of a 푃 (퐴) generated by singletons and the . A set 퐴 is finitary relation from 푆, i.e.: ∃ℎ∈푆퐴0 ⊆ 훾0 (ℎ) 퐾 (퐴) Kuratowski-finite if it is the top element in . Definition 3.4 (Jointly total family of homomorphisms). Let For the rest of this section we will just write “finite set” A and B be two relational structures over a common signature for “Kuratowski-finite set”. The chief idea behind the above Σ. A finitary relation from A to B preserves relation 푅/푘 ∈ Σ definition is that since a non-empty finite set 퐴 can be con- if the following holds: structed from singletons by taking binary unions, we have a 푓 (푎 ,푏 ) ∧ 푓 (푎 ,푏 ) ∧ ... ∧ 푓 (푎 ,푏 ) ∧ 푅(푎 , 푎 , ··· , 푎 ) certain induction principle. Let us assume that: (base of the 1 1 2 2 푘 푘 1 2 푘 푅 푏 ,푏 , ,푏 induction) 휙 holds for singletons, and (step of the induction) ⊢ ( 1 2 ··· 푘 ) 휙 퐴 퐴 퐴 퐴 휙 whenever holds for 0 ⊆ and 1 ⊆ then holds for We shall say that a set of finitary partial functions 퐻 ⊆ 퐵퐴 퐴 퐴 휙 퐴 0 ∪ 1, then (conclusion) holds for . For example, we is a jointly-total family of homomorphisms if for every finite can show that the Axiom of Choice internally holds for finite set of relational symbols Σ0 ⊆ Σ every finite 퐴0 ∈ 퐾 (퐴) is a sets. subdomain of a finitary partial function from 퐻 that preserves Lemma 3.1 (Finite Axiom of Choice). In any Boolean topos all relations from Σ0. the Axiom of Choice holds for finite objects, i.e.: every surjection Now, we are ready to state Axiom CSP in Boolean toposes. 푒 : 푋 → 푌 onto a finite set 푌 has a section 푠 : 푌 → 푋, i.e.: Axiom 3 . For every relational signature Σ and a pair 푒 ◦ 푠 = id푌 . (CSP) of structures V and D over Σ such that 퐷 is a finite cardinal, Proof. Let us assume that 푒 : 푋 → 푌 is a surjection. Then for the following are equivalent: 퐷 푒퐷 푋 퐷 → 푌 퐷 푒퐷 (ℎ) = every finite , the function : , where • there exists a homomorphism from V to D 푒 ◦ ℎ , is also a surjection. This can be proven by induc- • the set of partial functions 퐷푉 is a jointly total family 퐷 퐷 tion over . If is the empty set, or a singleton, then the of homomorphisms claim clearly holds. Therefore, let us assume the claim holds , for finite 퐷0, 퐷1 and show that it also holds for 퐷0 ∪ 퐷1. By hom(V D) we shall denote the set of all finitary par- Since the topos is Boolean, without loss of generality, we tial functions from 퐴 to 퐵 that preserve all relations from Σ. , may assume that 퐷0 and 퐷1 are disjoint. By definition, the Observe that if Axiom CSP holds then the set hom(V D) is function 푒퐷0∪퐷1 : 푋 퐷0∪퐷1 → 푌 퐷0∪퐷1 decomposes on dis- jointly total if and only if the set of of partial functions 퐷푉 joint 푒퐷0 : 푋 퐷0 → 푌 퐷0 and 푒퐷1 : 푋 퐷1 → 푌 퐷1 with 푒퐷0∪퐷1 = is a jointly total family of homomorphisms. 푒퐷0 × 푒퐷1 . Because the of two surjec- Example 3.1 (Axiom CSP in Cont(Aut(A ⊔ A ))). Let ⟨Σ, V, D⟩ tions is a surjection, we may infer that 푒퐷0∪퐷1 is a surjec- 0 be an 퐴 -equivariant CSP in ZFA(A). Such CSP is an internal tion, what completes the step of the induction. Therefore, 0 object of Cont(Aut(A ⊔ A0)). The object 퐾 (푉 × 퐷) of Kura- 5This should be understood covariantly — our reasoning must be valid in towski finite subobjects of 푉 × 퐷 consists of finitely supported any reasonable set theory. finite relations from 푉 to 퐷. Because every finite set is finitely 8 On amenability of constraint satisfaction problems , ver. 1.2, 2020

Cont(Aut(A ⊔ A0)) ⊨ CSP ks +3 ZFA(A) ⊨ defCSP ks Aut(A) is extr. ame. ⇔ A is Ramsey ⇔ Cont(Aut(A ⊔ A0)) ⊨ BPIT

ZFA(Q) ⊨ defCSP ks Aut(Q) is extr. ame. Q is Ramsey ⇒ Cont(Aut(Q ⊔ Q0)) ⊨ BPIT

ZF ⊨ CSP ↔ BPIT ZFA ⊨ defCSP ↔ zfaCSP

Figure 4. Equivalences between Ramsey property, extremal amenability, BPIT and Axiom CSP. supported (by the union of supports of its elements), 퐾 (푉 × 퐷) Therefore, an ideal 퐼 in B can be extended to a prime ideal ′ consists of all finite relations from 퐴 to 퐵. This means that the 푃 iff B has a prime ideal 퐽. In this case, ℎ푃 = ℎ퐽 ◦ ℎ퐼 . This internal object of finitary homomorphisms hom(V, D) con- means, that BPIT is equivalent to the statement that every sists of the set of all finitary homomorphisms from V to D. By non-trivial Boolean algebra has a prime ideal. We shall use Axiom CSP in the real world6 this set is jointly total if and only this characterisation for the reminder. if ⟨Σ, V, D⟩ has a solution (in Set). Therefore, Axiom CSP in The constraint satisfaction problem is defined over re- Cont(Aut(A ⊔ A )) states that an 퐴 -equivariant CSP over 0 0 lational structures. Therefore, to fit into the framework of a finite domain has an 퐴 -equivariant solution if and only if 0 CSP we should treat a Boolean algebra B as if it was de- it has a solution (in Set). fined over a relational signature, with an unary To state our main results, we have to recall more set- top(푥) ⇔ 푥 = 1, ternary predicate and(푥,푦, 푧) ⇔ 푥 ∧ 푦 = 푧 theoretic terminology. and binary predicate not(푥,푦) ⇔ ¬푥 = 푦. The axioms must express that there exists unique 푥 that satisfy top and that Definition 3.5 (Boolean algebra). An algebra B is a structure and and not are functional relations. ⟨퐵, 1, ∧, ¬⟩, where 1 is a constant, ∧: 퐵 × 퐵 → 퐵 is a , and ¬: 퐵 → 퐵 is an unary operation. Consider Lemma 3.2 (Axiom CSP implies BPIT). Axiom CSP implies relation ≤ ⊆ 퐵 × 퐵 defined as: 푎 ≤ 푏 ⇔ 푎 = 푎 ∧ 푏. We say BPIT in Boolean toposes. that B is a Boolean algebra if the following holds: Proof. Let B be a non-trivial Boolean algebra. By Axiom CSP, 퐵 •≤ is a partial order on with finite joins given by ∧ and it suffices to show that the set of finitary homomorphisms the greatest element 1 hom(B, 2) is jointly total, i.e. for every finite 퐵0 in 퐾 (퐵) • for every 푏 ∈ 퐵 we have that: ¬¬푏 = 푏 there exists a partial homomorphism 퐵0 ⊆ 퐵1 → 2. We can 퐵 If B is a Boolean algebra, then 1 is its internal true value, assume that 1 is closed under Boolean-algebra operations 퐵 and operation ∧ is the internal conjunction. Other operations and still finite. The reason for that is that if 0 is finite then 푃 퐵 in a Boolean algebra can be defined in the usual way: in a Boolean topos ( 0) is finite as well (it coincides with 퐾 (퐵 )). Because AC holds for finite sets (Lemma 3.1), 퐵 has • 0 = ¬1 for the false value 0 1 a prime ideal, what completes the proof. □ • 푎 ∨ 푏 = ¬(¬푎 ∧ ¬푏) for the internal disjunction • 푎 ⊕ 푏 = (푎 ∧ 푏) ∨ (¬푎 ∧ ¬푏) Let us work out the proof of Theorem 3.2 in Cont(Aut(A)). For a Boolean algebra B treated as an object in Cont(Aut(A)) Definition 3.6 (Ideal). Let B be a Boolean algebra. An ideal in the object of finitary homomorphisms hom(B, 2) consists of B is a proper subset 퐼 ⊂ 퐵 satisfying the following conditions: finitely supported homomorphisms from a finitely supported • 푎,푏 ∈ 퐼 푎 ∨ 푏 ∈ 퐼 if then finite subsets of B to 2, i.e.: • if 푎 ∈ 퐼 then for every 푏 ∈ 퐵 such that 푏 ≤ 푎 we have , ℎ 퐵 퐵 퐵, 퐵 , ℎ that 푏 ∈ 퐼 hom(B 2) = { : 0 → 2: 0 ⊆ 0 are finitely supported} Because every finite set is finitely supported, and every func- Definition 3.7 (Prime ideal). Let 퐼 be an ideal in B. We say tion between finite sets is finitely supported the above is just that 퐼 is prime if for every 푏 ∈ 퐵 either 푏 ∈ 퐼 or ¬푏 ∈ 퐼. the set of all finitary homomorphisms from B to 2, i.e.: Axiom 4 (BPIT). Every ideal in a Boolean algebra can be hom(B, 2) = {ℎ : 퐵 → 2: 퐵 ⊆ 퐵} extended to a prime ideal 0 0 For any finite 퐵0 ⊆ 퐵 consider the Boolean algebra 퐵1 gener- Remark 3.1. An ideal 퐼 in B can be represented by a homo- ated by 퐵0. Let us assume that B is non-trivial. Because 퐵1 is morphismℎ : B → B′ to a Boolean algebra B′, i.e. 퐼 = ℎ−1 (0). 퐼 퐼 easily seen to be finite, by BPIT for finite Boolean A prime ideal is an ideal that can be represented by a homomor- in the real world, one can find a homomorphism 퐵 → 2. phism to 2 equipped with the usual Boolean algebra structure. 1 Therefore, hom(B, 2) is jointly total, and by Axiom CSP, 6We may assume Axiom CSP holds in Set by Theorem 3.4. there exists a homomorphism B → 2. 9 , ver. 1.2, 2020 Michal R. Przybylek

Lemma 3.3 (BPIT implies Axiom CSP). Axiom BPIT implies Theorem 3.4 (CSP ↔ BPIT). In every Boolean topos the Axiom CSP in Boolean toposes. following are equivalent: Proof. Let us assume that V and D are structures over rela- • Boolean prime ideal theorem tional signature Σ. Furthermore, assume that D = {0, 1, . . . , 퐷− • Axiom CSP 1} is a finite cardinal and the set of partial functions 퐷푉 Proof. By Lemma 3.3 and Lemma 3.2. □ is a jointly total family of homomorphisms. We shall treat Var = 푉 × 퐷 as a set of propositional variables. Consider the 3.1 Characterisation theorems following subsets of 퐹 (Var), where 퐹 (Var) is treated as the free Boolean algebra on Var: This subsection states our main characterisation theorems. Let us begin with the observation that (a variant7 of) Theo- • 푇 = {⟨푣, 0⟩ ∨ ⟨푣, 1⟩ ∨ · · · ∨ ⟨푣, 퐷 − 1⟩ : 푣 ∈ 푉 } rem 17 in [22] follows from James D. Halpern’s result [14] • 푆 = {¬(⟨푣, 푛⟩ ∧ ⟨푣,푚⟩) : 푣 ∈ 푉, 푛 ∈ 퐷,푚 ∈ 퐷, 푛 ≠ 푚} from 1964 and our Theorem 3.4 (no advanced modern results • 퐶푅 = {¬(⟨푥1,푑1⟩ ∧ ⟨푥2,푑2⟩ ∧ · · · ∧ ⟨푥푛,푑푛⟩) : 푉 퐷 are needed). 푅 (푥1, 푥2, . . . , 푥푛) ∧ ¬푅 (푑1,푑2, . . . ,푑푛)} for every 푅 ∈ Σ Theorem 3.5 (defCSP in ZFA(Q)). defCSP holds in ZFA(Q). The intuitive meaning of these formula should be obvious: 푄 formulas from 푇 say that every 푣 ∈ 푉 is associated to at least Proof. By Theorem from Section 3 in [14] every 0-equivariant B (Q) 푄 one value in 퐷 (i.e. the relation is total); formulas from 푆 Boolean algebra in ZFA has an 0-equivariant prime say that every 푣 ∈ 푉 is associated to at most one value in ideal. This is the same as saying that every internal Boolean algebra in the topos Cont(Aut(Q ⊔ Q0)) has an internal 퐷 (i.e. the relation is single valued); formulas from 퐶푅 say that the valuations cannot volatile constraint 푅. Consider the prime ideal. Because the topos is Boolean, by Theorem 3.4 Ax- ( (Q ⊔ )) 푄 following set of propositions: 푃 = 푇 ∪ 푆 ∪ Ð 퐶 . Let us iom CSP holds in Cont Aut Q0 . Therefore, every 0- 푅∈Σ 푅 푄 say that two propositions 휙,휓 from 퐹 (Var) are equivalent if equivariant CSP over a finite domain has an 0-equivariant solution. In other words zfaCSP holds in ZFA(Q), and since there is a finite 푃0 ⊂ 푃 such that every valuation 푉0 × 퐷 → 2 satisfying 푃 satisfies 휙 ⊕ 휓. Then 퐹 (Var) divided by this the formulation of defCSP is weaker than zfaCSP, defCSP 0 (Q) equivalence relation is again a Boolean algebra 퐹 (Var)/≡ holds in ZFA as well. □ with the usual operations. We want to show that 퐹 (Var)/≡ is non-trivial, i.e. 0 ≠ 1. It suffices to show that every finite The proof of the next theorem is similar. We use the result of Andreas Blass from 1986 [4]. 푃0 ⊆ 푃 is satisfiable. Because every finite 푃0 ⊆ 푃 involves only finitely many variables Var ⊆ Var and finitely many 0 Theorem 3.6 (zfaCSP in ZFA(A)). zfaCSP holds in ZFA(A) constraints, the sets 푉 = 훾 (Var ) ⊆ 푉 and Σ ⊆ Σ of rela- 0 0 0 0 if and only if A satisfies Ramsey property. tions that appear in 푃0 are finite. In fact, 푃0 can be rewritten as the union of: Proof. Theorem 2 of [4] states that Ramsey property of A is 퐴 • 푇0 = {⟨푣, 0⟩ ∨ ⟨푣, 1⟩ ∨ · · · ∨ ⟨푣, 퐷 − 1⟩ : 푣 ∈ 푉0} equivalent to the property that every 0-equivariant Boolean 퐴 • 푆0 = {¬(⟨푣, 푛⟩ ∧ ⟨푣,푚⟩) : 푣 ∈ 푉0, 푛 ∈ 퐷,푚 ∈ 퐷, 푛 ≠ 푚} in ZFA(A) has an 0-equivariant prime ideal. This is the • 퐶푅,0 = {¬(⟨푥1,푑1⟩ ∧ ⟨푥2,푑2⟩ ∧ · · · ∧ ⟨푥푛,푑푛⟩) : same as saying that every internal Boolean algebra in the 푉 퐷 푥푖 ∈ 푉0, 푅 (푥1, 푥2, . . . , 푥푛) ∧ ¬푅 (푑1,푑2, . . . ,푑푛)} for topos Cont(Aut(A ⊔ A0)) has an internal prime ideal. By every 푅 ∈ Σ0 Theorem 3.4 this is equivalent to Axiom CSP in Cont(Aut(A ⊔ A0)). Therefore, zfaCSP holds in ZFA(A) if and only if A has Ram- Since 푉0 and Σ0 are finite, by the assumption of Axiom CSP, sey property. □ there exists a finitary partial function ℎ0 ∈ hom(V, D) with 푉0 ⊆ 훾0 (ℎ0) that preserves relations from Σ0. This partial We will show now that seemingly weaker Axiom defCSP function induces a valuation 푉0 ×퐷 → 2. By the definition of is actually equivalent to Axiom zfaCSP over ZFA. We need the constraints, this valuation makes 푃0 satisfiable. Therefore, one more definition. every finite 푃0 is satisfiable, and so 퐹 (Var)/≡ is non-trivial. By BPIT, there is a prime ideal 푢 : 퐹 (Var)/≡→ 2, which com- Definition 3.8 (Compact object). An object 푋 of a cocomplete posed with the canonical embedding 푗 : 퐹 (Var) → 퐹 (Var)/≡ category C is called compact if its co-representation: gives a prime ideal ℎ = 푢 ◦ 푗 on 퐹 (Var). By the definition of the quotient algebra, ℎ maps propositions from 푃 to 1. homC (푋, −) : C → Set Consider the restriction ℎ : 푉 × 퐷 → 2 of ℎ to variables Var = 푉 × 퐷. By propositions 푇 valuation ℎ is total and preserves filtered colimits of monomorphisms. by propositions 푆 it is single-valued. Moreover, by proposi- tions 퐶푅 the valuation does not violate any of the constraints 7As mentioned in Section 2 our Theorem 3.4 can be modified to locally 푅 ∈ Σ. Therefore, ℎ is a homomorphism from V to D. □ finite CSP. 10 On amenability of constraint satisfaction problems , ver. 1.2, 2020

For any topological group G compact objects in Cont(G) We can summarize the above characterisations in the next are precisely the actions that have finitely many orbits. There- theorem. fore, compact objects in Cont(Aut(A ⊔ A0)) are just 퐴0- equivariant definable objects in ZFA(A). Consider the fol- Theorem 3.8 (Characterisation theorem). Let A be a count- lowing axiom that can be interpreted in any topos with able structure. Then the following are equivalent: filtered colimits. 1. Aut(A) is extremely amenable A has Ramsey property Axiom 5 (ctCSP). For every compact relational signature Σ 2. (A) and a pair of structures V and D over Σ such that 퐷 is a finite 3. zfaCSP holds in ZFA (A) cardinal and V is compact, the following are equivalent: 4. defCSP holds in ZFA 5. Axiom CSP holds in Cont(Aut(A ⊔ A0)) for every • there exists a homomorphism from V to D finite 퐴0 ⊂ 퐴 • the set of finitary functions hom(V, D) is a jointly total 6. Boolean Prime Ideal theorem holds in Cont(Aut(A ⊔ A0)) family of homomorphisms for every finite 퐴0 ⊂ 퐴 Theorem 3.7 (ctCSP implies Axiom CSP in continuous sets). Proof. (1) ⇔ (2) is Proposition 4.7 in [21]. (2) ⇔ (3) is the Let G be a topological group and Cont(G) be the topos of its subject of Theorem 3.6. (3) ⇔ (4) is the consequence of continuous actions on Set. Then ctCSP holds in Cont(G) iff Theorem 3.7. (3) ⇐ (5) is trivial, (5) ⇒ (6) is the subject of Axiom CSP holds in Cont(G). 3.4, and (1) ⇔ (6) is the subject of [5]. □ Proof. An object 푋 in Cont(G) can be represented as a dis- joint union of its orbits 푋 = Ð 푋/G. By the definition of Here are another two important statements equivalent to compactness for every finite set of orbits 퐹 ⊆ 푋/G the ob- BPIT over Boolean toposes, therefore after suitable augmen- Ð ject 푋0 = 퐹 is compact. tion, equivalent to Axiom defCSP. Assume that ctCSP holds in Cont(G) and consider a CSP ⟨Σ, V, D⟩ such that the set of partial functions 퐷푉 is a jointly Corollary 3.9. Let A be an algebraic structure. Then the total family of homomorphisms. Then for any restriction of following are equivalent in ZFA(A): Σ to Σ0 and any substructure V0 ⊆ V interpreted over Σ0 • defCSP the set of partial functions 퐷푉0 is a jointly total family of • every 퐴0-equivariant non-trivial ring with unit has an homomorphisms. Thus, if we assume that Σ and V have 0 0 퐴0-equivariant prime ideal [3] finitely many orbits (i.e. they are compact), by ctCSP there • every 퐴0-equivariant non-trivial complete distributive exists an equivariant homomorphism V0 → D over Σ0. lattice with compact unit has an 퐴 -equivariant prime , , 0 Now, observe that every CSP ⟨Σ V D⟩ in Cont(G) can be element [2] regarded as a classical structure ⟨eΣ, Ve, D⟩e over an extended signature eΣ that forces homomorphisms to be equivariant. 4 The case of non-Boolean toposes This extended signature consists of a new ternary relation When we move to non-Boolean toposes, we have to be ex- 푇 and two new unary relations 푈 ,푈 . To turn V into a 퐺 푉 tra careful when stating classical definitions and axioms, classical structure V we extend the sort 푉 by elements of G, e because in constructive mathematics classically equivalent i.e. 푉 = 푉 ⊔ 퐺 and define new relations as follows: e statements may be far different. Fortunately for us, the con- • 푈퐺 (푥) ↔ 푥 ∈ 퐺 cept of Boolean algebra, ideal and prime ideal move smoothly • 푈푉 (푥) ↔ 푥 ∈ 푉 to the intuitionistic setting with one caveat: not every maxi- • 푇 (푔, 푎,푏) ↔ 푈퐺 (푔) ∧ (푔 • 푎 = 푏) mal ideal in a Boolean algebra has to be prime. To turn D into a classical structure V˜ we set 퐷e = 퐷 ⊔ {1} On the other hand, Axiom CSP is much more difficult and define new relations as: to handle in the intuitionistic setting. Actually, we have at least several different variants of Axiom CSP depending on • 푈퐺 (푥) ↔ 푥 = 1 • 푈 (푥) ↔ 푥 ∈ 퐷 our interpretation of “finiteness” and admissible relational 푉 structures. Therefore, we should not expect that Axiom CSP • 푇 (푔, 푎,푏) ↔ 푈 (푔) ∧ (푎 = 푏) 퐺 is equivalent to BPIT in constructive mathematics, because , , Then CSP ⟨Σ V D⟩ has a solution in Cont(G) if and only BPIT does not involve any notion of finiteness and there is if ⟨eΣ, Ve, D⟩e has a solution in Set. By Axiom CSP in the real not much concern about admissibility of Boolean algebra world (i.e. in Set), Ve, De has a solution if and only if every operations (however, we could take this into account). In finite substructure Vf0 of Ve over fΣ0 has a solution. But every general, the stronger the notion of “finiteness” and “admissi- finite Ve0 has a solution, because it is contained in some Vf1 bility” is, the stronger Axiom CSP we obtain. for compact V1. Therefore, Ve, De has a solution, which, by Let us discuss some possible definitions for an admissible definition, is an equivariant solution of V, D. □ structure A: 11 , ver. 1.2, 2020 Michal R. Przybylek

푅 1. Only complemented relations are admissible. That is, ∅ {∗} subobjects 푠 : 푅 → 퐴푘 such that there exists a subob- O ¬푠 푅 → 퐴푘 푠 ∪ ¬푠 ject : with the property that = id퐴푘   and 푠 ∪ ¬푠 = 0. {∗}{∗} 2. 퐴 is decidable. That is, the sobobject Δ: 퐴 → 퐴×퐴 that correspond to the equality predicate is complemented. Figure 5. Axiom CSP fails in Set•→• for Kuratowski finite- Because, we assume that equality is always presented 퐴 ness. The structures are equipped with a single unary relation in the signature, decidability of is subsumed by the that holds on blue elements only. previous point. 3. All relations are admissible. <,= ⊤, ⊥ =,< In the next subsections we discuss Axiom CSP with respect , 3 + , ⊥ ⊥ 3 ⊤ ⊤ to two internal notions of “finiteness”: =,< + ⊥, ⊤ <,= 휋1 휋2 • Kuratowski finiteness from Definition 3.1 ⊥⊤ t| ⊥⊤ ( • Kuratowski subfiniteness — i.e. being a subobject ofa < / < / Kuratowski finite object

4.1 Kuratowski finiteness is too strong Figure 6. An example of a non-trivial finite Boolean algebra in Set•←•→• that has no prime ideal. Consider Sierpienski topos Set•→•. It is a routine to check that BPIT holds in Set•→•, but Axiom CSP does not hold •←•→• even in case “finiteness” is interpreted as Kuratowski finite- finite, what means that in Set not every finite Boolean ness and only complemented relations 푅 are admissible. For algebra has a prime ideal. On the other hand, Axiom CSP a counterexample consider structures from Figure 5. The with Kuratowski finite subobjects fails and with Kuratowski structure on the right side is the terminal object 1 equipped subfinite subobjects holds for the same reasons as inthe •→• with the empty unary relation 0 → 1. The structure on the Sierpienski topos Set . Therefore, example from Figure 6 1 shows that Axiom CSP with Kuratowski subfiniteness is too left side is the only non-trivial subobject 2 of 1 equipped id weak to prove BPIT. 1 → 1 with the full unary relation 2 2 . There is a unique mor- 1 phism ! from 2 to 1, but it is not a homomorphism, since it 5 Conclusions and further work 1 does not preserve the unary relation, i.e. ! ◦ id 1 = ≠ 0. On 2 2 In this paper we have given a simple purely-logical proof of 1 the other hand, the only Kuratowski finite subobject of 2 is “equivariant definable CSP over finite domain has a solution , 0 and the object of homomorphisms hom(0 1) is isomorphic iff it has an equivariant definable solution” in the ordered to 1. Fraenkel-Mostowski model (Theorem 3.5) without using any This example shows that Axiom CSP with Kuratowski advanced results from topology and model theory. More- finiteness is too strong to be provable from BPIT, andtoo over, we have introduced an intrinsic characterisation of this strong in general. If we weaken Axiom CSP by weakening statement and investigate it in general toposes. It turns out the notion of finiteness to Kuratowski subfiniteness then that in Boolean toposes this axiom is equivalent to Boolean Axiom CSP will hold even if all relations are admissible. Prime Ideal theorem, whereas in intuitionistic toposes there •→• The reason is that a structure X : A → B in Set can be is no such an equivalence, nor an implication in either direc- encoded as a structure A ⊔ B in Set with one additional tions. It is an interesting question which positive-existential 푋 푅 푥,푦 relation encoding the graph of function , i.e. ( ) ⇔ theories have classifying toposes validating Axiom CSP; or 푋 푥 푦 ( ) = and one unary relation to distinguish domain from more generally, in which Grothendieck toposes Axiom CSP 푆 푥,푦 퐴 퐴 퐵 퐵 the , i.e. ( ) = × ⊔ × . Then for every finite holds. Finally, we reversed the main result of [22] by show- 퐴 퐵 substructure 0 ⊔ 0 of A ⊔ B there is a finite substructure ing that for a countable structure A Axiom defCSP holds in 퐴 퐵 퐴 퐵 0 ⊔ 0 ⊂ 1 ⊔ 1 ⊆ A ⊔ B corresponding to a Kuratowski ZFA(A) if and only if the automorphism group Aut(A) of subfinite substructure of X. Therefore, Axiom CSP holds in A is extremely amenable (Theorem 3.8). Set•→• by the Axiom CSP in Set. Acknowledgments 4.2 Kuratowski subfiniteness is too weak This research was supported by the National Science Centre, •←•→• Consider topos Set . Figure 6 shows an example of a Poland, under projects 2018/28/C/ST6/00417. Boolean algebra, which does not have a prime ideal. More- over, this example explicitly shows why we cannot carry References over our proof of Theorem 3.2 to constructive mathematics [1] Cyril Allignol, Nicolas Barnier, Pierre Flener, and Justin Pearson. 2012. — the Boolean algebra under consideration is Kuratowski Constraint programming for air traffic management: a survey 1:In 12 On amenability of constraint satisfaction problems , ver. 1.2, 2020

memory of pascal brisset. The Knowledge Engineering Review 27, 3 [24] Saunders MacLane and Ieke Moerdijk. 2012. Sheaves in geometry and (2012), 361–392. logic: A first introduction to topos theory. Springer Science & Business [2] Bernhard Banaschewski. 1985. Prime elements from prime ideals. Media. Order 2, 2 (1985), 211–213. [25] Theodore Mitchell et al. 1970. Topological semigroups and fixed points. [3] Bernhard Banaschewski and Roswitha Harting. 1985. Lattice aspects Illinois Journal of Mathematics 14, 4 (1970), 630–641. of radical ideals and choice principles. Proceedings of the London [26] Andrzej Mostowski. 1939. Über die Unabhangigkeit des Wohlord- Mathematical Society 3, 3 (1985), 385–404. nungssatzes vom Ordnungsprinzip. (1939). [4] Andreas Blass. 1986. Prime ideals yield almost maximal ideals. Funda- [27] Joanna Ochremiak. 2016. Extended constraint satisfaction problems. menta Math. 127 (1986), 57–66. Ph.D. Dissertation. [5] Andreas Blass. 2011. Partitions and permutation groups. Model Theo- [28] Vladimir Pestov. 1998. On free actions, minimal flows, and a problem retic Methods in Finite Combinatorics 558 (2011), 453–466. by Ellis. Trans. Amer. Math. Soc. 350, 10 (1998), 4149–4165. [6] Manuel Bodirsky. 2008. Constraint satisfaction problems with infinite [29] Michał R. Przybyłek. 2017. Beyond Sets With Atoms: Definability in templates. In Complexity of Constraints. Springer, 196–228. First-Order Logic. Cat. in Phys., Math. and Phil. (2017). [7] Manuel Bodirsky and Hubie Chen. 2007. Qualitative temporal and [30] Michal R. Przybylek. 2020. Beyond sets with atoms: definability in spatial reasoning revisited. In International Workshop on Computer first order logic. In https://arxiv.org/abs/2003.04803. Science Logic. Springer, 194–207. [31] Jochen Renz and Bernhard Nebel. 2007. Qualitative spatial reasoning [8] Manuel Bodirsky and Jaroslav Nešetřil. 2006. Constraint satisfaction using constraint calculi. In Handbook of spatial . Springer, 161– with countable homogeneous templates. Journal of Logic and Compu- 215. tation 16, 3 (2006), 359–373. [32] Francesca Rossi, Peter Van Beek, and Toby Walsh. 2006. Handbook of [9] Edmund Clarke, Muralidhar Talupur, Helmut Veith, and Dong Wang. constraint programming. Elsevier. 2003. SAT based predicate abstraction for hardware verification. In International Conference on Theory and Applications of Satisfiability Testing. Springer, 78–92. [10] Minh Binh Do and Subbarao Kambhampati. 2001. Planning as con- straint satisfaction: Solving the planning graph by compiling it into CSP. Artificial Intelligence 132, 2 (2001), 151–182. [11] Mark S. Fox and Norman Sadeh-Koniecpol. 1990. Why is Scheduling Difficult? A CSP Perspective. In Proceedings of the Ninth European Conference on Artificial Intelligence address: Stockholm Sweden month: August. 754–767. [12] Arnaud Gotlieb. 2012. TCAS software verification using constraint programming. The Knowledge Engineering Review 27, 3 (2012), 343– 360. [13] Lorenz J Halbeisen. 2017. Combinatorial Set Theory: With a Gentle Introduction to Forcing. Springer. [14] James D Halpern. 1964. The independence of the axiom of choice from the Boolean prime ideal theorem. Fund. Math 55 (1964), 57–66. [15] James D Halpern and Azriel Lévy. 1971. The Boolean prime ideal theorem does not imply the axiom of choice. In Axiomatic set theory, Vol. 13. Proceedings of Symposia in Pure Mathematics, 83–134. [16] Wojchiech Herer and Jens Peter Reus Christensen. 1975. On the existence of pathological submeasures and the construction of exotic topological groups. Math. Ann. 213, 3 (1975), 203–210. [17] Paul Howard and Jean E Rubin. 1998. Consequences of the Axiom of Choice. Vol. 59. American Mathematical Soc. [18] T.J. Jech. 2008. The Axiom of Choice. Dover Publications. [19] Peter Johnstone. 1984. Almost maximal ideals. Fundamenta Mathe- maticae 123 (1984), 197–209. [20] Michael Kaminski and Nissim Francez. 1994. Finite-memory automata. Theoretical 134, 2 (1994), 329–363. [21] Alexander S Kechris, Vladimir G Pestov, and Stevo Todorcevic. 2005. Fraïssé limits, Ramsey theory, and topological dynamics of automor- phism groups. Geometric and Functional Analysis 15, 1 (2005), 106–189. [22] Bartek Klin, Eryk Kopczynski, Joanna Ochremiak, and Szymon Torunczyk. 2015. Locally Finite Constraint Satisfaction Problems. In 30th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2015, Kyoto, Japan, July 6-10, 2015. 475–486. https://doi.org/10. 1109/LICS.2015.51 [23] Bartek Klin, Slawomir Lasota, Joanna Ochremiak, and Szymon Torunczyk. 2016. Homomorphism Problems for First-Order Defin- able Structures. In 36th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2016, December 13-15, 2016, Chennai, India. 14:1–14:15. https://doi.org/10. 4230/LIPIcs.FSTTCS.2016.14

13