The Decision Problem of Modal Product Logics with a Diagonal, and Faulty Counter Machines

In the propositional modal (and algebraic) treatment of two-variable first-order logic equality is modelled by a ‘diagonal’ constant, interpreted in square products of universal frames as the identity (also known as the ‘diagonal’) relation. Here we study the decision problem of products of two arbitrary modal logics equipped with such a diagonal. As the presence or absence of equality in two-variable first-order logic does not influence the complexity of its satisfiability problem, one might expect that adding a diagonal to product logics in general is similarly harmless. We show that this is far from being the case, and there can be quite a big jump in complexity, even from decidable to the highly undecidable. Our undecidable logics can also be viewed as new fragments of first-order logic where adding equality changes a decidable fragment to undecidable. We prove our results by a novel application of counter machine problems. While our formalism apparently cannot force reliable counter machine computations directly, the presence of a unique diagonal in the models makes it possible to encode both lossy and insertion-error computations, for the same sequence of instructions. We show that, given such a pair of faulty computations, it is then possible to reconstruct a reliable run from them.


Introduction
It is well-known that the first-order quantifier ∀x can be considered as an 'S5-box': a propositional modal ✷-operator interpreted over universal frames (that is, relational structures W, R where R = W × W ). The so-called 'standard translation', mapping modal formulas to first-order ones, establishes a validity preserving, bijective connection between the modal logic S5 and the one-variable fragment of classical first-order logic [42].The idea of generalising such a propositional approach to full first-order logic was suggested and thoroughly investigated both in modal setting [30,20,41], and in algebraic logic [16,18].In particular, the bimodal logic S5 × S5 over two-dimensional (2D) squares of universal frames corresponds to the equality and substitution free fragment of two-variable first-order logic, via a translation that maps propositional variables P to binary predicates P(x, y), the modal boxes ✷ 0 and ✷ 1 to the first-order quantifiers ∀x and ∀y, and the Boolean connectives to themselves.
In this setting, equality between the two first-order variables can be modally 'represented' by extending the bimodal language with a constant δ, interpreted in square frames with universe W × W as the diagonal set { x, x : x ∈ W }.
The resulting three-modal logic (algebraically, representable 2D cylindric algebras [18]) is now closer to the full two-variable fragment (though P(y, x)-like transposition of variables is still not expressible in it).The generalisation of the modal treatment of full two-variable first-order logic to products of two arbitrary modal logics equipped with a diagonal constant (together with modal operators 'simulating' the substitution and transposition of first-order variables) was suggested in [36,37].The product construction as a general combination method on modal logics was introduced in [8], and has been extensively studied ever since (see [7,21] for surveys and references).Two-dimensional product logics can not only be regarded as generalisations of the first-order quantifiers [23], but they are also connected to several other logical formalisms, such as the one-variable fragment of modal and temporal logics, modal and temporal description logics, and spatio-temporal logics.At first sight, the diagonal constant can only be meaningfully used in applications where the domains of the two component frames consist of objects of similar kinds, or at least overlap.However, as modal languages cannot distinguish between isomorphic frames, in fact any subset D of a Cartesian product W h × W v can be considered as an interpretation of the diagonal constant, as long as it is both 'horizontally' and 'vertically' unique in the following sense: ∀x ∈ W h , ∀y, y ′ ∈ W v x, y , x, y ′ ∈ D → y = y ′ , (1) ∀x, x ′ ∈ W h , ∀y ∈ W v x, y , x ′ , y ∈ D → x = x ′ . ( So, say, in the one-variable constant-domain fragment of first-order temporal (or modal) logics, the diagonal constant can be added in order to single out a set of special 'time-stamped' objects of the domain, provided no special object is chosen twice and at every moment of time (or world along the modal accessibility relation) at most one special object is chosen.
In this paper we study the decision problem of δ-product logics: arbitrary 2D product logics equipped with a diagonal.It is well-known that the presence or absence of equality in the two-variable fragment of first-order logic does not influence the coNExpTime-completeness of its validity problem [34,28,14].So one might expect that adding a diagonal to product logics in general is similarly harmless.The more so that decidable product logics like K × K (the bimodal logic of all product frames) remain decidable when one adds modal operators 'simulating' the substitution and transposition of first-order variables [38].However, we show that adding the diagonal is more dangerous, and there can be quite a big jump in complexity.In some cases, the global consequence relation of product logics can be reduced the validityproblem of the corresponding δ-products (Prop.2).We also show (Theorems 2, 4) that if L is any logic having an infinite rooted frame where each point can be accessed by at most one step from the root, then both K × δ L and K4.3 × δ L are undecidable (here K is the unimodal logic of all frames, and K4.3 is the unimodal logic of linear orders).Some notable consequences of these results are: [24], and even the global consequence relation of K × S5 is decidable in co2NExpTime [43,33]). (ii ).
See also Table 1 for some known results on product logics, and how our present results on δ-products compare with them.While all the above δ-product logics are recursively enumerable (Theorem 1), we also show that in some cases decidable product logics can turn highly undecidable by adding a diagonal.For instance, both K × δ S5 and K × δ K when restricted to finite (but unbounded) product frames result in non-recursively enumerable logics (Theorem 3).Also, Logic of ω, < × δ S5 is Π 1  1 -hard (Theorem 5).On the other hand, the unbounded width of the second-component frames seems to be essential in obtaining these results.Adding a diagonal to decidable product logics of the form K × Alt(n), S5 × Alt(n), and Alt(m) × Alt(n) result in decidable logics, sometimes even with the same upper bounds that are known for the products (Theorems 6 and 7) (here Alt(n) is the unimodal logic of frames where each point has at most n successors for some 0 < n < ω).
Our undecidable δ-product logics can also be viewed as new fragments of first-order logic where adding equality changes a decidable fragment to undecidable.(A well-known such fragment is the Gödel class [11,12].)In particular, consider the following '2D extension' of the standard translation [9], from bimodal formulas to three-variable first-order formulas having two free variables x and y and a built-in binary predicate R: P † := P(x, y), for propositional variables P, It is straightforward to see that, for any bimodal formula φ, φ is satisfiable in the (decidable) modal product logic K × K iff φ † is satisfiable in first-order logic.So the image of † is a decidable fragment of first-order logic that becomes undecidable when equality is added.
Our results show that in many cases the presence of a single proposition (the diagonal) with the 'horizontal' and 'vertical' uniqueness properties (1)-( 2) is enough to cause undecidability of 2D product logics.If each of the component logics has a difference operator, then their product can express 'horizontal' and 'vertical' uniqueness of any proposition.For example, this is the case when each component is either the unimodal logic Diff of all frames of the form W, = , or a logic determined by strict linear orders such as K4.3 or Logic of ω, < .So our Theorems 4 and 5 can be regarded as generalisations of the undecidability results of [32] on 'linear'×'linear'-type products, and those of [17] on 'linear'×Diff -type products.
On the proof methods.Even if 2D product structures are always grid-like by definition, there are two issues one needs to deal with in order to encode grid-based complex problems into them: (i) to generate infinity, even when some component structure is not transitive, and (ii) somehow to 'access' or 'refer to' neighbouring-grid points, even when there is no 'nexttime' operator in the language, and/or the component structures are transitive or even universal.
When both component structures are transitive, then (i) is not a problem.If in addition component structures of arbitrarily large depths are available, then (ii) is usually solved by 'diagonally' encoding the ω × ω-grid, and then use reductions of tiling or Turing machine problems [25,32,10].When both components can express the uniqueness of any proposition (like strict linear orders or the difference operator), then it is also possible to make direct use of the grid-like nature of product structures and obtain undecidability by forcing reliable counter machine computations [17].However, δ-product logics of the form L× δ S5 apparently neither can force such computations directly, nor they can diagonally encode the ω × ω-grid.Instead, we prove our lower bound results by a novel application of counter machine problems.
The presence of a unique diagonal in the models makes it possible to encode both lossy and insertion-error computations, for the same sequence of instructions.We then show (Prop.3) that, given such a pair of faulty computations, one can actually reconstruct a reliable run from them.The upper bound results are shown by a straightforward selective filtration.
The structure of the paper is as follows.Section 2 provides all the necessary definitions.In Section 3 we establish connections between our logics and other formalisms, and discuss some consequences of these connections on the decision problem of δ-products.In Section 4 we introduce counter machines, and discuss how reliable counter machine computations can be approximated by faulty (lossy and insertion-error) ones.Then in Sections 5 and 6 we state and prove our undecidability results on δ-products having a K or a 'linear' component, respectively.The decidability results are proved in Section 7. Finally, in Section 8 we discuss some related open problems.

