**3. Stratified Institutions**

*Models with states* appear in myriad forms in computing science and logic. Classes of examples include at least


The institution theory answer to this is given by the theory of *stratified institutions* introduced in [51,60] and further developed or invoked in works such as [52,53,56–58], etc. Informally, the main idea behind the concept of stratified institution as introduced in [51,60] is to enhance the concept of institution with 'states' for the models. Thus, each model *M* comes equipped with a *set* [[*M*]] that has to satisfy some structural axioms. The following definition has been given in [52] and represents an important upgrade of the original definition from [51], the main reason being to make the definition of stratified institutions really usable for conducting in-depth model theory. A slightly different upgrade has been proposed in [53], which is however strongly convergent to the upgrade proposed in [52].

A *stratified institution* S is a tuple (*Sign*S, *Sen*S, *Mod*S, [[\_]]S, |=<sup>S</sup> ) consisting of:


Until this point, this definition is identical to that of an ordinary institution. However, now comes the additional structure that provides explicitly the states of the models.


$$\text{Mod}^{\mathcal{S}}(\varphi)M'\ (\vdash^{\mathcal{S}})\mathop{\mathbb{L}}^{[M']\_{\varphi}w}\_{\mathcal{P}}\ \text{of}\ \text{and}\ \text{only}\ \text{if}\ \ M'\ (\vdash^{\mathcal{S}})^w\_{\varphi\Box}\ \text{Sen}^{\mathcal{S}}(\varphi)\rho\tag{2}$$

holds for any signature morphism *ϕ*, *M* ∈ |*Mod*<sup>S</sup> (*ϕ*✷)|, *w* ∈ [[*M* ]]S *<sup>ϕ</sup>*✷, *ρ* ∈ *Sen*<sup>S</sup> (✷*ϕ*). As for ordinary institutions, when appropriate, we shall also use simplified notations without superscripts or subscripts that are clear from the context.

The lax natural transformation property of [[\_]] is depicted in the diagram below

with the following compositionality property for each Σ -model *M* :

