Brain and Its Universal Logical Model of Multi-Agent Biological Systems

We build a topological model, based on intuitionistic logic, for multi-agent biological systems (such as Physarum polycephalum, bacterial colonies or any other swarm), reacting to external nourishment stimuli. Our construction follows the topological description of brain activity, where particles (neurons) are activated by an external environment, represented by a topological space X with an open cover {Ui:i∈I}\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{U_i:i\in I\}$$\end{document}. The brain builds the model of this external space via the nerve (trace) of a topological space X. Here the body of Physarum polycephalum or a swarm made of networks of tubular structures represents a nerve (trace) of X also which means that Physarum polycephalum or a swarm gains orientation in the space of external stimuli even in the absence of any neural system. The logic of living organisms is based on open subsets of X and thus can be represented by Heyting algebra (i.e. intuitionistically). We also consider the generalisation of the nerve construction to a categorical context, where the category is determined by the network structures of multi-agent biological system. This model can be generalised up to simulating the behaviour of any swarm by means of intuitionistic logic.


Introduction
It is known that the universal Turing machine models any classical computation performed by any classical computer. At the same time, the Turing machine is very simple from the point of view of its structure and operations it performs. In the realm of intelligent behaviour of living (unicellular as well as multi-cellular) organisms, we can search for some underlying universal computational phenomena, which presumably would be represented by a highly simplified living organism. In other words, we can try to define some artificial (i.e. simplified) living organisms as a universal machine like the Turing one. In this paper, we aim to sketch a universal logical model for simulating the intelligent behaviour of living organisms.
This behaviour is usually presented as a multi-agent system where each particle (computational unit or 'agent') has an individual program within the whole programmable behaviour. For instance, even a one-cellular organism is regarded as a multi-agent computational system [1]. There are two main types of biological objects recently discovered from the point of view of computational theory: (i) unicellular organisms with their abilities to solve some computational problems such as planar-geometric or graph-theoretic ones (bacterial colonies [2], Physarum polycephalum [3], Amoeba proteus [4], etc.); (ii) different swarms with their abilities to solve, first of all, logistic problems (ant colonies [5], bee colonies [6], fish schooling [7], bird flocking and horse herding [8], etc.). The point is that some real-time experiments with unicellular organisms as well as with swarms are easy to be performed for constructing appropriate computational samples. On the other hand, their behaviour can be managed by external stimuli to the same extent. Evidently that different organisms have different stimuli attracting and repelling their activity, but mathematically we deal with the same topological space we are going to define in this paper -namely, we consider a mathematical model how active particles react to the stimuli located differently.
Hence, we focus on many biological agents (ants, bees, active particles of Physarum polycephalum and Amoeba proteus, etc.) concurrently reacting to a set of external stimuli located variously and with different powers of intensity. This study is scale invariant. The matter is that the scale of stimuli for unicellular organisms differs a lot, for example, from the scale of stimuli for swarm mammals (such as rats), but topologically both situations are the same: some stimuli scattered around the individuals cause their concurrent reactions to these stimuli.
The multi-agent intelligent behaviour of unicellular amoeboid organisms (e.g. Physarum polycephalum and Amoeba proteus) is explained by a polymerisation and depolymerisation of actin filaments -short protein tubes combined among themselves and responsible for changing the cell shape. These actin filaments can appear and disappear and they can be collected into different complex forms from bushes to trees. It depends on external stimuli which cause the polymerisation or depolymerisation of new actin filaments. So, such intelligent reactions of one cell to its environment are explained by actin filament networks. Consequently, these networks can be examined as a medium implementing different logical and arithmetic functions [4,[9][10][11]. Hence, each actin filament may be regarded as a computational unit (particle or 'agent') within an appropriate network. Meanwhile, the actin filament networks have some effects of neural networks such as lateral activation and lateral inhibition [4].
So, in our paper, we present the approach showing that each multi-agent living system such as Physarum polycephalum or a swarm in some sense represents universal computational phenomena which usually are typical for more complicated, neural networks. We demonstrate that the space orientation of Physarum polycephalum or a swarm reflects the mechanism of activation of agents/particles/units -e.g. (i) actin filaments in a cell; (ii) neurons in a hippocampus of brain; (iii) swarm members like ants or bees. In this case one assigns a stimuli space X to a subspace N X of active units (actin filaments, neurons or swarm members) which are sensitive to the external stimuli from X and react by their excitation (activation). In the case of swarms, the activation of their members means that they are located on some traces connecting food pieces to the nest.
External stimuli are linked to computational units (actin filaments, neurons or swarm members) via some codes which are the patterns of excitation typically grouped to comprise words representing binary sequences of 0, 1 where 1 at the i-th place means that the i-th unit from N X has been activated (the spike). Even though the space of stimuli X is considered as a kind of discrete topological space we extend it to a subset X ⊂ R d , d ∈ N \ {0} thus endowing it with the certain open convex in R d subsets {U i } i∈I , i∈I U i = X, as its cover. The index set I is finite at this stage, though in some next sections we will consider also an infinite extension. The open convex subsets U i can be also determined as domains of the so-called receptive fields (RFs). A RF on X is a function f i : X → R ≥0 , i ∈ I assigning to a stimulus f ∈ X a non-negative number which expresses how the i-th unit from N X is likely to fire in the presence of the stimulus f . Given another stimulus g ∈ X, we have another RF, i.e. g i : X → R ≥0 , i ∈ I. Now given a RF f i and its support B i = {x ∈ X|f i > 0} considered as the subset of R d , one equates the support with U i , i.e.
Since the RF f i is uniquely determined from its support B i , so f i is usually identified with U i .
The main idea of universal logical model we are going to obtain is that we can show a homotopy equivalence between the set X of stimuli and the set N X of active units in a topological space. This equivalence indicates that the space orientation reflected by mammals brains can be also found in functioning of Physarum polycephalum when reacting on the external stimuli and thus having control over its orientation in space. It is also the possibility, advocated in this paper, that this kind of universal mechanism may lay in the spatial orientations of any multi-agent biological system or any swarm.
It is a fairly well recognised phenomenon that the orientation in space is coded in the firing pattern of brain neuron. So, we take this model from the brain to describe any multi-agent biological system. It is known that there are place neurons in the hippocampus of brain which fire depending on the placement of an organism in particular places. After changing the places of organism, the brain changes the firing pattern of the place neurons. The fundamental questions arising in this context are how the orientation in space and the entire structure of the stimuli space X are coded in the code sets as above. The answer is based on reflecting the homotopy type of X by the code and the nerve theorem is perfectly suited to this purpose. In Sect. 2, we recall some basic facts relating to this and we also show how to implement the technique of the nerve of topological space to Physarum polycephalum or any swarm and to code the space orientation in its structure. In Sect. 3, we generalise the formalism to the infinite covers of X and thus show that we can appeal to intuitionistic logic there. In Sect. 4, we introduce a category for the swarm orientation. In Sect. 5, we close the paper with discussion of the results and present briefly the future directions of the approach.
The main result of the paper is to define a category for multi-agent biological systems like swarms-namely, it is a sheaf category (Sect. 4). It gives the most general approach to swarm computing. It is worth noting that there are proposed many algorithms in simulating some particular swarms: the Particle Swarm Optimisation [12], the Bacterial Foraging Optimisation Algorithm [13], the Artificial Bee Colony [14], the Cuckoo Optimisation Algorithm [15], the Social Spider Optimisation [16], the Ant Colony Optimisation [5], etc. Nevertheless, there is no general theory of swarm computing. In the paper, we are going to sketch one of the possible directions to this theory. Such a theory will show how multi-agent biological systems from unicellular to multi-cellular organisms realise a spatial logic in their space orientations.

Simplicial Objects and Spatial Orientation
One of the central arguments in this paper and for the brain place recognition, is presented by the nerve or active trace of finite cover Recall that a geometrical k-simplex, C (k) , is a complex hull of its k+1 vertices -so it is a k-dimensional polytope. This k-simplex thus generalises: a point (0-simplex), a line element (1-simplex), a triangle (2-simplex), a tetrahedron (3-simplex) etc.
where {x 1 − x 0 , ..., x k − x 0 } is a linearly independent set of vectors in R k . The convex hull of any nonempty subset of the k + 1 points, say d + 1, d < k, is a face of the simplex provided that, it is a d-simplex as well. Any two faces F 1 , F 2 in C (k) , are disjoint or their intersection is a face in C (k) . A simplicial complex K is a set of simplices such that: 1. Each face of the complex in K is an element of K.

Given two simplices
is a common face of both simplices and belongs to K (from 1. above).
Somewhat similarly one defines an abstract simplicial complex as a family Δ ⊂ P ([n]) of subsets of the finite set [n] = {0, 1, 2, ..., n} such that if σ ∈ Δ and τ ⊂ σ then τ ∈ Δ. The point is that to a finite good cover U = {U 1 , U 2 , ..., U n } of X one assigns an abstract simplicial complex N (U) ⊂ P ([n]) which is called the nerve or trace of U: If two open convex sets in U have nonempty intersection, then it belongs to the extension U of U, i.e.
Representing each U i ∈ U by a point i ∈ [n] and all nonempty intersections U i ∩ U j by {i, j} ∈ P ([n]) and all nonempty triple ) and so on, we have thus obtained the abstract simplicial complex, the nerve or trace of U, i.e. N (U). In fact the nerve or trace N (U) can be determined by its highest degree skeleton as shown by the following Helly's theorem Crucial is the following nerve theorem Theorem 2.2. X(U) and N (U) are homotopically equivalent.
In fact this equivalence holds between any paracompact space X with possibly infinite open cover U, such that each finite intersection of elements of U is contractible, and its nerve N (U) (see [21, p. 459]).
The nerve theorem gives the direct relationship between the space X of stimuli and the simplicial object which is the nerve of the convex open cover of X (see also [17]). This homotopy equivalence, or duality of topological space and simplicial space, is in the root of the brain functioning regarding the spatial orientation of living organism (e.g. [19,20]). And this model can be treated as a model of space orientation of any multi-agent biological systems -from Physarum polycephalum and Amoeba proteus to social insects and mammal swarms. To understand this relationship in more detail let us consider the stimuli space X(U), U = {U 1 , U 2 , ...., U n } where each U i is realised by a RF as in the Introduction (the receptive field of the i-th stimulus f i as exciting, or not, the i-th neuron or computational unit). Then the support of f i can be identified with U i . In fact of neglecting the convexity requirement for U i there holds quite general rule. To see it let us turn to the idea of code words from the Introduction. A sequence σ ∈ {0, 1} n , where now we allow only signal activating the i-th neuron (unit) or its lack, represents a code. The totality of activating signals coming from all stimuli can be grouped in the receptive field code of U (RF code), i.e. C(U) ⊂ {0, 1} n (see [19,20]).
Recall that a neural or trace code C of a system of n active units {1, 2, ..., n} = [n] is a subset C ⊂ {0, 1} n describing the pattern of activity and it comprises with code-words σ = {s 1 , s 2 , ..., s n } ∈ C. The support of σ is thus the set of computational units activated in σ and it is a subset of [n]. Thus, the support of neural code is The following theorem shows the universality of the construction of neural codes, units for X, and receptive field codes when applied to systems of neurons in a brain or to systems of active members in a swarm.
are not necessarily convex.
By applying the entire construction (following e.g. [19]) to the hyppocampus part of the brain, formula (2.1) gives the correspondence between the subsets of positions in X and patterns of neural activity: (i) (0) i -no activation of i-th unit, (ii) (1) j -an activation of j-th unit. In this way codes carry information about the positions in X. The brains or any other multi-agent biological system can thus process the data which is at roots of awareness of the orienting and navigating within the space.
Let us turn to the more general case of Physarum polycephalum, Amoeba proteus or any swarm which certainly possess no neurons. Any multi-agent biological system from bacteria colonies to social insects and mammal swarms typically occupy certain spatial domain in R 3 by a net of trace system (e.g. [25]). The excitation of individuals in these systems is performed by external stimuli (e.g. food doses) which results in the varying dynamics of the liquid excitation flows through the traces (i.e. through the tubes of Physarum polycephalum). It is known that after a certain time each swarm from unicellular to multi-cellular organisms builds an optimal logistic net of traces connecting nutrition doses, realising the most effective connections. This was in fact the source for the effective searching for the shortest connections, thus 'solving' the travelling salesman problem under some circumstances [22][23][24][25]. There is, however, another even more basic problem underlying such a behaviour. Namely, people are investigating the phenomena like that from the perspective of understanding cellular intelligence and the origins of cognition. Here we follow this direction and propose to assign to swarms, spreading over a 3-dimensional spatial region, a simplicial object -the nerve or trace of an open cover of the region, such that it explains the spatial orientation and a degree of self-control usually specific for the brain.
The link of the nerve or trace of the stimuli space X (suitably extended over a subset of R d ), i.e. N (U) with the system, for example, of the tubes in Physarum polycephalum is given by the triangulation of X. Namely, still for the convex open cover U of X it follows from Helly's theorem 2.1 Proposition 2.4 ([19,20]). N (U) can be canonically identified with the triangulated space Δ(C(U)).
From the formal point of view, the system of swarm logistic traces which is developed by any multi-agent biological system when extending over a spatial region engulfing food portions scattered in the space can be seen as the triangulation of the space of stimuli. If the number of various kinds of stimuli is increasing the dimensionality d of R d typically exceeds 3.  Let us assume that k = 3, see Fig. 1. After occupying U = {U 1 , U 2 , U 3 } by protoplasmic tubes of Physarum polycephalum, we obtain N (U) which is homotopically equivalent to X(U).
After a period of time T , the protoplasmic tubes extend over and cover the three (or more) open domains representing the food pieces. Thus, they meet in the body of Physarum polycephalum in such a way that the resulting nerve stores information about the positions of the food via the dual local patches U 1 , U 2 , U 3 which are extended to U 1 , U 2 , U 3 and which can be further extended to a single open superset U containing all 3 as subsets. However, the emerging environment where the meeting takes place is to be changed into the intuitionistic logic and set theory. Using the terminology of the next section, U 1 , U 2 , U 3 and U 1 , U 2 , U 3 are stages in the sieves over U in the special sheaf category, where the intersections of open subsets are given by a pullback square in this category. Hence, in the next two sections we will analyse the categorical limit of dense resolutions of swarm networks allowing for infinitely many open sets in covers of regions in X. Such a procedure will allow for determining the categorical environment where arbitrary many food pieces and their interactions can be treated consistently.