δ-product logics
In what follows we assume that the reader is familiar with the basic notions in modal logic and its possible world semantics (see [3,5] for reference).Below we summarise the necessary notions and notation for our 3-modal case only, but we will use them throughout for the uniand bimodal cases as well.We define our formulas by the following grammar: where P ranges over an infinite set of propositional variables.We use the usual abbreviations ∨, →, ↔, ⊥ := P ∧ ¬P, ✸ i := ¬✷ i ¬, and also (The subscripts are indicative of the 2D intuition: h for 'horizontal' and v for 'vertical'.)A δ-frame is a tuple F = W, R h , R v , D where R i are binary relations on the non-empty set W , and D is a subset of W .We call F rooted if there is some w such that wR * v for all v ∈ W , for the reflexive and transitive closure R * of R := R h ∪ R v .A model based on F is a pair M = F, ν , where ν is a function mapping propositional variables to subsets of W .The truth relation M, w |= φ is defined, for all w ∈ W , by induction on φ as usual.In particular, We say that φ is satisfied in M, if there is w ∈ W with M, w |= φ.We write M |= φ, if M, w |= φ for every w ∈ W .Given a set L of formulas, we write M |= L if M |= φ for every φ in L. Given formulas φ and ψ, we write φ |= * L ψ iff M |= ψ for every model M such that M |= L ∪ {φ}.
We say that φ is valid in F, if M |= φ for every model M based on F. If every formula in a set L is valid in F, then we say that F is a frame for L. We let Fr L denote the class of all frames for L. For any class C of δ-frames, we let Logic of C := {φ : φ is a formula valid in every member of C}.
We call a set L of formulas a Kripke complete logic if L = Logic of C for some class C. A Kripke complete logic L such that for all formulas φ and ψ, φ |= * L ψ iff M |= φ implies M |= ψ for every model M based on a frame for L, is called globally Kripke complete.
We are interested in some special 'two-dimensional' δ-frames.Given unimodal Kripke frames where W h × W v is the Cartesian product of sets W h and W v and the binary relations R h and R v are defined by taking, for all The δ-product of F h and F v is the δ-frame where For classes C h and C v of unimodal frames, we define Now, for i = h, v, let L i be a Kripke complete unimodal logic in the language with ✸ i .The δ-product of L h and L v is defined as As a generalisation of the modal approximation of two-variable first-order logic, it might be more 'faithful' to consider Then S5 × δ sq S5 = S5 × δ sqf S5 indeed corresponds to the transposition-free fragment of twovariable first-order logic.However, S5 × δ S5 is properly contained in S5 × δ sq S5: for instance ✸ h δ belongs to the latter but not to the former.In general, clearly we always have Also, it is not hard to give examples when the three definitions result in three different logics.Throughout, we formulate all our results for the L h × δ L v cases only, but each and every of them holds for the corresponding L h × δ sq L v as well (and also for L × δ sqf L when it is meaningful to consider the same L as both components).
Given a set L of formulas, we are interested in the following decision problems: L-validity: Given a formula φ, does it belong to L?
If this problem is (un)decidable, we simply say that 'L is (un)decidable'.L-validity is the 'dual' of L-satisfiability: Given a formula φ, is there a model M such that M |= L and φ is satisfied in M? Clearly, if L = Logic of C then L-satisfiability is the same as C-satisfiability: Given a formula φ, is there a frame F ∈ C such that φ is satisfied in a model based on F? We also consider Global L-consequence: Given formulas φ and ψ, does φ |= * L ψ hold?
Notation.Our notation is mostly standard.In particular, we denote by R + the reflexive closure of a binary relation R. The cardinality of a set X is denoted by |X|.For each natural number k < ω, we also consider k as the finite ordinal k = {0, . . ., k − 1}.

