Characterizing Deﬁnability in Decidable Fixpoint Logics ∗

We look at characterizing which formulas are expressible in rich decidable logics such as guarded ﬁxpoint logic, unary negation ﬁxpoint logic, and guarded negation ﬁxpoint logic. We consider semantic characterizations of deﬁnability, as well as eﬀective characterizations. Our algorithms revolve around a ﬁner analysis of the tree-model property and a reﬁnement of the method of moving back-and-forth between relational logics and logics over trees


Introduction
A major line of research in computational logic has focused on obtaining extremely expressive decidable logics.The guarded fragment (GF) [1], the unary negation fragment (UNF) [23], and the guarded negation fragment (GNF) [3] are rich decidable fragments of first-order logic.
Each of these has extensions with a fixpoint operator that retain decidability: GFP [18], UNFP [23], and GNFP [3] respectively.In each case the argument relies on "moving to trees".This involves showing that the logic possesses the tree-like model property: whenever there is a satisfying model for a formula, it can be taken to be of tree-width that can be effectively computed from the formula.Such models can be coded by trees, thus reducing satisfiability of the logic to satisfiability of a corresponding formula over trees, which can be decided using automata-theoretic techniques.This method has been applied for decades (e.g.[25,16]).
A question is how to recognize formulas in these logics, and more generally how to distinguish the properties of the formulas in one logic from another.Clearly if we start with a formula in an undecidable logic, such as first-order logic or least fixed point logic (LFP), we have no possibility for effectively recognizing any non-trivial property.But we could still hope for an insightful semantic characterization of the subset that falls within the decidable logic.One well-known example of this is van Benthem's theorem [24] characterizing modal logic within first-order logic -a first-order sentence is equivalent to a modal logic sentence exactly when it is bisimulation-invariant.For fixpoint logics, an analogous characterization is the Janin-Walukiewicz theorem [20], stating that the modal mu-calculus (L µ ) captures the bisimulation-invariant fragment of monadic second-order logic (MSO).If we start in one decidable logic and look to characterize another decidable logic, we could hope for a 107:2 Characterizing Definability in Decidable Fixpoint Logics characterization that is effective.For example, Otto [22] showed that if we start with a formula of L µ , we can determine whether it can be expressed in modal logic.
In this work we will investigate both semantic and effective characterizations.We will begin with GFP.Grädel, Hirsch, and Otto [16] have already provided a characterization of GFP-definability within a very rich logic extending MSO called guarded second-order logic (GSO).The characterization is exactly analogous to the van Benthem and Janin-Walukiewicz results mentioned above: GFP captures the "guarded bisimulation-invariant" fragment of GSO.The characterization makes use of a refinement of the method used for decidability of these logics, which moves back-and-forth between relational structures and trees: (1) define a forward mapping taking a formula φ 0 in the larger logic (e.g.GSO invariant under guarded bisimulation) over relational structures to a formula φ 0 over trees that describes codes of structures satisfying φ 0 ; (2) define a backward mapping based on the invariance going back to some φ 1 in the restricted logic (e.g.GFP).The method is shown in Figure 1a.
Our first main theorem is an effective version of the above result: if we start with a formula in certain richer decidable fixpoint logics, such as GNFP, we can decide whether the formula is in GFP.At the same time we provide a refinement of [16] which accounts for two signatures, the one allowed for arbitrary relations and the one allowed for "guard relations" that play a key role in the syntax of all guarded logics.We extend this result to deciding membership in the "k-width fragment", GNFP k ; roughly speaking this consists of formulas built up from guarded components and positive existential formulas with at most k variables.We provide a semantic characterization of this fragment within GSO, as the fragment closed under the corresponding notion of bisimulation (essentially, the GN k -bisimulation of [3]).As with GFP, we show that the characterization can be made effective, provided that one starts with a formula in certain larger decidable logics.The proof also gives an effective characterization for the k-width fragment of UNFP.
As in the method for invariance and decidability above, we apply a forward mapping to move from a formula φ 0 in a larger logic L 0 on relational structures to a formula φ 0 on tree encodings.But then we can apply a different backward mapping, tuned towards the smaller logic L 1 and the special properties of its tree-like models.The backward mapping of a tree property φ 0 is always a formula φ 1 in the smaller logic L 1 (e.g.GFP).But it is no longer guaranteed to be "correct" unconditionally -i.e. to always characterize structures whose codes satisfy φ 0 .Still, we show that if the original formula φ 0 is definable in the smaller logic L 1 , then the backward mapping applied to the forward mapping gives such a definition.Since we can check equivalence of two sentences in these logics effectively, this property suffices to get decidability of definability.The revised method is shown schematically in Figure 1b.
The technique above has a few inefficiencies; first, the general forward mapping passes through MSO and has non-elementary complexity.Secondly, the technique implicitly moves between relational structures and trees twice: once to construct φ 0 , and a second time to check that φ 0 is equivalent to φ 1 , which in turn requires first forming a formula φ 1 over trees via a forward mapping and then checking its equivalence with φ 0 .We show that in some cases we can optimize this, allowing us to get tight bounds on the equivalence problem.
We show that our results "restrict" to fragments of these guarded logics, including their first-order fragments.In particular, our results give effective characterizations of GF definability when the input is in FO.They can be thus seen as a generalization of well-known effective characterizations of the conjunctive existential formulas in GF, the acyclic queries.We show that we can apply our techniques to the problem of transforming conjunctive formulas to a well-known efficiently-evaluable form (acyclic formulas) relative to GF theories.These results complement previous results on query evaluation with constraints from [6,13].

