# Dynamic Łukasiewicz logic and its application to immune system

## Abstract

It is introduced an immune dynamic n-valued Łukasiewicz logic $$ID{\L }_n$$ on the base of n-valued Łukasiewicz logic $${\L }_n$$ and corresponding to it immune dynamic $$MV_n$$-algebra ($$IDL_n$$-algebra), $$1< n < \omega$$, which are algebraic counterparts of the logic, that in turn represent two-sorted algebras $$(\mathcal {M}, \mathcal {R}, \Diamond )$$ that combine the varieties of $$MV_n$$-algebras $$\mathcal {M} = (M, \oplus , \odot , \sim , 0,1)$$ and regular algebras $$\mathcal {R} = (R,\cup , ;, ^*)$$ into a single finitely axiomatized variety resembling R-module with “scalar” multiplication $$\Diamond$$. Kripke semantics is developed for immune dynamic Łukasiewicz logic $$ID{\L }_n$$ with application in immune system.

## Introduction

Dynamic logic (Kozen 1979; Segerberg 1971) (see also Pratt 1980 and cited there literature) is a classical formal system for reasoning about programs. Dynamic logic is a classical modal logic for reasoning about dynamic behaviour taking into account a discrete time. Dynamic logic is an extension of modal logic originally intended for reasoning about computer programs.

Modal logic is characterized by the modal operators $$\Box p$$ asserting that p is necessarily the case, and $$\Diamond p$$ asserting that p is possibly the case. Dynamic logic extends this by associating to every action (execution of program) a the modal operators [a] and $$\langle a\rangle$$, thereby making it a multi-modal logic.

We adapt the dynamic logic, presented on the base of classical logic and R-module, to non-classical finitely valued Łukasiewicz logic $${\L }_n$$ and R-module, and immune system consisting of a set of T cells with communications between them represented as a Kripke frame. The meaning of [a]p is that after performing laboratory experiment, i.e. to examine the validity of a hypothesis (proposition), a it is necessarily the case that p holds, that is, a must bring about p. The meaning of $$\langle a\rangle p$$ is that after performing a it is possible that p, that is, a might bring about p. These operators are related by $$[a]p \equiv \lnot \langle a\rangle \lnot p$$ and $$\langle a\rangle p\equiv \lnot [a]\lnot p$$, analogously to the relationship between the universal $$\forall$$ and existential $$\exists$$ quantifiers.

This paper is based on the two papers by Di Nola et al. (2015, 2020), respectively. Notice, that the paper (Di Nola et al. 2015) is devoted to multi-modal Łukasiewicz logic with application in the immune system; and the paper (Di Nola et al. 2020) is devoted to dynamic Łukasiewicz logic which is an adaptation of classical dynamic logic introduced in Segerberg (1977) by Segerberg and developed by other authors in Kozen (1979), Pratt (1980), Teheux (2014). Notice, that the paper (Di Nola et al. 2015) is devoted to 3-valued multi-modal epistemic Łukasiewicz logic that is generalization of classical epistemic multi-modal logic $$S5_n$$ ($$n\in Z^+$$) (Porter 2003).

We introduce the notion of immune dynamic n-valued Łukasiewicz logic $$ID{\L }_n$$ ($$1< n < \omega$$) which permits compound experiment built up from given initial experiments. Given experiments a and b, the compound experiment $$a\cup b$$, choice, is performed by performing one of a or b. The compound experiment $$a{\mathbin {;}}b$$, sequence, is performed by performing first a and then b. The compound experiment $$a^{*}$$, iteration, is performed by performing a one or more times, sequentially. The constant experiment 0 does nothing and does not terminate, whereas the constant action 1, definable as $$0^{*}$$, does nothing but does terminate. Following Kozen Kozen (1979) and Pratt Pratt (1980), who have been introduced dynamic algebra, we propose the notion of an immune dynamic $$MV_n$$-algebraFootnote 1 ($$IDL_n$$-algebra) ($$1< n < \omega$$), which integrates an abstract notion of proposition with an equally abstract notion of experiment. Just as propositions tend to band together to form $$MV_n$$-algebras with operations $$x \oplus y$$, and $$\sim x$$, so do experiments organize themselves into regular algebras, with operations $$a \cup b$$, ab, and $$a^{*}$$. Analogously to the proposition $$p \underline{\vee } q$$ being the strong disjunction (the algebraic counterpart of which is $$x \oplus y$$), $$p \vee q$$ being the disjunction of propositions p and q, and $$\lnot p$$ the negation of p, the experiment $$a \cup b$$ is the choice of experiments a or b, ab, or just ab, is the sequence a followed by b, and $$a^{*}$$ is the iteration of a indefinitely often.

Just as $$p \vee q$$ has natural set theoretic interpretation, namely union, so do $$a \cup b, \ a; b$$ and $$a^{*}$$ have natural interpretations on such concrete kinds of experiments as additive functions, binary relations, trajectory sets and languages over regular algebras, to name those regular algebras that are suited to immune dynamic $$MV_n$$-algebra.

It is natural to think of an experiment as being able to bring about a proposition (hypothesis about the immune system). We write $$\langle a \rangle p$$ pronounced “$$experiment \ a \ enables \ p$$”, as the proposition that experiment a can bring about proposition p. An immune dynamic $$MV_n$$-algebra then is a $$MV_n$$-algebra $$(A, \oplus , \odot , \sim , 0, 1)$$, a regular algebra $$(R, \cup , ;, ^{*})$$, and the enables operation $$\Diamond : R \times A \rightarrow A$$.

