It is not a fuzzy logic operator per se. Not strongly. But it can be considered a boolean operator, so in a way would also be fuzzy. So for the question "is it a fuzzy logic operator?" I answer 11.39%.
To begin, we need to define what a type operator to then define what a diffuse logic operator.
The description of what a BinaryOperator
of Java 8 is that a binary operator is a binary function in which the operands and the output are of the same type. Read the documentation. On top, it’s like this:
public interface BinaryOperator<T> extends BiFunction<T,T,T> {
}
Mathematically, an n-ary operator is a function that takes n operands of the same type and the return is also of the same type. In this case, to consider ==
, ===
, !=
and !==
as operators, they should only be considered at the level of operands that are also of fuzzy logic.
But for those there in particular, regardless of which are the operands, the return is only SIM
or NÃO
. Untitled.
But what is Boolean logic? Formally, it is composed of 3 axioms:
- identity
- non-contradiction
- excluded third party
You can read more on the subject in that reply. And what is fuzzy logic? It is a change in these axioms, more specifically the removal of the excluded third. In this case, fuzzy logic allows you to have something 11.3% true. The change is that there are 2 values (already predicted in the boolean) and that there is a whole continuous interval between these values.
In this case, the boolean logic can be mapped to the fuzzy one as follows:
Reverse mapping is not possible. The cardinality of the Boolean set of values is finite, there is no way to do a bijection to the continuum which is the set of fuzzy values. You can even make an over, but it wouldn’t be the reverse function. If there was a function that turns the boolean values into fuzzy ones called bool2fuzzy
and the function that transforms from fuzzy logic to boolean call fuzzy2bool
, the following formulas are correct:
seja fuz uma variável pertencente a Difuso
se fuz não pertencer a {0, 1}:
bool2fuzzy(fuzzy2bool(fuz)) != fuz
senão:
bool2fuzzy(fuzzy2bool(fuz)) == fuz
Operators in programming language vs operators in mathematics
Well, I must have made a mess in your head, am I? Yes or no? 67%?
In mathematics, an operator (binary) is something like this:
Already in programming languages, we do not use the notion pure mathematics than is an operator. For example, you can do "123" + 4
in PHP, Java and other languages. In this case, programming languages use syntactic operators. A syntactic operator does not enter the realm of mathematics, but the realm of syntax. In this case, for binary syntactic operator it is the one who fills the space of <op>
in the grammatical production below:
So in the case of programming languages, the structure determines whether something is called an operator or not. Inclusive this answer reinforces this.
Completion
- binary operators in mathematics map 2 objects on a third object, as long as all these 3 objects belong to the "same universe"
- programming languages call "operators" something that fits the operation structure
- comparison, strong or loose, equality or difference, are Boolean logic operators (mathematically speaking when they treat as input boolean values)
- comparison, strong or loose, equality or difference, are 11.39% diffuse logic operators
- this answer is 73% correct
@Guilhermenascimento is not about that, but what logic languages use to identify what these operators do.
– AnthraxisBR
Your doubt seemed to me somewhat ample by your comment of now.
– user28595
I’ll edit the question again, see if I can make it clearer, but maybe my doubt doesn’t make sense at all
– AnthraxisBR
No, they cannot. Fuzzy logic does not return "yes" or "no". Fuzzy logic is the disruption of the axiom of the third excluded from the axiomatic system of boolean logic. These operators do not return "39% equality".
– Jefferson Quesado
Recommended reading: https://answall.com/q/152106/64969
– Jefferson Quesado
@Jeffersonquesado ah understood now, I also made confusion. Thank you! - I withdrew the closing vote
– Guilherme Nascimento
The @Jeffersonquesado answered right what I wanted to know
– AnthraxisBR
@Anthraxisbr perfect, I left a +1 now that the question became a little clearer, if you allow me I have an editing suggestion, anything just make the rollback if you disagree
– Guilherme Nascimento
@Anthraxisbr, since the question was closed, I ended up pasting my answer into a snippet: https://gitlab.com/snippets/1702821
– Jefferson Quesado
@Jeffersonquesado perfeito!
– AnthraxisBR
My position on why this question should be reopened: https://pt.meta.stackoverflow.com/q/6857/64969
– Jefferson Quesado