SciELO - Scientific Electronic Library Online

 
vol.25 número2Resolución de anáfora directa basada en conocimiento para pronombres definitivosDeep Neural Network for Musical Instrument Recognition Using MFCCs índice de autoresíndice de materiabúsqueda de artículos
Home Pagelista alfabética de revistas  

Servicios Personalizados

Revista

Articulo

Indicadores

Links relacionados

  • No hay artículos similaresSimilares en SciELO

Compartir


Computación y Sistemas

versión On-line ISSN 2007-9737versión impresa ISSN 1405-5546

Comp. y Sist. vol.25 no.2 Ciudad de México abr./jun. 2021  Epub 11-Oct-2021

https://doi.org/10.13053/cys-25-2-3936 

Articles

Modeling and Verification Analysis of Ecological Systems via a First Order Logic Approach

Zvi Retchkiman Königsberg1  * 

1 Instituto Politécnico Nacional, Centro de Investigación de Computación, México. mzvi@cic.ipn.mx


Abstract

This paper addresses the modeling and verification analysis of the mutual relationships among plants, animals, and their environment. We start our study of mathematical ecology by considering the interaction of two species, one of which the predators eat the preys thereby affecting each other, such pairs exist throughout nature: fish and sharks, lions and gazelles, birds and insects, to mention some. Not all species form predator-prey relationships, we can also have the case of a two-species ecosystem in which both species compete for the same limited source of nutrients. If two competitors try to occupy the same realized niche, one species will try to eliminate the other. Therefore, two instances are worth to be considered. On the one hand, there is a need to cooperate sharing part of the resource so that both organisms will benefit from it. On the other hand, if one of the two species is stronger than the other, there will be no cooperation and the strongest species will impose its conditions. In this work, the ecological interaction system between species is modeled as a formula of the first order logic. Then, using the concept of logic implication, and transforming this logical implication relation into a set of clauses, called Skolem standard form, qualitative methods for verification as well as performance issues, for some queries, are applied. Mathematics Subject Classification: 08A99, 93D35, 93D99, 39A11.

Keywords: Ecological systems; predator-prey system; biological competition system; cooperation; non-cooperation; first order logic; model; verification; unsatisfiability; refutation methods

1 Introduction

Consider the interaction of populations, in which there are exactly two species, one of which the predators eat the preys thereby affecting each other. Such pairs exist throughout nature: fish and sharks, lions and gazelles, birds and insects, to mention some. Not all species form predator-prey relationships, we can also have the case of a two-species ecosystem in which both species compete for the same limited source of nutrients. If two competitors try to occupy the same realized niche, one species will try to eliminate the other.

In other words, competition better defined as interaction occurs when the capability of the environment to supply resources is smaller than the potential biological requirement so that organisms interfere with each other. Plants, for example, often compete for access to a limited supply of nutrients, water, sunlight, and space. Therefore, two species cannot indefinitely coexist if they are limited by the same resource. If two competitors try to occupy the same realized niche, one species will try to eliminate the other [1]. Therefore, two instances are worth to be considered. On the one hand, there is a need to cooperate sharing part of the resource so that both organisms will benefit from it. On the other hand, if one of the two species is stronger than the other, there will be no cooperation and the strongest species will impose its conditions.

In the study of this type of problems, Lotka-Volterra models as well as evolutionary game theory concepts have been used [3], [4].

This paper proposes a well defined syntax modeling and verification analysis methodology which consists in representing the ecological interaction system as a formula of the first order logic. Then, using the concept of logic implication, and transforming this logical implication relation into a set of clauses, called Skolem standard form, qualitative methods for verification (validity) as well as performance issues, for some queries, are addressed. The method of Putnam-Davis based on Herbrand theorem for testing the unsatisfiability of a set of ground clauses as well as the resolution principle due to Robinson, which can be applied directly to any set of clauses (not necessarily ground clauses), are invoked. The paper is organized as follows. In section 2, a first order background summary is given. In section 3, the Putnam-Davis rules and the resolution principle for unsatisfiability, are recalled. In section 4, the predator-prey problem is addressed. In section 5, the biological competition problem is considered. The cooperative and non cooperative cases are considered. Finally, the paper ends with some conclusions.

2 First Order Logic Background

This section presents a summary of the first order logic theory. The reader interested in more details is encouraged to see [5], [7], [6].

Definition 1 A first-order language L is an infinite collection of distinct symbols, no one of which is properly contained in another, separated into the following categories: parentheses, connectives, quantifiers, variables, equality symbol, constant symbols, function symbols and predicate symbols.

Definition 2 Terms are defined recursively as follows: (i). A constant is a term,(ii). A variable is a term.(iii). If f is an nth-place function symbol, and t1, t2,..., tn are terms, then f (t1, t2,..., tn) isa term.(iv). All terms are generated by applying the above rules.

Definition 3 If P is an nth-place predicate symbol, and t1, t2,..., tn are terms, then p(t1, t2,..., tn) is an atom. No other expressions can be atoms.

Definition 4 An occurrence of a variable in a formula is bound if and only if the occurrence is within the scope of a quantifier employing the variable, or is the occurrence in that quantifier. An occurrence of a variable in a formula is free if and only if this occurrence of the variable is not bound.

