*3.2.3 Interpretation*

particular domain. Considerable interest is caused by the study of general categorical constructions, such as functors and natural transformations, in their application to CM. In particular, the adjoint functor construction can be used to describe

The intensional language contains tools for describing the nodes and links of CM. The description in the intensional language is a formalized object, matched to CM. Such an object can be used both for constructing the semantics of CM and (in practical terms) for representing CM for the purpose of storage and processing. The use of formalized objects also provides for syntactic and semantic control of objects,

Types are assigned to the expressions of the intensional language; thus, the type *e* corresponds to the node of CM and the type *t* to the link between specific nodes. A set of language expressions is defined as an inductive class. This method of setting ensures the definition of CM construction operations from separate parts. The description of the language as a whole follows the paper [6]. The interpretation of language expressions is also set with the help of induction for the construction of an interpreted expression.

3. If *a*, *b*∈*ϒ*, then h i *a*, *b* ∈*ϒ* and h i *s*, *a* ∈*ϒ*, where *s* is interpreted as the type of

Types represent the sets of elements to interpret CMs or their fragments.

We will use the enumerable set of variables and (infinite) set of constants of each type *a*. If *n* is a natural number and *a*∈*ϒ*, then *vn*,*<sup>a</sup>* is the *n*-th variable of type *a*, and

The language includes a set of meaningful expressions *MEa* of each type *a*. It is

5. If *φ*, *ψ* ∈ *MEt* and *u* is a variable, then ¬*φ*, ½ � *φ*∧*ψ* , ½ � *φ*∨*ψ* , ½ � *φ* ! *ψ* , ½ � *φ* \$ *ψ* , ∀*uψ*,

abstract types of the data associated with CM nodes.

which makes easier their debugging and maintenance.

The set of types of *ϒ* is defined inductively:

1.*e*∈*ϒ*, which is interpreted as the entity type.

2.*t*∈*ϒ*, which is interpreted as the type of sentence.

2. If *α*∈ *MEb* and *u* is a variable of type *a*, *λuα* ∈ *ME*h i *<sup>a</sup>*,*<sup>b</sup>* .

3. If *α*∈ *ME*h i *<sup>a</sup>*,*<sup>b</sup>* and *β* ∈ *MEa*, then *α β*ð Þ∈ *MEb*.

**3.2 Intensional language**

*Cognitive and Intermedial Semiotics*

*3.2.1 Types*

meaning.

*3.2.2 Language*

defined recursively:

**148**

4.There are no other types.

*Cona* is a set of constants of type *a*.

1.*vn*,*<sup>a</sup>* ∈ *MEa*; *Cona* ⊆ *MEa*.

4. If *α*, *β* ∈ *MEa*, then *α* ¼ *β* ∈ *MEt*.

<sup>∃</sup>*uψ*, □*ψ*, *<sup>W</sup>ψ*, and *<sup>H</sup><sup>ψ</sup>* <sup>∈</sup> *MEt*.

Now let us introduce interpretation of intensional language. Let *A* and *Asg* be sets; *A* is a set of entities (or individuals), and *Asg* is a set of assignment points. Define the set *Da*,*A*,*Asg* of possible denotates of type *a*:

$$\begin{aligned} D\_{\epsilon,A,A\text{sg}} &= A, \\ D\_{t,A,A\text{sg}} &= \{0, 1\}, \\ D\_{\langle a,b\rangle,A,A\text{sg}} &= D\_{b,A,A\text{sg}} D\_{a,A,\text{sg}}, \\ D\_{\langle s,a\rangle,A,A\text{sg}} &= D\_{a,A,A\text{sg}} A^{\text{g}}. \end{aligned} \tag{1}$$

As a rule, sets *A* and *Asg* are fixed. Under these conditions, we denote *Da*,*A*,*Asg* � *Da*. We treat the interpretation as an ordered tuple:

$$\mathfrak{A} = \langle A, \text{Ag}, F \rangle,\tag{2}$$

