5.2.3. Sketch Arrows and Sketch Implications

We can not only transform Ξ-structures U into the Stm-sketches S<sup>U</sup> <sup>Φ</sup> and S<sup>U</sup> . We can even encode the validity of certain classes of "closed formulas" in U by means of semanticsindependent, pure structural closedness properties of SU <sup>Φ</sup> or S<sup>U</sup> , respectively. To see this, we need some preparations.

First, we have to take a step back and consider a very simple, semantics-independent relationship between sketches. To be prepared for Section 6, we define this relationship on the same level of abstraction as Definition 16 (Sketch).

**Definition 20** (Sketch Arrow)**.** *Let us be given a category* Ct *and a functor* St : Ct → Set*. An arrow <sup>ϕ</sup>* : <sup>K</sup> <sup>→</sup> <sup>G</sup> *between two* St*-sketches* <sup>K</sup> = (*K*, *St*K)*,* <sup>G</sup> = (*G*, *St*G) *is given by a context morphism <sup>ϕ</sup>* : *<sup>K</sup>* <sup>→</sup> *G. <sup>ϕ</sup>* : <sup>K</sup> <sup>→</sup> <sup>G</sup> *is called strict if St*<sup>G</sup> <sup>⊇</sup> St(*ϕ*)(*St*K)*.*

Sk(St)*<sup>a</sup> denotes the category of all* St*-sketches and all* St*-sketch arrows between them. Its subcategory of all* St*-sketches and all strict* St*-sketch arrows is denoted by* Sk(St)*<sup>a</sup> s.*

If St is clear from the context, we will also use the shorthand notations Sk*<sup>a</sup>* and Sk*<sup>a</sup> s* instead of Sk(St)*<sup>a</sup>* and Sk(St)*<sup>a</sup> <sup>s</sup>*, respectively. If *K* = *G* and *ϕ* = *idK*, we will also just write K → G instead of *ϕ* : K → G. We consider the case Ct = Cxt, St = Stm with IS = (Cxt, Stm, Int, |=) an Institution of Statements.

**Remark 22** (Sketch Morphisms vs. Sketch Arrows)**.** *An* IS*-morphism ϕ* : K G *is a* Stm*sketch arrow <sup>ϕ</sup>* : <sup>K</sup> <sup>→</sup> <sup>G</sup> *satisfying the semantical* morphism condition *St*<sup>G</sup> *<sup>G</sup>* Stm(*ϕ*)(*St*K)*. Not every* Stm*-sketch arrow ϕ* : K → G *provides an* IS*-morphism ϕ* : K G*, but each* IS*-morphism ϕ* : K G *has an* underlying Stm-sketch arrow *ϕ* : K → G*.*

*Any strict* Stm*-sketch arrow ϕ* : K → G *satisfies, trivially, the morphism condition and provides, in such a way, a strict* IS*-morphism ϕ* : K G *due to Definition 19.*

There is, however, another semantical condition that is kind of dual to the morphism condition. We call this condition the implication condition and, as a "terminological sleight of hand", we introduce the concept of a "sketch implication", simply indicating that a sketch arrow is intended to be the subject of this dual semantical condition.

**Definition 21** (Sketch implication)**.** *An* IS*- implication* <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *is given by two* Stm*-sketches* <sup>P</sup> = (*P*, *St*P)*,* <sup>C</sup> = (*C*, *St*C) *and a context morphism <sup>ϕ</sup>* : *<sup>P</sup>* <sup>→</sup> *C.*

*An* IS*-implication* <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup> *is called strict if St*<sup>C</sup> <sup>⊇</sup> Stm(*ϕ*)(*St*P)*.*

Sk(IS)*<sup>i</sup> denotes the category of all* Stm*-sketches and all* IS*-implications between them. Its subcategory of all* Stm*-sketches and all strict* IS*-implications is denoted by* Sk(IS)*<sup>i</sup> s.*

