Abstract 1 Introduction 2 Semiring Semantics 3 Separating Weak from Strong Compactness 4 Finite Semirings 5 Lattice Semirings 6 Compactness up to Powers 7 Summary and Conclusion References Appendix A Omitted Proofs Appendix B The Löwenheim–Skolem Theorems

Compactness in Semiring Semantics

Sophie Brinke ORCID RWTH Aachen University, Germany Anuj Dawar ORCID University of Cambridge, UK Erich Grädel ORCID RWTH Aachen University, Germany Lovro Mrkonjić ORCID RWTH Aachen University, Germany Matthias Naaf ORCID RWTH Aachen University, Germany
Abstract

Semiring provenance was originally introduced in database theory with the aim of explaining why certain tuples are (not) contained in the answer of a query. To this end, logical statements are not just evaluated to true or false but to values in a commutative semiring. Depending on the underlying semiring, this allows us to track descriptions of the atomic facts that are responsible for the truth of a statement or practical information about the evaluation such as costs or confidence. Recently, this approach has been expanded to a systematic study of semiring semantics for first-order logic and other logical systems. This raises the question to what extent model-theoretic results can be generalised to semiring semantics and how this relates to the algebraic properties of the underlying semiring.

Here we investigate the availability of compactness in semiring semantics. The appropriate setting for this is based on absorptive semirings with well-defined infinitary products. Compactness can be stated either in terms of satisfiability or in terms of entailment, and these two variants are trivially equivalent in Boolean semantics. However, this is no longer the case in semiring semantics. Compactness in terms of satisfiability, defined as the existence of non-zero valuations, indeed generalises to every infinitary absorptive semiring. For compactness in terms of entailment the situation is different. The entailment relation naturally extends to semiring semantics (via the natural order on the semiring) but this yields a stronger variant of compactness, which fails for certain important semirings, including the tropical semiring and the Łukasiewicz semiring. Our main positive results show that strong compactness does indeed hold for all finite semirings and all lattice semirings.

Keywords and phrases:
Semiring semantics, compactness
Copyright and License:
[Uncaptioned image] © Sophie Brinke, Anuj Dawar, Erich Grädel, Lovro Mrkonjić, and Matthias Naaf; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation → Logic
Editors:
Stefano Guerrini and Barbara König

1 Introduction

We assume familiarity with first-order logic (FO) and recall the classical compactness theorem.

Theorem 1 (Compactness).

For every class of sentences Φ⊆FO and every sentence ψ∈FO,

  1. 1.

    Φ is satisfiable if, and only if, every finite subset Φ0⊆Φ is satisfiable;

  2. 2.

    Φ⊧ψ if, and only if, there exists a finite subset Φ0⊆Φ such that Φ0⊧ψ.

The compactness theorem is a direct consequence of Gödel’s completeness theorem, but it can also be established directly, actually by simpler arguments than those needed for the completeness theorem (see e.g. [21]). The compactness theorem is a fundamental tool for studying the expressive power and structural properties of first-order theories. Many model-theoretic methods directly rely on the compactness theorem, and fail in contexts where compactness is not available. In particular this is the case in finite model theory, where compactness obviously fails111Just take the axiom system for infinity, consisting of the sentences saying that there exist n distinct elements, for all n≥1. While this axiom system is not satisfiable by finite models, each of its finite subsets is. and so do many of its classical consequences, such as most preservation theorems.

The objective of this paper is to explore the status of compactness in semiring semantics, which evaluates logical statements not just by true or false, but by values in some commutative semiring. This approach has its origins in the provenance analysis of database queries. Semiring provenance was introduced by Green, Karvounarakis, and Tannen in the seminal paper [16], based on the idea of annotating the atomic facts in a database by values of a commutative semiring, and propagating these values through a database query, keeping track whether information is used alternatively or jointly. Depending on the chosen semiring, provenance valuations give practical information about a query, for instance concerning the confidence that we may have in its truth, the cost of its evaluation, the required clearance level for the access to not freely available data, the number of successful evaluation strategies, and so on. Beyond such provenance evaluations in specific application semirings, more precise information is obtained by evaluations in provenance semirings of polynomials or formal power series, which permit us to track which atomic facts are used (and how often) to compute the answer to the query. This approach has been successfully applied to many variants of (positive) database queries, including conjunctive queries, positive relational algebra, datalog, nested relations, XML, SQL-aggregates, graph databases (see, e.g., the surveys [17, 9]).

Such detailed information, as provided by semiring provenance, is not only useful in databases, but may be of great interest in many other areas of logic in computer science. In particular, it has been used for the strategy analysis in various forms of finite and infinite games [14, 11, 18]. There thus is ample motivation to extend the approach of semiring provenance beyond (positive) database queries to a general semiring semantics for logical systems, in particular for full first-order logic, but also for modal and temporal logics, and for logics with least and greatest fixed points. This poses a number of mathematical challenges that have been addressed in recent research.

Negation.

While semiring provenance has for a long time been restricted to negation-free queries, a new approach for dealing with negation was proposed in 2017 by Grädel and Tannen [13], based on transformations into negation normal form, quotient semirings of polynomials with dual indeterminates, and a close relationship to semiring valuations of games. This led to a semiring provenance analysis for full first-order logic (over finite domains) and also permitted a reverse provenance analysis, i.e., finding models that satisfy various properties under given provenance tracking assumptions, with applications to explaining missing query answers or failures of integrity constraints and computing repairs. An updated exposition of this approach (with many examples) can be found in [15].

Infinitary operations.

A priori, semirings only provide addition and multiplication operations over finitely many arguments. For the evaluation of infinite collections of sentences (as needed in this paper), and also for the interpretation of quantifiers over infinite domains, semirings need to be expanded by operations over infinite sets of values, with suitable algebraic properties. In some cases this is completely straightforward and unproblematic, for instance for finite min-max semirings or, more generally, for semirings induced by a complete lattice (with suprema and infima as semiring operations). Further there are important semirings, such as the tropical semiring 𝕋=(ℝ+∞,min,+,∞,0) where the definition of the infinitary operations (here infimum and infinitary sum) is obvious, but it is not clear whether all relevant algebraic properties of the semiring operations also hold for their infinitary versions. A systematic study of the algebraic properties of such infinitary operations and, on this basis, a definition of infinitary semirings has recently been proposed in [6].

Logical properties of semiring semantics.

The development of semiring semantics raises the question to what extent classical logical results also hold in this more general context, and how this depends on algebraic properties of the underlying semiring. Research on such questions has included the study of elementary equivalence and the axiomatisability of finite semiring interpretations [12], of the equivalence of the relational calculus with relational algebra (Codd’s Theorem) [3], 0-1 laws [10], Ehrenfeucht–Fraïssé games [5], the locality theorems by Hanf and Gaifman [4], and the interplay between local consistency and global consistency for relations over semirings [1, 2].

The present paper expands this research by a study of compactness in semiring semantics. The appropriate setting for this is provided by infinitary absorptive semirings (see Definition 4 below). Indeed, compactness is concerned with the evaluation of infinite sets of formulae and the properties they entail, compared to the properties entailed by their finite subsets. It is natural to define the valuation of a set of sentences as the product of the valuations of its elements, so we need semirings where infinite products are well-defined. Further, a reasonable notion of entailment requires that we have a partial order on these valuations, with the property that disjunctions increase the values and conjunctions reduce them. This is the case precisely for absorptive semirings; they are naturally ordered by addition in the sense that s≤t:⇔∃r(s+r=t), and the absorption law implies (and is in fact equivalent to) the property that s⋅t≤s for all s,t.

Once this setting, and the semiring semantics of first-order logic, is well-defined, it is easy to see that a weak form of compactness, in terms of satisfiability understood as the existence of non-zero valuations, holds for all infinitary absorptive semirings. Yet, this result marks an essential difference to previous studies of compactness in the context of many-valued logics, where such notions of compactness fail due to different semantics of negation and universal quantification [7]. Beyond that, we study a more powerful variant of compactness in terms of entailment, interpreted via the natural order, which avoids fixing a set of “designated truth values” a priori. We shall prove that strong compactness fails in a number of important semirings, including the tropical semiring, the Łukasiewicz semiring, and the semirings of generalised absorptive polynomials. On the other side, we can prove that strong compactness does generalise to semiring semantics in at least two important cases. For finite semirings, we can encode the semiring interpretations via classical Boolean semantics over an expanded signature, and use this to lift compactness to the semiring setting. This also affects applications usually modeled by semirings for which strong compactness fails as they often have finite analogues that suffice for applications. For instance, instead of doing cost computations in the tropical semiring over the positive reals, we can take a variant with finitely many cost levels and have a cost scenario where compactness applies. A more sophisticated result is the generalisation of strong compactness to (possibly infinite) completely distributive lattice semirings. This requires refinements of the reduction technique based on separating homomorphisms, which were originally introduced in [12]. These take into account the natural order and cope with the lacking continuity of homomorphisms from lattices with dense intervals (such as the fuzzy semiring) into the Boolean semiring. In the appendix we briefly discuss Löwenheim–Skolem theorems (a classical consequence of compactness) in the semiring setting.

2 Semiring Semantics

We summarise the foundations of semiring semantics for first-order logic and refer to [15] for further details.

Definition 2.

A commutative semiring is a structure 𝒮=(S,+,⋅,0,1) with 0≠1 such that (S,+,0) and (S,⋅,1) are commutative monoids, ⋅ distributes over +, and 0⋅s=s⋅0=0.