where

1.*A* and *Asg* are non-empty sets.

2.*F* is a function whose domain is a set of constants.

3. If *<sup>a</sup>*∈*<sup>Y</sup>* and *<sup>α</sup>*∈*Cona*, then *<sup>F</sup>*ð Þ *<sup>α</sup>* <sup>∈</sup> *Da*,*A*,*AsgAsg*.

We treat A-assignment as a function *g*, whose domain is a set of variables, such that when *u* is a variable of type *a*, then *g u*ð Þ∈ *Da*,*A*,*Asg*. *G x*½ � *=u* means A-assignment:

$$\mathbf{g}[\mathbf{x}/\boldsymbol{u}](\boldsymbol{v}) = \begin{cases} \boldsymbol{\infty}, & \text{if} \quad \boldsymbol{u} \equiv \boldsymbol{v}, \\ \boldsymbol{g}(\boldsymbol{v}) \text{ otherwise.} \end{cases} \tag{3}$$

We define the intension *α*<sup>A</sup>,*<sup>g</sup>* and the extensional *α*<sup>A</sup>,*Asg*,*<sup>g</sup>* meaningful expression *α* when using the usual recursive definition. Complete form of definition is presented in [1]. The intension is the possible value of CM, and interpretation is a tool for the evaluation of CMs.

## **4. Problem domain description with CMs**

The interpretation of the constructions, composing the CM, is made up in the framework of type theory with dependent types of functions and pairs. The interpretation of CM is considered as an object, the type of which can be constructed.

In the framework of the type system, a judgment can be expressed that an object has a particular type, or that two objects are equivalent. The equivalence of objects implies the equivalence of the corresponding CMs. The types of system objects are constructed in the form of an inductive class, and this allows deriving the properties of objects from the properties of their parts.

We consider two basic types of judgments:

$$a:A,$$
 
$$a = b:A.$$

The next construction is Cartesian product type. From the types *A* and *B*, we can construct the type *A* � *B*. We also consider a product type with arity 0, which is called the unit type 1 : *U*. For *a* : *A* and *b* : *B*, we can construct ð Þ *a*, *b A* � *B*. The unit

For the computation with product types, we have to define functions which have

*f a*ð Þ¼ , *b gab:* (8)

*recA*�*<sup>B</sup>* : Π*<sup>C</sup>*:*<sup>U</sup>*ð Þ *A* ! *B* ! *C A* � *B* ! *C* (9)

*recA*�*BCg a*ð Þ¼ , *b gab:* (10)

*<sup>q</sup>* <sup>¼</sup> *recA*�*<sup>B</sup> <sup>B</sup>*ð Þ *<sup>λ</sup>a:λb:<sup>b</sup>* (11)

*rec*<sup>1</sup> : Π*<sup>C</sup>*:*UC* ! 1 ! *C* (12)

*rec*1*C c* ∗ ¼ *c:* (13)

the elements of *A* � *B* as arguments (i.e., the function *f* of the type *A* � *B* ! *C*). Hence we consider such elements as pairs, and we can make computations on such element with the function *g* : *A* ! *B* ! *C* taking the components of the pair as

We can consider the universal case and define the function

*The pattern of functional type: (a) multiargument function and (b) curried function.*

*Computational Model for the Construction of Cognitive Maps*

*DOI: http://dx.doi.org/10.5772/intechopen.90173*

With this function, for example, we can define projections:

The pattern of CM for Cartesian product is shown in **Figure 3b**.

*p* ¼ *recA*�*<sup>B</sup> A*ð Þ *λa:λb:a*

type has one element which we denote ∗ : 1.

arguments. Then we can define *f* as follows:

Similarly for the unit type 1, we have

with the equation

**Figure 2.**

with the equation

**151**

The judgment of the first form is interpreted as "*a* is an object (CM) of type *A*." The judgment of the second form is interpreted as "*a* and *b* are objects (CM's) of type *A*, equal by definition." Judgments can depend on assumptions of the form *x* : *A*. The collection of all such assumptions forms context for the judgment.