If IS is clear from the context, we will also use the shorthand notations Sk*<sup>i</sup>* and Sk*<sup>i</sup> s* instead of Sk(IS)*<sup>i</sup>* and Sk(IS)*<sup>i</sup> <sup>s</sup>*, respectively. If *P* = *C* and *ϕ* = *idP*, we will also simply write <sup>P</sup> <sup>⇒</sup> <sup>C</sup> instead of <sup>P</sup> *idP* <sup>=</sup><sup>⇒</sup> <sup>C</sup>.

What we call the implication condition is nothing but the usual condition that an implication is valid if each "solution" of the premise gives rise to a "solution" of the conclusion.

**Definition 22** (Validity of Sketch Implications)**.** *Let us be given an* IS*-implication* <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *between two* Stm*-sketches* P = (*P*, *St*P) *and* C = (*C*, *St*C)*.*

*An interpretation* (*ι*, <sup>U</sup>) *of context <sup>P</sup> in a* <sup>Ξ</sup>*-structure* <sup>U</sup> *satisfies* <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup>*,* (*ι*, <sup>U</sup>) <sup>|</sup><sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *in symbols, if, and only if,* (*ι*, <sup>U</sup>) <sup>|</sup>=*<sup>P</sup> St*<sup>P</sup> *implies that there exists an interpretation* (, <sup>U</sup>) *of context C in* <sup>U</sup> *with <sup>ϕ</sup>*; <sup>=</sup> *<sup>ι</sup> such that* (, <sup>U</sup>) <sup>|</sup>=*<sup>C</sup> St*C*.*

<sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup> *is valid in a* <sup>Ξ</sup>*- structure* <sup>U</sup>*,* U |<sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *in symbols, if, and only if, we have* (*ι*, <sup>U</sup>) <sup>|</sup><sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *for all interpretations* (*ι*, U) *of P in* U*.*

<sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup> *is valid (in* IS*),* <sup>|</sup><sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup> *in symbols, if, and only if,* U |<sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *for all* Ξ*-structures* U *in* Sem(Ξ)*.*

**Remark 23** (Subcategories of valid Sketch Implications)**.** *For any* Ξ*-structure* U *and any* Stm*sketch* <sup>P</sup> *we have* U |<sup>=</sup> <sup>P</sup> *id* <sup>⇒</sup>*<sup>P</sup>* <sup>P</sup>*. Moreover,* U |<sup>=</sup> <sup>A</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>B</sup> *and* U |<sup>=</sup> <sup>B</sup> *<sup>ψ</sup>* <sup>⇒</sup> <sup>C</sup> *implies* U |<sup>=</sup> <sup>A</sup> *<sup>ϕ</sup>*;*<sup>ψ</sup>* <sup>=</sup><sup>⇒</sup> <sup>C</sup>*. In such a way, the collection of all* IS*-implications, valid in a* Ξ*-structure* U*, defines a corresponding subcategory of* Sk*<sup>i</sup> with the same objects as* Sk*<sup>i</sup> .*

*Intersecting all those subcategories for all* Ξ*-structures* U *in* Sem(Ξ)*, we obtain the subcategory* Sk*<sup>i</sup>* (Sem(Ξ)) *of* Sk*<sup>i</sup> given by all* IS*-implications valid in* IS*.*

**Remark 24** (Sketch Implications vs. Sketch Arrows)**.** *An* IS*-implication* <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *is simply another notation for a* Stm*-sketch arrow <sup>ϕ</sup>* : <sup>P</sup> <sup>→</sup> <sup>C</sup>*. The only difference is that we allow* <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *to be the subject of semantical* implication conditions*, like* U |<sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* ⇒ C*, while the corresponding* Stm*-sketch arrow ϕ* : P → C *is considered as a pure structural entity without any semantical significance.*

*In contrast to* IS*-morphisms (compare Remark 22), a strict* Stm*-sketch arrow ϕ* : P → C *does not give, trivially, rise to an* IS*-implication* <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *satisfying semantical* implication conditions*.*