Definition 5 A variable is free in a formula if at least one occurrence of it is free in the formula. A variable is bound in a formula if at least one occurrence of it is bound.

Definition 6 Well-formed formulas, or formulas for short, in the first-order logic are defined recursively as follows:(i). An atom is a formula, (ii). If F and G are formulas then, ⁓ (F), (F ˅ G), (F ˄ G), and (FG) are formulas. (iii). If F is a formula and x is a free variable in F, then (∀x) F and (∃x) F are formulas. (iv). Formulas are generated only by a finite number of applications of (i), (ii), and (iii).

Definition 7 An interpretation I of a formula F in the first-order logic consists of a nonempty domain D, and an assignment of "values" to each constant, function symbol, and predicate symbol occurring in F as follows: (1). To each constant, we assign an element in D, (2). To each nth-place function symbol, we assign a mapping from Dn to D, (3). To each nth-place predicate symbol, we assign a mapping from Dn to T, F, where T means true and F means false.

Remark 8 Sometimes to emphasize the domain D, we speak of an interpretation of the formula over D. When we evaluate the truth value of a formula in an interpretation over the domain D, (∀x) will be interpreted as "for all elements in D," and (∃x) as "there is an element in D. For every interpretation of a formula over a domain D, the formula can be evaluated to T or F according to the following rules: (1). If the truth values of formulas G and H are evaluated, then the truth values of the formulas ⁓ (F), (F ˅ G), (F ˄ G), (FG), and (FG) are evaluated according to the well known formulas of propositional calculus ([5]. (∀x)G is evaluated to T if the truth value of G is evaluated to T for every dD; otherwise, it is evaluated to F, (3). (∃x)G is evaluated to T if the truth value of G is T for at least one dD; otherwise, it is evaluated to F .We note that any formula containing free variables cannot be evaluated.

Definition 9 A formula G is consistent (satisfiable) if and only if there exists an interpretation I such that G is evaluated to T in I. If a formula G is T in an interpretation I, we say that I is a model of G and I satisfies G.

Definition 10 A formula G is inconsistent (unsatisfiable) if and only if there-exists no interpretation I that satisfies G.

Definition 11 A formula G is valid if and only if every interpretation of G satisfies it.

Definition 12 A formula G is a logical implication of formulas F1, F2, ..., Fn if and only if for every interpretation I, if F1, F2, ..., Fn is true in I, G is also true in I.

The following characterization of logical implication plays a very important role as will be shown in the rest of the paper.

Theorem 13 Given formulas F1, F2,..., Fn and a formula G, G is a logical implication of F1, F2,..., Fn if and only if the formula ((F1˄ F2 ˄..., ˄ Fn) → G) is valid if and only if the formula (F1 ˄ F2 ˄ ... ˄ Fn ˄ ⁓ (G)) is inconsistent.

Definition 14 A formula F in the first-order logic is said to be in a prenex normal if and only if is in the form of (Q1x1)(Q2x2) ... (Qnxn) (M) where every Qixi, i = 1,2, ..., n is eitherxi orxi, and M is a formula containing no quantifiers. (Q1x1)(Q2x2) ... (Qnxn) is called the prefix and M is called the matrix of the formula F.

Next, given a formula F, the following procedure transforms F into a prenex normal form. (1) Eliminate → and ↔, (2) Move ⁓, (3) Rename variables and (4) Pull quantifiers.(details are provided in [7]).

Let a formula F be already in a prenex normal form i.e., (Q1x1) (Q2x2) (Qnxn) (M), where M is in a conjunctive normal form CNF (a finite conjunction of clauses, see next definition). Suppose Qi is an existential quantifier in the prefix. If no universal quantifier appears before Qi, we choose a new constant c different from other constants occurring in M, replace all xi appearing in M by c and delete Qixi from the prefix. If (Q1x1) (Q2x2) (Qkxk) (l ≤ k < i) are all the universal quantifiers appearing before Qixi, we choose a new k-place function symbol f different from other function symbols in M, replace all xi in M by f(x1, x2, ..., xk) delete Qixi from the prefix. After the above process is applied to all the existential quantifiers in the prefix, the last formula we obtain is called a universal form, or Skolem standard form, of the formula F. The constants and functions used to replace the existential variables are called Skolem functions.

Remark 15 It is important to point out that universal forms are not unique.

Definition 16 A clause is a finite disjunction of zero or more literals (atoms or negation of atoms).

When it is convenient, we shall regard a set of literals as synonymous with a clause. A clause consisting of r literals is called an r-literal clause. A one-literal clause is called a unit clause. When a clause contains no literal, we call it the empty clause, denoted by □. Since the empty clause has no literal that can be satisfied by an interpretation, the empty clause is always false. The importance of transforming a formula F in to its universal form results evident, thanks to the next result.

Theorem 17 Let S be a set of clauses that represents a universal form of a formula F. Then F is inconsistent if and only if S is inconsistent.

By definition, a set S of clauses is unsatisfiable if and only if it is false under all interpretations over all domains. Since it is inconvenient and impossible to consider all interpretations over all domains, it would be nice if we could fix on one special domain H such that S is unsatisfiable if and only if S is false under all the interpretations over this domain. Fortunately, there does exist such a domain, which is called the Herbrand universe of S, defined as follows.

