Conceptual Hierarchy

Introducing constrained sketches teleports us "back to start" but on a higher conceptual level: We do have a category Sk*<sup>a</sup> <sup>s</sup>* of sketches. To any sketch G = (*G*, *St*G), we can assign the set Cstr(G) of all sketch constraints (*c*, *τ* : *K* → *G*) on context *G* with *c* a first-order sketch condition in SC(*K*) according to Definition 27. Analogously to the translation of statements in Institutions of Statements, we can define for any sketch morphism *ϕ* : G → H a map Cstr(*ϕ*) : Cstr(G) → Cstr(H) by simple post-composition with the underlying context morphism *ϕ* : *G* → *H*: Cstr(*ϕ*)(*c*, *τ*) := (*c*, *τ*; *ϕ*) for all (*c*, *τ*) ∈ Cstr(G). This gives us trivially a functor Cstr : Sk*<sup>a</sup> <sup>s</sup>* → Set at hand.

This situation is, however, just an instance of the abstract pattern we started with in this section: The category Sk*<sup>a</sup> <sup>s</sup>* can be taken as an instance of Ct and the functor Cstr : Sk*<sup>a</sup> <sup>s</sup>* → Set as an instance of St: Ct → Set, respectively. The constrained sketches are then nothing but

the "abstract sketches" for this instance! We can now consider first-order sketch conditions and sketch constraints for this new instance and will finally obtain a further instance of the "abstract pattern". Potentially, we can even iterate this procedure ad infinitum.

Iterating this procedure is maybe not that relevant for DPF at the moment. We take it, however, as a good sign that our category independent approach allows us to move in and furnish the next higher level in the conceptual hierarchy whenever it is necessary and/or opportune.

