Logik wrote: ↑Sun Feb 24, 2019 2:11 pm
More from the realm of Constructive mathematics.
Here is a consistent logical system in which both A = B AND A != B are true.
Not really! The above quoted statement is itself inconsistent! Any system in which both A=B and A!=B are true is inconsistent. From Wikipedia, we have the following on consistency:
Wikipedia wrote:In classical deductive logic, a consistent theory is one that does not entail a contradiction. The lack of contradiction can be defined in either semantic or syntactic terms. The semantic definition states that a theory is consistent if it has a model, i.e., there exists an interpretation under which all formulas in the theory are true.
Intuitionistic logic as well upholds the law of non-contradiction. For example, the law of non-contradiction is made use in the principle of explosion in intuitionistic logic.
Wikipedia wrote:The principle of explosion (Latin: ex falso (sequitur) quodlibet (EFQ), "from falsehood, anything (follows)", or ex contradictione (sequitur) quodlibet (ECQ), "from contradiction, anything (follows)"), or the principle of Pseudo-Scotus, is the law of classical logic,
intuitionistic logic and similar logical systems, according to which any statement can be proven from a contradiction. That is, once a contradiction has been asserted, any proposition (including their negations) can be inferred from it. This is known as deductive explosion.
https://en.wikipedia.org/wiki/Principle_of_explosion
There is no logic without the law of non-contradiction. So, according to the logical definition of consistency, a logical system in which A=B and A!=B are both true is inconsistent.
_______________________
Logik wrote: ↑Sun Feb 24, 2019 2:11 pm
This is SUPPOSED to be a logical error?!?!?
Yes, indeed, you made a logical error.
________________________
Here are the codes you have written:
Code: Select all
class Human(object):
def __init__(self):
pass
def __eq__(self, other):
return True
def __ne__(self, other):
return True
A = Human()
B = Human()
# Apparently these two propositions can not be true at the same time
print("A is B: {}".format(A == B))
print("A is not B: {}".format(A != B ))
print("A is A: {}".format(A == A ))
print("A is not A: {}".format(A != A ))
print("(A = A) and (A != A ): {}".format( (A == A) and (A != A)))
There are very serious issues, among them moral and legal issues, with this program.
First of all, you have redefined equality and your redefinition of equality differs from both the mathematical definition and from common understanding as well. Here it is:
Code: Select all
def __eq__(self, other):
return True
The problem is that it always returns True, whatever is being compared! And the same for your redefinition of inequality:
Code: Select all
def __ne__(self, other):
return True
For those who have asked for plain English translation of these codes, here it is. In common English, these lines of codes means:
For the redefinition of equality: Every human is equal to every human.
For the redefinition of inequality: Every human is unequal to every human.
These are clearly contradictory statements! But more importantly in this case, for example, some humans are murderers and some humans are not murderers. Someone who has killed thousands of defenseless women and children is clearly not equal to someone who has not killed any human being. A murderer is clearly not equal to an innocent human being. But according to the redefinition of equality given in the program, a murderer is equal to an innocent human being! This is absolutely unacceptable from both a legal and a moral point of view.
And that is also obviously very different from what mathematicians and people with common sense understand by equality and inequality. Wikipedia gives the logical definition of Liebniz on equality, and this is also expressed in set theory.
Wikipedia:
Leibniz characterized the notion of equality as follows:
Given any x and y, x = y if and only if, given any predicate P, P(x) if and only if P(y).
Symbolically, we can now express Liebniz statement as follows: ꓯxꓯy(x=y ↔ ꓯP(P(x)↔P(y)))
In set theory:
Wikipedia wrote:
The equality between A and B is written A = B, and pronounced A equals B. The symbol "=" is called an "equals sign". For example:
{x|P(x)}={x|Q(x)} if and only if P(x) ↔ Q(x). This assertion, which uses set-builder notation, means that, if the elements satisfying the property P(x) are the same as the elements satisfying Q(x), then the two uses of the set-builder notation define the same set. This property often expressed as "two sets that have the same elements are equal." It is one of the usual axioms of set theory, called Axiom of extensionality.
While the redefinition expressed in the Python codes given in the OP can be expressed as follows:
Given any x and y, x=y if and only if, there is at least one predicate P and there is at least one predicate Q such that, P(x) if and only if Q(y).
Symbolically: ꓯxꓯy(x=y ↔ ꓱPꓱQ(P(x)↔Q(y)))
The later is clearly different from the accepted mathematical definition of equality. So here we have two different definitions of equality! Now, since each of these definitions are equal to themselves and not equal to each other, therefore the common understanding of equality must be prevailing!
Interesting it is to observe that if we take the default definition of equality and inequality in Python, then the correct results are obtained. We take the default definition by not redefining equality and inequality! I have rewritten the codes and added some instance variables to the class Human to make it more interesting! Here are the codes relying on the Python implementation of equality and inequality, followed by the results:
Codes are here:
https://repl.it/@Averroes/everythingIsFineAgain
Results here:
Code: Select all
Netanyahu is a man and is a criminal
Ilhan is a woman and is not a criminal
A is equal to B: False
A is not equal to B: True
A is equal to A: True
A is not equal to A: False
(A = A) and (A != A ): False
_________________________
Logik wrote: ↑Sun Feb 24, 2019 2:11 pm
#ShatteringTheAristotelianDream
Many of Aristotle thoughts have already been refuted long ago. However, the OP has not contributed to that in any way, shape or form! Certainly not by denying the law of non-contradiction!
Try again if you want, I give you two months to write another Python program violating the law of non-contradiction and at the same time not be making a logical error! Extensions will be given if need be. Take your time, I am not in a hurry. I will assess you work then, if God wills.