Intuitionistic Logic as the Limiting Universal Logic for Multi-Agent Biological Systems
In this section we recognise the logic based on open covers of X thus on the structure of the nerve N (U). The basic fact is the classic result by Tarski: Heyting algebras generalise Boolean algebras and they represent intuitionistic logic (which is infinitely many-valued) in addition to 2-(or finitely many-) valued logics.
In order to interpret formulas of intuitionistic logic on O(X), we assign open sets to propositional atoms similarly as in the case of nerve (trace) of X where we have assigned open sets to points -nodes of the nerve. Let α be an atomic formula of intuitionistic logic, then α is an open set in O(X). The next step in building the interpretation of complex formulas is given by the usage of operations from the Heyting algebra O(X) such that for any propositions α, β, the following relations hold true: where Int(A) is an interior of set A ⊂ X. Hence, the syntax of intuitionistic propositional logic is reflected in the algebra of open sets in O(X). Remark 3.3. Note that Lemma 3.1 holds for finite topological spaces X as well as for infinite ones.
2. If φ is non-provable intuitionistically, then there exist X and an interpretation (X, ) such that φ = X Remark 3.4. Note that the following equivalence holds true: φ is intuitionistically provable in intuitionistic propositional logic iff φ(a 1 , a 2 , . . . , a n ) = holds true for any Heyting algebra H and a 1 , a 2 , . . . , a n ∈ H. Since not all complete Heyting algebras are representable as topologies on X, so this equivalence generalises the property 1. above.
Let L be a standard propositional language of intuitionistic logic. Its formulas φ 1 , . . . , φ n , . . . describe real-time experiments with unicellular or multicellular organisms (from Physarum polycephalum and Amoeba proteus to swarms Figure 2. Three convex open sets U 1 , U 2 , U 3 , where U 1 , U 2 present food pieces and U 3 presents a repellent which must be avoided by ants of social insects and mammals). These experiments are performed by locating some objects, which can become stimuli (attractants and repellents), at different places around the organisms. Then each singular stimulus φ represents a convex open set and it is described by an appropriate atomic proposition φ. Any logical composition f (φ 1 , . . . , φ n ) of atomic formulas φ 1 , . . . , φ n is to describe the experiment with n objects φ 1 , . . . , φ n by means of logical composition f ( φ 1 , . . . , φ n ) in the Heyting algebra.
Assume that there are two external objects: α and β , which become the stimuli. Then α ∩ β means that the swarm occupies both α and β ; α ∪ β means that the swarm occupies α or β ; Int(X \ α ) means that the swarm avoids the place of α .
Example 2. Let us consider an example of building the logistic network by foraging ants. Suppose that we decide to locate three potential stimuli: two attractants U 1 , U 2 and one repellent U 3 , see Fig. 2. Then the universe X = 3 i=1 U i . Let α = U 3 . Then for this experiment the proposition ¬α has the meaning Int(X \ α ).
The connection between topology and intuitionistic logic works for all topologies on spaces which comprise also covers by open sets discussed in the context of the stimuli space X. The covers were finite so far thus we need to focus on a way how to extend the finite to infinite covers and check whether the limiting case would fit with the intuitionistic logic/topology connection. From (2.1) it follows that as long as the intersections U i ∩U j are nonempty, they contribute non-trivially to the neural code C(U). Let us consider an infinite (countable) cover U * of X. Extending U to U * is given by still finite intersections of finite subfamilies of U * = {U 1 , U 2 , . . . U k . . .}. This horizontal case leads to the RF * h code which eventually suppose infinite collections of finite strings of excitation as members of C(U * ). However, such an excitation spreading over X in a series of steps, would require an infinite number of extension which could presumably require an infinite time to be realised, and this is a true limitation from the point of view of real processes in the brain or swarm. Even neglecting this difficulty one infers that Here σ ∈ C h (U * ) is finite, though the entire set -the RF code C h (U * ) -would be infinite.
The vertical case of describing the excitation extending over infinite open covers of X relies on assuming infinite intersections of infinite subfamilies {U κ } κ∈K⊂I ⊂ U * , κ∈K U κ = ∅. Similarly, it holds: however, now the RF code C v (U * ) supposes infinite strings coming from an infinite vertical depth of intersecting open sets in U * . The entire set C v (U * ) can be finite, but also infinite.
Yet another, the most general case, for infinite extensions is one obtained in topologies O(X). The point is that any open cover U(X) fulfils

