This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).
Fuzzy logic dates back to 1965 and it is related not only to current areas of knowledge, such as Control Theory and Computer Science, but also to traditional ones, such as Philosophy and Linguistics. Like any logic, fuzzy logic is concerned with argumentation, but unlike other modalities, which focus on the crisp reasoning of Mathematics, it deals with common sense reasoning; i.e., with approximate reasoning. Although the teaching of logic has formed part of mainstream education for many years, fuzzy logic is a much more recent inclusion. In this paper we emphasize the desirability of having illustrative examples related to students’ everyday activities, such as sports, in order to introduce fuzzy logic in higher education. Taking an example from cycling, we show, step by step, how to model an approximate reasoning regarding the choice of a ratio (a combination of freewheel and chainring) in order to advance more or less with each rotation of the pedals. Led by this example, a number of alternatives attending to the formal representation of the premises and the ways of inferring a plausible conclusion are analyzed. The choices made between alternatives are justified. We show that the conclusion inferred in the example is consistent with the models selected for premises and fuzzy inference and similar to that concluded by a human being.
Disciplines that are subject to being taught are shaped over time. There are the everpresent areas, such as Mathematics, Philosophy, Linguistics or Physics, and other more recent ones, such as Psychology or Logic. Even with relatively few years of autonomy in education, Logic includes traditional areas, such as Aristotle×s syllogistic, and other more innovative ones, such as Zadeh’s fuzzy logic. In effect, a modern development of logic is fuzzy logic. Since 1965, as quoted in [
Although fuzzy logic is a recent field, its subject matter is related not only with current areas, but also with traditional ones. Even though fuzzy logic’s prominence is due mainly to its role in modern control systems, vagueness has influenced the philosophical debate since ancient times. Thus, Aristotle highlighted the philosophical dimension of the formal study of vagueness relating the future contingent phrases (‘Tomorrow there will be a sea battle’, a statement that today is neither true nor false) with discussions on free will. Old areas of Mathematics, such as topology, measurement theory or algorithms, have been also ‘fuzzified’. But certainly, the closest relationship with fuzzy logic is with Advanced Computing. Therefore, fuzzy logic has to do with at least two areas whose teaching has long been institutionalized, Mathematics and Philosophy, but also with a more recent one, Computer Science.
Fuzzy logic has not remained a mere theory; on the contrary, it has given rise to manufactured products, of industrial or domestic use. Therefore, and this case is not too frequent in the history of science, it is a theory that has achieved its own technology. From this point of view, fuzzy logic is not only a scientific matter but also a tool with which to do things; i.e. an applied logic.
Like any logic, fuzzy logic is concerned with argumentation. But unlike others, such as bivalent logic, which deals with precise arguments from Mathematics, fuzzy logic deals with common sense reasoning; i.e. with approximate reasoning [
In adolescence, the student will have to study numerous subjects and, to successfully face this task, will have to develop skills involving the management of imprecision: heuristics for learning and data memory techniques (e.g. mnemonics rules), strategies for relating different information, reasoning by analogy to find solutions based on similar, previously solved cases,
Finally, at university, the student may wish to become acquainted with fuzzy logic in order to increase his/her knowledge of logic, his/her cultural skills or to acquire an instrument for solving problems or performing tasks in the setting of other disciplines; i.e., using fuzzy logic as an instrumental tool.
Fuzzy logic has recently undergone an extraordinary popularization and scientific dissemination in several mass media. The adjective ‘fuzzy’ gained wide popularity at least in two different prominent media: reporting and advertising. The advertisement as a ‘propaganda’ of the ‘fuzzy’ label has been favoured by the stamp of the fuzzy logic brand as a synonym for reliability and innovation in consumer products such as washing machines, video cameras or tensiometers. Thus, it has become common to see certain wellknown trademarks including labels such as ‘made with fuzzy logic’ or ‘fuzzylogiccontrolled’ into their products. The scientific dissemination of fuzzy logic has been encouraged by the robustness of its solutions and the ease of its management. This has given rise to an increasing number of textbooks, which include chapters devoted to fuzzy logic, not only in the field of Logic itself, but also in Computing, Analytical Philosophy and Linguistics. References to fuzzy logic in books on Social Sciences (Education, Psychology, Sociology, Anthropology) also abound, especially those dealing with methodological aspects, as this logic provides an adaptive and efficient analysis of aspects such as subjectivity or instability, characteristics of their subject matter.
The increasing presence of fuzzy logic in scientific, cultural, educational, commercial and technological fields demands a kind of literacy in the basic principles of approximate reasoning. In this task it would be useful to have good examples in order to introduce the basics of fuzzy logic in a rigorous, but at the same time, enjoyable way. With this in mind, this paper is organized as follows. In
One of the most relevant features that define us as human beings is that of possessing the capability to reason. Traditionally, the science of reasoning is deductive logic, since Aristotelian deductive logic was associated to syllogism. A syllogism is a logical argument in which a quantified statement (the conclusion) follows from other two quantified statements (the premises). Both the premises and the conclusion are made up of precise statements and the only quantifiers admitted are
This example comes from Mathematics, the science
it is not strictly possible to derive any conclusion. Two factors are relevant in precluding a conclusion: (1) the first and the second premise include uncovered quantifiers in the Aristotelian syllogistic (
Imprecise or approximate reasoning play an important role in our daily lives and it would seem imperative to deal with it. Traditionally, several logics are devoted to dealing with the imprecision; two of the most successful are probabilistic logic and, more recently, fuzzy logic. Although both focus on imprecision, their subject of study and objectives are different. Loosely speaking, one can say that while probability deals with uncertainty, fuzziness addresses vagueness. We shall now go on to examine this.
There are four types of sentences relating determinate/indeterminate, crisp/vague. Focusing on these, a sentence can be classifiable as (a) determinate and crisp, (b) indeterminate and crisp, (c) vague and determinate, (d) vague and indeterminate. An example of (a) is ‘A triangle has three angles’. An example of (b) is ‘I throw a die and it is a multiple of 3’. An example of (c) is ‘Swallowing about 30 grams of
While (b) is an example of a probabilistic statement, (d) is an example of a vague sentence: they help us to distinguish between probability and fuzziness. Returning to the aforementioned sentence, ‘I throw a die and it is a multiple of 3’, we can note that if the die is perfect (not manipulated or misconstrued), each of its faces has a 1/6 probability of coming out and, as probability is an additive measure, the probability of ‘getting a multiple of 3’ can be calculated as follows:
Thus, ‘getting a multiple of’ 3 is an indeterminate sentence, not an imprecise or vague one [
Unlike the sentence ‘get a multiple of 3’, the phrase ‘Athletes are tall’ is vague. Although we can substitute the height of each athlete for a precise measurement, the sentence is vague because there are individuals named as ‘tall and ‘not tall’ by different people. Vague individuals are ‘borderline cases’; i.e., cases not firmly true or false. Furthermore, for the same person, an individual may be tall enough for some sports (hockey) but not for others (basketball). Only if we know the sport that he or she is involved in can we reasonably say if he or she is tall or not. Vague predicates are contextdependent.
‘Young’, ‘tall’ or ‘happy’ are all examples of vague meanings, but fuzzy logic focuses only on vague predicates that are measurable. ‘Youth’ and ‘height’ are measurable, but not ‘happiness’ (at least not in the same way). A measurable vague predicate P can be represented by a curve (a function), f_{P}. The curve determines the degree to which a given object satisfies certain property or not. Graded properties are represented by fuzzy sets. A fuzzy set over a universe X is defined by its generalized membership function, usually denoted by µ_{P}(x), representing the compatibility to attribute the property P to a given element x or, in other interpretation, the possibility to soundly attribute P to x. In this latter sense, as Zadeh noted in [
i.e., the compatibility of 0 with the predicate ‘small number’ is 1 or, in an alternative way, the possibility of calling 0 a ‘small number’ is 1, …, and so on.
Vague properties, unlike crisp ones, are not an
Consider the difference between the representation of a vague predicate and a crisp one. For example, in the universe U=[0, 10], the crisp predicate P=
Representation of the predicate
i.e.,
configuring a twostep function.
In contrast, in the universe U=[0, 100] the vague predicate P’=
Representations of the predicate
The curve shows that if you are below 50, then you are not old. If you are over 70, you are old. Between 50 and 70 years, the curve increases but differently in the three representations: if Peter is 62 years old, the degree of compatibility of his age with the first curve for ‘old’ is greater than with the second and lower than with the third. But in all cases, albeit with slight differences, the curves show the degree in which ‘Peter is young’ considering only his numerical age (62).
Fuzzy sets may be conjoined, disjoined or negate. Let us look at an example of conjunction (˄). Let F be the fuzzy set =
Representation of the predicates
We can ask for an object whose weight is
Representation of the predicate
showing the compatibility of a given weight with the predicate
Fuzzy logic shows its suitability for dealing with inexact or vague predicates not only in everyday cases, but also in scientific knowledge—including mathematical knowledge—approaching cases, where not everything is classifiable as ‘black and white’ [
In the setting of Polya’s contribution [
The example that we will introduce below is drawn from the world of sport and, in particular, from cycling. It is aimed at beginners in approximate reasoning; in particular, for students of Philosophy, Mathematics and Computer Science. The example will be developed step by step, explaining alternatives and elections. I agree with Garrido [
Anyone who has been cycling has, either, consciously or unconsciously, reasoned along the lines of: ‘To go fast, I have to switch to a very small freewheel and a large chainring’. As any cyclist knows, the bicycle speed depends on the ratio transmitted to the chain; i.e., on the number of teeth on the freewheel and on the number of teeth on the chainring. The reasoning, informally stated above, is actually an enthymeme: it hides some premise. More specifically, the rule that makes it possible to reach the conclusion using the information included in the premise (the ratio used) is omitted. An explicit representation of the argument is as follows:
Premises:
P1:
P2:
Conclusion:
C:
To perform a formal model of this reasoning, fuzzy logic must to provide:
A representation of the vague lexicon included in the premises (in bold):
A method for inferring a conclusion. As a conclusion follows from imprecise premises, it must be approximate, providing information according to what the premises do (
No doubt about the imprecise character of the premises. ‘Very’, is a linguistic label, generally an adverb of quantity that qualifies the meaning of the adjectives (
In order to model a problem involving vague language adequately, we must consider the following specificities:
Vague predicates are quite common in natural language and they contrast with crisp predicates, which are timeless, generally belonging to the world of mathematics, an ideal realm of pure thoughts where everything is or is not—thus, the number 3 is prime or not; a triangle is scalene or it is not,
Crisp predicates often lack context or have a quite general context: e.g., in the universe of natural numbers, 7 is a prime number regardless of whether we refer to a subset or to another subset of
Fuzzy logic provides models for representing vagueness in context. By way of example, in the universe U=[0, 6], ‘numbers less than 3’ and ‘numbers far from 3’ would be represented as follows
But note that, considering another universe, U = [0, 9], while the representation of the predicate ‘numbers less than 3’ does not change (‘less than’ is a crisp predicate), the representation of ‘numbers far from 3’ is altered, as shows the right figure below. In effect, you can check that the figures for ‘far from 3’ mismatch in the range 36 (
The figures show graphically that while crisp predicates are context independent, vague predicates are always sensitive to the universe of reference. While crisp predicates classify the world in black and white, vague predicates put objects on a gray scale.
Just as a crisp predicate is characterized by its precise membership function (1 or 0 values), a vague predicate is represented by a generalized membership function; i.e., by the attribution of degrees of membership to the elements of the universe of reference. Thus, the generalized membership function that corresponds to the vague predicate ‘numbers far from 3’, U=[0, 6], can be recovered by the top figure and can be summarized as follows:
Considering only the integer values, the meaning of the imprecise predicate ‘number far from 3’ is represented by the following set of elementvalue pairs:
Other representations of the predicate ‘numbers far from 3’.
We can see that while
Once we have a way to represent the imprecise meaning of simple sentences with fuzzy sets, we may ask how to evaluate complex sentences; i.e., how to make negations, disjunctions, conjunctions or conditionals from atomic sentences. There are several ways to negate, aggregate or condition vague sentences, which we now go on to examine.
A fuzzy negation operator
its negation (not_small) could be characterized by,
or by
Graphically (
Several negation functions.
There are also several ways to intersect or join fuzzy sets. Choosing one of the alternatives depends on the meaning of the sentences under conjunction or disjunction. Thus, taking the first example, if the sentences denote situations that are independent between themselves, as occurs in ‘He was climbing the pass using a small freewheel’ and ‘He was well hydrated’, the use of the
Types of tnorms and tconorms.
Name  Notation  Definition 

bounded  T_{0}  Max(0,a+b1) 
S_{0}  Min(1, a+b)  
product  T_{1}  a×b 
S_{1}  a+ba×b  
min/max  T_{2}  min(a,b) 
S_{2}  max(a,b) 
Two fuzzy sets are also related if one conditions the other. A fuzzy conditional is usually a straightforward generalization of the typical ways in which the classic material conditional can be defined. Depending on which definition is selected, two principal families can be distinguished: Sconditionals and Rconditionals.
Sconditionals generalize the classical definition a→b≡¬a˅b replacing ˅ with a tconorm S and ¬ with a fuzzy complement. It follows that a→b ≡ S(n(a), b). If we take n(a)=1a, then S(n(a), b)=S(1a, b). If we substitute S with a quoted union, we obtain the conditional Lukasiewicz conditional: I_{L}(a, b)=min(1, 1a+b); if S is
The family of Rconditionals are obtained by generalization: a→b ≡ sup{x∈[0, 1]  a˄x≤b}. Replacing ˄ with the
If we use T(a, b)=max(0, a+b1), we obtain the Lukasiewicz conditional.
Since conditional operators are designed based on tnorms and tconorms, there are a wide variety of them. There are up to 40 and there is empirical evidence to diagnose their suitability for different interpretations of the meanings of fuzzy conditional sentences. A. Sobrino and S. Fernández [
Once we know how to assess complex fuzzy propositions, let us not go on to see how the values are transmitted from propositionspremises to a propositionconclusion. There are several modalities of approximate inference [
Compositional inference
Inference by analogy or compatibility
Interpolative inference
The most common way to formalize vague reasoning is the socalled compositional inference or generalized Modus Ponens, which we shall refer to in order to model the example employed in the present study.
But first we shall briefly review the other two modes of inference.
In the inference by analogy, using a similarity measure, we calculate the degree to which the perception or fact named by the premise satisfies the antecedent of the rule. This degree is transferred to the conclusion. In schematic form:
Scheme of inference by analogy.
If X is A then Y is C 
A’ is γ compatible with (or similar to) A 
Hausdorff’s distance is frequently used to define the similarity as the inverse of that distance.
The interpolative inference (
Schema of interpolative inference.
i.e., interpolation enables us to conclude that C’ is between C_{1} and C_{2} to approximately the same extent that A’ is between A_{1} and A_{2}.
While models by analogy use a simple rule, the interpolative reasoning requires two or more rules to provide information with which to generate a conclusion. In this regard, it also differs from the compositional inference, which will be described below.
Compositional rule of inference or generalized Modus Ponens matches the following schema:
Compositional rule of inference.

X is A* 
where A* is similar to A and the rule, if correct, should conclude one D* similar to D.
Which of these forms of approximate reasoning should be used to model the example used in the present study? There is no sense in using interpolative reasoning: there are not two rules, but only one. We are led, therefore, to choose between the inference by analogy and the compositional inference. In reasoning by analogy, the compatibility between the fact and the antecedent of the rule is established. In the compositional inference, as its name indicates, we compound or mix the fact and the rule in order to provide a conclusion. Both methods would seem to be suitable for modelling our example. Here we will choose the compositional rule of inference, as it is more traditional. We now go on to consider the above quoted schema in more detail.
The rule ‘if X is A then Z is D’ is valued as a fuzzy conditional linking the condition (A) and the conditioned by the premise (D):
Let us now see how to model the example used in the present study, taking the caveats referred to in the above paragraphs into account. We recall:
Given the premises:
P1:
P2:
we can ask what conclusion can be expected.
First, we have to represent the information involved in the premises. Let SF be the predicate ‘
Proposition of the antecedent of the rule, premise_1.
μ_{SF}(x)= {12/0.9; 16/0.6; 20/0.4; 24/0.1} 
μ_{LC}(y)= {33/0.1; 52/0.9} 
12, 16, 20 and 24 being the number of teeth of the freewheel, and 33 and 52 the number of teeth of the chainring.
Let GF be the predicate ‘go fast’, represented by the following possibility distribution:
Consequence of rule, premise_1.
μ_{GF}(z)= {3/0.1; 6/0.5; 9/0.9} 
where 3, 6 are 9 are the meters moved forward with each revolution of the chainring.
First, we have to combine the information ‘small freewheel’ and ‘large chainring’. As freewheels and chainrings interact to achieve more or less speed, we use the tnorm
Conjunction of propositions that are the antecedent of the rule.
μ_{BR}(x,y)  12  16  20  24 


0.09  0.06  0.04  0.01 

0.81  0.0.54  0.36  0.09 
Now we can calculate the values of the conditional clause ‘
I select a big ratio and I go fast.
Or I do not select a big ratio or I go fast
Or I do not select a big ratio, or I do and I go fast.
Or I do not select a big ratio or I go at a speed proportional to the ratio selected.
1 shows a case where the material conditional is satisfied: the condition and the conditioned are true but exclude the hypothetical character of the antecedent and, thus, the possibility that the condition does not hold. The other three cases do include this feature. 2 show the traditional interpretation: either the antecedent is met or it is not. 3 add some kind of completeness: either the antecedent fails, or the antecedent and the consequent are satisfied. Lastly, 4 say that either the antecedent fails or the consequent is proportional, depending on the degree of satisfaction of the antecedent. For our example, 3 or 4 may be appropriate interpretations. 3 is a sound interpretation as it expresses the congruence between ‘go fast’ and ‘big ratio’ quite well and because, if the condition is given, the interaction between the condition and the conditioned can be calculated by the tnorm
Supposing we decided on the first (i.e., the definition by Reichenbach). According to this choice:
Premise_1 (Rule).
μ_{BR→GF}(w)  1233  1252  1633  1652  2033  2052  2433  2452 


0.919  0.0.271  0.9406  0.514  0.964  0.676  0.991  0.919 

0.955  0.595  0.97  0.74  0.98  0.82  0.995  0.955 

0.9181  0.919  0.994  0.946  0.996  0.964  0.999  0.991 
These values should show the congruence between the speed selected and the progress made (3, 6, 9 are the advanced meters).
Once the value of the rule has been determined, let us now go on to see how to calculate the value of the perception or fact. The truth value of the fact is a modification of the value of the antecedent of the rule: compared with it, the only difference is that the adjective (small) is qualified by the adverb ‘very’ (‘very small freewheel’) and, once again, ‘big’ is qualified by ‘very’ (‘very big chainring’)—i.e., we perceive a very small freewheel and a very big chainring. In fuzzy logic, we know that if an element satisfies a predicate P in a degree, satisfies the predicate ‘very_P’ to a less extent. There is agreement that the square function captures this intuition; i.e., if μ_{P}(u)=x, μ_{very_P}(u)=x^{2}. Taking into account this definition:
Premise_2 (Rule).
μ_{very_BR}(x,y)  12  16  20  24 


0.0081  0.0036  0.0016  0.0001 

0.6561  0.2916  0.1295  0.0081 
We have values for the rule and for the perception or fact. What value should be passed on to the conclusion? Answering this question involves composing the values of the table denoting the meaning of the fact with the values shown in the table above representing the meaning of the rule. Following Zadeh’s rule, we obtain A* with the composition supT. In [
Performing the calculus that the above formula suggests, we obtain the following values for μ_{A}*(w):
Conclusion.
μ_{GF*}(w)= {3/0; 6/0.251; 9/0.5751} 
If we analyse the results, we can see that the values for 3 and 6 are very close to the square of the values of μ_{GF} for these same elements. The value for 9 is the most divergent (it should be around 0.81 and, in fact, it is 0.5751). How can be expressed this answer? This matter is called, in the realm of fuzzy logic, ‘linguistic approximation’ and there are different techniques for solving it. Generally speaking, we can check that the obtained set μ_{GF}_{*} is more similar to one that ideally represent ‘go very fast’ than to any other, and that is precisely the conclusion that a rational agent draws from the premises. The conclusion is approximate because the reasoning is so too; there is nothing special about it.
This is an example of approximate reasoning with truths degree. By so doing, fuzzy logic is a multiplevalued multiplelogic; i.e., it is a family of infinitelyvalued logics.
But people reason, rather than with degrees, with linguistic expressions as those founded in the example above: ‘low speed’, ‘go fast’,
Let us agree that the knowledge relating speed and progress of a bicycle is showed by the following rules:
If the freewheel is small and the chainring is large, the progress made is remarkable
If the freewheel is medium and the chainring is medium, the progress made is moderate
If the freewheel is large and the chainring is small, little progress is made.
Let us agree that these rules can be represented as the following figures show (
Graphical representation of the fuzzy terms involved in the rules.
where 12, 16,
Suppose we observe that the bike has 16 teeth in the freewheel and 52 teeth in the chainring. What is the expected progress? To make this example more straightforward and illustrative, we use the tnorm
Graphical representations of the rules using the tnorm
Finally, among the
Centre of area.
Note that the centre of the area (
The role of classical logic in teaching is unquestionable, as is stressed by the ASL (Association for Symbolic Logic) Committee on Logic and Education in [
The exampleguide developed in this paper shows that fuzzy logic is an adequate tool for managing approximate reasoning, providing plausible solutions to problems that, like those concerned with the decisions individuals take when cycling in order to make significant or little progress, are verbalized in an inexact or vague manner. Therefore, in its linguistic version, is an example of computing with words [
By modelling the exampleguide of this work, we have attempted to conduct an exercise in logical analysis of the sentences including vague words, in the tradition inaugurated by M. Black in [
Thanks to the reviewers for their helpful suggestions.
This work is dedicated to my teachers E. Trillas and S. Termini, who introduced me to the fascinating world of fuzzy logic.
This work was supported by the Spanish Ministry for Economy and Innovation and by the European Regional Development Fund (ERDF/FEDER) under grant TIN201129827C0202.