In the following, we implicitly assume that all semirings are commutative and naturally ordered, that is, s≤t:⇔∃r(s+r=t) defines a partial order. Addition and multiplication are monotone w.r.t. the natural order. For the questions that we study here, the natural scenario is provided by semirings that are absorptive, which means that s+s⁢t=s for all s,t∈S or, equivalently, that multiplication is decreasing in 𝒮. In particular, addition in absorptive semirings is idempotent (i.e., s+s=s for each s∈S), so sums coincide with suprema. Unless multiplication is also idempotent in 𝒮, this need not be true for products and infima. We say that 𝒮 is (multiplicatively) n-idempotent if sn+1=sn for each s∈S. Beyond the Boolean semiring 𝔹=({0,1},∨,∧,0,1), there are many other absorptive semirings that provide useful information about the evaluation of a formula.

  • ■

    A totally ordered set (S,≤) with least element s and greatest element t induces the min-max semiring (S,max,min,s,t). Specific important examples are the Boolean semiring, the fuzzy semiring 𝔽=([0,1],max,min,0,1), and the access control semiring, also called the security semiring [8].

  • ■

    A more general class (than min-max semirings) is the class of lattice semirings (S,⊔,⊓,s,t) induced by a bounded distributive lattice (S,≤). In fact, every absorptive semiring with idempotent multiplication is a lattice semiring.

  • ■

    The tropical semiring 𝕋=(ℝ+∞,min,+,∞,0) is used for cost analysis.

  • ■

    To reason about confidence, we may use the Viterbi semiring 𝕍=([0,1]ℝ,max,⋅,0,1) or the Łukasiewicz semiring 𝕃=([0,1]ℝ,max,⊙,0,1) where s⊙t≔max⁡(s+t−1,0).

  • ■

    The semiring 𝔻=([0,1]ℝ,min,⊕,1,0) with s⊕t≔min⁡(s+t,1) models levels of doubt.

  • ■

    Provenance semirings allow us to track the atomic facts that are responsible for the truth of a formula. In the non-absorptive case, the most general provenance semirings are ℕ⁢[X], the semirings of polynomials over a finite set X of indeterminates and coefficients from ℕ. In the absorptive setting that is relevant here, the important examples are the semirings 𝕊∞⁢(X) of generalised absorptive polynomials. The elements of 𝕊∞⁢(X) are ⪯-antichains of monomials with exponents from ℕ∪{∞} where the absorption order ⪯ is defined by m1⪯m2:⇔∃m(m1=m⋅m2). Further absorptive provenance semirings arise as quotients from 𝕊∞⁢(X). For instance, the lattice semirings PosBool⁢(X) are the quotients induced by x⋅x∼x or, more generally, the quotient semirings 𝕊n⁢(X) are obtained via the congruence generated by xn+1∼xn. See [19] for more details.

To evaluate first-order formulae in these semirings, classical structures are generalised to semiring interpretations that map the atomic facts and their negations to semiring values. While 0 represents falsity, every non-zero element provides an annotation of truth.

Definition 3.

Let A be a finite or infinite universe, let τ be a relational vocabulary, and let 𝒮 be a semiring. We denote by LitA⁡(τ) the set of τ-literals of the form R⁢a¯ or ¬R⁢a¯ that are instantiated with tuples from A. An 𝒮-interpretation (for A and τ) is a function π:LitA⁡(τ)→𝒮. We say that π is model-defining if for every literal L∈LitA⁡(τ) precisely one of the values π⁢(L) and π⁢(¬L) is 0.

We will only consider model-defining interpretations here. To define semiring semantics also for infinite universes A, and to extend it to valuations of infinite collections Φ of first-order sentences, our semirings need to be equipped with infinitary summation and product operators. Algebraic foundations, mathematical properties and provenance valuations of such infinitary semirings have been studied in [6]. Here, only the absorptive case is relevant.

Definition 4.

An infinitary absorptive semiring is the expansion of an absorptive semiring 𝒮 which satisfies the additional properties that

  • ■

    the natural order (𝒮,≤) is a complete lattice and

  • ■

    𝒮 is (fully) continuous: for every non-empty chain C⊆S, the supremum ⨆C and the infimum ⨅C are compatible with addition and multiplication, i.e.

    s∘⨆C=⨆(s∘C) and s∘⨅C=⨅(s∘C),

    for every s∈S and ∘∈{+,⋅}, where (s∘C)≔{s∘c∣c∈C}.

As a consequence, we can define natural infinitary addition and multiplication operations in 𝒮 by taking suprema of finite subsums and infima of finite subproducts:

∑i∈Isi≔⨆I0⊆II0⁢ finite(∑i∈I0si) and ∏i∈Isi≔⨅I0⊆II0⁢ finite(∏i∈I0si).
Definition 5.

Let 𝒮 and 𝒯 be infinitary absorptive semirings. An infinitary homomorphism (or ∞-homomorphism) is a semiring homomorphism h:𝒮→𝒯 such that for all sequences (si)i∈I in 𝒮, it holds that h⁢(∑i∈Isi)=∑i∈Ih⁢(si) and h⁢(∏i∈Isi)=∏i∈Ih⁢(si). We denote by Hom⁡(𝒮,𝒯) the set of semiring homomorphisms h:𝒮→𝒯 and by Hom∞⁢(𝒮,𝒯) the set of infinitary homomorphisms from 𝒮 to 𝒯.

All examples of practically relevant semirings we mentioned before are infinitary absorptive semirings, and the natural infinitary sums and products they admit correspond to this definition. Moreover, these operations have similar properties as the finitary ones: infinitary addition is the same as the supremum, i.e. ∑i∈Isi=⨆i∈Isi, while infinitary multiplication is decreasing but need not coincide with infima.222Indeed, we note that there are infinitary absorptive semirings in which the natural order is a completely distributive lattice (i.e. infima and suprema satisfy a strong distributive law [6, definition 13] over infinite index sets), but strong distributivity does not hold for the infinitary semiring operations defined above. Two such examples are the Viterbi semiring 𝕍 and the tropical semiring 𝕋, in which the natural order is linear and completely distributive, but the strong distributive law fails for uncountable index sets, as shown in [6].

Using the (infinitary) semiring operations, semiring semantics lifts each 𝒮-interpretation to a mapping FOA⁡(τ)→𝒮 where FOA⁡(τ) is the set of first-order formulae instantiated with elements from the universe A. Our treatment of negation is based on negation normal form (nnf). This has emerged as a standard approach in semiring semantics, and is explained in detail in [15].

Definition 6 (Semiring Semantics).

For every φ∈FOA⁡(τ), the semiring valuation π⟦φ⟧ is inductively defined as follows. Equalities are interpreted by their truth value, that is, π⟦a=a⟧≔1 and π⟦a=b⟧≔0 for a≠b (and analogously for inequalities). Further, we set π⟦φ⟧≔π(φ) for literals L∈LitA⁡(τ), π⟦¬ψ⟧≔π⟦nnf(¬ψ)⟧, and

π⟦ψ∨ϑ⟧ ≔π⟦ψ⟧+π⟦ϑ⟧, π⟦∃xψ(x)⟧ ≔∑a∈Aπ⟦ψ(a)⟧=⨆a∈Aπ⟦ψ(a)⟧,
π⟦ψ∧ϑ⟧ ≔π⟦ψ⟧⋅π⟦ϑ⟧, π⟦∀xψ(x)⟧ ≔∏a∈Aπ⟦ψ(a)⟧=⨅A0⊆finA(∏a∈A0π⟦ψ(a)⟧).

Note that we can omit the finite subsums in the definition of the existential quantifier due to the fact that addition and suprema coincide. For finite or infinite sets Φ⊆FOA⁡(τ) we set π⟦Φ⟧≔∏φ∈Φπ⟦φ⟧=⨅Φ0⊆finΦ(∏φ∈Φ0π⟦φ⟧).

Lemma 7 (Fundamental Property).

Let π:LitA⁡(τ)→𝒮 be an 𝒮-interpretation and h:𝒮→𝒯 be an infinitary homomorphism. Then (h∘π) is a 𝒯-interpretation and it holds that h(π⟦φ⟧)=(h∘π)⟦φ⟧ for all φ∈FOA⁡(τ).

Definition 8.

Let Φ⊆FO be a set of first-order sentences, ψ∈FO, and let 𝒮 be an infinitary absorptive semiring. We write

  1. (1)

    Φ≡𝒮0 if π⟦Φ⟧=0 for every model-defining 𝒮-interpretation π;

  2. (2)

    Φ⊧𝒮ψ if π⟦Φ⟧≤π⟦ψ⟧ for every model-defining 𝒮-interpretation π.

We shall see that entailments that hold in the Boolean sense need not be preserved when moving to more complex semirings. Conversely, all entailments that hold in an infinitary absorptive semiring 𝒮 are preserved in subsemirings 𝒮′⊆𝒮 (i.e. in the restriction of 𝒮 to any subset S′⊆S that contains 0 and 1 and which is closed under finite and infinitary addition and multiplication). This is immediate from the fact that every 𝒮′-interpretation π can also be considered as an 𝒮-interpretation, which gives to every sentence, and every set of sentences, the same value in 𝒮 and 𝒮′.

Lemma 9.

If Φ⊧𝒮ψ then also Φ⊧𝒮′ψ for every subsemiring 𝒮′⊆𝒮.

We are now ready to define two notions of compactness in semiring semantics.

Definition 10.

Let 𝒮 be an infinitary absorptive semiring.

  1. (1)

    𝒮 has weak compactness if for every set Φ⊆FO such that Φ≡𝒮0 there exists a finite subset Φ0⊆Φ such that Φ0≡𝒮0.

  2. (2)

    𝒮 has strong compactness if for every set Φ⊆FO and every ψ∈FO such that Φ⊧𝒮ψ there exists a finite subset Φ0⊆Φ such that Φ0⊧𝒮ψ.

3 Separating Weak from Strong Compactness

Clearly, strong compactness implies weak compactness (we can choose an unsatisfiable formula for ψ). We shall see that the converse is in general not true. Notice that in the classical compactness theorem for Boolean semantics, the two statements imply each other due to the fact that Φ⊧ψ if, and only if, Φ∪{¬ψ} is unsatisfiable. In semiring semantics we only have that Φ⊧𝒮ψ implies that Φ∪{¬ψ}≡𝒮0. The converse implication fails in general (see Example 12).

Lemma 11.

Φ⊧𝒮ψ implies Φ∪{¬ψ}≡𝒮0.

Proof.

Let π be model-defining. If π⟦Φ⟧≤π⟦ψ⟧ then

π⟦Φ∪{¬ψ}⟧=π⟦Φ⟧⋅π⟦¬ψ⟧≤(1)π⟦ψ⟧⋅π⟦¬ψ⟧=(2)0,

where (1) is due to monotonicity and (2) follows inductively from the fact that π⁢(L)⋅π⁢(¬L)=0 for all literals L∈LitA⁡(τ) as π is model-defining. ◀

Example 12.

The converse does not hold in general. For instance, consider φ=∃x⁢(x=x) and ψ=∃x⁢(P⁢x∨¬P⁢x). Since π⟦¬ψ⟧=π⟦∀x(Px∧¬Px)⟧=0 for all model-defining semiring interpretations π, we have φ∪{¬ψ}≡𝒮0.