Decidability of δ-products: what to expect?
To begin with, the following proposition is straightforward from the definitions: So it follows from the undecidability results of [10] on the corresponding product logics that L h × δ L v is undecidable, whenever both L h and L v have only transitive frames and have frames of arbitrarily large depths.For example, K4 × δ K4 is undecidable, where K4 is the unimodal logic of all transitive frames.
Next, we establish connections between the global consequence relation of some product logics and the corresponding δ-products.To begin with, we introduce an operation on frames that we call disjoint union with a spy-point.Given unimodal frames F i = W i , R i , i ∈ I, for some index set I, and a fresh point r, we let r i∈I Note that the spy-point technique is well-known in hybrid logic [4].
Proposition 2. If L h and L v are Kripke complete logics such that both Fr L h and Fr L v are closed under the 'disjoint union with a spy-point' operation and L h × L v is globally Kripke complete, then the global Proof.We show that for all bimodal (δ-free) formulas φ, ψ, where We claim that Indeed, let i = h.We prove (4) by induction on the smallest number n of R h -steps needed to access w from x h .If n = 0 then we have r h R h x h .Now suppose inductively that (4) holds for all w in G h that are accessible in ≤ n R h -steps from x h for some n < ω, and let w ′ be accessible in n + 1 R h -steps.Then there is w in G h that is accessible in n steps and wR h w ′ .Thus r h R h w by the IH, and so M, w ′ , r v |= ✸ v δ by univ δ .Therefore, we have w ′ ∈ W v and r v R v w ′ .Then M, r h , w ′ |= ✸ h δ again by univ δ , and so r h R h w ′ as required.The i = v case is similar.
Take some fresh point r and define Then by our assumption, G i is a frame for by taking, for all propositional variables P, ν(P) := x, α , y, β : x, y ∈ µ(P) .
and Fr L i is closed under isomorphic copies for i = h, v, we can actually assume that U h = U v , and so N, r, r |= univ δ .
Proof.It is not hard to check that the 2D product logics K × K and K × K4 satisfy the requirements in Prop. 2 (cf.[7, Thm.5.12] for global Kripke completeness).A reduction of, say, the ω × ω-tiling problem [2] shows that global K × K-consequence is undecidable [24], and so the undecidability of K × δ K follows by Prop. 2. It is shown in [15] that the reduction of K4 to global K-consequence [40] can be 'lifted' to the product level, and so K4 × K4 is reducible to global K × K4-consequence.Therefore, the latter is undecidable [10], and so the undecidability of K × δ K4 follows by Prop. 2.
Note that we can also make Prop. 2 work for logics having only reflexive frames by making the 'spy-point' reflexive, and using a slightly different 'translation': where P is a fresh propositional variable.However, logics having only symmetric frames (like S5), or having only frames with bounded width (like K4.3 or Alt(n)) are not closed under the 'disjoint union with a spypoint' operation, and so Prop. 2 does not apply to their products.It turns out that in some of these cases such a reduction is either not useful in establishing undecidability of δ-products, or does not even exist.While global K × S5-consequence is reducible to PDL × S5-validity1 , and so decidable in co2NExpTime [43,33], K × δ S5 is shown to be undecidable in Theorem 2 below.While K × δ Alt(n) is decidable by Theorem 6 below, the undecidability of global K × Alt(n)-consequence can again be shown by a straightforward reduction of the ω × ω-tiling problem.
Finally, the following general result is a straightforward generalisation of the similar theorem of [8] on product logics.It is an easy consequence of the recursive enumerability of the consequence relation of (many-sorted) first-order logic: Theorem 1.If L h and L v are Kripke complete logics such that both Fr L h and Fr L v are recursively first-order definable in the language having a binary predicate symbol, then L h × δ L v is recursively enumerable.

