Fu z Log Prog Control

download Fu z Log Prog Control

of 17

Transcript of Fu z Log Prog Control

  • 7/27/2019 Fu z Log Prog Control

    1/17

    1

    Fuzzy Logic Programming and Fuzzy Control

    by

    Giangiacomo Gerla

    Department of Mathematics and Computer Science

    Via S. Allende, 84081, Baronissi (Salerno) Italy

    Abstract. The paper concerns fuzzy logic programming. As an example, we show that is not

    restrictive to confine ourselves to fuzzy Herbrand interpretations in giving a semantics for fuzzy

    programs. Also, we show that the resulting apparatus gives a unifying theoretical framework for

    fuzzy control.

    Keywords: Fuzzy logic programming, Herbrand interpretation, fuzzy control.

    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. These predicates are interpreted by the notion of"fuzzy subset", 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]).

    In this paper at first we recall some basic notions in fuzzy logic programming, which are well

    known in literature (see, for example, [2], [13], [17] and [18]). 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. Hjek in

    [10]). This gives a unifying and rigorous framework for both conjunction-based and implication-based

    fuzzy control.

    LetL be a complete, completely distributive, lattice whose elements we call truth values and let Sbe a nonempty set. Then, an L-subsetorfuzzy subsetofSis any maps : S Lfrom StoL. Givenx S, we say that the values(x) is the membership degree of x to s. For any L, the set {xS:s(x)}is called the -cutofs. The subset Supp(s) = {xS:s(x) 0} is called thesupportofs. If0 denotesthe minimum and 1 the maximum ofL, then we call crisp anyL-subset whose values are in {0,1}. We

    can identify any subset XofSwith the crisp subset cX : S{0,1} such that cX(x) = 1 ifxXandcX(x) = 0 in the case that xX. In particular, we identify with the map constantly equal to 0 and Swith the map constantly equal to 1. We say that a fuzzy subset s is contained in a fuzzy subset s'

    provided thats(x) s'(x) for anyx S. In such a case, we writes s'. Given a family (si)iI of fuzzysubsets, the union U iIsiis the fuzzy subset defined by setting U iIsi(x) = Sup{si(x) : iI} for anyxS. The intersection I iIsi is defined by setting I iIsi(x) = Inf{si(x) : iI}. With respect to these

    operations, the class F(S)of all theL-subsets ofSis a complete lattice, i.e. the direct power ofL with

    set index S. Let S1,...,Snbe sets, then an n-ary L-relation on S1,...,Sn is any L-subset of the Cartesian

    product S1...Sn. A binary L-relationf: S1S2L is also called (non-deterministic)L-function fromS1 to S2.The idea is that, given the inputx S1, the output is not an element in S2but the fuzzy subset

    s : S2L of elements ofS2defined by setting s(y) =f(x,y)for anyyS2.Let be a binary operationinL and a : S1 L and b : S2L two fuzzy subsets ofS1 and S2, respectively. Then the -Cartesian

    product ab : S1S2L is defined by setting, for any (x,y) S1S2,(ab)(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:

  • 7/27/2019 Fu z Log Prog Control

    2/17

    2

    - a setLCoflogical connectives,

    - the universal quantifier,- a nonempty set Cofconstants,

    - a set OSofoperation symbols,

    - a setRSofrelation symbols,

    - an arity map ar: (RSOSLC)N.As usual, we consider also a sequencex1,x2, of symbols that we call variables and the brakets ( , ).

    Ifs is a symbol such that ar(s) = n, then we say thats 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,

    - ifh is an k-ary operation symbol and t1,...,tkare terms, then h(t1,...,tk) is a term.

    A term is groundif no variable occurs in it. Also, an atomic formula is an expression like r(t1,...,tn),

    where r is an n-ary relation symbol and t1,...,tn are terms. The whole set Fofformulas is defined by

    assuming that:

    - each atomic formula is a formula,

    - iflis an k-ary logical connective and 1,...,kare formulas, then l(1,...,k) is a formula,

    - ifis a formula andxia variable,then xi() is a formula.

    A formula is ground if no variable or quantifier occur in it, a ground atom is called a fact. Then aground formula is obtained from facts by the logical connectives. The notions offree occurrence of a

    variable in a formula, ofquantifier-free formula, ofuniversal formula and so on, are defined as usual.

    We write t(x1,...,xn) to emphasize that the variables occurring in the term t are among x1,...,xn and,

    similarly, (x1,...,xn)to emphasize that the variables in the formula are amongx1,...,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 ofL-subset.

    Definition 2.1. AnL-interpretation orfuzzy interpretation ofL is a pair (D,I), whereD is a nonempty

    set we call domain and I is a map associating any n-ary function symbol h with a function I(h) :

    DnD, any constant c with an element I(c) D and any n-ary relation symbol rwith an L-relation

    I(r):D

    n

    L

    .

    Sometimes we writeIto denote the fuzzy interpretation (D,I). We interpret the terms as in the classical

    case.

    Definition 2.2. Given a fuzzy interpretation (D,I) ofL and a term t(x1,...,xn), the interpretation oft is

    the mapI(t) : DnD 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)).

    To interpret the formulas, we assume that any n-ary logical connective lLCis associated with an n-ary operation l:L

    nL. The following definition enables us to associate any formula with the relatedextension.

    Definition 2.3. Given a formula (x1,...,xn), the extensionI(): DnLofis 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) =InfdDI()(d1,,di-1, d,di+1,,dp).

    Trivially, ifis 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 again byI() such a constant.

  • 7/27/2019 Fu z Log Prog Control

    3/17

    3

    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

    hypotheses orfuzzy theory any fuzzy set :FL

    of formulas.

    Definition 2.5. Let :FL be a fuzzy set of hypotheses. AnL-interpretation (D, I) is called a modelof(for short,I), if ||||I() for any F.

    Observe that, in accordance with such a definition of model, the value () is not intended as the truth

    value of but as a lower-bound constraint on the possible truth value of . In other words, the

    information carried on by a fuzzy set of hypothesis is that, for any formula "the truth value ofis

    greater than or equal to ()".

    Definition 2.6. Let : FL be a fuzzy set of hypotheses. Then the fuzzy set Lc() of logicalconsequences ofis defined by setting:

    Lc()() =Inf{||||I:I}. (2.1)The operatorLc : F(F)F(F) defined by (2.1) is called the logical consequence operator.

    In a sense,Lc()() is the best lower-bound constraint on the truth value ofthat we can find given

    the available information . It is easy to prove thatLc is a closure operator in the lattice F(F).

    3. Homomorphisms and preserving theorems

    Given twoL-interpretations (D,I) and (D',I'), we call homomorphism from (D,I) into (D',I')any mapf:

    DD'such that:-fis a homomorphism of the algebraic structures defined byIandI', i.e.,

    f(I(c)) =I'(c) ; f(I(h)(d1,...,dn)) =I'(h)(f(d1),...,f(dn)),for any c Cand any n-ary operation symbol h and d1,...,dnD,- for every n-ary relation r,

    I(r)(d1,...,dn) I'(r)(f(d1),...,f(dn)). (3.1)We say thatfisfullif

    I(r)(d1,...,dn) =I'(r)(f(d1),...,f(dn)). (3.2)

    An isomorphism is a homomorphism which is one-to-one and full. Equivalently, an isomorphism is an

    one-to-one homomorphism whose inverse is again a homomorphism. Observe that the notion of

    homomorphism does not depend on the interpretation of the logical connectives. Given an

    interpretation (D,I) and L, we call -cutofI the classical interpretation (D,I) defined by settingI(r) = C(I(r),) for any relation symbol r,I(c) = I(c) for any cCandI(h) = I(h) for any operationsymbol h.

    Proposition 3.1.Let(D,I) and(D',I') be two L-interpretations andf : DD' be a map. Then f is a(full) homomorphism from (D,I) into (D',I') if and only if, for anyL,f is a (full) homomorphism

    from the cut(D,I) into the cut(D',I'). Consequently, f is an isomorphism between (D,I) and(D',I') if

    and only if f is an isomorphism between the cuts (D,I) and(D',I')for any L.

    Proof. Assume thatf 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),).

  • 7/27/2019 Fu z Log Prog Control

    4/17

    4

    This proves thatfis a homomorphism from (D,I) into (D',I'). Conversely, assume that, for any L,fis a homomorphism from (D,I) into (D',I') and therefore that

    I(r)(d1,...,dn) I'(r)(f(d1),...,f(dn)) .Then, by setting =I(r)(d1,...,dn), we obtain thatI'(r)(f(d1),...,f(dn)) I(r)(d1,...,dn). This proves thatfisa homomorphism from (D,I) into (D',I'). The remaining part of the proof is trivial.

    As in classical logic, given a homomorphismfand a term t(x1,...,xn), for every d1,...,dnD,f(I(t)(d1,...,dn)) =I'(t)(f(d1),...,f(dn)). (3.3)

    Theorem 3.2. Let (D,I) and(D',I') be two fuzzy interpretations, (x1,...,xn) a quantifier-free formula

    and f:DD' be a full homomorphism. Then, for any d1,...,dnD,I()(d1,...,dn) =I'()(f(d1),...,f(dn)). (3.4)

    IfFis universal,I()(d1,...,dn) I'()(f(d1),...,f(dn)). (3.5)

    and therefore

    ||||I ||||I'. (3.6)

    Proof.We will prove (3.4) by induction on the complexity of. Indeed, assume is the atomic

    formula r(t1,...,tp), where ris an n-ary relation symbol and t1,...,tp are terms. 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(l(1,...,k))(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'(l(1,...,k))(f(d1),...,f(dn)).

    This proves the first part of the theorem. Let be an universal formula. We will prove (3.5) by

    induction on the numberm of quantifiers in . Ifm = 0, (3.5) follows from (3.4). Assume that m0and that is equal to a formula like xi(), where contains m-1 universal quantifiers. Then, inaccordance with the induction hypothesis and the inclusion {f(d) : dD} D',

    I(xi())(d1,...,dn) =InfdDI()(d1,...,d,...,dn)InfdDI'()(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, i.e. they satisfy each formula at the same degree.

    Theorem 3.3. Let fbe an isomorphism between (D,I) and(D', I'). Then for any formula , we have

    thatI()(d1,...,dn) =I'()(f(d1),...,f(dn)). (3.7)

    In particular,if(D,I) and(D', I') are isomorphic, then, for any formula ,

    ||||I= ||||I' .

    Proof. We prove (3.7) by induction on the complexity of. Ifis atomic, (3.7) was just proved in

    Theorem 3.2. Again, in proving Theorem 3.2 we showed that if l is a logical k-ary connective and

    1,...,k are formulas satisfying (3.7), then l(1,...,k) satisfies (3.7). Assume that satisfies (3.7).

    Then, since {f(d) : dD} =D',I(xi)(d1,...,dn) =InfdDI()(d1,,d,,dp)

    =InfdDI'()(f(d1),,f(d),,f(dp)) =Infd'D'I'()(f(d1),,d',,f(dp))

  • 7/27/2019 Fu z Log Prog Control

    5/17

    5

    =I'(xi()(f(d1),...,f(dn)).Thus, (3.7) is satisfied by any formula.

    4. Fuzzy Herbrand interpretations and universal theories.

    As usual, we callHerbranduniverse the set Uofgroundterms of the language L andHerbrand base

    the setBL offacts, i.e. atomic ground formulas ofL.

    Definition 4.1. AnL-interpretation (D,I) is anL-Herbrand interpretation (for shortH-interpretation)

    provided that:

    -D is equal to the Herbrand universe U,

    - for any n-ary operation symbol h,I(h)(t1,...,tn) = h(t1,...,tn),

    - for any constant c,I(c) =c.

    Then, twoH-interpretations differ only for the relational part. As in the classical case, we can identify

    theH-interpretations with the fuzzy subsets ofBL.

    Proposition 4.2. There is a one-one-correspondence between the H-interpretations and the fuzzy

    subsets of BL. Namely, we associate any H-interpretation (U,I) with the fuzzy subsetsI ofBL defined

    by setting:

    sI(r(t1,...,tn)) = I(r(t1,...,tn)),

    for any fact r(t1,...,tn). Moreover, we associate any fuzzy subset s of BL with the H-interpretation

    (U,Is) where, for any n-ary relation symbol r, Is(r) is the fuzzy relation in U defined by setting

    Is(r)(t1,...,tn) =s(r(t1,...,tn))

    for any t1,...,tn in U.

    In account of such a proposition, in the following we call H-interpretation any fuzzy subset ofBL.To prove some basic properties of the H-interpretations, 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 eachxiwith tiin t(x1,...,xn). Trivially, iftis ground, then t(t1,...,tn) is equal to t. Likewise,

    given the formula (x1,...,xn), if t1,...,tn are terms, (t1,...,tn) denotes the formula obtained from

    (x1,...,xn) by substituting each variable xi which is free in with ti. Trivially, if is closed, then

    (t1,...,tn) coincides with .

    Proposition 4.3. Let(U,I) be an H-interpretation, t(x1,...,xn) to be a term and t1,...,tnU. 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)

    Consequently,

    ||x1...xn()||I =Inf{||(t1,...,tn)||I : t1,...,tnU}. (4.3)

    Proof. We will prove (4.1) by induction on the complexity oftas in the classical case. Indeed, ift

    is either a variable or a constant, then (4.1) is obvious. Assume that (4.1) is satisfied by the terms

    s1,...,skand let h be an k-ary operation symbol. Then (4.1) is satisfied by t= h(s1,..,sm). Indeed,

    I(t)(t1,..,tn) = I(h)(I(s1)(t1,...,tn),...,I(sm)(t1,...,tn))

    = I(h)(s1(t1,...,tn),...,sk(t1,...,tn)) = h(s1(t1,...,tn),...,sm(t1,...,tn)) = t(t1,...,tn).

  • 7/27/2019 Fu z Log Prog Control

    6/17

    6

    Again, we will prove (4.2) by induction on the number n() of connectives and quantifiers in .

    Indeed, assume that n() = 0, and therefore that is an atomic formula as r(s1,...,sm). Then

    I()(t1,...,tn) = I(r)(I(s1)(t1,...,tn),...,I(sm)(t1,...,tn))

    = I(r)(s1(t1,...,tn),..., sm(t1,...,tn)) = I(r(s1(t1,...,tn),..., sm(t1,...,tn))

    = ||(t1,...,tn)||I.

    Assume that n() 0 and that = l(1,...,k). Then, since n(1)

  • 7/27/2019 Fu z Log Prog Control

    7/17

    7

    Lc()() =Inf{||||I : Iis an H-model of}. (4.7)

    Proof. Let be a fact. Then, since by (4.4), ||||I= ||||I,

    Lc(a)() =Inf{||||I:Iis a model of}=Inf{||||I: I is theH-interpretation associated with a modelIof}.

    =Inf{||||I : I is anH-model of}.

    Let :FL be a universal fuzzy theory. Then we define thefuzzy setGr() of ground instances ofthe formulas inby setting, for every formula,

    0 ifis not ground,

    Gr()() =

    Sup{(x1...xn(')) : = '(t1,...,tn) for some t1,...,tnU}, otherwise.

    The following theorem shows that if is an universal theory, then and Gr() have the same H-

    models.

    Theorem 4.7.Letbe an universal fuzzy theory, then, for anyH-interpretation I,

    I IGr().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) forsome t1,...,tnU. Then

    ||||I ||x1...xn(')||I(x1...xn(')).Consequently,

    ||||ISup{(x1...xn(')) : = '(t1,...,tn) for some t1,...,tnU} = Gr()(),

    and this proves thatIis a model ofGr().Conversely, let I be a H-model of Gr() and let x1...xn(') be any closed universal formula.

    Then, in accordance with the definition ofGr(), given t1,...,tn in U,

    ||'(t1,...,tn)||I Gr()('(t1,...,tn)) (x1...xn(')).Thus,

    ||x1...xn(')||I=Inf{||'(t1,...,tn)||I : t1,...,tnU} (x1...xn('))

    and this proves thatIis a model of.

    5. Fuzzy logic programming

    In this section and in Section 6 we will expose some definitions and results which are well known in

    literature (see, for example, [2], [13], [17] and [18]). To define the notion of fuzzy program, we

    assume that a sequence 1,,k of commutative and associative operations is defined in L. Weassume also that, for anyx inL,xk1 =x and, for any family (yj)jJof elements inL,

    xi(SupjJyj) = SupjJ(xiyj).

    Under these conditions, we can define the implication operationsi by setting, for anyx,yL,xiy = Sup{zL :xizy}.

    It is easy to prove that each pairiand isatisfies the adjunction property, i.e,for any a, b,x inL,aib x bxia.

    We suppose that L contains logical connectives 1,,kcorresponding to the operations1,,k.Let L

    *be the sentential calculus whose logical connectives are the same as in L . Then we write

    h(p1,...,pn) to denote a formula ofL*

    whose propositional variables are among p1,...,pn. As usual, we

  • 7/27/2019 Fu z Log Prog Control

    8/17

    8

    can associate any formula h(p1,...,pn) with a truth-tableh :LnL. Let 1,...,nbe atomic formulas of

    L and h(1,...,n) be the formula in L obtained from h(p1,...,pn) by substituting each occurrence ofpi

    with i. Then we say that h(1,...,n) is a combination of the formulas 1,...,n. Ifh preserves the least

    upper bounds (and therefore is monotone), then we say that h(1,...,n) is a positive combination of

    1,...,n. Trivially, this happens every time h(p1,...,pn) is defined only by conjunctions and disjunctions

    interpreted by continuous norms and co-norms, respectively.

    Definition 5.1. A (positive) implicative clause is either an atomic formula or a formula like

    h(1,...,n)iwhere , 1,,n are atomic formulasand h(1,...,n) is a (positive) combination of1,,n. A fuzzy subsetp:FL of formulas is a (positive,ground)fuzzy program ifSupp(p) is a setof (positive, ground) implicative clauses.

    A simple characterization of the fuzzy models of a fuzzy program is the following.

    Proposition 5.2.Let p :FL be a fuzzy program and(D,I) be an interpretation. Then I is a fuzzymodel of p if and only if,

    i) I()(d1,...,d

    h) p()

    for any atomic formula Supp(p) and d1,...,dh in D ;ii) I()(d1,...,dh) p(h(1,...,n)i)ih(I(1)(d1,...,dh),...,I(n)(d1,...,dh))

    for any implicative clause h(1,...,n)iinSupp(p) andd1,...,dh in D.

    Proof. An interpretationIis a model ofp if and only if,

    ||||I=Inf{I()(d1,...,dh) : d1,...,dhD}p()for any atomic formula Supp(p) and

    ||h(1,...,n)i||I=Inf{I(h(1,...,n)i)(d1,...,dh) : d1,...,dhD}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 inD and therefore it is equivalent with i). The second condition isequivalent to say that, for any d1,...,dh inD,

    I(h(1,...,n)i)(d1,...,dh) = h(I(1)(d1,...,dh),...,I(n)(d1,...,dh))iI()(d1,...,dh)p(h(1,...,n)i).

    By the adjunction property, such an inequality is equivalent with ii).

    By Propositions 4.2, 5.2 and Theorem 4.7, we obtain the following theorem:

    Theorem 5.3.Let p :FL 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 factSupp(Gr(p)),i) s() Gr(p)()and, for any implicative clause h(1,...,n)iinSupp(Gr(p)),ii) s() Gr(p)(h(1,...,n)i)i h(s(1)...,s(n)).

    To calculate theH-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 : FL be a fuzzy program. Then the immediate consequence operatorassociated withp is the operatorTp : F(BL) F(BL) defined by setting, for anysF(BL) and BL,

    T1(s)() = Gr(p)()s(),T2(s)() = ( ))((),...,( 1 pGrSupph in

    Sup Gr(p)(h(1,...,n)i)ih(s(1),...,s(n))),

    Tp(s) = T1(s)T2(s).

  • 7/27/2019 Fu z Log Prog Control

    9/17

    9

    Observe that Tp is not monotonic, in general and that inclusion property Tp(s)s is satisfied bydefinition. As in the classical case, the immediate consequence operator enables us to give the

    following elegant and useful characterization of theH-models of a fuzzy program.

    Theorem 5.5.Let p :FLbe a fuzzy program ands F(BL). Thens is an H-model ofpif and only

    if s is a fixed point forthe immediate consequence operator Tp.

    Proof. It is sufficient to apply Theorem 5.3. Indeed, let s be a fixed point forTp, i.e. assume that

    Tp(s)s. Then we have 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 condition i) is satisfied. Let h(1,...,n)ibe a ground implicativeclause in Supp(Gr(p)). Then, since

    s() T2(s)() = ))((),...,( 1 pGrSupph inSup Gr(p)(h(1,...,n)i) i h(s(1),...,s(n)),

    we have that

    s() Gr(p)(h(1,...,n)i) i h(s(1),...,s(n))for any h(1,...,n)iin Supp(p). Hence, condition ii) is satisfied. This proves thats is aH-model of

    p.

    Conversely, assume thats is aH-model ofp and therefore that both i) and ii) are satisfied. Then, byi), we have that, for any fact,s() Gr(p)() and therefores() T1(). Moreover, by ii),

    s() Gr(p)(h(1,...,n)i) ih(s(1),...,s(n))and therefore

    s() ( ))((),...,( 1 pGrSupph inSup Gr(p)(h(1,...,n)i)ih(s(1),...,s(n)))s() = T2(s)().

    This proves thats() Tp(s)(). Thus,s is a fixed point forTp.

    6. Calculus of the fuzzy Herbrand models.

    In accordance with Theorem 5.3, any fuzzy program p admits as a H-model the map s : BLLconstantly equal to 1. We are interested to the H-models which represents, in a sense, the informative

    content ofp.As an example, we are interested to the least Herbrand modelof a programp, i.e. to aH-

    model mp:BLLofp which is contained in anyH-model ofp. In order to prove the existence ofmpand to calculate mp, we recall some basic results in the theory of fixed points in a complete lattice. We

    say that a family (si)iI of fuzzy subsets of a set Sis directedprovided that for everysiand sj there issh

    such thatsish andsjsh.An operatorJ: F(S) F(S) is continuousprovided that

    J(iIsi) = iIJ(si)

    for any directed family (si)iI of fuzzy subsets of S. A continuous almost closure operator is a

    continuous operatorJsuch thatJ(s) s.

    Proposition 6.1.LetJ1 : F(S) F(S) and J2 : F(S) F(S) be two operators satisfying the continuity

    property. Then the unionJ=J1J2satisfies the continuity property.

    Proof. Let (sj)jJbe a directed family of fuzzy subsets ofS. Then

    J(U iIsi) =J1(U iIsi)J2(U iIsi) = (U iIJ1(si))( U iIJ2(si)) = U {J1(si)J2(sj) : iI,jI}.Now, since (sj)jJ is directed, we have that any iIandjI, there is hIsuch thatsish andsjsh, andthereforeJ1(si) J1(sh) andJ2(sj)J2(sh). Then,

    J(U iIsi) = U {J1(si)J2(sj) : iI,jI}= U hI(J1(sh)J2(sh)) = U hIJ(sh).

    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:

  • 7/27/2019 Fu z Log Prog Control

    10/17

    10

    - the class of fixed points of J is a closure system, i.e. it is closed under arbitrary intersections,

    - the least fixed point operatorD : F(S) F(S) defined by setting, for any fuzzy subset s,

    D(s) = I {s':J(s) =s,s's},is a closure operator

    - for any fuzzy subset s,

    D(s) = U nNJn

    (s). (6.1)

    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= I {s F(BL) :s is a model ofp}. (6.2)Moreover,

    mp = U nNTpn(). (6.3)

    Proof. Let T1 and T2 be as in Definition 5.4. Then it is immediate that T1 satisfies the continuityproperty.To prove that T2 satisfies the continuity property, we assume that (sj)jJ is a directed family

    of fuzzy subsets ofBL. Moreover, in order to simplify our notations, we denote the expression

    ))((),...,( 1 pGrSupph inSup by Sup. Then

    T2(UjJsj)() = Sup{Gr(p)(h(1,...,n)i)ih(SupjJsj(1),..., SupjJsj(n))}= Sup{Gr(p)(h(1,...,n)i)i(Supj(1),...,j(n)h(sj(1)(1),...,sj(n)(n))}.

    Now, we observe that, since (sj)jJis directed, givensj(1),..., sj(n) there isjJsuch thatsj(1)sj,..., sj(n)sjand therefore h(sj(1)(1),..., sj(n)(n)) h(sj(1),..., sj(n)). Consequently,

    T2(UjJsj)() = Sup{Gr(p)(h(1,...,n)i)(SupjJh(sj(1),..., sj(n))}= SupjJSup{Gr(p)(h(1,...,n)i)(h(sj(1),..., sj(n))}

    = SupjJT2(sj)() = UjJT2(sj)()and this proves that T2is continuous. The remaining part of the theorem is trivial.

    Equation (6.3) suggests an algorithm to calculate, for any fact , the value mp(). More precisely, if

    we adopt the definition of recursive enumerability for fuzzy sets proposed in [1] and [6], then, under

    very natural hypotheses, it is easy to show that mp is a recursively enumerable fuzzy subset ofBL.

    The following theorem shows that the least fuzzy Herbrand model of a positive fuzzy program

    represents the informative content ofp.

    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 formula (6.2), for any fact ,

    Lc(p)() =Inf{||||I : Iis 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 : BLN 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) inSupp(Gr(p)), lev()>lev(1),..., lev()>lev(n). Trivially, it is no restrictive to assume that the level of

    the atomic formulas is equal to 1.

  • 7/27/2019 Fu z Log Prog Control

    11/17

    11

    Proposition 6.5.Let p be a hierarchical fuzzy program. Then, for any BL,

    lev() n Tpn+1

    ()() = Tpn()() (6.5)

    Consequently,U Nnn

    pT )( 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 1, that lev()n and that h(1,n)i is a rule in Supp(Gr(p)). Then, sincelev(i)

  • 7/27/2019 Fu z Log Prog Control

    12/17

    12

    Then, in fuzzy control such a system can be interpreted in two different ways. In the conjunction-

    basedfuzzy control we consider the following procedure:

    - Step 1. A tentative interpretation of the constants A1,...,An,B1,...,Bnby 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 "IFx isAiTHENy isBi" is associated with thefuzzy pointaibi obtained as the -Cartesianproduct of the fuzzy quantities aiand bi.- Step 3. The whole system of rules is associated with the fuzzy function f:XY [0,1] defined as anunion of these fuzzy points, i.e.

    f= U i=1,...,n(aibi). (7.3)- 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 rX,

    =

    Y

    Y

    dyyrf

    dyyyrfrf'

    ),(

    ),()(

    - Step 5. Iff'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, onegoes 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 (6.1), setX= [0,10], Y= [0,5] and interpret the constantsLittle, Small,Medioum, Big, Verybig,

    Slow,Moderate,Fast, Veryfastby suitable triangle functions:

    Also, consider the triangular norm of the minimum. Then, the following picture represents both the

    corresponding fuzzy functionfand the crisp functionf'.

  • 7/27/2019 Fu z Log Prog Control

    13/17

    13

    In the implication-basedprocedure (see, for example, [11]), instead of steps 2 and 3 we have:

    - Step 2'. Each rule "IFx is AiTHEN y is Bi"is associated with the fuzzy relation aibi defined bysetting, for anyx XandyY, (aibi)(x,y) = ai(x)bi(y).- Step 3'. The whole system of rules is associated with the fuzzy function:

    g= I i=1,...,n(aibi). (7.4)

    8. Fuzzy control and 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. Indeedassume that ris an input such thatLittle(r) is false. Then the formulaLittle(r)Slow(t) is true for any tin Yand therefore any tYgives a correct control.

    As a consequence of such 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 numberf(r,t) is the truth degree of

    the claim "t is a good answer given r".This means that f is obtained as an interpretation of a vague

    predicate Goodin a multivalued first-order logic. Namely, we show that fis the interpretation ofGoodin the least fuzzy Herbrand model of a suitable fuzzy program. To illustrate this idea, we consider the

    multivalued logic defined by 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 theconjunction and the negation connectives, respectively. The disjunction is interpreted by the co-norm

    defined by settingxy = (xy) and the implication by the operation defined by settingxy= (x)y. Also, the language L contains a binary relation symbol Goodand unary predicate symbols.Also, we consider each element r in X and t in Y as a constant and therefore we assume that the

    Herbrand universe is XY. 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 rXand tY. More precisely,p is defined by setting

    1 if is the clauseAi(x)Bi(y) Good(x,y),ai(r) ifis the fact Ai(r), rXp() =

    bi(t) ifis the factBi(t), tY0 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 rX, we havesetp(Ai(t)) = 0 for any tY,and that whilep(Bi(t)) = bi(t) for any tY, we have setp(Ai(r)) = 0 for anyrX(it is not restrictive to assume that XY= ). A better alternative should be to extend the resultsof this paper into a two sorted logic, one type for the elements in Xand one type for the elements in Y.

    The following theorem shows that the calculus of the fuzzy function fobtained by the conjunction-

  • 7/27/2019 Fu z Log Prog Control

    14/17

    14

    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 procedure and let p be the fuzzy program given by (8.1). Then,for any rXand tY,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.

    Proof. We observe only that, due to the one-level structure of the programp, mp= Tp2().

    Likewise, in order to give a logical interpretation of implication-based fuzzy control, we consider a

    new binary predicate symbolBadand the following hierarchical fuzzy programp:

    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 rXand tY. The following theorem shows that the calculus of the fuzzy functionfobtained bythe implication-procedure is equivalent to the calculus of the canonical 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-procedure and let p be the fuzzy program defined by (8.1). Then, for any rXand tY,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)) =Maxi=1,...,n{ai(r)bi(t)}and therefore that,mp(Bad(r,t)) =Mini=1,...,n ~(ai(r)~bi(t))

    =Mini=1,...,n (~ai(r)bi(t)) = i=1,...,n(ai(r)bi(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 subsetgood(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 that we suggest to avoid).

    Also, this approach enables us to consider both the approaches at the same time. In fact we can

    consider a hierarchical fuzzy program containing both rules for the predicate Goodand rules for the

    predicateBad. As an example, we can consider the hierarchical fuzzy program obtained by adding at

    the fuzzy program (8.1), the rule

    (Big(x))(Fast(y)Verifast(y)) Bad(x,y) [1]able to defineBadand 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 Goodin

    the successive defuzzification process, obviously. In the following picture we represent both such a

    fuzzy function and the corresponding crisp functionf'obtained by the defuzzification process.

  • 7/27/2019 Fu z Log Prog Control

    15/17

    15

    Notice that such an approach to fuzzy control is related with the approach sketched by P. Hjek in

    [10]. In fact, Hjek defined the predicateMamd(x,y) by the axiom

    Mamd(x,y) (A1(x)B1(y)) (A1(x)B1(y)).It is immediate that in anyH-model in which such an axiom is satisfied, the extension of the predicate

    Mamdis the fuzzy relation defined in fuzzy control. Then, while we associate any IF-THEN system

    with a fuzzy programp, Hjek refers to the completion ofp.

    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 researchdirections.

    9.1. Learning process. In defining the fuzzy programs (8.1), we can assign to a rule Ai(x)Bi(y) Good(x,y) a weight idifferent form 1 as a measure of the corresponding degree of confidence of

    the expert in such a rule. Then, the interpretationfofGoodin the resulting canonical Herbrand model

    mp is obtained by the expression

    f= U i=1,...,n (i(aibi)). (9.1)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 kindof implication and further logical connectives in [0,1]. For instance, we can consider linguistic

    modifiers as "Clearly"and "Vaguely"interpreted by the functions cl: [0,1] [0,1] and vag: [0,1][0,1] defined by setting cl(x) =x

    2and vag(x) =x

    0.5for anyx[0,1], respectively. Then we can consider

    a fuzzy control able to manage rules as

    Vaguely(Little(x)) Fast(y) Good(x,y),Little(x) Clearly(Slow(y)) Good(x,y)

    where Vaguely(Little(x)) is interpreted by the fuzzy subset little(x)0.5 and Clearly(Slow(y)) is

    interpreted by the fuzzy setslow(y)2.

  • 7/27/2019 Fu z Log Prog Control

    16/17

    16

    9.3. Fuzzy control based on bilattices. 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 expert and that L is the power set Boolean algebra (S). In such a case afuzzy programp associates any clause with the setp() of experts whose opinion is that is valid.

    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 GoodandBad. To give

    a further example, assume that an element rinXexists such that a1(r) = ... = an(r) = 0. Thenf(r,t) = 0

    for any tY. This means that the proposed rules are not able to suggest a correct control given r. Insuch a case we can add to the rules used to define Goodthe default rule

    Undefined(x)By_default(y) Good(x,y),Where, in turn, the meaning of the predicate Undefinedis furnished by the rule:

    A1(x)...An(x) Undefined(x)

    and the meaning ofBy_default(y) is defined by suitable rules.

    References

    1. Biacino L., Gerla G., Recursively enumerableL-sets,Zeitschr. f. math. Logik und Grundlagen d.

    Math., 33 (1987) pp. 107-113.

    2. Damsio C.V., Pereira L.M., Hybrid probabilistic logic programs as residuated logic programs.

    In M.O. Aciego, I.P. de Guzmn, G. Brewka, and L.M. Pereira Editors, Logic in A.I.,

    Proceedings of JELIA00, LNAI 1919, Springer-Verlag, 2000, pp. 57-72.

    3. Dubois D., Prade H., What are fuzzy rules and how to use them, Fuzzy Sets and Systems, 84

    (1996) pp. 169-185.

    4. Fitting M., Bilattices and semantics of logic programming, Journal of Logic Programming, 11

    (1991) pp. 91-116.

    5. Fontana A., Formato F., Gerla G., Fuzzy unification as a foundation of fuzzy logic programming.

    In Logic Programming and Soft Computing, (T. P. Martin and F. Arcelli Fontana Eds.) .

    Research Studies Press, 1998, pp. 51-68.

    6. Gerla G., Decidability, partial decidability and sharpness relation for L-subsets, Studia Logica, 46

    (1987) pp. 227-238.

    7. Gerla G., Fuzzy logic: Mathematical Tools for Approximate Reasoning, Kluwer Academic

    Publishers, Dordrecht, The Netherlands, 2000.

    8. Gerla G., Fuzzy control as a fuzzy deduction system,Fuzzy Sets and Systems, 121(2001) pp. 409-

    425.

    9. Goguen J. A., The logic of inexact concepts, Synthese, 19 (1968/69) pp. 325-373.

    10. Hjek P., Metamathematics of Fuzzy Logic, Kluwer Academic Publishers, Dordrecht, The

    Netherlands, 1998.11. Klir G., Yuan B.,Fuzzy sets and fuzzy logic; theory and applications, Prentice Hall, Englewood

    Cliffs, N. Y. (USA), 1995.

    12. Mamdani, E., Application of fuzzy logic to approximate reasoning using linguistic systems,Fuzzy

    Sets and Systems 26 (1977) pp. 1182-1191.

    13. Medina J., Ojeda-Arciego M., Vojtas P., Multi-adjoint logic programming with continuous

    semantics. InProc. LPNMR01, 2001, to appear.

    14. Pavelka J., On fuzzy logic I: Many-valued rules of inference, Zeitschr. f. math. Logik und

    Grundlagen d. Math., 25 (1979) pp. 45-52.

    15. Pavelka J., On fuzzy logic II: Enriched residuated lattices and semantics of propositional calculi,

    Zeitschr. f. math. Logik und Grundlagen d. Math., 25 (1979) pp. 119-134.

  • 7/27/2019 Fu z Log Prog Control

    17/17

    17

    16. Pavelka J., On fuzzy logic III: Semantical completeness of some many-valued propositional

    calculi,Zeitschr. f. math. Logik und Grundlagen d. Math., 25 (1979) pp. 447-464.

    17. Vojtas P., Many valued logic programming handling uncertainty in AI, Proceedings of LACS,

    Warsawa, 1966.

    18. Vojtas P., Fuzzy logic programming,Fuzzy Sets and Systems, 124 (2001) pp. 361-370.

    19. Zadeh L.A., Fuzzy Sets,Information and Control, 12 (1965) pp. 338-353.

    20. Zadeh L.A., Fuzzy logic and approximate reasoning, Synthese, 30 (1965) pp. 407-428.