Any infinitary absorptive semiring 𝒮 with |𝒮|≥3 has an element 0<ε<1. The 𝒮-interpretation π′⁢(P⁢a)=ε, π′⁢(¬P⁢a)=0 (for all a∈A, with arbitrary universe A) is a counterexample for φ⊧𝒮ψ, since π′⟦φ⟧=1 but π′⟦ψ⟧=ε. ⌟

By the classical compactness theorem, the Boolean semiring 𝔹 has strong compactness. The question we want to answer is which other semirings have strong (or just weak) compactness.

With every 𝒮-interpretation π:LitA⁡(τ)→𝒮 we associate its flattening π𝔹 such that for every literal L∈LitA⁡(τ) we have that π𝔹⁢(L)=0 if π⁢(L)=0 and π𝔹⁢(L)=1 otherwise. Notice that π𝔹 can be viewed as a 𝔹-interpretation (i.e. a classical τ-structure) but also as an 𝒮-interpretation that only takes the values 0 and 1. Further, by the monotonicity of (infinitary) addition and multiplication and the fact that 1 is maximal in absorptive semirings, it follows that π⟦ψ⟧≤π𝔹⟦ψ⟧ for all ψ∈FO.

Proposition 13.

Every infinitary absorptive semiring has weak compactness.

Proof.

Let Φ≡𝒮0. Then Φ≡𝔹0. To see this, consider any model-defining 𝔹-interpretation π. We can view π as an 𝒮-interpretation, which we denote as π𝒮 (so that (π𝒮)𝔹=π). Since addition in 𝒮 is idempotent (we need 1+1=1), 𝔹 is a subsemiring of 𝒮, and we have π𝒮⟦φ⟧=π⟦φ⟧ for all φ∈FO. Hence π𝒮⟦Φ⟧=0 implies π⟦Φ⟧=0. By the classical compactness theorem, there exists a finite subset Φ0⊆Φ such that Φ0≡𝔹0. But, then we have, for every 𝒮-interpretation π that

π⟦Φ0⟧=∏φ∈Φ0π⟦φ⟧≤∏φ∈Φ0π𝔹⟦φ⟧=π𝔹⟦Φ0⟧=0.

◀

However, for strong compactness, the situation is different.

Proposition 14.

Let 𝒮 be any infinitary absorptive semiring such that for every n∈ℕ there is some element sn∈𝒮 such that (sn)∞≔⨅{(sn)m∣m<ω}<(sn)n (i.e., that is not multiplicatively n-idempotent for any n). Then 𝒮 does not have strong compactness.

Proof.

Let P be a unary predicate and let ψ≔∀x⁢∃y⁢P⁢y. Further let Φ≔{φn∣n≥1} where φn is the n-fold conjunction of the same formula ∃y⁢P⁢y.

We first claim that Φ⊧𝒮ψ. Let π be an arbitrary 𝒮-interpretation over a universe A with r≔π⟦∃yPy⟧. It follows that π⟦Φ⟧=∏{rn∣n>0}=r∞ while π⟦ψ⟧=rn if A is finite with n elements and π⟦ψ⟧=r∞ if A is infinite. In both cases π⟦Φ⟧≤π⟦ψ⟧.

For every finite subset Φ0⊆Φ and every 𝒮-interpretation π over an infinite universe, we have that π⟦ψ⟧=r∞, where r=π⟦∃yPy⟧, but π⟦Φ0⟧=rn for some n (that depends on Φ0). If we choose πn in such a way that πn⟦∃yPy⟧=sn we have πn⟦Φ0⟧=(sn)n>(sn)∞=πn⟦ψ⟧ so Φ0⊧̸𝒮ψ. Thus, strong compactness is violated. ◀

Corollary 15.

The tropical semiring 𝕋, the Viterbi semiring 𝕍, the semirings of generalised absorptive polynomials 𝕊∞⁢(X), the Łukasiewicz semiring 𝕃 and the semiring of doubt 𝔻 are not multiplicatively n-idempotent for any n and therefore do not have strong compactness.

4 Finite Semirings

Let 𝒮 be a finite absorptive semiring with infinitary operations in the sense of Definition 4. Finiteness of 𝒮 trivially implies that there is some n∈ℕ>0 such that multiplication in 𝒮 is n-idempotent, that is, we have sn=sn+1=…=s∞.

With every 𝒮-interpretation π:LitA⁡(τ)→𝒮 we associate a classical structure ℭ⁢(π) over the same universe A and with vocabulary τ𝒮≔{Rs∣R∈τ,s∈𝒮}∪{Rs¬∣R∈τ,s∈𝒮} such that a¯∈Rs if π⁢(R⁢a¯)=s and a¯∈Rs¬ if π⁢(¬R⁢a¯)=s. We can axiomatise structures of this form by the set of formulae

Θτ ≔{αL∣L=R⁢ or ⁢L=R¬⁢ for ⁢R∈τ}∪{βR∣R∈τ}with
αL ≔∀x¯⁢(⋁s∈𝒮Ls⁢x¯∧⋀s≠t¬(Ls⁢x¯∧Lt⁢x¯)) and βR≔∀x¯⁢(R0⁢x¯⊕R0¬⁢x¯).
Lemma 16.

For every τ𝒮-structure 𝔅 we have that 𝔅⊧Θτ if, and only if, 𝔅=ℭ⁢(π) for some model-defining 𝒮-interpretation π.

Proposition 17.

For every formula ψ⁢(x¯)∈FO⁡(τ) there exists a family of formulae (ψ=s⁢(x¯))s∈S in FO⁡(τ𝒮) such that for every 𝒮-interpretation π:LitA⁡(τ)→𝒮, every tuple a¯, and every value s∈S we have that π⟦ψ(a¯)⟧=s, if, and only if, ℭ⁢(π)⊧ψ=s⁢(a¯).

Proof.

Literals R⁢x¯ and ¬R⁢x¯ are translated to Rs⁢x¯ and Rs¬⁢x¯, respectively. For ⋆∈{∨,∧}, choose ∘∈{+,⋅}, respectively, and translate ψ=φ⋆ϑ to ψ=s≔⋁r∘t=sφ=r∧ϑ=t, going through all combinations r,t of semiring values that yield s.

For ψ=∀y⁢φ, the construction relies on the fact that multiplication in 𝒮 is n-idempotent for some n. For every s∈𝒮, let Fs be the set of those functions f:𝒮→{0,…,n} such that ∏t∈𝒮tf⁢(t)=s, that is, each f∈Fs represents a factorisation of s. For any 𝒮-interpretation π:LitA⁡(τ)→𝒮, we have that

π⟦∀yφ⟧=∏a∈Aπ⟦φ(a)⟧=∏t∈𝒮t|{a∣π⟦φ(a)⟧=t}|,

with the convention that 00=1. Thus the formula

