arXiv:2003.13108v1 [cs.LO] 29 Mar 2020 osritstsato rbe CP a easrcl de- abstractly be can (CSP) problem satisfaction constraint A ouint hspolmi nassignment an is problem this to solution A h uhr f[0 hwdta osritsatisfaction constraint a that showed [20] of authors The C Concepts CCS the of group amenable. automorphism extremely the is count- a structure if over only holds and solution” if definable structure a able has has it CSP iff “definable solution that a prove for we but re- reversed: needed, the implication indeed are in the that theory it show model we investigate modern from (3) and sults theories solution” definable intuitionistic so- a general a has has it CSP iff “definable intrinsic lution an statement introduce the we of (2) characterisation needed; and not topology are from theory results advanced model theo the three- their that of is show proof paper and purely-logical rem simple this a of give We aim (1) The fold. topology theory. definable from model a results modern has advanced and it uses if only proof and Their if solution. solution a has nat- ordering their ural with numbers rational over defined (CSP) problem Abstract nda triple a few. as fined a name to [1],... managment traffic rea- air spatial [5], and [27], temporal soning [10], [9], scheduling and planning automate problems [11], [8], diagnosis: satisfaction and verification constraint hardware e.g. as specified can abstractly complexity high be of problems decision real-world Verymany beings. human for intractable them the com- makes high what for plexity, have can critical problems small are relatively problems Even computer- industry. real-world that to question solutions any longer aided no is there Nowadays, Introduction 1 ideal prime Boolean group, amenable extremel property, Ramsey problem, satisfaction constraint Keywords programming and 2020. 2020 1.0, ver. DRAFT, aifisalcntansin constraints all satisfies naeaiiyo osritstsato problems satisfaction constraint of amenability On • • • V C where D sasto osrit fteform the of constraints of set a is stesto variables of set the is stedomain the is e hoywt tm,itiinsi e theory, set intuitionistic atoms, with theory set x i ∈ h • D V hoyo computation of Theory , V and , C i R C where: , ; ⊆ .. o every for i.e.: , D k aut fMteais nomtc n Mechanics and Informatics , of Faculty hh hh x x 1 1 → , S , x x : 2 V 2 Constraint , , · · · · · · → ihlR Przybylek R. Michal nvriyo Warsaw of University [email protected] , , D x x asw Poland Warsaw, k k that i i , , R R y d i - ∈ i , 1 V C se[0 n 2].Te hwdta htCPdfie in defined CSP that that showed They [24]). and [20] (see states the to (corresponding variables of sets infinite with xo 1 neapeo uhCPi h rbe f3clrblt of 3-colorability of problem the is CSP such of example An de- infinite form constraints and variables domains, whose aibe,testo osrit n h oano h vari- the of domain the and constraints of set the variables, 1 ie h eaiease yehbtn nt ugah wh subgraph, 1 finite Figure a exhibiting 3-colorable. by is answer negative graph the infinite gives this if wander may One a reigcnb ovdeffectively solved natu- be their can with numbers ordering rational ral of theory first-order the finite variables of whose set infinite domain, definable finite a over form constraints CSP and i.e. locally called, — so CSP investigate, finite inspired to Group research Logical This Warsaw to domains. the survey tools infinite a over model-theoretic also CSP and (see analyze algebraic [6] infi- applied of solving [4]) authors The in article CSP. progress of giant variants a recent nite In witnessed system). have a we of states years, the (corresponding between constraints transitions of the sets to infinite and system) a of CSP as specified naturally be can problems too is Such variant restrictive. classical the systems, autonomous of haviours es hc erfruaea h olwn axiom. following the num- as reformulate rational we in which definability bers, of property a was observation h olwn nnt rp enbeoe aua numbers natural over definable N graph infinite following the a enbeslto fadol fi a solution. a has it if only and if solution definable a has esle nafiietm yamachine a by time can finite it a NP-complete), in is solved problem be general the (i.e. finite high of is cost CSP computational the Although finite. all are ables xml 1.1 Example graphs. domains. finite without over reason, CSP this on For focus can [21]). we of reduc- generality, 4 of explicit loss Section (an in CSP given finite is locally tion to reduce sets finable etepoe ain fCPis CSP of variant explored best hoy e 2]frmr details. more for [26] see theory, 2 E o eea eeec nsligcasclCPse[28] see CSP classical solving on reference general a For ob oepeie hywre ntemxmltgtetnino the of tight maximal the in worked they precise, more be To ehv that have we notntl,we tcmst rbescnenn be- concerning problems to comes it when Unfortunately, twsfrhrosre n[]ta nnt S ..CSP i.e. — CSP infinite that [7] in observed further was It ihequality: with = = {hh {h a (DEF-CSP) a , b , b ∈ i 3clrblt fa nnt graph) infinite an of (3-colorability i R , ( h S N c ( , x 2 d 1 : i∈ ii . ) a , enbeCPoe nt domain finite a over CSP definable A S , ( x V b 2 ) } × , · · · V : finite , ( S a ( x = k d )) 2 S ..testof set the i.e. — CSP 1 h e technical key The . . ∧ od.Cascland Classical holds. b , c ( ∨ ) . Consider a , d ich ∧ b = c )} DRAFT, ver. 1.0, 2020 Michal R. Przybylek

is not 3-colorable. This problem fits into the framework of CSP as follows: the domain D = {Y,G, B} consists of three con- stants Y,G, B, the set of variables V is the set of vertices V of SET PASSW the graph, and the set of constraints is given asC = {hhx,yi, ,D i : hx,yi ∈ } , ⊂ × R E , where D D D is the on D. Observe, : =

that every set definable in N, can be treated as a set definable x in the rational numbers with their natural ordering. Therefore, we can use the machinery of [20] to solve such problems effec- START tively.

