3.4.3. Modalities

While propositional and quantification connectives in stratified institutions can still be explained in terms of their ordinary institution theoretic counterparts, modalities and nominals can be defined only in the presence of stratifications because both of them rely semantically on models having internal states. Moreover, this is not enough; in both cases, some additional specific semantic infrastructure is also needed.

In order to define semantic possibility (✸) and necessity (✷) in a stratified institution, we have to be able to 'extract' Kripke frames from the stratification. Let REL denote the sub-institution of FOL determined by those signatures without function symbols. Let REL<sup>1</sup> denote the single sorted version of REL. Given a stratified institution S, a *binary frame extraction* assumes that for each signature Σ, the stratification [[\_]]<sup>Σ</sup> is a composition between a functor *Fr*<sup>Σ</sup> : *Mod*(Σ) <sup>→</sup> *Mod*REL<sup>1</sup> (*<sup>λ</sup>* : <sup>2</sup>) and the forgetful functor *Mod*REL<sup>1</sup> (*λ* : 2) → **Set**, where *Mod*REL<sup>1</sup> (*λ* : 2) is the category of the FOL models for a single sorted signature with one binary relation symbol *λ*.

Note that the models of *Mod*REL<sup>1</sup> (*λ* : 2) are exactly the Kripke frames *W* = (|*W*|, *Wλ*) of the modal logic examples MPL, MFOL, HPL, and HFOL. Since |*Fr*Σ(*M*)| = [[*M*]]Σ, we can write *Fr*Σ(*M*) = ([[*M*]]Σ,(*Fr*Σ(*M*))*λ*). The *Fr*<sup>Σ</sup> functors are also required to form a lax natural transformation from *Mod* to the constant functor mapping any signature to the category *Mod*REL<sup>1</sup> (*λ* : 2).

Concretely, in the stratified institutions MFOL, MPL, HFOL, and HPL, the *Fr* maps the Kripke models (*W*, *M*) to their underlying Kripke frames *W* = (|*W*|, *Wλ*).

In the most general situation, when we allow *polyadic* modalities, i.e., modalities with more than one argument, first, we need a functor *<sup>L</sup>* : *Sign*<sup>S</sup> <sup>→</sup> *Sign*REL<sup>1</sup> such that *L*(Σ) represents the relation symbols corresponding to the modalities of Σ (we allow a flexible approach where the modalities may change with the signature). Then, we have a more general concept of frame extraction. In the binary case, *L*(Σ) is always {*λ* : 2} and hence, there is no reason to have *λ* as part of the signatures.

A *(general) frame extraction* (*L*, *Fr*) is a stratified institution morphism

$$(L, \oslash, Fr) \text{ : } \mathcal{S} \to \mathcal{R} \mathcal{EL}^1$$

where REL<sup>1</sup> is considered as a stratified institution with no sentences, and for each REL1 model *M*, [[*M*]] is the underlying set of *M* and the satisfaction is invariant with respect to

the states, i.e., *<sup>M</sup>* <sup>|</sup>=*<sup>w</sup> <sup>ρ</sup>* is *<sup>M</sup>* <sup>|</sup><sup>=</sup> *<sup>ρ</sup>*. Commonly, in concrete examples, it happens that frame extractions are in fact strict institution morphisms.

In any stratified institution endowed with a binary frame extraction *Fr*, a Σ-sentence *ρ* is a *semantic*


for each Σ-model *M*.

Obviously, in MPL, MFOL, HPL, and HFOL, we have that each ✸*ρ*/✷*ρ* is a semantic possibility/necessity of *ρ* in the sense of our definitions above. The concept of semantic possibility/necessity admits an obvious extension to polyadic modalities by using general frame extractions.

## 3.4.4. Nominals

In order to define the semantics of hybrid features such as nominals and the satisfaction operator (@) in stratified institutions, we need to be able to extract nominals data from the corresponding stratification. Let SET C be the sub-institution of FOL that restricts the signatures to single-sorted ones and without relation symbols or function symbols of non-null arity, so only constants being admitted. Given a stratified institution S, a *nominals extraction* assumes two additional data:


such that the *Nm*<sup>Σ</sup> functors are also required to form a lax natural transformation *Mod*<sup>S</sup> ⇒ *N*; *Mod*SET C .

Hence, a nominals extraction (*N*, *Nm*) is a stratified institution morphism

$$(N, \bigcirc, Nm) \text{ : } \mathcal{S} \to \mathcal{SCTC}$$

where SET C is considered as a stratified institution in the same manner we considered REL<sup>1</sup> as a stratified institution.

Concretely, in the stratified institutions of the hyrbid modal logics HFOL, HPL, we have that *N* maps each signature (Nom, Σ) to the single-sorted signature of constants Nom, and that *Nm*(Nom,Σ) maps each Kripke model (*W*, *M*) to the *Mod*SET C (Nom)-model (|*W*|,(*Wi*)*i*∈Nom), so from the Kripke models, it forgets both the *<sup>M</sup>* part as well as the accessibility relation *Wλ*.

In any stratified institution endowed with a nominals extraction *N*, *Nm*, for each signature Σ and each *i* ∈ *N*(Σ),


$$\left[\!\!\left[M,\rho'\right]\!\right] = \begin{cases} \left[\!\!\left[M\right]\!\right]\_\prime & \left(\!\!\left(\!!m\_\Sigma M\right)\_i \in \left[\!\!\left[M,\rho\right]\!\right] \\ \left[\!\!\left]\_\prime\right] & \left(\!\!\left(\!!m\_\Sigma M\right)\_i \notin \left[\!\!\left[M,\rho\right]\!\right] \end{cases} \right]$$

for each Σ-model *M*.

In HPL and HFOL, we have that each nominal *i* of the signature is an *i*-sentence and each sentence @*iρ* is a satisfaction at *i* in the sense of the above definitions. In general, for the distinguished *i*-sentences and satisfaction at *i*, we may use the notations *i*-sen and @*iρ*, respectively.