ψ=s ≔⋁f∈Fs⋀t∈𝒮ϑf,t with ϑf,t={∃=f⁢(t)y⁢φ=t⁢(y) if ⁢f⁢(t)<n⁢ and∃≥f⁢(t)y⁢φ=t⁢(y) if ⁢f⁢(t)=n

expresses that for one of the functions f∈Fs there are indeed precisely f⁢(t) values a such that φ⁢(a) evaluates to t in case that f⁢(t) is smaller than n, and at least n such values if f⁢(t)=n (so that t|{a∣π⟦φ(a)⟧=t}|=tn=tf⁢(t)). This implies that ℭ⁢(π)⊧ψ=s if, and only if, π⟦ψ⟧=s. For ψ=∃y⁢φ, we can use an analogous construction with n≔1, since addition in 𝒮 is idempotent. ◀

Theorem 18.

Every finite absorptive semiring 𝒮 has strong compactness.

Proof.

Suppose that Φ⊧𝒮ψ. We observe that for every 𝒮-interpretation π, there is a finite subset Φ⁢(π)⊆Φ, such that π⟦Φ(π)⟧≤π⟦Ψ⟧ for any finite Ψ⊆Φ. Suppose for a contradiction that this is not the case. Since 𝒮 is finite, there are only finitely many values π⟦Ψ⟧ for finite subsets Ψ⊆Φ. If there is no minimum value, then there must be finitely many incomparable minimal values π⟦Φ1⟧,…,π⟦Φm⟧ with m>1. Let Φ⁢(π)≔⋃1≤i≤mΦi. Then π⟦Φ(π)⟧≤π⟦Φi⟧ for all 1≤i≤m, in particular, π⟦Φ(π)⟧ is the minimum value with respect to ≤, a contradiction.

Moreover, π⟦Φ(π)⟧=π⟦Φ⟧, since we can write π⟦Φ⟧=∏s∈𝒮s|{φ∈Φ∣π⟦φ⟧=s}|, but since the multiplicative order of each s is finite, a finite subset of {φ∈Φ∣π⟦φ⟧=s} suffices. Thus π⟦Φ⟧=π⟦Ψ⟧ for some finite subset Ψ⊆Φ, which implies π⟦Φ(π)⟧≤π⟦Φ⟧.

For every finite subset Φ0⊆Φ, let η⁢(Φ0)≔⋁s≤t(⋀Φ0)=s∧ψ=t∈FO⁡(τ𝒮). Clearly, we have ℭ⁢(π)⊧η⁢(Φ0) if, and only if, π⟦Φ0⟧≤π⟦ψ⟧.

Claim.

Ψ≔Θτ∪{¬η⁢(Φ0)∣Φ0⁢ is a finite subset of ⁢Φ} is unsatisfiable.

Indeed, suppose that 𝔅⊧Ψ. Since 𝔅⊧Θτ we have that 𝔅=ℭ⁢(π) for some model-defining 𝒮-interpretation π. Moreover, π⟦Φ0⟧≰π⟦ψ⟧ for every finite subset Φ0⊆Φ, in particular for Φ0=Φ⁢(π). But since π⟦Φ(π)⟧=π⟦Φ⟧ this would imply that Φ⊧̸𝒮ψ, a contradiction.

It follows, by compactness, that there exists a finite unsatisfiable subset Ψ0⊆Ψ. Let

Φ∗≔⋃{Φ0∣¬η⁢(Φ0)∈Ψ0}.

Clearly, Φ∗ is a finite subset of Φ. It remains to prove that Φ∗⊧𝒮ψ. If not, then there exists an 𝒮-interpretation π with π⟦Φ∗⟧≰π⟦ψ⟧. The associated τ𝒮-structure ℭ⁢(π) would clearly satisfy Θτ as well as all formulae ¬η⁢(Φ0)∈Ψ0 since otherwise π⟦Φ0⟧≤π⟦ψ⟧. Thus, we would have that ℭ⁢(π)⊧Ψ0, contradicting the unsatisfiability of Ψ0. ◀

5 Lattice Semirings

Based on a reduction to the 3-element min-max semiring 𝒮3=({0<ε<1},max,min,0,1), we show that every completely distributive lattice semiring ℒ=(L,⊔,⊓,0,1) has strong compactness. To this end, we make use of the lattice semiring ℒ∗=(L∪{0∗},⊔,⊓,0∗,1) which adds a new zero 0∗ to ℒ and prove for all Φ⊆FO and φ,ψ∈FO that

  1. (1)

    Φ⊧ℒψ implies Φ⊧𝒮3ψ,

  2. (2)

    {φ}⊧𝒮3ψ implies {φ}⊧ℒ∗ψ, and

  3. (3)

    {φ}⊧ℒ∗ψ implies {φ}⊧ℒψ.

Starting from Φ⊧ℒψ we can then infer Φ⊧𝒮3ψ and apply strong compactness of 𝒮3 due to its finiteness, which yields some finite Φ0⊆Φ with {⋀Φ0}≡Φ0⊧𝒮3ψ and, in turn, implies Φ0⊧ℒ∗ψ and thus Φ0⊧ℒψ. The first implication follows immediately from the fact that 𝒮3 can be considered a sublattice of ℒ (see Lemma 9). To prove the third implication, we note that we obtain an ∞-homomorphism h:ℒ∗→ℒ by mapping every element to itself except for 0∗, which is mapped to 0.

Lemma 19.

If {φ}⊧ℒ∗ψ, then also {φ}⊧ℒψ.

Proof.

With each model-defining ℒ-interpretation π, we associate an ℒ∗-interpretation π∗ with π∗⁢(L)=0∗ if π⁢(L)=0 and π∗⁢(L)=π⁢(L) otherwise. Clearly, π∗ is also model-defining, and, by hypothesis, we have that π∗⟦φ⟧≤π∗⟦ψ⟧. Since h preserves the order on ℒ∗, this implies π⟦φ⟧=(h∘π∗)⟦φ⟧=h(π∗⟦φ⟧)≤h(π∗⟦ψ⟧)=(h∘π∗)⟦ψ⟧=π⟦ψ⟧. ◀

Thus, it remains to prove the second implication, which, for lattices without dense intervals, can be proved using separating ∞-homomorphisms and the fundamental property.

5.1 Reduction via Separating Homomorphisms

Separating sets of homomorphisms contain for each s≠t some h with h⁢(s)≠h⁢(t) and were introduced in [12] for the purpose of reducing elementary equivalence from one semiring to another. The main idea behind this condition is to transfer counterexamples against elementary equivalence to the target semiring by applying one of the homomorphisms. By additionally demanding that the homomorphism for s and t should not introduce new inequalities between s and t, we can extend this reduction technique to the entailment relation.

Definition 20.

A set H⊆Hom∞⁡(𝒮,𝒯) is ≤-separating if for every s≰t∈𝒮, there is some infinitary homomorphism h∈H such that h⁢(s)≰h⁢(t) and h−1⁢(0)={0}.

Proposition 21.

If there is a ≤-separating set H⊆Hom∞⁡(𝒮,𝒯) and Φ⊧𝒯ψ, then we also have that Φ⊧𝒮ψ.

Proof.

We prove the contraposition. Let π be a model-defining 𝒮-interpretation such that s≔π⟦Φ⟧≰π⟦ψ⟧≕t and h∈H be a homomorphism which ≤-separates s from t. Since h−1⁢(0)={0}, (h∘π) is also model-defining. By the fundamental property, we conclude (h∘π)⟦Φ⟧=h(π⟦Φ⟧)≰h(π⟦ψ⟧)=(h∘π)⟦ψ⟧. Hence, Φ⊧̸𝒯ψ. ◀

Note that the additional condition h−1⁢(0)={0} is the reason why we reduce entailment in ℒ to 𝒮3 by taking a detour via ℒ∗. Homomorphisms into 𝒮3 with h−1⁢(0)={0} can only exist if 0 does not have non-trivial divisors s,t≠0, which is not necessarily true for ℒ, but always true in ℒ∗. Indeed, s⊓t=0 implies h⁢(s)⊓h⁢(t)=h⁢(s⊓t)=h⁢(0)=0, i.e. h⁢(s)=0 or h⁢(t)=0.

It can be shown that ≤-separating sets of finitary homomorphisms H⊆Hom⁡(ℒ∗,𝒮3) exist for every lattice semiring ℒ [5], but in order to apply the fundamental property, we additionally need that the homomorphisms in H respect the infinitary operations. The existence of some ≤-separating H⊆Hom∞⁡(ℒ∗,𝒮3), however, is not ensured, not even if ℒ is induced by a linear order, which is due to the possible presence of dense intervals. Suppose that ℒ is linearly ordered and [s,t] with s<t is dense. For each homomorphism which ≤-separates s from t there must be some threshold u∈[s,t] such that either h−1⁢(ε)=(0∗,u) or h−1⁢(ε)=(0∗,u]. In the first case, we observe that h⁢(⨆[s,u))=1≠ε=⨆{h⁢(v)∣s≤v<u} while in the second case h⁢(⨅(u,t])=ε≠1=⨅{h⁢(v)∣u<v≤t}, so h cannot be infinitary. As a consequence, we might have that h(π⟦∃xRx⟧)>(h∘π)⟦∃xRx⟧ or h(π⟦∀xRx⟧)<(h∘π)⟦∀xRx⟧ if {π⁢(R⁢a)∣a∈A} converges to u, so the fundamental property fails.

Lemma 22.

There is a ≤-separating set of ∞-homomorphisms from ℒ∗ to 𝒮3 if, and only if, ℒ is a completely distributive lattice without dense intervals.

Corollary 23.

Each completely distributive lattice without dense intervals has strong compactness.

5.2 Workaround for Dense Lattices

In order to generalise the reduction technique to lattices that contain dense intervals, we develop a weaker condition which relies on homomorphisms that are not necessarily infinitary. Without compatibility with the infinitary operations we cannot apply the fundamental property as before. However, making use of the fact that we consider homomorphisms into a min-max semiring, we can prove a weaker relationship between h(π⟦φ⟧) and (h∘π)⟦φ⟧. The main idea here is to exclude the suprema and infima that h might not commute with. In the special case discussed in the previous section where ℒ is a min-max semiring, the fact that h is not infinitary affects just one threshold value u in ℒ. Whenever π⟦φ⟧≠u, we still have h(π⟦φ⟧)=(h∘π)⟦φ⟧ although h is not infinitary.

Proposition 24.

Let h:𝒮→𝒯 be a homomorphism (which does not necessarily respect the infinitary operations) into a min-max semiring 𝒯, and let t∈𝒯.

  1. (1)

    If h(π⟦φ(a¯)⟧)≥t and if for all X⊆𝒮 with π⟦φ(a¯)⟧=⨆X there is some x∈X such that h⁢(x)≥t, then also (h∘π)⟦φ(a¯)⟧≥t.

  2. (2)

    If h(π⟦φ(a¯)⟧)≤t and if for all X⊆𝒮 with π⟦φ(a¯)⟧=⨅X there is some x∈X such that h⁢(x)≤t, then also (h∘π)⟦φ(a¯)⟧≤t.

Based on the idea that the homomorphism separating s from t need not be infinitary in general, but the parts where it is not should neither match s nor t, we can formulate a weaker condition which we want to use to infer {φ}⊧ℒ∗ψ from {φ}⊧𝒮3ψ.

Definition 25.

A set H⊆Hom⁡(𝒮,𝒯) of homomorphisms (that are not necessarily infinitary) is weakly ≤-separating if for each s≰t, there is some h∈H with h−1⁢(0)={0} such that

  1. (1)

    h⁢(s)≰h⁢(t);

  2. (2)

    if s=⨆X, then h⁢(s)=h⁢(x) for some x∈X;

  3. (3)

    if t=⨅X, then h⁢(t)=h⁢(x) for some x∈X.

Proposition 26.

If there is a weakly ≤-separating set H⊆Hom⁡(𝒮,𝒯) where 𝒯 is a min-max semiring and {φ}⊧𝒯ψ, then it also holds that {φ}⊧𝒮ψ.

Proof.

Let π be an 𝒮-interpretation violating {φ}⊧𝒮ψ and h∈H be a homomorphism which weakly ≤-separates π⟦φ⟧ from π⟦ψ⟧. Making use of Proposition 24 we obtain that (h∘π)⟦φ⟧≥h(π⟦φ⟧)>h(π⟦ψ⟧)≥(h∘π)⟦ψ⟧, i.e. {φ}⊧̸𝒯ψ. ◀

It remains to prove that there is a weakly ≤-separating set of homomorphisms h:ℒ∗→𝒮3 for every completely distributive lattice ℒ. For min-max semirings, this is straightforward: If there is some s>u>t, we can weakly ≤-separate s from t via h with h−1⁢(ε)=(0∗,u], and if otherwise t is direct predecessor of s, we choose h−1⁢(ε)=(0∗,t]. For general lattices, on the contrary, this procedure does not necessarily yield a homomorphism as it might be the case that u is an infimum of greater elements. Instead, homomorphisms from ℒ to 𝔹 correspond to the prime ideals in ℒ.

Definition 27.

A prime ideal of ℒ is a non-empty proper subset P⊊ℒ which is downward-closed, closed under finite suprema, and satisfies x⊓y∈P⇒{x,y}∩P≠∅ for x,y∈ℒ.

If P is a prime ideal of ℒ, it induces the homomorphism hP:ℒ∗→𝒮3 with hP⁢(0∗)=0, hP⁢(u)=ε if u∈P and hP⁢(u)=1 otherwise. While hP only violates the fundamental property at a single “boundary” element u if ℒ is a min-max semiring, multiple boundary elements may exist in the general case. Thus, we want to construct a prime ideal P such that neither s nor t lie on the boundary of P. More precisely, P has to satisfy the following conditions, which ensure that the induced homomorphism hP weakly ≤-separates s from t.

  1. (1)

    t∈P and s∉P,

  2. (2)

    t≠⨅X for all X⊆𝒮∖P and

  3. (3)

    s≠⨆X for all X⊆P.

5.3 Construction of the Prime Ideals

In order to construct for each s≰t a prime ideal with the required properties, we make use of the lattice-theoretic notions from [20] and analyze the minimum semi-ideals with a particular supremum.

Definition 28.

A semi-ideal of ℒ is a downward-closed subset I⊆ℒ. For s∈ℒ let K⁢(s)≔⋂{I∣I⁢ semi-ideal s.t. ⁢⨆I≥s}.

Lemma 29 ([20]).

The following holds for all s,t∈ℒ and X⊆ℒ:

  1. (1)

    If s≤t, then K⁢(s)⊆K⁢(t);

  2. (2)

    K⁢(⨆X)=⋃{K⁢(x)∣x∈X};

  3. (3)

    ⨆K⁢(s)=s;

  4. (4)

    s∈K⁢(t) if, and only if, there is some u∈ℒ such that s∈K⁢(u) and u∈K⁢(t).

The idea now is to fix an appropriate chain C depending on the elements s≰t we want to separate and track for each x∈ℒ which elements of C must be contained in every semi-ideal with supremum x. This induces a partial order on ℒ (that might be different from the lattice order), which we can use to construct a homomorphism h:ℒ→𝔹 based on a threshold, analogously to the special case where the lattice order was linear.

For s≰t we have that K⁢(s)⊈K⁢(t) (since otherwise s=⨆K⁢(s)≤⨆K⁢(t)=t). In order to construct C, fix some u∈K⁢(s)∖K⁢(t) and choose v,w∈ℒ such that u∈K⁢(v),v∈K⁢(w), and w∈K⁢(s), which exist by Lemma 29(4). While u and v will make sure that s∉P and t∈P, we use w to argue that s cannot be the supremum of elements inside P. To ensure the dual property w.r.t. t and that the induced homomorphism hP commutes with infima, we inductively extend {u,v,w} to C={ci∣i∈ω}∪{v,w} by setting c0=u and choosing ci+1 arbitrarily such that ci∈K⁢(ci+1) and ci+1∈K⁢(v). Note that a∈K⁢(b) implies a≤b as {c∣c≤b} is a semi-ideal with supremum b. Thus, C is a chain.

We claim that P≔{x∣K⁢(x)∩C⊊K⁢(v)∩C}={x∣K⁢(x)∩C⊉K⁢(v)∩C} has the desired properties w.r.t. s and t. First, we prove that P induces a homomorphism hP:ℒ→𝔹 (and thus a homomorphism hP:ℒ∗→𝒮3) which even commutes with arbitrary infima (while this is in general not true for suprema).

Figure 1: Construction of the prime ideal weakly ≤-separating s from t, where x∉P in the case on the left and x∈P on the right.
Theorem 30.

P is a prime ideal and for each X⊆ℒ with ⨅X∈P, it holds that X∩P≠∅.

Proof.

Let x0,x1∈P, i.e. K⁢(xi)∩C⊊K⁢(v)∩C for i∈{0,1}. By downward-closedness, there must be an i∈{0,1} such that K⁢(xi)∩C⊆K⁢(x1−i)∩C. With Lemma 29(2) this yields K⁢(x0⊔x1)∩C=(K⁢(x0)∪K⁢(x1))∩C=(K⁢(x0)∩C)∪(K⁢(x1)∩C)=K⁢(x1−i)∩C⊊K⁢(v)∩C and thus x0⊔x1∈P. Now let x≤y∈P. Since K⁢(x)∩C⊆K⁢(y)∩C⊊K⁢(v)∩C, we also have that x∈P.

It remains to prove that ⨅X∈P implies X∩P≠∅. We prove the contraposition, so let X⊆ℒ such that K⁢(v)∩C⊆K⁢(x)∩C for each x∈X. We claim that K⁢(v)∩C⊆K⁢(⨅X)∩C. Let y∈K⁢(v)∩C. By definition of C, there must be some z such that y∈K⁢(z) and z∈K⁢(v)∩C⊆⋂{K⁢(x)∩C∣x∈X} (if y∈{v,w}, we can choose z≔v, and for y=ci, we pick z≔ci+1). Hence, z≤x for each x∈X, implying z≤⨅X. With y∈K⁢(z) this yields y∈K⁢(⨅X) as required. ◀

By choice of C, we can finally argue that the induced homomorphism hP:ℒ∗→𝒮3 weakly ≤-separates s from t.

Theorem 31.

We have that t∈P and s∉P while t≠⨅X for all X⊆ℒ∖P and s≠⨆X for all X⊆P.

Proof.

By definition, u∈K⁢(v)∩C while u∉K⁢(t). Hence, K⁢(t)∩C⊉K⁢(v)∩C, i.e. t∈P. Further, s∉P as v∈K⁢(s) and thus v≤s, which implies K⁢(s)∩C⊇K⁢(v)∩C. For X⊆ℒ∖P we have that ⨅X∉P by Theorem 30, hence ⨅X≠t∈P. Finally, let X⊆P. Then K⁢(⨆X)∩C=⋃{K⁢(x)∣x∈X}∩C=⋃{K⁢(x)∩C∣x∈X}⊆K⁢(v)∩C. Now suppose that s=⨆X, i.e. K⁢(s)∩C⊆K⁢(v)∩C. By construction, w∈K⁢(s) and thus w≤s, which implies K⁢(w)∩C⊆K⁢(s)∩C and yields with v∈K⁢(w) that v∈K⁢(s)∩C⊆K⁢(v). But I=⋃{{y∣y≤x}∣x∈X} is a semi-ideal with ⨆I=⨆X=s≥v. Further, we have that v∉I since v∉P while I⊆P due to X⊆P and downward-closure of P. This is a contradiction to v∈K⁢(v). ◀

Corollary 32.

There is a weakly ≤-separating set H⊆Hom⁡(ℒ∗,𝒮3) for every completely distributive lattice ℒ. Hence, every completely distributive lattice has strong compactness.

Note that we lose implications when moving from the Boolean semiring to a lattice ℒ≇𝔹. For instance, we have that ∀x⁢(x=x)⊧𝔹∀x⁢(R⁢x∨¬R⁢x) while ∀x⁢(x=x)⊧̸ℒ∀x⁢(R⁢x∨¬R⁢x), so even for lattices the entailment relation actually becomes more fine-grained. However, the proof of strong compactness for lattices implies that as soon as ℒ contains at least three elements, so is not isomorphic to 𝔹, then the same implications Φ⊧ℒψ will hold, no matter which specific lattice we consider.

Example 33.

Consider the fuzzy semiring 𝔽 and an 𝔽-interpretation π with universe A. For φn≔∃x1⁢…⁢∃xn⁢(⋀i<j≤nxi≠xj∧⋀i≤nR⁢ai) and Φ={φn∣n∈ω} we have that

π⟦Φ⟧=⨅n∈ω⨆A′⊆A,|A′|=n⨅a∈A′π(Ra)=⨆A′⊆A,|A′|=ω⨅{π(Ra)∣a∈A′}≕sπ

due to complete distributivity. However, we can use strong compactness to prove that Φ cannot be collapsed to a single axiom ψ with ψ≡𝔽Φ on 𝔽. Towards a contradiction, suppose that there was some ψ∈FO with π⟦ψ⟧=sπ for each 𝔽-interpretation π. By definition, we have that Φ⊧𝔽ψ and, since 𝔽 has strong compactness, there must be some n0∈ω such that {φn∣n≤n0}⊧𝔽ψ. But for the 𝔽-interpretation π over universe A={ai∣i∈ω} with π⁢(R⁢ai)=0.5i we have π⟦{φn∣n≤n0}⟧=0.5n0>0=sπ, a contradiction. ⌟

6 Compactness up to Powers

The counterexamples against strong compactness from Section 3 rely on the following idea: By using the n-fold conjunction of the same formula, Φ was constructed such that it must be evaluated to some infinite power while every finite Φ0⊆Φ evaluates to a finite power. This raises the question whether this is the only reason why strong compactness fails for semirings such as 𝕍,𝕃, or 𝕊∞⁢(X) and whether these semirings still satisfy a weaker variant of compactness which takes finite conjunctions of formulae into account.

Definition 34.

We say that an infinitary absorptive semiring 𝒮 has strong compactness up to powers if for every Φ⊆FO and every ψ∈FO such that Φ⊧𝒮ψ there exists a finite subset Φ0⊆Φ such that {φn∣φ∈Φ0,n∈ω}⊧𝒮ψ where φn denotes the n-fold conjunction of φ.

We show that, even in this weakened variant, strong compactness does not generalise to the semiring setting. To see this, consider the Viterbi semiring and suppose that π is an infinite 𝕍-interpretation. Evaluating ψ≔∀x⁢∃y⁢∀z⁢E⁢x⁢y on π yields π⟦ψ⟧=∏a∈A⨆b∈Aπ(Eab)|A|, i.e. π⟦ψ⟧=1 if for each a∈A there is some b∈A s.t. π⁢(E⁢a⁢b)=1, and π⟦ψ⟧=0 otherwise. Now assume that there is a Boolean linear order available on π (in 𝕍 we can even use ∀x⁢∀y⁢∀z⁢(x<y∨x≮y) to express that < is Boolean) and compare π⟦ψ⟧ to the relativised formula ϑ≔∀x⁢∃y⁢∀z⁢(z≮x∨E⁢x⁢y). Analogously to the previous case, we can only have that π⟦ϑ⟧>0 if for every a∈A with infinitely many <-predecessors, there is some b∈A s.t. π⁢(E⁢a⁢b)=1 because π⟦ϑ⟧=∏a∈A⨆b∈Aπ(Eab)|{c∣c<a}|. Based on this observation, we can construct a counterexample against strong compactness up to powers for 𝕍. By adding formulae φn for each n to ϑ which make sure that the n-th minimal element in π also has an outgoing edge valuated with 1, we obtain a set Φ with Φ⊧𝕍ψ. However, a finite subset Φ0⊆{ϑ}∪{φn∣n<n0} cannot make sure that the n0-th element an0 has an outgoing edge labelled 1. Instead, we might still have that π⟦Φ0⟧=π⟦Φ0⟧∞=1 if {π⁢(E⁢an0⁢b)∣b∈A} converges to 1. The main property we use here is that even if (si)i∈I⊆𝕍 converges to 1, it might be that ⨆i∈Isi∞≠1=(⨆i∈Isi)∞ while ⨆i∈Isin=1 for each n or, more generally, that h:x↦x∞ does not commute with suprema. We show in Appendix A that this condition causes strong compactness up to powers to fail.

Theorem 35.

If h:x↦x∞ does not commute with suprema, then 𝒮 does not have strong compactness up to powers. In particular, the semirings 𝕍,𝕋,𝕃, and 𝔻 do not have strong compactness up to powers.

However, there are also semirings violating strong compactness that do satisfy strong compactness up to powers. We show that, under the assumption that the natural order of 𝒮 is completely distributive, it is not only necessary but also sufficient for strong compactness up to powers that h:x↦x∞ commutes with suprema as this makes h an ∞-homomorphism.

Theorem 36.

Let 𝒮 be an infinitary absorptive semiring in which the natural order is completely distributive and where h:x↦x∞ commutes with suprema, i.e. h is an ∞-homomorphism. Then 𝒮 has strong compactness up to powers.

Proof.

If h:x↦x∞ is an ∞-homomorphism, {s∞∣s∈𝒮} induces a subsemiring of 𝒮, which we denote by 𝒮∞. Clearly, 𝒮∞ is multiplicatively idempotent, so a distributive lattice. As we assume that the natural order in 𝒮 is completely distributive, so is 𝒮∞, which is why 𝒮∞ has strong compactness. Because 𝒮∞ is a subsemiring of 𝒮, Φ⊧𝒮ψ clearly implies Φ⊧𝒮∞ψ. Thus, it suffices to prove that {⋀Φ0}≡𝒮Φ0⊧𝒮∞ψ implies {φn∣φ∈Φ0,n∈ω}≡𝒮{(⋀Φ0)n∣n∈ω}⊧𝒮ψ. So let {φ}⊧𝒮∞ψ and π be a model-defining 𝒮-interpretation. For the distributive lattice 𝒮0∞ which extends 𝒮∞ by an additional zero denoted 0∗, we also have that {φ}⊧𝒮0∞ψ, as shown in Section 5, because 𝒮∞ and 𝒮0∞ both are completely distributive lattices. Let h∗:𝒮→𝒮0∞ with h∗:s↦s∞ if s>0 and h∗:0↦0∗. Because h is an ∞-homomorphism, so is h∗. Note that, as opposed to h∘π, h∗∘π must be model-defining. For π⟦φ⟧>0 we can conclude

π⟦φ⟧∞=h∗(π⟦φ⟧)=(h∗∘π)⟦φ⟧≤(h∗∘π)⟦ψ⟧≤⋆(h∘π)⟦ψ⟧=h(π⟦ψ⟧)=π⟦ψ⟧∞≤π⟦ψ⟧,

where (⋆) uses that (h∗∘π)⁢(L)≤(h∘π)⁢(L) for each literal L if (h∘π) is considered an 𝒮0∞-interpretation. Hence, {φn∣n∈ω}⊧𝒮ψ, which proves the claim. ◀

Corollary 37.

If 𝒮 is strongly distributive (i.e., infinitary multiplication distributes over infinitary addition in 𝒮) or n-idempotent for some n, then 𝒮 has strong compactness up to powers. In particular, the semirings 𝕊∞⁢(X) and 𝕊n⁢(X) have strong compactness up to powers.

Notice that for n-idempotent 𝒮, Theorem 36 implies that for each Φ⊧𝒮ψ, there must be some finite set Ψ with the property that Ψ⊧𝒮ψ due to the logical equivalence {φm∣φ∈Φ0,m∈ω}≡𝒮{φn∣φ∈Φ0}.

7 Summary and Conclusion

Figure 2: Relationship between variants of compactness and algebraic properties of the underlying semiring. While Xfin is a finite set of variables and Xinf an infinite set, X is of arbitrary cardinality.

In this paper, we have studied the relationship between compactness properties of semiring semantics with algebraic properties of the underlying (infinitary absorptive) semiring. This does not only provide a basis for the generalisation of further model-theoretic properties that rely on compactness, such as Löwenheim–Skolem or preservation theorems, but also yields insights into the logical equivalences which admit the transfer of classical compactness to more general settings. Within the semiring semantics framework, algebraic and model-theoretic properties are closely linked since algebraic equalities (such as multiplicative idempotence) correspond to logical equivalences (e.g. φ∧φ≡φ), which might not be preserved when moving from the Boolean to a more complex semiring. Yet, it is not clear how this affects non-trivial model-theoretic results such as compactness.

While a weak form of compactness in terms of satisfiability holds for all infinitary absorptive semirings, this is not the case for stronger versions in terms of entailment. We proved that compactness generalises to finite semirings by simulating semiring semantics in classical Boolean semantics over an extended signature which allows the encoding of semiring valuations. Our main result, however, is the generalisation to (possibly infinite) completely distributive lattice semirings, from which we can infer that the logical equivalence φ≡φ∧φ ensures strong compactness. We expanded the reduction technique of separating homomorphisms introduced in [12], on the one hand, to take the natural order into account and, more interestingly, to cope with the failure of continuity of homomorphisms from lattices with dense intervals, such as the fuzzy semiring. We believe that this generalised proof technique has applications beyond compactness. Several other model-theoretic results for semiring semantics are based on separating homomorphism and are thus affected by missing continuity. Future work will include the application of weakly separating homomorphism sets to model-theoretic tools such as Ehrenfeucht–Fraïssé games, which, up to now, could only be applied to finite lattice semirings [5].

On the other hand, we discussed counterexamples against strong compactness in semirings that are not n-idempotent for any n, that is, that do not admit logical equivalences of the form φn≡φn∧φ where φn denotes the n-fold conjunction of φ. In some cases, such as for the tropical or the Łukasiewicz semiring, strong compactness fails in an even stronger sense. We showed that in these semirings, the lack of idempotence cannot be circumvented by moving to strong compactness up to powers, where the entailment relation is no longer based on finite subsets Φ0⊆Φ but on their closures under finite conjunctions of the same formula. Figure 2 summarises the connection between algebraic properties of the semiring and variants of compactness established by our results. It remains open for future work to close the gap between multiplicative n-idempotence and multiplicative idempotence (lattices). We conjecture that n-idempotence might already suffice for strong compactness. Possible approaches for proving this include a two-sorted approach discussed in [18] or a generalisation of the homomorphism technique from Section 5. Towards the generalisation of further model-theoretic properties that rely on compactness, we formulate (in the appendix) a variant of the upward Löwenheim–Skolem theorem for semirings that have strong compactness. The analysis of further consequences of compactness, for instance concerning preservation theorems, will be studied in future work.

References

  • [1] A. Atserias and P. Kolaitis. Consistency, acyclicity, and positive semirings. In A. Palmigiano and M. Sadrzadeh, editors, Samson Abramsky on Logic and Structure in Computer Science and Beyond, volume 25 of Outstanding Contributions to Logic, pages 623–668. Springer, Cham, 2023. doi:10.1007/978-3-031-24117-8_17.
  • [2] A. Atserias and P. Kolaitis. Consistency of relations over monoids. J. ACM, 72(3), May 2025. doi:10.1145/3721855.
  • [3] G. Badia, P. Kolaitis, and C. Noguera. Codd’s theorem for databases over semirings. Proc. ACM Manag. Data, 3(5), November 2025. doi:10.1145/3767713.
  • [4] C. Bizière, E. Grädel, and M. Naaf. Locality theorems in semiring semantics. In Proceedings of MFCS 2023, 2023. doi:10.4230/LIPIcs.MFCS.2023.20.
  • [5] S. Brinke, E. Grädel, and L. Mrkonjić. Ehrenfeucht–Fraïssé games in semiring semantics. In Proceedings of CSL 2024, 2024. doi:10.4230/LIPIcs.CSL.2024.19.
  • [6] S. Brinke, E. Grädel, L. Mrkonjić, and M. Naaf. Semiring provenance in the infinite. In The Provenance of Elegance in Computation - Essays Dedicated to Val Tannen, volume 119 of Open Access Series in Informatics (OASIcs), pages 3:1–3:26, Dagstuhl, Germany, 2024. doi:10.4230/OASIcs.Tannen.3.
  • [7] P. Cintula and M. Navara. Compactness of fuzzy logics. Fuzzy Sets Syst., 143(1):59–73, 2004. doi:10.1016/J.FSS.2003.06.002.
  • [8] J. Foster, T. Green, and V. Tannen. Annotated XML: queries and provenance. In Proceedings of PODS 2008, pages 271–280, 2008. doi:10.1145/1376916.1376954.
  • [9] B. Glavic. Data provenance. Foundations and Trends in Databases, 9(3-4):209–441, 2021. doi:10.1561/1900000068.
  • [10] E. Grädel, H. Helal, M. Naaf, and R. Wilke. Zero-one laws and almost sure valuations of first-order logic in semiring semantics. In Proceedings of LICS 2022, pages 41:1–41:12. ACM, 2022. doi:10.1145/3531130.3533358.
  • [11] E. Grädel, N. Lücking, and M. Naaf. Semiring provenance for Büchi games: Strategy analysis with absorptive polynomials. Logical Methods in Computer Science, 20(1), 2024. doi:10.46298/lmcs-20(1:21)2024.
  • [12] E. Grädel and L. Mrkonjić. Elementary equivalence versus isomorphism in semiring semantics. In Proceedings of ICALP 2021, volume 198, pages 133:1–133:20, Dagstuhl, Germany, 2021. doi:10.4230/LIPIcs.ICALP.2021.133.
  • [13] E. Grädel and V. Tannen. Semiring provenance for first-order model checking, 2017. arXiv:1712.01980.
  • [14] E. Grädel and V. Tannen. Provenance analysis for logic and games. Moscow Journal of Combinatorics and Number Theory, 9(3):203–228, 2020. Preprint available at https://arxiv.org/abs/1907.08470. doi:10.2140/moscow.2020.9.203.
  • [15] E. Grädel and V. Tannen. Provenance analysis and semiring semantics for first-order logic. In Model Theory, Computer Science and Graph Polynomials. Festschrift for Johann A. Makowsky. Birkhäuser, 2025. doi:10.1007/978-3-031-86319-6_21.
  • [16] T. Green, G. Karvounarakis, and V. Tannen. Provenance semirings. In Proceedings of PODS 2007, pages 31–40. ACM, 2007. doi:10.1145/1265530.1265535.
  • [17] T. Green and V. Tannen. The semiring framework for database provenance. In Proceedings of PODS 2017, pages 93–99. ACM, 2017. doi:10.1145/3034786.3056125.
  • [18] L. Mrkonjić. Semiring Semantics: Algebraic Foundations, Model Theory, and Strategy Analysis. PhD thesis, RWTH Aachen University, 2025. doi:10.18154/RWTH-2025-03940.
  • [19] M. Naaf. Logic, Semirings, and Fixed Points. PhD thesis, RWTH Aachen University, 2024. doi:10.18154/RWTH-2024-10804.
  • [20] George N. Raney. A subdirect-union representation for completely distributive complete lattices. Proceedings of the American Mathematical Society, 4(4):518–522, 1953. doi:10.1090/S0002-9939-1953-0058568-4.
  • [21] P. Rothmaler. Introduction to Model Theory. CRC Press, 2018. doi:10.1201/9781315273822.

Appendix A Omitted Proofs

The proofs of Lemma 22 and Proposition 24 from Section 5 are provided in the following.

Lemma 22. [Restated, see original statement.]

There is a ≤-separating set of ∞-homomorphisms from ℒ∗ to 𝒮3 if, and only if, ℒ is a completely distributive lattice without dense intervals.

Proof.

As shown in [18], ℒ is completely distributive and does not contain dense intervals if, and only if, there is a separating set H⊆Hom∞⁡(ℒ,𝔹) (recall that H is separating if for each s≠t there is some h∈H such that h⁢(s)≠h⁢(t)). We show that this is equivalent to the existence of a ≤-separating set H∗⊆Hom∞⁢(ℒ∗,𝒮3). So suppose that there is some separating H⊆Hom∞⁢(ℒ,𝔹). If t=0∗ we can ≤-separate s and t by mapping 0∗ to 0∈𝒮3 and every other element in ℒ∗ to 1. Otherwise, we have t,s⊔t∈ℒ and there must be some h∈H with h⁢(s⊔t)≠h⁢(t), i.e. h⁢(s⊔t)=h⁢(s)∨h⁢(t)=1 and h⁢(t)=0, which implies h⁢(s)≰h⁢(t). Hence, we can ≤-separate s from t via h∗:ℒ∗→𝒮3 with h∗⁢(0∗)=0, h∗⁢(u)=ε if h⁢(u)=0 and h∗⁢(u)=1 otherwise. To prove the converse, let H∗⊆Hom∞⁢(ℒ∗,𝒮3) be ≤-separating and s≠t∈ℒ. As s≰t or t≰s, there must be some h∗∈H∗ with h∗⁢(s)≠h∗⁢(t) and (h∗)−1⁢(0)={0∗}, and we can separate s and t via h:𝒮→𝒯 with h⁢(u)=0 if h∗⁢(u)≤ε and h⁢(u)=1 otherwise. ◀

Proposition 24. [Restated, see original statement.]

Let h:𝒮→𝒯 be a homomorphism (which does not necessarily respect the infinitary operations) into a min-max semiring 𝒯, and let t∈𝒯.

  1. (1)

    If h(π⟦φ(a¯)⟧)≥t and if for all X⊆𝒮 with π⟦φ(a¯)⟧=⨆X there is some x∈X such that h⁢(x)≥t, then also (h∘π)⟦φ(a¯)⟧≥t.

  2. (2)

    If h(π⟦φ(a¯)⟧)≤t and if for all X⊆𝒮 with π⟦φ(a¯)⟧=⨅X there is some x∈X such that h⁢(x)≤t, then also (h∘π)⟦φ(a¯)⟧≤t.

Proof.

We proceed by induction on φ⁢(a¯) and only prove the first implication as the reasoning for (2) is analogous. The base case, where φ⁢(a¯) is a literal, is satisfied by definition.

Let φ=φ0∧φ1. If t≤h(π⟦φ⟧)=min(h(π⟦φ0⟧),h(π⟦φ1⟧)), then t≤h(π⟦φi⟧) is true for i∈{0,1}. Towards a contradiction, suppose that π⟦φi⟧=⨆X with h⁢(x)<t for each x∈X. Then π⟦φ⟧=π⟦φ1−i⟧⋅⨆X=⨆{π⟦φ1−i⟧⋅x∣x∈X} violates the assumption on π⟦φ⟧ as h(π⟦φ1−i⟧⋅x)≤h(x)<t. Hence, the induction hypothesis can be applied to φ0 and φ1 and we obtain (h∘π)⟦φ(a¯)⟧=min((h∘π)⟦φ0⟧,(h∘π)⟦φ1⟧)≥t.

For φ=φ0∨φ1 we get t≤max(h(π⟦φ0⟧),h(π⟦φ1⟧)), i.e. t≤h(π⟦φi⟧) for some i∈{0,1}. Suppose that π⟦φi⟧=⨆X with h⁢(x)<t for each x∈X. We cannot have that h(π⟦φ1−i⟧)<t as π⟦φ⟧=π⟦φ1−i⟧⊔⨆X=⨆{π⟦φ1−i⟧}∪X would yield a contradiction. If π⟦φ1−i⟧=⨆Y where h⁢(y)<t for y∈Y, we obtain a contradiction by π⟦φ⟧=⨆X⊔⨆Y=⨆X∪Y, so the IH must either be applicable to φ0 or to φ1. Both cases yield max((h∘π)⟦φ0⟧,(h∘π)⟦φ1⟧)≥t.

Now let φ⁢(a¯)=∃x⁢ψ⁢(a¯,x) and A′≔{a∈A∣h(π⟦ψ(a¯,a)⟧)≥t}. By assumption, A′≠∅. Suppose that for each a∈A′, there is some Xa such that π⟦ψ(a¯,a)⟧)=⨆Xa and h⁢(x)<t for x∈Xa. Then we would have π⟦φ(a¯)⟧=⨆⋃a∈A′Xa∪{π⟦ψ(a¯,a)⟧∣a∈A∖A′}, a contradiction. Hence there must be some a∈A′ the IH can be applied to and we obtain (h∘π)⟦φ(a¯)⟧≥(h∘π)⟦ψ(a¯,a)⟧≥t.