Coded structures
( (a) Back-and-forth for Semantic Characterization.

Figure 1
This refined back-and-forth method can be tuned in a number of ways, allowing us to control the signature as well as the sublogic.We show this can be adapted to give an approximation of the formula φ 0 within the logic L 1 , which is a kind of uniform interpolant.

Preliminaries
We work with finite relational signatures σ.We use x, y, . . .(respectively, X, Y , . . . ) to denote vectors of first-order (respectively, second-order) variables.For a formula φ, we write φ(x) to indicate that the free first-order variables in φ are among x.If we want to emphasize that there are also free second-order variables X, we write φ(x, X).We often use α to denote atomic formulas, and if we write α(x) then we assume that the free variables in α are precisely x.The width of φ, denoted width(φ), is the maximum number of free variables in any subformula of φ, and the width of a signature σ is the maximum arity of its relations.
The Guarded Negation Fragment of FO [3] (denoted GNF) is built up inductively according to the grammar φ :: where R is either a relation symbol or the equality relation, and α is an atomic formula or equality such that free(α) ⊇ free(φ).Such an α is a guard.If we restrict α to be an equality, then each negated formula can be rewritten to use at most one free variable; this is the Unary Negation Fragment, UNF [23].GNF is also related to the Guarded Fragment [1] (GF), typically defined via the grammar φ :: where R is either a relation symbol or the equality relation, and α is an atomic formula or equality that uses all of the free variables of φ.Here it is the quantification that is guarded, rather than negation.GNF subsumes GF sentences and UNF formulas.
The fixpoint extensions of these logics (denoted GNFP, UNFP, and GFP) extend the base logic with formulas [lfp X,x .α(x)∧ φ(x, X, Y )](x) where (i) α(x) is an atomic formula or equality guarding x, (ii) X only appears positively in φ, (iii) second-order variables like X cannot be used as guards.Some alternative (but equi-expressive) ways to define the fixpoint extension are discussed in [3]; in all of the definitions, the important feature is that tuples in the fixpoint are guarded by an atom in the original signature.In UNFP, there is an additional requirement that only unary or 0-ary predicates can be defined using the fixpoint operators.GNFP subsumes both GFP sentences and UNFP formulas.These logics are all contained in LFP, the fixpoint extension of FO, so the semantics are inherited from there.Characterizing Definability in Decidable Fixpoint Logics formulas can be generated using the following grammar: where α is an atomic formula or equality statement such that free(α) = free(φ); we call such an α a strict guard.Every GNFP-formula can be converted into this form in a canonical way with an exponential blow-up in size.We denote by GNFP k the set of GNFP-formulas that are of width k when they are brought into this normal form.For convenience in proofs, we are using a slightly different normal form than previous papers on these logics.
These guarded fixpoint logics are expressive: the µ-calculus is contained in each of these fixpoint logics, and every positive existential formula is expressible in UNFP and GNFP (and even UNF and GNF).Nevertheless, these logics are decidable and have nice model theoretic properties.In particular satisfiability and finite satisfiability is 2-ExpTime-complete for GNF and GNFP [5].The same holds for UNFP and GFP [23,18].GNFP (and hence UNFP and GFP) has the tree-like model property [5]: if φ is satisfiable, then φ is satisfiable over structures of bounded tree-width.In fact satisfiable GNFP k formulas have satisfying structures of tree-width k − 1. GNF (and hence UNF and GF) has the finite-model property [5]: if φ is satisfiable, then φ is satisfiable in a finite structure.This does not hold for the fixpoint extensions.In this paper we will be concerned with equivalence over all structures.
In this work we will be interested in varying the signatures considered, and in distinguishing more finely which relations can be used in guards.If we want to emphasize the relational signature σ being used, then we will write, e.g., GNFP[σ].For σ g ⊆ σ, we let GNFP[σ, σ g ] denote the logic built up as in GNFP but allowing only relations R ∈ σ at the atomic step and only guards α using equality or relations R ∈ σ g .We define GFP[σ, σ g ] similarly.Note that UNFP[σ] is equivalent to GNFP[σ, ∅], since if the only guards are equality guards, then the formula can be rewritten to use only unary negation and monadic fixpoints.
Guarded second-order logic over a signature σ (denoted GSO[σ]) is a fragment of secondorder logic in which second-order quantification is interpreted only over guarded relations, i.e. over relations where every tuple in the relation is guarded by some predicate from σ.We refer the interested reader to [16] for more background and some equivalent definitions of this logic.The logics UNFP, GNFP, and GFP can all be translated into GSO.
A special kind of signature is a transition system signature Σ consisting of a finite set of unary predicates (corresponding to a set of propositions) and binary predicates (corresponding to a set of actions).A structure for such a signature is a transition system.Trees allowing both edge-labels and node-labels have a natural interpretation as transition systems.We will be interested in two logics over transition system signatures.One is monadic second-order logic (denoted MSO) -where second-order quantification is only over unary relations.MSO is contained in GSO, because unary relations are trivially guarded.While MSO and GSO can be interpreted over arbitrary signatures, there are logics like modal logic that have syntax specific to transition system signatures.Another is the modal µ-calculus (denoted L µ ), an extension of modal logic with fixpoints.Given a transition system signature Σ, formulas φ ∈ L µ [Σ] can be generated using the grammar φ :: φ where P is a unary relation in Σ and ρ is a binary relation in Σ.The formulas µX.φ are required to use the variable X only positively in φ, and the semantics define a least-fixpoint operation based on φ.It is easy to see that L µ can be translated into MSO.
It is well-known that σ-structures of tree-width k − 1 can be encoded by labelled trees over an alphabet that depends only on the signature of the structure and k, which we denote Σ code σ,k .Our encoding scheme will make use of trees with both node and edge labels, i.e. trees over a transition system signature Σ code σ,k .Roughly speaking, a node label is a set of unary relations (like R i1,...,in ) from Σ code σ,k that encodes the set of atomic formulas (like R(a i1 , . . ., a in )) that hold of the elements represented at that node, and an edge label ρ is a binary relation from Σ code σ,k that indicates the relationship between the names of encoded elements in neighboring nodes.This scheme differs slightly from the one used in [16].The exact coding conventions are not important for understanding the ideas in the rest of the paper.Given some Σ code σ,k -tree T , we say T is consistent if it satisfies certain natural conditions that ensure that the tree actually corresponds to a code of some tree decomposition of a σ-structure.A consistent Σ code σ,k -tree T can be decoded to an actual σ-structure, denoted D(T ).
Bisimulation games and unravellings.The logic L µ over transition system signatures lies within MSO.Similarly the guarded logics GFP, UNFP, and GNFP all lie within GSO and apply to arbitrary-arity signatures.It is easy to see that these containments are proper.In each case, what distinguishes the smaller logic from the larger is invariance under certain equivalences called bisimulations, each of which is defined by a certain player having a winning strategy in a two-player infinite game played between players Spoiler and Duplicator.For L µ , the appropriate game is the classical bisimulation game between transition systems A and B. It is straightforward to check that L µ [Σ]-formulas are Σ-bisimulation invariant, i.e. they cannot distinguish between Σ-bisimilar transition systems.We will make use of a stronger result of Janin and Walukiewicz [20] that the µ-calculus is the bisimulation-invariant fragment of MSO (we state it here for trees because of how we use this later): A class of trees is definable in L µ [Σ] iff it is definable in MSO[Σ] and closed under Σ-bisimulation within the class of all Σ-trees.Moreover, the translation between these logics is effective.
We now describe a generalization of these games between structures A and B over a signature σ with arbitrary arity relations, parameterized by some subsignature σ of the structures.Each position in the game is a partial σ homomorphism h from A to B, or vice versa.The active structure in position h is the structure containing the domain of h.The game starts from the empty partial map from A to B. In each round of the game, Spoiler chooses between one of the following moves: Extend: Spoiler chooses some set X of elements in the active structure such that X ⊇ dom(h), and Duplicator must then choose h extending h (i.e.such that h(c) = h (c) for all c ∈ dom(h)) such that h is a partial σ homomorphism; Duplicator loses if this is not possible.Otherwise, the game proceeds from the position h .Switch: Spoiler chooses to switch active structure.If h is not a partial σ isomorphism, then Duplicator loses.Otherwise, the game proceeds from the position h −1 .
Collapse: Spoiler selects some X ⊆ dom(h) and the game continues from position h X .Duplicator wins if she can continue to play indefinitely.
We will consider several variants of this game.These were essentially known already in the literature (see, e.g., [16,17,3]), sometimes with different names or minor technical differences in the definitions.For k ∈ N and σ g ⊆ σ : 1. k-width guarded negation bisimulation game: The GN k [σ , σ g ]-game is the version of the game where the domain of every position h is of size at most k, and Spoiler can only make a switch move at h if dom(h) is strictly σ g -guarded in the active structure.

block k-width guarded negation bisimulation game:
, but additionally Spoiler is required to alternate between extend/switch moves and moves where he collapses to a strictly σ g -guarded set.We call it the "block" game since Spoiler must select all of the new extension elements in a single block, rather than as a series of small extensions.The key property is that the game alternates I C A L P 2 0 1 7

107:6
Characterizing Definability in Decidable Fixpoint Logics between positions with a strictly σ g -guarded domain, and positions of size at most k.
The restriction mimics the alternation between formulas of width at most k and strictly σ g -guarded formulas within normalized GNFP k formulas.

guarded bisimulation game:
The G[σ , σ g ]-game is the version of the game where the domain of every position must be strictly σ g -guarded in the active structure.Note that in such a game, every position h satisfies |dom(h)| ≤ width(σ g ).We say A and B are GN k [σ , σ g ]-bisimilar if Duplicator has a winning strategy in the GN k [σ , σ g ]-game starting from the empty position.We say a sentence When the guard signature is the entire signature, we will write, e.g., It is known that the bisimulation games characterize certain fragments of (this follows from work in [3] and [7]).Likewise, for fixpoint logics and fragments of (this follows from [9]).The survey in [17] also describes some of these invariance results.
In this paper, we will prove a corresponding characterization for ).Note that for fixpoint logics, GN k [σ ]-invariance is strictly weaker than BGN k [σ ]invariance, and applies to other decidable logics (e.g.[7]).
Unravellings.Given a σ-structure A and k ∈ N and σ g ⊆ σ ⊆ σ, we would like to construct a structure that is GN k [σ , σ g ]-bisimilar to A but has a tree-decomposition of bounded tree-width.A standard construction achieves this, called the GN k [σ , σ g ]-unravelling of A. Let Π k be the set of finite sequences of the form Y 0 Y 1 . . .Y m such that Y 0 = ∅ and each Y i is a set of elements from A of size at most k.Each such sequence can be seen as the projection to A of a play in the GN k [σ , σ g ]-bisimulation game between A and some other structure.For Y a set of elements from A, let AT A,σ (Y ) be the set of atoms that hold of the elements in Y : {R(a 1 , . . ., a l ) : R ∈ σ , {a 1 , . . ., a l } ⊆ Y , A |= R(a 1 , . . ., a l )}.Now define a Σ code σ ,k -tree U GN k [σ ,σg] (A) where each node corresponds to a sequence in Π k , and the sequences are arranged in prefix order.Roughly speaking, the node label of every v = Y 0 . . .Y m−1 Y m is an encoding of AT A,σ (Y m ), and the edge label between its parent u and v indicates the relationship between the shared elements Y m−1 ∩ Y m encoded in u and v.We define D(U GN k [σ ,σg] (A)) to be the GN k [σ , σ g ]-unravelling of A. By restricting the set Π k to reflect the possible moves in the games, we can define unravellings based on the other bisimulation games in a similar fashion.We summarize the two unravellings that will be most relevant: 1. block k-width guarded negation unravelling: is consistent and is called a σ g -guardedinterface tree since it alternates between interface nodes with strictly σ g -guarded domains -corresponding to collapse moves in the game -and bag nodes with domain of size at most k that are not necessarily σ g -guarded.