R ,

x ?, 1, 2 5, 1 R :=

⊥ 2, 5

3, 1 1, 4

R

: R , x? R , x? = AUTH AUTH AUTH x 2, 3 4, 5 TRY 1 TRY 2 TRY 3 4, 2 5, 3 R =

R x ? = ? x x = ? R

3, 4 GRANT AUTH

Figure 1. Counterexample to 3-colorability.

An important source of infinite graphs come from finite memory machines in the sense of Kaminski, Michael and EXIT CHNG Francez [18]. AUTH PASSW Example 1.2 (Access-control register machine). Figure 2 represents a register machine with one register R. The machine Figure 2. A register machine that models access control to starts in state “SET PASSW”, where it awaits for the user to some parts of the system. provide a password x. This password is then stored in regis- ter R, and the machine enters state “START”. Inside the blue rectangle the machine can perform actions that do not require graph of possible configurations in a register machine is infi- authentication, whereas the actions that require authentica- nite. Nonetheless, we can formulate many properties of such tion are presented inside the red rectangle. The red rectangle graphs as CSP problems over natural numbers with can be entered by the state “GRANT AUTH”, which can be and solve them effectively. accessed from one of three authentication states. In order to Remark 1.1. Every constraint satisfaction problem can be authorise, the machine moves to state “AUTH TRY 1”, where it presented as a pair of relational structures V, D over the gets input x from the user. If the input is the same as the value same relational signature Σ. This signature Σ consists of a pair previously stored in register R, then the machine enters state k hR, ki for every relation R ⊆ D from a constraint hhx1, x2,..., xk i, Ri ∈ “GRANT AUTH”. Otherwise, it moves to state “AUTH TRY 2” V C. The of R/k ∈ Σ in V is R (x1, x2,..., xk )⇔ and repeats the procedure. Upon second unsuccessful authori- hhx1, x2,..., xk i, Ri ∈ C, and the interpretation in D is the sation, the machine moves to state “AUTH TRY 3”. But if the relation R itself. Moreover, a solution S : V → D to the CSP is user provides a wrong password when the machine is in state a homomorphism from V to D. “AUTH TRY 3”, the register R is erased (replaced with a value that is outside of the user’s alphabet) — preventing the ma- To understand these results, we have to recall some ba- chine to reach any of the states from the red rectangle. Inside sic concepts from model and . We shall do this in the red rectangle any action that requires authentication can Section 2. The aim of this paper is to reverse the theorem be performed. For example, the user may request the change of stated as Axiom DEF-CSP and give the full characterisation the password. Observe that in contrast to finite automata, the of set theories with atoms where Axiom DEF-CSP holds. But 2 On amenability of constraint satisfaction problems DRAFT, ver. 1.0, 2020 we shall do much more: in Section 3 we reformulate Ax- Here are some standard examples of sets with atoms. iom DEF-CSP as an intrinsic Axiom of any Boolean topos Example 2.1 (The basic Fraenkel-Mostowski model). Let (Axiom CSP) and show that it is equivalent to another, well- N be the structure of natural numbers with equality. We call known, axiom: Boolean prime ideal theorem. Then in Sub- ZFA(N) the basic Fraenkel-Mostowski model of set theory with section 3.1 we show that Axiom CSP holds in Cont(Aut(A ⊔ A )) 0 atoms. Observe that Aut(N) is the group of all bijections (per- for every finite A ⊂ A if and only if the automorphism 0 mutations) on N . The following are examples of sets in ZFA(N): group of A is extremely amenable. By the transfer princi- ple we conclude that this is equivalent to Axiom DEF-CSP • all sets without atoms N , e.g. ∅, {∅}, {∅, {∅},... },... in ZFA(A). In Section 4 we investigate Axiom CSP in non- • all finite of N , e.g. {0}, {0, 1, 2, 3},... Boolean toposes pointing out many obstacles to the equiv- • all cofinite subsets of N , e.g. {1, 2, 3,... }, {4, 5, 6,... },... alence between Boolean prime ideal theorem and possible • N × N 2 formulations of Axiom CSP. • {ha,bi ∈ N : a , b} ∗ = k • N Ðk ∈N N = 2 Set theory with atoms •K(N ) {N0 : N0 ⊆ N , N0 is finite} = , For any structure A we can build a von Neumann-like hier- • Ps (N ) {N0 : N0 ⊆ N N0 is symmetric} archy of sets with elements from A [23], [12]. The elements Here are examples of sets in V (N) which are not symmetric: of A will be thought of as “atoms”. • {0, 2, 4, 6,... } • {hn,mi ∈ N 2 : n ≤ m} Definition 2.1 (The cumulative hierarchy of sets with atoms). • the set of all functions from N to N Let A be an with universe A. Consider the •P(N ) = {N : N ⊆ N } following sets defined by transfinite : 0 0