We use for the expression "*A* is a type" the formal notation *A* : *U*. Here *U* is a universe. Elements of the universe are types. We consider *U* as the type big enough to hold all the types that are necessary for the description of a given class of CMs, but we do not consider it as holding all possible types. Inaccurate definition of *U* can lead to paradoxes (e.g., if we consider *U* : *U*). It is possible to show that *U* can be defined in the type theory without paradoxes, but the proof of this fact is beyond the scope of the present work. *U* can be used for the representation of collection of types varying over a given type *A*.

In the type theory, we can construct new types from given ones. New types are equipped with functions for their construction and computation. The first construction is a function type. From the types *A* and *B*, we can construct the type *A* ! *B* of functions with the domain *A* and codomain *B*. The construction rule for the elements of this type is called lambda abstraction. If we assume that *x* : *A* and consider the expression *F* : *B*, then

$$(\lambda(\mathfrak{x}:A).F): A \to B.\tag{5}$$

We can omit the type for the variable and write *λx:F*. We adopt the usual convention that *λ* makes the variable bound and the variable which is not bound is free.

The computation rule for this type is

$$F(\lambda \mathfrak{x}.F)\mathfrak{a} = F[\mathfrak{x} := \mathfrak{a}],\tag{6}$$

where *F x*½ � ≔*a* is a result of a substitution of all free occurrences of *x* to *a*. The pattern of CM for the functional type is show in **Figure 2a**; the process of currying is shown in **Figure 2b**.

The next construction is a dependent function type. The elements of such type are functions whose codomain may depend on the element of the domain to which the function is applied. From the type *A* : *U* and family *B x*ð Þ : *A* ! *U*, we can construct the type Π*<sup>x</sup>*:*AB x*ð Þ : *U*. If we have an expression *F* : *B x*ð Þ depending on *x* : *A*, then

$$(\lambda(\mathfrak{x}:A).F):\Pi\_{\mathfrak{x}:A}B(\mathfrak{x}).\tag{7}$$

We can apply a dependent function *f* : Π*<sup>x</sup>*:*<sup>A</sup> B x*ð Þ to an argument *a* : *A* to obtain an element *f a*ð Þ : *B a*ð Þ. In particular, we can define functions taking types as arguments. This possibility leads to the representation of polymorphic functions. The pattern of CM for dependent functional type is shown in **Figure 3a**.

*Computational Model for the Construction of Cognitive Maps DOI: http://dx.doi.org/10.5772/intechopen.90173*

#### **Figure 2.**

In the framework of the type system, a judgment can be expressed that an object has a particular type, or that two objects are equivalent. The equivalence of objects implies the equivalence of the corresponding CMs. The types of system objects are constructed in the form of an inductive class, and this allows deriving the properties

*a* : *A*,

The judgment of the first form is interpreted as "*a* is an object (CM) of type *A*." The judgment of the second form is interpreted as "*a* and *b* are objects (CM's) of type *A*, equal by definition." Judgments can depend on assumptions of the form *x* :

We use for the expression "*A* is a type" the formal notation *A* : *U*. Here *U* is a universe. Elements of the universe are types. We consider *U* as the type big enough to hold all the types that are necessary for the description of a given class of CMs, but we do not consider it as holding all possible types. Inaccurate definition of *U* can lead to paradoxes (e.g., if we consider *U* : *U*). It is possible to show that *U* can be defined in the type theory without paradoxes, but the proof of this fact is beyond the scope of the present work. *U* can be used for the representation of collection of

In the type theory, we can construct new types from given ones. New types are equipped with functions for their construction and computation. The first construction is a function type. From the types *A* and *B*, we can construct the type *A* ! *B* of functions with the domain *A* and codomain *B*. The construction rule for the elements of this type is called lambda abstraction. If we assume that *x* : *A* and