guarded unravelling: The
The tree U G[σ ,σg] (A) is consistent and is called a σ g -guarded tree since the domain of every node in the tree is strictly σ g -guarded.
All of these unravellings are bisimilar to A, with respect to the appropriate notion of bisimilarity.Because these unravellings have tree decompositions of some bounded tree-width, this proposition implies that these guarded logics have tree-like models.The structural differences in the tree decompositions will be exploited for our definability decision procedures.

Decidability via back-and-forth and equivalence
We now give the main components of our approach, and explain how they fit together.The first component is a forward mapping, translating an input GSO formula φ 0 to an MSO formula φ 0 over tree-codes, holding on the codes that correspond to tree-like models of φ 0 .We will be interested only in formulas that are invariant under a form of guarded bisimulation or guarded negation bisimulation, so we assume the input is a GN l -invariant formula, for some l ≥ width(σ).For such formulas, we can actually define a forward mapping that produces a µ-calculus formula.
Lemma 1 (Fwd, adapted from [16]).Given a GN l [σ]-invariant sentence φ ∈ GSO[σ] and given some k ≥ width(σ), we can construct The second component will depend on our target sublogic L 1 .It requires a mapping (not necessarily effective) taking a σ-structure B to a tree structure U L1 (B) such that D(U L1 (B)) agrees with B on all L 1 sentences.Informally, U L1 (B) will be the encoding of some unravelling of B appropriate for L 1 , perhaps with additional properties.A backward mapping for L 1 takes sentences φ 0 over tree codes (with some given k and σ) to a sentence The formula φ 1 will depend on simplifying the formula φ 0 based on the fact that one is working on an unravelling.For L 1 = GFP[σ , σ g ] over subsignatures σ , σ g of the original signature σ, U L1 (B) will be a guarded unravelling; the results of [16] can easily be refined to give the formula component in GFP[σ , σ g ].For GNFP k , providing both the appropriate unravelling and the formula in the backward mappings will require more work.
The L 1 definability problem for logic L asks: given some input sentence φ ∈ L, is there some ψ ∈ L 1 such that φ and ψ are logically equivalent?The forward and backward method of Figure 1b gives us a generic approach to this problem.The algorithm consists of applying the forward mapping to get φ 0 , applying the backward mapping to φ 0 based on L 1 to get φ 1 , and then checking if φ 1 is equivalent to φ 0 .We claim φ 0 is L 1 definable iff φ 0 and φ 1 are equivalent.If φ 0 and φ 1 are logically equivalent then φ 0 is clearly L 1 definable using φ 1 .In the other direction, suppose that φ 0 is L 1 -definable.Fix B, and let U L1 (B) be given by the backward mapping.Then Hence, φ 0 and φ 1 are logically equivalent, as required.Thus, we get the following general decidability result: such that we have an effective backward mapping for L 1 .Then the L 1 definability problem is decidable for Above, we mean that there is an algorithm that decides L 1 definability for any input GSO[σ] sentence that is GN l [σ]-invariant, with the output being arbitrary otherwise.The I C A L P 2 0 1 7

