 Tukaj je tukaj z Emanuel Kirovski in Jant Odob. Zelo je o modu logiku. Počnem z modu logiku. Sintaktik je zelo več zelo. Zelo je propozisno logiku z dve modali. Sq. je, da je tukaj tukaj. in diamant, ki je bilo poslite, da je to vse. In tudi ta syntaktyk definitiv je več zelo, da je vse semantik vse prejz, je biti kratko. In prijevak, da je semantik vse semantik, je da je vse zelo, da je vse zelo, da je vse zelo. Vse zelo je vse zelo, da je vse zelo, da je vse zelo, propozisno logično, a to je odstavljeno z jednimi rovom do axijom, a potem zelo si, da formula je velika v modu logičnih, kjer je bilo povedal. To je dobro, ker je zelo povedal, da je zelo povedal povedal sistem, in da povedal povedal viške logičnih. Zelo smo povedali nekaj axijom, a potem možemo povedali nekaj. One of the most important steps in the history of modal logic was inventing a formal semantics based on the notion of the so-called Kripke structures. Kripke structure contains a direct graph called a frame and evaluation of propositional variables. Here is such a frame and this is a Kripke structure and formula square phi can be read here as in all successors phi is satisfied and diamond phi can be read as in some successors phi is satisfied. Turns out that there is a beautiful connection between proof-based and frame-based approaches. Logics defined by axioms can be equivalently defined by restricting classes of frames. For example, this axiom, diamond-diamond-p implies diamond-p corresponds to the class of transitive frames. In my opinion, this way of defining modal logic by saying that we consider only the class of transitive frames is easier than saying that diamond-diamond-p implies diamond-p, but of course it is less formal. So we would like to have something formal but a little bit more similar to this thing. So we use first-order logic. So in this talk I consider class of frames defined by first-order logic and in fact only universal fragment of first-order logic. And all those classes can be defined in this universal first-order logic. But there is no equality between those two ways of defining things. Both those formalisms have incomparable expressive power. Ok, now I define two decision problems. For a given class of frames k, we define local satisfability problem as follows. For a given modal formula phi, does there exist a frame k and labeling lambda and the word w, such that this frame with this labeling in this word satisfies phi and the second problem is a global satisfability problem where we ask for whether there exists a modal such that all words in this modal satisfies a given formula. And please note that almost all natural classes of frames are defined by formulas with at most free variables. And here are some examples. I always speak about universal quantifier, so I omit them here. I think that all those variables are quantified universally. And natural question in my ask is, are k-sat and global k-sat always decidable for classes defined by first-order formulas with free variables? In 1996, edit Hamas Pandra proved that there exist universal first-order formula that defines class k, so that global k-sat is undecidable. And this formula is here, it contains more variables, there are nine variables here and it contains equality. And this result was improved 15 years later. In this paper from MFCS, they removed equality, but now this formula is a little bit more complicated. And they showed also how proved the same thing for the local satisfability problem, but now the formula is even more complicated. Our first result is that there exist universal first-order formula with only three variables that defines class k, so that global k-sat is undecidable. It has only three variables, then you can guess that it is simpler. And actually it's very simple, because it's just a disjunction of six literals. Our second result is that the same holds for the local satisfability problem, but then our formula is just a little bit more complicated. And we have similar results for the local satisfability problem, sorry, for finite satisfability problem, when we consider only finite models. And after those result, natural question is why standard logic, standard model logic are decidable. And our answer is that all model logic definable by universal horn formula with three variables are decidable. Yeah, yeah, in both. Both local satisfability and global satisfability are decidable. But you will see later that there are some differences in complexity. But first let me start with the undecidability. So this formula presented earlier can be rewritten as an implication and what does it say? It says that it is impossible that we have three words, then those two are the only connection among those words. It says that if there is word X and it is connected to Y and Z, then it has to be at least one additional edge in this triangle here. As usual, when we want to encode undecidability problem, we have some canonical structure and this is our canonical structure. It is grid-like structure. And please note that this structure satisfies this formula. In particular, if we take any point, let's say this green one, then it has three successors, this red one, and there are edges between each pair of those successors. So this formula is satisfied for this grid. And we also have model formula that makes every model of this formula look locally like this grid. And this formula says that each word has at least three successors. We use nine axlars variables P00, P01, P02 and so on to P22. And this formula says that each word has a horizontal successor, vertical successor and diagonal successor. And this part says that it cannot be connected to it horizontal predecessor, vertical predecessor and diagonal predecessor. And how does it work? Well, let's consider any word A. This part, again, says that it has three successors. And this first-order formula says that because here we have a word and two successors, then there has to be at least one more edge here. But this edge cannot be from this word to this, because this is the vertical predecessor of this word. Similarly, it cannot be from this word to this, because this is the horizontal predecessor, and this word is the horizontal predecessor of this word. And therefore, the only possibility for another edge here is this dotted edge here. And in the same way, we can prove that this edge here can be from A H to A D. And this is how we enforce that our models locally look like grids. And once we have grids, it's really easy to prove that such a logic is undecidable. Simply, we encode some kind of domino problem in it. And for the local satisfiability case, we use a trick presented by Edith Hessembra and Schnur. We simply observe that our model formulas work even if all those words here in this grid are reflexive. And the trick is that we add one irreflexive word. We grant T in this model formula here that such a word exists. We simply say that this initial word satisfies R, and all next words satisfies not R. So the word that satisfies this formula cannot be reflexive. And in using the first-order formula, we can say that this irreflexive word has to be connected to all reflexive words. And then the question about satisfiability of phi in all those points can be translated to the question about satisfiability of square phi in this particular word, because now square says that we go to all other words. And that's all about our undecidability result. And now a few words about the satisfiability. Recall that universal Horns formulas are formulas of the form phi 1 and phi 2 and phi j, where each phi i is a Horns clause, and that means that it is a disjunction of literals of each and most one is positive. And here's one example. We usually write such a Horn formulas as implications, and this part defines. It says that each model is transitive. This is a Horn formula with no positive literals, and, of course, there are more examples here. And what is interesting is that there is only a finite number of universal Horn formulas with three variables. Well, of course, we can write something stupid like p and p and p and so on, but if we exclude this kind of formula, then there is only finite numbers of such formulas, but this number is still very large, so it is impossible to just check each of them. And, okay, so the idea beyond our proof of decidability is that we observe that moda logic is decidable due to three-moder property. And in our case, there is no set property, but we want to get as close to this three-moder property as we can. And we define the closure of three with respect to universal Horn formula phi as the smallest structure that contains t and satisfies phi. The smallest with respect to the number of edges. And one of our technical lemma says that if model formula phi is satisfied in some class defined by Horn formula, then there exists a tree such that phi has a model based on the closure of this tree. So what we are going to do is that we are going to study the possible shapes of the closures of three depending on the universal formula. We define four simple classes of frames and we associate each universal Horn formula with one of these classes. And we show that closure of any tree with respect to the universal Horn formula belongs to the class associated with this formula. And then we show an algorithm and we show algorithms for all these classes. And now I'm going to give you at first some examples for each classes, then formal definition and then a few words about algorithms. So the first case is very simple. This formula here defines frames in which all words except for maybe the first one are reflexive. And another possible formula is this one that says something, but if we apply this formula to this tree we don't have to add any edges, so simply the closure of this tree is this tree. And in this very simple case we call this class of models semi-trees. We say that a frame is semi-tree, if it contains a tree and it is contained in the reflexive symmetric closure of this tree. So we can add only edges that make some words reflexive and some edges symmetric and that's it. And in this case we can use standard algorithms to solve the satisfability problem and in case of local satisfability it leads to p-space completeness and in case of global satisfability it leads to x-time completeness. Second class is a little bit different. This formula here defines transitivity. So all frames, all closures of all trees with respect to this formula are transitive. And our second class is called class of transitive trees and we say that a frame is transitive tree, it contains tree, it is contained in the reflexive transitive closure of this tree and it contains long edges just to distinguish it for semi-trees. And another by very easy modification of the standard algorithm. We can show that in this case both local and global satisfability problems are p-space completeness. The third class is more interesting. Consider this formula. It says that if x is connected to y and y is connected to z, then z is connected to x. So for this word it means that from this word there is an edge to the first word and so on. And it turns out that while this model which is a closure of this tree seems to be not regular then we can rearrange the words here and obtain three words with this property that every word from this first part is connected to every word from the second part. Every word from the second part is connected to every word from the third part and every word from the third part is connected to every word from this first part. And in this case we call it pre-partition and we simply say that a frame is a true partition se pa je potretil na trpatični. If the sword can be partitioned into three independent sets such that there are edges between corresponding sets. And what we do here, is that we show that each of those resets can be reduced to the set with polynomial size. And if you have only three sets with polynomial size, then it leads to polynomial model property And it leads to in pre-completeness. And our last class of frames is a little bit more complicated. Consider this formula here. It says that each word except for words without predecessors or without a predecessor that contains predecessors are reflexive. So all those words here are reflexive. In tudi se zelo, da se vse zelo sezela, da vse zelo sezela, da je zelo sezela. In je to, da sezela, da sezela, da je zelo sezela. Vsezela smo trge, na vsezela sezela, ali potem smo sezela noga klikov. Vsezela sezela sezela, da je zelo sezela. V vsezela sezela. In nekaj izršč, ki je to početno. Vse je to, da vse včešlje, da ne, kaj je, na svoj svači, početno vse vse, najreflexive. Vse je to, da, kaj je, nekaj vse, da, ne, kaj je, na svoj svih, nekaj je, are not the most of the ke Absolutely sorry. the edge which leads to the word that is not the last word. the last word contains some accessors and then, which is symmetric, so first we add the symmetric edges here, but not here and not here and this part says that if a word is in vsega očečna vsega očečna vsega. In je to očečnja na svoj vsega. Vsega to, da se vsega je občajnja, je to vsega vsega vsega in je to vsega z vsego vsega in je to vsega. Zato, da vsega vsega je svoj vsega, je to vsega in je to vsega, zelo nekaj, da sem zelo počutila. Tako tako, še je zelo. Prvne je tudi klikunj, kaj je je potrešen, zelo, nekaj nekaj kliks in tudi težke, kaj je težke vzelo, tudi težke in tudi težke, kaj je vse težke, kaj je tudi težke and tastes are of hate at most, too. And in this case, we prove that it is enough to consider only a polynomial number of clicks with polynomial size, and it leads to the polynomial model property, and it leads to NP-competence. So, to sum up, we proved those three results, and the complexity for the further result is presented in this table. So thank you for your attention.