Suppose now that either p holds, or a can bring about a situation from which a can eventually (by being iterated) bring about p. Then, a can eventually bring about p. That is, $$p \vee aa^{*} p \le a^{*} p$$. (We write $$p \le q$$ to indicate that p implies q, defined as $$p \vee q = q$$.) In turn, if a can eventually bring about p, then either p is already the case or a can eventually bring about a situation in which p is not the case but one further iteration of a will bring about p. That is, $$a^{*} p \le p \vee a^{*}( \lnot p \wedge ap)$$. [a] is the dual of $$\langle a\rangle$$, and [a]p asserts that whatever a does, p will hold.

## Immune dynamic Łukasiewicz logic $$ID{\L }_n$$

Similarly to dynamic propositional Łukasiewicz logic introduced in Di Nola et al. (2020), we introduce immune dynamic n-valued Łukasiewicz logic $$IDL_n$$, the main difference of which are in interpretations. Immune dynamic n-valued Łukasiewicz logic $$ID{\L }_n$$ is designed for representing and reasoning about propositional Łukasiewicz logic expected results (hypothesis) of (laboratory) experiments (results of experimentation). Its syntax is based upon two sets of symbols: a countable set $$\mathbf {Var}$$ $$(= \{p, p_1, p_2, \ldots , q, q_1, q_2, \ldots \})$$ of propositional variables and a countable set Exp (= $$\{a,b,c, ... \}$$) of atomic experiments. So the language $$\mathcal {L}$$ of $$ID{\L }_n$$ is given by a countable set $$\mathbf {Var}$$ of propositional variables and a countable set Exp of atomic experiments. Formulas and experiments $$FE(\mathcal {L})$$, which we name formulas, over this base are defined as follows:

• Every propositional variable is a formula;

• $$\bot$$ (“false”) is a formula;

• If $$\varphi$$ is a formula, then $$\lnot \varphi$$ (“$$not\ \varphi$$”) is a formula;

• If $$\varphi$$ and $$\psi$$ are formulas, then $$(\phi \underline{\vee } \psi )$$ (“$$\underline{\vee }$$” is a strong disjunction) is a formula;

• If $$\varphi$$ and $$\psi$$ are formulas, then $$(\varphi \& \psi )$$ (“& ” is a strong conjunction) is a formula;

• If $$\varphi$$ and $$\psi$$ are formulas, then $$(\varphi \vee \psi )$$ (“$$\varphi \ or \ \psi '')$$ is a formula;

• If a is an experiment and $$\varphi$$ is a formula, then $$[a]\varphi$$ (“every made experiment a from the present state leads to a state where $$\varphi$$ is true”) is a formula;

• Every atomic experiment is an experiment;

• If a and b are experiments, then (ab) (“do a followed by b”) is an experiment;

• If a and b are experiments, then $$(a \cup \ b)$$ (“do a or b, non-deterministically”) is an experiment;

• If a is an experiment, then $$a^{*}$$ (“repeat a a finite, but non-deterministically determined, number of times”) is an experiment.

The other Łukasiewicz connectives $$1, \rightarrow$$ and $$\leftrightarrow$$ are used as abbreviations in the standard way ($$1 \equiv \bot \underline{\vee } \lnot \bot , \ p \rightarrow q \equiv \lnot p \underline{\vee } q, \ p \leftrightarrow q \equiv (p \rightarrow q) \wedge (q \rightarrow p$$)). In addition, we abbreviate $$\lnot [a]\lnot \varphi$$ to $$\langle a \rangle \varphi$$ (“performing some experiment a from the present state leads to a state where $$\varphi$$ is true”) as in modal logic. We write $$a^n$$ for $$a; \ldots ;a$$ with n occurrences of a. More formally:

• $$a^1 =_{df} a$$

• $$a^{n+1} =_{df} a;a^n$$.

The axioms of $$ID{\L }_n$$ are the axioms of n-valued Łukasiewicz logic $${\L }_n$$ Grigolia (1977) plus the following schemata of modal parts. For any formulas $$\varphi , \ \psi$$ and any experiment:

• Ax0 $$[a] (\varphi \rightarrow \psi ) \rightarrow ([a] \varphi \rightarrow [a] \psi )$$,

• Ax1 $$[a]1 \leftrightarrow 1$$,

• Ax2 $$[a; b] \varphi \leftrightarrow [a][b] \varphi$$,

• Ax3 $$[a \cup b] \varphi \leftrightarrow [a] \varphi \wedge [b]\varphi$$,

• Ax4 $$[a](\varphi \wedge \psi ) \leftrightarrow ([a]\varphi \wedge [a] \psi )$$.

• Ax5 $$[a^{*}] \varphi \leftrightarrow \varphi \wedge [a][a^{*}]\varphi$$,

• Ax6 $$\varphi \wedge [a^{*}](\varphi \rightarrow [a] \varphi ) \rightarrow [a^{*}]\varphi$$,

• Ax7 $$[a] (\varphi \& \varphi ) \leftrightarrow [a] \varphi \& [a] \varphi$$,

• Ax8 $$[a] (\varphi \veebar \varphi ) \leftrightarrow [a] \varphi \veebar [a] \varphi$$.

and closed under the following rules of inference:

• (MP) from $$\varphi$$ and $$\varphi \rightarrow \psi$$ infer $$\psi$$,

• (N) from $$\varphi$$ infer $$[a] \varphi$$,

• (I) from $$\varphi \rightarrow [a]\varphi$$ infer $$\varphi \rightarrow [a^{*}]\varphi$$.

Notice that the axiom Ax0 is well known as axiom of basic modal logic K, the axioms Ax1–Ax6 have been proposed by Segerberg in 1977 (see also Kozen and Parikh 1981) for dynamic logic, but in $$\langle a \rangle$$ terms, and Ax7–Ax8 are specific axioms for modal Łukasiewicz logic (Di Nola and Grigolia 2004; Hansoul and Teheux 2006). Notice also the works (Di Nola et al. 2020; Teheux 2014) on dynamic Łukasiewicz logic.