Definition 18 Let H0 be the set of constants appearing in S. If no constant appears then, H0 is to consist of a single constant, say H0 = a. For i = 0, l, 2, ... let Hi+1 be the union of Hi, and the set of all terms of the form f(t1, t2, ..., tn) for all n-place functions f occurring in S, where tj = l, 2, ...n are members of the set Hi. Then each Hi is called the i-level constant set of S, and H, is called the Herbrand universe of S.

Definition 19 Let S be a set of clauses. The set of ground atoms of the form P(t1, t2, ..., tn) for all n-place predicates P occurring in S, where t1, t2, ..., tn are elements of the Herbrand universe of S, is called the atom set, or the Herbrand base of S. A ground instance of a clause C of a set S of clauses is a clause obtained by replacing variables in C by members of the Herbrand universe of S.

We have seen that the problem of logical implication is reducible to the problem of satisfiability, which in turn is reducible to the problem of satisfiability of universal sentences. Next, Herbrand's theorem is presented, which states that to test whether a set S of clauses is unsatisfiable, we need consider only interpretations over the Herbrand universe of S. This can be used together with algorithms for unsatisfiability (Davis Putnam rules discussed in section 3) to develop procedures for this purpose.

Theorem 20 Let a formula F be already in a prenex normal form i.e., (Q1x1) (Q2x2) (Qnxn) (M), where M is in a conjunctive normal form CNF and contains no quantifiers, i.e., is universal. Let H be the Herbrand universe of S (with S the set of clauses that represents the universal form of F). Then F is unsatisfiable if and only there is a finite unsatisfiable set S of ground instances of clauses of S.

Remark 21 Herbrand's theorem suggests a refutation procedure: that is, given an unsatisfiable set S of clauses to prove, if there is a mechanical procedure that can successively generate sub-sets S1, S2... of ground instances of clauses in S and can successively test S1, S2... for unsatisfiability, then, as guaranteed by Herbrand’s theorem, this procedure can detect a finite n such that Sn is unsatisfiable, otherwise it will continue forever i.e., it is undecidable.

3 Unsatisfiability Methods

3.1 Davis and Putnam Rules [7]

Davis and Putnam introduced a method for testing the unsatisfiability of a set of ground clauses, therefore it is immediately applicable to a set of clauses S considering interpretations over the Herbrand universe. Their method consists of the following rules: (1) Delete all the ground clauses from S that are tautologies. The remaining set Ś is unsatisfiable if and only if S is, (2) If there is a unit ground clause L in S, obtain Ś from S by deleting those ground clauses in S containing L. If Ś is empty then, S is satisfiable, otherwise obtain a set Ś by deleting ⁓ (L) from Ś.

Ś is unsatisfiable if and only if S is, (3) A literal L in a ground clause of S is said to be pure in S if and only if the literal ⁓ (L) does not appear in any ground clause in S. If a literal L is pure in S, delete all the ground clauses containing L. The remaining set Ś is unsatisfiable if and only if S is, (4) If the set S can be written as: (A1 ˅ L) ˄ (A2 ˅ L)...(Am ˅ L) ˄ (B1 ˅ ⁓ L) ˄ (B2 ˅ ⁓ L) ... (Bm ˅ ⁓ L) ˄ R where Ai, Bi and R are free of L andL then, obtain the sets S1 = A1 ˄ A2 ... Am ˄ R and S2 = B1 ˄ B2... Bm ˄ R. S is unsatisfiable if and only if both, S1S2 are.

3.2 The Resolution Principle [2]

The procedure introduced by Davis and Putnam relies on Herbrand's theorem which has one major drawback: It requires the generation of sets S1, S2 ... of ground instances of clauses. For most cases, this sequence grows exponentially. We shall next introduce the resolution principle due to Robinson, a more efficient method than Davis and Putnam procedure. It can be applied directly to any set S of clauses (not necessarily ground clauses) to test the unsatisfiability of S.

Resolution is a sound and complete algorithm, i.e., a formula in clausal form is unsatisfiable if and only if the algorithm reports that it is unsatisfiable. Therefore it provides a consistent methodology free of contradictions. However, it is not a decision procedure because the algorithm may not terminate.

Definition 22 A substitution is a finite set of the form {t1/v1, t2/v2,..., tn/vn}, where every vi is a variable, every ti, is a term different from vi. When the ti are ground terms, the substitution is called a ground substitution. The substitution that consists of no elements is called the empty substitution and is denoted by ϵ.

Definition 23 Let θ = {t1/x1, t2/x2, ..., tn/xn} and λ = {u1/y1, u2/y2, ..., um/ym} be two substitutions. Then the composition of θ and λ is the substitution, denoted by θ ○ λ, that is obtained from the set {t1λ/x1, t2λ/x2,..., tnλ/xn, u1/y1, u2/y2,..., um/ym} by deleting any element tjλ/xj for which tjλ = xj, and any element ui/yisuch that yi is among x1, x2, ..., xn.

Definition 24 A substitution θ is called a unifier for a set E1, E2,..., En if and only if E1θ = E2θ = ..., Enθ The set {E1, E2, ..., En} is said to be unifiable if there is a unifier for it.

Definition 25 A unifier σ foraset E1, E2,..., En of expressions is a most general unifier if and only if for each unifier θ for the set there is a substitution λ such that θ = σ ○ λ.