*For any* Stm*-sketch arrow ϕ* : P → C*, we can construct a respective strict* Stm*-sketch arrow <sup>ϕ</sup>* : <sup>P</sup> <sup>→</sup> <sup>C</sup>*<sup>ϕ</sup> with* <sup>C</sup>*<sup>ϕ</sup>* := (*C*, *St*<sup>C</sup> <sup>∪</sup> Stm(*ϕ*)(*St*P))*. The satisfaction condition ensures that the corresponding* IS*-implications* <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup> *and* <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup>*<sup>ϕ</sup> are semantically equivalent:* U |<sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *if, and only if,* U |<sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup>*<sup>ϕ</sup> for all* <sup>Ξ</sup>*-structures* <sup>U</sup>*.*

**Remark 25** (Sketch Implications vs. Sketch Morphisms)**.** *The concepts* sketch morphism *and* sketch implication *are skewed but kind of dual. Sketch morphisms talk about "reducts of models" while sketch implications state the existence of "model extensions".*

*In case P* = *C and ϕ* = *idP, a* Stm*-sketch arrow ϕ* : P → C *provides an* IS*-morphism idP* : <sup>P</sup> <sup>C</sup> *if, and only if, St*<sup>C</sup> *<sup>P</sup> St*<sup>P</sup> *while the validity in* IS *of the corresponding* IS*-implication* <sup>P</sup> <sup>⇒</sup> <sup>C</sup> *means semantic entailment exactly in the opposite direction St*<sup>P</sup> *<sup>P</sup> St*C*!*

**Remark 26** (Deduction Rules)**.** *Attention, the exposition in the following remarks and examples, relies implicitly on the observation that sketch arrows can be utilized as deduction rules. A deduction rule, given by a* Stm*-sketch arrow ϕ* : P → C*, is sound for a certain Institution of Statements* IS = (Cxt, Stm, Int, <sup>|</sup>=) *if, and only if, the respective* IS*-implication* <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *is valid in* IS*!*

*The utilization of sketch arrows as deduction rules is triggered by Definition 23 as well as Proposition 3 and Corollary 2 at the end of this subsection and will be discussed shortly in Remark 32.*

**Remark 27** (Valid Sketch Implications and Axioms)**.** *There are* IS*-implications (or, more precisely,* IS*-implication schemata) that are universal in the sense that they are valid in any Institution of Statements* IS = (Cxt, Stm, Int, |=)*, since they reflect the structure and semantics of feature expressions. In particular, the* introduction *and* elimination *rules for logical connectives can be described by those universal sketch implications. In case of conjunction* ∧*, for example, we do have the two* Stm*-sketches* L = (*X*, {(*X*, *Ex*<sup>1</sup> ∧ *Ex*2, *idX*)}) *and* R = (*X*, {(*X*, *Ex*1, *idX*),(*X*, *Ex*2, *idX*)})*. In addition, the "elimination rule"* L ⇒ R *as the "introduction rule"* R ⇒ L *are universal sketch implications.*

*For* existential quantification, *we do also have a kind of modus ponens at hand described by the following universal sketch implication:*