The unit interval of real numbers [0, 1] endowed with the following operations: $$x \oplus y = \min (1,x+y), x \odot y = \max (0, x + y-1), \sim x = 1 - x$$, becomes an MV-algebra (Chang 1958). From these operations are defined the lattice operations $$x \vee y = \max (x,y) = (x \odot \sim y) \oplus y$$ and $$x \wedge y = \min (x,y) = (\sim x \oplus y) \odot x$$. It is well known that the MV-algebra

$$S=([0,1],\oplus ,\odot ,\sim , 0,1)$$

generate the variety $$\mathbf {MV}$$ of all MV-algebras, i.e. $$\mathcal {V}(S) = \mathbf {MV}$$. The algebra $$S_n=(\{0, 1/n-1, ..., n-2/n-1, 1\},\oplus ,\odot ,\sim , 0,1)$$ generates the subvariety $$\mathbf {MV}_n$$ ($$1< n < \omega$$), the algebras of which is called $$MV_n$$-algebras and they was introduced in Grigolia (1977), i.e. $$\mathcal {V}(S_n) = \mathbf {MV}_n$$. Notice that $$\mathbf {MV} = \mathcal {V}(\bigcup _{i=1}^{\infty } \mathbf {MV}_n)$$.

The formulas of $${\L }$$ukasiewicz logic are built from a countable set of propositional variables $$Var = \{p, q, . . .\}$$ using the connectives & (strong conjunction), $$\rightarrow$$ (implication) and $$\bot$$ (falsity truth constant).

The algebra $$\mathcal {S}=([0,1], \odot , \Rightarrow , 0)$$ (which is functionally equivalent to the MV-algebra defined above), where a binary operation $$\odot$$, called $${\L }$$ukasiewicz t-norm, is defined as $$x \odot y = max\{0, x + y - 1\}$$, for all $$x, y \in [0, 1]$$; a binary operation $$\Rightarrow$$, called the residuum (of the t-norm $$\odot$$), is defined as $$x \Rightarrow y = min\{1, 1 - x + y\}$$, and $$\sim x = x \Rightarrow 0 = 1 - x$$, $$x \oplus y = \sim ( \sim x \odot \sim y) = min(1, x + y)$$, for all $$x, y \in [0, 1]$$.

## Kripke semantics

One of the semantics of $$IDL_n$$ is Kripke semantics that is similar to the ones that have been done in Di Nola et al. (2020). In the presented case, the formula $$[a \cup b]\varphi$$ means that whenever laboratory experiment a or b is successfully done, a state is reached where $$\varphi$$ holds, whereas the formula $$\langle (a;b)\rangle \varphi$$ means that there is a sequence of consecutive laboratory experiments a and b such that a state is reached where $$\varphi$$ holds. Semantically speaking, formulas are interpreted by sets of states and experiments are interpreted by binary relations over states in a Kripke model. More precisely, the meaning of $$ID{\L }_n$$ formulas and experiments is interpreted over Kripke models (KM) $$\mathcal {K} = (W, R, V)$$ where W is a nonempty set of worlds or states, R is a mapping from the set Exp of atomic experiments into binary relations on W, i.e. $$R: \mathbf{Exp} \rightarrow r: W^2 \rightarrow \{0, 1\}$$, and V is a mapping from the set $$Var \times W$$ of atomic formulas and elements of states into $$S_n$$. Informally, the mapping R assigns to each atomic experiment $$\varepsilon \in \mathbf{Exp}$$ some binary relation $$R(\varepsilon )$$ on W with intended meaning $$xR(\varepsilon )y$$ iff there exists an experiment $$\varepsilon$$ from x that leads to y, whereas the mapping V assigns to each pair $$(p,x)\in Var \times W$$, where $$p\in Var$$ is an atomic formula and $$x \in W$$, some element $$V(p,x)\in S_n$$ with intended meaning $$V(p,x) =1$$ iff p is true in x. Given our readings of $$0, \lnot \varphi , \varphi \veebar \psi$$, $$[a] \varphi , a;b, a \cup b, a^{*}$$, it is clear that R and V must be extended inductively as follows to supply the intended meanings for the complex experiments and formulas:

• xR(ab)y iff there exists a world z such that xR(a)z and zR(b)y,

• $$xR(a \cup b)y$$ iff xR(a)y or xR(b)y,

• $$xR(a^{*})y$$ iff there exists a non-negative integer n and there exist worlds $$z_0,\ldots , z_n$$ such that $$z_0 = x$$, $$z_n = y$$ and for all $$k= 1, \ldots , n$$, $$z_{k - 1}R(a)z_k$$,

• $$V(\bot ) = 0$$.

• $$V(\lnot \varphi ,x) = 1 - V(\varphi ,x)$$,

• $$V(\varphi \veebar \psi ,x) = V(\varphi ,x)\oplus V(\psi ,x)$$,

• $$V(\varphi \vee \psi ,x) = V(\varphi ,x)\vee V(\psi ,x)$$,

• $$V([a]\varphi ,x) = \bigwedge \{V(\varphi ,y): xR(a)y\}$$,

• $$V(\langle a \rangle \varphi ,x) = \bigvee \{V(\varphi ,y): xR(a)y\}$$.

If $$V(\varphi ,x) = 1$$, then we say that $$\varphi$$ is satisfied at state x in $$\mathcal {K}$$, or “$$\mathcal {K}, x \ sat \ \varphi$$”.