Definition 26 If two or more literals (with the same sign) of a clause C have a most general unifier σ, then Cσ is called a factor of the clause C. If Cσ is a unit clause, it is called a unit factor of C.

Definition 27 Let C1 and C2 be two clauses (called parent clauses) with no variables in common. Let L1 and L2 be two literals in C1 and C2, respectively. If L1 and ⁓ (L2) have a most general unifier σ, then the clause (C1σ -L1σ) ∪ (C2σ - L2σ) is called a binary resolvent of C1 and C2 . The literals L1 andL2 are called the literals resolved upon.

Definition 28 A resolvent of (parent) clauses C1 and C2 is one of the following binary resolvents: (1) a binary resolvent of C1 and C2, (2) a binary resolvent of C1 and a factor of C2, (3) a binary resolvent of a factor of C1 and C2, (4) a binary resolvent of a factor of C1 and a factor of C2.

Definition 29 Given a set S of clauses, a deduction of C from S is a finite sequence of clauses C1, C2, ..., Cn such that each Ci, either is a clause in S or a resolvent of clauses preceding Ci ,, and Ck = C. A deduction of □ from S is called a refutation, or a proof of S.

The following result, called lifting lemma, plays a key role in the proof of the soundness and completeness theorem for the resolution procedure.

Lemma 30 If Ć1and Ć2 are instances of C1 and C2, respectively, and if Ć is a resolvent of Ć1 and Ć2 then there is a resolvent C of C1 and C2 such that Ć is an instance of C.

The main result of this subsection, the soundness and completeness theorem for the resolution procedure, is next presented.

Theorem 31 A set S of clauses is unsatisfiable if and only if there is a deduction of the empty clause from S.

Theorem 32 The set of unsatisfiable sentences is undecidable.

4 Predator-Prey System

Consider the interaction of populations, in which there are exactly two species, one of which the predators eats the other the preys thereby affecting each other’s growth rates. Such pairs exist throughout nature: fish and sharks, lions and gazelles, birds and insects, to mention some. It is assumed that, the predator species is totally dependent on a single prey species as its only food supply, the prey has unlimited food supply, and that there is no threat to the pray other than the specific predator.

The predator-prey system behavior is described as follows: (1) States: S: preys are safe, D: the preys are in danger, B: the preys are being eaten, I: the predators are idle, L: the predators are in search for a prey, CL: the predators continue searching for a prey, A: the predators attack a prey, F: the predator has finished eating the prey, P: the predator dies; (2) Rules of Inference: (a) if S and L then CL, (b) if S and CL then P, (c) if D and (L or CL) then A, (d) if A then B, (e) if B then F (f) if F then I, (g) if I then L.

Therefore, by associating variables to the states, we can define the following predicates: S(x) : x is a safe prey, D(x) : the prey x is in danger, B(x, y) : the prey x is being eaten by predator y, I(x): the predator x is idle, L(x, y) : the predator y is in search for a prey x, CL(x, y) : the predator y continues searching for a prey x, A(x, y) : the predator y attacks prey x, F(x, y) : the predator y has finished eating prey x, P(x) : the predator x passed away.

Remark 33 The main idea consists of: the predator-prey behavior is expressed by a formula of the first order logic, some query is expressed as an additional formula. The query is assumed to be a logical implication of the predator-prey formula (see theorem 13). Then, transforming this logical implication relation into a set of clauses by using the techniques given in section 2, its validity can be checked. Even more using the resolution principle, unifications done during the procedure provide answers to some specific queries. The domain D of the interpretation will be considered to be formed by a set of predators and a set of preys.

The formula that models the predator-prey behavior turns out to be:

xySxLx.yCLx,yxySxCLx.yPyxyDxLx,yCLx,yAx,yxyAx,yBx,yxyBx,yFx,yxyFx,yIyxyIyLx,y. (1)

We are interested in verifying the following statements:

(S1) Claim: If D and (L or CL) then B. Specifically, we want to know if there is prey p such that the following formula is a logical implication of equation 1: (∃p)(∀q)(D(p) ˄ (L(p, q) ˅ CL(p, q))) → B(p, q)).

The set of clauses for this case is given by:

S=SxLxyCLx.y,SxCLx,yPy,Dc1Lc1,zAc1,z,Dc2CLc2,wAc2,w,Ac3,uBc3,u,Bc4,vFc4,v,Fc5,rIr,IsLc6,s,Dp,Lp,fpCLp,fp,Bp,fp.

Then a resolution refutation proof, with its required substitutions, is as follows:

(a)

p=c1,Lc1,zAc1,zz=u,c3=c1,Lc1,zBc1,zp=c1,z=fp,Lc1,fpp=c1,CLc1,fp.

(b)

p=c2,CLc2,wAc2,ww=u,c2=c3,CLc2,wBc2,wp=c2,z=fp,CLc2,fp.

Now, from the last two equations of (a) and (b), setting c2 = c1, we get a proof of S i.e.

Therefore we can conclude that: we not only have proved that the claim is true, but we have computed a value for p, p = c1 = c2 = c3. which tell us that the same prey that has been attacked, it has to be the same that is being eaten, and not another one, otherwise, the refutation procedure fails. This result is consistent with reality.

(S2) Claim: if D and (L or CL) then I. Specifically, we want to know if there is prey p such that the following formula is a logical implication of equation 1: (∃p)(∀q)(D(p) ˄ (L(p, q) ˅ CL(p, q))) → I(q)).