• V0(A) = A Example 2.2 (The ordered Fraenkel-Mostowski model). Let • Vα +1(A) = P(Vα (A)) ∪ Vα (A) Q be the structure of rational numbers with their natural or- = ZFA • Vλ(A) Ðα <λ Vα (A) if λ is a limit ordinal dering. We call (Q) the ordered Fraenkel-Mostowski model Then the cumulative hierarchy of sets with atoms A is defined of set theory with atoms. Observe that Aut(Q) is the group of = all order-preserving bijections on Q.All symmetric sets from as V (A) Ðα : Ord Vα (A). Example 2.1 are symmetric sets in ZFA(Q) when N is replaced Observe, that the universe V (A) carries a natural action by Q. Here are some further symmetric sets: (•): Aut(A) × V (A) → V (A) of the automorphism group • {hp,qi ∈ Q2 : p ≤ q} Aut(A) of structure A — it is just applied to the • {hp,qi ∈ Q2 : 0 ≤ p ≤ q ≤ 1} atoms of a set. If X ∈ V (A) is a set with atoms then by its (A) = { ∈ set-wise stabiliser we shall mean the set: Aut X π Observe that the group Aut(A)(A0) is actually the group Aut(A): π •X = X }; and by its point-wise stabiliser the set: of automorphism of structure A extended with constants (A) = { ∈ (A) ∀ • = } = Aut (X ) π Aut : x ∈X π x x . Moreover, for A0, i.e.: Aut(A)(A0) Aut(A ⊔ A0). Then a set X ∈ V (A) every X , these sets inherit a group structure from Aut(A). is symmetric if and only if there is a finite A0 ∈ A such that There is an important sub-hierarchy of the cumulative hi- Aut(A ⊔ A0) ⊆ Aut(A)X and the canonical action of topo- erarchy of sets with atoms A, which consists of “symmetric logical group Aut(A ⊔ A0) on discrete set X is continuous. sets” only. To define this hierarchy, we have to equip Aut(A) A symmetric set is called A0-equivariant (or equivariant in with a structure of a topological group. case A0 = ∅) if Aut(A ⊔ A0) ⊆ Aut(A)X . Therefore, the (non-full) subcategory of ZFA(A) on A -equivariant sets Definition 2.2 (Symmetric set). A set X ∈ V (A) is symmet- 0 and A -equivariant functions is equivalent to the category ric if the set-wise stabilisers of all of its descendants Y is an 0 Cont( (A ⊔ )) ⊆ SetAut(A⊔A0) open set (an open subgroup of Aut(A)), i.e. for every Y ∈∗ X Aut A0 of continuous actions of ∗ the topological group Aut(A ⊔ A0) on discrete sets. we have that: Aut(A)Y is open in Aut(A), where ∈ is the reflexive-transitive closure of the membership relation ∈. Example 2.3 (Equivariant sets). In the basic Fraenkel-Mostowski Of a special interest is the topology on Aut(A) inherited model: from the product topology on AA. We shall call this topol- • all sets without atoms are equivariant ogy the canonical topology on Aut(A). In this topology, a • all finite subsets N0 ⊆ N are N0-equivariant subgroup H of Aut(A) is open if there is a finite A0 ⊆ A • all finite subsets N0 ⊆ N are (N \ N0)-equivariant H H • × , (2), K( ), P ( ) such that: Aut(A)(A0) ⊆ , i.e.: group contains a point- N N N N S N are equivariant wise stabiliser of some finite set of atoms. Definition2.4 (Definable set). We shall say that an A0-equivariant Definition 2.3 (Sets with atoms). The sub-hierarchy ofV (A) set X ∈ ZFA(A) is definable if its canonical action has only ∃ = that consists of symmetric sets according to the canonical topol- finitely many orbits, i.e. if the relation x ≡ y ⇔ π ∈Aut(A⊔A0 ) x ogy on Aut(A) will be denoted by ZFA(A). π • y has finitely many equivalence classes. 3 DRAFT, ver. 1.0, 2020 Michal R. Przybylek

