towards a fuzzy logic programming system: a fuzzy propositional logic

11
Towards a fuzzy logic programming system: a fuzzy propositional logic Paul C Rhodes and Sabah Merad Menani This paper formally develops a type of propositional fuzzy logic which is analogous to traditional two- valued logic. A complete set of fuzzy qualifiers are defined for the first time, and as a consequence a corresponding set of modifiers. In addition, a set of rules for combining those qualifiers in a proposition have been developed. Once these rules have been established, a definition of formulae in the context of propositional fuzzy logic is proposed and a theory of inference is deduced. Keywords: computational reasoning, logic program- ming, fuzzy logic, qualifiers, modifiers, connectives INTRODUCTION Formal logic has proved to be a very powerful reasoning mechanism and has been successfully imple- mented for computational reasoning in Horn clausal form i.e. Prolog. This form of logic, while very sound, is restrictive and not particularly expressive. In particu- lar, it is restricted to providing 'true' and 'not provably true' replies and can only be used where there is no uncertainty. Many authors have proposed methods of overcoming these restrictions, but few of them make serious progress in a formal mathematical sense. One formal- ism which has progressed is based on fuzzy set theory 1 . In this theory, the members of the set are not necessarily 'full' members and hence membership is uncertain. Several approaches were proposed 2-14. The one which is of interest in this paper is Zadeh's fuzzy logic 15 which is based on the theory of possibility 16-18. A natural extension to the theory of fuzzy logic would be to use it to achieve a theoretical foundation for fuzzy logic programming. The following au- Department of Computing, University of Bradford, Bradford BD7 1DP, UK Paper received 17 January 1990. Revised 24 November 1990. Accepted 3 October 1990 thors 19-31 have partially accomplished this aim but so far none of them have dealt with all the features of fuzzy logic, in particular with fuzzy quantifiers, quali- fiers and modifiers. This work, which is part of a forthcoming PhD thesis 32, undertakes the first stage of this task by proving that, given well behaved membership func- tions, a formal propositional fuzzy logic can be ex- pounded which includes qualifiers and modifiers. Conventions The first-order fuzzy theories proposed here are a generalization of the traditional first-order theories, and consequently if every symbol in a theory is crisp then that theory should be entirely equivalent to the corresponding traditional theory. All fuzzy symbols can be either numerical or linguistic. However, throughout this paper, linguistic symbols are chosen for the sake of clarity 33-37. Statement of the problem Fuzzy logic can become somewhat involved when treated formally and the formalism can quickly conceal the underlying objectives of the work. For this reason, this section discusses informally the purpose of this paper, namely to lay the foundation for ultimately deriving a Horn clause form of propositional fuzzy logic. In the traditional logic 38-39 there are three forms, namely propositional logic, first-order logic and clausal form logic. Fuzzy logic allows the use of fuzzy predicates, has additional entities to consider, namely qualifiers and modifiers, and the role of quantifiers is greatly extended. The inclusion of these into the theory will require considerable modifications to the above steps so it is important to understand their nature. In addition, since the modifications of the above steps will be quite detailed in their own right, it is pertinent to develop the mathematics required for manipulating qualifiers, modifiers, quantifiers and connectives prior to starting the derivation of the fuzzy clausal form. 52 0950-7051/91/010052-11 © 1991 Butterworth-Heinemann Ltd Knowledge-Based Systems

Upload: paul-c-rhodes

Post on 26-Jun-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Towards a fuzzy logic programming system: a fuzzy propositional logic

Towards a fuzzy logic programming system: a fuzzy

propositional logic

Paul C Rhodes and Sabah Merad Menani

This paper formally develops a type of propositional fuzzy logic which is analogous to traditional two- valued logic. A complete set of fuzzy qualifiers are defined for the first time, and as a consequence a corresponding set of modifiers. In addition, a set of rules for combining those qualifiers in a proposition have been developed. Once these rules have been established, a definition of formulae in the context of propositional fuzzy logic is proposed and a theory o f inference is deduced.

Keywords: computational reasoning, logic program- ming, fuzzy logic, qualifiers, modifiers, connectives

INTRODUCTION

Formal logic has proved to be a very powerful reasoning mechanism and has been successfully imple- mented for computational reasoning in Horn clausal form i.e. Prolog. This form of logic, while very sound, is restrictive and not particularly expressive. In particu- lar, it is restricted to providing 'true' and 'not provably true' replies and can only be used where there is no uncertainty.

Many authors have proposed methods of overcoming these restrictions, but few of them make serious progress in a formal mathematical sense. One formal- ism which has progressed is based on fuzzy set theory 1 . In this theory, the members of the set are not necessarily 'full' members and hence membership is uncertain. Several approaches were proposed 2-14. The one which is of interest in this paper is Zadeh's fuzzy logic 15 which is based on the theory of possibility 16-18.

A natural extension to the theory of fuzzy logic would be to use it to achieve a theoretical foundation for fuzzy logic programming. The following au-

Department of Computing, University of Bradford, Bradford BD7 1DP, UK

Paper received 17 January 1990. Revised 24 November 1990. Accepted 3 October 1990

thors 19-31 have partially accomplished this aim but so far none of them have dealt with all the features of fuzzy logic, in particular with fuzzy quantifiers, quali- fiers and modifiers.

This work, which is part of a forthcoming PhD thesis 32, undertakes the first stage of this task by proving that, given well behaved membership func- tions, a formal propositional fuzzy logic can be ex- pounded which includes qualifiers and modifiers.

Conventions

The first-order fuzzy theories proposed here are a generalization of the traditional first-order theories, and consequently if every symbol in a theory is crisp then that theory should be entirely equivalent to the corresponding traditional theory. All fuzzy symbols can be either numerical or linguistic. However, throughout this paper, linguistic symbols are chosen for the sake of clarity 33-37 .

Statement of the problem

Fuzzy logic can become somewhat involved when treated formally and the formalism can quickly conceal the underlying objectives of the work. For this reason, this section discusses informally the purpose of this paper, namely to lay the foundation for ultimately deriving a Horn clause form of propositional fuzzy logic.

In the traditional logic 38-39 there are three forms, namely propositional logic, first-order logic and clausal form logic. Fuzzy logic allows the use of fuzzy predicates, has additional entities to consider, namely qualifiers and modifiers, and the role of quantifiers is greatly extended. The inclusion of these into the theory will require considerable modifications to the above steps so it is important to understand their nature. In addition, since the modifications of the above steps will be quite detailed in their own right, it is pertinent to develop the mathematics required for manipulating qualifiers, modifiers, quantifiers and connectives prior to starting the derivation of the fuzzy clausal form.