107:8
Characterizing Definability in Decidable Fixpoint Logics approach above gives a definability test in the usual sense for inputs in GNFP[σ], since these are all GN l [σ]-invariant for some l.In particular we will see that we can test whether a . But there are larger GN l -invariant logics (e.g.[7]), and the algorithm immediately applies to these as well.

4
Identifying GFP definable sentences For GFP, we can instantiate the high-level algorithm by giving a backward mapping.
There are two sources of inefficiency in the high-level algorithm.First, the forward mapping is non-elementary since we pass through MSO on the way to a µ-calculus formula.Second, testing equivalence of the original sentence with the sentence produced by the forward and backward mappings implicitly requires a second forward mapping in order to reduce the problem to regular language equivalence on trees.
For the special case of input in GNFP, we can use an optimized procedure that avoids these inefficiencies and allows us to obtain an optimal complexity bound.
The main idea behind our optimized procedure is to directly use automata throughout the process.First, for input φ in GNFP it is known from [9] how to give a forward mapping that directly produces a tree automaton A φ (with exponentially-many states) that accepts a consistent tree T iff D(T ) |= φ -exactly the consistent trees that satisfy φ µ .This direct construction avoids passing through MSO, and can be done in 2-ExpTime.We can then construct an automaton A φ from A φ that accepts a tree T iff U G[σ ,σg] (D(T )); we call this the G[σ , σ g ]-view automaton, since it mimics the view of T running on the guarded unravelling of D(T ).This can be seen as an automaton that represents the composition of the backward mapping with the forward mapping.With these constructions in place, we have the following improved algorithm to test definability of φ in GFP: construct A φ from φ, construct A φ from A φ , and test equivalence of A φ and A φ over consistent trees.Note that with this improved procedure it is not necessary to actually construct the backward mapping, or to pass forward to trees for a second time in order to test equivalence.Overall, the procedure can be shown to run in 2-ExpTime.A reduction from GFP-satisfiability testing, which is known to be 2-ExpTime-hard, yields the lower bound.
Our results give us a corollary on definability in fragments of FO when the input is in FO: where k, l ≥ width(σ) and σ g ⊆ σ ⊆ σ.
Note that in this work we are characterizing sublogics within fragments of fixpoint logics and within fragments of first-order logic.We do not deal with identifying first-order definable formulas within a fixpoint logic, as in [10,8].