For an open subgroup H of Aut(A) let us denote by Aut(A)/H homomorphism to 2 equipped with the usual Boolean the quotient set {πH: π ∈ Aut(A)}. This set carries a nat- structure. Therefore, an ideal I in B can be extended to a prime ′ ural continuous action of Aut(A), i.e. for σ, π ∈ Aut(A), ideal P iff B has a prime ideal J. In this case, hP = h J ◦ hI . we have σ • πH = (σ ◦ π)H. All transitive (i.e. single or- This means, that BPIT is equivalent to the statement that ev- bit) actions of Aut(A) on discrete sets are essentialy of this ery non-trivial has a prime ideal. We shall form (see for example Chapter III, Section 9 of [22]). There- use this characterisation in Section 3. fore, equivariant definable sets are essentially finite unions It is the result of Halpern that we use to prove that in (A)/H A of sets of the form Aut . Moreover, if structure is ω- the cumulative hierarchy V (Q) the following holds: “an X - categorical, then equivariant definable sets are the same as equivariant CSP has a solution if and only if it has an X - A sets definable in the first of extended with equivariant solution”. This may be formulated as ZFA-Axiom CSP. elimination of imaginaries [26]. Axiom 2 (ZFA-Axiom CSP). An X -equivariant CSP has an Definition 2.5 (Ramsey property). A structure A has a Ram- X -equivariant solution if and only if it has a solution. sey property if for every open subgroup H of Aut(A), every f : Aut(A)/H → {1, 2,..., k} and every finite set But, in fact, we do more. First, we reformulate ZFA-Axiom CSP C ⊆ Aut(A)/H there is π ∈ Aut(A) such that f is constant as an intrinsic property of a topos and call it Axiom CSP. on g • C, i.e. there exists 0 ≤ i ≤ k such that for all c ∈ C we Then, we show that in Boolean toposes Axiom CSP is actu- have f (π • c) = i. ally equivalent to BPIT. In particular, for every set of atoms A we have that ZFA(A) satisfies Axiom CSP if and only if The authors of [20] working in the ordered Fraenkel-Mostowskiit satisfies BPIT. This will give (1) and (2) from the abstract, ZFA model (Q), showed that an equivarian definable con- with the one caveat: equivariance is not an intrinsic prop- straint satisfaction problem has a solution if and only if it erty of ZFA(A), therefore we have to state Axiom CSP in has an equivariant definable solution. A careful inspection every Cont(Aut(A ⊔ A0)), and then by the transfer princi- of their proof shows that this result can be strengthen to ple (see [26]) recover the desired property. all equivariant sets. The proof is based their results on a A careful inspection of the proof of Halpern [13] shows recently discovered result in topological dynamic [25]. We that the crucial property of Q is that Aut(Q) has the Ramsey shall show that this advanced result is not needed at all. Be- property. This was further explored in [17] and in full de- fore that, let us recall a very old problem about the indepen- tails in [2]. Moreover, Theorem 2 of [2] states that the Ram- dence of the from other . sey property of Aut(A) is equivalent to BPIT in ZFA(A). Definition 2.6 (Ideal). Let B be a Boolean algebra. An ideal Therefore, Ramsey property of Aut(A) is also equivalent to in B is a proper subobject I ⊂ B satisfying the following con- Axiom CSP in ZFA(A). This is, however, not enough from ditions: the reason mentioned in the above: the literal translation ZFA(A) • if a,b ∈ I then a ∨ b ∈ I of BPIT to says that every symmetric ideal on a • if a ∈ I then for every b ∈ B such that b ≤ a we have symmetric Boolean algebra can be extended to a symmet- that b ∈ I ric prime ideal. This statement is weaker than: “every A0- equivariant ideal on an A0-equivariant Boolean algebra can Definition 2.7 (Prime ideal). Let I be an ideal in B. We say be extended to an A0-equivariant prime ideal”. Fortunately, that I is prime if for every b ∈ B either b ∈ I or ¬b ∈ I. inspection of the proof [2] shows that the constructed prime The Boolean Prime Ideal Theorem (BPIT) states that ev- ideal is, in fact, A0-equivariant. ery ideal in Boolean algebra can be extended to a prime ideal. In 2005 Kechris, Pestov and Todorcevic in their famous It is a routine to check that BPIT is follows from the Ax- work on topologicaldynamic [19]showed that forcountable iom of Choice [16], [15]. It was a long-standing open prob- single-sorted structures A the Ramsey property for A is lem whether the reverse implication holds as well. In 1964 equivalent to extreme amenability of Aut(A). Halpern [13] used a model of ZFA over the rational numbers Definition 2.8 (Extremely amenable group). A topological with the canonical ordering (nowadays called the ordered group G is called extremely amenable if its every action (•): G× FM model ZFA(Q)) to prove that the Axiom of Choice is not X → X on a non-empty compact Hausdorff space X has a a consequence of BPIT in set theory with atoms. That is, he fixed point. showd that in ZFA(Q) the Axiom of Choice fails badly, but Therefore, for countable single-sorted structures A BPIT BPIT holds. This result was later amplified in [14] to give the in ZFA(A) is equivalent to the extreme amenability of Aut(A). first proof that the Axiom of Choice is not a consequence of This was first observed by Andreas Blass in 2011 in [3]. Fur- BPIT in ZF (without atoms). thermore, 4.7 in [19] says that the of such Remark 2.1. An ideal I in B can be represented by a ho- structures coincides with the class of structures that arise ′ ′ momorphism hI : B→B to a Boolean algebra B , i.e. I = as the Fraisse limit of a Fraisse order class with the Ramsey −1 hI (0). A prime ideal is an ideal that can be represented by a property. 4 On amenability of constraint satisfaction problems DRAFT, ver. 1.0, 2020