It remains to prove the claim for φ⁢(a¯)=∀x⁢ψ⁢(a¯,x). By monotonicity of h, we have that h(π⟦ψ(a¯,a)⟧)≥h(π⟦φ(a¯)⟧)≥t for each a∈A. Suppose that there is some a∈A such that π⟦ψ(a¯,a)⟧=⨆X with h⁢(x)<t for x∈X. To infer a contradiction, we observe that π⟦φ(a¯)⟧=⨆X⋅∏b∈A∖{a}π⟦ψ(a¯,b)⟧=⨆{x⋅∏b∈A∖{a}π⟦ψ(a¯,b)⟧∣x∈X} with h(x⋅∏b∈A∖{a}π⟦ψ(a¯,b)⟧)≤h(x)<t for x∈X. Hence we have that (h∘π)⟦ψ(a¯,a)⟧≥t for each a∈A and thus (h∘π)⟦φ(a¯)⟧=⨅a∈A(h∘π)⟦ψ(a¯,a)⟧≥t. ◀

We also provide proofs for Theorem 35 and Corollary 37 from Section 6. The following additional lemma is required to prove Theorem 35.

Lemma 38.

If h:x↦x∞ does not commute with suprema, then there is some X⊆𝒮 with ⨆{x∞∣x∈X}<(⨆X)∞ while ⨆{xn∣x∈X}=(⨆X)n for each n∈ω.