The set of clauses for this case is given by:

S=SxLx.yCLx.y,SxCLx,yPy,Dc1Lc1,zAc1,z,Dc2CLc2,wAc2,w,Ac3,uBc3,u,Bc4,vFc4,v,Fc5,rIr,IsLc6,s,Dp,Lp,fpCLp,fp,Iq.

Then a resolution refutation proof, with its required substitutions, is as follows:

(a) r=q,Fc5,qc5=c4,q=v,Bc4,v from (a) of (S1) we know Lc1,zBc1,z therefore c1=c4,v=z,Lc1,zp=c1,z=fp,CLc1,fp.

(b) r=q,Fc5,qc5=c4,q=v,Bc4,v from (b) of (S2) we know CLc2,wBc2,w therefore c2=c4,v=w,CLc2,w.

Now, from the last two equations of (a) and (b), setting c2 = c1, w = f(p), we get a proof of S i.e. Therefore, the claim holds for p = c1 = c2 = c3 = c4 = c5, and the same conclusion given in (S1) extrapolates for this case.

5 The Biology Competition Problem

5.1 The Cooperative Case

Consider the biological cooperative competition problem among organisms of the same or different species associated with the need for a common resource that occurs in a limited supply relative to demand. In other words, competition better defined as interaction occurs when the capability of the environment to supply resources is smaller than the potential biological requirement so that organisms interfere with each other. Plants, for example, often compete for access to a limited supply of nutrients, water, sunlight, and space.

Therefore, two species cannot indefinitely coexist if they are limited by the same resource. If two competitors try to occupy the same realized niche, one species will try to eliminate the other [1]. Therefore, there is a need to cooperate sharing part of the resource so that both organisms will benefit from it.

The biological cooperative competition system behavior is described as follows: (1) States: S: resources are safe, D: the resources are in danger, B: the resources are being eaten, I1, I2: the organisms are inactive, L1, L2: the organisms are in search for a resource, CL1, CL2: the organisms continue searching for a resource, A1, A2: the organisms attack the resource, F1, F2: the organisms have finished eating the resource, P1, P2: the organisms die; (2) Rules of Inference: (a) if S and L1 and L2 then CL1 and CL2, (b) if S and CL1 and CL2 then P1 and P2, (c) if D and ((L1 or CL1) and not(L2 or CL2)) then A1 and not(A2), (d) if D and (not(L1 or CL1) and (L2 or CL2)) then not(A1 ) and A2, (e) if A1 and not(A2) then B1 and not(B2),(f) if not(A1) and A2 then not(B1) and B2, (g) if B1 and not(B2) then F1 and not(F2), (h) if not(B1) and B2 then not(F1) and F2, (i) if F1 and not(F2) then I1 and not(I2), (j) if not(F1) and F2 then not (I1 ) and I2,(k) if I1 and not(I2) then L1 and not(L2), (l) if not(I1) and I2 then not(L1) and L2.

Remark 34 It important to underline that the inference rules express the cooperative property of the biological competition system over the resource, where one organism takes control over part of the resource while the other one takes control over part of the rest. As a result there is no possible contradiction when two complementary rules execute at the same time. This cooperative competitive behavior differs from the strictly competitive where there exists just one of the organisms (the winner) who takes completely control of the resource.

Therefore, by associating variables to the states, we can define the following predicates i = l, 2: S(x): x is a safe resource, D(x): the resource x is in danger, Bi(x, y) : the resource x is being eaten by the organisms y, Ii(x) : the organisms x are inactive, Li(x, y) : the organisms y is in search for a resource x, CLi(x, y): the organisms y continue searching for a resource x, Ai(x, y): the organisms y attack the resource x, Fi(x, y) : the organisms y have finished eating the resource x, Pi(x) : the organisms x passed away.

Remark 35 The main idea consists of: the biological cooperative competition system behavior is expressed by a formula of the first order logic. Then, after doing skolemitization i.e., obtaining a Skolem standard form, some query is expressed as an additional formula. The query is assumed to be a logical implication of the biological cooperative competition formula (see theorem 13). Then, transforming this logical implication relation into a set of clauses by using the techniques given in section 2, its validity can be checked. Even more using the resolution principle, unifications done during the procedure provide answers to some specific queries. The domain D of the interpretation will be considered to be formed by the two organisms and the resources.

The formula that models the biological cooperative competition system behavior turns out to be:

xySxL1x.yL2x.yCL1x,yCL2x.yxySxCL1x.yCL2x.yP1yP2yxyDxL1x,yCL1x,yL2x,yCL2x,yA1x,yA2x,yxyDxL1x,yCL1x,yL2x,yCL2x,yA1x,yA2x,yxyA1x,yA2x,yB1x,yB2x,yxyA1x,yA2x,yB1x,yB2x,yxyB1x,yB2x,yF1x,yF2x,yxyB1x,yB2x,yF1x,yF2x,yxyF1x,yF2x,yI1yI2yxyF1x,yF2x,yI1yI2yxyI1yI2yL1x,yL2x,yxyI1yI2yL1x,yL2x,y. (2)

We are interested in verifying the following statements:

(S1) Claim: If D and ((L1 or CL1) and not(L2 or CL2)) then B1 and not (B2). Specifically, we want to know if there is resource m such that the following formula is a logical implication of equation 2: mqDmL1m,qCL1m,qL2m,qCL2m,qB1m,qB2,m,q. The set of clauses for this case is given by: S=SxL1x.yL2x.yCL1x.y,SxL1x.yL2x.yCL2x.y,SxCL1x.yCL2x.yP1y,SxCL1x.yCL2x.yP2y,Dc1L1c1,zL2c1,zCL2c1,zA1c1,z,Dc1L1c1,zL2c1,zCL2c1,zA2c1,z,Dc1CL1c1,zL2c1,zCL2c1,zA1c1,z,Dc1CL1c1,zL2c1,zCL2c1,zA2c1,z,Dc2L2c2,tL1c2,tCL1c2,tA1c2,t,Dc2L1c2,tL2c2,tCL1c2,tA2c2,t,Dc2CL1c2,tL1c2,tCL2c2,tA1c2,t,Dc2CL1c2,tL1c2,tCL2c2,tA2c2,t,A1c3,sA2c3,sB1c3,s,A1c3,sA2c3,sB2c3,s,A2c4,dA1c4,dB1c4,d,A2c4,dA1c4,dB2c4,d,B1c5,jB2c5,jF1c5,j,B1c5,jB2c5,jF2c5,j,B2c6,hB1c6,hF1c6,h,B2c6,hB1c6,hF2c6,h,F1c7,rF2c7,rI1c7,F1c7,rF2c7,rI2c7,F2c8,kF1c8,kI1c8,F2c8,kF1c8,kI2c8,I1wI2wL1c9,w,I1wI2wL2c9,w,I2pI1pL1c10,p,I2pI1pL2c10,p,Dm,L1m,fmCL1m,fm,L2m,fm,CL2m,fm,B1m,fmB2m,fm.

Where, due the cooperation behavior the following conditions must be imposed: c1 ≠ c2, c3 ≠ c4, c5 ≠ c6, c7 ≠ c8 c9 ≠ c10.

Then a resolution refutation proof, with its required substitutions, is as follows:

(a)

m=c3,s=fc3,A1c3,fc3A2c3,fc3B1c3,fc3B1c3,fc3B2c3,fc3A1c3,fc3A2c3,fc3B2c3,fc3.

(b)

A1c3,fc3A2c3,fc3B2c3,fc3)A1c3,sA2c3,sB2c3,sA1c3,fc3A2c3,fc3.

(c)

m=c1,s=fc1,Dc1CL1c1,fc1L2c1,fc1CL2c1,fc1A2c1,fc1Dc1L2c1,fc1CL2c1,fc1CL1c1,fc1A2c1,fc1.

(d)

m=c1,s=fc1,Dc1L1c1,fc1L2c1,fc1CL2c1,fc1A2c1,fc1DmL2c1,fc1CL2c1,fc1L1c1,fc1A2c1,fc1.

(e)

m=c1L1c1,fc1A2c1,fc1L1c1,fc1CL1c1,fc1CL1c1,fc1A2c1,fc1.

(f)

CL1c1,fc1A2c1,fc1CL1c1,fc1A2c1,fc1A2c1,fc1.

(g)

m=c1,s=fc1,Dc1CL1c1,fc1L2c1,fc1CL2c1,fc1A2c1,fc1DmL2c1,fc1CL2c1,fc1CL1c1,fc1A1c1,fc1.

(h)

m=c1,s=fc1,Dc1L1c1,fc1L2c1,fc1CL2c1,fc1A1c1,fc1DmL2c1,fc1CL2c1,fc1L1c1,fc1A1c1,fc1.

(i)

L1c1,fc1A1c1,fc1L1c1,fc1CL1c1,fc1CL1c1,fc1A1c1,fc1.

(j)

CL1c1,fc1A1c1,fc1CL1c1,fc1A1c1,fc1A1c1,fc1.

Now, from (b) and (j) setting c1 = c3, we get:

(k)

A1c1,fc1A2c1,fc1A1c1,fc1A2c1,fc1.

Therefore, from the conclusion of (f) and (k), we get a proof of S i.e.

Therefore we can conclude that: we not only have proved that the claim is valid, but we have computed a value for m, m = c1 = c3, which tell us that the same resource that has been attacked, it has to be the same that is being eaten, and not another one, otherwise, the refutation procedure fails.

Remark 36 It is also true that the claim: If D and not(L1 or CL1 ) and (L2 or CL2) then not(B1) and B2 i.e., that the following formula is a logical implication of equation 2:wχDwL1w,χCL1w,χL2w,χCL2w,χB1w,χB2w,χ,getting w = c2= c4, The proof follows the same steps as the one provided, just changing names.

(S2) Claim: If D and ((L1 or CL1) and not(L2 or CL2)) then B1 and not(B2) and If D and not(L1 or CL1) and (L2 or CL2) then not(B1) and B2. Specifically, we want to show that the cooperative behavior of the organisms over the resource holds. Therefore, we want to prove that there exist m and w mw such that the following formula is a logical implication of equation 2: mqDmL1m,qCL1m,qL2m,qCL2m,qB1m,qB2w,χwχDwL1w,χCL1w,χL2w,χCL2w,χB1w,χB2w,χ.