Y Y Y From the perspective of effective computation in set with for idY ∈ Y there exists s ∈ X such that e (s) = idY . But, atoms, structure A have to be countable, thus the restric- eY (s) = e ◦ s, what completes the proof. tion in the above equivalence to countable structures only Definition 3.2 (Finitary relation). For sets A, B we shall call is not severe. Moreover, the Fraisse limit (over a relational K(A × B) ⊆ P(A × B) the set of finitary from A to signature) is always ω-categorical, a property crucial for the B. A finitary relation R is a partial function if the following termination of certain while-programs (see [26] for more holds: R(a,b) ∧ R(a,b′) ⊢ b = b′. We shell denote the set of discussion). finitary partial functions from A to B by BA. 3 The axiom in Boolean toposes In a Boolean topos a of a finite set is finite, there- In this section we shall work in the internal language of a fore if A and B are finite, then a finitary relation from A to Boolean topos. A reader who is not familiar with the no- B is just a relation from A to B. tion of the internal language may read the proofs as tak- Definition 3.3 (Finitary homomorphism). Let A and B be 3 ing place in ZFA minus the axiom of (e.g. ∅- two relational structures over a common signature Σ. A rela- equivariant sets with atoms). We shall be extra careful when tional homomorphism from A to B is a relation f ∈ P(A×B) defining set-theoretic concepts, such as finiteness, or a prime that preserves all relations R/k ∈ Σ, i.e.: ideal. Although, in Boolean toposes many different defini- f (a ,b )∧f (a ,b )∧...∧f (a ,b )∧R(a , a , ··· , a )⊢ R(b ,b , ··· ,b ) tions of such concepts coincide, this would not be the case 1 1 2 2 k k 1 2 k 1 2 k for non-Boolean toposes studied in the next section. A finitary homomorphism is a finitary partial function which is also a relational homomorphism. The set of all finitary ho- Definition 3.1 (Kuratowski finiteness). Let A be a set. By momorphisms from A to B will be denoted by hom(A, B). K(A) we shall mean the sub-join-semilatice of the powerset P(A) generated by singletons and the . A set A is Let us observe that there is a morphismγ0 : hom(A, B) → Kuratowski-finite if it is the top in K(A). K(A) that assigns to a finitary homomorphismh ∈ hom(V, D) its domain γ0(h) ∈ K(A)⊆ P(A). For the rest of this section we shall just write finite set for Kuratowski-finite set. The chief idea behind the above Definition 3.4 (Jointly-total homomorphisms). Let A and Σ definition is that since a non-empty finite set A can be con- B be two relational structures over a common signature . We structed from singletons by taking binary unions, we have a shall say that a set of finitary homomorphisms H ⊆ hom(A, B) certain induction principle. Let us assume that: (base of the is jointly total if every finite A0 ∈ K(A) is a subdomain of a ∃ induction) ϕ holds for singletons, and (step of the induction) finitary homomorphisms from H, i.e.: h ∈H A0 ⊆ γ0(h). whenever ϕ holds for A0 ⊆ A and A1 ⊆ A then ϕ holds for Now, we are ready to state Axiom CSP in Boolean toposes. A ∪ A , then (conclusion) ϕ holds for A. For example, we 0 1 Σ can show that the Axiom of Choice internally holds for fi- Axiom 3 (CSP). For every relational signature and a pair Σ nite sets. To see this, recall the usual reformulation of AC of structures V and D over such that D is a finite cardinal, for finite sets: every surjection e : X → Y onto a finite set Y the following are equivalent: has a section s : Y → X , i.e.: e ◦ s = idY . Let us assume that • there exists a homomorphism from V to D e : X → Y is a surjection. Then for every finite D, the func- • the set of finitary homomorphisms hom(V, D) is jointly tion eD : X D → Y D , where eD (h) = e ◦h, is also a surjection. total This can be proven by induction over D. If D is the empty In the below we shall show that Axiom CSP in Boolean set, or a singleton, then the claim clearly holds. Therefore, toposes is equivalent to Boolean prime ideal theorem (BPIT). let us assume the claim holds for finite D0, D1 and show that Let us recall the terminology first. it also holds for D0 ∪D1. Since the topos is Boolean, without B the loss of generality, we may assume that D0 and D1 are dis- Definition 3.5 (Boolean algebra). An algebra is a struc- joint. The function eD0∪D1 : X D0∪D1 → Y D0∪D1 decomposes ture hB, 1, ∧, ¬i, where 1 is a constant, ∧: B × B → B is a on disjoint eD0 : X D0 → Y D0 and eD1 : X D1 → Y D1 with binary , and ¬: B → B is an unary operation. Con- = eD0∪D1 = eD0 × eD1 . Because the of two sider relation ≤ ⊆ B × B defined as: a ≤ b ⇔ a a ∧ b. We surjections is a surjection, we may infer that eD0∪D1 is a sur- say that B is a Boolean algebra if the following holds: jection, what completes the step of the induction. Therefore, • ≤ is a partial order on B with finite joins given by ∧ and if e : X → Y is a surjection then for every finite D we have the greatest element 1 that eD : X D → Y D is a surjection. By setting D = Y , we • for every b ∈ B we have that: ¬¬b = b obtain that eY : X Y → Y Y is a surjection and so for every If B is a Boolean algebra, then 1 is its internal true value, i ∈ Y Y there exists h ∈ X Y such that eY (h) = i. In particular, and operation ∧ is the internal conjunction. Other opera- 3A set in a non-well-pointed topos may have more content than mere tions in a Boolean algebra can be defined in the usual way: elements • 0 = ¬1 for the false value 5 DRAFT, ver. 1.0, 2020 Michal R. Przybylek