moreover, any subcover U(X) |RF ⊂ U(X), so that U(X) |RF ⊂ U(X) ⊂ O(X).
Here U(X) |RF is a collection of open sets U i ∈ O(X) excited precisely in the RF code C(U |RF ) = C(U). Finally, we arrive at Besides for any open subdomain The patterns of excitation are coded in open covers of X. The activity, motility and growing of swarm networks (such as tube nets of Physarum polycephalum) is often realised in the presence of variety of stimuli like many food portions scattered in the 3-dimensional space (see also [18]). The activation then meets and reacts somehow in the members of swarms. The containment relations above show that the universal environment for considering all the effects by stimuli is the (σ-algebra of the) topology O(X) of the resulting stimuli space X. Let RF1 be the RF code of the excitation 1 in the vicinity of stimulus a 1 ∈ X. Similarly, we assign RFk to a k ∈ X. Hence, it holds: Let X be the stimuli space for a 1 , . . . , a k , . . . , a n and X ⊂ R d . The universal algebraic environment for multi-agent biological systems reacting to the stimuli is represented by O(X).
Proof. This is a direct conclusion from the relations of (3.2), (3.3): Let X be a minimal stimuli space, where stimuli a 1 , . . . , . . . , a n belongs to it. We thus can formulate the following general property of logic of infinitely extended open covers.
Theorem 3.6. The universal logic for multi-agent biological systems reacting to stimuli belonging to the space X is the intuitionistic logic of the topology O(X).
Proof. The Lemma 3.1 shows that there is the duality between algebraic structure of O(X) (Heyting algebras) and the intuitionistic logic of it. Then Lemma 3.5 directly proves the result.
In the next section we will see that this connection is even more stringent.

