How can I check easily if all numbers in a number set equals to each other or not? I want to know if all number pair equals each other that selected from a specified number set.
For example:
There is a set $A=\{5,3,6,2\}$ and to check the variable equalities requires to check the boolean result comparing each number to others. This method requires $C(5,2)=10$ comparisions. I need a short method to know this.
e.g:
$5*3*6*2=180$ and if $\sqrt[4]{180}$ is an integer number it can be said all are equal but this is not a correct way for all numbers.
Now I want to ask if there is a formulation such as multiply all values and check equality to a number or like it to make it easy?
 A: It's not clear (to me) whether you are asking if all the numbers are the same, or if there is at least one pair that's the same.
If you are looking for one pair:
You could compute the product of the differences and see if you get zero. That's just one numerical comparison, but lots more arithmetic. With five numbers it's 10 subtractions (and one multiplication) instead of 10 comparisons.
You could sort the list and then traverse it looking for an equal adjacent pair.  With the right sorting algorithm that would require fewer comparisons than comparing every pair (for a long list). Here are some computer programs that do the job: https://stackoverflow.com/questions/4192724/algorithm-to-find-duplicate-in-an-array .
I doubt that either of these answers will satisfy your wish to "make it easy". I don't think there is any way to do that.
If you want to check whether all the numbers are the same you just have to compare each with the first one, as @Claude says in his answer.
A: Equality is reflexive ($ x = y \implies y = x $) and transitive ($ x = y \land y = z \implies x = z $) so you can compare all the other numbers against the first number, which for a set of $n$ numbers is $n-1$ operations.
Example for $n = 4$ with $(a, b, c, d)$:
$$ a = b \land a = c \land a = d \implies a = b = c = d $$
(Pedantic note: you have a tuple rather than a set, as a set by definition contains only distinct values.)