Proof.

By monotonicity, we have ⨆{x∞∣x∈X}≤(⨆X)∞ for each X⊆𝒮, so if h does not respect suprema, there must be some X0⊆𝒮 such that ⨆{x∞∣x∈X0}<(⨆X0)∞. Note that X0 must be infinite as s∞⊔t∞=(s⊔t)∞ is true for every s,t∈𝒮 (we obtain (s⊔t)2⁢n≤sn⊔tn by observing that every term in (s⊔t)2⁢n contains s or t at least n times). We construct a chain (Xi)i∈ω according to Xi+1≔{x⊔y∣x,y∈Xi}. It follows by induction that ⨆{x∞∣x∈X0}=⨆{x∞∣x∈Xi} for each i∈ω as ⨆{x∞∣x∈Xi+1}=⨆{(x⊔y)∞∣x,y∈Xi}=⨆{x∞⊔y∞∣x,y∈Xi}=⨆{x∞∣x∈Xi}. We claim that X≔⋃{Xi∣i∈ω} has the desired properties. On the one hand, we have that ⨆{x∞∣x∈X}=⨆{⨆{x∞∣x∈Xi}∣i∈ω}=⨆{x∞∣x∈X0}<(⨆X0)∞≤(⨆X)∞. Moreover, ⨆{xn∣x∈X}≤(⨆X)n for each n∈ω due to monotonicity. By construction, X is closed under finite suprema and hence