We can omit the type for the variable and write *λx:F*. We adopt the usual convention that *λ* makes the variable bound and the variable which is not bound is

where *F x*½ � ≔*a* is a result of a substitution of all free occurrences of *x* to *a*. The pattern of CM for the functional type is show in **Figure 2a**; the process of currying

The next construction is a dependent function type. The elements of such type are functions whose codomain may depend on the element of the domain to which the function is applied. From the type *A* : *U* and family *B x*ð Þ : *A* ! *U*, we can construct the type Π*<sup>x</sup>*:*AB x*ð Þ : *U*. If we have an expression *F* : *B x*ð Þ depending on *x* :

We can apply a dependent function *f* : Π*<sup>x</sup>*:*<sup>A</sup> B x*ð Þ to an argument *a* : *A* to obtain an element *f a*ð Þ : *B a*ð Þ. In particular, we can define functions taking types as arguments. This possibility leads to the representation of polymorphic functions. The

pattern of CM for dependent functional type is shown in **Figure 3a**.

*A*. The collection of all such assumptions forms context for the judgment.

*<sup>a</sup>* <sup>¼</sup> *<sup>b</sup>* : *<sup>A</sup>:* (4)

ð Þ *λ*ð Þ *x* : *A :F* : *A* ! *B:* (5)

ð Þ *λx:F a* ¼ *F x*½ � ≔*a* , (6)

ð Þ *λ*ð Þ *x* : *A :F* : Π*<sup>x</sup>*:*<sup>A</sup> B x*ð Þ*:* (7)

of objects from the properties of their parts. We consider two basic types of judgments:

*Cognitive and Intermedial Semiotics*

types varying over a given type *A*.

consider the expression *F* : *B*, then

The computation rule for this type is

free.

*A*, then

**150**

is shown in **Figure 2b**.

*The pattern of functional type: (a) multiargument function and (b) curried function.*

The next construction is Cartesian product type. From the types *A* and *B*, we can construct the type *A* � *B*. We also consider a product type with arity 0, which is called the unit type 1 : *U*. For *a* : *A* and *b* : *B*, we can construct ð Þ *a*, *b A* � *B*. The unit type has one element which we denote ∗ : 1.

For the computation with product types, we have to define functions which have the elements of *A* � *B* as arguments (i.e., the function *f* of the type *A* � *B* ! *C*). Hence we consider such elements as pairs, and we can make computations on such element with the function *g* : *A* ! *B* ! *C* taking the components of the pair as arguments. Then we can define *f* as follows:

$$f(a,b) = \text{g.a.}\tag{8}$$

We can consider the universal case and define the function

$$\mathsf{vec}\_{A\times B}: \Pi\_{\mathsf{C}\colon U}(A \to B \to \mathsf{C}) \\ \mathsf{A}\times B \to \mathsf{C} \tag{9}$$

with the equation

$$\operatorname{rec}\_{A \times B} \mathbb{C} \mathfrak{g} \left( a, b \right) = \mathfrak{g} \, ab \,. \tag{10}$$

With this function, for example, we can define projections:

$$\begin{aligned} p &= \text{rec}\_{A \times B} A \left( \lambda a. \lambda b. a \right) \\ q &= \text{rec}\_{A \times B} B \left( \lambda a. \lambda b. b \right) \end{aligned} \tag{11}$$

Similarly for the unit type 1, we have

$$\text{vec}\_1 : \Pi\_{\mathcal{C}:U} \mathcal{C} \to \mathbf{1} \to \mathcal{C} \tag{12}$$

with the equation

$$
\sigma \circ\_1 \mathbf{C} \circ \ast = \mathfrak{c}.\tag{13}
$$

The pattern of CM for Cartesian product is shown in **Figure 3b**.

**Figure 3.**

*The pattern of CM for (a) dependent functional type and (b) Cartesian product.*