Now consider a formula $$\varphi$$. We say that $$\varphi$$ is valid in $$\mathcal {K}$$ or that $$\mathcal {K}$$ is a model of $$\varphi$$, or “$$\mathcal {K} \vDash \varphi$$”, iff for all worlds x, $$V(\varphi ,x) = 1$$. $$\varphi$$ is said to be valid, or “$$\vDash \varphi$$”, iff for all models $$\mathcal {K}$$, $$\mathcal {K} \vDash \varphi$$. We say that $$\varphi$$ is satisfiable in $$\mathcal {K}$$ or that $$\mathcal {K}$$ satisfies $$\varphi$$, or “$$\mathcal {K} \ sat \ \varphi$$”, iff there exists a world x such that $$V(\varphi ,x) = 1$$. $$\varphi$$ is said to be satisfiable, or “$$\ sat \ \varphi$$”, iff there exists a model $$\mathcal {K}$$ such that $$\mathcal {K}$$ sat $$\varphi$$. Interestingly, sat $$\varphi$$ iff not $$\vDash \lnot \varphi$$, $$\vDash \varphi$$ iff not sat $$\lnot \varphi$$.

Some remarkable formulas of $$ID{\L }_n$$ are valid:

• $$\vDash [a;b]\varphi \leftrightarrow [a][b]\varphi$$,

• $$\vDash [a \cup b]\varphi \leftrightarrow [a]\varphi \wedge [b]\varphi$$,

• $$\vDash [a^{*}]\varphi \leftrightarrow \varphi \wedge [a][a^{*}]\varphi$$.

Equivalently, we can write them under their dual form:

• $$\vDash \langle a;b\rangle \varphi \leftrightarrow \langle a\rangle \langle b\rangle \varphi$$,

• $$\vDash \langle a \cup b\rangle \varphi \leftrightarrow \langle a\rangle \vee \langle b\rangle \varphi$$,

• $$\vDash \langle a^{*}\rangle \varphi \leftrightarrow \varphi \vee \langle a\rangle \langle a^{*}\rangle \varphi$$.

We define immune dynamic Łukasiewicz logic $$ID{\L }_n$$ as the set of all formulas that are valid in all Kripke models, i.e.

\begin{aligned} ID{\L }_n = \{\varphi \in FE: \ \models \varphi \}. \end{aligned}

## Immune dynamic $$MV_n$$-algebras

Similarly to dynamic MV-algebras, introduced by Di Nola et al. in 2020, immune dynamic $$MV_n$$-algebra ($$1< n< \omega$$) $$(\mathcal {M}, \mathcal {R}, \lozenge )$$ combine $$MV_n$$-algebra $$\mathcal {M} = (M,\oplus ,\odot ,\sim , 0,1)$$ and regular algebra $$\mathcal {R} =(R, \cup , ;, ^{*})$$ into a single finitely axiomatized class resembling an R-module with “scalar” multiplication $$\lozenge$$. An immune dynamic $$MV_n$$-algebra $$\mathcal {D}=(\mathcal {M}, \mathcal {R}, \lozenge )$$ satisfies the following identities: for any $$x,y \in M$$ and $$a,b\in R$$

1. 1.

$$\mathcal {M}$$ is $$MV_n$$-algebra.

2. 2.

$$[a] (x \Rightarrow y) \le ([a] x \Rightarrow [a] y )$$.

3. 3.

$$a0 = 0$$.

4. 4.

$$a(x \vee y) = ax \vee ay$$.

5. 5.

$$(a \cup b)x = ax \wedge bx$$.

6. 6.

$$(ab) x = a(bx)$$.

7. 7.

$$x \vee aa^{*}x \le a^{*}x \le x \vee a^{*}(\sim x \otimes ax)$$.

8. 8.

$$a(x \oplus x) = ax \oplus ax$$.

9. 9.

$$a(x \odot x) = ax \odot ax$$.

In the sequel instead of a variable x sometimes we will use a propositional variable p. If $$ap = bp$$ for all p we call a and b inseparable and write $$a \equiv b$$, an equivalence relation which is a congruence relation on immune dynamic algebras. We call separable any immune dynamic $$MV_n$$-algebra in which inseparability is the identity relation Kozen (1979). We let $$\mathbf {SDA}(n)$$ denote the class of separable immune dynamic $$MV_n$$-algebras.

On R, we define a quasiorder $$\le$$: $$a \le b$$ means that $$ap \le bp$$ for all p. It follows that $$\le$$ on is reflexive and transitive but not antisymmetric, and so is a quasiorder. In a separable immune dynamic $$MV_n$$-algebra, it becomes a partial order.

Notice that if $$a \equiv b$$ then $$a^{*} \equiv b^{*}$$ (Pratt 1980) and hence $$\equiv$$ is a congruence relation. Moreover, (a) if $$a \le b$$, then $$a^{*} \le b^{*}$$, (b) $$a \le a^{*}$$, (c) $$a^{*} = a^{**}$$ (Pratt 1980).

### Example 1

Full dynamic $$MV_n$$-algebras. Given a complete $$MV_n$$-algebra $$\mathcal {M} = (M,\oplus ,\odot ,\sim , 0,1)$$, let R be the set of all finitely (resp. completely) additive functions on M, with conditions $$f(0) =0$$, $$f(x \oplus x) = f(x) \oplus f(x)$$ and $$f(x \odot x) = f(x) \odot f(x)$$, and let $$\Diamond : R \times M \rightarrow M$$ be application of elements of R to elements of M. We call it the full (completely full) dynamic $$MV_n$$-algebra on M.

### Example 2

$$MV_n$$-Kripke structures. Let W be the set of states and $$M_W = \{f: f \ \text{ is } \text{ a } \text{ function } \text{ from } \ W \ to \ S_n\}$$ ($$n\in Z^+$$)—the set of all functions, which is complete $$MV_n$$-algebra. Then, the full $$MV_n$$-Kripke structure on W is the completely full dynamic $$MV_n$$-algebra on $$M_W$$.

## Completeness theorem