52 0950-7051/91/010052-11 © 1991 Butterworth-Heinemann Ltd Knowledge-Based Systems

Page 2: Towards a fuzzy logic programming system: a fuzzy propositional logic

Therefore, this paper undertakes the definition of propositional fuzzy logic.

P R O P O S I T I O N A L F U Z Z Y L O G I C

Fuzzy logic defines a proposition to be 'F is G' where G is a fuzzy set on a universe of discourse U, F takes its value in U and G is a restriction on F. Such proposi- tions are fuzzy atoms since they have no logical connectives. Atoms can be combined to form more complex formulae using connectives. Any atomic or complex formula can be qualified and/or modified. Consequently statements like

Boats can be used for fishing when the sea is likely to be rough, if the boats are not too small.

can be expressed in propositional fuzzy logic as: (sea is rough is likely and boat is not too small)---, boat can be used for fishing

In order to do this, one must consider the various ways in which the qualifiers, modifiers and connectives are used. We will start by considering qualifiers.

Qualifiers Qualifiers play a very important role in fuzzy proposi- tions because they give meaning to the truth or falsity of the proposition. There are three types of qualifier namely truth, possibility and probability. It is impor- tant to establish precisely what qualified propositions mean. Firstly, it is important to realize that, in traditional logic, the nature of the atomic formula is unimportant. It is the truth of the atomic formula which is all important. Similarly, in propositional fuzzy logic, we are not primarily interested in the possibility distribution of the proposition eg 'the boat is small', we are actually interested in how true, possible and probable, the proposition is. Consequently, it is the fuzzy sets which represent the truth of the propositions which must be manipulated. This approach has also been adopted by Baldwin 2° and some of his techniques are used in this work.

Truth qualifiers It is now necessary to consider fuzzy truth qualifiers in detail. It must be stressed at this stage that the truth qualifiers are not an interval in the truth domain, they are fuzzy sets which specify the possibility of every truth value in the truth domain. As such they are effectively defined by their membership function. These membership functions are continuous functions mapping the truth domain [0,1] onto the possibility domain [0,1]. However, since each of these truth qualifiers will have a linguistic label, e.g. very true, it is pertinent to have a set of discrete functions one for each truth qualifier. A suitable set may well he:

absolutely.__false very__false

false fairly___false

not___absolutely___true

absolutely_true very__true

true fairly__true

not__absolutely__false

These will be abbreviated to af, vf, f, ff, nat, naf, ft, t, vt and at. The membership functions which we intend

to use for each of these is shown in Figure 1 and the functions are given below.

#at(X) = 1 - { 1 - ( 1 - x ) " } 1/~ he(X) = 1 - {1-(1-x)2}1/2 /Af(X) = 1 - x ~ff(X) = ( l - - x 2 ) 1/2 [,/nat(X) = ( 1 - - x n ) l / n

/~naf(X) = ( 1 - (1 - x) ~ } 1/~ ~t(x) = {1-(1-x)2} 1/2 ~u, (x) = x ~t(x) = 1 - ( 1 - x 2 ) 1/2 ~at(X) ~-~ 1--(1--xn)i/n

in the limit as n ~ ~*

in the limit as n ~ oo in the limit as n ~

in the limit as n --~ oo

The reason for this choice will become very clear when we discuss modifiers and connectives. These mappings ensure that the qualifiers are a closed set; i.e. operations, involving qualifiers, result in a qualifier which is already a member of the set.

Possibility qualifieation The concept of truth qualification is relatively simple. A single membership function returns the possibility that a given truth value 'belongs' to the fuzzy truth qualifier in question. The concept of possibility qualifi- cation, however, is a second-order concept which returns the possibility that a possibility distribution could be the one in question. In particular, the possibility qualifiers have been chosen so that they return the degree of possibility that a given truth qualifier could be the one in question.

This manipulation of truth qualifiers by a possibility qualifier is achieved as follows. Zadeh 16,17 quotes the following formula for the possibility that a given

1

membershi value

0 truth

Figure 1. The membership functions of the predefined truth qualifiers at = absolutely true; v t= very true; t = true; f l = fairly true; naf = not absolutely false; af = absolutely false; vf = very false; f - - false; f f = fairly false; nat = not absolutely true

*In figure 1 the extreme values (i.e. at, naf, nat, af) have been calculated using n = 10.

Vol 4 No 1 March 1991 53

Page 3: Towards a fuzzy logic programming system: a fuzzy propositional logic

possibility distribution function, poss__dist, could de- scribe the proposition, prop.

7r(poss__dist(.)) =