$$\left[\left[M^{\prime\prime}\right]\_{\left(q\circ q^{\prime}\right)} = \left[M^{\prime\prime}\right]\_{q^{\prime}\prime} \left[\left[M\text{od}\left(q^{\prime}\right)M^{\prime\prime}\right]\right]\_{q^{\prime}}.\tag{3}$$

Moreover, the natural transformation property of each [[\_]]*<sup>ϕ</sup>* is given by the commutativity of the following diagram:

$$\begin{array}{c} \begin{array}{c} \left[M'\right] \left[\Sigma'\right] \xrightarrow{\left[M'\right]\_{\mathcal{F}}} \left[\operatorname{Mod}(\boldsymbol{\varrho})M'\right] \Sigma\\ \left[h'\right] \end{array} \end{array} \qquad \begin{array}{c} \left[M'\right] \left[\Sigma'\right] \xrightarrow{\left[M'\right]\_{\mathcal{F}}} \left[\operatorname{Mod}(\boldsymbol{\varrho})M'\right] \Sigma\\ \left[h'\right] \end{array} \qquad\qquad \begin{array}{c} \left[\left[\operatorname{Mod}(\boldsymbol{\varrho})h'\right]\Sigma\\ \left[\left[N'\right]\right]\_{\Sigma'} \xrightarrow{\left[N'\right]\_{\mathcal{F}}} \left[\operatorname{Mod}(\boldsymbol{\varrho})N'\right] \Sigma \end{array} \end{array} \tag{4}$$

The satisfaction relation can be presented as a natural transformation

$$\left| = : \operatorname{Sen} \Rightarrow \left[ \left[ \operatorname{Mod}(\\_) \to \mathbf{Set} \right] \right] \right| $$

where the functor [[*Mod*(\_) → **Set**]] : *Sign* → **Set** is defined by


$$\mathbb{E}[\operatorname{Mod}(\varrho) \to \mathbf{Set}](f)(\mathcal{M}') = [\![\mathcal{M}']\!]\_{\varrho}^{-1}(f(\operatorname{Mod}(\varrho)\mathcal{M}')).$$

A straightforward check reveals that the Satisfaction Condition (2) appears exactly as the naturality property of |=:

$$\begin{array}{l} \tiny\begin{array}{l} \Sigma\\ \Leftrightarrow\\ \Sigma'\\ \end{array} \end{array} \begin{array}{l} \scriptstyle \mathit{Sen}(\Sigma) \xrightarrow{\left\| \begin{array}{l} \vdash \Sigma\\ \Longrightarrow\\ \end{array} \right\|} \begin{array}{l} \llbracket \mathit{Mod}(\Sigma) \rightarrow \mathit{Set} \end{array} \end{array} \begin{array}{l} \scriptstyle \mathit{[Mod}(\Sigma) \rightarrow \mathit{Set} \end{array} \end{array} \begin{array}{l} \scriptstyle \mathit{[Mod}(\Sigma) \rightarrow \mathit{Set} \end{array} \begin{array}{l} \scriptstyle \mathit{Set} \end{array} \end{array}$$

Ordinary institutions are the stratified institutions for which [[*M*]]<sup>Σ</sup> is always a singleton set. In the upgraded definition, the surjectivity condition on [[*M* ]]*<sup>ϕ</sup>* from [51] has been removed, as it can be made explicit when necessary. This is motivated by the fact that most of the results developed do not depend upon this condition which, however, holds in all examples known by us. On the one hand, in many important concrete situations (Kripke semantics, automata, etc.), [[*M* ]]*<sup>ϕ</sup>* are even identities, which makes [[\_]] a strict rather than a lax natural transformation. However, on the other hand, there are interesting examples when the stratification is properly lax, such as in the OFOL example below or the representation of 3/2 institutions as stratified institutions developed in [58].

The literature on stratified institutions shows many model theories that are captured as stratified institutions. Here, we recall some of them in a very succint form; for a more detailed form, one may find them in [52,57,58].


That was the brief presentation of the concept of stratified institution together with a list of relevant concrete examples. In the remaining part of this section, we will present some of the most important model theoretic developments with stratified institutions as follows:


## *3.1. Flattening Stratified Institutions to Ordinary Institutions*

Given any stratified institution S = (*Sign*, *Sen*, *Mod*, [[\_]], |=), in [52], we have built an ordinary institution <sup>S</sup> = (*Sign*, *Sen*, *Mod* , <sup>|</sup><sup>=</sup> ) as follows:


$$(\mathcal{M}od^\sharp(\mathcal{q})(\mathcal{M}', w') = (\mathcal{M}od(\mathcal{q})\mathcal{M}', [\![\mathcal{M}']\!]\_{\mathcal{q}}w'); \mathcal{q}$$

– For each Σ-model *M*, each *w* ∈ [[*M*]]Σ, and each *ρ* ∈ *Sen*(Σ)

$$((M, w) \mathop{\mid\=}^{\sharp}\_{\Sigma} \rho) = (M \mathop{\mid\=}^{w}\_{\Sigma} \rho). \tag{5}$$

In [57], the construction of <sup>S</sup> is explained as a categorical universal construction. That explanation involves the concept of *morphism of stratified institutions* which is an extension of the notorious concept of *morphism of institutions* (cf. [18,44,46], etc.). Both concepts represent mappings that preserve the mathematical structure of stratified institutions and of ordinary institutions, respectively, in the same way group homomorphisms preserve the group structure, or the continuous functions preserve the structure of topological spaces. Thus, (\_) arises as a left-adjoint functor from the category **SINS** of strict stratified institutions to the category **INS** of ordinary institutions. One way to present this is that for each institution <sup>B</sup>, there exists a stratified institution <sup>B</sup> and an institution morphism *<sup>ε</sup>*<sup>B</sup> : <sup>B</sup> → B such that for each morphism of institutions(Φ, *<sup>α</sup>*, *<sup>β</sup>*) : <sup>S</sup> → B, there exists a unique strict stratified institution morphism (Φ, *α*, *β* ) : S → B such that the following diagram commutes:

The construction <sup>S</sup> , called the *flattening of* <sup>S</sup>, on the one hand reduces stratified institutions to ordinary institutions without any loss of information. It is helpful for transferring concepts and results from the simpler world of ordinary institution theory to that of stratified institutions. One important example of that is given by the model amalgamation property, which is one of the most fundamental properties of institutions with vast consequences both in computing science and in institutional model theory (cf. [25,44,65], etc.). Model amalgamation in <sup>S</sup> defines the so-called *stratified model amalgamation* in <sup>S</sup> [57], which is more refined than plain model amalgamation in S and is a characteristic only to stratified institutions. On the other hand, it is important to avoid the trap of believing that in this way, the theory of stratified institutions can be dealt with entirely within the

ordinary institution theoretic framework. The reason for this cannot be the case that the institutions <sup>S</sup> are not any institutions, as they have a very specific structure given by the stratified structure of S.

Another way to reduce a stratified institution to an ordinary institution is to flatten only the satisfaction relation, i.e.,

$$\text{If } M \vdash^\* \rho \text{ if and only if } \ M \vdash^w \rho \text{ for each } w \in \lbrack M \rbrack.$$

This yields an institution when the stratification is surjective (i.e., for each signature morphism *ϕ* and each *ϕ*✷-model *M* , [[*M* ]]*<sup>ϕ</sup>* is surjective). However, in this institution, denoted S∗, the locality aspect of S—which is very important—is lost. In the literature, <sup>S</sup><sup>∗</sup> and <sup>S</sup> are known as the *global* and the *local*, respectively, institutions associated to <sup>S</sup>. They can be regarded as high abstractions of the global and of the local satisfaction in modal logic.