107:9
We also can get a version of the definability result for a restriction of fixpoint logic.One well-studied restriction is called alternation-freeness (see, e.g., [14,2]).We say a sentence φ in GFP is alternation-free if it does not contain subformulas ψ 1 := [lfp Y,y .χ 1 ](y) and ψ 2 := [gfp Z,z .χ 2 ](z) such that Y occurs in χ 2 and ψ 2 is a subformula of ψ 1 , or Z occurs in χ 1 and ψ 1 is a subformula of ψ 2 (recall that a greatest fixpoint can be defined in terms of least fixpoints and negations as [gfp Z,z .χ 2 ](z) ≡ ¬[lfp Z,z .¬χ 2 [¬Z/Z]](z)).Alternation-free fragments of GNFP and L µ are defined by restricting the nesting of fixpoints in a similar way.It is desirable to know if a sentence is in this alternation-free fragment of GFP since this fragment has better computational properties: for instance, model checking for this alternation-free fragment can be done in linear time.This was shown in [14].A language called DATALOG-LITE -a variant of DATALOG that has some restricted forms of negation and universal quantification -was also introduced, and shown to exactly characterize this alternation-free GFP [14].A corollary of the definability result in this section, is that it is possible to decide definability in alternation-free GFP when the input is in alternation-free GNFP, using the same decision procedure as before.Roughly speaking, this comes from observing that if the input is in alternation-free GNFP, then the forward mapping produces alternation-free L µ , and the backward mapping produces alternation-free GFP.