kip ..... qual(max (min(poss_dist (x),//p~op (x))))

where x is a variable ranging over the domain of discourse of the proposition, /Aprop is the membership function for the proposition prop, poss__dist is one of a set of possibility distributions which could describe the proposition and ~poss__qual is the membership function of the possibility qualifier. But, in our case

/ /p rop(X) = / / trulh__qual__p(//pred(X))

and

poss__dist(x) --//truth__qual__n(//pred(X))

where //truth_qual_p is the membership function of the truth qualifier used in the proposition and//preJ is the membership function of a base proposition which is common to the original proposition, prop, and the propositions which could possibly be described by poss__dist and //truth -ual._n is the membership function of the set of truth quahfiers in use. The second equation is due to the fact that the truth qualifiers are possibility distributions. But, ~red(X) returns a truth value t, thus if we substitute the above equations into Zadeh's equation we get

7r(truth__qual_n(.)) =

//poss__qual( max (min(//truth_qual_n (t) ,//truth_qual_p(t))) t

where t is a variable taking its value in the truth domain. All that is necessary now to define a set of possibility qualifiers. The expression

max min(//truth_quaLn (t) ,//truth__quaLp (t)) 1

returns a single possibility value. The possibility quali- fiers, therefore, take possibility as an argument and return a possibility. In every other respect, however, they should behave exactly as the truth qualifiers defined above and consequently they can use the same expressions for their membership functions. Our choice of possibility qualifiers will therefore be:

absolutely_impossible absolutely__possible very_impossible very__possible

impossible possible fairly__impossible fairly__possible

not__absolute__possible no t_abso lu te ly_ imposs ib le

Sensible membership functions for these qualifiers will be the same as the truth qualifiers.

Probability qualification Probability qualifier and possibility qualifier differ because the membership function of the former maps a possibility value into a possibility value whereas the latter maps a probability value into a possibility value.

Furthermore, whereas when dealing with the possib- ility qualifier it was possible to replace the possibility distribution of the proposition with a fuzzy truth value, this will not be possible when dealing with probability. Consequently, the probability density function remains explicitly in the calculations.

The manipulation of probability distributions by a probability qualifier is achieved as follows. Zadeh 1~,4~,4~

quotes the following formula for the probability of a proposition prop given its possibility distribution func- tion//prop and a probability density function den

Prob(prop) =fudden(u)//prop(u)du

where u is a variable taking its values in the universe of discourse Ud of which//prop is a fuzzy subset.

This formula was made more specific to the truth restriction r by Baldwin 42-44 as follows:

Prob(r) = f l p(t)//r(t) dt

where r is a fuzzy truth value of the proposition prop having a membership function //r, P is a probability density function, t is a variable taking its values in the truth domain [0,1].

The probability qualifier then maps those values to give the possibility of the probability distribution 7r (prob) using the formula:

rr(prob) =//q(~ip(t)#r(t) dt)

here /~q is the membership function of the probability qualifier q.

The probability qualifiers which we intend to use are

absolutely__unlikely very_unl ikely

unlikely fairly__unlikely

not__absolute_likely

absolutely__likely very_.likely

likely fairly likely

no t_abso lu te ly_un l ike ly

Sensible membership functions for these qualifiers will again be the same as those for truth.

Modifiers Arguably traditional logic has only one modifier 'not', but even this can be considered to be a connective in which case traditional logic is left without any modifiers at all. In fuzzy logic, however, they play a much more important role since they add shades of meaning to a proposition. The modifier 'not' still requires special consideration, however.

In spite of the fact that 'not' is considered as a modifier, the negative form is represented in the truth qualifier (or other entity) itself i.e. false = not(true), very false = not(fairly t r u e ) . . , etc. It is vital that each negative form has an equivalent expressed in terms of the direct negation of positive truth; this will become apparent when we come to the clausal form where each atom will have to be an unnegated atom.

The modifiers are so versatile that it makes sense to

54 Knowledge-Based Systems

Page 4: Towards a fuzzy logic programming system: a fuzzy propositional logic

restrict the number of qualifiers and generate the other qualifiers by modification. The qualifiers can easily be reduced to two, one positive and one negative, but it is better to reduce then to one positive one and construct the other using not. Linguistically, this is unacceptable so the problem is resolved by insisting that not(positive qualifier) = negative qualifier and vice versa. For example, consider the qualifier ' true' and the modifiers 'very' and 'not'. Using only these two modifiers we can generate the following sequence:

very true very false = very(not true) not(very false) = not(very(not true)) not(very(not false))= not very true not(not very true) -- very true

However, from the curves shown in Figure 2, it is clear that not(very false) has the form fairly(true). Conse- quently, if we chose a function for 'very' we can define one for fairly and vice versa.

Zadeh has expressed a preference for 'very' to have a membership function y = x 2 and for 'fairly' to have y = xl/2. However, these curves do not possess the property described above. 'Not(very true)', although the same general shape as 'fairly false', does not equal it. This causes added complexity when it becomes necessary to combine propositions. It will be shown later in the paper that the qualifier for the resultant well formed formula will be an entirely new qualifier unless the membership functions for the separate qualifiers do not intersect in the interval (0,1). If this is permitted an infinite number of qualifiers could result.

The simplest collection of modifiers and qualifier which satisfies these requirements is:

~ru,(t) = t not(t) = 1 - t

and

mdfr"(t) = 1--(1--tn) TM

1-

membership value

truth Figure 2. Equality between the qualifier 'fairly true' and the negation of the qualifier 'very false'

where mdfr n is a function defining the modifier with a power of n and t is a truth value. For example 'very' may well be defined by the function mdfr 2 .

For every value of n, it is now possible to generate four truth qualifiers, namely

mdfrn (/~true(t)) mdfr" (not(/4rue(t)))

not(mdfr" (~true(t)))

not(mdfr" (not(/~t~ue (t))))

= 1- (1- tn) l /n = mdfr" (false(t)) = 1 - { 1 - ( I - t ) " ) :/~ = 1 - mdfr~(#true(t)) = (1--tn)l/n = 1 - mdfr n (false(t)) = {1-(1-t)n}l/n

When n = 1 these reduce to 'true' and 'false'. When n = 2 we get 'very true', 'very false', 'fairly false' and 'fairly true', respectively. Similarly if n ~ oo we get the absolute case.

It should now be clear why the truth qualifiers given in the section on truth qualifies were chosen.

The same modifiers can be used to generate both possibility qualifiers and probability qualifiers and they produce sets of qualifier which are both finite and consistent.

C o n n e c t i v e s

The definition of an atomic proposition is now com- plete and we require a set of connectives so that well formed formulae can be constructed.

Fuzzy sets are combined using the extension prin- ciple (introduced for the first time by Zadeh).

The general form of this rule is as follows. If A and B are two fuzzy sets and * is an operator then

/~a.b(Z) = max(min(~a(X),/~b(y)) ) Z = X * y

where ~Aa. b is the membership function of A , B , p~ is the membership of A and /~b is the membership function for B. A . B , A and B are all fuzzy sets on the same domain. Baldwin 42 has used this formula as a rule for deriving the truth of the logical combination of two propositions. If we do likewise it is possible to derive tables which give the result of combining the qualifiers defined above.

Before we do this, however, it is necessary to introduce an interpretation of a qualified proposition which explicitly defines both the proposition and its qualification.

Definition 1 - qualified proposition If we have a qualified proposition

P i s q

where P is the unqualified proposition and q is the qualification of the proposition, then this proposition will be interpreted as two separate pieces of informa- tion, namely:

• P (which is an assertion e.g. the boat is small) • qual(P) is q (qualification of P is q e.g. truth(P) is

"very true")

This interpretation has the advantage that when two

Vol 4 No 1 March 1991 55

Page 5: Towards a fuzzy logic programming system: a fuzzy propositional logic

qualified propositions are combined by a logical con- nective, •, the combination of the unqualified proposi- tions will be independent of that of their qualifications and not necessarily governed by the same law of combination, for instance if we have the complex proposition

P is ql " R is q2 ([)

where P, R are unqualified propositions

ql, q2 are qualifications of the same type

and • is a logical connective

then this proposition will be interpreted as

• P ' R • qual(p • R) is ql " " q2

where • • is the operator governing the combination of the qualifiers that corresponds to the logical connective

This then will enable us to evaluate a new qualifier q = ql" "q2 which qualifies the proposition P - R and then the oringinal proposition (I) will be equivalent to the proposition (II)

{P. R} is q (II)

Such interpretation requires the resulting qualifier q to be evaluated on a one dimensional space which has to be identical to that of each of the qualifiers ql and q2. This interpretation enables us to prove general rules for combining qualifiers regardless of the object of the qualification. As a consequence, but with some restric- tions on the shapes of the membership functions of the qualifiers, we can prove more general rules for combin- ing qualifiers and construct tables analogous to the traditional truth tables. They will be called qualifier tables since the members of the table are qualifiers of the same type as the parents.

The definitions for the fuzzy logic connectives which will be adopted for the rest of this work are

For possibility or truth xAy = min(x,y) i.e. logical and x v y ---- max(x,y) i.e. logical or x ---, y = max(1 -x ,y ) i.e. logical implication x ~ y = m i n ( m a x ( 1 - x , y ) , m a x ( x , l - y ) )

i.e. logical equivalence

where x, y are values from the possibility or truth space, respectively.

Since the definitions for the connectives are not unique 45, the justification for choosing the definitions for the connectives as such is based on the fact that they will enable the deduction of a clausal form of fuzzy logic.

For probability xAy = x.y x v y = x + y x--~ y = I - x + x.y x ~--~y= 1 - x - y + 2x.y

where x, y are values from the probability space. (N. B. The above connectives for probability assume inde- pendence between the two events, but because we are taking Baldwin's interpretation of a probability quali- fier i.e. the probability qualifier qualifies the truth of the proposition, the probability qualifier of one propo- sition cannot be determined from a knowledge of the other e.g. if 'P is q~ ~ R is q2' then the fact that q~ is probable does not restrict the value of q2 which could easily be improbable. Consequently, q~ and q~ are independent and the above formulae are justifiable.)

The three types of qualification table can be derived as described below.

Truth qualification The truth qualifiers have been widely discussed by Baldwin et a121.22, and we shall follow their approach which can be summarised as follows.

Let P, R be unqualified propositions, ql and q2 be truth qualifiers and • be a logical connective. Let S be the proposition

S = P is ql "R is q2

then S is equivalent to the proposition S' where

S' = ( e . R) i sq

if the membership function of q is evaluated as follows:

/z(z) = M A X {min(#l(x),#2(y)) } Z = X • . y

(1)

Where • . is the appropriate crisp operation that corresponds to the connective for the qualifier in question, /~,/h,/~2 are the membership functions of q, ql q2 respectively x, y, z are variables taking their values in the truth domain.

The following theory is necessary to draw general rules for combining qualifiers using equation (1). However, it is desirable to apply restrictions to the membership functions of the qualifiers so that the resulting qualifier belongs to the set of the predefined qualifiers. The functions need to be strictly monotonic, ranging in the same domain D = [a,b] where they all must start at the first point of the domain and finish at the last point of the domain; in addition they must not cross in D.

The restrictions made earlier on the permissible shapes of the membership functions follow those required for the establishment of the qualifier rules and hence will be applicable.

Let #i and/~2 be two functions following the stated rules and let/~ be the resulting function in equation (1) then

Theorem 1

• If Pl and P2 are both increasing then if . . is the minimum operator (i.e. conjunction) then

56 Knowledge-Based Systems

Page 6: Towards a fuzzy logic programming system: a fuzzy propositional logic

/~ = gt if/21 </22 * fl = /22 if/21 >/22 "~"

if • • is the maximum operator (i.e. disjunction) then

/2 = / l t if/2! >/22 /2 = ~2 if/21 < /22

• If /21 and #2 are both decreasing then if • • is the minimum operator then

/2 = /22 if/2t </22 /2 - / 2 1 if/2t >/22

if • • is the maximum operator then

/2 = /22 if/21 >/22 /2 = /21 if/21 < /22

• If /21 is increasing and ~ is decreasing then if • • is the minimum operator then

/2---- /22

If • • is the maximum operator then

/2=/21

A proof of this theorem is given in the internal report 46.

Consequence Let S be the proposition

S = P i s q l ' R i s q 2

= (P. R) is O

where P, R are simple propositions,

qa and q2 are their respective truth qualifica- tions

and q is the resulting qualification from the logical connective • and evaluated using equ- ation (1).

Then, using theorem 1 we can deduce the following rules for the evaluation of q: If ql and q2 are both positive (resp. negative) qualifiers then

Connective q

^

V

the least true of ql and q2 the most true of ql and q2 q2(resp.not(ql)) the least true of qt and q2

if ql is a positive (resp.negative) qualifier and /22 is a negative (resp. positive) qualifier then

* P~ < #2 if V x e D / ~ l ( x ) </~2(x)

t lit > #2 if V x e D / ~ l ( x ) > #2(x)

Connective q

^

V

q2(resp.q0 ql(resp.q2) the most true of not(ql) and q2 the least true between (the most true of not(q1) and q2) and (the most true of ql and not(q2))

where

• 'least true' and 'most true' follow the ascending order of truth qualifiers i.e. a f<v f< f< f f<na t - < n a f < f t < t < v t < a t and < means 'less true than'

• and a positive qualifier has an increasing member- ship function, and a negative qualifier has a decreas- ing membership function

When the rules above are applied to our set of predefined truth qualifiers, the result is a fuzzy truth table for each connective (see Table 1).

P o s s i b i l i t y q u a l i f i c a t i o n The treatment of possibility qualifiers is the same as that for the truth qualifiers since the rules that govern the logical connective are identical. We can, therefore assert the same general rules for combining possibility qualifiers provided that if they are both increasing (resp. decreasing) and they do not cross. The proof is the same and we can construct similar qualifier tables for the possibility qualifiers. The tables differ only in that possibility is substituted for truth.

P r o b a b i l i t y q u a l i f i c a t i o n The following theory is necessary to draw general rules for combining probability qualifiers using equation (1). However, it also requires the same restrictions made earlier on membership functions of the qualifiers.

Let/21 and #2 be two functions following the stated rules and let # be the resulting function in equation (1) then

Theorem 2 • If/21 and /22 are both increasing (resp. decreasing)

then the point for which /21 (a)=/22(b) is the MAX__MIN point

i.e. /2(z) =/21(a) = #2(b) = MAX (/21(x)^/22(Y)) z

where z = a.b for the conjunction z = a + b - a . b for the disjunction

and z < = a < = b x,y,a,b,z belong to the domain of definition of the functions.

• If/21 is increasing and/22 is decreasing then /~ =/22 for the conjunction /2 =/21 for the disjunction

A proof of this theorem is given in the internal report 46.

Consequence Let S be the proposition

Vol 4 No 1 March 1991 57

Page 7: Towards a fuzzy logic programming system: a fuzzy propositional logic

Table la. Truth table for the conjunction

af vf f ff nat naf ft t vt at

af af af af af af af af af af af vf af vf vf vf vf vf vf vf vf vf f af vf f f f f f f f f ff af vf f ff ff ff ff ff ff ff nat af vf f ff nat nat nat nat nat nat naf af vf f ff nat naf naf naf naf naf ft af vf f ff nat naf ft ft ft ft t af vf f ff nat naf ft t t t vt af vf f ff nat naf ft t vt vt at af vf f ff nat naf ft t vt at

Table lb. Truth table for the disjunction

af vf f ff nat naf ft t vt at

af af vf f ff nat naf ft t vt at vf vf vf f ff nat naf ft t vt at f f f f ff nat naf ft t vt at ff ff ff ff ff nat naf ft t vt at nat nat nat nat nat nat naf ft t vt at naf naf naf naf naf naf naf ft t vt at ft ft ft ft ft ft ft ft t vt at t t t t t t t t t vt at vt vt vt vt vt vt vt vt vt vt at at at at at at at at at at at at

Table lc. Truth table for the implication

af vf f ff nat naf ft t vt at

af naf naf naf naf naf naf ft t vt at vf ft ft ft ft ft ft ft t vt at f t t t t t t t t vt at ff vt vt vt vt vt vt vt vt vt at nat at at at at at at at at at at naf af vf f ff nat naf ft t vt at ft vf vf f ff nat naf ft t vt at t f f f ff nat naf ft t vt at vt ff ff ff ff nat naf ft t vt at at nat nat nat nat nat naf ft t vt at

Table ld. Truth table for the equivalence

af vf f ff nat naf ft t vt at

af naf naf naf naf naf af vf f ff nat vf naf ft ft ft ft vf vf f ff nat f naf ft t t t f f f ff nat ff naf ft t vt vt ff ff ff ff nat nat naf ft t vt at nat nat nat nat nat naf af vf f ff nat naf naf naf naf naf ft vf vf f ff nat naf ft ft ft ft t f f f ff nat naf ft t t t vt ff ff ff ff nat naf ft t vt vt at nat nat nat nat nat naf ft t vt at

S = P is q~ • R is q2 : (P . R) is q

where P, R are simple proposit ions.

qt and q2 are their respective truth qualifica- tions and q is the probabil i ty qualification resulting from the logical connect ive • evaluated using equat ion (1).

Using theorem 2 we can deduce the following: If both q~ and q2 are positive (resp. negative) then the rules for the qualifiers resulting for the combined unqualified proposi t ion are:

Connect ive q

/x

V

<---)

less probable than the least probable of q~ and q2 more probable than the most probable of ql and q2 q2 (resp.not(qx)) q2/x ql (resp.not(ql) /x not(q2))

If ql is positive (resp.negative) and q2 is negative (resp. positive) then the rules are:

Connect ive q

V

the least probable of ql and q2 the most probable of q~ and q2 more probable than the most probable of not (qO and q2 more probable than the most probable of not(q1) (resp.not(q2)) and q2 (resp.ql)

Unfor tuna te ly , the probabil i ty case results in qualifiers that differ f rom the original ones. Consequent ly , the resulting qualifier can only be specified to lie within an interval. Because it may well be necessary to combine them again and because successive opera t ions with qualifiers defined on an interval are impractical, the resulting qualifier will be approximated to the nearest qualifier when repea ted opera t ions are required. The qualifier which should be chosen in these circumstances is writ ten above the less significant value in Table 2 indicating that this is the closest to the resulting qualifier in question.

W h e n the above rules are applied to our set of predef ined truth qualifiers, those results can be used to construct a fuzzy probabil i ty table for each connect ive (see Table 2).

Syntax of propositional fuzzy logic (PFL)

As a result of the above, we can now define a syntax for the proposi t ional fuzzy logic.

58 Knowledge-Based Systems

Page 8: Towards a fuzzy logic programming system: a fuzzy propositional logic

Table 2a. Probability table for the conjunction

au vu u fu nal nau fl 1 vl al

au au au au au au au au au au au vu au vu vu vu vu vu vu vu vu vu

a u a u a u a u

u au vu u u u u u u u u a u v u v u v u

fu au vu u fu fu fu fu fu fu fu au vu au nal

nal au vu u fu nal nal nal nal nal nal au vu nal

nau au vu u fu nal nau nau nau nau nau fl au vu u fu nal nau fl fl fl fl

nau nau nau 1 au vu u fu nal nau fl 1 1 1

nau fl fl vl au vu u fu nal nau fl 1 vl vl

nau fl al al au vu u fu nal nau fl 1 vl al

Table 2b. Probability table for the disjunction

au vu u fu nal nau fl 1 vl al

au au vu u fu nal nau fl 1 vl al vu vu vu u fu nal nau fl 1 vl al

U VU U

u u u u fu nal nau fl 1 vl al vu fu nal

fu fu fu fu fu nal nau fl 1 vl al u nal nal

nal nal nal nal nal nal nau fl 1 vl al nau nau nau nau nau nau nau fl 1 vl al fl fl fl fl fl fl fl fl 1 vl al

1 1 vl al 1 1 1 1 1 1 1 1 1 vl al

nau vl vl al vl vl vl vl vl vl vl vl vl vl al

al al al al al al al al al al al al al al al

Table 2e. Probability table for the implication

au vu u fu nal nau fl 1 vl al

au nau nau nau nau nau nau fl l vl al vu fl fl fl fl fl fl fl 1 vl al

1 1 vl al u 1 1 1 1 1 1 1 1 vl al

nau vl vl al fu vl vl vl vl vl vl vl vl vl al

al al al al nal al al al al al al al al al al nau au vu u fu na l nau fl 1 vl al ul vu vu u fu nal n a u . f l 1 vl al

U VU U

1 u u u fu nal nau fl 1 vl al vu fu nal

vl fu fu fu fu nal nau fl 1 vl al u nal nal

al nal nal nal nal nal nau fl 1 vl al

Table 2d. Probability table for the equivalence

au vu u fu nal nau fl 1 vl al

a u

v u

u

fu

nal n a u a u

ul vu

1 u

vl

al

nau nau nau nau nau nau vu u fu nal n a u f l fl fl fl fl vu u fu nal

n a u n a u n a u u vu u nau fl 1 1 1 u u u u nal

n a u f l fl vu fu nal n a u f l 1 vl vl fu fu fu fu nal

n a u f l al u nal nal n a u f l 1 vl al nal nal nal nal nal

vu u fu nal nau nau nau nau nau vu u fu nal nau fl fl fl fl u vu u nau nau nau u u fu nal nau fl 1 1 1 vu fu nal nau fl fl

fu fu fu fu nal nau fl 1 vl vl u nal nal al nau fl al

nal nal nal nal nal nau fl 1 vl al

Definition 2-modified qualifier

• If q is a fuzzy qual i f ie r and m is a fuzzy mod i f i e r then m__q is a fuzzy qual i f ie r of the same type as q.

Definition 3-fuzzy atomic formula

• A fuzzy a tomic fo rmu la is a p r o p o s i t i o n tha t does not con ta in any logical connec t ive .

• A qual i f ied fuzzy a tomic fo rmula is a fuzzy a tomic fo rmula .

Definition 4-well formed fuzzy formula A well f o r m e d fuzzy fo rmula (wfff) in p ropos i t i ona l fuzzy logic is de f ined as fol lows:

• A fuzzy a tomic fo rmu la is a wfff. • If A is a wfff then n o t ( A ) is a wfff and is i n t e r p r e t e d

as nega t ion of eve ry qual i f ier pe r t a in ing to A . • If A and B are wfffs (if qua l i f ied , have to have the

same type of qual i f ica t ions respec t ive ly ) , then ( A and B) , ( A --) B) , ( A or B) , A (--) B are wfffs.

• If A is a wfff and if q is a qual i f ica t ion then ( A is q) is a wfff.

Equivalence, interpretation, validity, inconsistency and logical consequence in proposit ional fuzzy logic

I n t e r p r e t a t i o n , va l id i ty , incons is tency and logical con- sequence are no t ions of t ru th . These concep ts are , t he re fo re , de f ined in t e rms of the t ru th qual i f iers . Once a t ru th re la t ionsh ip is e s t ab l i shed the r ema in ing qual i- f iers can be e v a l u a t e d using the qual i f ier tables . This sect ion, t he re fo re , concen t r a t e s on t ru th qual i f ica t ion . In p ropos i t i ona l fuzzy logic, eve ry fuzzy t ru th qual if ica- t ion is in fact e i the r a m o d i f i e d fuzzy t rue o r a m o d i f i e d fuzzy false. W e can then r educe all the pos i t ive t ru th qual i f iers to a m o d i f i e d ' t r ue ' re__true and all the nega t ive qual i f iers to a m o d i f i e d ' fa l se ' m___false. The fuzzy t ru th tab le then reduces to the fol lowing.

Le t P and R be two fuzzy fo rmu lae , and let t l and t2 be the i r r e spec t ive t ru th qual i f iers , then we can

Vol 4 N o 1 M a r c h 1991 59

Page 9: Towards a fuzzy logic programming system: a fuzzy propositional logic

construct the following truth table for the connectives where not, A, v, ---, and ~ as follows

tt t 2 not(tl) not(t2) t a /x t 2 t~ v t 2 tt--+t2t; ~ t ~

ml tme tMl f M2 f m3 t ms t m2 t m 3 t ml t Me_fMz f m2 t M2_f m L t m 6 f m6_f M1 f m 2 _ t m L t M2 f Ml_f m2_t m5 t m6_f Mt fM2_fml t m2 t m4 f m6 f m L t m3 t

where for the set of predefined modifiers we assert the following order:

not__absolutely<fairly<no__rnodifier<very <absolutely,

• m~, M~ are modifiers, • t, f stand for the fuzzy truth qualifiers true, false,

respectively, • M1 is the inverse o fml and M2 is the inverse of m2

e.g. very is the inverse of fairly etc.

• m 3 = min(m 1,m2), • ma = max(Ma,M2), • m~ = max(mr,m2), • m6 = min(Ml,M2).

It is clear from the truth table above that the difference between the traditional and the fuzzy truth table lies in the modification. This enables us to generalize all the notions of interpretation, validity, inconsistency etc. from the traditional case to the fuzzy case. Further- more, it is always possible to reverse the operation i.e. deduce the traditional case from the fuzzy case.

Hence, the following definitions.

Equivalence in PFL Theorem 3 Any formula F in PFL can be decomposed into two parts:

• a part C which has a crisp truth • a fuzzy descriptor Dc for the truth of the crisp part C

i.e. F = {C, Dc}

Proof The major difference between propositional logic and PFL is the qualification. By using the qualifier table technique for evaluating the qualification of a formula in PFL, it is possible to reduce F into the form

F = P i s q

where P does not contain any qualification and q is the resulting qualification.

Since P contains only unqualified formulae, it can be considered as a formula in propositional logic. Hence,

v = { c , Dc}

C = P Dc = q

Definition 5-equivalence Two formulae are equivalent in PFL if

• their crisp parts are equivalent • their fuzzy parts are equivalent after their evaluation

using the qualifier table technique.

The definition follows from the theorem above.

Interpretation in propositional fuzzy logic Definition 6-interpretation Given a propositional fuzzy formula P, let A1 . . . . . A. be the fuzzy atomic formulae occurring in the formula P. Then a fuzzy interpretation of P is an assignment of fuzzy truth values to A, . . . . . A2 in which every A~ is assigned m _ T or m' F, but not both.

Consequence A fuzzy interpretation of P is a traditional interpreta- tion on the crisp part of P together with the adequate fuzzy description of such interpretation. Eg. Let ! = (mlt,m2t,m3f,maf,mst) be a fuzzy interpretation of a formula P involving five atomic formulae, then I is equivalent to

I = {(T,T,F,F,T,),(ml,m2,m3,m4,ms)}

where T and F are the crisp true and false respectively.

Definition 7-positive and negative formula A formula P is said to be fuzzy true (positive) under a fuzzy interpretation if and only if P is evaluated to r e_T ; otherwise, P is said to be fuzzy false (negative) under the fuzzy interpretation.

Consequence A formula P is fuzzy true if and only if its crisp part is true; otherwise, P is fuzzy false if and only if its crisp part is false. (From definition 5)

Validity and inconsistency in propositional fuzzy logic Definition 8-validity and invalidity A formula is said to be fuzzy valid if and only if it is fuzzy true under all its fuzzy interpretations. A formula is said to be fuzzy invalid if and only if it is not fuzzy valid.

Consequence A formula is fuzzy valid if and only if its crisp part is valid. A formula is fuzzy invalid if and only if its crisp part is invalid. (Definition 5)

Definition 9-consistency and inconsistency A formula is said to be fuzzy inconsistent (unsatisfi- able) if and only if it is fuzzy false under all its fuzzy interpretations. A formula is said to be fuzzy consistent (satisfiable) if and only if it is not fuzzy inconsistent.

Consequence A formula is fuzzy inconsistent if and only if its crisp part is inconsistent. A formula is consistent if and only if its fuzzy part is consistent. (Definition 5)

60 Knowledge-Based Systems

Page 10: Towards a fuzzy logic programming system: a fuzzy propositional logic

Logical consequence in propositional fuzzy logic Definition l O-logical consequence Given fuzzy formulae P1,. • • ,P~ and a fuzzy formula R, R is said to be a logical consequence of P1 . . . . . P~ if and only if for any fuzzy interpretation I in which P1. • .Pn is fuzzy true, R is also fuzzy true.

Consequence Let C1 . . . . . Ca and C be the crisp parts of P~ . . . . . P~ respectively. Then R is a logical consequence of P1 . . . . . Pn if and only if Ca . . . . . Ca is a logical conse- quence of C. (Definition 5)

Theorem 4 Given formulae Px . . . . . Pn and a fuzzy formula R, R is a logical consequence of P1 . . . . . P. if and only if the formula ((P1. • .P,) ---> R) is fuzzy valid.

Proof The proof consists of using the separation technique i.e. if Pi = (Ci,Fi) i = 1,n where Ci and F i are the crisp part and the fuzzy descriptor of P~ respectively, and R = (C,F) with the same meaning, then ((P1. • .P,) ~ R) = { ((C~.. C,) ~ F), (F 1 . . . . . Fn,F) } Therefore C1 . . . . Cn is a logical consequence of C. But, this is true if and only if ((C1. • .C,) --* C) is valid (from the traditional theory of propositional logic). Conse- quence of the definition 8 implies that ( ( C 1 . . . . . Cn) ~ C) is valid if and only if ((P1. • .P,) ~ R) is fuzzy valid.

Theorem 5 Given formulae P1 . . . . . Pn and a fuzzy formula R, R is a logical consequence of P1 . . . . . Pn if and only if the formula (P1 ^ . . . /x Pn A not(R))is fuzzy inconsistent.

Proof Using the separation technique we can prove this theorem in a similar manner as theorem 4.

Example Consider the fuzzy formulae

P1 = A---> B P2 = not(B) R = not(A)

Show that R is a logical consequence of P1 and P2. Using theorem 5, we can evaluate a fuzzy truth table for {[(A --> B) ^ not(B)] ^ A} and show that it is fuzzy inconsistent.

A B {[(A--->B) ^ not(B)] A A}

ml_t m2_t m2_t M2_f M2 f M2_f m~_t m l t M2 f m6_f m6_f m2_f m6__f m~_t M l f m2 t ms t M2 f M2 f M3 f M 1 t M~ f M2 f m~_t m3 t m2 f M L f M~ t

where

M 3 -- max (M2,M1)

and the remaining modifiers are defined earlier. Since all the fuzzy interpretations of the expression

{[(A --~ B)^not(B)]^A}

are negative (definition 7), then this expression is fuzzy inconsistent (definition 9 of inconsistency).

C O N C L U S I O N

This paper achieves the first step of obtaining a fuzzy clausal form, namely, proposing a theory of proposi- tional fuzzy logic. This theory is based on a specific class of membership functions for the three different types of qualifiers. This class is not as restrictive as it appears since it is possible to construct an infinite number of qualifiers.

The remaining steps towards the achievement of a complete theory that will convert any fuzzy logic expression in terms of a fuzzy clausal form are under investigation and will be the subject of further work. The work is intended to ultimately define and imple- ment a fuzzy logic programming language with the full power of fuzzy logic.

A C K N O W L E D G E M E N T S

The authors wish to acknowledge financial support for Mrs Menani from the Ministry of Higher Education of the Algerian Government.

REFERENCES

1 Zadeh, L A 'Fuzzy sets' Information and Control Vol 8 (1965) pp 338-353

2 Gaines, B R 'Fuzzy and probability uncertainty logics' Information and Control Vol 38 (1978) pp 154-169

3 Skala, H J 'On many-valued logics, fuzzy sets, fuzzy logics and their applications' Fuzzy Sets and Sys- tems Vol 1 (1978) pp 129-149

4 Baldwin, J F and Pilsworth, B W 'A model of fuzzy reasoning through multi-valued logic and set theory' International Journal of Man-Machine Studies Vol 11 (1979) pp 351-380

5 Baldwin, J F and Pilsworth, B W 'Axiomatic approach to implication for approximate reasoning with fuzzy logic' Fuzzy Sets and Systems Vol 3 (1980) pp 193-219

6 Gottwald, S 'Fuzzy propositional logics' Fuzzy Sets and Systems Vol 3 (1980) pp 181-192

7 Mizumoto, M 'Comparison of fuzzy reasoning methods' Fuzzy Sets and Systems Vol 8 (1982) pp 253 -283

8 Sugeno, M and Takagi, T 'Multi-dimensional fuzzy reasoning' Fuzzy Sets and Systems Vol 9 (1983) pp 313-325

9 Mattila, J K 'Proof-theoretical aspects of fuzzy logic' Proceedings of the North American Fuzzy Information Processing Society (NAFIPS) (1986) pp 386-398 Schwartz, D 'Concerning some axioms for a frag- ment of approximate reasoning' Proceedings of the

10

Vol 4 No 1 March 1991 61

Page 11: Towards a fuzzy logic programming system: a fuzzy propositional logic

North American Fuzzy Information Processing Soc- iety (NAFIPS) (1986) pp 516-523

11 Bouchon, B 'Fuzzy inferences and conditional pos- sibility distributions' Fuzzy Sets and Systems (1987) Vol 23 No 1 pp 33-41

12 Driankov, D qnference with a single fuzzy condi- tional proposition' Fuzzy Sets and Systems Vol 24 (1987) pp 51-63

13 Gorzalezany, M B 'A method of inference in approximate reasoning based on interval-valued fuzzy sets' Fuzzy Sets and Systems Vol 2l (1987) pp 1-17

14 Weston, T S 'Approximate truth and Lukasiewicz logic' Notre Dame Journal of Formal Logic Vol 29 No 2 (Spring 1988) pp 229-234

15 Zadeh, L A 'A theory of approximate reasoning' Machine Intelligence Vol 9 (1979) pp 149-193

16 Zadeh, L A 'PRUF - a meaning representation language for natural languages' International Journal of Man-Machine Studies Vol 10 (1978) pp 395 -460

17 Zadeh, L A 'Fuzzy sets as a basis for a theory of possibility' Fuzzy Sets and Systems Vol 1 (1978) pp 328

18 Zadeh, L A 'The role of fuzzy logic in the management of uncertainty in expert systems' Fuzzy Sets and Systems Vol 11 (1983)pp 199-227

19 Lee, R C T 'Fuzzy logic and the resolution principle' Journal of the Association for Computing Ma- chinery Vol 19 No 1 (1972) pp 109-119

20 Baldwin, J F A model for fuzzy reasoning and fuzzy logic Research Report EM/FS10, Engineering De- partment, University of Bristol UK (1978)

21 Baldwin, J F 'Fuzzy logic and fuzzy reasoning' International Journal of Man-Machine Studies Vol 11 (1979) pp 465-480

22 Baldwin, J F 'A new approach to approximate reasoning using fuzzy logic' Fuzzy Sets and Systems Vol 2 (1979) pp 309-325

23 Baldwin, J F and Pilsworth, B W An inferential fuzzy logic knowledge base University of Bristol, Engineering Mathematics Department, UK Re- search Report EM/FS31 (1980)

24 Baldwin, J F An implementation of FR1L Univer- sity of Bristol, Engineering Mathematics Depart- ment, UK Research Report EM/FS46 (1983)

25 Baldwin, J F and Zhou, S Q 'A fuzzy relational inference language' Fuzzy Sets and Systems Vol 14 (1984) pp 155-174

26 Martin, T P, Baldwin, J F and Pilsworth, B W FPROLOG - A Fuzzy Prolog Interpreter Research Report, University of Bristol, UK

27 Liu, X and Hong, X 'Operator fuzzy logic and fuzzy resolution' Multiple Valued Logic Proceedings of the 15th International Symposium Kingston, Ca- nada, (1985) pp 68-75

28 Liu, X, Chang, C K and Tsai, J J P 'Fuzzy reasoning based on lambda-LH-Resolution' COMSAC 86 Proceedings lOth Anniversary Conference of the

IEEE Computer Society Washington, USA (1986) pp 154-157

29 Martin, T P, Baldwin, J F and Pilsworth, B W "The implementation of FPROLOG - A fuzzy PROLOG intepreter" Fuzzy Sets and Systems Vol 23 (1987) pp 119-129

30 Mukaidono, M, Shen, Z and Ding, L ~Fuzzy PROLOG" Int. Fuzzy Systems Reprints of the Second Congress (7) (1987) pp 452-455

31 Shen, Z, Ding, L and Mukaidono, M 'Fuzzy resolution principle' Multiple Valued Logic Pro- ceedings of the 18th International Symposium Palha de Mallorca, Spain (1988) pp 210-215

32 Merad Menani, S Forthcoming PhD Thesis Depart- ment of Computing, University of Bradford, UK

33 Zadeh, L A 'A fuzzy-set-theoretic interpretation of linguistic hedges' Journal of Cybernetics Vol 2 (1972) pp 4-34

34 Zadeh, L A 'The concept of a linguistic variable and its application to approximate reasoning' Learning Systems and Intelligent Robots (Fu, K S and Tow, J T, Eds.) Plenum Press, New York, (1974) pp 1-10

35 Eshragh, F and Mamdani, E H 'A general approach to linguistic approximation' Int. J. Man-Machine Studies Vol 11 (1979) pp 501-519

36 Kuz'min, V B 'A parametric approach to descrip- tion of linguistic values of variables and hedges' Fuzzy sets and Systems Vol 6 (1981) pp 27-41

37 Zadeh, L A 'Linguistic variables, approximate reasoning and dispositions' Medicine Information Vol 18 No 3 (1983) pp173-186

38 Chang, C L and Lee, R C Symbolic logic and mechanical theorem proving Academic Press (1973)

39 Lloyd, J W Foundations of Logic programming Springer-Verlag (1987)

40 Zadeh, L A 'Probability measures of fuzzy events' J. Math. Anal. & Appl. Vol 23 (1968) pp 421-427

41 Zadeh, L A 'Fuzzy probabilities and their role in decision analysis' Theory and Application of Digital Control IFAC, New Delhi, India (1982) pp 15-21

42 Baldwin, J F and Pilsworth, B W 'A theory of fuzzy probability' IEEE Proceedings of the 9th Interna- tional Symposium on Multi-valued Logic Bath (1979) pp 53-61

43 Baldwin, J F and Pilsworth, B W 'Fuzzy reasoning with probability' IEEE Proceedings of the ll th International Symposium on Multi-valued Logic University of Oklahoma, USA (1981) pp 100-108

44 Baldwin, J F 'Automated fuzzy and probabilistic inference' Fuzzy Sets and Systems Vol 18 (1986) pp 219-235

45 Yager, R R "A measurement-informational discus- sion of fuzzy union and intersection' International Journal of Man-Machine Studies Vol 11 (1979) pp 189-200

46 Rhodes, P C and Merad Menani, S A propositional fuzzy logic based on traditional logic Internal Report, Department of Computing, University of Bradford, UK (1989)

62 Knowledge-Based Systems