Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Giangiacomo Gerla Fuzzy Logic Programming and Fuzzy Control Abstract. We show that it is possible to base fuzzy control on fuzzy logic programming. Indeed, we observe that the class of fuzzy Herbrand interpretations gives a semantics for fuzzy programs and we show that the fuzzy function associated with a fuzzy system of IF-THEN rules is the fuzzy Herbrand interpretation associated with a suitable fuzzy program. Keywords: Fuzzy control, fuzzy logic programming, Herbrand interpretation. 1. Introduction and preliminaries The basic ideas of fuzzy logic (in narrow sense) where formulated by L. Zadeh (see [19], [20]), J. A. Goguen (see [9]) and J. Pavelka (see [14], [15], and [16]). The aim of such a logic is to formalize the ”approximate reasoning” we use in everyday life and this by admitting predicates as ”big”, ”near ”, ”slow ” which are vague in nature. Also, these predicate are interpreted by suitable ”fuzzy subsets”, i.e. generalized characteristic functions with values in a complete lattice. Fuzzy logic programming is a very promising chapter of fuzzy logic whose purpose is to build up intelligent data-base systems with ”flexible” answers, expert systems able to consider vague predicates and so on (see, for example, [5], [2], [13], [17] and [18]). In this paper at first we recall some basic notions in fuzzy logic programming, which are well known in literature . Also, we show that is not restrictive to confine ourselves to fuzzy Herbrand interpretations in giving a semantics for fuzzy programs. This is done by showing that any homomorphism preserves the universal formulas. Moreover, by developing some ideas sketched in [8], we relate fuzzy logic programming with fuzzy control (see also P. Hájek in [10]). This gives a unifying and rigorous framework for both conjunction-based and implication-based fuzzy control. Let L be a complete, completely distributive, lattice whose elements we call truth values and let S be a nonempty set. Then, an L-subset or fuzzy subset of S is any map s : S → L from S to L. Given x ∈ S, we say that the value s(x) is the membership degree of x to s. For any λ ∈ L, the Presented by Melvin Fitting; Received December 1, 2002 Studia Logica 68: 1–23, 2001. c 2001 Kluwer Academic Publishers. Printed in the Netherlands. ° 2 Giangiacomo Gerla set C(s, λ) = {x ∈ S : s(x) ≥ λ} is called the λ − cut of s. The subset Supp(s) = {x ∈ S : s(x) 6= 0} is called the support of s. If 0 denotes the minimum and 1 the maximum of L, then we call crisp any L-subset whose values are in {0, 1}. We can identify any subset X of S with the crisp subset cX : S → {0, 1} such that cX (x) = 1 if x ∈ X and cX (x) = 0 in the case x ∈ / X. In particular, we identify ∅ with the map constantly equal to 0 and S with the map constantly equal to 1. We say that a fuzzy subset s is contained in a fuzzy subset s′ provided that s(x) 6 s′ (x) for any x ∈ S. In such a case, we write s ⊆ s′ . Given a family (si )i∈I of fuzzy subsets, the union S and the intersection are defined by T setting i∈I si (x) = Sup{si (x) : i ∈ I} ; i∈I si (x) = Inf {si (x) : i ∈ I}; for any x ∈ S. With respect to these operations, the class F(S) of all the Lsubsets of S is a complete lattice, i.e. the direct power of L with index set S. Let S1 , ..., Sn be sets, then an n-ary L-relation on S1 , ..., Sn is any L-subset of the Cartesian product S1 × ... × Sn . A binary L-relation f : S1 × S2 → L is also called (non-deterministic) L−f unction from S1 to S2 . The idea is that, given the input x ∈ S1 , the output is not an element in S2 but the fuzzy subset s : S2 → L of elements of S2 defined by setting s(y) = f (x, y) for any y ∈ S2 . Let ⊗ be a binary operation in L and a : S1 → L and b : S2 → L two fuzzy subsets of S1 and S2 , respectively. Then the ⊗-Cartesian product a × b : S1 × S2 → L is defined by setting, for any (x, y) ∈ S1 × S2 , (a × b)(x, y) = a(x) ⊗ b(y). 2. Fuzzy interpretations of a first order language Let L be a first order language defined, as usual, by: - a set LC of logical connectives, - the universal quantifier ∀, - a set C of constants, - a set OS of operation symbols, - a set RS of relation symbols, - a map ar : (RS ∪ OS ∪ LC) → N . We consider also a sequence x1 , x2 , ... of symbols that we call variables and the brackets ( , ). If s is a symbol such that ar(s) = n, then we say that s is n-ary. Terms and formulas are defined as in classic first order logic. Namely, we assume that: - the constants and the variables are terms, - if h is an p-ary operation symbol and t1 , ..., tp are terms, then h(t1 , ..., tp ) is a term. An atomic formula is an expression like r(t1 , ..., tp ), where r is a p-ary relation symbol and t1 , ..., tp are terms. The whole set F of formulas is defined by assuming that: Fuzzy Logic Programming and Fuzzy Control. . . 3 - each atomic formula is a formula, - if l is an k-ary logical connective and α1 , ..., αk are formulas, then l(α1 , ..., αk ) is a formula, - if α is a formula and xi a variable, then ∀xi (α) is a formula. A term (a formula) is ground if no variable occurs in it. A ground atom is called a fact. Then a ground formula is obtained from facts by the logical connectives. The notions of free occurrence of a variable in a formula, of quantifier-free formula, of universal formula and so on, are defined as usual. If s is either a term or a formula, we write s(x1 , ..., xn ) to emphasize that the variables occurring in s are among x1 , ..., xn . We will define the semantics by taking in account the possibility that some relation symbols represent vague predicates that we model by the notion of L-subset. Definition 2.1. An L − interpretation or fuzzy interpretation of L is a pair (D, I), where D is a nonempty set and I is a map associating - any n-ary function symbol h with a function I(h) : Dn → D, - any constant c with an element I(c) ∈ D - any n-ary relation symbol r with an L-relation I(r) : Dn → L. We call domain the set D and sometimes we write I to denote (D, I). The terms are interpreted as in the classical case. Definition 2.2. Given a term t(x1 , ..., xn ), the the interpretation of t in (D, I) is the map I(t) : Dn → D defined by setting: - I(xi )(d1 , ..., dn ) = di , - I(c)(d1 , ..., dn ) = I(c), - I(h(t1 , ..., tk ))(d1 , ..., dn ) = I(h)(I(t1 )(d1 , ..., dn ), ..., I(tk )(d1 , ..., dn )). We assume that any n-ary logical connective l ∈ LC is associated with an n-ary operation l : Ln → L and this enables us to associate any formula with the related extension. Definition 2.3. Given a formula α(x1 , ..., xn ), the extension I(α) : Dn → L of α is the n-ary fuzzy relation defined by setting: - I(r(t1 , ..., tp ))(d1 , ..., dn ) = I(r)(I(t1 )(d1 , ..., dn ), ..., I(tp )(d1 , ..., dn )), - I(l(α1 , ..., αk ))(d1 , ..., dn ) = l(I(α1 )(d1 , ..., dn ), ..., I(αk )(d1 , ..., dn )), - I(∀xi (α))(d1 , ..., dn ) = Infd∈D I(α)(d1 , ..., di−1 , d, di+1 , ..., dn ). Trivially, if α is a closed formula, then I(α) is a constant map, i.e. the quantity I(α)(d1 , ..., dn ) does not depend on the elements d1 , ..., dn . In such a case we denote such a constant again by I(α). 4 Giangiacomo Gerla Definition 2.4. Let α be any formula and ∀x1 ...∀xn (α) be its universal closure. Then we set ||α||I = I(α)(∀x1 ...∀xn (α)). As an obvious extension of the notion of set of axioms in classical logic, we call fuzzy set of axioms or fuzzy theory any fuzzy set τ : F → L of formulas. Definition 2.5. Let τ : F → L be a fuzzy set of axioms. Then an Linterpretation (D, I) is called a model of τ (for short, I |= τ ), if kϕkI ≥ τ (ϕ) for any ϕ ∈ F . In accordance with such a definition, the value τ (ϕ) is not intended as the truth value of ϕ but as a lower-bound constraint on the possible truth value of ϕ. Then, the information carried on by a fuzzy set of axioms τ is that, for any formula ϕ, the truth value of ϕ is greater than or equal to τ (ϕ). Definition 2.6. Let τ : F → L be a fuzzy set of axioms. Then the fuzzy set Lc(τ ) of logical consequences of τ is defined by setting: LC(τ )(ϕ) = Inf {kϕkI : I ² τ }. (2.1) The so defined operator Lc : F(F ) → F(F ) is called the logical consequence operator. In a sense, LC(τ )(ϕ) is the best lower-bound constraint on the truth value of ϕ, we can find given the available information τ . 3. Homomorphisms and preserving theorems Given two L−interpretations (D, I) and (D′ , I ′ ), we call homomorphism from (D, I) into (D′ , I ′ ) any map f : D → D′ such that: - f is a homomorphism of the associated algebraic structures, i.e., f (I(c)) = I ′ (c) ; f (I(h)(d1 , ..., dn )) = I ′ (h)(f (d1 ), ..., f (dn )), for any c ∈ C any n-ary operation symbol h and d1 , ..., dn ∈ D, - for every n − ary relation r, I(r)(d1 , ..., dn ) ≤ I ′ (r)(f (d1 ), ..., f (dn )). (3.1) We say that f is full if I(r)(d1 , ..., dn ) = I ′ (r)(f (d1 ), ..., f (dn )). (3.2) 5 Fuzzy Logic Programming and Fuzzy Control. . . An isomorphism is a homomorphism which is one-to-one and full, i.e. an one-to-one homomorphism whose inverse is again a homomorphism. Given an interpretation (D, I) and λ ∈ L, we call λ − cut of I the classical interpretation (D, Iλ ) defined by setting Iλ (r) = C(I(r), λ) for any relation symbol r, Iλ (c) = I(c) for any c ∈ C and Iλ (h) = I(h) for any operation symbol h. Proposition 3.1. Let (D, I) and (D′ , I ′ ) be two L − interpretations and f : D → D′ be a map. Then f is a homomorphism (full homomorphism, isomorphism) from (D, I) into (D′ , I ′ ) if and only if f is a homomorphism (full homomorphism, isomorphism) from (D, Iλ ) into (D′ , Iλ′ ) for any λ ∈ L. Proof. Assume that f is a homomorphism from (D, I) to (D′ , I ′ ). Then, for any λ ∈ L and for any n-ary relation symbol r, (d1 , ..., dn ) ∈ C(I(r), λ) ⇔ I(r)(d1 , ..., dn ) ≥ λ ⇒ I ′ (r)(f (d1 ), ..., f (dn )) ≥ I(r)(d1 , ..., dn ) ≥ λ ⇔ (f (d1 ), ..., f (dn )) ∈ C(I ′ (r), λ). This proves that f is a homomorphism from (D, Iλ ) into (D′ , Iλ′ ). Conversely, assume that, for any λ ∈ L, f is a homomorphism from (D, Iλ ) into (D′ , Iλ′ ) and therefore that I(r)(d1 , ..., dn ) ≥ λ entails I ′ (r)(f (d1 ), ..., f (dn )) ≥ λ. Then, by setting λ = I(r)(d1 , ..., dn ), we obtain that I ′ (r)(f (d1 ), ..., f (dn )) ≥ I(r)(d1 , ..., dn ). This proves that f is a homomorphism from (D, I) into (D′ , I ′ ). The remaining part of the proof is trivial. As in classical logic, given a homomorphism f and a term t(x1 , ..., xn ), we have that for every d1 , ..., dn ∈ D, f (I(t)(d1 , ..., dn )) = I ′ (t)(f (d1 ), ..., f (dn )). (3.3) Theorem 3.2. Let ϕ(x1 , ..., xn ) a quantifier-free formula, (D, I) and (D′ , I ′ ) be two fuzzy interpretations, and f : D → D′ be a full homomorphism. Then, for any d1 , ..., dn ∈ D, I(ϕ)(d1 , ..., dn ) = I ′ (ϕ)(f (d1 ), ..., f (dn )). (3.4) If ψ ∈ F is universal, I(ψ)(d1 , ..., dn ) ≥ I ′ (ψ)(f (d1 ), ..., f (dn )) (3.5) kψkI ≥ kψkI ′ . (3.6) and therefore 6 Giangiacomo Gerla Proof. We will prove (3.4) by induction on the complexity of ϕ. Let ϕ be the atomic formula r(t1 , ..., tp ). Then, by (3.2) and (3.3), I(ϕ)(d1 , ..., dn ) = I(r)(I(t1 )(d1 , ..., dn ), ..., I(tp )(d1 , ..., dn )) = I ′ (r)(f (I(t1 )(d1 , ..., dn )), ..., f (I(tp )(d1 , ..., dn ))) = I ′ (r)(I ′ (t1 )(f (d1 ), ..., f (dn ))), ..., I ′ (tp )(f (d1 ), ..., f (dn )))) = I ′ (ϕ)(f (d1 ), ..., f (dn )). Assume that ϕ = l(α1 , ..., αk ) and that (3.4) is satisfied by α1 , ..., αk . Then, I(ϕ)(d1 , ..., dn ) = l(I(α1 )(d1 , ..., dn ), ..., I(αk )(d1 , ..., dn )) = l(I ′ (α1 )(f (d1 ), ..., f (dn )), ..., I ′ (αk )(f (d1 ), ..., f (dn )) = I ′ (ϕ)(f (d1 ), ..., f (dn )). This proves the first part of the theorem. Let ψ be universal, we will prove (3.5) by induction on the number m of universal quantifiers in ψ. If m = 0, (3.5) follows from (3.4). Assume that m 6= 0 and that ψ is equal to a formula like ∀xi (α), where α contains m−1 universal quantifiers. Then, in accordance with the induction hypothesis and the inclusion {f (d) : d ∈ D} ⊆ D′ , I(∀xi (α))(d1 , ..., dn ) = Infd∈D I(α)(d1 , ..., d, ..., dn ) ≥ Infd∈D I ′ (α)(f (d1 ), ..., f (d), ..., f (dn )) ≥ Infd′ ∈D′ I ′ (α)(f (d1 ), ..., d′ , ..., f (dn )) = I ′ (∀xi (α))(f (d1 ), ..., f (dn )). Not surprisingly, the following theorem proves that two isomorphic fuzzy interpretations are logically equivalent. Theorem 3.3. Let f be be an isomorphism between (D, I) and (D′ , I ′ ). Then for any formula α, we have that I(α)(d1 , ..., dn ) = I ′ (α)(f (d1 ), ..., f (dn )). (3.7) Proof. We prove (3.7) by induction on the complexity of α. If α is atomic, (3.7) was just proved in Theorem 3.2. Again, in proving Theorem 3.2 we showed that if l is a logical connective and α1 , ..., αk satisfy (3.7), then l(α1 , ..., αk ) satisfies (3.7). Assume that α satisfies (3.7). Then, since {f (d) : Fuzzy Logic Programming and Fuzzy Control. . . 7 d ∈ D} = D′ , I(∀xi α)(d1 , ..., dn ) = Infd∈D I(α)(d1 , ..., d, ..., dn ) = Infd∈D I ′ (α)(f (d1 ), ..., f (d), ..., f (dn )) = Infd′ ∈D′ I ′ (α)(f (d1 ), ..., d′ , ..., f (dn )) = I ′ (∀xi(α)(f (d1 ), ..., f (dn )). Thus, (3.7) is satisfied by any formula. 4. Fuzzy Herbrand interpretations and universal theories As usual, we call Herbrand universe the set U of ground terms of the language L and Herbrand base the set BL of facts. Definition 4.1. An L-interpretation (D, I) is an L-Herbrand interpretation (for short H-interpretation) provided that: - D is equal to the Herbrand universe U, - for any n-ary operation symbol h, and t1 , ..., tn ∈ U, I(h)(t1 , ..., tn ) = h(t1 , ..., tn ), - for any constant c, I(c) = c. Then, two H-interpretations differ only for the relational part and this enables us to identify the H-interpretations with the fuzzy subsets of BL. Proposition 4.2. There is a one-one-mapping between the class of Hinterpretations and the class of fuzzy subsets of BL. Proof. We associate any H-interpretation (U, I) with the fuzzy subset sI of BL defined by setting, sI(r(t1 , ..., tp )) = I(r(t1 , ..., tp )), for any fact r(t1 , ..., tp ). Moreover, we associate any fuzzy subset s of BL with the Hinterpretation (U, Is ) where, for any p-ary relation symbol r, Is (r) is defined by setting, for any t1 , ..., tp in U, Is (r)(t1 , ..., tp ) = s(r(t1 , ..., tp )). In account of such a proposition, in the following we call H-interpretation any fuzzy subset of BL. In order to prove some basic properties of the Hinterpretations, we need some further notations. Namely, let t(x1 , ..., xn ) be a term. Then, given the terms t1 , ..., tn , we write t(t1 , ..., tn ) to denote the term obtained by substituting each xi with ti in t(x1 , ..., xn ). Likewise, given the formula α(x1 , ..., xn ), α(t1 , ..., tn ) denotes the formula obtained from α(x1 , ..., xn ) by substituting each variable xi which is free in α with ti . Trivially, if t is ground, then t(t1 , ..., tn ) is equal to t, if α is closed, then α(t1 , ..., tn ) coincides with α. 8 Giangiacomo Gerla Proposition 4.3. Let (U, I) be an H-interpretation, t(x1 , ..., xn ) a term and t1 , ..., tn ∈ U. Then I(t)(t1 , ..., tn ) = t(t1 , ..., tn ). (4.1) Moreover, if α(x1 , ..., xn ) is a formula, I(α)(t1 , ..., tn ) = ||α(t1 , ..., tn )||I. (4.2) ||∀x1 ...∀xn (α)||I = Inf {||α(t1 , ..., tn )||I : t1 , ..., tn ∈ U}. (4.3) Consequently, Proof. (4.1) one proves as in the classical logic. We prove (4.2) by induction on the complexity of α. Indeed, assume that α is the atomic formula r(s1 , ..., sp ). Then I(α)(t1 , ..., tn ) = I(r)(I(s1 )(t1 , ..., tn ), ..., I(sp )(t1 , ..., tn )) = I(r)(s1 (t1 , ..., tn ), ..., sm (t1 , ..., tn )) = I(r(s1 (t1 , ..., tn ), ..., sm (t1 , ..., tn )) = ||α(t1 , ..., tn )||I. Assume that α = l(α1 , ..., αk ) and that (4.2) is satisfied by each αi , then I(l(α1 , ..., αk ))(t1 , ..., tn ) = l(I(α1 )(t1 , ..., tn ), ..., I(αk )(t1 , ..., tn )) = l(||α1 (t1 , ..., tn )||I, ..., ||αk (t1 , ..., tn )||I) = ||l(α1 , ..., αk )(t1 , ..., tn )||I. This proves that (4.2) is satisfied by l(α1 , ..., αk ). Finally, assume that α is the formula ∀xi (β) and that, by induction hypothesis, for any t ∈ U, I(β)(t1 , ..., t, ..., tn ) = ||β(t1 , ..., t, ..., tn )||I and I(β(t1 , ..., xi , ..., tn ))(t) = ||β(t1 , ..., t, ..., tn )||I. Then, since ∀xi (β(t1 , ..., xi , ..., tn )) is equal to the formula (∀xi (β))(t1 , ..., tn ), we get: I(∀xi (β))(t1 , ..., tn ) = Inf {I(β)(t1 , ..., t, ..., tn ) : t ∈ U} = Inf {||β(t1 , ..., t, ..., tn )||I : t ∈ U} = Inf {I(β(t1 , ..., xi , ..., tn ))(t) : t ∈ U} = ||∀xi (β(t1 , ..., xi , ..., tn ))||I = ||(∀xi (β))(t1 , ..., tn )||I. This proves that (4.2) is satisfied by the formula ∀xi (β), too. Fuzzy Logic Programming and Fuzzy Control. . . 9 Given an L-interpretation (D, I), the H-interpretation associated with (D, I) is the H-interpretation (U, I) defined by the fuzzy set of facts which are true in (D, I). This means that, for any n-ary relation symbol r, it is I(r)(t1 , ..., tn ) = I(r)(I(t1 ), ..., I(tn )) = I(r(t1 , ..., tn )), for any t1 , ..., tn ∈ U. The proof of the following proposition is trivial. Proposition 4.4. Let (D, I) be an L-interpretation and (U, I) be the associated H-interpretation. Then the map f : U → D, defined by setting f (t) = I(t) for any t ∈ U, is a full homomorphism from I into I. Consequently, if ϕ is a quantifier-free formula, then for any t1 , ..., tn ∈ U: I(ϕ)(t1 , ..., tn ) = I(ϕ)(I(t1 ), ..., I(tn )). (4.4) I(ψ)(t1 , ..., tn ) ≥ I(ψ)(I(t1 ), ..., I(tn )), (4.5) ||ψ||I ≥ ||ψ||I . (4.6) If ψ is universal, and therefore We say that a fuzzy theory τ : F → L is universal if all the formulas in Supp(τ ) are universal. From (4.6) we obtain the following proposition: Proposition 4.5. Let τ be an universal fuzzy theory, (D, I) be an Linterpretation and (U, I) the associated H-interpretation. Then (D, I) is a model of τ ⇒ (U, I) is a model of τ . The following proposition shows that we can define the fuzzy set of facts which are logical consequences of an universal fuzzy theory, by referring only to the fuzzy Herbrand models of this theory. Proposition 4.6. Let τ be an universal fuzzy theory. Then, for any fact ϕ, Lc(τ )(ϕ) = Inf {||ϕ||I : I is a H − model of τ }. Proof. Let ϕ be a fact. Then, since by (4.4), ||ϕ||I = ||ϕ||I , Lc(a)(ϕ) = Inf {||ϕ||I : I is a model of τ } = Inf {||ϕ||I : I is associated with a model of τ } = Inf {||ϕ||I : I is a H-model of τ }. (4.7) 10 Giangiacomo Gerla Let τ : F → L be a universal fuzzy theory. Then we define the fuzzy set Gr(τ ) of ground instances of the formulas in τ by setting, Gr(τ )(α) = 0 in the case α is not ground and Gr(τ )(α) = Sup{τ (∀x1 ...∀xn (α′ )) : α = α′ (t1 , ..., tn ), t1 , ..., tn ∈ U}, otherwise. We will show that if τ is an universal theory, then τ and Gr(τ ) have the same H-models. Theorem 4.7. Let τ be an universal fuzzy theory, then, for any H-interpretation I, I ² τ ⇔ I ² Gr(τ ). Proof. Assume that I ² τ and let α be a formula. Then, if α is not ground, Gr(τ )(α) = 0 and therefore ||α||I ≥ Gr(τ )(α). Assume that α is ground and let α′ be a formula such that α = α′ (t1 , ..., tn ) for some t1 , ..., tn ∈ U. Then ||α||I ≥ ||∀x1 ...∀xn (α′ )||I ≥ τ (∀x1 ...∀xn (α′ )). Consequently, ||α||I ≥ Sup{τ (∀x1 ...∀xn (α′ )) : α = α′ (t1 , ..., tn ), t1 , ..., tn ∈ U} = Gr(τ )(α), and this proves that I is a model of Gr(τ ). Conversely, let I be a H -model of Gr(τ ) and let ∀x1 ...∀xn (α′ ) be any closed universal formula. Then, in accordance with the definition of Gr(τ ), given t1 , ..., tn in U, ||α′ (t1 , ..., tn )||I ≥ Gr(τ )(α′ (t1 , ..., tn )) ≥ τ (∀x1 ...∀xn (α′ )). Thus ||∀x1 ...∀xn (α′ )||I = Inf {||α′ (t1 , ..., tn )||I : t1 , ..., tn ∈ U} ≥ τ (∀x1 ...∀xn (α′ )) and this proves that I is a model of τ . 5. Fuzzy logic programming Now we will expose some definitions and results in fuzzy logic programming which are well known in literature (see, for example, [2], [13], [17] and [18]). Assume that in L there are some commutative and associative operations ⊗1 , ..., ⊗k such that , for any x in L, x ⊗k 1 = x and, for any family (yj )j∈J of elements in L, x ⊗i (Supj∈J yj ) = Supj∈J (x ⊗i yj ). Under these conditions, we can define the implication operations →i by setting, for any x, y ∈ L, x →i y = Sup{z ∈ L : x ⊗i z ² y}. It is easy to prove that each pair →i and ⊗i satisfies the adjunction property, i.e, for any a, b, x ∈ L, Fuzzy Logic Programming and Fuzzy Control. . . 11 a →i b ≥ x ⇔ b ≥ x ⊗i a. We suppose that L contains logical connectives corresponding to these operations we denote again by →1 , ..., →k . Let L∗ be the sentential calculus with the same logical connectives as in L. Then we write h(p1 , ..., pn ) to denote a formula of L∗ whose propositional variables are among p1 , ..., pn and, as usual, we associate h(p1 , ..., pn ) with a truth-table h : Ln → L. Let α1 , ..., αn be atomic formulas of L and h(α1 , ..., αn ) be the formula in L obtained from h(p1 , ..., pn ) by substituting each occurrence of pi with αi . Then we say that h(α1 , ..., αn ) is a combination of the formulas α1 , ..., αn . If h preserves the least upper bounds (and therefore is monotone), then we say that h(α1 , ..., αn ) is a positive combination of α1 , ..., αn . Definition 5.1. A (positive) implicative clause is either an atomic formula or a formula like h(α1 , ..., αn ) →i α where α, α1 ,...,αn are atomic formulas and h(α1 , ..., αn ) is a (positive) combination of α1 , ..., αn . A fuzzy subset p : F → L of formulas is a (positive, ground) fuzzy program if Supp(p) is a set of (positive, ground) implicative clauses. A simple characterization of the fuzzy models of a fuzzy program is the following. Proposition 5.2. Let p : F → L be a fuzzy program and (D, I) be an interpretation. Then I is a fuzzy model of p if and only if, for any d1 , ..., dh in D, i) I(α)(d1 , ..., dh ) ≥ p(α) for any atomic formula α ∈ Supp(p) ; ii) I(α)(d1 , ..., dh )≥ p(h(α1 , ..., αn ) →i α) ⊗i h(I(α1 )(d1 , ..., dh ), ..., I(αn )(d1 , ..., dh )) for any implicative clause h(α1 , ..., αn ) →i α in Supp(p). Proof. An interpretation I is a model of p if and only if, ||α||I = Inf {I(α)(d1 , ..., dh ) : d1 , ..., dh ∈ D} ≥ p(α) for any atomic formula α ∈ Supp(p) and ||h(α1 , ..., αn )→iα||I = Inf {I(h(α1 , ..., αn )→iα)(d1 , ..., dh ) : d1 , ..., dh ∈ D} ≥ p(h(α1 , ..., αn ) →i α), for any formula h(α1 , ..., αn ) →i α in Supp(p). The first condition is equivalent to the claim that I(α)(d1 , ..., dh ) ≥ p(α) for any d1 , ..., dh in D and therefore it is equivalent with i). The second condition is equivalent to say that, for any d1 , ..., dh in D, I(h(α1 , ..., αn ) →i α)(d1 , ..., dh ) = h(I(α1 )(d1 , ..., dh ), ..., I(αn )(d1 , ..., dh )) →i I(α)(d1 , ..., dh ) ≥ p(h(α1 , ..., αn ) →i α). 12 Giangiacomo Gerla By the adjunction property, such an inequality is equivalent with ii). By Propositions 4.2, 5.2 and Theorem 4.7, we obtain: Theorem 5.3. Let p : F → L be a fuzzy program and s : BL → L be a fuzzy set of facts. Then s is a H-model of p if and only if for any fact α ∈ Supp(Gr(p)), i) s(α) ≥ Gr(p)(α) and, for any implicative clause h(α1 , ..., αn ) →i α in Supp(Gr(p)), ii) s(α) ≥ Gr(p)(h(α1 , ..., αn ) →i α) ⊗i h(s(α1 )..., s(αn )). To calculate the H-models of a fuzzy program, it is very useful the notion of immediate consequence operator (see, also, P. Vojtas [17] and [18]). Definition 5.4. Let p : F → L be a fuzzy program. Then the immediate consequence operator associated with p is the operator Tp : F(BL) → F(BL) defined by setting, for any s ∈ F(BL) and α ∈ BL, T1 (s)(α) = Gr(p)(α) ∨ s(α), T2 (s)(α) = Sup{Gr(p)(h(α1 , ..., αn ) ⊗i h(s(α1 ), ..., s(αn )) →i α) : h(α1 , ..., αn ) →i α ∈ Supp(Gr(p))}, Tp (s) = T1 (s) ∪ T2 (s). The immediate consequence operator enables us to give the following elegant and useful characterization of the H-models of a fuzzy program. Theorem 5.5. Let p : F → L be a fuzzy program and s ∈ F(BL). Then s is an H-model of p if and only if s is a fixed point for Tp . Proof. It is sufficient to apply Theorem 5.3. Indeed, let s be a fixed point for Tp , i.e. assume that T1 (s) ⊆ s and T2 (s) ⊆ s. Let α be a fact in Supp(Gr(p)). Then, since s(α) ≥ T1 (s)(α) ≥ Gr(p)(α), we have that i) is satisfied. Let h(α1 , ..., αn ) →i α be a ground implicative clause in Supp(Gr(p)). Then, since s(α) ≥ T2 (s)(α), we have that s(α) ≥ Gr(p)(h(α1 , ..., αn ) →i α) ⊗i h(s(α1 ), ..., s(αn )) for any h(α1 , ..., αn ) →i α in Supp(p). Hence, ii) is satisfied. This proves that s is a H-model of p. Conversely, assume that s is a H-model of p and therefore that both i) and ii) are satisfied. Then, by i), we have that, for any fact α, s(α) ≥ Gr(p)(α) and therefore s(α) ≥ T1 (α). Moreover, by ii), s(α) ≥ Gr(p)(h(α1 , ..., αn ) →i α) ⊗i h(s(α1 ), ..., s(αn )) and therefore s(α) ≥ Sup{Gr(p)(h(α1 , ..., αn )) ⊗i h(s(α1 ), ..., s(αn ))) : h(α1 , ..., αn ) →i α ∈ Supp(Gr(p))} ∨ s(α) = T2 (s)(α). 13 Fuzzy Logic Programming and Fuzzy Control. . . 6. Calculus of the fuzzy Herbrand models Any fuzzy program p admits as a trivial H-model the map s : BL → L constantly equal to 1. A more interesting H-model is the least Herbrand H-model of p, i.e. a H-model mp : BL → L of p which is contained in any H-model of p. This since mp represents, in a sense, the informative content of p. To see how to obtain such a model, we recall some elementary notions in the theory of fixed points in a complete lattice. We say that a family (si )i∈I of fuzzy subsets of a set S is directed provided that for every si and sj there is sh such that si ⊆ sh and sj ⊆ sh . An operator J : F(S) → F(S) is continuous provided that, for any directed family (si )i∈I of fuzzy subsets of S, [ [ J( si ) = J(si ). i∈I i∈I A continuous almost closure operator is a continuous operator J such that J(s) ⊇ s. Proposition 6.1. Let J1 : F(S) → F(S) and J2 : F(S) → F(S) be two continuous operators. Then the union J = J1 ∪ J2 is a continuous operators. Proof. Let (sj )j∈J be a directed family of fuzzy subsets of S and observe that for any i ∈ I and j ∈ I, there is h ∈ I such that si ⊆ sh and sj ⊆ sh , and therefore J1 (si ) ⊆ J1 (sh ) and J2 (sj ) ⊆ J2 (sh ). Then [ [ [ J( si ) = J1 ( si ) ∪ J2 ( si ) i∈I i∈I =( [ i∈I i∈I J1 (si )) ∪ ( [ J2 (si )) i∈I [ {J1 (si ) ∪ J2 (sj ) : i ∈ I, j ∈ I} [ [ = (J1 (sh ) ∪ J2 (sh )) = J(sh ). = h∈I h∈I The following theorem summarizes the main properties of the continuous almost closure operators (see, for example, [7]). Theorem 6.2. Let J : F(S) → F(S) be a continuous almost closure operator, then: - the class of fixed points of J is a closure system, i.e. it is closed under arbitrary intersections, 14 Giangiacomo Gerla - the least fixed point operator D : F(S) → F(S) defined by setting, for any fuzzy subset s, \ D(s) = {s′ : J(s′ ) = s′ , s′ ⊇ s}, is a closure operator, - for any fuzzy subset s, D(s) = [ J n (s). (6.1) n∈N We can apply this theorem to the immediate consequence operator. Theorem 6.3. Let p be a positive fuzzy program. Then Tp is a continuous almost closure operator. As a consequence, the class of fuzzy H-models of a positive fuzzy program p is a closure system and the least fuzzy Herbrand model mp for p is given by: mp = \ {s ∈ F(BL) : s is a model of p}. (6.2) Moreover, mp = [ Tpn (∅). (6.3) n∈N Proof. Let T1 and T2 be as in Definition 5.4. It is immediate that T1 satisfies the continuity property. Assume that (sj )j∈J is a directed family of fuzzySsubsets of BL. Then T2 ( j∈J sj )(α)= Sup{Gr(p)(h(α1 , ..., αn ) →i α) ⊗i h(Supj∈J sj (α1 ), ..., Supj∈J sj (αn )) : h(α1 , ..., αn ) →i α ∈ Supp(Gr(p))} = Sup{Gr(p)(h(α1 , ..., αn )→iα)⊗i(Supj(1),...,j(n) h(sj(1) (α1 ), ..., sj(n) (αn )) : h(α1 , ..., αn ) →i α ∈ Supp(Gr(p)}. Now, we observe that, since (sj )j∈J is directed, given sj (1), ..., sj (n) there is j ∈ J such that sj(1) ⊆ sj , ..., sj(n) ⊆ sj and therefore h(sj(1) (α1 ), ..., sj(n) (αn )) ≤ h(sj (α1 ), ..., sj (αn )). Consequently, S T2 ( j∈J sj )(α)= Sup{Gr(p)(h(α1 , ..., αn ) →i α) ⊗ (Supj∈J h(sj (α1 ), ..., sj (αn )) : h(α1 , ..., αn ) →i α ∈ Supp(Gr(p)} = Supj∈J Sup{Gr(p)(h(α1 , ..., αn ) →i α) ⊗ (h(sj (α1 ) ..., sj (αn )) : h(α1S , ..., αn ) →i α ∈ Supp(Gr(p)}, = Supj∈J T2 (sj )(α) = j∈J T2 (sj )(α). The remaining part of the theorem is trivial. Equation (6.3) defines an algorithm to calculate, for any fact α, the value mp (α). Indeed, in accordance with the definition of recursive enumerability for fuzzy sets proposed in [6] and [1], it is easy to show that mp is a recursively Fuzzy Logic Programming and Fuzzy Control. . . 15 enumerable fuzzy subset of BL. The following theorem shows that the least fuzzy Herbrand model of a positive fuzzy program represents its informative content. Theorem 6.4. Let p be a positive fuzzy program. Then the least fuzzy Herbrand model of p is equal to the fuzzy subset of facts which are logical consequences of p, i.e., for any fact α, mp (α) = Lc(p)(α). (6.4) Proof. By Theorem 4.6 and (6.2), for any fact α, Lc(p)(α) = Inf {||α||I : I is an H-model of p} = mp (α). As in the classical case, several difficulties exist for fuzzy programs which are non positive. We confine ourselves only to the very simple case of hierarchical fuzzy programs. We call level mapping any map lev : BL → N from the Herbrand base to the set of natural numbers. We say that a fuzzy program p is hierarchical if a level mapping exists such that for any rule h(α1 , ..., αn ) → α in Supp(Gr(p)), we have that lev(α) > lev(α1 ), ..., lev(α) > lev(αn ). It is no restrictive to assume that the level of the atomic formulas in Supp(Gr(p)) is equal to 1. Proposition 6.5. Let p be a hierarchical fuzzy program. Then, for any α ∈ BL, lev(α) ≤ n ⇒ Tpn+1 (∅)(α) = Tpn (∅)(α). (6.5) S Consequently, n∈N Tpn (φ) is a H-model of p. Proof. We will prove (6.5) by induction on n. In the case n = 1, we have that α is atomic and that no rule in Supp(Gr(p)) exists whose head is α. Then, T2 (Tp (∅))(α) = 0 and T2 (∅)(α) = 0. Therefore, since Tp (∅)(α) = Gr(p)(α), Tp2 (∅)(α) = Tp (Tp (∅))(α) = T1 (Tp (∅))(α) ∨ T2 (Tp (∅))(α) = T1 (Tp (∅))(α) = Gr(p)(α) ∨ Tp (∅)(α) = Tp (∅)(α). Assume that n 6= 1, that lev(α) ≤ n and that h(α1 , ...αn ) →i α is a rule in Supp(Gr(p)). Then, since lev(αi ) < lev(α) ≤ n, by inductive hypothesis Tpn (∅)(αi ) = Tpn−1 (∅)(αi ). Then, Tpn+1 (∅)(α) =Gr(p)(α)∨Tpn (∅)(α)∨Sup{Gr(p)(h(α1 , ..., αn ) →i α) ⊗i h(Tpn (α1 ), ..., Tpn (αn )) : h(α1 , ..., αn ) →i α ∈ Supp(Gr(p))} = Gr(p)(α) ∨ Tpn (∅)(α) ∨ Sup{(Gr(p)(h(α1 , ..., αn ) →i α) ⊗i h(Tpn−1 (α1 ), ..., Tpn−1 (αn )) : h(α1 , ..., αn ) →i α ∈ Supp(Gr(p))}. 16 Giangiacomo Gerla By noticing that Gr(p)(α) ≤ Tpn (∅)(α) and Sup{(Gr(p)(h(α1 , ..., αn ) →i α) ⊗i h(Tpn−1 (α1 ), ..., Tpn−1 (αn )) : h(α1 , ..., αn ) →i α ∈ Supp(Gr(p)} ≤ Tpn (∅)(α), we obtain that Tpn+1 (∅)(α) ≤ Tpn (∅)(α) and therefore that Tpn+1 (∅)(α) = Tpn (∅)(α). S In the following we say that n∈N Tpn is the canonical H-model of p. 7. Fuzzy control Fuzzy control is perhaps the main success of fuzzy set theory. Recall that the aim of classical control theory is to individuate a function f : X → Y such that f (x) gives the correct control action given the input x. To do this, the starting point is a general theory about the phenomenon under consideration. From this theory we obtain some differential equations and then f is obtained as a solution of these equations. The paradigm used in fuzzy control theory, as devised by Zadeh in [19], [20] and by Mamdani in [12], is totally different. Indeed, in fuzzy control one tries to obtain f from the verbal information given by an expert on the control under consideration (imagine the expert as a cleaver ’old hand’ with no theoretical knowledge or mathematical competence). The expert expresses its experience by a system of IF-THEN rules like If If If If If x x x x x is is is is is Little, then I suggest to put y Slow, Small, then I suggest to put y Fast, Medium, then I suggest to put y Moderate, Big, then I suggest to put y Veryfast, Verybig, then I suggest to put y Moderate. (7.1) Successively, fuzzy control theory interprets such an information, qualitative in nature, by translating it into a function f ′ : X → Y in such a way that f ′ can be considered an adequate control function. This is done by suitable procedures based on the interpretation the words Little, Slow, ... by suitable fuzzy quantities, or fuzzy granules, little : X → [0, 1], slow : Y → [0, 1], .... By proceeding in a general way, consider the IF-THEN system: IF x is A1 THEN y is B1 , ... IF x is An THEN y is Bn . (7.2) Then, in fuzzy control such a system can be interpreted in two different ways. In the conjunction-based fuzzy control we consider the following procedure Fuzzy Logic Programming and Fuzzy Control. . . 17 where ⊗ is a binary operation able to interpret the conjuncion. - Step 1. A tentative interpretation of the constants A1 , ..., An , B1 , ..., Bn by suitable ”fuzzy quantities” a1 : X → [0, 1], ..., an : X → [0, 1], b1 : Y → [0, 1], bn : Y → [0, 1] is proposed. - Step 2. Each rule ”IF x is Ai THEN y is Bi ” is associated with the fuzzy point ai × bi obtained as the ⊗-Cartesian product of the fuzzy quantities ai and bi . - Step 3. The whole system of rules is associated with the fuzzy function f : X × Y → [0, 1] defined as an union of these fuzzy points, i.e. [ (ai × bi ). (7.3) f= i=1,...,n - Step 4. A suitable defuzzification process associates the fuzzy function f with a crisp function f ′ . Usually, this is obtained by the centroid method, where we set, for every r ∈ X, R y · f (r, y)dy ′ f (r) = YR Y f (r, y)dy - Step 5. If f ′ is satisfactory (it is sufficiently close to f ), then the procedure terminates, otherwise the interpretation of the expert’s words is chanced in accordance with a suitable strategy. After this, one goes back to Step 2. Notice that the basic feature of such a procedure is the tuning process, where the interpretation of the constants A1 , ..., An , B1 , .., Bn is changed until we obtain a satisfactory interpretation. By referring to the system (7.1), set X = [0, 10], Y = [0, 5] and interpret the constants Little, Small, M edium, Big, V erybig, Slow, F ast, M oderate, V eryf ast by suitable triangle functions. Also, consider the triangular norm of the minimum. Then, Figure 1 represents both the corresponding fuzzy function f and the crisp function f ′ . In the implication − based procedure (see, for example, [11]), instead of steps 2 and 3 we have: - Step 2’. Each rule ”IF x is Ai THEN y is Bi ” is associated with the fuzzy relation ai → bi defined by setting, (ai → bi )(x, y) = ai (x) → bi (y) for any x ∈ X and y ∈ Y , and where → is a binary operator in [0,1] able to interpret the implication. - Step 3’. The whole system of rules is associated with the fuzzy function: \ g= (ai → bi ). (7.4) i=1,...,n 18 Giangiacomo Gerla Figure 1. 8. Fuzzy control as a chapter of fuzzy logic programming In spite of the great success of fuzzy control, there is no convincing justification of the applied techniques. Obviously, the first temptation is to interpret the IF-THEN structure of the rules as a logical implication. As an example, we could interpret a rule as ”If x is Little then y is Slow ” by the first order formula Little(x) → Slow(y). Unfortunately, this cannot be done in a so direct way. Indeed assume that r is an input such that Little(r) is false. Then the formula Little(r) → Slow(t) is true for any t in Y and therefore any t ∈ Y gives a correct control. As a consequence of these considerations, in [8] we sketched a logical approach to fuzzy control based on the idea that, given the input r, and a possible output t, the number f (r, t) is the truth degree of the claim ”t is a good answer given r”. Namely, we show that f is the interpretation of a vague predicate Good in the least fuzzy Herbrand model of a suitable fuzzy program. To illustrate this idea, we consider a multivalued logic whose language L contains a binary relation symbol Good and unary predicate symbols A1 , ..., An , B1 , ..., Bn corresponding to the fuzzy quantities in (7.2). Also, L contains each element r in X and t in Y as a constant. The predicates are interpreted in the complete lattice [0,1] equipped with a triangular norm ⊗ and the map ∽: [0, 1] → [0, 1] defined by setting ∽(x) = 1 − x. These operations are devoted to interpret the conjunction and the negation connectives, respectively. The disjunction is interpreted by the co-norm ⊕ defined by setting x ⊕ y =∽ (∽ x⊗ ∽ y) and the implication by Fuzzy Logic Programming and Fuzzy Control. . . 19 the operation → defined by setting x → y = (∽ x) ⊕ y. Then, we translate the system (7.2) into a fuzzy program p : F → [0, 1] defined by setting:   A1 (x) ∧ B1 (y) → Good(x, y) [1]      ...      An (x) ∧ Bn (y) → Good(x, y) [1]      [a1 (r)] A1 (r) (8.1) . . . ...    An (r) [an (r)]      B1 (t) [b1 (t)]      . . . ...     Bn (t) [bn (t)], where r varies in X and t in Y . More precisely, p is defined by setting   1 if α is the clause Ai (x) ∧ Bi (y) → Good(x, y),      ai (r) if α is the fact Ai (r), r ∈ X p(α) =    bi (t) if α is the fact Bi (t), t ∈ Y     0 otherwise. Observe that A1 , ..., An , B1 , ..., Bn are considered as unary predicate symbols and not constants for fuzzy quantities as in the system (7.1). Observe also that, while p(Ai (r)) = ai (r) for any r ∈ X, we have set p(Ai (t)) = 0 for any t ∈ Y , and that while p(Bi (t)) = bi (t) for any t ∈ Y , we have set p(Ai (r)) = 0 for any r ∈ X (it is not restrictive to assume that X ∪ Y = ∅). So, the Herbrand universe is the disjoint union of two sets. A better alternative should be to extend the results of this paper into a two sorted logic, one type for the elements in X and one type for the elements in Y . The following theorem shows that the calculus of the fuzzy function f obtained by the conjunction-procedure is equivalent to the calculus of the least fuzzy Herbrand model of such a fuzzy program. Theorem 8.1. Consider the fuzzy control system (7.2), let f be the associated fuzzy function by the conjunction-based procedure and let p be the fuzzy program given by (8.1). Then, for any r ∈ X and t ∈ Y , f (r, t) = mp (Good(r, t)), i.e., f is the extension of the predicate Good in the least fuzzy Herbrand model of p. 20 Giangiacomo Gerla Proof. We observe only that, due to the one-level structure of the program p, mp = Tp2 (∅). Likewise, in order to give a logical interpretation of implication-based fuzzy control, we consider a new binary predicate symbol Bad and the following hierarchical fuzzy program p:   A1 (x) ∧ ¬B1 (y) → Bad(x, y) [1]      ...      An (x) ∧ ¬Bn (y) → Bad(x, y) [1]      [a1 (r)] A1 (r) (8.2) . . . . . .    An (r) [an (r)]      B1 (t) [b1 (t)]      . . . . . .     Bn (t) [bn (t)], where r ∈ X and t ∈ Y . The following theorem shows that the calculus of the fuzzy function f obtained by the implication-procedure is equivalent to the calculus of the least fuzzy Herbrand model of such a fuzzy program. Theorem 8.2. Consider the fuzzy control system (7.2), let g be the fuzzy function obtained by the implication-based procedure and let p be the fuzzy program defined by (8.2). Then, for any r ∈ X and t ∈ Y , g(r, t) =∽ mp (Bad(r, t)), i.e, g is the extension of the predicate ¬Bad in the canonical Herbrand model of p. Proof. It is immediate that mp (Bad(r, t)) = M axi=1,...,n {ai (r)⊗ ∽ bi (t)} and therefore that, ∽ mp (Bad(r, t)) =T M ini=1,...,n (∽ ai (r) ⊕ bi (t)) = i=1,...,n (ai → bi )(r, t) = g(r, t). Theorems 8.1 and 8.2 enable us to emphasize the different meaning of the two procedures (see, also, [3]). Indeed, while conjunction-based procedure is useful to give positive information (given r, the fuzzy subset good(r, y) of outputs that we consider good), the implication-based procedure is useful to manage negative information (given r, the fuzzy subset bad(r, y) of outputs 21 Fuzzy Logic Programming and Fuzzy Control. . . Figure 2. that we suggest to avoid). This gives the possibility of considering both the approaches at the same time. In fact we can consider a hierarchical fuzzy program containing both rules for the predicate Good and rules for the predicate Bad. As an example, we can consider the fuzzy program obtained by adding at the fuzzy program (8.1), the rule (¬Big(x)) ∧ (F ast(y) ∨ V erif ast(y)) → Bad(x, y) [1] able to define Bad and the rule Good(x, y) ∧ ¬Bad(x, y) → Optimum(x, y) [1] to compose the two different kinds of information. In such a case the fuzzy function we have to consider is the extension of the predicate Optimum and not to the extension of the predicate Good in the successive defuzzification process, obviously. In Figure 2 we represent both such a fuzzy function and the corresponding crisp function f ′ obtained by the defuzzification process. Notice that such an approach to fuzzy control is related with the approach sketched by P. Hájek in [10]. In fact, Hájek defined the predicate M amd(x, y) by the axiom M amd(x, y) ↔ (A1 (x) ∧ B1 (y)) ∨ ... ∨ (A1 (x) ∧ B1 (y)). It is immediate that in any H-model in which such an axiom is satisfied, the extension of the predicate M amd is the fuzzy relation defined in fuzzy control. Then, while we associate any IF-THEN system with a fuzzy program p, Hájek refers to the completion of p, in a sense. 22 Giangiacomo Gerla 9. Possible future researches on fuzzy control As a matter of fact the proposed immersion of fuzzy control into fuzzy logic programming uses only a very small piece of this theory. Then, we can try to extend fuzzy control taking in account the whole potentialities of fuzzy logic programming. For example, we can indicate the following research directions. 9.1. Learning the rules. In defining the fuzzy programs (8.1), we can assign to a rule Ai (x) ∧ Bi (y) → Good(x, y) a weight λi different form 1 as a measure of the corresponding ”degree of confidence” of the expert in such a rule. Then, the interpretation f of Good in the resulting canonical Herbrand model mp is obtained by the expression [ f= (λi ⊗ (ai × bi )). (9.1) i=1,...,n This means that, in the learning process, we can modify both the interpretations of the vague predicates and the parameters λ1 , ..., λn . Obviously, it is also possible that in such a process a parameter λi becomes equal to zero and therefore that the i-rule is deleted. 9.2. Further connectives and linguistic modifiers. We can consider a fuzzy logic with several kind of implication and further logical connectives in [0,1]. For instance, we can consider linguistic modifiers as ”Clearly” and ”V aguely” interpreted by the functions cl : [0, 1] → [0, 1] and vag : [0, 1] → [0, 1] defined by setting cl(x) = x2 and vag(x) = x0.5 , respectively. Then we can consider a fuzzy control able to manage rules as V aguely(Little(x)) ∧ F ast(y) → Good(x, y), Little(x) ∧ Clearly(Slow(y)) → Good(x, y) where V aguely(Little(x)) is interpreted by the fuzzy subset little(x)0.5 and Clearly(Slow(y)) is interpreted by the fuzzy set slow(y)2 . 9.3. Boolean algebras, bilattices and further structure for fuzzy control. We can imagine a fuzzy control based on a logic programming with a valuation structure L different from the interval [0,1]. For example, we can assume that S is a set of experts and that L is the power set Boolean algebra ℘(S). In such a case a fuzzy program p associates any clause α with the set p(α) of experts whose opinion is that α is valid. The interpretation Fuzzy Logic Programming and Fuzzy Control. . . 23 of a predicate symbol Ai is a map s : X → ℘(S) associating any element x ∈ X with the set s(x) of experts whose opinion is that Ai is satisfied by x. The same holds for the predicates Bi . In such a case if f : X × Y → ℘(S) is the resulting fuzzy function, then f (x, y) is the set of experts whose opinion is that y is the correct control answer given x. A similar interpretation is obtained by assuming that S is the set of past cases in a statistical data-base. Also, in accordance with [4], should be very interesting to assume that L is a bilattice based on [0, 1] × [0, 1]. The resulting fuzzy control should be able to manage both positive and negative information. 9.4 Rule chaining. The power of logic programming is mainly based on recursion and on many-steps deductions. Instead fuzzy control usually considers one-step deductions. Then, our translation suggests a fuzzy control able to define predicates which, in turn, are used to define new predicates and so on. A simple example is furnished in the previous section in defining Optimum from Good and Bad. To give a further example, assume that an element r in X exists such that a1 (r) = ... = an (r) = 0. Then f (r, t) = 0 for any t ∈ Y . This means that the proposed rules are not able to suggest a correct control given r. In such a case we can add to the rules used to define Good the default rule Undefined(x) ∧ Bydef ault(y) → Good(x, y), where, in turn, the predicate Undefined is defined by the rule: ¬A1 (x) ∧ ... ∧ ¬An (x) → U ndef ined(x) and the meaning of Bydef ault(y) is defined by further suitable rules. Giangiacomo Gerla Department of Mathematics and Computer Science University of Salerno Via Ponte don Melillo 84084 Fisciano (SA), Italy gerla@libero.it References [1] L. Biacino and G. Gerla. Recursively enumerable L-sets. Zeitschr. f. math. Logik und Grundlagen d. Math., 33:107–113, 1987. [2] C.V. Damásio and L.M. Pereira. Hybrid probabilistic logic programs as residuated logic programs. In G. Brewka and L.M. Pereira, editors, Logic in A.I., Proceedings of JELIA’00 LNAI 1919, pages 57–72. Springer-Verlag, 2000. 24 Giangiacomo Gerla [3] D. Dubois and H. Prade. What are fuzzy rules and how to use them. Fuzzy Sets and Systems, 84:169–185, 1996. [4] M. Fitting. Bilattices and the semantics of logic programming. Journal of Logic Programming, 11:91–116, 1991. [5] A. Fontana, F. Formato, and G. Gerla. Logic Programming and Soft Computing, chapter Fuzzy unification as a foundation of fuzzy logic programming, pages 51–68. Research Studies Press, 1998. [6] G. Gerla. Decidability, partial decidability and sharpness relation for L-subsets. Studia Logica, 46:227–238, 1987. [7] G. Gerla. Fuzzy logic: Mathematical Tools for Approximate Reasoning. Kluwer Academic Publishers, Dordrecht, The Netherlands, 2000. [8] G. Gerla. Fuzzy control as a fuzzy deduction system. Fuzzy Sets and Systems, 121:409–425, 2001. [9] J. A. Goguen. The logic of inexact concepts. In D. Dubois, H. Prade, and R. R. Yager, editors, Readings in Fuzzy Sets for Intelligent Systems, pages 417–441. Kaufmann, San Mateo, CA, 1993. [10] P. Hájek. Metamathematics of Fuzzy Logic, volume 4 of Trends in Logic. Kluwer Academic Publishers, Dordrecht, August 1998. [11] G. J. Klir and B. Yuan. Fuzzy sets and fuzzy logic: theory and applications. PrenticeHall, Inc., 1995. [12] E. Mamdani. Application of fuzzy logic to approximate reasoning using linguistic systems. Fuzzy Sets and Systems, 26:1182–1191, 1977. [13] J. Medina, M. Ojeda-Aciego, and P. Vojtáš. Multi-adjoint logic programming with continuous semantics. In Lecture Notes in Computer Science, volume 2173, pages 351–364, 2001. [14] J. Pavelka. On fuzzy logic I: Many-valued rules of inference. Zeitschr. f. math. Logik und Grundlagen d. Math., 25:45–52, 1979. [15] J. Pavelka. On fuzzy logic II: Enriched residuated lattices and semantics of propositional calculi. Zeitschr. f. math. Logik und Grundlagen d. Math., 25:119–134, 1979. [16] J. Pavelka. On fuzzy logic III: Semantical completeness of some many-valued propositional calculi. Zeitschr. f. math. Logik und Grundlagen d. Math., 25:447–464, 1979. [17] P. Vojtáš. Many valued logic programming handling uncertainty in A.I. In Proceedings of LACS, Warsawa, 1966. [18] P. Vojtáš. Fuzzy logic programming. Fuzzy Sets and Systems, 124:361–370, 2001. [19] L.A. Zadeh. Fuzzy logic and approximate reasoning. Synthese, 30:407–428, 1965. [20] L.A. Zadeh. Fuzzy Sets. Information and Control, 3:338–353, 1965.