The set of clauses for this case is given by: S=SxL1x.yL2x.yCL1x.y,SxL1x.yL2x.yCL2x.y,SxCL1x,yCL2x,yP1y,SxCL1x,yCL2x,yP2y,Dc1L1c1,zL2c1,zCL2c1,zA1c1,z,Dc1L1c1,zL2c1,zCL2c1,zA2c1,z,Dc1CL1c1,zL2c1,zCL2c1,zA1c1,z,Dc1CL1c1,zL2c1,zCL2c1,zA2c1,z,Dc2L2c2,tL1c2,tCL1c2,tA1c2,t,Dc2L1c2,tL2c2,tCL1c2,tA2c2,t,Dc2CL1c2,tL1c2,tCL2c2,tA1c2,t,Dc2CL1c2,tL1c2,tCL2c2,tA2c2,t,A1c3,sA2c3,sB1c3,s,A1c3,sA2c3,sB2c3,s,A2c4,dA1c4,dB1c4,d,A2c4,dA1c4,dB2c4,d,B1c5,jB2c5,jF1c5,j,B1c5,jB2c5,jF2c5,j,B2c6,hB1c6,hF1c6,h,B2c6,hB1c6,hF2c6,h,F1c7,rF2c7,rI1c7,F1c7,rF2c7,rI2c7,F2c8,kF1c8,kI1c8,F2c8,kF1c8,kI2c8,I1wI2wL1c9,w,I1wI2wL2c9,w,I2pI1pL1c10,p,I2pI1pL2c10,p,Dm,L1m,fmCL1m,fm,L2m,fm,CL2m,fm,B1m,fmB2m,fm,Dw,L2w,fwCL2w,fw,L1w,fw,CL1w,fw,B2w,fwB1w,fw.

Where, due to the cooperative behavior the following conditions must be imposed: c1c2, c3c4, c5c6, c7c8, c9c10.

Corollary 37 The proof follows from what was discussed in claim (S1) getting: m = c1 = c3, and w = c2 = c4, and since c1c2 and c3c4 i.e., mw claim (S2) results to be valid.

5.2 The Non Cooperative Case

Consider the biological competition problem among organisms in the case when one of the two species is stronger than the other, and as a consequence there is no need to cooperate and the strongest species finishes imposing its conditions.

