ñòð. 26 |

5.6.2 DeÂ¯nition Let P be a complete Heyting algebra. A P -valued set is a

pair (S; Â¾) consisting of a set S and a function Â¾ : S Â¡ P . A category of fuzzy

!

sets is the category of P -valued sets (in other words, the slice category Set =P )

for a Â¯xed complete Heyting algebra P .

In practice, fuzzy sets are deÂ¯ned with P being the closed interval of real

numbers from 0 to 1, which is a complete Heyting algebra with the usual ordering.

Think of Â¾(s) as being the degree of membership of s in the fuzzy set. If Â¾(s) = 1,

then s is fully in the fuzzy set, while if Â¾(s) = 0, then s is not in the fuzzy set at

all.

Actually that last statement is not quite true; we will return to this point later;

pretend for the moment that it is.

5.6.3 Let (S; Â¾) and (T; Â¿ ) be fuzzy sets. An arrow f : (S; Â¾) Â¡ (T; Â¿ ) is an

!

arrow f : S Â¡ T such that Â¾ Â· Â¿ Â± f . Thus the degree of membership of s in

!

(S; Â¾) cannot exceed that of f (s) in (T; Â¿ ). With this deÂ¯nition and the obvious

identity arrows, the fuzzy sets based on P form a category Fuzz(P ).

5.6 Fuzzy sets 73

The hypothesis actually made on P was that both P and the opposite order P op

were Heyting algebras ([Goguen, 1974]). The hypothesis on P op plays no role in the

theory and so we have omitted it.

5.6.4 Once we have deÂ¯ned the category of fuzzy sets, the deÂ¯nition of subset

!(T; Â¿ ) to be monic it is necessary that f

of a fuzzy set emerges. For f : (S; Â¾) )Â¡

be injective. In particular, we can think of a subset of (T; Â¿ ) as being a fuzzy set

(T0 ; Â¿0 ) where T0 Âµ T and Â¿ jT0 Â· Â¿0 .

5.6.5 More ado about nothing Consider the following two fuzzy subsets

of (S; Â¾). The Â¯rst is the set (;; hi) and the second is the set (S; 0) where hi is

the unique function of ; to P and 0 stands for the function that is constantly

zero. One is the empty set and the other is the set in which every element is not

there. There is seemingly no diÂ®erence between these two sets as neither actually

contains any elements. In fact, in fuzzy set theory, these two sets (and sets in

between) are not considered to be equal. This results in the class of fuzzy set

theories being curiously restricted (see ES 5.6.10).

5.6.6 Fuzzy sets and sheaves The reader may suspect (from the title of this

section, if nothing else) that there is a connection between fuzzy sets and toposes.

Both are generalizations of set theory to introduce lattices more general than the

two-element lattice as truth values.

One of the two diÂ®erences has just been mentioned; the diÂ®erent treatment of

the null set. Actually, this diÂ®erence is relatively minor. The second one is not.

Suppose (S; Â¾) is a fuzzy set. We can deÂ¯ne a presheaf E by letting

E(x) = fs 2 S j Â¾(s) Â¸ xg

as suggested in our informal discussion. Clearly, if y Â· x, then E(x) Âµ E(y) and

using these inclusions, we get a presheaf on P . It is almost never a sheaf, however.

The essential reason for this is that E(0) = S, while we have seen in ES 5.5.6 that

E(0) = 1 when E is a sheaf.

5.6.7 It turns out there is a very simple way to make E into a sheaf, but not on

P . Let P + denote the poset constructed from P by adding a new bottom element.

Let us call the new bottom element ? to distinguish it from the old one we called

0. Now given a P indexed fuzzy set, deÂ¯ne a presheaf on P + by letting E(x) be

deÂ¯ned as above for x 2 P and E(?) = 1.

5.6.8 Proposition The presheaf E just deÂ¯ned is a sheaf. It is a subsheaf of

the near constant sheaf C deÂ¯ned by C(x) = S for x 6? and C(?) = 1.

=

Proof. We Â¯rst observe that P + obviously has the property that the meet of two

nonzero elements is nonzero because P has Â¯nite meets. Thus C is a sheaf. A

diagram chase shows that if C is a sheaf and E a subpresheaf, then E is a sheaf