• a ∨ b = ¬(¬a ∧ ¬b) for the internal disjunction • S0 = {¬(hv, ni∧hv,mi): v ∈ V0, n ∈ D,m ∈ D, n , m} • a ⊕ b = (a ∧ b)∨(¬a ∧ ¬b) • C0 = {¬(hx1,d1i ∧ hx2,d2i∧···∧hxn,dni): xi ∈ V , RV (x , x ,..., x ) ∧ ¬RD (d ,d ,...,d )} Axiom 4 (BPIT). For every non-trivial Boolean algebra B 0 1 2 n 1 2 n there is a homomorphism B → 2 to the initial Boolean algebra Since V0 is finite, by the assumption, there exists a finitary , 2 = 1 ⊔ 1. homomorphism h0 ∈ hom(V D) with V0 ⊆ γ0(h0), which induces a valuation V0 ×D → 2. By the definition of the con- The constraint satisfaction problem is defined over rela- straints, this valuation makes P0 satisfiable. Therefore, ev- tional structures. Therefore, to fit into the framework of CSP ery finite P0 is satisfiable, and so F(Var)/≡ is non-trivial. By we should treat a Boolean algebra B as if it was defined over Axiom BPIT, there is a prime ideal u : F(Var)/≡→ 2, which a relational signature, with an unary top(x) ⇔ composed with the canonical embedding j : F(Var) → F(Var)/≡ x = 1, ternary predicate and(x,y, z)⇔ x ∧y = z and binary gives a prime ideal h = u ◦ j on F(Var). By the definition = predicate not(x,y) ⇔ ¬x y. The axioms should express h maps from P to 1. Consider the restriction that there exists unique x that satisfy top and that and and h : V × D → 2 of h to variables Var = V × D. By proposi- not are functional relations. tions T valuation h is total and by propositions S it is single- Theorem 3.1 (Axiom CSP implies BPIT). Axiom CSP im- valued. Moreover, by propositions C the valuation dos not plies BPIT in Boolean toposes. violate any constraints. Therefore, h is a homomorphism from V to D.  Proof. Let B be a Boolean algebra. By Axiom CSP, it suffices to show that the set of finitary homomorphisms hom(B, 2) 3.1 Characterisation is jointly total, i.e. for every finite B0 in K(B) there exists a This subsection states our main characterisation theorems. partial homomorphism B0 ⊆ B1 → 2. We can assume that We shall begin with a simple purely-logical proof that ZFA- B1 is closed under Boolean-algebra operations and still finite. Axiom CSP holds in the ordered Fraenkel-Mostowski model The reason for that is that if B0 is finite then in a Boolean of set theory with atoms. Observe, that we rely only on the topos P(B0) is finite as well (it coincides with K(B0)). Be- old combinatorial result of Halpern [13]. cause we have shown that the AC holds for finite sets, the standard proof of Zorn’s Lemma can be carried over to our Theorem 3.3 (ZFA-Axiom CSP in ZFA(Q)). ZFA-Axiom CSP ZFA(Q) setting to show that B1 has a maximal ideal, therefore (using holds in .  again Boolean logic of the topos) B1 has a prime ideal. Proof. A careful inspection of the proof of Halpern [13] shows ZFA Theorem 3.2 (BPIT implies Axiom CSP). Axiom BPIT im- that if a Boolean algebra B in (Q) is X -equivariant than plies Axiom CSP in Boolean toposes. it has an X -equivariant prime ideal. Therefore, BPIT holds in Cont(Aut(Q ⊔ X)). By Theorem 3.2, Axiom CSP holds Proof. Let us assume that V and D are structures over rela- in Cont(Aut(Q ⊔ X)). Therefore, ZFA-Axiom CSP holds in tional signature Σ. Furthermore, assume that D = {0, 1,..., D− ZFA(Q).  1} is a finite cardinal and the set of finitary homomorphisms hom(V, D) is jointly total. We shall treat Var = V × D as The proof of the next theorem is similar. a set of propositional variables. Consider the following sub- Theorem 3.4 (ZFA-Axiom CSP in ZFA(A)). Let A be a sets of propositions F(Var), where F(Var) is treated as the countable structure. ZFA-Axiom CSP holds in ZFA(A) if and free Boolean algebra on Var: only if the automorphism group of A is extremely amenable. • T = {hv, 0i ∨ hv, 1i∨···∨hv, D − 1i : v ∈ V } Proof. A careful inspection of Theorem 2 of [2] states that • S = {¬(hv, ni ∧ hv,mi): v ∈ V , n ∈ D,m ∈ D, n , m} the Ramsey property of A is equivalent to the property that • C = {¬(hx ,d i∧hx ,d i∧···∧hx ,d i): RV (x , x ,..., x )∧ 1 1 2 2 n n 1 2 n every X -equivariant Boolean algebra B in ZFA(A) has an ¬RD (d ,d ,...,d )} 1 2 n X -equivariant prime ideal. Therefore, Ramsey property of Consider the following set of propositions: P = T ∪ S ∪ C. A is also equivalent to ZFA-Axiom CSP in ZFA(A). And Let us say that two propositions ϕ,ψ from F(Var) are equiv- by the result of Kechris, Pestov and Todorcevic [19], ZFA- alent if there is a finite P0 ⊂ P such that every valuation Axiom CSP in ZFA(A) is equivalent to extreme amenability V0 × D → 2 satisfying P0 satisfies ϕ ⊕ ψ . Then F(Var) di- of the automorphism group of A.  vided by this equivalence relation is again a Boolean algebra F(Var)/≡ with the usual operations. We want to show that We shall now consider a weaker versions of Axiom CSP F(Var)/≡ is non-trivial, i.e. 0 , 1. Because every finite sub- and show that in continuous sets over a localic group it is equivalent to Axiom CSP. set P0 ∈ P involves only finitely many variables Var0 ⊆ Var, = the set V0 γ0(Var0) ⊆ V is finite. In fact, P0 can be rewrit- Definition 3.6 (Compact object). An object X of a cocom- ten as the union of: plete category C is called compact if its co-representation homC(X, −): C → Set • T0 = {hv, 0i ∨ hv, 1i∨···∨hv, D − 1i : v ∈ V0} preserves filtered colimits of monomorphisms. 6 On amenability of constraint satisfaction problems DRAFT, ver. 1.0, 2020