The Categorical Generalisation
The partial order determined by the inclusion relation on O(X) suggests yet another interpretation of the logical structure of swarms from Physarum polycephalum and bacteria colonies to social insects and other animals. Namely, equation (2.1) indicates that for infinite covers with an infinite depth of intersections, there emerge maximal chains of infinite length, linearly ordered by inclusion. In fact such chains contribute non-trivially to C(U) as in (2.1). Having in mind the results of the previous section, we could ask the question about the logic of such chains. The proper indication is given by the constructions known from category theory.
To define a category K one needs to specify the sets, or proper classes, of objects O 1 and the morphisms (arrows) O 2 between the objects such that the following properties hold true: 1. The triple product of morphisms α 1 α 2 α 3 is defined, whenever there are defined (α 1 α 2 )α 3 , α 1 (α 2 α 3 ) and then the associative law takes place: 2. α 1 α 2 α 3 is defined, whenever α 1 α 2 and α 2 α 3 are defined. Remark 4.1. Given a category K, one defines the opposite category, K op , with the same set of objects O 1 as K and all arrows with reversed orientations, i.e. given α ∈ O 2 and e 1 , e 2 as in 3. above, then from 4. it follows that there are objects a 1 , a 2 ∈ O 1 such that the arrows α can be seen as starting from a 1 and aiming at a 2 . Hence, the reverse arrow starts with a 2 and aims at a 1 and they precisely form the arrows in K op .
Remark 4.2. The category of all sets (which is not a set itself) and functions between them is SET . This is in a sense model category which is, however based on the 2-valued (classical) Boolean algebra and, consequently, the logic it determines (its internal logic) is the classical 2-valued logic (e.g. [26]). In general, the internal logic is often different from classical and in the case of toposes (the special class of categories resembling SET ), the internal logic is based on Heyting algebras (e.g. [26]).
Given a small category K, it is a usual practice to study the functors F : K op → SET which could shed light on the difference of K and SET . In particular, the category of all such functors is called presheaf category, depicted as SET K op . The so-called 'sheafification' which is a modification of a presheaf category, resulting in the sheaf category, and depicted Sh(K), is another usefull form of a functor category.  [26]. Topos theory is a vast and rich branch of mathematics especially in foundations of mathematics which bridges many fields like algebra, logic, geometry, set theory or topology including algebraic topology (e.g. [27]). Toposes found also their applicability in quantum mechanics and physics in general.
The construction of the presheaves in SET O(X) op can be based on the notion of sieves. Our concern here is that sieves are related to maximal chains in O(X).
Sieves appear when one wants to categorify the notion of covering of an open set on a topological space. In categories this becomes the covering of an object by a family of arrows. A sieve S on an object c ∈ O 1 is a collection of  1. The maximal sieve on a is a member of J(c). 2. Let S 1 , S 2 be sieves on a and S 1 ∈ J(a) and S 1 ⊃ S 2 , then S 2 ∈ J(a). 3. There exists the sieve R ∈ J(a), which is a composite of sieve S ∈ J(a) and family of certain sieves, and this R behaves functorially with respect to the changes of arrows in S and with respect to the changes of the object a → d (see [26]).
As we noted before, such maximal chains give nontrivial contributions to C(U * ). From the categorical point of view, sieves are essential building blocks for construing sheaves on K. Thus, for K = O(X) Grothendieck topologies and covering families J O(X) of sieves determine categorical sheaves on O(X). However, the following statement takes place: The above lemma holds since the Grothendieck topology In this way, the maximal sieves give nontrivial contributions to C(U * ) and also build sheaves on X. That is why we consider Sh(X) as suitable formal generalisation of O(X) in the context of swarm motility and reaction on stimuli.  This result follows from Lemma 4.6 showing that Sh(X) is the limiting category extending O(X) and from the fact that Sh(X) is a topos whose internal logic is based on the Heyting algebra O(X). Lemma 4.5 shows that Sh(X) is equivalent to the category of sheaves on the above Heyting algebra, while SET is equivalent to Sh({0, 1}) -the category of sheaves on the 2-valued Boolean algebra. From that point of view it is evident that Sh(X) is essentially non-classical with intuitionistic internal logic [26]. Being a topos Sh(X) has the internal set theory which is intuitionistic [26].