Corollary 7. The alternation-free
We can also apply our theorem to answer some questions about conjunctive queries (CQs): formulas built up from relational atoms via ∧ and ∃.When the input φ to our definability algorithm is a CQ, φ can be written as a GF sentence exactly when it is acyclic: roughly speaking, this means it can be built up from guarded existential quantification (see [15]).Transforming a query to an acyclic one could be quite relevant in practice, since acyclic queries can be evaluated in linear time [26].There are well-known methods for deciding whether a CQ φ is acyclic, and recently these have been extended to the problem of determining whether φ is acyclic for all structures satisfying a set of constraints (e.g., Guarded TGDs [6] or Functional Dependencies [13]).Using Corollary 6 above along with an equivalence between guardedness and acyclicity that follows from [4], we can get an analogous result for arbitrary constraints in the guarded fragment: Corollary 8. Given a set of GF sentences Σ and a CQ sentence Q, we can decide whether there is a union of acyclic CQs Q equivalent to Q for all structures satisfying Σ.The problem is 2-ExpTime-complete.
Note that if Σ consists of universal Horn constraints ("TGDs"), then a CQ Q is equivalent to union of CQs Q relative to Σ implies that it is equivalent to one of the disjuncts of Q .Thus the result above implies decidability of acyclicity relative to universal horn GF sentences, one of the main results of [6].

Identifying GNFP k and UNFP k sentences
We now turn to extending the prior results to GNFP and UNFP.In order to make use of the back-and-forth approach described in the previous section, we must be able to restrict to structures of some bounded tree-width.For GFP this tree-width depends only on the signature σ , so this width-restriction was implicit in the GFP[σ , σ g ]-definability problems.However, for GNFP and UNFP this bound on the tree-width depends on the width of the formula, so for definability questions, we must state this width explicitly.Hence, in this section, we consider definability questions related to GNFP k and UNFP k .
I C A L P 2 0 1 7