Axiom 5 (Compact CSP). For every relational signature Σ of Boolean algebra, ideal and prime ideal move smoothly to and a pair of structures V and D over Σ such that D is a finite the intuitionistic setting with one caveat: not every maximal cardinal and V is compact, the following are equivalent: ideal in a Boolean algebra has to be prime. • there exists a homomorphism from V to D On the other hand, Axiom CSP is much more difficult to • the set of finitary homomorphisms hom(V, D) is jointly handle in the intuitionistic setting. Actually, we have sev- total eral different variants of Axiom CSP depending on our inter- pretation of “finiteness” and admissible relational structures. An object A in Cont(G) can be regarded as a relational Therefore, we should not expect that Axiom CSP is equiv- structure hA, (T ) Gi, whereT (a,b)⇔ g◦a = b is a binary g g ∈ g alent to BPIT in constructive mathematics, because BPIT relation on A. Then a function f : A → B is a homomor- does not involve any notion of finiteness and there is not phism f : hA, (T ) Gi → hB, (T ) Gi iff it is equivariant. g g ∈ g g ∈ much concern about admissibility of Boolean algebra oper- Theorem 3.5 (Compact CSP implies Axiom CSP in contin- ations (however, we could take this into account). In general, uous sets). Let G be a localic group and Cont(G) be the topos the stronger the notion of “finiteness” and “admissibility” is, of its continuous actions on Set. Then Compact CSP holds in the stronger Axiom CSP we obtain. Cont(G) iff Axiom CSP holds in Cont(G). Let us discuss some possible definitions for an admissible Proof. An object A in Cont(G) can be represented as a dis- structure A: G joint union of its orbits Ax ∈ A/ . By the definition of com- 1. Only complemented relations R are admissible. That G pactness for every finite set of orbits F ⊆ A/ the object is, subobjects s : R → Ak such that there exists a sub- Ð F is compact. object ¬s : R → Ak with the property that s ∪ ¬s = Let us assume that every finite subset of A has a solution, = idAk and s ∪ ¬s 0. by Axiom CSP for compact objects every Ð F has an equi- ∆ → × ′ 2. A is decidable. That is, the sobobject : A A A variant solution. Moreover, if F ⊂ F then every equivari- that correspond to the equality predicate is comple- ant solution of F can be restricted to an equivariant solu- mented. Because, we assume that equality is always ′ Cont G tion of F . Observe that A ∈ ( ) can be regarded as presented in the signature, decidability of A is sub- a classical structure over a signature extended by relations sumed by the previous point. , = Set Tg (a b) ⇔ a ◦ g b. Then by Axiom CSP for , the 3. All relations are admissible. classical structure over this extended signature has a solu- tion. But, by definition of Tg , such solution must be equi- In the next subsections we discuss Axiom CSP with re- variant.  spect to two internal notions of “finiteness”: Kuratowski finite- ness from Definition 3.1 and Kuratowski subfiniteness (i.e. be- We can summarize the above characterisations in the next ing a subobject of a Kuratowski finite object). theorem. A Theorem 3.6 (Characterisation theorem). Let be a count- 4.1 Kuratowski finiteness is too strong able structure. Then the following are equivalent: Consider Sierpienski topos Set•→•. It is a routine to check 1. A is the Fraisse limit of a Fraisse order class with the that BPIT holds in Set•→•, but Axiom CSP does not hold Ramsey property even in case “finiteness” is interpreted as Kuratowski finite- 2. Aut(A) is extremely amenable ness and only complemented relations R are admissible. For 3. ZFA-Axiom CSP holds in ZFA(A) a counterexample consider structures from Figure 3. The 4. Axiom DEF-CSP holds in ZFA(A) structure on the right side is the terminal object 1 equipped 5. Axiom CSP holds in ZFA(A) with the empty unary relation 0 → 1. The structure on the 6. Axiom CSP holds in Cont(Aut(A ⊔ A0)) for every finite 1 left side is the only non-trivial subobject 2 of 1 equipped A0 ⊂ A 1 id 1 with the full unary relation 2 → 2 . There is a unique mor- Proof. (1)⇔(2) is Proposition 4.7 in [19]. (2)⇔(3) is the 1 ( )⇔( ) phism ! from 2 to 1, but it is not a homomorphism, since it subject of Theorem 3.4. 3 4 is the consequence of 1 does not preserve the unary relation, i.e. ! ◦ id 1 = , 0. On Theorem 3.5. (3)⇐(5) is trivial, and (2)⇒(5) follows 2 2 1 from Theorem 3.1 and the main theorem of [3]. (3)⇔(6) is the other hand, the only Kuratowski finite subobject of 2 is trivial.  0 and the object of homomorphisms hom(0, 1) is isomorphic to 1. 4 The case of non-Boolean toposes This example shows that Axiom CSP with Kuratowski When we move to non-Boolean toposes, we have to be ex- finiteness is too strong to be provable from BPIT, and too tra careful when stating classical definitions and axioms, be- strong in general. If we weaken Axiom CSP by weakening cause in constructive mathematics classically equivalent state- the notion of finiteness to Kuratowski subfiniteness then ments may be far different. Fortunately for us, the concept Axiom CSP will hold even if all relations are admissible. The 7 DRAFT, ver. 1.0, 2020 Michal R. Przybylek