$$((X, \{(X, Ex\_1, id\_X), (X, Ex\_1 \to \exists (\varphi, Y : Ex), id\_X)\}) \xrightarrow{\mathcal{q}} (Y, \{(Y, Ex\_2, id\_Y)\}).\tag{15}$$

*The validity of other* IS*-implications may only depend on the chosen base category* Base *of an Institution of Statements. As long as* Base *is a presheaf topos, we do have, for example,* IS*implications at hand expressing reflexivity, symmetry and transitivity of* equality*, i.e., reflecting the properties of identifications of entities by means of maps (compare the definition of the* Ξ*CTexpression* [=] *in Example 29).*

*Besides universal* IS*-implications, we do also have* IS*-implications that are valid in all* Ξ*-structures* U*, and we have chosen to be in* Sem(Ξ)*. In case* Sem(Ξ)*Obj* - Str(Ξ)*Obj, we may be able to axiomatize* Sem(Ξ) *in the sense that there is a set SEM of* IS*-implications such that* Sem(Ξ) = Str(Ξ, *SEM*) *where* Str(Ξ, *SEM*) *is the full subcategory of* Str(Ξ) *given by all those* <sup>Ξ</sup>*-structures* <sup>U</sup> *such that* U |<sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup> *for all* IS*-implications* <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *in SEM.*

*In the same way, we can utilize any set IMP of* IS*-implications as a set of axioms describing the full subcategory* Sem(Ξ, *IMP*) *of* Sem(Ξ) *given by all those* Ξ*-structures* U *in* Sem(Ξ) *such that* U |<sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup> *for all* IS*-implications* <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *in IMP.*

*At the end of Section 5.2.1, we described a mechanism to define subcategories of* Sem(Ξ) *by means of axioms in the traditional Hilbert-style, i.e., by* Stm*-sketches* (**0**, *St*) *with St only containing* closed formulas*, i.e., statements of the form* (**0**, *Ex*, *id***0**)*. This mechanism can be integrated in the sketch implication based axiomatization mechanism, in a trivial way, by simply adding to IMP a corresponding* introduction rule (**0**, ∅) ⇒ (**0**, *St*)*. For certain classes of closed formulas, there exist more elaborated transformations of Hilbert-style axioms into sketch implication based axioms, as discussed in Section 5.2.4.*

**Example 45** (FOL: Sketch implications)**.** *Horn clauses are defined and utilized in PROLOG, in a way that it seems to be appropriate to consider them as sketch implications rather than universally quantified implications. That is, we consider a Horn clause not as a closed formula* (**0**, ∀(*X* : *Ex* → *Ex* ), *id***0**) *with Ex a finite conjunction of atomic expressions X Fi*(*βi*)*, β<sup>i</sup>* : *αFi* → *X with* 1 ≤ *i* ≤ *n and an atomic expression X Ex* = *F*(*β*)*, <sup>β</sup>* : *<sup>α</sup><sup>F</sup>* <sup>→</sup> *X, but rather as the corresponding* IS*-implication* <sup>P</sup> <sup>⇒</sup> <sup>C</sup> *with* <sup>P</sup> = (*X*, *St*P)*, St*<sup>P</sup> <sup>=</sup> {(*αFi*, *Fi*(*idαFi* ), *<sup>β</sup>i*) <sup>|</sup> <sup>1</sup> <sup>≤</sup> *<sup>i</sup>* <sup>≤</sup> *<sup>n</sup>*} *and* <sup>C</sup> = (*X*, *St*C)*, St*<sup>C</sup> <sup>=</sup> {(*αFi*, *<sup>F</sup>*(*idαF*), *<sup>β</sup>*)}*.*

**Example 46** (ALC: Sketch implications)**.** *A so-called TBox in ALC is a finite set of* terminological axioms*, i.e., of* general concept inclusions C D*. For the way the semantics of* general concept inclusions *is defined in ALC, they correspond, analogous to Horn clauses, rather to sketch implications (than to closed formulas):*

$$(\left( \{ p\_1 \} , \{ (\{ p\_1 \} , \mathfrak{C}(p\_1) , id\_{\{ p\_1 \} }) \} \right) \Longrightarrow (\left( \{ p\_1 \} , \{ (\{ p\_1 \} , \mathfrak{D}(p\_1) , id\_{\{ p\_1 \} }) \} \right)$$

**Example 47** (Category Theory: Sketch implications)**.** *There are, at least, three ways to axiomatize that all vertices do have an identity. First, we can require, due to Remark 18:*

$$\mathcal{U} \equiv (\mathbf{0}, \forall (X: \exists (in, a\_{CT}(\mathtt{id}): \mathtt{id}(id\_{a\_{CT}(\mathtt{id})}))), id\_{\mathtt{0}}))$$

*where graph X consists only of a vertex xv and in* : *X* → *αCT*(id) *is the inclusion of X into αCT*(id) *(see Examples 14 and 29). As proposed in Remark 27, we can equivalently add the introduction rule:*

(**0**, ∅) =⇒ (**0**, {(**0**, ∀(*X* : ∃(*in*, *αCT*(id) : id(*idαCT*(id)))), *id***0**)})

*to our axioms. According to a general pattern, discussed in the next Section 5.2.4, we can use, instead, the equivalent rule:*

$$(X, \bigcirc) \Longrightarrow \left(X, \{ (X, \exists (in\_{\vee} a\_{\sqsubset T} (\mathsf{id}) : \mathsf{id} (id\_{a\_{\sqsubset T} (\mathsf{id})})), id\_X) \} \right).$$

*In turn, this second rule can be composed with a simple variant of the modus ponens rule (15), and we obtain a third equivalent rule:*

$$((X, \bigcirc) \stackrel{in\_\succ}{\Longrightarrow} (\mathfrak{a}\_{CT}(\mathtt{id}), \{(\mathfrak{a}\_{CT}(\mathtt{id}), \mathtt{id}(\operatorname{id}\_{\mathfrak{a}\_{CT}(\mathtt{id})})), \operatorname{id}\_{\mathfrak{a}\_{CT}(\mathtt{id})})\}))$$

**Example 48** (RM: Sketch implication)**.** *In DPF, we worked, until now, only with atomic statements and atomic sketch implications called* universal constraint*. In [18,21], the reader can find many examples of those sketch implications expressing properties like: any table should have exactly one primary key, a foreign key has to refer to a primary key, and many, many others. In Remark 28, we will relate the present DPF-terminology to the concepts introduced in this paper.*

In the remaining part of the subsection, we demonstrate how to encode the validity of sketch implications by a semantics-independent, pure structural closedness property of the sketch encodings S<sup>U</sup> = (*U*, *St*<sup>U</sup> ) of Ξ-structures U as defined in (13).

For any context *P* any statement (*X*, *Ex*, *β*) in *P* and any interpretation (*ι*, U) of *P* in a Ξ-structure U, we have Stm(*ι*)(*X*, *Ex*, *β*)=(*X*, *Ex*, *β*; *ι*), due to (2), thus the satisfaction condition and the equivalences in (14) provide the following equivalence of statements:

$$\begin{array}{ccccc} (\mathsf{i}, \mathsf{i}\mathsf{J}) \mid \mathsf{p} \mid \mathsf{X}, \mathsf{Ex}, \mathsf{f}\mathsf{)} & \mathsf{iff} & (\mathsf{id}\mathsf{u}, \mathsf{l}\mathsf{l}) \mid \mathsf{u}\mathsf{u}\,\,(\mathsf{X}, \mathsf{Ex}, \mathsf{f}\mathsf{j}; \mathsf{l}) & \mathsf{iff} & \mathsf{Stm}(\mathsf{l}) (\mathsf{X}, \mathsf{Ex}, \mathsf{f}) \in \mathsf{S}\mathsf{f}^{\mathsf{f}} \\\\ & & \begin{array}{c} \mathsf{P} \\ \mathsf{1}\mathsf{N} \end{array} \end{array} \tag{16}$$