107:10 Characterizing Definability in Decidable Fixpoint Logics
We apply the high-level algorithm of Proposition 2, using the forward mapping of Lemma 1.The unravelling and backward mapping for GNFP k is more technically challenging than the corresponding construction for GFP.
We first need an appropriate notion of unravelling.We use a variant of the block k-width guarded negation unravelling discussed in Section 2, but we will need to assume we have a certain repetition of facts.This idea of modifying a classical unravelling to include extra copies of certain pieces of the structure has been used before (e.g. the ω-expansions in [21], and "shrewd" unravellings for UNFP k in [9]).We will need a new, subtler property for GNFP k , which we call "plumpness".
In order to define the property that this special unravelling has, we need to define how we can modify copies of certain parts of the structure in a way that still leads to a GN k -bisimilar structure.Let τ and τ be sets of σ -facts over some elements A. Let I, J ⊆ A. We say τ and τ agree on J if for all σ -atoms R(a 1 , . . ., a l ) with {a 1 , . . ., a l } ⊆ J, R(a 1 , . . ., a l ) ∈ τ iff R(a 1 , . . ., a l ) ∈ τ .We say τ is an (σ g , I)-safe restriction of τ if (i) τ ⊆ τ ; (ii) τ agrees with τ on I; (iii) τ agrees with τ on every J ⊆ A that is σ g -guarded in τ .Note that τ itself is considered a trivial (σ g , I)-safe restriction of τ .Here is another example: .
Note that we cannot drop facts over unary relations (since these are always trivially guarded), and we can never drop facts over I. Further, the σ g -facts that we keep restrict what other facts we can drop, since for any σ g -guarded set that remains we must preserve facts over that set.By a (σ g , I)-safe restriction of a node in a tree decomposition, we mean a (σ g , I)-safe restriction of the atoms represented by the node.We will be interested in trees with the property that for every bag node w, all safe restrictions of w are realized by siblings of w.Formally a Σ code σ ,k -tree has the σ g -plumpness property if for all interface nodes v: if w is a ρ 0 -child of v over names J with I = rng(ρ 0 ) and τ is the encoded set of σ -atoms that hold at w, then for any (σ g , I)-safe restriction τ of τ , there is a ρ 0 -child w of v such that (i) τ is the encoded set of σ -atoms that hold at w ; (ii) for each ρ-child u of w , there is a ρ-child u of w such that the subtrees rooted at u and u are bisimilar; and (iii) for each ρ-child u of w such that dom(ρ) is strictly σ g -guarded in τ , there is a ρ-child u of w such that the subtrees rooted at u and u are bisimilar.
The following proposition shows that one can obtain unravellings that are plump: 107:11 The problem is that the formula produced by the translation fails to be in GNFP k for two reasons.First, the inductive step for negation in the naïve algorithm simply applies negation to the recursively-produced formula.Clearly this can produce unguarded negation.Similarly, the recursive step for fixpoints may use unguarded fixpoints.
For example, the original µ-calculus formula can include subformulas of the form ρ ExactLabel(τ ) where τ is a set of unary relations from Σ code σ ,k , and ExactLabel(τ ) asserts P for all P ∈ τ and ¬P for all unary relations P not in τ .This would be problematic for a straightforward backward mapping, since the backward translation of some ¬R i1,...,in would be converted into an unguarded negation ¬R(x i1 , . . ., x in ).On the other hand the formula ρ GNLabel(τ ) where GNLabel(τ ) asserts P for all P ∈ τ but only asserts ¬P for unary relations P that are not in τ but whose indices are σ g -guarded by some P ∈ τ would be unproblematic, since this could be translated to a formula with σ g -guarded negation.The key observation is that from an interface node in a plump tree, these two formulas are equivalent: if T , v |= ρ GNLabel(τ ) at any interface node v, then plumpness ensures that if there is some ρ-child w of v with label τ satisfying GNLabel(τ ), then there is a ρ-child w of v with label τ satisfying ExactLabel(τ ) -it can be checked that τ is a (σ g , rng(ρ))-safe restriction of τ .Thus the proof of Lemma GNFP k -Bwd relies on first simplifying L µ -formulas so that problematic subformulas like ExactLabel(τ ) are eliminated, with the correctness of this simplification holding only over plump trees.After this simplification, an inductive backward mapping can be applied.
Using the above lemma and Proposition 2, we obtain the following analog of Theorem 4.

Theorem 13. The
we obtain the following corollary: and k, l ≥ width(σ).
We get corollaries for fragments of FO, analogous to Corollary 6: We can also apply the backward and forward mappings to get a semantic characterization for GNFP k , analogous to the Janin-Walukiewicz theorem.The following extends a result of [3] characterizing GNF k formulas as the BGN k -invariant fragment of FO.