implication in either of the directions. It is an interesting ∅ {∗} O question which positive-existential theories have classify-   ing toposes validating Axiom CSP; or more generally, in {∗} {∗} which Grothendieck toposes does Axiom CSP hold. Finally, we reversed the main result of [20] by showing that Ax- ZFA(A) (A) Figure 3. Axiom CSP fails in Set•→• for Kuratowski finite- iom DEF-CSP holds in if and only if Aut is ex- ness. The structures are equipped with a single unary rela- tremely amenable. tion that holds on blue elements only. Acknowledgments <,= =, < This research was supported by the National Science Centre, ❣❣3 ⊤, ⊥ ❲❲❲❲ , ❣❣ + , ⊥ ⊥ ❲❲❲❲ ❣❣❣3 ⊤ ⊤ Poland, under projects 2018/28/C/ST6/00417. =, < + , ❣<,= ⊥ ⊤ ❏ π1 ♣♣ ❏❏❏❏π2 ♣♣♣ ❏❏❏❏❏ t| ♣♣ ( References ⊥< / ⊤ ⊥< / ⊤ [1] Cyril Allignol, Nicolas Barnier, Pierre Flener, and Justin Pearson. 2012. Constraint programming for air traffic management: a survey 1: In Figure 4. An example of a non-trivial finite Boolean algebra memory of pascal brisset. The Knowledge Engineering Review 27, 3 in Set•←•→• that has no prime ideal. (2012), 361–392. [2] Andreas Blass. 1986. Prime ideals yield almost maximal ideals. Fun- damenta Math. 127 (1986), 57–66. reason is that a structure X : A→B in Set•→• can be en- [3] Andreas Blass. 2011. Partitions and permutation groups. Model The- Set oretic Methods in Finite Combinatorics 558 (2011), 453–466. coded as a structure A⊔B in with one additional rela- [4] Manuel Bodirsky. 2008. Constraint satisfaction problems with infinite tion encoding the graph of function X , i.e. R(x,y)⇔ X (x) = templates. In Complexity of Constraints. Springer, 196–228. y and one unary relation to distinguish domain from the [5] Manuel Bodirsky and Hubie Chen. 2007. Qualitative temporal and , i.e. S(x,y) = A × A ⊔ B × B. Then for every finite spatial reasoning revisited. In International Workshop on Computer Sci- substructure A ⊔ B of A⊔B there is a finite substructure ence Logic. Springer, 194–207. 0 0 [6] Manuel Bodirsky and Jaroslav Nešetřil. 2006. Constraint satisfaction A0 ⊔ B0 ⊂ A1 ⊔ B1 ⊆A⊔B corresponding to a Kuratowski with countable homogeneous templates. Journal of Logic and Compu- subfinite substructure of X. Therefore, Axiom CSP holds in tation 16, 3 (2006), 359–373. Set•→• by the Axiom CSP in Set. [7] Manuel Bodirsky, Michael Pinsker, and Todor Tsankov. 2013. Decid- ability of definability. The Journal of Symbolic Logic 78, 4 (2013), 1036– 4.2 Kuratowski subfiniteness is too weak 1054. Set•←•→• [8] Edmund Clarke, Muralidhar Talupur, Helmut Veith, and Dong Wang. Consider topos . Figure 4 shows an example of a 2003. SAT based predicate abstraction for hardware verification. In Boolean algebra, which does not have a prime ideal. More- International Conference on Theory and Applications of Satisfiability over, this example explicitly shows why we cannot carry Testing. Springer, 78–92. over our proof of Theorem 3.1 to constructive mathematics [9] Minh Binh Do and Subbarao Kambhampati. 2001. Planning as con- — the Boolean algebra under consideration is Kuratowski fi- straint satisfaction: Solving the planning graph by compiling it into Set•←•→• CSP. Artificial Intelligence 132, 2 (2001), 151–182. nite, what means that in not every finite Boolean [10] Mark S. Fox and Norman Sadeh-Koniecpol. 1990. Why is Schedul- algebra has a prime ideal. On the other hand, Axiom CSP ing Difficult? A CSP Perspective. In Proceedings of the Ninth European with Kuratowski finite subobjects fails and with Kuratowski Conference on Artificial Intelligence address: Stockholm Sweden month: subfinite subobjects holds for the same reasons as in the August. 754–767. Sierpienski topos Set•→•. Therefore, example from Figure 4 [11] Arnaud Gotlieb. 2012. TCAS software verification using constraint programming. The Knowledge Engineering Review 27, 3 (2012), 343– shows that Axiom CSP with Kuratowski subfiniteness is too 360. weak to prove BPIT. [12] Lorenz J Halbeisen. 2017. Combinatorial Set Theory: With a Gentle Introduction to Forcing. Springer. 5 Conclusions and further work [13] James D Halpern. 1964. The independence of the axiom of choice from the Boolean prime ideal theorem. Fund. Math 55 (1964), 57–66. In this paper we have given a simple purely-logical proof of [14] James D Halpern and Azriel Lévy. 1971. The Boolean prime ideal ZFA-Axiom CSP in the ordered Fraenkel-Mostowski model theorem does not imply the axiom of choice. In Axiomatic set theory, without using any advanced results from topology and model Vol. 13. Proceedings of Symposia in Pure Mathematics, 83–134. theory. Moreover, we have introduces an intrinsic charac- [15] Paul Howard and Jean E Rubin. 1998. Consequences of the Axiom of Choice. Vol. 59. American Mathematical Soc. terisation of the statement “definable CSP has a solution [16] T.J. Jech. 2008. The Axiom of Choice. Dover Publications. iff it has a definable solution” and investigate it in general [17] Peter Johnstone. 1984. Almost maximal ideals. Fundamenta Mathe- toposes. It turns out that in Boolean toposes this axiom is maticae 123 (1984), 197–209. equivalent to Boolean prime ideal theorem, whereas in in- [18] Michael Kaminski and Nissim Francez. 1994. Finite-memory au- tuitionistic toposes there is no such an equivalence, nor an tomata. Theoretical 134, 2 (1994), 329–363. 8 On amenability of constraint satisfaction problems DRAFT, ver. 1.0, 2020

[19] 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. [20] Bartek Klin, Eryk Kopczynski, Joanna Ochremiak, and Szymon Torunczyk. 2015. Locally Finite Constraint Satisfaction Prob- lems. In 30th Annual ACM/IEEE Symposium on Logic in Com- puter Science, LICS 2015, Kyoto, Japan, July 6-10, 2015. 475–486. hps://doi.org/10.1109/LICS.2015.51 [21] Bartek Klin, Slawomir Lasota, Joanna Ochremiak, and Szymon Torunczyk. 2016. Homomorphism Problems for First-Order De- finable Structures. In 36th IARCS Annual Conference on Foun- dations of Software Technology and Theoretical Computer Science, FSTTCS 2016, December 13-15, 2016, Chennai, India. 14:1–14:15. hps://doi.org/10.4230/LIPIcs.FSTTCS.2016.14 [22] Saunders MacLane and Ieke Moerdijk. 2012. Sheaves in geometry and logic: A first introduction to topos theory. Springer Science & Business Media. [23] Andrzej Mostowski. 1939. Über die Unabhangigkeit des Wohlord- nungssatzes vom Ordnungsprinzip. (1939). [24] Joanna Ochremiak. 2016. Extended constraint satisfaction problems. Ph.D. Dissertation. [25] Vladimir Pestov. 1998. On free actions, minimal flows, and a problem by Ellis. Trans. Amer. Math. Soc. 350, 10 (1998), 4149–4165. [26] Michal R. Przybylek. 2020. Beyond sets with atoms: definability in first order logic. In https://arxiv.org/abs/2003.04803. [27] Jochen Renz and Bernhard Nebel. 2007. Qualitative spatial reasoning using constraint calculi. In Handbook of spatial . Springer, 161– 215. [28] Francesca Rossi, Peter Van Beek, and Toby Walsh. 2006. Handbook of constraint programming. Elsevier.

9