To be prepared for Section 6, we define the closedness property on the same level of abstraction as Definition 16 (Sketch) and Definition 20 (Sketch Arrow).

**Definition 23** (Closedness)**.** *Let us be given a category* Ct *and a functor* St : Ct → Set*. A* St*-sketch* <sup>K</sup> = (*K*, *St*K) *is closed w.r.t. a* St*- sketch arrow <sup>ϕ</sup>* : <sup>P</sup> <sup>→</sup> <sup>C</sup> *relative to a strict* St*- sketch arrow ι* : P → K *if, and only if, there exists a strict* St*-sketch arrow* : C → K *such that ι* = *ϕ*; *.*

*A* St*-sketch* K *is closed w.r.t. a* St*- sketch arrow ϕ* : P → C *if, and only if, it is closed w.r.t. ϕ* : P → C *relative to each strict* St*-sketch arrow ι* : P → K*.*

We consider the case Ct = Cxt, St = Stm with IS = (Cxt, Stm, Int, |=) an Institution of Statements. From Definition 22, Definition 23 and Equation (16), we obtain immediately:

**Proposition 3** (Validity ∼= Closedness)**.** *For any* Stm*-sketch arrow ϕ* : P → C*, the following two statements are equivalent for any* Ξ*-structure* U*:*