Recall from Kozen (1979) and Pratt (1980) that dynamic MV-algebra $$\mathcal {D}=(\mathcal {M}, \mathcal {R}, \lozenge )$$ (dynamic $$MV_n$$-algebra $$\mathcal {D}_n=(\mathcal {M}, \mathcal {R}, \lozenge )$$, $$n\in Z^+$$) is called separable iff $$(\forall a_1, a_2 \in R)(\exists x \in M) (a_1 \ne a_2 \Rightarrow a_1x \ne a_2x)$$. Following this definition, immune dynamic $$MV_n$$-algebra ($$1< n < \omega$$) $$\mathcal {D}=(\mathcal {M}, \mathcal {R}, \lozenge )$$ is called separable iff $$(\forall a_1,a_2 \in R) (\exists x\in M)(a_1 \ne a_2 \Rightarrow \Diamond (a_1, x) \ne \Diamond (a_2, x))$$. In this case x is called a separator for the elements $$a_l$$ and $$a_2$$. SDA(n) denotes the class of all separable dynamic $$MV_n$$-algebras, and $$\mathbf{V} _n$$ denotes the variety generated by SDA(n), i.e. $$\mathbf{V} _n =\mathcal {V}(\mathbf{SDA} (n))$$.

Let $$x,y ..., a,b,..., \alpha , \beta , ...$$ range over the set of generators in $$M,R, M \cup R$$, respectively, and write $$M_0,R_0,D_0$$ for the respective generator sets. Let $$\mathcal {F}_\mathbf{V _n}(M_0,R_0)$$ denotes the free $$V_n$$-algebra (free algebra over $$\mathbf{V} _n)$$ freely generated by the sets $$R_0$$ and $$M_0$$ as free generators of sorts $$MV_n$$-algebra and actions, respectively (Grätzer 1979). We can represent $$\mathcal {F}_\mathbf{V _n}(M_0,R_0)$$ as $$(\mathcal {F}_\mathbf{MV _n}(M_0), \mathcal {F}_\mathbf{R }(R_0), \Diamond )$$. Notice that $$(\mathcal {F}_\mathbf{MV _n}(M_0), \mathcal {F}_\mathbf{R }(R_0), \Diamond )$$ is a homomorphic image of the absolutely free term immune dynamic $$MV_n$$-algebra. In other words $$(\mathcal {F}_\mathbf{MV _n}(M_0)$$ , $$\mathcal {F}_\mathbf{R }(R_0), \Diamond )$$ is a Lindenbaum algebra of the immune dynamic Łukasiewicz logic on finitely many free generators.

Taking into account that the variety $$\mathbf{MV} _n$$ is locally finite and adapting Nemeti’s result (Nemeti 1982), concerning to dynamic logic, for immune dynamic $$MV_n$$-algebra it holds the following

### Theorem 1

Nemeti (1982) Every free $$V_n$$-algebra is separable. Let $$a\in R_0$$. Then, $$\sim \Diamond (a,1)$$ is a separator for any two different elements of R in $$\mathcal {F}_\mathbf{V _n}(M_0,R_0)$$.

The notion of heterogeneous algebra and products, subalgebras and homomorphisms of heterogeneous algebras can be found in Birkhoff and Lipson (1970). According to well-known Birkhoff’s theorem, we have

### Theorem 2

A $$V_n$$-algebra $$\mathcal {D}=(\mathcal {M}, \mathcal {R}, \lozenge )$$ is isomorphic to a subdirect product of subdirectly irreducible $$V_n$$-algebras.

According to this theorem $$(\mathcal {F}_\mathbf{MV _n}(M_0), \mathcal {F}_\mathbf{R }(R_0), \Diamond )$$ is represented as a subdirect product of subdirectly irreducible $$V_n$$-algebras where $$\mathcal {F}_\mathbf{MV _n}(M_0)$$ is a subdirect product of finite chain $$MV_n$$-algebras and $$\mathcal {F}_\mathbf{R }(R_0)$$ is a separable regular algebras. Notice that when $$M_0$$ is finite then $$\mathcal {F}_\mathbf{MV _n}(M_0)$$ is finite.

Notice that any immune dynamic $$MV_n$$-algebra satisfies the equations naturally induced by the theorems of immune dynamic Łukasiewicz logic (the axioms of immune dynamic Łukasiewicz logic $$ID{\L }_n$$ are transformed into corresponding immune dynamic $$MV_n$$-algebra identities and vice versa). So, it holds

### Theorem 3

A formula $$\varphi$$ is a theorem of $$ID{\L }_n$$ iff the corresponding identity $$\varphi ^{\bullet } =1$$ is true in the variety $$\mathbf{V} _n$$.

Now we use an abstract version of the modal logic technique of filtration, which in a Kripke structure setting is the process of dividing a Kripke model of a given formula $$\varphi$$ by an equivalence relation on its worlds to yield a finite Kripke model of $$\varphi$$. Fischer and Ladner (1979) showed that filtration could be made to work for propositional dynamic logic just as well as for modal logic. Pratt (1980) extends their result that filtration does not depend on any special properties of Kripke structures but works for all dynamic algebras. Adapting Segerberg’s technique of filtration (for modal logic) (Segerberg 1971) for immune dynamic $$MV_n$$-algebras it holds

### Theorem 4

For a free dynamic $$MV_n$$-algebra $$\mathcal {F}_\mathbf{V _n}(M_0,R_0)$$ and a finite subset $$M_g$$ of $$\mathcal {F}_\mathbf{MV _n}(M_0)$$, there exists an immune dynamic $$MV_n$$-algebra $$\mathcal {D}=(\mathcal {M}, \mathcal {R}, \lozenge )$$ and a homomorphism $$f: \mathcal {F}_\mathbf{V _n}(M_0,R_0) \rightarrow \mathcal {D}$$ injective on $$M_g$$, with $$f(\mathcal {F}_\mathbf{V _n}(M_0, R_0))$$ finite and separable.

### Theorem 5