Reliable counter machines and faulty approximations
A Minsky [27] or counter machine M is described by a finite set Q of states, an initial state where each operation in Op C is one of the following forms, for some i < N : • c ??
i (test whether counter c i is empty).
For each α ∈ Op C , we will consider three different kinds of semantics: reliable (as described above), lossy [26] (when counters can spontaneously decrease, both before and after performing α), and insertion-error [29] (when counters can spontaneously increase, both before and after performing α).
A configuration of M is a tuple q, c with q ∈ Q representing the current state, and an N -tuple c = c 0 , . . ., c N −1 of natural numbers representing the current contents of the counters.Given α ∈ Op C , we say that there is a reliable α-step between configurations q, c and q ′ , c ′ (written q, c → α q ′ , c ′ ) iff α, q ′ ∈ I q and We say that there is a lossy α-step between configurations q, c and q ′ , c ′ (and we write q, c → α lossy q ′ , c ′ ) iff α, q ′ ∈ I q and Finally, we say that there is an insertion-error α-step between configurations q, c and q ′ , c ′ (written q, c → α i err q ′ , c ′ ) iff α, q ′ ∈ I q and • if α = c ?? i then c i = 0 and c ′ j ≥ c j for j < N .Now suppose that a sequence τ = α n , q n : 0 < n < B of instructions of M is given for some 0 < B ≤ ω.We say that a sequence ̺ = q n , c(n A reliable run is a reliable τ -run for some τ .Similarly, a sequence ̺ satisfying (i) is called a lossy τ -run if we have q n−1 , c(n − 1) → αn lossy q n , c(n) , and an insertion-error τ -run if we have q n−1 , c(n − 1) → αn i err q n , c(n) , for every 0 < n < B. (Note that in order to simplify the presentation, in each case we only consider runs that start at state q ini with all-zero counters.) Observe that, for any given τ , if there exists a reliable τ -run, then it is unique.The following statement says that this unique reliable τ -run can be 'approximated' by a lossy, insertionerror -pair of τ -runs: Proposition 3. (faulty approximation) Given any sequence τ of instructions, there exists a reliable τ -run iff there exist both lossy and insertion-error τ -runs.
Proof.The ⇒ direction is obvious, as each reliable τ -run is both a lossy and an insertion-error τ -run as well.For the ⇐ direction, suppose that τ = α n , q n : 0 < n < B for some B ≤ ω, q n , c • (n) : n < B is a lossy τ -run, and q n , c • (n) : n < B is an insertion-error τ -run.We claim that there is a sequence c(n) : n < B of N -tuples of natural numbers such that, for every n < B, It would follow that q n , c(n) : n < B is a reliable τ -run as required.
We prove the claim by induction on n.To begin with, we let c(0) := 0. Now suppose that (a) and (b) hold for all k < n for some n with 0 < n < B. For each i < N , we let We need to check that (a) and (b) hold for n.There are several cases, depending on α n .If α n = c ?? i then, by q n−1 , c • (n − 1) → αn lossy q n , c • (n) , the IH(a), and Also, c • i (n − 1) = 0 by q n−1 , c • (n − 1) → αn i err q n , c • (n) .So by the IH(a), we have c i (n − 1) = 0, and so c i (n) = 0 and q n−1 , c(n − 1) → αn q n , c(n) .As , as required.The other cases are straightforward and left to the reader.
In each of our lower bound proofs we will use 'faulty approximation', together with one of the following problems on reliable counter machine runs: CM non-termination: (Π 0 1 -hard [27]) Given a counter machine M, does M have an infinite reliable run?CM reachability: (Σ 0 1 -hard [27]) Given a counter machine M, and a state q fin , does M have a reliable run reaching q fin ?CM recurrence: (Σ 1 1 -hard [1]) Given a counter machine M and a state q r , does M have a reliable run that visits q r infinitely often?
5 Undecidable δ-products with a K-component Theorem 2. Let L be any Kripke complete logic having an ω-fan among its frames.Then K × δ L is undecidable.
We prove Theorem 2 by reducing the 'CM non-termination' problem to L h × δ L v -satisfiability.Let M be a model based on the δ-product of some frame F h = W h , R h in Fr L h and some frame F v = W v , R v in Fr L v .First, we generate an ω × ω-grid in M. Let grid be the conjunction of the formulas Claim 2.1.(grid generation) If M, r h , r v |= grid then there exist points x n ∈ W h ∩ W v : n < ω such that, for all n < ω, (We do not claim that all the x n are distinct.) Proof.By induction on n.Let x 0 := r v .Then (i) holds by (6).Now suppose inductively that we have x k : k < n satisfying (i)-(iv) for some 0 < n < ω.Then by (7), there is and x n is the only R h -successor of x n−1 .By (6), M, r h , x n |= ✸ h δ.So r h R h x n follows, as required.
Observe that because of Claim 2.1(iii) and (iv), ✷ h in fact expresses 'horizontal next-time' in our grid.For any formula ψ and any w Using this, we will force a pair of infinite lossy and insertion-error τ -runs, for the same sequence τ of instructions.Given any counter machine M , for each i < N of its counters, we take two fresh propositional variables C • i and C • i .At each moment n of time, the actual content of counter c i during the lossy run will be represented by the set of points and during the insertion-error run by the set of points For each i < N , the following formulas force the possible changes in the counters during the lossy and insertion-error runs, respectively: and Claim 2.2.(lossy and insertion-error counting) Suppose that M, r h , r v |= grid.Then for all n < ω and i < N : Proof.We show items (ii) and(v).The proofs of the other items are similar and left to the reader.
Using the above counting machinery, we can encode lossy and insertion-error steps.For each α ∈ Op C , we define and Now we can force runs of M that start at q ini with all-zero counters.For each state q ∈ Q, we introduce a fresh propositional variable S q , and define Let ϕ M be the conjunction of Lemma 2.3.(lossy and insertion-error run-emulation) Suppose that M, r h , r v |= grid ∧ ϕ M .Let q 0 := q ini , and for all i < N , n < ω, let c Then there exists an infinite sequence τ = α n , q n : 0 < n < ω of instructions such that • q n , c • (n) : n < ω is a lossy τ -run of M , and Proof.We define α n , q n : 0 < n < ω by induction on n such that for all 0 < n < ω, • q n ∈ Q − H and M, x n , x 0 |= S qn , As c • (0) = c • (0) = 0 by (10), the lemma will follow.
To this end, take some n with 0 < n < ω.Then we have q n−1 ∈ Q−H and M, x n−1 , x 0 |= S q n−1 , by ( 10) and ( 12) if n = 1, and by the IH if n > 1.Therefore, by Claim 2.1(i) and (11), there is x n , x 0 |= S qn by Claim 2.1(iii), and so q n ∈ Q − H by Claim 2.1(i) and (12).Using Claim 2.2(i)-(iii), it is easy to check that q n−1 , c • (n − 1) → αn lossy q n , c • (n) .Finally, in order to show that q n−1 , c • (n − 1) → αn i err q n , c • (n) , we need to use Claim 2.2(iv)-(vi) and the following observation.As for each i < N either Σ For each k ≤ ω, let H k be the frame obtained from k, +1 by adding a 'spy-point', that is, let H k := k + 1, S k , where Lemma 2.4.(soundness) If M has an infinite reliable run, then grid ∧ ϕ M is satisfiable in a model over H ω × δ F for some ω-fan F.
Further, for all i < N , n < ω, we will define inductively the sets µ n (C • i ) and µ n (C • i ), and then put µ( It is straightforward to check that We need to be a bit more careful when defining µ n (C • i ).As the formulas do • (α n ) permit decrementing the insertion-error counters only at diagonal points, we must be sure that only previously incremented points get decremented.To this end, for every i < N , we let and let λ i m : m < L i be the enumeration of Λ i in ascending order, and ξ i m : m < K i be the enumeration of Ξ i in ascending order, for some L i , K i ≤ ω.As in a run only non-zero counters can be decremented and our run is reliable, we always have L i ≤ K i , and λ i m > ξ i m for all m < L i .Then we let ), for all i < N and n < ω.Using this and ( 14), it is easy to check that M ∞ , ω, 0 |= grid ∧ ϕ M .Now Theorem 2 follows from Prop. 3, Lemmas 2.3 and 2.4.
Note that it is easy to generalise the proof to obtain undecidability of T × δ L (where T is the unimodal logic of all reflexive frames), by using a version of the 'tick-' or 'chessboard'-trick (see e.g.[39,32,10] for more details): Take a fresh propositional variable tick, and define a new 'horizontal' modal operator by setting, for all formulas φ, Then replace each occurrence of ✷ h in the formula grid ∧ ϕ M with h , and add the conjunct It is not hard to check that the resulting formula is T × δ L-satisfiable iff M has an infinite reliable run.
Next, recall k-fans from ( 5), and the frames H k from (13).
Theorem 3. Let C h and C v be any classes of frames such that • either C v contains an ω-fan, or C v contains a k-fan for every k < ω.
Proof.We sketch how to modify the proof of Theorem 2 to obtain a reduction of the 'CM reachability' problem to C h × δ C v -satisfiability.To begin with, observe that if we add the conjunct to the formula grid defined in ( 6)-( 7), then the grid-points x n generated in Claim 2.1 are all different.Now we introduce a fresh propositional variable end, and let grid fin be the conjunction of ( 6), (20) and the following 'finitary' version of (7): Given any counter machine M and a state q fin , let ϕ fin M be obtained from ϕ M by replacing (12) with It is not hard to see that Note that it is also possible to give another proof of Theorem 2 by doing everything 'backwards'.The conjunction of the following formulas generates a grid backwards in K × δ Lframes, and is used in [22] to show that these logics lack the finite model property w.r.t.any (not necessarily product) frames: Then the conjunction of the following formulas emulates counter machine runs, again by going backwards along the generated grid: where bw do 6 Undecidable δ-products with a 'linear' component Theorem 4. Let L h be any Kripke complete logic such that L h contains K4.3 and ω, < is a frame for L h .Let L v be any Kripke complete logic having an ω-fan among its frames.Then L h × δ L v is undecidable.
We prove Theorem 4 by reducing the 'CM non-termination' problem to L h × δ L v -satisfiability.Let M be a model based on the δ-product of a frame F h = W h , R h for L h (so R h is transitive and weakly connected2 ), and some frame F v = W v , R v for L v .First, we again generate an ω × ω-grid in M. Let If M, r h , r v |= lingrid then there exist points x n ∈ W h ∩ W v : n < ω such that, for all n < ω, (iv) x 0 = r h and x m R h x n for all m < n.
Proof.By induction on n.Let x 0 := r h .As M, r h , r v |= δ, we have r h = r v .Now suppose inductively that we have x k : k < n satisfying (i)-(iv) for some 0 < n < ω.Then there is , and for every z, x n−1 R h z implies that z = x n or x n R h z, by the weak connectedness of R h .So by the IH and the transitivity of R h , we have x m R h x n for all m < n.
Next, given any counter machine M , we will again force both an infinite lossy and an infinite insertion-error τ -run, for the same sequence τ of instructions.As R h is transitive, we do not have a general 'horizontal next-time' operator in our grid, like we had in (8).However, because of Claim 4.1(iii) and (iv), we still can have the following: For any formula ψ and any In order to utilise this, for each counter i < N of M , we introduce two pairs of propositional variables: In • i , Out • i for emulating lossy behaviour, and In • i , Out • i for emulating insertion-error behaviour.The following formula ensures that the condition in (22) hold for each of these variables, at all the relevant points in M: At each moment n of time, the actual content of counter c i during the lossy run will be represented by the set of points and during the insertion-error run by the set of points For each i < N , the following formulas force the possible changes in the counters during the lossy and insertion-error runs, respectively: and (lossy and insertion-error counting) Suppose that M, r h , r v |= lingrid ∧ ξ M .Then for all n < ω, i < N : We show items (iii) and (vi).The proofs of the other items are similar and left to the reader.
(iii): By lin dec • i , there is z such that Now suppose w ∈ ∆ • i (n + 1).Then x 0 R + v w and M, x n+1 , w |= In For each state q ∈ Q, we introduce a fresh propositional variable S q , and define the formula S q as in (9).Let ψ M be the conjunction of ξ M and the following formulas: Lemma 4.3.(lossy and insertion-error run-emulation) Suppose that M, r h , r v |= lingrid ∧ ψ M .Let q 0 := q ini , and for all i < N , n < ω, let c Then there exists an infinite sequence τ = α n , q n : 0 < n < ω of instructions such that • q n , c • (n) : n < ω is a lossy τ -run of M , and Proof.We define α n , q n : 0 < n < ω by induction on n such that for all 0 < n < ω As c • (0) = c • (0) = 0 by (24), the lemma will follow.
To this end, take some n with 0 < n < ω.Then we have q n−1 ∈ Q−H and M, x n−1 , x n−1 |= S q n−1 , by ( 24) and ( 26) if n = 1, and by the IH if n > 1.So by Claim 4.1(i), we have M, Thus by Claim 4.1(iv) and ( 25), there is Now it is easy to check that q n−1 , c • (n − 1) → αn lossy q n , c • (n) holds, using Claim 4.2(i)-(iii).In order to show that q n−1 , c • (n−1) → αn i err q n , c • (n) , we need to use Claim 4.2(iv)-(vi) and the following observation.As for each i < N either ∆ = ∅, and so α n = c ?? i follows by M, x n−1 , x 0 |= lin do • (α n ).Finally, we have M, x n , x n |= S qn by (27) and Claim 4.1(ii),(iv), and so q n ∈ Q − H by Claim 4.1(i),(iv) and (26).

Lemma 4.4. (soundness)
If M has an infinite reliable run, then lingrid ∧ ψ M is satisfiable in a model over ω, < × δ F for some countably infinite one-step rooted frame F.
In some cases, we can have stronger lower bounds than in Theorem 4. We call a frame W, R modally discrete if it satisfies the following aspect of discreteness: there are no ✷ h ) in ψ.Similarly, vd(ψ) denotes the 'vertical' nesting depth of ψ.Now suppose that M, r h , r v |= φ in some model M that is based on the δ-product of F h = W h , R h and some frame F v = W v , R v for Alt(n).(Note that with δ in our language it is possible to force cycles in the component frames of a δ-product, so we cannot assume that F h and F v are trees.)For every k ≤ vd(φ), we define U k v := {y ∈ W v : there is a k-long R v -path from r v to y}.The U k v are not necessarily disjoint sets for different k, but we always have Then we define Next, for every m ≤ hd(φ), we define inductively U m h and S m h as follows.We let U 0 h := {r h } and S 0 h := ∅.Now suppose inductively that we have defined U m h and S m h for some m < hd(φ).For all x ∈ U m h , y ∈ W ′ v , and ✸ h ψ ∈ sub(φ) with M, x, y |= ✸ h ψ, choose some z x,y,ψ from W h such that xR h z x,y,ψ and M, z x,y,ψ , y |= ψ.Then define Then we define F ′ h := W ′ h , R ′ h by taking Clearly, by ( 28) and ( 29) the size of In certain cases the above proof gives polynomial upper bounds on the size of the falsifying δ-product model, so we have: Theorem 7. The validity problems of both S5 × δ Alt(1) and Alt(1) × δ Alt(1) are coNPcomplete.
Note that all the above results hold with Alt(n) being replaced by its serial 4 version DAlt(n).One should simply make the 'final' points in the filtrated component frames reflexive.