In case of arrows between atomic sketches, we can obviously replace SU by SU Φ.

**Corollary 2** (Validity ∼= Closedness)**.** *For any* Stm*-sketch arrow ϕ* : P → C *with* P *and* C *atomic, the following two statements are equivalent for any* Ξ*-structure* U*:*


**Remark 28** (DPF–Answer to Question 3)**.** *In DPF, we worked, until now, only with atomic statements and we have not considered sketch arrows [18,21]. Having now the concept* sketch arrow *explicitly at hand, we can gain a better understanding of the present situation in DPF and are able to answer Question 3 (p. 7).*

*The "specification morphisms" in DPF are strict sketch morphisms in the sense of Definition 19. "Specification entailments" in DPF are sketch implications in the sense of Definition <sup>21</sup> but only of the special kind* <sup>P</sup> *idP* <sup>=</sup><sup>⇒</sup> <sup>C</sup>*, i.e., we have, especially, <sup>P</sup>* <sup>=</sup> *C. The validity of specification entailments is defined analogously to the validity of sketch implications in Definition 22.*

*"Universal constraints" in DPF correspond to strict sketch arrows in the sense of Definition 20, and we defined the semantics of universal constraints in accordance with Definition 23. The crucial flaw is that we used, unfortunately and inadequately, the concept* specification morphism *to define universal constraints and the closedness property. Effectively, we utilized only the pure structural "strict sketch arrow feature" of DPF specification morphisms for this purpose. However, because of the semantic denotation of the concept* specification morphism*, this was wrong and caused confusion.*

*We touched upon the construction of strict sketch arrows <sup>ϕ</sup>* : <sup>P</sup> <sup>→</sup> <sup>C</sup>*ϕ, as discussed in Remark 24, but only in the skewed understanding that "each specification entailment gives rise to a universal constraint". Besides this, we have been aware and utilized the observation that "each universal constraint gives rise to a* transformation rule*" (compare Remarks 26 and 32).*

5.2.4. Sketch Implications, Closed Formulas and Makkai's Generalized Sketches

A closer look at the definition of validity of sketch implications in Definition 22 and at the definition of the semantics of feature expressions in Definition 10 makes, straightforwardly, it apparent that the definition of the satisfaction relation in Definition 14 establishes an equivalence between finite sketch implications and universally quantified conditional existence statements (see also Remark 18).

**Proposition 4** (Sketch Implications ∼= Closed Formulas)**.** *For any* Ξ*-structure* U *and any closed expression* **0** ∀(*X* : *Ex* → ∃(*ϕ*,*Y* : *Ex* ))*, the following two statements are equivalent:*


In the case that *Ex* and *Ex* are conjunctions, we can be even more specific.

**Corollary 3** (Sketch Implications ∼= Closed Formulas)**.** *For any* Ξ*-structure* U *and any closed expression* **0** ∀(*X* : *Ex* → ∃(*ϕ*,*Y* : *Ex* )) *with Ex* = *Ex*<sup>1</sup> ∧ ... ∧ *Exn* 1 ≤ *n and Ex* = *Ex* <sup>1</sup> ∧ ... ∧ *Ex <sup>m</sup>* 1 ≤ *m, the following two statements are equivalent:*