Discussion
We have analysed the situation of limiting logic for swarms reacting on stimuli, with the stimuli space X ⊂ R d , and assuming the interaction of excitation. The limiting case has been determined by taking infinite covers of the topological space X. Firstly, we have shown that the topology O(X) is the object encompassing a various excitation carried out by systems of open sets in X and such that we suppose an interaction of excitation. Moreover, the nerves (traces) of the covers U i of X correspond to the excitation in the swarm logistic networks. Next, we have developed the infinite cover case toward categorical constructions and observed that Sh(O(X)) would be a natural limiting case of infinite covers. This abstract construction as a category is, however, equivalent to the ordinary category of sheaves on a topological space. This shows that the generalisations of X with finite covers to infinite covers of infinite intersections depths, even though goes through presheaf topos SET O(X) op , and the sheaves on Heyting algebra O(X), finally leads to the topological space of sheaves on X. Hence, X → O(X) → Sh(X) is a final description of the generalisations. Finally, the intuitionistic logic and set theory of the topos Sh(X) is assigned to this limiting case. We have observed (following [19,20]) that the duality of the nerve (logistic trace) of cover of X and open neighbourhoods in space explains the orientation in space of swarms, but it is also characterising the brains of mammals activity (hyppocampus region) with respect to the space orientation. That is why it would be quite interesting to push farther this duality over categorical notion of the nerve of category (SET O(X) op ) into the internal topological space and its cover. Possibly intuitionistic logic and internal spaces in toposes would be the right abstract base for recognising patterns of functioning of swarms and would find its place in the study of brain activity.
Let us discuss certain choices made in the paper. As a rule, we work with open covers and open subsets of X. One could instead take closed convex subsets and cover which generally lead to the similar results. The reason for such rough equivalence is the version of the nerve theorem based on finite closed covers of X (see [29, p. 1850]). However, there are some differences when infinite cover limit is taken as in Secs. 3 and 4. First, for infinite covers and infinite depth of closed subsets they can intersect in a single point. We consider this situation unrealistic from the point of view of determining the localisation region in physical space of stimuli. It is rather certain unsharp region in R 3 , hence open U , resulting as recognized by an organism localization of a stimulus. Second, the limiting categorical logic of presheaves on partial order of closed covers of X, is given by a co-topos rather then by the topos of sheaves. While this difference is rather subtle from the point of view of real biological systems, still it leads mathematically to the paraconsistent logic and we do not decide here that such limiting logic cannot be a valid tool for grasping the behaviour of real systems. This interesting problem is, however, deferred to be analysed separately. Therefore we postpone the full fledged demonstration of this mechanism based on examples to a separate publication.
One could wonder how concrete biological systems based on these universal mathematical constructions have the chance to aim at unique solution in the real world. As we believe, and which was not demonstrated decisively here, the key indication comes from mathematics and partly from physics. These are optimization processes of the topological constructions, leading to determining the link between combinatorial, discrete and continuous, or even smooth, structures of topological spaces [30]. As the result there is not only the nerve of a topological space which is to be determined and which depends on covers of X, but also the nerve is the most effective in the algorithmic and computational sense and as such, it is unique or almost unique [30]. One additional aspect of the effectiveness of this mechanism relies on the fact known from physics that a physical space (or 4-dimensional spacetime) is very precisely, if not perfectly, represented by the 3-dimensional smooth manifold (4-dimensional Minkowski manifold, respectively) so that the recognition of positions in 3-space is also very finely grasped by the dual nerve construction. The more thorough presentation of this mechanism, based on examples, will be presented separately.
In the course of time we are going to construct a simulation model within the object-oriented programming in the way of [32] to check the exressibility of our topological construction presented in this paper. Our main motivation was to propose the broadest possible mathematical framework in terms of category theory for studying logistic behaviour in space navigation of living beings.
Recently [28] we have found that intuitionism may indeed be a proper feature of intelligent swarms considered as realising certain computational tasks. Even the deeper variation on the internal vs. external perspectives led recently researchers to formulating and analysing the proposal stating that for the appearance of 'mind' as logical manifestation of the structure, i.e. categorical 'brain', is responsible for the duality (the pair of adjoint functors) between categories LANG of categories and MIND of theories [31]. Such a universal and categorical mechanism of creation meanings by the brain could, in principle, serve as roots of consciousness emerging in the structure of brain. This, however, requires further studies.
Open Access. This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons. org/licenses/by/4.0/.
Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.