(⨆X)n =⨆{x1⁢⋯⁢xn∣x1,…,xn∈X}
≤⨆{(x1⊔⋯⊔xn)n∣x1,…,xn∈X}=⨆{xn∣x∈X}.

◀

Theorem 35. [Restated, see original statement.]

If h:x↦x∞ does not commute with suprema, then 𝒮 does not have strong compactness up to powers. In particular, the semirings 𝕍,𝕋,𝕃, and 𝔻 do not have strong compactness up to powers.

Proof.

We claim that Φ≔{φn∣n∈ω}∪{ϑ,φLO}⊧𝒮∀x⁢∃y⁢∀z⁢E⁢x⁢y≕ψ where

φn ≔∃x1⁢…⁢∃xn⁢(φpre⁢(x1,…,xn)∧⋀i≤n∀y⁢E⁢xi⁢y)⁢ with
φpre⁢(x1,…,xn) ≔∀y⁢(y≮x1∧⋀i<nxi<xi+1∧(xi≮y∨y≮xi+1)),
ϑ ≔∀x⁢∃y⁢∀z⁢(z≮x∨E⁢x⁢y)

and φLO states (in Boolean semantics) that < is a linear order. Let π be a model-defining 𝒮-interpretation with π⟦Φ⟧>0 and recall the flattening π𝔹 of π, where π𝔹⁢(L)=1 if, and only if, π⁢(L)>0. Since 1 is maximal in 𝒮, we have that π𝔹⁢(L)≥π⁢(L) for all L∈LitA⁢(τ). By monotonicity, this inequality can be lifted to formulae, and for each φ∈Φ, we get π𝔹⟦φ⟧≥π⟦φ⟧>0, i.e. π𝔹⟦φ⟧=1. Due to π𝔹⟦φLO⟧=1, π𝔹 is linearly ordered by <. Moreover, π𝔹⟦φpre(a1,…,an)⟧=1 if, and only if, a1,…,an is a prefix of <. Hence, π𝔹⟦φn⟧=1 for each n implies there is an infinite discrete prefix (ai)i∈ω⊆A w.r.t. <.