Every finite separable immune dynamic $$MV_n$$-algebra $$\mathcal {D} = (\mathcal {M}, \mathcal {R}, \Diamond )$$ is isomorphic to a (finite) $$MV_n$$-Kripke structure.

### Proof

Let $$\mathcal {D} = (\mathcal {M}, \mathcal {R}, \Diamond )$$ be a separable finite dynamic $$MV_n$$-algebra. Let (WRV) be the Kripke model such that:

1. (1)

W is the set of all additive functionsFootnote 2$$f: M \rightarrow S_n$$ with conditions $$f(0) =0$$, $$f(x \oplus x) = f(x) \oplus f(x)$$ and $$f(x \odot x) = f(x) \odot f(x)$$;

2. (2)

the binary relation R is defined on W by

$$(u,v)\in R$$ if for every formula $$\varphi \in \mathcal {F}_\mathbf{MV _n}(M_0)$$ and $$a \in \mathbf{Exp}$$

\begin{aligned} u([a]\varphi ) = 1 \Rightarrow v(\varphi )= 1; \end{aligned}
3. (3)

the valuation map $$V: W \times Var \rightarrow S_n$$ is defined by

\begin{aligned} (u,p) = u(p). \end{aligned}

By the fact that every finite $$MV_n$$-algebra is isomorphic to ta direct product $$\prod _{i\in I} S_i$$, where i divides n (Grigolia 1977), and by separability, $$\mathcal {D}$$ is isomorphic to a subalgebra of the full (hence completely full by finiteness of M) dynamic algebra, which is by definition a $$MV_n$$-Kripke structure. $$\square$$

## Application

In this section, we apply the results of immune dynamic n-valued Łukasiewicz logic and corresponding to it n-valued Kripke model in immune system.

Woodger (1937), Rashevsky (1972) and Rosen (1958a, 1958b) later on proposed to discuss problems of biology with precision of statements and reliability of reasoning thereby they have an attempt to study a system of biology by means of a logic (an axiomatic formal system). Rashevsky has founded relational biology that is the study of biology from the standpoint of definition of relations between the parts of a biological system. An analysis of the biological system as the immune system by relational system using multi-modal epistemic Łukasiewicz logics is given in Di Nola et al. (2015), where an estimation of statements and corresponding reasoning is given in three gradations: true, unknown and false. Notice, that the classical multi-modal epistemic logic for multi-agent systems was developed by Porter in (2003).

We study logical system and their semantics—relational systems (Kripke frames), with application for immune system. In turn, the immune system consists of special kind of interacting, well-educated and clever T cells, which afterwards is predetermined on their behaviour. So, their behaviour depends on so far as T cells possess full knowledge (information) about the environment and other T cells. The immune system is the body’s defence against infectious organisms and other invaders. Typically, each cell has a local state that is a function of its initial state, the messages received from other cells, observations of the external environment and possible internal actions.

Our basic aim is to give to immunologists some useful tools for diagnosis about a state of immune system having some initial data. These data represent some properties, which may estimate, that possess some parts of an immune system, in particular some T cells being fundamental elements of the immune system.

### A fragment of an immune system as a Kripke Frame

In this section, we try to represent some simple fragment of an immune system by n-valued Kripke frame with the following interpretation in immune models that is different, but similar, which has given in Di Nola et al. (2015).

Now we give a naive definition of immune system ImS. An immune system ImS is a set of T cells with some actions between them. Identifying T cell with possible world and an action between T cells with the relation between T cells we can represent an immune system ImS as a n-valued descriptive Kripke frame. A visual presentation as descriptive Kripke frames represented as an immune system can be found in Di Nola et al. (2015). We are interested in finite fragment of immune system $$\mathrm{FragmImS}$$.

$$\mathrm{FragmImS} = (S,Q)$$, where $$S = \{Th0, Th1, Th2, Th17, TC,$$ $$\mathrm{Memory}\, T, NKT, NK, \mathrm{Phag. cells}, B, APC\}$$, forms a fragment of immune system with communication between its members which is expressed by some reflexive and transitive binary relation Q pointed out in Fig. 1. In the sequel, we assume that the binary relation Q is reflexive and transitive. More precisely, for example, the arrow from Th0 to Th1, which is meant as action from Th0 to Th1, is translated as $$(Th0, Th1) \in Q$$, and loop, say, from Th0 to Th0, which is meant as action from Th0 to Th0, is translated as $$(Th0, Th0) \in Q$$.

Now we will give some representation of a fragment of an immune system by Kripke frame. Let $$\mathfrak {J} = (W,R)$$ be n-valued Kripke frame, where $$R\subset W\times W$$ is a binary reflexive and transitive relation on finite set W (called the accessibility relation between possible words from W). By representation of an immune system $$FragmImS = (S,Q)$$ by Kripke frame $$\mathfrak {J} = (W,R)$$, we mean a bijective function $$\varphi : S \rightarrow W$$ such that $$(t_1,t_2)\in Q \Rightarrow (\varphi (t_1),\varphi (t_2))\in R$$. So, in the sequel, we identify immune system with corresponding Kripke frame.

### The modal aspects of immune system

Given a n-valued Kripke frame $$\mathfrak {J}$$ which is a representation of a fragment of the immune system, then we consider some immune system, represented by the Kripke frame $$\mathfrak {J} = (W,R)$$, where W is a finite set of T cells, and let $$\mathfrak {M }= (\mathfrak {J}, e)$$ be a n-valued Kripke model and $$e : Var \times W \rightarrow S_n$$. Representing a Kripke frame as a set of T cells, in addition we can interpret a propositional variable $$p\in Var$$ as a sentence about the T cell $$w \in W$$, for example, saying some concentration of some unit which can be one of characteristics of the T cell. The value e(pw) expresses how much p fits a certain property of w.