The Cartesian product represents pairs which components have independent types. So the next construction is dependent pair type. From the type *A* : *U* and family *B* : *A* ! *U*, we can construct the type Σ*x*:*AB x*ð Þ : *U*. The construction on the dependent pair is generalization of the construction for product types. To define a function over a dependent pair type *f* : Σ*<sup>x</sup>*:*AB x*ð Þ! *C*, we provide a function *g* : Π*<sup>x</sup>*:*AB x*ð Þ! *C* via the defining equation

$$f(a,b) = \gcd.\tag{14}$$

with the equations

*recA*þ*BCg h inl a* ð Þ¼ ð Þ *g a*,

Analysis of the proposed CM formalization suggests identifying the structure of CM models defined in the framework of type theory. The practice shows that an adequate approach in constructing such models is the category theory. At the same time, the model is built in the selected category using its objects and arrows. The objects are matched to the types used when constructing the CM, and arrows are matched to the nodes and links of the CM. Depending on the definition of a category, its objects can carry an additional structure within themselves. They can

Common constructions of the category theory can be used to introduce and process the CM constructions that are of interest from both a fundamental and a practical point of view. One of such constructions is the adjoint functor. It turns out that the conjugation scheme allows the transition from an "atomic" description of model objects, in which we distract from their internal structure to the description

From a fundamental point of view, the mentioned feature provides the CM scaling, that is, folding the nested CM into a separate node and back deployment. From a practical point of view, this possibility corresponds to the definition of an abstract type of data within the framework of a programming system. In this case, the functors that implement conjugation provide a transition from the description of an abstract object or from the name of the object (which in the programming system corresponds to the address of the object in memory) to the representation of

The traceability of the interpretation of various entries of an information object (CM or its fragment) requires constructing models of interpretation depending on the context. When the CM is placed in a programming environment (e.g., Java), the context is formed by the constructions chosen to represent the CM fragments, as well as the associated data. The context dependency can be traced basing on the use

Practical implementation of the system supporting the work with CMs requires selecting a method of their representation by the programming structures, such as arrays or strings. A link to the filled-in fragment of the representing structure can be given as an index in the structure, which may be considered as a special naming structure. The work with CM necessitates a transition from the name of the CM fragment to its value and backward, i.e., naming and dereferencing the CM fragments. To ensure the completeness of the computational model, it must provide a transition from the naming constructs to the content of the representing construc-

Because of this, it looks attractive to develop technology, (1) coordinating with the general structure of the computational model, i.e., presented in the form of a functor; (2) making possible to name structures and methods of working with

that takes into account such a structure. A back transition is also possible.

The pattern of CM for sum type is shown in **Figure 4b**.

be put into line with the characteristics of the modeled domain.

the object. This justifies their title as "naming" functors.

of the technique of variable domains, which are functors.

**5.1 Adjunction**

tions and back.

**153**

**5. Naming functors and their properties**

*Computational Model for the Construction of Cognitive Maps*

*DOI: http://dx.doi.org/10.5772/intechopen.90173*

*recA*þ*BCg h inr b* ð Þ¼ ð Þ *hb:* (19)

Similarly to the Cartesian product, we can define

$$\operatorname{rec}\_{\Sigma\_{\mathbf{x}:A}B(\mathbf{x})} : \Pi\_{\mathbf{C}:U}(\Pi\_{\mathbf{x}:A}B(\mathbf{x}) \to \mathbf{C}) \to (\Sigma\_{\mathbf{x}:A}B(\mathbf{x})) \to \mathbf{C} \tag{15}$$

with the equation

$$\operatorname{rec}\_{\Sigma\_{x,\mathcal{A}}B(x)} \mathsf{Cg}\,(a,b) = \mathsf{g}\,ab. \tag{16}$$

The pattern of CM for dependent pair type is shown in **Figure 4a**.

