Fuzzy Logic and Enriching Over the Category [0,1]
Posted by Simon Willerton
Standard logic involving the truth values ‘true’ and ‘false’ can make it difficult to model some of the fuzziness we use in everyday speech. If you’d bought a bike yesterday then today it would be truthful to say “This bike is new”, but it wouldn’t be truthful so say it in 20 years’ time. However, between now and then there won’t be a specific day on which the statement “This bike is new” suddenly switches from being true to being false. How can you model this situation?
One approach to modelling this situation is with fuzzy logic where you allow your truth values to be things other than just true and false. For instance, you can take the interval as the set of truth values with representing false and representing true. So the truth degree of the statement “This bike is new” would vary, being today and decreasing to something very close to in 20 years’ time.
This post is an attempt by me to understand this fuzzy logic in the context of enriched category theory, in particular, using as a monoidal category to enrich over. We will see that categories enriched over can be interpreted as fuzzy posets or fuzzy preorders.
This was going to be a comment on Tom Avery’s Kan Extension Seminar post on Metric Spaces, Generalized Logic, and Closed Categories but grew too big!
I have been trying to understand a bit of fuzzy logic because it feeds into fuzzy concept analysis which I’m also trying to understand. As ever, I understand the category theory better than the logic. In terms of references, I’ve picked up bits and pieces from Belohlavek’s Concept lattices and order in fuzzy logic and Hájek’s Metamathematics of fuzzy logic.
Truth degrees in : fuzzy logic
As mentioned above you can replace your set of truth values by the interval , with representing completely false and representing completely true. Thus an element of represents a ‘degree’ of truth. The idea is that this represents the degree of truthfulness of statements like “George is old” or “The film is good”: it is not supposed to represent than the probabitlity of the truth of a statement like “I will receive an email from a student tomorrow”. We are modelling vagueness and not probabilty. Also, we are supposed to be modeling ojectivity so the truth degree of the statement “George is old” will depend on the age of George and not on anyone’s opinion of how old he seems to be.
Being category theorists, we might try to fit this into Lawvere’s framework of generalized logic, where we think of our truth values as forming a closed monoidal category. We can make it into a poset — and hence a category — by using the order , this will be our notion of entailment. So if and are statements then precisely when the truth degree of is less than or equal to the truth degree of . However, I’m not entirely sure how to interpret that.
The observant amongst you will have noticed that this poset is isomorphic to the poset we use for metric spaces , via the maps and . So an alternative interpretation of these truth values will be as ‘proximities’ — proximity approximately meaning not at all close, and proximity approximately meaning really, really close. [Switching from distances in to proximities in is an important step in calculating magnitudes of metric spaces, but I won’t say any more about that.]
Next we want some notion of ‘conjunction’ and ‘implication’ . In category theory terms we want a closed monoidal structure on the category . There are at least three such structures that are well studied.
The product structure: Here and if and otherwise. Via the exponential and logarithm maps this corresponds to the usual closed monoidal structure on of addition and truncated subtraction.
The Gödel structure: Here and if and otherwise. Via the exponential and logarithm maps this corresponds to the closed monoidal structure on which gives rise to ultrametric spaces.
The Łukasiewicz structure: Here and . Via the exponential and logarithm maps this corresponds to the monoidal structure and that doesn’t look at all familiar!
If the truth degrees of two statements are and then the truth degree of both statements together should be given by the conjunction , but I don’t know examples of real world models with these three different logics. Anybody? I would be very interested in hearing thoughts and ideas on this.
In all of the above three cases the closed monoidal category of classical truth values embeds closed monoidally.
Enriching over : fuzzy preorders
We can now think about what categories enriched in are, as generalizations of preorders. Such an enriched category consists of a set and to each pair of elements we associate a truth degree , we want to think of this as the degree to which is ordered before . This is what we will call a fuzzy preorder. It will satisfy fuzzy transitivity: . How this is actually interpreted will depend on which product we took.
Here’s an example of a fuzzy preorder. Suppose that Bart is aged 9, Marge is aged 39 and Homer is aged 40. Is it true that Homer is (at least) as old as Marge? Yes. Is it true that Marge is (at least) as old as Homer? Well, nearly. Is it true that Bart is (at least) as old as Marge? Well, not really at all. We can formalise this into a fuzzy preorder “is at least as old as” where Algebraically we could define This gives a fuzzy preorder on the set with respect the product monoidal structure on , or in other words, it gives a category enriched over the monoidal category .
There should be some more convincing examples, but I haven’t found any yet.
An exercise at this point is to look at the dictionary in my post on Galois correspondences and enriched categories and extend it by another column for categories enriched over .
Re: Fuzzy logic and enriching over the category [0,1]
I don’t claim to understand fuzzy logic, but there is a renewed interest in such issues in effect algebra of predicates.
Steve Vickers has work on fuzzy sets and geometric logic.
Both are at least in a categorical framework.