$$1.\ \mathcal{U} \vdash (\mathbf{0}, \forall (X:Ex \to \exists (\not p, \mathbf{Y}:Ex')), id\_{\mathbf{0}}).$$

*2.* U |= (*X*, {(*X*, *Ex*1, *idX*),...,(*X*, *Exn*, *idX*)}) *<sup>ϕ</sup>* =⇒ (*Y*, {(*Y*, *Ex* <sup>1</sup>, *idY*),...,(*X*, *Ex <sup>m</sup>*, *idX*)})

Finally, we can specialize the equivalence to conjunctions of atomic statements.

**Corollary 4** (Sketch Implications ∼= Closed Formulas: Atomic-case)**.** *For any* Ξ*-structure* U *and any closed expression* **0** ∀(*X* : *Ex* → ∃(*ϕ*,*Y* : *Ex* )) *with Ex a finite conjunction of atomic expressions X Fi*(*βi*)*, β<sup>i</sup>* : *αFi* → *X,* 1 ≤ *i* ≤ *n and Ex a finite conjunction of atomic expressions Y F i*(*β i* )*, β <sup>i</sup>* : *αF <sup>i</sup>* → *Y,* 1 ≤ *i* ≤ *m, the following two statements are equivalent:*


Now we are sufficiently prepared to give a reasonable answer to Question 4 (p. 39).

**Remark 29** (Answer to Question 4)**.** *We discussed in Section 5.2.2 that the assignments* U → S<sup>U</sup> Φ *establish an isomorphism between* Str(Ξ) *and the subcategory* atSk(Stm)*<sup>a</sup> <sup>s</sup> of* Sk(Stm)*<sup>a</sup> given by all atomic* Stm*-sketches and all strict* Stm*-sketch arrows between them.*

*A sufficient condition to complete the abstraction from structures to atomic sketches is the existence of a set SEM of atomic (!)* IS*-implications such that* Sem(Ξ) = Str(Ξ, *SEM*) *(see Remark 27). The "purely structural characterization of exactly all those atomic* Stm*-sketches* SU Φ *in* atSk(Stm)*<sup>a</sup> <sup>s</sup> with* U *in* Sem(Ξ)*", we have been asking for in Section 5.2.2, is then provided by Corollary 2 and is nothing but the closedness of an atomic* Stm*-sketch w.r.t. all the* Stm*-sketch arrows underlying the atomic* IS*-implications in SEM.*

*If we are only interested in those subcategories* Sem(Ξ, *IMP*) = Str(Ξ, *SEM* ∪ *IMP*) *of* Sem(Ξ) *which can be axiomatized by a set IMP of atomic (!)* IS*-implications, we can indeed completely forget about structures and can be content with the "universe of atomic sketches".*

*This is exactly Makkai's approach in [15]. He does not consider* Ξ*-structures at all. He relies, instead, on categories* atSk(Stm)*<sup>a</sup> <sup>s</sup> of atomic* Stm*-sketches and strict* Stm*-sketch arrows between them. He uses the term* sketch entailment *for those* strict sketch arrows *which are utilized for specification purposes. Note that the restriction to* strict sketch arrows *means that he works exclusively with sketch entailments of the form <sup>ϕ</sup>* : <sup>P</sup> <sup>→</sup> <sup>C</sup>*<sup>ϕ</sup> (see Remark 24).*

*In the terminology of Institutions of Statements, Makkai's approach can be characterized by the choices* Base = Var = Cxt *and* Stm(*K*) = At(*K*) *for all objects K in* Cxt*. In particular, he focuses on presheaf topoi, i.e., functor categories* Base = [C → Set]*, as base categories.*

*The structure of limit and colimit statements (see Remark 10) is strongly related to the structure of those closed formulas that can be equivalently described by atomic sketch implications (see Corollary 4). We guess that this is one of the underlying reasons that Makkai contents himself with atomic sketches and sketch arrows between them?*

*We should mention, however, that Makkai uses an additional mechanism to be able to reside in the "universe of atomic sketches". This mechanism (also known in Category Theory as the collage or the cograph of a distributor/profunctor) transforms atomic multi sketches for a presheaf topos* Base = [C → Set] *and a certain footprint* Ξ = (Φ, *α*) *on* Base *into plain contexts, i.e., into objects in another presheaf topos* Base*'=*Cxt*'=*[Φ*α*C → Set] *with* Φ*α*C *a category constructed out of* C *and* Ξ*. We explain and exemplify this construction in Remark 41 in Section 6.*

*In cases where atomic sketch implications (and thus the corresponding* universally quantified conditional existence statements *in Corollary 3) are not expressive enough to axiomatize the structures* U*, we are interested in, and where we need more expressive first-order statements, to do the job, we can utilize the general first-order sketch constraints, introduced in Section 6, for a pure structural characterization of the respective atomic sketch encodings* SU <sup>Φ</sup> *(see Corollary 7).*

5.2.5. A Semantic Deduction Theorem

We consider semantic entailment between sketch implications.

**Definition 24** (Entailment of Sketch Implications)**.** *A set IMP of* IS*-implications entails an* IS*- implication* <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>C</sup> *semantically, IMP* <sup>P</sup> *<sup>ϕ</sup>* ⇒ C *in symbols, if, and only if, for all* <sup>Ξ</sup>*-structures* <sup>U</sup> *in* Sem(Ξ)*, it holds that* U |<sup>=</sup> *IMP, i.e.,* U |<sup>=</sup> <sup>K</sup> *<sup>ϕ</sup>* <sup>⇒</sup> <sup>G</sup> *for all* <sup>K</sup> *<sup>ϕ</sup>* ⇒ G *in IMP, implies* U |<sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* ⇒ C*.*

Any Stm-sketch arrow *ϕ* : P → C can be factorized, i.e., can be obtained by composing the Stm-sketch arrows *<sup>ϕ</sup>* : <sup>P</sup> <sup>→</sup> *<sup>C</sup><sup>ϕ</sup>* and *idC* : *<sup>C</sup><sup>ϕ</sup>* <sup>→</sup> <sup>C</sup>, where *<sup>C</sup><sup>ϕ</sup>* := (*C*, Stm(*ϕ*)(*St*P)).

Due to Definition 22, for any interpretation (*ι*, U) of context *P* in a Ξ-structure U the statement (*ι*, <sup>U</sup>) <sup>|</sup><sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> *<sup>C</sup><sup>ϕ</sup>* means nothing but simply the existence of a morphism : *<sup>C</sup>* <sup>→</sup> *<sup>U</sup>* in Base such that *<sup>ϕ</sup>*; <sup>=</sup> *<sup>ι</sup>*. That is, we have, especially, *IMP* <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> *<sup>C</sup><sup>ϕ</sup>* if, and only if, <sup>∅</sup> <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> *<sup>C</sup><sup>ϕ</sup>* if, and only if, <sup>|</sup><sup>=</sup> <sup>P</sup> *<sup>ϕ</sup>* <sup>⇒</sup> *<sup>C</sup>ϕ*. Moreover, this allows for reformulating the validity of sketch implications.

**Lemma 1** (Factorization of Sketch Implications)**.** *For any set IMP of* IS*-implications and any* IS*-implication* <sup>P</sup> *<sup>ϕ</sup>* ⇒ C*, the following two statements are equivalent:*


Lemma 1 means, in practice, that we can restrict ourselves to IS- implications of the form K ⇒ G to specify (axiomatize) subcategories Sem(Ξ, *IMP*) of Sem(Ξ). By coincidence, we even have a semantic deduction theorem available for those special kinds of sketch implications.

**Theorem 2** (Semantic Deduction Theorm)**.** *For any set IMP of* IS*-implications of the form* K ⇒ G *and any* IS*-implication* P ⇒ C*, the following two statements are equivalent:*


Theorem 2 guarantees that it is a reasonable idea to describe the deduction of sketch implications, which are semantically entailed by a given set *IMP* of sketch implications, by means of deduction calculi generating new sketches (*P*, *St*C) from a given sketch (*P*, *St*P) based on a utilization of the sketch implications in *IMP* as deduction rules. To deduce all (!) semantically entailed sketch implications, it may be necessary to also include deduction rules related to a set *SEM* of sketch implications representing the choice of Base, Ξ and Sem(Ξ), respectively (compare Remarks 27 and 29). This is exactly the approach in [6,7].

In [7], we also presented a deduction calculus which constructs directly sketch implications from a set of given sketch implications. Besides the composition of sketch implications, as mentioned in Remark 23, we could choose parallel composition and instantiation as the other basic constructions for such a deduction calculus:


Of course, we could also use, instead, more specialized and sophisticated constructions analogously to *resolution* in PROLOG or *parallel resolution* in [7], for example.