We say that $$w\in W$$, where W is a finite set of T cells, is p-activated if $$e(p,w)=1$$ , it is not p-activated if $$e(p,w) =0$$, it is p-activated in some degree $$s\in S_n$$ if $$e(p,w) \in S_n - \{0,1\}$$. Note that for $$w\in W$$ there are finitely many different ways to be p-activated for a cell w. So, for evaluation e we have the set of points of W (i.e. the set of T cells) such that part of them is activated, part of them is not activated and part of them is activated in some degree.

A function $$S: W \rightarrow S_n$$ is named a state function (or simply state) if for every $$w,w' \in W$$ it holds

$$(w,w')\in R \Rightarrow (S(w)=1 \Rightarrow S(w')=1).$$

Let $$e:\mathrm{Var} \times W \rightarrow S_n$$ be an evaluation. A formula $$\varphi$$ defines a function $$S^{e}_{\varphi }: W \rightarrow S_n$$, such that $$S_{\varphi }^{e}(w)= e(w,\varphi )$$. We say that a formula $$\varphi$$ is labelled by the evaluation e if $$S^{e}_{\varphi }$$ is an immune state function and denote such kind of function by $$S_{\varphi }^e$$. The process of transformation Act of one immune state function $$S_1 \ (= S^{e_1}_{\varphi }$$) to an another immune function $$S_2 \ ( = S^{e_2}_{\varphi }$$) will be named “$$\varphi$$-$$\mathrm{activation}$$”. So, for a formula $$\varphi$$ a transferring of the immune state function $$S^{e_1}_{\varphi }$$ to the immune state function $$S^{e_2}_{\varphi }$$ is a $$\varphi$$-activation of points of W.

We described an immune system as a Kripke Frame. It means that by Kripke frame we capture just the relational structure of an immune system.

This representation of immune system neglects some information about the immune system, that is some knowledge on the points w are not represented. So to recover such information we give the notion of immune system state function (or simply immune state function of an immune system). This is done by a function S defined on all possible worlds to $$S_n$$. Of course, S satisfies some suitable conditions, which are essentially compatibility conditions with respect to the relational structure of the immune system. In this way, we have a more faithful representation of the knowledge about the given immune system. It is reasonable to think that to get the value S(w) it is needed some laboratory job (experiment). We plan mathematically to study the set of all immune states. Our aim is to help the immunologist to have a formal and canonical way to explore the possible immune state (function) of an immune system. We have a variety of immune state functions. Roughly speaking, we have any allocation of the elements of $$S_n$$ with any elements of W. But we need the allocations which are compatible with n-valued Kripke frame. So we single out such kind of immune state functions which are defined by some logical formulas, say $$\varphi$$, and an evaluation e is denoted as $$S_{\varphi }^e$$.

Since to an immune system, as defined in the paper, can be associated a logic which is complete with respect to certain Kripke frames, and since immune system representation gives us a Kripke Frame, we use formulas of the logic of our Kripke Frame immune system, to define some immune states of the immune system. Actually we use a formula $$\varphi$$ and an evaluation e of $$\varphi$$, in the following way: $$S_{\varphi }^{e}(w)=e(\varphi , w)$$.

It is worth to note that a single formula $$\varphi$$ essentially represents a set of immune states, actually all such states defined by $$S_{\varphi }^{e}$$ when e varies in the set of all evaluations. In this way, a given formula represents a collection of immune states of the immune system. It could be of interest to explore the possibility to check whether given a collection of immune states we can find a formula representing such a collection.

We defined the activation function Act as a function defined on the set of all immune system states with value in the same set. This is a way to represent how changes the immune system information after, say an experiment, that produces new information about the immune state values of all points w. To know facts about the function Act means to know facts about possible variations of the immune state of the system, and to check whether these variations can be described by formulas.

Let us consider the second concrete simple example of representation of immune system as Kripke frame (Fig. 2). Let $$\mathfrak {J} = (W,R)$$ be n-valued Kripke frame, where $$W = \{Treg, Th1, Th2, \mathrm{Teff}\}$$, $$R\subset W\times W$$ is a binary reflexive and transitive relation on finite set W such that $$R= \{(\mathrm{Treg,Treg}), (Th1, Th1), (Th2,Th2), (\mathrm{Teff,Teff}),$$ $$(\mathrm{Treg},Th1), (\mathrm{Treg},Th2),$$ (Th1, Th2), (Th2, Th1), (Th1,  $$\mathrm{Teff}), (Th2,\mathrm{Teff}), (\mathrm{Treg,Teff}), (\mathrm{Treg,Teff})\}$$. For simplicity denote Treg, Th1, Th2, Teff as $$w_1. w_2, w_3, w_4$$, respectively. It is easy to check that all the axioms of the logic $$ID{\L }_n$$ are valid in this frame. The formula $$\Box (p \rightarrow q) \rightarrow (p \rightarrow q)$$, which is a theorem of the logic $$ID{\L }_n$$, is valid in the presented frame.

One of the main aims of immunotherapy of, say, Allergic Disease is to get the tolerance of patients to allergens and it is based on activation of Treg cells which will control the peripheral tolerance of the immune system. Regulatory T cells will Inhibit the Th2 pathway and other antigen-specific T effector cells ($$CD8+ T$$ cells). Mechanisms of inhibition allergic reactions by regulatory T cells are different and scientific knowledge is not enough to describe all of them on molecular level. The types of Treg influence on T effector (Teff) and relations between them are different.

There is the group of different kinds of cytokines, which belongs to Th2/Th1 profile and they act by different ways in activation of Th2/Th1 response. One of the aims of many researches could be the assessment of the role of the different Th2/Th1 cytokines ($$IL-3, IL-4, IL-5, IL-9, IL-13$$, etc.) in Allergic reactions. It is possible to estimate the concentration of cytokines in Th2/Th1, which in turn can be estimated as some element of $$S_n$$. This is one of the actual problems of immunotherapy and has a practical issue in applied bioscience and biotechnology. We attempt to make some practical recommendations based on our received results for partial solution of some problems of immunotherapy.

