 Okay, so let me first recall some of the things we saw yesterday. So the first result I presented yesterday was that the small model property in for for two variable fragment of first of the logic. In fact, in our construction, we started from an arbitrary model of a formula phi and constructed a new model, whose domain was a subset of the domain of the original model. The one types of elements were retained from the original model and the only only some two types have been exchanged. It's modified. So in fact, this construction guarantees also some some additional properties that the set of one types realized in both structures unidentical. All the types which are realized in the original structure are also realized in this new small model and each non-royal type recall that the type is royal if it is realized in a structure exactly once. So each non-royal type from from the original structure is realized in this new structure at least twice. So this was the first the first property we obtained yesterday. Another simple result about two variable logic, which will be useful today. It's a very simple thing that if we have an arbitrary model of a formula phi, then we and we take an arbitrary non-royal one type realized in this model, then we can add additional copy of this one type to the model. So this is the second result from yesterday and result. Very simple observation in fact. And then we considered two variable guarded fragment with equivalence relations in guards. Let me recall the normal form of the formulas which we are interested in. So we may say that there exists an element satisfying something. We may impose restrictions on connections between pairs of connected elements. So we may say that for all x, y, if they are connected either by an equivalence relation, which is which equivalence relations are denoted by E i or by a relation which is not required to be equivalence. Such relations are denoted by R i or similarly. So for connected elements we may impose some additional restrictions on connections between them. And there are formulas which would say that some elements satisfying some atomic properties require the so-called witnesses. Yes, for all x, if x satisfies some atomic formula, then there exists y connected to this x either by E i or equivalence relation or non-equivalence relation. And this connection should satisfy some properties, yes? In my today's talk, yesterday we considered the general satisfiability problem for two variable guarded fragment of equivalence guards. Today we will consider the finite satisfiability problem. And to simplify the presentation, I will not consider the these two types of contracts. It has those contracts which may require witnesses connected not necessarily equivalently, yes, to an element. So in fact what we can say, we can only say about require witnesses inside equivalence classes. This simplification is not crucial. It is very easy to add these two types of contracts. It will be just left as an exercise. One another thing is notation I sometimes use by phi phi with superscript ek. I denote the fragment of this formula which is related to, which imposes something on something in equivalence classes of the relation ek, yes? So it contains all the formulas which have ek as guards plus those universal formulas guarded by non-equivalence relations because they also may restrict, they also may have influence on the shape of E 1 class, yes, because in this E i class, sorry, E k class, because in this E k class, of course, we may have another binary connections. One important restriction on our language is that we allow these equivalence relations only as guards, yes? So this is why we call this variant with equivalence guards. So E i relations cannot appear in these formulas psi. But in the formulas psi, we may have additional realizations of, additional, we may use those non-equivalence symbols. Another thing we observed yesterday is that in fact there is a close relation between models for formulas for two variable logic and equivalence classes in models for formulas of two variable guarded fragment of equivalence guards, yes? In a single equivalence class in a model of GF 2 plus E g formula, we may we may do everything we do in the first of the logic, yes? For example, if you have a, in first of the logic with two variables, if we have a two variable formula, not necessarily guarded, then, and if we translate it to the guarded fragment by using a dummy equivalence guard, say E 1, yes, E 1 is a symbol which which is not a member of the signature of this formula. And simply we add this, we add guards to this quantifiers here, then we obtain formula whose equivalence classes have to be models of this formula. So this, there is a close relationship between these two things. And what we do yesterday, for general satisfiability, we started from an arbitrary model of GF 2 plus E g formula, and unraveled it into a three-like way providing, starting from some element and then providing classes for this element in such a way that any pair of elements is connected in this three-like model at most by one equivalence relation. This is the place where we use this restriction on, on the usage of equivalence symbols, yes, they can be, they can appear only in guards. So we can do such things. We can unravel the unravel the model, then we can, we can make the classes exponentially bounded and we can make this model regular. Yes, so and this, this, this implies that there is a simple, a simple decision procedure for, for this problem working in non-deterministic exponential time. Okay, so today I, I will talk about the finite satisfiability problem. As you see, starting from an arbitrary model, even finite, we usually, we usually end in, in, in an infinite model. Yes, so such, such approach is not very promising here. And instead of three unravelings, we will, we will describe the properties of models by using systems of equivalence, systems of linear equations. Let, let me first show you that there are some differences in, in this satisfiability and finite satisfiability problems. For example, in the case of satisfiability, general satisfiability, we obtained a property that every satisfiable formula has a model with exponentially bounded classes. Yes. So, so this property cannot be obtained in the case of finite models. A very simple example here will construct a formula delta n of land polynomial in n, such that it's every model will, will contain a full binary tree of depth to the n. And then we say, we will say that all leaves of the, of the, of these three are members of the same class. The number of leaves will be double exponential. So, so it will imply that there exists a double exponential class. Okay, so, so the models will look like this. We'll have an element, we say that there exists an element satisfying unary predicate, unary relation root. And for each, and, and, and we would think that each of the elements encodes one binary number from, from the set 0 up to 2 to the n minus 1. And such, such numbers can be encoded, encoded in an usual way using n unary predicates. And I explained yesterday that we can count up to 2 to the n. We can say that a pair of elements encodes numbers which differ by 1. So we may say that for every element from an even level of the tree, there are two elements on the next level connected to, to this element by ret relation, e1 relation. One of them is in L, one in not in L to, to have, to, to ensure that there are really two, two such elements. And from odd levels, we require two elements connected by blue relation, relation e2. And we want to enforce that models really are really complete binary trees. Yes, so we have to ensure that there is no such situation that two elements from the same level say this grey element and this grey element use the same element on the next level as, as, as the witnesses, for example, this one. And to do this, we say that elements from say even level, like even level, this is 0, 1, 2. So for example, from the second level that there are not two elements on this level which are connected by ret relation. Yes, such reusing of a witness would, would cause that because of transitivity of the ret relation that the two elements, the grey elements would become related by this ret relation. So we simply say that if there are two elements related by ret relation, e1, and they belong to an even level. To check if a level is even or odd, we just look at least significant bit, then they are really the same element. Yes, they cannot be distinct. So this ensures that we have really a complete binary tree. And then we, we have to say that all, all leaves of this tree are related by, by, by this blue relation here. We cannot say directly, yes, for all elements if x, x, y, if x is a leaf and y is a leaf, then connect them by blue relation because this formula would not be guarded. Yes, but we can for example say that each, each leaf is connected by a blue relation to a root. We have 2 to the, 2 to the, 2 to the n leaves. Unfortunately, we cannot enforce in, in the guarded fragment there is exactly one root, yes, because it is, it is impossible. We always take, always in the guarded fragment can take another copy of the same model and this is, this is a model. So the situation in, in models may be like this, that we have several roots, each of them with a complete, with its complete binary tree. And some of the leaves connect to the first root, some of the leaves connect to the second root. But of course we always have, have a ratio one root per 2 to the 2 to the n leaves. So at least one of the classes must be of size at least that the exponential. Of course if we, if we allow for infinite models then we can, then we can, and then we can always construct classes exponentially bounded. Since we simply, instead of taking this root we can construct a new one and go on. But in finite models we can enforce doubly exponentially bounded classes. So what, in the, in the remaining part of the talk I will use a notion of accounting type. And accounting type, the purpose of accounting type is to count the number of realizations of one type in equivalence classes. So formally accounting type is a function from the set of one types over the signature of, of a formula phi, of the formula phi we consider. And this function returns natural numbers. And we usually, we think in, we think about this in this way that if we have a class C and say EI class C, equivalence class C in, in a model A, then its counting time simply says for, for a given one type its counting time says how many times this type is realized in this class. How many elements of this one type we have in this class. We will say that accounting type is admissible for EI classes with respect to this, to this formula phi. If there exists an EI class C of realizing exactly this counting type which satisfies this part of the formula related to EI. So in other words accounting type is admissible for, for EI classes. If we can build EI classes which from local point of view are allowed to appear in models of, of phi. And the admissibility of accounting type is a simple property. We can simply, for, for a given counting type we simply guess the structure and perform model checking. So this is an, it is not, not hard to check if, if accounting type is admissible. So to explain my approach I will first show you a very simple, very simple idea. So in, in a simplified case. So the simplified case is that we assume that we have a bounded number of admissible counting types. This may not be true in general is because in these counting types we do not know a bound on, on, on the values which are values of this function. Yes, so potentially we may have infinitely many admissible counting types. But let us assume that there is only some bounded number of them. For example, we may assume that we are interested in satisfiability in models with exponentially bounded classes. Then, then the number of counting types will be bounded doubly exponentially. Yes, if we have exponentially many possible exponentially many elements then the values of this function are all values of, of the functions which are counting types are also exponentially bounded. So that there may, there may be at most doubly exponentially many such classes. And so, and we construct, we construct a system of equations for each counting type which is admissible for EI class. We introduce a variable, an unknown. So we have unknowns for EI, E1 classes, unknowns for E2 classes, for, for types of E1 classes, for types of E2 classes and so on. And what we say by our equations, we only say an obvious thing which, which has to be satisfied in every model. That each one, for each one type, T, and each equivalence relation EI, EJ, there is, this type is realized exactly the same number of times in E1 classes and in E2 classes. This is an obvious thing because every element is a member of an E1 class, is a member of E2 class, EI, EI, EJ in general. So this is the obvious, obvious thing which should be satisfied in the model. And we claim that this is, this condition is, that this is if and only if. So we, we claim that phi has a model if and only if the constructed system of equations has a non-negative integer solution. Okay, let me show you an example. Assume that we have one possible, we have two, two equivalence relations. E1, red and E2 blue. And there are three possible admissible counting types for E1 classes. One with yellow and, and one yellow and one green. One type blue and red. One just a singleton class with green relation. And admissible, and there is only one admissible type for blue classes with red, blue, two yellow and two green elements. So what our system of equations says, it simply says that from the point of view of red one types, the number of realizations of x in the model should be equal to the number of realizations of b. Because these are the only, only types which, in which red element appear. Similar equation is obtained from the, if we write an equation from the point of view of blue one type. From the point of view of yellow one type, we see that every realization of x requires two realizations of a. Yes, because we have two, two yellow types in, in this x type of class. And from the point of view of green elements, of green elements, every realization of x requires two classes with green elements, so it may be a or c. So this is why we say two x is equal to a, a plus c. And obviously, if there is a model using this admissible counting types, then this model has to satisfy, then this system of equation has a solution. In the opposite direction, consider an arbitrary solution. For example, we may say, we may take the solution with one realization of x, two realizations of a is equal to two, b is equal to one and c is equal to zero. This is a solution to the system. And now let us see that we can construct a model with exactly this, with exactly such types of classes, but not with exactly this number of realizations of these classes. Sometimes, for example, this solution suggests exactly one realization of this, this blue class, blue type of, this type of blue class. However, there are some red classes with two elements. In, in, in our language, we may enforce that, we may have formulas which enforce that every pair of classes, blue class and the red class, have at most one element in common. In fact, we obtained this property in our construction yesterday, but this property can be, can be enforced. For example, we may say that every pair of elements which is connected by blue relation is also connected by an auxiliary symbol b, which is not required to be equivalent. And similarly, every pair of elements which is connected by red relation satisfies, is not connected by b, yes? Then we cannot intersect two classes in more than one element, yes? But then because, because then this, this pair of elements should be connected by b and not connected by b simultaneous. So in this case, it may happen that we, we won't be able to construct a model with just one equivalence class of this type, yes? Because this class requires two, may require two, two different classes of type x. But what can we do? What, what, what we are sure after when we have the, the solution of this system? We may con, let us define the notion of the base set for this solution, the base set of elements. The base set of elements contains as many elements of particular one types as is suggested by the solution. So the solution suggests that there will be one class of type x. So in the base set and no, no other blue classes, yes? So in the suggested set of one types is one red, one blue, two yellow and two green, yes? Similarly, we may, we may do it from the point of view of red classes. The suggested solution is a is equal to two, b is equal to one, c is equal to zero. So we will have two green elements because a is equal to two yellow elements, four, no, sorry. No, two green, two yellow, one red, one, one blue, yes? Because b is equal to one. Of course, the base sets computed using solutions for blue classes and red classes have to be equal, yes? Because we constructed our system in such a way. And what we know about this base set, the solution of the system guarantees that this base set can be divided into proper, into admissible, E1 classes and into admissible E2 classes independently, yes? So what we do, we simply take some number of copies, it's six copies in this case. We have six elements in this set, so we take six copies and we arrange them into, in a grid in this case. In such a way that every column of this grid and every horizontal line in this grid, every row in this grid is a copy of this base set. Such an arrangement can be easily obtained just by starting from the first column and putting this base set in an arbitrary order and then just shifting the picture one row down, yes? And now we can divide columns into blue classes and rows into one classes, exactly as suggested by this solution, yes? So after this construction, every element has two admissible classes constructed, yes? Blue and red, so everything is okay. Remember that for simplicity I removed those formulas which require non-equivalent witnesses. This approach, of course, can be easily generalized if we have more than two equivalence relations than we simply construct multidimensional grids in this way. Okay, so this is the idea and the problem is that we do not know a bound on the number of counting times. This may be infinite, so in particular we would have infinitely many variables, yes? So it would be a problem. Instead of this, we will use some approximations of these counting types. And before I define this approximation, let me first just formalize one lemma which we will use. So we say that a counting type safely extends another counting type. If it preserves the number of one types which are realized, zero on one types in this realization, which are suggested by this type, yes? So if theta of t is equal to zero or one, then theta prime is also equal to zero or one. If theta of t is greater than one, then theta prime of t is simply greater or equal to theta of t. Of course, this definition has a close connection to the notion of these royal types in models of F2 formulas, yes? Simply that if we have a class of type theta, then we can safely extend it to a class of type theta prime, which still from a local point of view is proper class for the given formula. And this recall lemma 10 is this lemma about adding single realizations of non-royal types to F2 classes. And this is just a simple application of this lemma, yes? If we have a class, C is just a model which is an equivalence class of EI. It satisfies this fragment of the formula related to EI. Then if we take a counting type, theta prime which extends the counting type of C, then we can construct a model of this formula for EI which has exactly time theta prime. By adding the required elements as many times as required. So this is one thing. And another thing is the notion of M counting type. So instead of using exact counting type, we will use some approximations. We will count up to some M. M counting type, M is a parameter, is a function of the type from the set of one types to the set 01 up to M. And the interpretation is that if theta of t is equal to M, then it means that in a class there is at least M elements of type t. M minus 1, M minus 2, 1 and 0 means exactly M means at least. Now lemma 4 is this small model construction for FL2 formula. And using this construction, we may prove that there exists M exponentially bounded in the length of the formula. Such that if we have a class admissible for EI classes, a class satisfying phi of phi with superscript EI, and its M counting type is theta, then there exists a class C prime which has exact time equal to this theta. So if there is M realizations, at least M realizations, then in this new structure there will be exactly M realizations. And this is the same construction as in this lemma 4. Okay, so these are two auxiliary lemmas. And now how we construct the system of inequalities. So we introduce variables this time for M counting types, which are admissible for EI. So again we check if there is a class with exact counting type. We give an exact counting type like this with at most M realizations of every one type. What is the number of these M counting types? It is doubly exponential in the size of the formula phi as we observe later because we consider this situation. What will be our procedure? We will guess the set of one types which will be realized in the model of the given formula phi and write some inequalities. There will be two kinds of inequalities. The first kind of inequalities are just inequalities which ensure that elements of these quest one types will appear in the model. And the second kind of inequalities will say something about royal types. So now let us redefine this notion royal. We say that one type T is royal for EI classes with respect to the formula phi, of course. If every counting type admissible for EI has at most one realization of this type. So such a royal type, a type is royal for EI classes which if a type is royal for EI classes say, then we probably won't be able to add additional realizations of this type to the given class. And what kind of equations we write if T is royal for EI classes, then for every other equivalence relation we write inequality which say that T is realized in suggested by M counting types for EI classes at most as many times as for EJ classes. Okay, this may be unclear, I suppose so let us look at an example. Assume again, assume that we have two admissible M counting types. So this means that in our model we allow for such classes and this classes may be further extended by, this class may be extended by yellow elements, this may be extended by green elements. This one in fact also can be extended by yellow elements but green elements and yellow elements because we know a pattern which allows to connect to yellow element inside a class. And we have three admissible M counting types for red classes and what we say in our system of equations. So from the point of view of red element, red element is royal for both blue classes and red classes. In each class it appears at least at most once. So what we say we want to guarantee that the number of realizations of, oh, the definition from the previous slide implies that we should construct two inequalities which will produce such an equality. If we realize such a type then we have to realize type A. So X plus Y should be equal to A. From the point of view of blue elements, yellow elements of course, yellow elements are royal only for E2 classes. Oh sorry, for red classes it should be E1. For red classes because in each such red class there is at most one realization of yellow element. For blue classes, yellow is not royal because we have a class admissible type of class with two yellow elements. So this is the second kind of inequalities. The first kind of inequalities are those inequalities which say that our three one types, assume that we guess that there will be these three one types in the model and we ensure that they will be in a model. So we say that X plus Y is greater or equal to one. X plus Y is greater or equal to one and X plus Y is greater or equal to one. This ensures that in blue classes we will have red, yellow and green and the same we do for red classes. An example solution is one, X is equal to one, Y is equal to one, A is equal to two, B is four and C is zero. Now how to construct a model? Again we will define the base set for this solution. But this time the base set will be defined in a slightly more complicated way, namely how many elements of red type will have in the base set. We look how many types, times these elements, these red elements are suggested by our solution in blue classes, so twice. And how many in red classes? No, also twice in this case. So to the base set we take maximum from these two numbers, in this case two. But for yellow classes in blue classes yellow elements are suggested three times and in red classes they are suggested one, two and four, six times. So to the base set we take six yellow elements. So in our case the base set is like this. This is a single line, it's just a base set. So a base set contains two red elements, six yellow elements and five green elements. Again five is the number suggested by blue classes here and red classes suggest four green elements. So we take five copies. And what we know, what is guaranteed by this solution? The solution guarantees the system was created in such a way that the base set may be divided, not divided. In the base set we may distinguish one copy of class of type X and one copy of type Y. We have enough elements of appropriate colors for these. Here is E1 class and here is, sorry, this blue class and here is another blue class, a blue class of type X, class of type Y. And similarly for E2 classes we have enough elements to have two classes of type A and four classes of type B. They are presented here. This is because in our base set we always took this greater value of elements from those suggested by E1 classes or E2 classes. Of course we may have some elements left. We have three elements. If we divide the base set into E1 classes we have three yellow elements left. If we divide into E2 classes we have one green element left. Left means without its own class. But using our lemma we can simply add these elements to a class which contains yellow elements. Because we are sure that those remaining elements have types which are not royal. For royal types we always have equality. All of them will be taken to, or royal elements are taken to these classes suggested by the solution. The elements which remain must have non-royal types. If they have no royal types then they can be adjoined to classes containing realizations of these types. Using our lemma. We ensure that there will be such classes by this inequalities. Similarly the green element, this green element may be adjoined for example to this class. To connect these two green elements we will use this pattern from admissible class of type C which is not realized in our model at all. But we have a pattern of connections. This is one implication. If our system of equations has a solution then we can reconstruct the model. In the opposite direction we use this lemma which says that for every class it can be approximated by a class realizing exactly its M counting type. If we have a formula and its model then we take a solution to the system of equations. The number of realizations, if x is a type is a M counting type of a class. So we check how many times this counting type is realized in the model. This M counting type is realized in the model. How many times, how many classes have exactly this number of realizations of one type counted up to M. So for example a class with one red, two yellow, three green and for example four green elements is counted as a class of M counting type X. Maybe I will skip the detailed argumentation but this lemma about approximations allows us to prove that the system of equations is correct. So let us now think about bounds on the size of models we can obtain this way and the computational complexity of the problem. So this lemma is taken from the paper by Kalvaneze but in fact it is built on the classical results on the system of equations by Papadimitriou. So let us assume that we have a system of linear inequalities or equations with N unknowns, M inequalities or inequalities and N unknowns and coefficients are absolute value of coefficients is bounded by A. Then this system has a non-negative integer solution. Of course we are interested in non-negative integer solutions because these are numbers of realizations of classes so it has to be natural numbers. So the system has such a solution then it also has a solution in which values are bounded by such a number. It is not hard to see that in our case this number is doubly exponential because M the number of inequalities depends on number of one types. We construct two inequalities for each one type. We have doubly exponential number of unknowns because unknowns are M types of classes and M counting types of classes and coefficients are exponential because in each such M counting type we have at most exponentially many realizations of each atomic type. So in fact we have doubly exponentially bounded solution. So doubly exponentially bounded number of types of classes but in each class we initially put on the exponential number of elements. So the total number of elements will be doubly exponential and this theorem. Our construction from the beginning of this talk when we constructed a model of double exponential size was essentially optimal. Every finite satisfiable formula will have a model bounded doubly exponential which follows from this construction. But we want to obtain non-deterministic exponential bound on the complexity of the satisfiability problem. And this theorem suggests a simple procedure just guess a model double exponential size and check that it is a model. But this procedure is doubly exponential non-deterministic time. How to obtain singly exponential time? Observe that our equations are of very simple form. They are just c1, x1, plus c2, plus c3, x3 and so on, greater or equal to a number b which in our case is either 0 or 1. All of our inequalities can be rewritten to such a form. So it is not hard to see that instead of solving such a system of equations over integers we can solve it over real numbers. At this moment we are not interested in constructing the structure for formula phi but only checking if this model exists. So we only want to solve the system of equations. We guess the set of one types which will be realized and this is exponentially bounded information. And then construct a system of equations and try to solve it. But instead of solving it over integers let's solve it over real numbers. Of course if there is a solution over real numbers then we can multiply this solution by the product of denominators in the solution for all variables and we obtain integer numbers then. And those numbers obviously will satisfy these inequalities because they are of very simple form, greater or equal or something. If we multiply this side by some positive number of course then the relation will be still retained. So we may solve the system over real numbers instead of integer numbers and we can use a simple fact from linear algebra because what is the shape of our system of equations? Exponentially many inequalities and doubly exponentially many variables. Instead of such a system of inequalities we can construct a system of equalities which we have a solution. So let us think about equalities and in our algebra we know that the rank of these metrics is at most 2 to the n. So we can move all the variables, we can find a maximum non-zero minor, we can move all the variables not belonging to its minor to the right side of the system and substitute them for zero and we will still have a solution in which only those variables will be non-zero. So the theorem, the observation is that if we have such a system of equations over real numbers then we can always find a solution in which only exponentially many unknowns has non-zero values. Yes and all the others are zeros. This can be done for real numbers not for integers because we require that this system is over, to do this thing we want this system to be over a field, not just over the ring. So what is our algorithm now? We guess which types, which variables will be non-zero in our solution. So we guess the set of one types and we guess the set of those n counting types which will correspond to non-zero variables. And now we have only, and we construct the system but using only those variables. So we have a system with 2 to the n equations and 2 to the n variables. We solve it over real so we can do it in deterministic time, deterministic polynomial time, so we finally get, oh it is not important that this is deterministic because we have a non-deterministic algorithm because we guess something. So finally we guess exponential number of information, construct the system of equation and solve it all of this in exponential time. Okay, so I have a comment here that this technique of describing models by system of equations or inequalities is very often used. It has been used in many, many, many examples. I just mentioned two things which are related to our talk because they consider two variable logics in fact, yes. The first two papers are about description logics with number constraints, yes. Description logics with number constraints, the second one just two variable logic with counting quantifiers or one variable logic with counting quantifiers. So for example one variable logic with counting quantifiers, it has quantifiers of the form for all x. There exists at least mx such that or there exists at most mx such that, yes. So in this case these systems of equalities are even more natural I think. It was used by Ian Pratt, this approach was used by Ian Pratt Hartmann to produce an easy proof of a simple proof of the two variable fragment with counting, not of decidability but of next time upper complexity bounds. The previous proof also by Ian Pratt Hartmann was much more complicated and the previous results implied only decidability without precise complexity bounds. Okay, in this description logics are also based on two variable logics and these numerical restrictions correspond to counting quantifiers. Okay, so maybe I have two more things to show, maybe I will start from the third one. I will just state the second one, yes. So the statement of this next theorem is that the satisfiability problem for two variable logic or even to the guarded fragment with equivalence relations which can be used outside guards. In our construction we use the fact that equivalence relations are only in guards. So if we allow them outside guards then we can show undecidability using three equivalence relations. So this is one thing and to show that we are very close to the border between decidable and unsidable we can also show that two variable logic with two equivalence relations is decidable. So three equivalence relations are undecidable and two are decidable and I am not going to show you details of the theorem but I would like to show you some crucial differences in this situation and in our situation two variable guarded fragment with equivalence guards. So what are the differences? This problem is much harder, yes. What are the differences? The first thing is that of course we may enforce non-empty intersections of E1 and E2 classes. Because we may simply say that for example there exists an element, for every x satisfying p there exists an element y connected to this x by E1 and connected by E2. There are no restrictions on the pattern of, there are no guards in fact. So this is the first thing. Another thing we may say that some types of classes, regardless of this notion of type, some types of classes are realized exactly once in our model. For example we may say that every element satisfying r are contained in one E1 class. When we build our models we cannot take a copy of these classes because this is forbidden. We could also always do it in the guarded fragment. Here we won't be able to do it. Of course a simpler way of doing is just saying that there is exactly one element satisfying p in the whole model, yes. Which can be done without equivalence relations. Then both of its classes will be unique in some sense. It appears that we may even, if we consider a general satisfiability problem we may even enforce infinite classes this time. Remember that in the case of two variable guarded fragment with equivalence guards we had, we could always build models with exponentially bounded classes in the general satisfiability case. It is also much harder to deal with free witnesses, with those witnesses which lie not in the equivalence class of a given element. So there are some complications. In fact we can enforce triply exponentially models of triply exponential size this time using this fact that we may have some non-trivial intersection of classes. This is the same picture we saw previously. This time we consider those bullets to be not just individual elements but intersections containing 2 to the n elements each. And having such an intersection we may encode in such an intersection a number from the set 0 up to 2 to the 2 to the n. Because simply we have 2 to the n elements and we may use an additional binary symbol which works as 0, 1. And we have a binary representation of a number from the set 0 up to 2 to the 2 to the n. And having in f of 2 we can say that 2 intersections connected by say blue relation encode values which differ by 1. This is not obvious but not difficult just a complicated pattern of quantifiers. Some are using variables and it can be done. So we may enforce full binary trees of doubly exponential depth. And then we may again, as previously we may say that all leaves are in one blue class for example. This time we do not even need to use this route. We may simply say that if element is a leaf we can be checked somehow. If a pair of elements in both elements from this pair are leaves then they are connected by blue relation. So we may have models of triply exponential size and classes of triply exponential size. What is the idea of the proof? So the first thing is natural. We do not want to deal with these intersections so instead we will treat them as individual elements. But to do this we have to prove that every formula which is satisfiable is satisfiable in a model with small intersections. And it can be done. So now such small intersections so we have exponential bounded intersections so there is doubly exponential number of isomorphism types of possible intersections. And we will treat them as elements. But now we have two to the n possible types of elements. And we proceed similarly as in the case of two parable guarded fragments with equivalent guards. Of course there is a lot of details. Some of them are quite interesting, some of them are quite annoying but finally the procedure is to quest some information of doubly exponential size and construct a system of linear inequalities. But this time the system is larger. It has, this is one thing that is larger, of course, it has two to the two to the n variables and two to the two to the two to the n, sorry, and doubly exponentially many equations or inequalities and triply exponentially many variables. So the situation is similar as previously but the problem is that we do not have this nice form of inequalities. So of course we may solve this system in triply exponential type, triply exponential non deterministic time, obtaining three next time upper bound on the complexity but we want to obtain two next time, one exponential lower. And the difference in comparison with this guarded fragment is that we will require equations of the form x plus y plus z is not greater than one. These are, they are because we may say that, they appear because we may say that some types of class appear exactly once in the model. So we simply say types of types of classes are elements. So we may have something like this. So maybe sometimes we have that x is equal exactly once, maybe sometimes we have that x plus y plus z is not greater than one. And this trick with taking real solution and multiplying it by denominators will not work because it will not preserve, not necessarily preserve this kind of inequalities. But it appears, so we have to solve the system of equation over integers this time. And it appears that there is a similar theorem, not that simple like this one, but Eisenbrant and Spawning could show that if such a system of equation has, such a system of equation with not too many equations, but many variables has a solution that it has a solution which only polynomially many with respect to the number of equations, polynomially many variables is non-zero. So exactly what we want. But this is also not very difficult theorem, but not that obvious as in the case of real numbers. So we proceed analogously. We guess which variables will be non-zero and construct the system of equations ignoring those unnecessary variables. So we will have doubly exponentially many variables. And we have to solve this system over integers, but the problem of solving system over integers is in NP, so everything is okay. We finally finish in doubly exponential, non-deterministic time. A lower bound can be also shown, it was shown by Ian Fath Hartmann using a similar trick to the one, this trick with counting, to construct a grid of 2 to the n, of doubly exponential size. So the problem is two next time complete. Okay, so I have some more time, so I will go back to this undecidability theorem. Okay, so now I will try to explain why two variable guarded fragment becomes undecidable if we allow equivalence relations outside guards. So I will use a reduction from domino systems. A domino system is just a tuple consisting of set of domino tiles and some restrictions on horizontal and vertical connection, and the problem is to tile a grid of n times n, preserving those constraints. So we simply say these constraints say which pairs of domino types may be horizontal neighbors, which types of domino types may be vertical neighbors.