W

if and only if for each x = xi , the diagram

74 Toposes

- Q E(xi )

E(x)

? ?

- Q C(xi )

C(x)

is a pullback. The vertical arrows are just the inclusions. As we saw in ES 5.5.7,

the lower horizontal function is just the inclusion of C(x) into the set of constant

strings. It follows that this is essentially what the upper horizontal arrow is. Now

Q

in order that a string of elements fsi g 2 E(xi ) be constant, it is necessary and

suÂ±cient that all the si be the same element s and that s 2 E(xi ) for all i which

means that Â¾(s) Â¸ xi for all i. But this is just what is required to have Â¾(s) Â¸ x

and s 2 E(x).

Continuing in this vein, it is possible to show the following.

5.6.9 Theorem For any Heyting algebra P , the category of fuzzy sets based on

P is equivalent to the full subcategory of the category of P + sheaves consisting of

the sheaves that are subsheaves of the near constant sheaves.

5.6.10 The introduction of P + instead of P is directly traceable to the failure

the two kinds of empty sets as mentioned in ES 5.6.5 to be the same. The fact

that the sheaves are subsheaves of the near constant sheaves is really a reÂ°ection

of the fact that in fuzzy set theory only one of the two predicates of set theory is

made to take values in P (or P + ).

This shows up in the fact that in fuzzy set theory there is no fuzzy set of fuzzy

subsets of a fuzzy set. In other words, the construction is missing. Here's why.

Suppose S is a set, considered as a fuzzy set with Â¾(s) = 1 for all s 2 S. (Such

a fuzzy set is called a crisp set.) Let x < y be two elements of P and consider

the subsets Sx = (S; Â¾x ) and Sy = (S; Â¾y ), with Â¾x and Â¾y being the functions

which are constant at x and y respectively. Then of course, Sx 6Sy (actually

=

Sx is a proper subset of Sy ), but it is clear that when looking only at degrees of

membership at level x or below, the two subsets are equal. In fact, in the topos,

the degree to which Sx equals Sy is just x. But this predicate cannot be stated

in the language of fuzzy sets and the result is that there are not and cannot be

power objects (unless P has just one element).

The point is that there are two predicates in set theory, membership and

equality. In topos theory, both may be fuzzy, but in fuzzy set theory, only mem-

bership is allowed to be. But converts membership into equality as explained

in the preceding paragraph and so cannot be deÂ¯ned in fuzzy set theory. Thus

fuzzy set theory, as currently implemented, lacks a certain conceptual consistency.

One can try to reÂ¯ne the deÂ¯nition of fuzzy set so as to allow fuzzy equality. The

obvious way to proceed is to deÂ¯ne as objects triplets (S; Â¾; Â´), with (S; Â¾) as above

5.7 External functors 75

and Â´ : S Â£ S Â¡ P , interpreted as fuzzy equality. These must be subject to the

!

condition that the degree to which two elements are equal cannot exceed the degree

to which either one is deÂ¯ned. The resultant category is equivalent to the topos of

sheaves on P + .

5.7 External functors

5.7.1 Category objects in a topos One of the tools proposed for program-

ming language semantics is the category of modest sets, which we will describe

in the next section. The category of modest sets is not a category in the sense we

have been using the word up until now: it is a category object in another category,

called the eÂ®ective topos.

Recall the sketch for categories that was described in detail in ES 2.1.5. A

model of this sketch in the category of sets is, of course, a category. A model in

a category is called a category object in . A homomorphism between such

category objects is called an internal functor between those category objects.

Referring to the sketch, we see that a category object consists of four objects

Â» Â»

C0 ; C1 ; C2 and C3 such that C2 = C1 Â£C0 C1 and C3 = C1 Â£C0 C1 Â£C0 C1 . There are

arrows in corresponding to unit, source, target and composition. The crucial

commutative diagrams are:

hid; u Â± si hu Â± t; idi hp1 ; ci-

- C2 Â¾

C1 C1 C3 C2

@ Â¡

@ Â¡

c hc; p3i c

id @ Â¡ id

@ Â¡

@ ?Â¡

R Âª ? ?

- C1

C1 C2 c

ñòð. 26 |