I C A L P 2 0 1 7 107:12 Characterizing Definability in Decidable Fixpoint Logics
The proof is similar to the characterizations of Janin-Walukiewicz and [16], and can also be seen as a variant of Proposition 2, where we use BGN k [σ , σ g ]-invariance rather than equivalence to a GNFP k [σ , σ g ] sentence in justifying that the input formula is equivalent to the result of the composition of backward and forward mappings.
Interpolation.The forward and backward mappings utilized for the definability questions can also be used to prove that GFP and GNFP k have a form of interpolation.
Let φ L and φ R be sentences over signatures σ L and σ R such that φ L |= φ R (φ L entails φ R ).An interpolant for such a validity is a formula θ for which φ L |= θ and θ |= φ R , and θ mentions only relations appearing in both φ L and φ R .We say a logic L has Craig interpolation if for all φ L , φ R ∈ L with φ L |= φ R , there is an interpolant θ ∈ L for it.We say a logic L has the stronger uniform interpolation property if one can obtain θ from φ L and a signature σ , and θ can serve as an interpolant for any φ R entailed by φ L and such that the common signature of φ R and φ L is contained in σ .A uniform interpolant can be thought of as the best over-approximation of φ L over σ .
Uniform interpolation holds for L µ [11] and UNFP k [9].Unfortunately, GFP[σ] and GNFP k [σ] both fail to have uniform interpolation and Craig interpolation (this follows from [19,9]).However, if we disallow subsignature restrictions that change the guard signature, then we regain interpolation.This "preservation of guard" variant was investigated first by Hoogland, Marx, and Otto in the context of Craig interpolation [19].The uniform variant was introduced by D'Agostino and Lenzi [12], who called it uniform modal interpolation.Formally, we say a guarded logic L[σ, σ g ] with guard signature σ g ⊆ σ has uniform modal interpolation if for any φ L ∈ L[σ, σ g ] and any subsignature σ ⊆ σ containing σ g , there exists a formula θ ∈ L[σ , σ g ] such that φ L entails θ and for any σ containing σ g with σ ∩ σ ⊆ σ and any φ R ∈ L[σ , σ g ] entailed by φ L , θ entails φ R .It was shown in [12] that GF has uniform modal interpolation.We strengthen this to GFP and GNFP k .Theorem 17.For σ a relational signature, σ g ⊆ σ, k ∈ N: GFP[σ, σ g ] and GNFP k [σ, σ g ] sentences have uniform modal interpolation, and the interpolants can be found effectively.
We sketch the argument for GFP[σ, σ g ].Consider φ L ∈ GFP[σ, σ g ] of width k and subsignature σ ⊆ σ containing σ g .We apply Lemma Fwd to get a formula φ µ L ∈ L µ [Σ code σ,k ] that captures codes of tree-like models of φ L .We want to go backward now, to get a formula over the subsignature σ .We saw that the backward mapping for GFP[σ , σ g ] (Lemma 3) can do this: it can start with a µ-calculus formula over Σ code σ,k , and produce a formula in GFP[σ , σ g ].As discussed earlier, the formula produced by this backward mapping has a nice property related to definability: it is equivalent to φ L exactly when φ L is definable in GFP[σ , σ g ].In general, however, we do not expect φ L to be equivalent to a formula over the subsignature -for uniform interpolation we just want to approximate the formula over this subsignature.The backward mapping of φ µ L does not always do this.Hence, it is necessary to add one additional step before taking the backward mapping: we apply uniform interpolation for the µ-calculus [11], obtaining θ µ ∈ Σ code σ ,k which is entailed by φ µ L and entails each L µ [Σ code σ ,k ]-formula implied by φ µ L .Finally, we apply Lemma GFP[σ , σ g ]-Bwd to θ µ to get θ ∈ GFP[σ , σ g ].We can check that θ ∈ GNFP k [σ , σ g ] is the required uniform modal interpolant for φ L over subsignature σ .
Theorem 17 also implies that UNFP k has the traditional uniform interpolation property: since the guard signature is empty for UNFP k , uniform modal interpolation and uniform interpolation coincide.This was shown already in [9].

Conclusions
In this paper we have taken a first look at effective characterizations of definability in expressive logics.We did not allow constants in the formulas in this paper, but we believe that similar effective characterization results hold for guarded fixpoint logics with constants.We leave open the question of definability in GNFP without any width restriction.For this the natural way to proceed is to bound the width of a defining sentence based in terms of the input.We also note that our results on fixpoint logics hold only when equivalence is considered over all structures, leaving open the corresponding questions over finite structures.
It is often helpful to consider the formulas in a normal form.Strict normal form GNFP I C A L P 2