## Conclusion and perspectives

We have introduced the new logic $$ID{\L }_n$$ adequate semantics of which are special relational systems named n-valued Kripke frames. In other words, we have proven completeness theorem, i.e. a formula $$\alpha$$ of $$ID{\L }_n$$ is a theorem of $$ID{\L }_n$$ iff it is modally valid. Moreover, we represent some immunological systems as relational systems. More precisely, we show that some immunological systems, described as relational systems, are Kripke Models of the logic we have presented. This means that theorems in our logic are true in the model of immune system and that we can set some conjecture on the model, which at the moment is not clear to immune scientists, and try to prove it as a theorem, or disprove it.

After sending activated signals, it can be known that T cells are either activated or activated in some degree. If we know that the T cell is activated, then we evaluate this one by 1; if we know that the T cell is not activated, then we evaluate this one by 0; if we know that the T cell is quasi-activated then we evaluate this one by $$s \in S_n - \{0,1\}$$. After sending activated signal second time to the T cell which is known that it is not quasi-activated, then it is evaluated by 0. That is the reason why we choose $${\L }$$ukasiewicz logic where the strong conjunction & is not idempotent, i.e. $$\alpha \& \alpha$$ is not equivalent to $$\alpha$$.

So, if we have a theorem $$\varphi$$ (which is a proposition) of the immune dynamic n-valued $${\L }$$ukasiewicz logic, then any evaluation in any immune system, represented as a n-valued Kripke model, is equal to 1.

Summarizing the analysis given above we have the following picture. An immune system ImS is represented as a descriptive n-valued Kripke frame with immune system information. This immune system information is expressed by immune state function S. So, having some formula $$\varphi$$ we define a collection of immune states which is defined by an immune function $$S_{\varphi }^e$$. In the perspective, it will be interesting to find a corresponding formula for some immune system state and to construct an algorithm solving the problem of validity (to be 1-tautology), which is very important for immune systems.

## Notes

1. $$MV_n$$-algebras where introduced by Grigolia in Grigolia (1977). The variety $$\mathbf {MV_n}$$ of $$MV_n$$-algebras is a subvariety of the variety $$\mathbf {MV}$$ of MV-algebras introduced by Chang in Chang (1958).

2. A function f is additive if $$f(x \vee y) = f(x) \vee f(y)$$

## References

• Birkhoff G, Lipson JD (1970) Heterogeneous algebras. J Comb Theor 8:115–133

• Chang CC (1958) Algebraic analysis of many-valued logics. Trans Am Math Soc 88:467–490

• Di Nola A, Grigolia R (2004) On monadic MV: algebras. APAL 128:125–139

• Di Nola A, Grigolia R, Mitskevich N (2015) Multimodal epistemic Łukasiewicz logics with application in immune system. Soft Comput 19(11):3341–3351

• Di Nola A, Grigolia R, Mitskevich N, Vitale G (2020) Dynamic Lukasiewicz logic and dynamic M-algebras. Int J Approx Reason 124:103–110

• Fischer MJ, Ladner RE (1979) Propositional dynamic logic of regular programs. JCSS 18(2):194

• Grätzer G (1979) Universal algebra. Springer, New York

• Grigolia R (1977) Algebraic analysis of Lukasiewicz-Tarski n-valued logical systems, Selected papers on Lukasiewicz Sentential Calculi. Wroclaw 81–91

• Hansoul G, Teheux B (2006) Completeness results for many-valued Łukasiewicz modal systems and relational semantics. Available at arXiv:math/0612542

• Kozen D (1979) A representation theorem for models of *-free PDL, Technical Report RC7864, IBM, September

• Kozen D, Parikh R (1981) An elementary proof of the completeness of PDL. Theor Comput Sci 14:113–118

• Nemeti I (1982) Every free algebra in the variety generated by the representable dynamic algebras is separable and representable. Theor Comput Sci 17:343–347

• Pratt VR (1980) Dynamic algebras and the nature of induction. In: 12th ACM symposium on theory of computation, Los Angeles, April

• Rashevsky N (1972) Organismic sets. J.M. Richards Lab, Grosse-Pointe Park

• Rosen R (1958) A relational theory of biological systems. Bull Math Biophys 20:245–260

• Rosen R (1958) The representation of biological systems from the standpoint of the theory of categories. Bull Math Biophys 20:317–342

• Porter Timothy (2003) Geometric aspects of multiagent systems. Electronic Notes in Theoretical Computer Science 81, http://www.elsevier.nl/locate/entcs/volume81.html

• Segerberg K (1977) A completeness theorem in the modal logic of programs. Not AMS 24(6):A-522

• Segerberg K (1971) An essay in classical modal logic. PhD Thesis, Stanford University, May

• Teheux B (2014) Propositional dynamic logic for searching games with errors. J Appl Logic 12(4):377–394

• Woodger H (1937) The axiomatic method in biology. Cambridge University Press, Cambridge

## Funding

Open access funding provided by Università degli Studi di Salerno within the CRUI-CARE Agreement.

## Author information

Authors

### Corresponding author

Correspondence to Gaetano Vitale.

## Ethics declarations

### Conflict of interest

The authors declare that they have no conflict of interest.

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Di Nola, A., Grigolia, R., Mitskevich, N. et al. Dynamic Łukasiewicz logic and its application to immune system. Soft Comput 25, 9773–9780 (2021). https://doi.org/10.1007/s00500-021-05955-3

• Accepted:

• Published:

• Issue Date:

• DOI: https://doi.org/10.1007/s00500-021-05955-3

### Keywords

• Dynamic logic
• Łukasiewicz logic
• Immune system
• Kripke semantics
• MV-algebra