A categorical aspect of the analogy between quan- tifiers and modalities

Brice Halimi

Abstract. The formal analogy relating existential quantification to a modal possibil- ity operator, and universal quantification to a modal necessity operator, is well-known. Its obvious limitation is, too: it holds on the condition of confining quantification to a single variable. This paper first presents that analogy in the terms of dynamic , which allows one to overcome the limitation just mentioned and to translate fragments of first-order logic into the language of propositional . It then sets out how the modal semantics for first-order logic which is established by dynamic logic lends itself to a classical algebraic development based on “cylindric algebras.” Finally, the main part of the paper shows how this algebraic semantics can be presented in a cate- gorical setting, and how the algebraic counterparts of first-order structures correspond to “fibered categories” which are shown to be substructures of the “syntactic” fibered category representing first-order logic. Mathematics Subject Classification (2000). Primary 03G15, 03G30; Secondary 03B10, 03B45, 03-03, 01A60. Keywords. Cylindric algebras; mirror cubes; fibered categories; ; dynamic logic; modal translation of fragments of first-order logic.

1. Analogy between quantifiers and modalities The analogy between the universal and the existential quantifiers, on the one hand, the modal operators of necessity and possibility, on the other, is well-known and dates back to Arthur Prior at least. That formal analogy turns on the the parallel double implications 2p ⇒ p ⇒ 3p and ∀xfx ⇒ fa ⇒ ∃xfx, and on the parallel dualities ∀ = ¬∃¬ and 2 = ¬3¬. Prior harnessed and developed that formal analogy so as to formalize as substantial as possible a fragment of first-order logic within the modal system S5.1 Using ‘p’, ‘q’, ‘r’, . . . for propositional variables and for predicate schematic letters alike, he wrote ‘Lxpx’ for “for any x, px” as well as ‘Mxpx’ for “there exists x such that px.” Prior also used Polish prefix notations, with ‘C’ as the symbol for implication. The modal

1[7], p. 21. 2 Brice Halimi

axiom CLαα (i.e., 2p → p) of S5 thus translates the axiom scheme CLvαβ, where β differs from α at most by the replacement of all free occurrences of v in α with another variable symbol for which v is free in α. Prior remarked that certain derivations available in first-order logic did not corre- spond to any sound derivation in propositional modal logic. For instance, as soon as ψy does not contain any free occurrence of x, existential generalization allows one to conclude (∃x)(φx) → ψy from φx → ψy; however, the step leading from φ → ψ to 3φ → ψ is permissible only if ψ is fully modalized, i.e., if all the propositional vari- ables contained in ψ are immediately prefixed with a modal operator. As such, the above- mentioned formal analogy does not overcome the major discrepancy due to quantifiers not being operators: it is not possible to (non vacuously) prefix arbitrarily many quantifiers in front of a formula, as it is possible to prefix arbitrarily many modal operators in front of a proposition. Prior concludes: The use of name-variables thus introduces moves that cannot be paralleled in modal logic, however similar the laws of modal operators and quantifiers might be. The basic reason is of course that different quantifiers in a for- mula may bind different name-variables. If, however, we remove this variety, a much closer analogy can be drawn.2 Indeed, the restriction to a fragment of first-order logic —which Prior calls UM1PC— with a single variable symbol and monadic predicates makes it possible to establish a direct correspondence between respective derivations in both systems, which amounts to identifying the modal system S5 with a variant of UM1PC. The core of the formal analogy between quantifiers and modal operators, or a sys- tematic way of presenting it, lies in the strong similarity relating the adjunction about the functors representing the former and the adjunction about the functors representing the latter. Given a binary relation R on a domain Y and V ⊆ Y , let us define: hRi(V ) = {x ∈ X : ∃y ∈ Y (xRy & y ∈ V )} (“possibly V ”); [R](V ) = {x ∈ X : ∀y ∈ Y (xRy ⇒ y ∈ V )} (“necessarily V ”). Writing R0 for the converse of R (xR0y iff yRx), one gets: hRi a [R0] (1) hR0i a [R] (2). Paul Taylor3 mentions that any adjunction between two powersets ℘(X) and ℘(Y ) is naturally isomorphic to a modal adjunction as stated above. The existential and universal quantifiers of first-order logic (underlaid by a given theory of types) can also be characterized through an adjunction, due to William Law- vere.4 Let C be a Cartesian closed category. To any object X of C is attached the Carte- sian closed category of “attributes of type X”, and to any morphism f : X → Y in C the functor f ∗ : ℘(Y ) → ℘(X) sending each ψ ∈ ℘(Y ) to the attribute of type X obtained

2[7], p. 24. 3[8], p. 163. 4[4]. A categorical aspect of the analogy between quantifiers and modalities 3

from ψ by pullback along f. Since (f ◦ g)∗ = f ∗ ◦ g∗ can easily be seen to hold, a functor Cop → Cat has thus be defined, in other words an indexed category. Moreover, given f : X → Y in C and ϕ ⊆ X, the two following functors can be introduced:

Σf (ϕ) = {y ∈ Y : ∃x ∈ ϕ : f(x) = y};

Πf (ϕ) = {y ∈ Y : ∀x ∈ X(f(x) = y ⇒ x ∈ ϕ}.

The functor Σf (ϕ) (resp. Πf (ϕ)) is called the existential quantification (resp. the uni- versal quantification) of ϕ along f. The two functors Σf , Πf : ℘(X) → ℘(Y ) satisfy a ∗ double adjunction Σf a f a Πf :

ψ → Πf (ϕ) Σf (ϕ) → ψ f ∗(ψ) → ϕ ϕ → f ∗(ψ) which can be rewritten as follows, as soon as f is expressed as a relation (xfy iff y = f(x)):5 ∗ −1 hfi = f a Πf = [f ] (1’) −1 ∗ hf i = Σf a f = [f] (2’). The straightforward correspondence between (1) and (10), on the one hand, between (2) and (20), on the other, makes fully explicit the formal analogy at the bottom of Prior’s remarks. Whereas the modal semantics in the Carnap-Kripke tradition has interpreted modal clauses in quantificational terms (possibility of φ as the existence of some appropriate in which φ is true, necessity of φ as the truth of φ in all appropriate pos- sible worlds), the modal translation of first-order logic works in the opposite direction, toward interpreting quantification logic in modal terms —an idea clearly implemented by dynamic logic. The technical motivation here is to delineate a fragment of first-order logic obtained by syntactic interpretation into a certain modal calculus, so as to export decid- ability properties of the latter into the realm of first-order logic. That perspective ushers in a modal analysis of quantification from the perspective of algebraic logic. Before turning to the latter framework, let us consider first the case of dynamic logic.

2. Dynamic logic The seminal tenet of dynamic logic consists in looking at an assignment of values to the variable symbols of a first-order language, as being a possible world; accordingly, for any given variable symbol x, in looking at two assignments differing at most on the value assigned to x, as being related by an accessible relation Rx associated to x. As a result, the usual semantic clause for existential quantification over x can be rephrased as the usual clause for the possibility operator 3x in Kripkean modal semantics:

M  ∃xφx [σ] ⇔ there exists an assignment θ : σRxθ and M  φ [θ] (1) ⇔ M, σ  3xφ ,

σRxθ meaning that σ(z) = θ(z) for all z 6= x.

5[8], p. 166. 4 Brice Halimi

The principle of that rephrasing can even to extended to generalized quantifiers, as shown by [2], with the prospect of establishing a “modal logic for quantifiers.” The start- ing point of that paper is the interpretation of generalized quantifiers as subsets of ℘(D), where D is the domain of the interpretation under consideration. In order to describe a generalized quantifier Q with inference rules similar to those of a sequent calculus, the ap- plication of Q can be associated with the following first-order rule Q: (Qx)ϕ(x, x1, . . . , xn) becomes ∀x(R(x, x1, . . . , xn) → ϕ(x, x1, . . . , xn)). The possible values of a variable bound by Q can be restricted to a specific domain, that restriction being expressed through an accessibility relation: the sequence x1, . . . , xn corresponds to the actual world, and the variable x to a possible world which has to be accessible from the actual world. It turns out that axioms φ governing Q can be translated into first-order conditions ψ about a relation RQ, in the sense that any set of formulae about Q is consistent with φ(Q) iff the set of their translations is consistent with ψ(RQ). For instance, (Qx)ϕ∧(Qx)ψ → (Qx)(ϕ∧ψ) translates into R(x, y¯z¯) → R(x, y¯), hence the following elimination rule for Q: (Qx)ϕ(x, y¯) , ϕ(xz¯, y¯)

where xz¯ ∈ {x : R(x, z¯)} and y¯ ⊆ z¯. Alechina and van Benthem then put forward the following modalized clause for the existential quantifier: ¯ ¯ ¯ M, [d/y¯]  3xϕ(x, y¯) ⇔ ∃e ∈ |M| : R(e, d)& M, [e/x, d/y¯]  ϕ(x, y¯). The classical interpretation of existential quantification thus corresponds to taking R to be the universal relation on the domain |M| of M, in other words: Ordinary predicate logic then becomes the special case of flat individual do- mains admitting of “random access”, whose R is the universal relation.6 The modalization of first-order quantifiers initiated by clause (1) above can be pur- sued by a similar treatment of substitution:

M  φ[y/x][σ] ⇔ ∀θ(σRx,yθ ⇒ M  φ [θ]) (2),

7 where σRx,yθ means that t(z) = s(z) for all z 6= x and t(x) = s(y). The clause (1) can then be rewritten:

M  ∃xφ [σ] ⇔ ∃θ(σRx,!θ and M  φ [θ]) , where ‘!’ indicates that any value can be taken for t(x). One then comes close to propo- sitional dynamic logic properly speaking, i.e., dynamic logic about computer programs. Semantically, given a set K of possible states (e.g., possible assignments of values to the variables of the language), any proposition φ is interpreted by the set V (φ) ⊆ K of all states in which φ is true, and any program α by a binary relation V (α) on K representing the set of all couples (u, v) such that v is the output of α when applied to the input u. The propositional modality [α] associated to α is then defined by: V ([α]φ) := {u ∈ K : ∀v ∈

6[2], p. 3. 7[6], p. 2. See also [1], pp. 181-182. A categorical aspect of the analogy between quantifiers and modalities 5

K ((u, v) ∈ V (α) ⇒ v ∈ V (φ))}. Within that setting, the formulae ∃xφ and φ[y/x] of clauses (1) and (2) can be written [x :=?]φ and [x := y]φ, respectively. Var The propositional multimodal logic common to all structures hM ,Rx,Rx,yix,y∈Var (M being any set) amounts to first-order logic and thus is an indecidable theory. A way to go to keep the expressive power of first-order logic without inheriting from its indecid- ability consists, as mentioned by István Németi,8 in considering structures M endowed with a selection V ⊆ MVar of “available” assignments in M, or in restricting the set of “accessible” assignments from a given assignment.9 The resulting generalized semantics makes it possible to unfold a full continuum of modalized fragments of first-order logic —each one being specified by certain accessibility constraints—, and thereby to carry out a fine-grained analysis of the latter. The purpose of what follows is to reconsider the semantics of such modal subsys- tems of full first-order logic, first in algebraic terms (using “cylindric algebras”), then in categorical terms (involving “fibered categories”).

3. Cylindric algebras As will be seen presently, cylindric algebras aim at a partial algebraization of first-order logic, as Boolean algebras achieve a full algebraization of propositional logic. Let Ln (for some n ∈ N) be the reduct of the language of first-order logic obtained by allowing only n variable symbols v1, . . . , vn and a denumerable set of n-ary predicates. Given the comparison between M  φ [σ] (M being a structure for Ln and φ any Ln-formula) and M, σ  φ, any assignment σ : {v1, . . . , vn} → |M| is nothing else but a possible world in the model for propositional modal logic whose domain is |M|n. The modal semantics for Ln suggested by the modal rephrasing of existential quan- tification is the usual Kripkean semantics of a modal translation of all Ln-formulae. The translation of atomic formulae vi = vj is a fresh propositional constant Ti,j. The inter- n pretation of each n-ary predicate P of Ln corresponds to a subset of M , i.e., to the valuation of a propositional variable p. Yet a one-one correspondence between the pred- icate symbols of Ln and the propositional variables of propositional modal logic would require the order of occurrence of the variable symbols v1, . . . , vn being fixed. So, beside the easy case of a formula of the form Pαv1 . . . vn, which can directly be translated into a propositional variable pα, the case of atomic formulae like P vτ(1) . . . vτ(n), where τ is a permutation on {1, . . . , n}, is more delicate. However, the more delicate case can be driven back to the easy one in two steps. Indeed, it is always possible to eliminate any multiple occurrence of a variable symbol: for instance, for n = 3,‘P v1v2v2’ can be trans- formed, up to logical equivalence, into a formula without any such multiple occurrence:

P v1v2v2 ≡ ∃v3(v3 = v2 ∧ P v1v3v3)

≡ ∃v3(v3 = v2 ∧ ∃v2(v2 = v3 ∧ P v1v2v3)) .

8See [6]. 9On this, see [1], pp. 177-178. 6 Brice Halimi

So it only remains to take care of the case of formulae of the form P vτ(1) . . . vτ(n). But one has:10

M, σ  P vτ(1) . . . vτ(n) ⇔ M, σ ◦ τ  P v1 . . . vn , n which leads one to introducing the binary relation 1τ on |M| defined by σ 1τ θ ⇔ θ = σ◦τ, and which can be construed as the accessibility relation underlying the semantics of a new modal operator 3τ specifically attached to the permutation τ. Since any permutation on {1, . . . , n} is a finite product of transpositions τij (exchanging ‘vi’ and ‘vj’), one can confine oneself to the latter and state:

M, σ  3ijP v1 . . . vn ⇔def M, σ  P vτij (1) . . . vτij (n) ⇔ there exists θ : σ 1ij θ and M, θ  P v1 . . . vn . For the more general case of a transposition σ whose (unique) decomposition into trans- 1 k positions is σ = τ ◦ ... ◦ τ , 3σ is simply defined as 3τ 1 ... 3τ k . ? The resulting translation translates any Ln-formula φ into a formula φ of a multi- modal language CMMLn of signature {Tij, 3i, 3ij}1≤i,j≤n: ? • (vi = vj) = Tij ? • (Pαvτij (1) . . . vτij (n)) = 3ijpα • (¬φ)? = ¬φ? • (φ ∨ ψ)? = φ? ∨ ψ? ? ? • (∃viφ) = 3iφ .

A model of CMMLn can directly be read off from any Ln-structure M, as shown by the semantical clauses underpinning the translation φ 7→ φ? all along: . M  ∃viφ(vi)[σ] ⇔ there exists θ : σ =i θ and M  φ(vi)[θ] , . where σ =i θ abbreviates ∀j 6= i, σ(j) = θ(j) . ? ⇔ there exists θ : σ =i θ and M, θ  (φ(vi)) ? 0 ⇔def M, σ  3i(φ(vi)) (1 )

M  Pαvτij (1) . . . vτij (n) [σ] ⇔ there exists θ : σ 1ij θ and M  Pαv1 . . . vn [θ] ⇔ there exists θ : σ 1ij θ and M, θ  pα 0 ⇔def M, σ  3ijpα (2 )

0 M  vi = vj [σ] ⇔def M, σ  Tij (3 )

Applying the clauses (10)-(30), one gets: ? M  φ [σ] ⇔ M, σ  φ

10[9], p. 296. A categorical aspect of the analogy between quantifiers and modalities 7

It is not formally correct to treat M itself as a model of CMMLn, however: more ex- n . actly, each Ln-structure M gives rise to a modal frame C(M) := hM ,Tij, =i, 1ijii,j∈N for CMMLn, and then to a model hC(M),V i for CMMLn, with a canonical valuation V defined by: w ∈ V (pα) iff M  Pαv1 . . . vn [w]. A frame for CMMLn of the form C(M) 11 is called a mirror cube. The subclass CMn of all mirror cubes can be characterized and even axiomatized within the class of all frames for CMMLn, provided that the standard inference rules of the modal system CMMLn are supplemented with a new inference rule (IR) ensuring that all formulae valid in all irreflexive modal frames are valid.12 As a result: ? `Ln φ ⇔ CMn `(IR) φ , 13 which suffices to show how first-order logic, as the union of all its subsystems CMMLn, lends itself to a fine-grained analysis, supported by its modalization. Let us now examine more closely some algebraic aspects of the perspective that has just been sketched. To that end, let us introduce the concept of “cylindric algebras.” A cylindric algebra of dimension α is a Boolean algebra hA, +, −, ·, 0, 1i endowed with distinguished elements dκλ (κ, λ < α) and with unary operations cκ (κ < α) such that, for any x, y ∈ A and any κ, λ, µ < α:

(i) cκ0 = 0; (ii) x ≤ cκx, i.e., x + cκx = cκx; (iii) cκ(x · cκy) = cκx · cκy; (iv) cκcλx = cλcκx; (v) dκκ = 1; (vi) dλµ = cκ(dλκ · dκµ) for all κ 6= λ, µ ; (vii) cκ(dκλ · x) · cκ(dκλ · (−x)) = 0. A paradigmatic cylindric algebra is the algebra consisting of the logical equivalence classes of formulae of a first-order theory. That is why the term dλκ should be conceived of, intuitively, as standing for the formula vλ = vκ, and cκx as standing for the formula ∃vκx(vκ).A cylindric set algebra of dimension α is a cylindric algebra of dimension α whose domain A is a subset of ℘(U α) for some set U. Now, each mirror cube C = C(M) induces the following cylindric set algebra A(C): • a(C) := h℘(M n), ∅,M n, ∩, ∪i; n S • ci : A ⊆ M 7→ x∈M {u[x/i]: u ∈ A} for any i : 1 ≤ i ≤ n; n • dij := {(uk)1≤k≤n ∈ M : ui = uj} for any i, j : 1 ≤ i, j ≤ n; • A(C) := ha(C), ci, diji1≤i,j≤n. κ κ Any cylindric algebra harbors substitution operators sλ such that sλ(x) represents 14 the result of substituting vλ for vκ in x, and from those operators, simultaneous sub- 15 stitution operators can be defined. Actually, the data on C of the operators 1ij in- duces permutation operators on A(C). Writing v = τij(u) for u 1ij v, let us state:

11[9], p. 299. 12See [9], pp. 301-304. 13 Indeed, the language of first-order logic is nothing else but Lω. See [10], p. 613. 14[5], §1.5. 15[5], p. 192 and pp. 236-237. 8 Brice Halimi

. . i v = u[j/i] ⇔def (u =i v ∧ τij(u) =j v) and sj(x) := {u[j/i]: u ∈ x}. Simultaneous substitution operators on A(C) ensue from the above, but there is a particular difficulty to get around. For τ = [f(0)/0, . . . , f(i − 1)/i − 1], the result sτ x of the simultaneous sub- 0 i−1 stitution of the vf(l)’s for the vl’s in x cannot be identified with (sf(0) ◦ ... ◦ sf(i−1))(x): for instance, if f(i − 1) is i − 2, the replacement of vi−1 with vf(i−1) is followed by the replacement of vf(i−1) = vi−2 with vf(i−2), which cancels the first substitution. The way out it to first replace vi−1, . . . , v0 with extra variables vpi−1 , . . . , vp0 (whose indices are beyond those of all variables vl as well as vf(l)) and then replace the latter with vf(i−1), . . . , vf(0). In other words, sτ , for each simultaneous substitution τ, is defined by: k k+i−1 0 i−1 sτ x := sf(0) . . . sf(i−1)sk . . . sk+i−1x.

4. Categorical representation We have just seen that each structure M for first-order logic induces a mirror cube C(M) for CMMLn, and then a cylindric algebra A(C(M)). Conversely, each cylindric algebra 16 A induces an “indexed category” FA for first-order logic. This is in particular the case when A = A(C) for some mirror cube C. But let us explain beforehand what an indexed category is. Given a category B, an indexed category F over B consists: • of a category F (X) for each object X of B, called the “fiber” above X; ∗ 0 • of a functor F (u): FX → FX0 , also written u , for each morphism u : X → X in B, called a reindexing functor; • together with coherence isomorphisms satisfying obvious axioms: an isomorphism ∗ ∗ ∗ ∗ idFX ' (idX ) for each object X of B and an isomorphism (u ◦ v) ' v ◦ u for each couple (u : X0 → X, v : X00 → X0) of composable morphisms in B. An indexed category can be presented as a “pseudo-functor” F : Cop → Cat, where Cat is the category of all (small) categories. This term is justified by the third condition that (u ◦ v)∗ and v∗ ◦ u∗ are not equal but only isomorphic. The use of indexed categories in logic is not new. They have been allotted a central role in categorical logic, because they allow one to build canonical models of various type theories. In ordinary λ-calculus, each term codes a proof of the proposition coded by its type: this is the “propositions-as-types” interpretation. A type theory is then the formal presentation of a deductive calculus about terms viewed as proofs, and gives rise to a “syntactic” indexed category, which is also called the “classifying” indexed category of the type theory, and which can be conceived of as its canonical model.17 To give an intuitive idea, let us consider the well known example of many-sorted first-order logic —that is, first-order logic where individuals of different types are consid- ered. The judgment to the effect that some constant a is of type σ is written a : σ. For a predicate symbol P of type (τ1, . . . , τk) and a1,..., ak of respective types τ1,..., τk, P (a1, . . . , ak) is a well-formed proposition, which is written: Γ ` P (a1, . . . , ak): Prop.

16[3], 4.2.8, pp. 242-244. 17See [3] for a detailed overview of all syntactic models of various type theories. A categorical aspect of the analogy between quantifiers and modalities 9

Here Γ stands for a “context” in the type-theoretic sense, i.e., for a set of declared vari- ables: Γ = {x1 : σ, . . . , xn : σn}, where x1,..., xn are supposed to be all the free variables in a1,..., ak. Among the other rules for well-formed propositions, one has: Γ, x : σ ` ϕ : Prop Γ ` ∀x : σ.ϕ : Prop The idea is that if, for any x : σ, ϕ is a well-formed proposition in context Γ ∪ {x : σ}, then ∀x : σ.ϕ is a well-formed proposition in context Γ. Given the formation rules for propositions, the usual transformation rules are laid out in the form of a sequent calculus, where a sequent Γ k Θ ` ψ means that in the context Γ of variable declarations x : σ the proposition ψ follows from the set of propositions Θ. Among the introduction rules of this sequent calculus,18 one has: Γ, x : σ k Θ ` ϕ x is not free in Θ Γ k Θ ` ∀x : σ.ϕ This ∀-introduction rule can be understood as a shift from a logical relation in context Γ, x : σ to another logical relation in context Γ. Thus it becomes natural to consider a base category of logical contexts (variable declarations), above each of which lies the “fiber” composed of all the logical relations that can be derived in that context. All logical relations put together make up a category of sequents, but each sequent lies above a single context. A logical calculus then is nothing else but a set of connections between logical relations lying above (possibly) different logical contexts. The syntactic indexed category FL attached to first-order logic L simply expounds that idea more formally. The category C of contexts is the category:

• whose objects are sets of declared variables {x1 : σ1, . . . , xn : σn}; 0 0 0 0 • and whose morphisms {x1 : σ1, . . . , xn : σn} → {x1 : σ1, . . . , xm : σm} are sequences f = hf1(x1 : σ1, . . . , xn), . . . , fm(x1 : σ1, . . . , xn)i of functional terms 0 such that x1 : σ1, . . . , xn : σn ` fj : σj for each j : 1 ≤ j ≤ m. The indexed category FL, then, is the indexed category over C defined by: • the fiber above each context Γ is the category of all propositions Γ ` χ : Prop well-formed in that context; • given a morphism f :Γ → Γ0 in C, the associated reindexation functor f ∗ maps 0 0 0 0 0 0 any proposition χ in context Γ = {x1 : σ1, . . . , xm : σm} to the proposition 0 0 χ [fj(x1, . . . , xn)/xj] in context Γ = {x1 : σ1, . . . , xn : σn}. Let us lay out the details of the construction of the indexed category FC induced by every mirror cube C (i.e., by the cylindric algebra A(C) attached to it). A mirror cube α . C = hU ,Tij, =i, 1ijii,j<α being given (with α = n or α = ω), let B0 the category whose objects are all ordinals [i] := {0, 1, . . . , i − 1} < α and whose morphisms are all maps [i] → [j]. To each object [i] of B0 corresponds the Boolean algebra F ([i]) consisting α of the restriction of A(C) to Ai := {x ∈ ℘(U ): ∀j ≥ i cjx = x} (the latter set is the “cone” of all formulae whose variable symbols are all among v0, . . . , vi−1). Furthermore, to each f :[j] → [i] corresponds the reindexation functor F (f) = f ∗ : F ([i]) → F ([j])

18See [3], p. 171 and p. 224 for further details. 10 Brice Halimi

∗ 0 op defined by: f (x) := sτ x with τ = [f(0)/0, . . . , f(j − 1)/j − 1]. A functor FC : B0 → Cat, i.e., an indexed category over B0, is thereby introduced, whose fibers are all Boolean algebras. It can be extended to a functor FC over the category B whose objects are all sets {k0, . . . , ki−1} with i < α and k ∈ S({0, . . . , i − 1}) (the set of all permutations on α {0, . . . , i − 1}). Indeed, it suffices to set: F ({k0, . . . , ki−1}) = {x ∈ ℘(U ): sk−1 (x) ∈ −1 F ([i])}, where k designates the substitution [0/k0, . . . , i − 1/ki−1]. (In what follows, α will be taken to be n, and the base category will be taken to be B0, it being understood that all results can easily be shown to remain true over B.)19

5. Completing the circle

Let us take stock. To each mirror cube C = C(M) associated to an Ln-structure M corresponds an indexed category FC = FC(M). On the other hand, to the reduction of

first-order logic to Ln corresponds a syntactic indexed category FLn analogous to FL. Since each C is a frame for CMMLn, and given the translation of Ln into CMMLn, a natural question turns on whether there is a connection between the indexed categories FC and FLn . The purpose of this last section is to give a positive answer to that question, by showing that the analysis of first-order logic via modal logic extends to the representation of both settings based on indexed categories —which will bring us back to our starting point. The question makes all the more sense since both indexed categories share the same base category. Indeed, the signature of Ln is single-typed (with sole type Σ, say), so a context relative to that signature is always of the form Γ = [vk0 :Σ, . . . , vki : Σ] with i < n, and thus can be identified with the set {k0, . . . , ki−1}, that is, with an object of the base category B of FC. (Up to renaming of the variables, such a context could be identified with [i] = {0, 1, . . . , i − 1}, however that would require imposing a certain order of occurrence of the variable symbols.) As a consequence, B is the base category of both FC and FLn .

It turns out that the comparison of the indexed categories FC and FLn is easier if the latter are replaced with the respective “fibered categories” canonically associated to them. Let us explain. A fibered category is a functor p : E → B such that, for any morphism u : X0 → X in B and for any object ξ above X (i.e., p(ξ) = X), there exists a morphism 0 ub : ξ → ξ in E lifting u (i.e., p(ub) = u) with the following property: for any morphism g : η → ξ in E and any w : p(η) → X0 such that p(g) = u ◦ w, there is a unique 0 morphism h : η → ξ in E above w (i.e., p(h) = w) such that g = ub ◦ h. Here is the

19See [3] for further details about the construction of f ∗ in special cases of “projections” and “diagonal” maps. A categorical aspect of the analogy between quantifiers and modalities 11

picture of the property: y M h MMM g MMM u MM x0 y b &/ x

p(y) K p(g) w uu KK uu KKK zuu u % X0 / p(x) .

Any such morphism ub, called a Cartesian lift of u, can be conceived of as a universal morphism among all the morphisms in E that lift u. A Cartesian lift, when it exists, is unique up to isomorphism. Given a fibered category p : E → B, if a distinguished 0 0 Cartesian lift ub : ξ → ξ is specified for each couple (u, ξ), where u : X → X = p(ξ) is any morphism in C and ξ is any object above X, p is said to be cloven. The category B is called the base category of p, E its total space and, for each −1 object X of B, the category EX := p (X), its fiber above X. This last term indicates the tight connection between fibered categories and indexed categories, which also consist of fibers. Actually, each indexed category F : Bop → Cat can be canonically transformed into a cloven fibered category Fe with base B.20 To see this, one has to turn the picture of F upside down. Let R F be the category: • whose objects are pairs (X ∈ B, ξ ∈ F (X)); • whose morphisms (X, ξ) → (X0, ξ0) are all pairs (u, f) such that u : X → X0 is a morphism in B and f : ξ → u∗(ξ0) is a morphism in F (X). R The projection Fe : F → B, (X, ξ) 7→ X defines a fibered category, which is cloven. Indeed, the choice, for each morphism u : X0 → X in B and each object ξ of F (X), of 0 ∗ the Cartesian lift (u, idu∗(ξ)):(X , u (ξ)) → (X, ξ) equips Fe with a cleavage.

Let us go back now to the comparison between FC and FLn , in the form of a mor-

phism of comparison K : FfC → FgLn between the corresponding fibered categories,

whose common base can be restricted to B0 without loss of generality. (As FLn is the

syntactic indexed category for Ln, FgLn is the associated “syntactic fibered category.”) R K R FC / FLn JJ JJ sss JJ ss FfC % yss FgLn B0 R n Let us recall that ( FC)[i] = FC([i]) = {x ∈ ℘(U ): ∀j ≥ i, cjx = x} and that the existence of a map u → v in F (i) amounts to an inclusion u ⊆ v. On the other R hand, the objects of ( FLn )Γ = FLn (Γ), for each context Γ, are the sets E of propo- sitions in context Γ, i.e., the couples of the form (ΓkE) such that the variables declared in Γ coincide with all the free variables contained in the formulae in E, and a morphism

20Conversely, each cloven fibered category can be canonically transformed into an indexed category. An indexed category and its associated cloven fibered category are two equivalent ways of presenting the same situation. 12 Brice Halimi

0 R (ΓkE) → (ΓkE ) in ( FLn )Γ amounts to the derivability of ΓkE ` ψ in Ln for each formula ψ ∈ E0. Now, let us introduce the comparison morphism K by the two following conditions.

1. For x ∈ FC([i]), K(x) := (ΓkE), where Γ := [v0 :Σ, . . . , vi−1 : Σ] and

E := {φ(v0, . . . , vi−1) ∈ Form(Ln): ∀u ∈ x, Σ  φ [u0, . . . , ui−1]}. R 21 2. A morphism m : y → x in FC, with x ∈ FC([i]) and y ∈ FC([j]), consists of ∗ a couple (η, f), where η :[j] → [i] is a morphism in B0 and f : y → η (x) an R inclusion in FC([j]) = ( FC)[j]. One states:

K(m) := (η(v0), . . . , η(vj−1): K(x) → K(y). R The morphism K(m) can be checked to be a morphism from K(x) to K(y) in FC. 0 0 R Indeed, a morphism f : (Γ kE ) → (ΓkE) in FLn consists in a tuple (t0, . . . , tj−1) of 0 terms such that Γ ` tl :Σ and ΓkE ` ψ[tl/vl] (0 ≤ l ≤ j − 1) for any formula ψ in E . Writing K(x) = (ΓkE) and K(y) = (Γ0kE0), and treating Σ as an arbitrary domain in n which to interpret Ln, one may suppose that, for all u ∈ Σ , (∀φ ∈ E, Σ  φ [u]) implies u ∈ x.22 So, for any u ∈ Σn: (∀φ ∈ E, Σ, u  φ) ⇒ u ∈ x 0 ∗ ∗ ⇒ ∀ψ ∈ E , Σ, η (u)  ψ (because y ⊆ η (x)) 0 ⇔ ∀ψ ∈ E , Σ  ψ(¯uη0 ,..., u¯ηj−1 ) 0 ⇔ ∀ψ ∈ E , Σ, u  ψ[vηl /vl] 0 ⇒ ∀ψ ∈ E ,E ` ψ[vηl /vl] , the last implication being obtained by completeness, since Σ is taken as an arbitrary do- 23 R R main. So K constitutes a functor, with K(x) ∈ ( FLn )[i] as soon as x ∈ ( FC)[i],

hence K is indeed a morphism of fibered categories from FfC to FgLn .

Let us now show that K actually turns FfC into a fibered subcategory of FgLn , i.e., R R that, for any x ∈ FC and any Cartesian morphism f : Y → K(x) in FL , there R n exists a Cartesian morphism g : z → x in FC such that f = K(g). Let us assume R 0 0 0 x ∈ ( FC)[i]. Moreover, let Y = (Γ kE ) with Γ = [vk0 :Σ, . . . , vkj−1 : Σ] and R 0 let (t1, . . . , ti−1): Y → K(x) be a morphism in FC. One has: Γ ` tl :Σ and 0 0 n Γ kE ` φ[tl/vl] (0 ≤ l ≤ i − 1) for every formula φ in E. Then y := {r ∈ Σ : 0 Σ  ψ(v0, . . . , vi−1)[r0, . . . , ri−1] ⇔ ψ ∈ E } satisfies K(y) = Y . Indeed, K(y) = 00 00 00 0 (Γ kE ) with E = {χ : ∀r ∈ y, Σ  χ [r]}. As every variable declared in Γ has a free occurrence in one of the formulae in E0, y depends on each declaration contained in 0 00 0 00 0 0 Γ , i.e., Γ ⊆ Γ (and so E ⊆ E ). Conversely, let us suppose that there exists vl ∈ Γ 00 00 such that vl ∈/ Γ : then clz = z, which can be rewritten Σ  3lχ ≡ χ for all χ ∈ E ,

21[3], p. 107. 22This closure condition is natural, since x is supposed to stand for an equivalence class of logically equivalent formulae: any assignment satisfying every member of K(x) can be said to “satisfy” x and is thus one of its ∗ ∗ elements. Similarly, one may suppose that y ⊆ η (x) implies that, for any u[vηl /vl] ∈ η (x), there exists r ∈ y such that (uη0 , . . . , uηj−1 ) = (r0, . . . , rj−1). 23See [3], 4.3.4, p. 249. A categorical aspect of the analogy between quantifiers and modalities 13

0 0 0 00 so Σ  3lχ ≡ χ for all χ ∈ E , and so vl ∈/ Γ . As a result, Γ ⊆ Γ . Besides, 0 00 00 0 χ ∈ E ⇔ ∀r ∈ y, Σ  χ [r] ⇔ χ ∈ E , thus E = E . Accordingly, K(y) = Y .

Now, let η :(vk0 , . . . , vkj−1 ) 7→ (t1(vk0 , . . . , vkj−1 ), . . . , ti−1(vk0 , . . . , vkj−1 )).

Since all the terms tl(vk0 , . . . , vkj−1 ) (0 ≤ l ≤ i − 1) are determined as soon as the

values of vk0 , . . . , vkj−1 are, the class of those terms can be identified with a collection of j variables, and thus η be considered as a morphism from {k0, . . . , kj−1} to [j] ⊆ [i]. In fact, [j] indicates the context in which the variables v0, . . . , vj−1 are declared, but [j] = {v0, . . . , vj−1, vbj,..., vcn,...} (where ‘vbl’ means that the variable vl is missed out) can more generally be identified with any set {t0, . . . , ti−1, (vi),..., (vn),...} whose active terms contain the same active variables as the previous one, while playing the role of fresh variables, so that a kind of variable change is carried out. One has: ∗ η (x) = x[tl(vk0 , . . . , vkj−1 )/vl] , 0 ≤ l ≤ i − 1

(the substitutions sτ x being extended to substitutions of arbitrary terms for the free vari- 0 0 ables in x). For any r ∈ y, by definition ∀ψ ∈ E , Σ  ψ [r], hence Σ  E [r]. Conse- 0 0 24 quently, as Γ kE ` φ[tl/vl], one gets by fiability:

∀r ∈ y ∀φ ∈ E, Σ  φ[tl(vk0 , . . . , vkj−1 )/vl][rk0 , . . . , rkj−1 ] , ∗ R hence y ⊆ η (x). The pair (η, ⊆) defines a morphism m : y → x in FC. Up to the identification of K(m) with η(vk0 , . . . , vkj−1 ) = (t0, . . . , ti−1), K(m) = f. It would remain to show that m is Cartesian if f is, but that point will be left aside here. Taking it for granted, one can conclude that FfC is a fibered subcategory of FgLn . Since the shift from C to FfC is functorial, each mirror cube amounts to a fibered subcategory of the syntactic fibered category attached to (the restriction of first-order logic to) Ln. The modal semantics for first-order logic, developed in terms of cylindric algebras, can thus be entirely presented in terms of fibered categories. That brings us back to our starting point: a structure for first-order logic induces a certain algebraic structure, which conversely is a substructure of the fibered category representing first-order logic. Also, getting back to Prior, one understands that the modal treatment made possible by the restriction to a finite number n of variable symbols combines two components: the parallel drawn by Prior (corresponding to the case i = 0), and its repetition across all possible sets of declared variables {v0, . . . , vi, . . . , vn−1}. We saw, indeed, that if a single bindable variable x is considered, any quantified formula can be identified with a mere notational variant of a modal formula (“∃xφx = 3xφx”). This identification can actually be generalized to any Ln-formula each time a fixed distribution of variable symbols is set: that “each time” clause is precisely what the formalism of fibered categories brings out in a precise and rigorous way.

24Ibid. 14 Brice Halimi

References [1] Johan van Benthem, Exploring Logical Dynamics, CSLI & FoLLI, Stanford, 1996. [2] Johan van Benthem & Natasha Alechina, “Modal Quantification over Structured Domains”, in Maarten de Rijke (ed), Advances in Intensional Logic, Volume 1, Kluwer Academic Publishers & CSLI, Stanford, 1997, 1-27. [3] Bart Jacobs, Categorical Logic and Type Theory, Elsevier, Amsterdam, 1999. [4] F. William Lawvere, “Adjointness in Foundations”, Dialectica, 23/3-4 (1969), 281-296. [5] Leon Henkin, Donald Monk & Alfred Tarski, Cylindric Algebras. Part I, North-Holland, Am- sterdam, 1971. [6] István Németi, “A Fine-Structure Analysis of First-Order Logic”, in Maarten Marx, László Polos & Michael Masuch (eds), Arrow Logic and Multi-Modal Logic, CSLI, Stanford, 1996. [7] Arthur N. Prior, Worlds, Times and Selves, Duckworth, London, 1977. [8] Paul Taylor, Practical Foundations of Mathematics, Cambridge University Press, Cambridge, 1999. [9] Yde Venema, “A Modal Logic of Quantification and Substitution”, in László Csirmaz, Dov M. Gabbay & Maarten de Rijke (eds), Logic Colloquium ’92, CSLI & FoLLI, Stanford, 1995, 293-309. [10] Yde Venema, “Cylindric Modal Logic”, The Journal of Symbolic Logic 60/2 (1995), 591-623.

Brice Halimi Université de Paris Département d’Histoire et de Philosophie des Sciences & SPHERE 8 place Paul Ricœur 75013 Paris, France e-mail: [email protected]