For each n, (a1,…,an) is the unique tuple such that π𝔹⟦φpre(a1,…,an)⟧=1 and thus the unique tuple with π⟦φpre(a1,…,an)⟧>0. Therefore, π⟦φn⟧≤∏i≤n∏b∈Aπ(Eaib) and thus π⟦{φn∣n∈ℕ}⟧≤∏i∈ω∏b∈Aπ(Eaib)∞≤∏i∈ω⨆b∈Aπ(Eaib)∞. For every a∈A∖{ai∣i∈ω}≕A′ it holds that

π⟦∃y∀z(z≮a∨Eay)⟧ =⨆b∈A⁢∏c∈A(π⁢(c≮a)⊔π⁢(E⁢a⁢b))
≤⨆b∈A⁢∏i∈ω(π⁢(ai≮a)⏟=0⊔π⁢(E⁢a⁢b))
=⨆b∈A⁢π⁢(E⁢a⁢b)∞.

Hence, π⟦ϑ⟧≤∏a∈A′⨆b∈Aπ(Eab)∞ and overall π⟦Φ⟧≤∏a∈A⨆b∈Aπ(Eab)∞=π⟦ψ⟧.

Now let Φ0⊆Φ be finite and n0 be maximal such that φn0∈Φ0. By assumption, h does not commute with suprema, so we can fix a set X={sβ∣β∈On,β<|X|} as in Lemma 38. In order to disprove {φn∣φ∈Φ0,n∈ω}⊧𝒮ψ, we construct an 𝒮-interpretation π such that π⟦{φn∣n≤n0}∪{ϑ,φLO}⟧∞=(⨆β<|X|sβ)∞>⨆β<|X|sβ∞=π⟦ψ⟧. The universe of π consists of elements {aβ∣β<|X|} and we set π⁢(aβ<aγ)=1 if, and only if, β<γ, implying π⟦φLO⟧=1. Further, we define π⁢(E⁢ai⁢b)=1 for each i∈ω∖{n0+1} and b∈A, which yields π⟦φn⟧=1 for n≤n0, while setting π⁢(E⁢an0+1⁢aβ)=sβ. Since π⟦∃y∀z(z≮a∨Eay)⟧=1 for all a≠an0+1, we obtain π⟦ϑ⟧=⨆β<|X|sβn0=(⨆β<|X|sβ)n0 and overall π⟦{φn∣n≤n0}∪{ϑ,φLO}⟧∞=(⨆β<|X|sβ)∞ as desired. On the other hand, π⟦∀x∃y∀zExy⟧=π⟦∃y∀zEan0+1y⟧=⨆b∈Aπ(Ean0+1b)∞=⨆β<|X|sβ∞. ◀

Corollary 37. [Restated, see original statement.]

If 𝒮 is strongly distributive (i.e., infinitary multiplication distributes over infinitary addition in 𝒮) or n-idempotent for some n, then 𝒮 has strong compactness up to powers. In particular, the semirings 𝕊∞⁢(X) and 𝕊n⁢(X) have strong compactness up to powers.

Proof.

By Theorem 36, it suffices to verify that (⨆i∈Isi)∞≤⨆i∈Isi∞ whenever 𝒮 meets one of the above conditions. First suppose that 𝒮 is strongly distributive (such as 𝕊∞⁢(X)). W.l.o.g. we can assume that I is infinite since the finite case holds in every infinitary absorptive semiring (see the proof of Lemma 38). Because every f:|I|+→I must hit some i∈I infinitely often, we obtain (⨆i∈Isi)∞=(⨆i∈Isi)|I|+=⨆{∏α<|I|+sf⁢(α)∣f:|I|+→I}≤⨆i∈Isi∞.

Now let 𝒮 be n-idempotent for some n, which, by finitary distributivity, implies that (⨆i∈Isi)∞=(⨆i∈Isi)n=⨆{∏i≤nsf⁢(i)n∣f:[1,n]→I}. We fix some f:[1,n]→I and observe that

∏i≤nsf⁢(i)≤(sf⁢(1)⊔⋯⊔sf⁢(n))n=(sf⁢(1)⊔⋯⊔sf⁢(n))n⋅n⁢≤⋆⁢sf⁢(1)n⊔⋯⊔sf⁢(n)n≤⨆i∈Isi∞,

where (⋆) is due to the fact that each summand in (sf⁢(1)⊔⋯⊔sf⁢(n))n⋅n must contain some sf⁢(i) at least n times. Hence, ⨆i∈Isi∞ is an upper bound of {∏i≤nsf⁢(i)n∣f:[1,n]→I}, which proves the claim. ◀

Appendix B The Löwenheim–Skolem Theorems

As an immediate consequence of strong compactness, we obtain a generalisation of the upward Löwenheim–Skolem theorem, which classically implies that sets of first-order formulae with finite models of unbounded size also admit infinite models with unbounded transfinite cardinalities. We generalise this to the semiring setting via entailment: For Φ⊆FO and ψ∈FO, if there are arbitrarily large finite witnesses that disprove Φ⊧𝒮ψ, then there are witnesses of arbitrarily large transfinite sizes.

Theorem 39 (Upward Löwenheim–Skolem).

Let 𝒮 have strong compactness (e.g. let 𝒮 be finite or a completely distributive lattice) and Φ∪{ψ}⊆FO.

  1. (1)

    If π⟦Φ⟧≰π⟦ψ⟧ for arbitrarily large finite 𝒮-interpretations π, then π⟦Φ⟧≰π⟦ψ⟧ also holds for some infinite π.

  2. (2)

    If π⟦Φ⟧≰π⟦ψ⟧ for some infinite 𝒮-interpretation π, then there is some πκ for each κ∈Cn with |π|≥κ such that πκ⟦Φ⟧≰πκ⟦ψ⟧.

Example 40.

Let 𝒮 be a completely distributive lattice. We show there is no Φ⊆FO such that π⟦Φ⟧=⨅{s∣π(Ra)=s for infinitely many a∈A} for each 𝒮-interpretation π. Towards a contradiction, suppose that Φ exists. For finite π, we have that π⟦Φ⟧=⨅∅=1. Hence, we can find for each n some πn with |πn|=n such that π⟦Φ⟧≰π⟦∃xRx⟧. For π with |π|>|𝒮|, however, we have that {π⁢(R⁢a)∣π⁢(R⁢a)⁢ occurs infinitely often in ⁢π}≠∅, which implies π⟦Φ⟧≤π⟦∃xRx⟧, a contradiction. ⌟

In an even stronger sense, the proof of the classical downward Löwenheim–Skolem Theorem can be adapted without major difficulties to semiring interpretations, with a rather liberal condition on the underlying semiring.

Definition 41.

We say that the infinitary sum and product operations on a semiring 𝒮 are countably tame if for every sequence (si)i∈I there exist countable subsequences indexed by J,K⊆I such that ∑i∈Isi=∑j∈Jsj and ∏i∈Isi=∏k∈Ksk. A semiring is countably tame if its infinitary sum and product operations are.

Clearly, the min-max semiring over [0,1] is countably tame.

Definition 42.

Let πA:LitA⁡(τ)→𝒮 be a semiring interpretation. A subinterpretation πB⊆πA is the restriction of πA to LitB⁡(τ) for some subset B⊆A. An elementary subinterpretation, denoted πB⪯πA, satisfies in addition that πB⟦φ(b¯)⟧=πA⟦φ(b¯)⟧ for every formula φ⁢(x¯)∈FO⁡(τ) and every tuple b¯ in B.

Theorem 43 (Downward Löwenheim–Skolem).

Every 𝒮-interpretation πA:LitA⁡(τ)→𝒮 with countable vocabulary τ into a countably tame semiring 𝒮 has a countable elementary subinterpretation πB⪯πA.

Proof.

We construct a countable chain B0⊆B1⊆⋯ of countable subsets Bn⊆A as follows. Let B0≔∅. Construct Bn+1 by adding to Bn, for every formula φ⁢(x)∈FO⁡(τ∪Bn), countable collections (bφ,i)i<ω and (cφ,i)i<ω of elements from A such that πA⟦∃xφ(x)⟧=∑{πA⟦φ(bφ,i)⟧∣i<ω} and πA⟦∀xφ(x)⟧=∏{πA⟦φ(cφ,i)⟧∣i<ω}, which is possible since the semiring is countably tame. Finally, let B≔⋃n<ωBn, which is clearly countable. We claim that B induces an elementary subinterpretation πB⪯πA. Consider any formula ψ⁢(y¯)∈FO⁡(τ) and any tuple b¯ over B. We have to prove that πB⟦ψ(b¯)⟧=πA⟦ψ(b¯)⟧. This is proved by induction on ψ. The only non-trivial cases are ψ⁢(y¯)=∃x⁢φ⁢(x,y¯) and ψ⁢(y¯)=∀x⁢φ⁢(x,y¯). Obviously there is some n<ω such that all components of b¯ are in Bn which means that φ⁢(x,b¯)∈FO⁡(τ∪Bn). The construction makes sure that Bn+1 and hence B, contains witnesses (bφ,i)i<ω and (cφ,i)i<ω to make sure that

πA⟦∃xφ(x,b¯)⟧=∑{πA⟦φ(bφ,i,b¯)⟧∣i<ω}=∑{πB⟦φ(bφ,i,b¯)⟧∣i<ω}=πB⟦∃xφ(x,b¯)⟧,

and similarly for ψ⁢(y¯)=∀x⁢φ⁢(x,y¯) using the witnesses (cφ,i)i<ω. ◀