The system behavior is described as follows: (1) States: S: resources are safe, D: the resources are in danger, B: the resources are being eaten, 11, I2: the organisms are inactive, L1, L2: the organisms are in search for a resource, CL1, CL2: the organisms continue searching for a resource, A1 , A2: the organisms attack the resource, F1, F2: the organisms have finished eating the resource, P1, P2: the organisms die; (2) Rules of Inference: (a) if S and L1 and L2 then CL1 and CL2, (b) if S and CL1 and CL2 then P1 and P2, (c) if D and (L1 or CL1) then A1 and not(A2), (d) if D and (not(L1 or CL1 ) and (L2 or CL2)) then not(A1) and A2, (e) if A1 then B1 and not(B2),(f) if not(A1) and A2 then not(B1) and B2, (g) if B1 then F1 and not(F2), (h) if not(B1) and B2 then not(F1 and F2, (i) if F1 then I1 and not(I2), (j) if not(F1) and F2 then not(I1) and 12, (k) if I1 then L1 and not(L2), (l) if not(I1 ) and I2 then not(L1) and L2.

Remark 38 It important to underline that the inference rules express the non cooperative property of the biological competition system over the resource, where one organism takes complete control over the resource while the other one gives up.

Therefore, by associating variables to the states, we can define the following predicates i = l, 2: S(x): x is a safe resource, D(x): the resource x is in danger, Bi(x, y): the resource x is being eaten by the organisms y, Ii(x): the organisms x are inactive, Li(x, y): the organisms y is in search for a resource x, CLi(x, y): the organisms y continue searching for a resource x, Ai(x, y): the organisms y attack the resource x, Fi(x, y): the organisms y have finished eating the resource x, Pi(x): the organisms x passed away.

The formula that models the biological non cooperative competition system behavior turns out to be:

xySxL1x.yL2x.yCL1x,yCL2x.yxySxCL1x.yCL2x.yP1yP2yxyDxL1x,yCL1x,yA1x,yA2x,yxyDxL1x,yCL1x,yL2x,yCL2x,yA1x,yA2x,yxyA1x,yB1x,yB2x,yxyA1x,yA2x,yB1x,yB2x,yxyB1x,yF1x,yF2x,yxyB1x,yB2x,yF1x,yF2x,yxyF1x,yI1yI2yxyF1x,yF2x,yI1yI2yxyI1yL1x,yL2x,yxyI1yI2yL1x,yL2x,y. (3)

We are interested in verifying the following statements:

(S1) Claim: If D and ((L1 or CL1) and (L2 or CL2)) then B1 and not(B2). Specifically, we want to know if there is resource m such that the following formula is a logical implication of equation 3: mqDmL1m,qCL1m,qL2m,qCL2m,qB1m,qB2w,q.

The set of clauses for this case is given by: S=SxL1x.yL2x.yCL1x.y,SxL1x.yL2x.yCL2x.y,SxCL1x,yCL2x,yP1y,SxCL1x,yCL2x,yP2y,Dc1L1c1,zA1c1,zCL1c1,z,Dc1L1c1,zCL1c1,zA2c1,z,Dc2L2c2,tL1c2,tCL1c2,tA1c2,t,Dc2L1c2,tL2c2,tCL1c2,tA2c2,t,Dc2CL1c2,tL1c2,tCL2c2,tA1c2,t,Dc2CL1c2,tL1c2,tCL2c2,tA2c2,t,A1c3,sB1c3,s,A1c3,sB2c3,s,A2c4,dA1c4,dB1c4,d,A2c4,dA1c4,dB2c4,d,B1c5,jF1c5,j,B1c5,jF2c5,j,B2c6,hB1c6,hF1c6,h,B2c6,hB1c6,hF2c6,h,F1c7,rI1c7,F1c7,rI2c7,F2c8,kF1c8,kI1c8,F2c8,kF1c8,kI2c8,I1wL1c9,w,I1wL2c9,w,I2pI1pL1c10,p,I2pI1pL2c10,p,Dm,L1m,fmCL1m,fm,L2m,fmCL2m,fm,B1m,fmB2m,fm.

Then a resolution refutation proof, with its required substitutions, is as follows:

(a)

m=c3,s=fc3,A1c3,fc3B1c3,fc3B1c3,fc3B2c3,fc3A1c3,fc3B2c3,fc3,A1c3,fc3B2c3,fc3A1c3,fc3B2c3,fc3A1c3,fc3.

(b)

m=c1,s=fc1Dc1L1c1,fc1A1c1,fc1CL1c1,fc1Dc1,L1c1,fc1CL1c1,fc1A1c1,fc1.

(c) Now, from the conclusions of (a) and (b) setting c1 = c3, the validity of (S1) follows: A1c1fc1A1c1,fc1

(S2) Claim: If D and ((L1 or CL1) and (L2 or CL2)) then F1 and not(F2). Specifically, we want to know if there is resource m such that the following formula is a logical implication of equation 3: mqDmL1m,qCL1m,qL2m,qCL2m,qF1m,qF2w,q.

The set of clauses for this case is given by: S=SxL1x.yL2x.yCL1x.y,SxL1x.yL2x.yCL2x.y,SxCL1x,yCL2x,yP1y,SxCL1x,yCL2x,yP2y,Dc1L1c1,zA1c1,zCL1c1,z,Dc1L1c1,zCL1c1,zA2c1,z,Dc2L2c2,tL1c2,tCL1c2,tA1c2,t,Dc2L1c2,tL2c2,tCL1c2,tA2c2,t,Dc2CL1c2,tL1c2,tCL2c2,tA1c2,t,Dc2CL1c2,tL1c2,tCL2c2,tA2c2,t,A1c3,sB1c3,s,A1c3,sB2c3,s,A2c4,dA1c4,dB1c4,d,A2c4,dA1c4,dB2c4,d,B1c5,jF1c5,j,B1c5,jF2c5,j,B2c6,hB1c6,hF1c6,h,B2c6,hB1c6,hF2c6,h,F1c7,rI1c7,F1c7,rI2c7,F2c8,kF1c8,kI1c8,F2c8,kF1c8,kI2c8,I1wL1c9,w,I1wL2c9,w,I2pI1pL1c10,p,I2pI1pL2c10,p,Dm,L1m,fmCL1m,fm,L2m,fmCL2m,fm,F1m,fmF2m,fm.

Then a resolution refutation proof, with its required substitutions, is as follows:

(a)

m=c3,s=fc3B1c3,fc3F1c3,fc3F1c3,fc3F2c3,fc3B1c3,fc3F2c3,fc3,B1c3,fc3F2c3,fc3,B1c3,fc3F2c3,fc3B1c3,fc3,B1c3,fc3A1c3,fc3B1c3,fc3A1c3,fc3.

(b) The rest of the proof follows straightforwardly from step (b) and (c) of (S1).

6 Conclusions

The main contribution of the paper consists in the study of Ecological systems by means of a formal reasoning deductive methodology based on first order logic theory. The Predator-Prey system as well as the Biological competition system, were considered. Cooperative and non cooperative cases were addressed. Verification (validity) as well as performance issues, for some queries were proved.

References

1. Gause, G.F. (1934). The struggle for existence. Baltimore: Williams and Wilkins. [ Links ]

2. Robinson, J.A. (1965). A machine-oriented logic based on the resolution principle. Journal of the ACM, Vol. 12, No. 1. DOI: 10.1145/321250.321253. [ Links ]

3. Weibull, J.W. (1977). Evolutionary game theory. The MIT press. [ Links ]

4. Haberman, R. (1977). Mathematical models in mechanical vibrations, population dynamics, and traffic flow. Prentice Hall. [ Links ]

5. Chin-Liang Chang, Richard Char-Tung Lee (1973). Symbolic logic and mechanical theorem proving. Academic Press. [ Links ]

6. Ben Ari, M. (2012). Mathematical logic for computer science. Spinger Verlag. [ Links ]

7. Davis, M., Sigal, R., Weyuker, E. (1983). Computability, complexity, and languages. Fundamentals of theoretical computer science. Academic Press. [ Links ]

Received: August 20, 2019; Accepted: February 05, 2020

* Corresponding author is Zvi Retchkiman Königsberg. mzvi@cic.ipn.mx

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License