**Remark 41** (Makkai's Hierarchy of Sketches)**.** *We continue the discussion in Remark 29 and rise the question: How is our* conceptual hierarchy *related to the "hierarchy of sketches" in [15]?*

*Makkai considers only atomic statements and starts with a presheaf topos, i.e., a functor category* Base = Var = Cxt = [C → Set]*. Note that topoi are adhesive [44]! As an example, we consider the presheaf topos:*

$$\mathsf{Graph} \cong [\underbrace{id\_{\mathcal{E}}}\_{id\_{\mathcal{E}}} \underbrace{\frown \dots \circ \sum \dots}\_{s} \llcorner \underbrace{\sum \dots}\_{id\_{\mathcal{E}}} \llcorner \text{Set} \,\, \text{---Set}].$$

*Then, he describes an instance of a general construction in Category Theory: For any footprint* <sup>Ξ</sup> = (Φ, *<sup>α</sup>*)*, <sup>α</sup>* : <sup>Φ</sup> <sup>→</sup> [<sup>C</sup> <sup>→</sup> Set]*Obj, there is a category* <sup>Φ</sup>*α*<sup>C</sup> *such that the category* mSk*<sup>a</sup> <sup>s</sup> of multi* At*-sketches (see Remark 34) is isomorphic to the presheaf topos* [Φ*α*C → Set]*.*

Φ*α*C *can be constructed as follows: We take the disjoint union of* Φ *(as a discrete category) and* C*. For any feature symbol P* ∈ Φ*, any object C in* C*, and any c* ∈ *α*(*P*)(*C*)*, we add an arrow* (*P*, *c*, *C*) : *P* → *C. Finally, we define the composition for the new pairs of composable arrows:* (*P*, *c*, *C*); *f* := (*P*, *α*(*P*)(*f*)(*c*), *C* ) *for all f* : *C* → *C in* C*.*

*As an example, we take* Φ = {mon, fnl} *with arities as in Example 49. The category* Φ*α*Graph *is visualized below. Composition in* Φ*α*Graph *is defined by the equations xe*;*s* = *xv*1*, xe*; *t* = *xv*<sup>2</sup> *and these equations encode the arity xv*<sup>1</sup> *xe* → *xv*<sup>2</sup> *of* mon*! The isomorphism transforms any multi* At*-sketch* <sup>K</sup> = (*K*, *<sup>I</sup>*K,*st*K) *into a corresponding functor* <sup>K</sup> : <sup>Φ</sup>*α*Graph <sup>→</sup> Set*.*

<sup>K</sup>( *<sup>E</sup> <sup>s</sup>* <sup>0</sup> *t* <sup>1</sup>*<sup>V</sup>* ) *represents the graph K. The set* <sup>K</sup>(mon) *holds all the identifiers <sup>i</sup>* <sup>∈</sup> *<sup>I</sup>*<sup>K</sup> *with*

*st*K(*i*)=(*α*(mon), mon(*idα*(mon)), *<sup>β</sup>*) *while the maps* <sup>K</sup>(*xe*)*,* <sup>K</sup>(*xv*1)*,* <sup>K</sup>(*xv*2) *encode all the corresponding bindings β* : *α*(mon) → *K. Morphisms in* [Φ*α*C → Set]*, i.e., natural transformations, encode strict* At*-sketch arrows between multi* At*-sketches* K = (*K*, *I*K,*st*K)*.*

*After transforming* mSk*<sup>a</sup> <sup>s</sup> into* [Φ*α*C → Set]*, we can define another footprint* Ξ = (Φ , *α* )*, α* : Φ → [Φ*α*C → Set]*Obj on this next level of the hierarchy and start again but this time with atomic* Ξ *-statements.*

*There are no sketch conditions in [15] but any multi* At*-sketch* K = (*K*, *I*K,*st*K) *corresponds to the* At*-sketch condition <sup>K</sup>* {*st*K(*i*) <sup>|</sup> *<sup>i</sup>* <sup>∈</sup> *<sup>I</sup>*K} *and any strict* At*-sketch arrow <sup>ϕ</sup>* : <sup>L</sup> <sup>→</sup> <sup>R</sup> *corresponds to a* At*-sketch condition of the form* **0** ∀(*L* : ( *St*<sup>L</sup> <sup>→</sup> *<sup>∃</sup>*(*ϕ*, *<sup>R</sup>* : *St*R)))*. As we have seen, sketch conditions of this special form, and thus strict* At*-sketch arrows, allow us to axiomatize arbitrary limits or colimits, respectively.*

*In such a way, all the arities α* (*P* ) *in the footprint* Ξ *correspond to very simple* At*-sketch conditions that are just conjunctions of* At*-statements and atomic* At *-statements are simply conjunctions of those conjunctions of* At*-statements, which are introduced by the arities α* (*P* ) *and obtained the "label" P'.*

*As an example, we consider the footprint* Ξ = (Φ, *α*)*, α* : Φ → Graph*Obj with* Φ = {cmp, id} *and arities as in Example 14. For the footprint* Ξ = (Φ , *α* )*, α* : Φ → [Φ*α*Graph → Set]*Obj, we assume that, for any P* ∈ Φ *, the arity α* (*P* ) *corresponds to an* At*-sketch that represents one of the commutative (co)cones described in Remark 10. In such a way, an atomic* At*'-sketch represents a graph with a set of commutative (co)cones labelled by feature symbols from* Φ*'. Strict atomic* At*'-sketch arrows should allow us then to formulate propositions like: If we have binary products and equalizers, do we also have pullbacks!?*

*We close this remark with a revision of the concept of graph in [22]: For the footprint* Ξ*<sup>R</sup>* = (Rel, *α*) *in Example 50, we can consider α as a map α* : Rel → [1 → Set]*Obj with V the only object in* 1 *and α*(*P*)(*V*) = {*x*1, *x*2} *for all P* ∈ Rel*.* Φ*α*1 *contains then for each P* ∈ Rel*:*

$$\dots \dots \quad P \xrightarrow{(P, \ge\_1)}\_{(P, \ge\_2)} V$$

*an "edge sort" P and* [Φ*α*1 → Set] *is the category of graphs with an* Rel*-indexed family of edges. This category is adhesive in contrast to the category of* Rel*-labelled graphs in [22]!*