The last construction that we consider here is the sum type. From the types *A* and *B*, we can construct the type *A* þ *B*. We also consider a sum type with arity 0, which is called the empty type 0 : *U*. There are two ways to construct the elements of *A* þ *B*, one is *inl a*ð Þ : *A* þ *B* for *a* : *A* and another is *inr b*ð Þ : *A* þ *B* for *b* : *B*. The empty type has no elements.

To construct a function *f* : *A* þ *B* ! *C*, we need functions *g* : *A* ! *C* and *h* : *B* ! *C*. Then *f* is defined via the equations

$$\begin{aligned} f(\operatorname{ind}(a)) &= \operatorname{g.a}, \\ f(\operatorname{imr}(b)) &= \operatorname{h.b}. \end{aligned} \tag{17}$$

So we can consider the universal case

$$\text{vec}\_{A+B}: \Pi\_{\mathcal{C}:U}(A \to \mathcal{C}) \to (B \to \mathcal{C}) \\ \text{A} + B \to \mathcal{C} \tag{18}$$

**Figure 4.**

*The pattern of CM for (a) dependent functional type and (b) Cartesian product.*

*Computational Model for the Construction of Cognitive Maps DOI: http://dx.doi.org/10.5772/intechopen.90173*

with the equations

The Cartesian product represents pairs which components have independent types. So the next construction is dependent pair type. From the type *A* : *U* and family *B* : *A* ! *U*, we can construct the type Σ*x*:*AB x*ð Þ : *U*. The construction on the dependent pair is generalization of the construction for product types. To define a function over a dependent pair type *f* : Σ*<sup>x</sup>*:*AB x*ð Þ! *C*, we provide a function *g* :

*f a*ð Þ¼ , *b gab:* (14)

*rec*Σ*x*:*AB x*ð Þ*Cg a*ð Þ¼ , *b gab:* (16)

*f inr b* ð Þ¼ ð Þ *hb:* (17)

*recA*þ*<sup>B</sup>* : Π*<sup>C</sup>*:*<sup>U</sup>*ð Þ! *A* ! *C* ð Þ *B* ! *C A* þ *B* ! *C* (18)

*rec*Σ*x*:*AB x*ð Þ : Π*<sup>C</sup>*:*<sup>U</sup>*ðΠ*<sup>x</sup>*:*AB x*ð Þ! *C*Þ ! ð Þ! Σ*<sup>x</sup>*:*AB x*ð Þ *C* (15)

Π*<sup>x</sup>*:*AB x*ð Þ! *C* via the defining equation

*Cognitive and Intermedial Semiotics*

with the equation

**Figure 3.**

empty type has no elements.

**Figure 4.**

**152**

*B* ! *C*. Then *f* is defined via the equations

So we can consider the universal case

*The pattern of CM for (a) dependent functional type and (b) Cartesian product.*

Similarly to the Cartesian product, we can define

*The pattern of CM for (a) dependent functional type and (b) Cartesian product.*

The pattern of CM for dependent pair type is shown in **Figure 4a**.

The last construction that we consider here is the sum type. From the types *A* and *B*, we can construct the type *A* þ *B*. We also consider a sum type with arity 0, which is called the empty type 0 : *U*. There are two ways to construct the elements of *A* þ *B*, one is *inl a*ð Þ : *A* þ *B* for *a* : *A* and another is *inr b*ð Þ : *A* þ *B* for *b* : *B*. The

To construct a function *f* : *A* þ *B* ! *C*, we need functions *g* : *A* ! *C* and *h* :

*f inl a* ð Þ¼ ð Þ *g a*,

$$\begin{aligned} \operatorname{rec}\_{A+B} \mathbf{C} \mathbf{g} \, h \, (\operatorname{ind}(\mathfrak{a})) &= \mathbf{g} \, \mathfrak{a}, \\ \operatorname{rec}\_{A+B} \mathbf{C} \mathbf{g} \, h \, (\operatorname{im}(\mathfrak{b})) &= \mathbf{h} \, \mathfrak{b}. \end{aligned} \tag{19}$$

The pattern of CM for sum type is shown in **Figure 4b**.
