• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

Python & the Law of Identity

The contradiction is in having first A==A evaluates as true and then A==A evaluates as false. It doesn't matter it's not the same A. You have first the verification of the Law of Identity and then the falsification of the Law of Identity.
EB
 
The contradiction is in having first A==A evaluates as true and then A==A evaluates as false. It doesn't matter it's not the same A.

Of course it matters. It makes those two different statements. A contradiction is for the same statement to be both true and false, not for one of two similar statements to be true while the other is false.

You have first the verification of the Law of Identity and then the falsification of the Law of Identity.
EB

There's no falsification of the Law of Identity. First of all, `==` in Python doesn't check identity (but rather equality) at the best of times, and second, it's been overwritten with something that's neither an identity check nor an equality check. Basically, all he's showing is that applying function f to entity A doesn't need to have the same effect as applying function g to entity B, only he's trying to play us by labelling both entities "A" and both functions "f".

If we can agree that "f(A) != g(B)" isn't a contradiction, we can agree that he has no contradiction to show.
 
The contradiction is in having first A==A evaluates as true and then A==A evaluates as false. It doesn't matter it's not the same A. You have first the verification of the Law of Identity and then the falsification of the Law of Identity.
EB

You do not understand the symbolism and the logic .

a = 2 is a declaration. It is neither true nor false, it is a definition.

a == 2 asks the question does a equal 2 which can be true or false.

a = 2
b = 2
(a==b)_ evaluates to true

a = 2
b = 3
(a==b)_ evaluates to false

(a==a) will always evaluate to true
a == b
Repeat 100 times
double equal sign means does a equal b and can be true or false. a == a is always true.

In any symbolic logic system or computer language if (a == a) can be false then there is a problem.I do not have it, but the test is for you to run it and see what happens. Doing is part of learning.

It seems like you are trying to fit common computer logic into metaphysics and text going back to Aristotle.

== is a definition regardless of what else exists the realm of logic and philosophy.

logical test definitions
a == b is a and b equal
a <= b is a less than or equal to b
a > = b

a <= a evaluates true
a >= a true
a < a false
a > a false
 
The contradiction is in having first A==A evaluates as true and then A==A evaluates as false. It doesn't matter it's not the same A. You have first the verification of the Law of Identity and then the falsification of the Law of Identity.
EB

You do not understand the symbolism and the logic .

a = 2 is a declaration. It is neither true nor false, it is a definition.

a == 2 asks the question does a equal 2 which can be true or false.

a = 2
b = 2
(a==b)_ evaluates to true

a = 2
b = 3
(a==b)_ evaluates to false

(a==a) will always evaluate to true
a == b
Repeat 100 times
double equal sign means does a equal b and can be true or false. a == a is always true.

In any symbolic logic system or computer language if (a == a) can be false then there is a problem.I do not have it, but the test is for you to run it and see what happens. Doing is part of learning.

It seems like you are trying to fit common computer logic into metaphysics and text going back to Aristotle.

== is a definition regardless of what else exists the realm of logic and philosophy.

logical test definitions
a == b is a and b equal
a <= b is a less than or equal to b
a > = b

a <= a evaluates true
a >= a true
a < a false
a > a false

This thread isn't about the base semantics of operators, it's about operator overloading.
 
The contradiction is in having first A==A evaluates as true and then A==A evaluates as false. It doesn't matter it's not the same A. You have first the verification of the Law of Identity and then the falsification of the Law of Identity.
EB

You do not understand the symbolism and the logic .

a = 2 is a declaration. It is neither true nor false, it is a definition.

a == 2 asks the question does a equal 2 which can be true or false.

a = 2
b = 2
(a==b)_ evaluates to true

a = 2
b = 3
(a==b)_ evaluates to false

(a==a) will always evaluate to true
a == b
Repeat 100 times
double equal sign means does a equal b and can be true or false. a == a is always true.

In any symbolic logic system or computer language if (a == a) can be false then there is a problem.I do not have it, but the test is for you to run it and see what happens. Doing is part of learning.

It seems like you are trying to fit common computer logic into metaphysics and text going back to Aristotle.

== is a definition regardless of what else exists the realm of logic and philosophy.

logical test definitions
a == b is a and b equal
a <= b is a less than or equal to b
a > = b

a <= a evaluates true
a >= a true
a < a false
a > a false

Steve, this isn't what they are talking about. I'm not sure if you can decipher the original code, but essentially, in Python, the logical operators can return *anything*, depending on how you implement the methods that hook into them. They don't even have to return boolean objects!
 
The contradiction is in having first A==A evaluates as true and then A==A evaluates as false. It doesn't matter it's not the same A. You have first the verification of the Law of Identity and then the falsification of the Law of Identity.
EB

You do not understand the symbolism and the logic .

a = 2 is a declaration. It is neither true nor false, it is a definition.

a == 2 asks the question does a equal 2 which can be true or false.

a = 2
b = 2
(a==b)_ evaluates to true

a = 2
b = 3
(a==b)_ evaluates to false

(a==a) will always evaluate to true
a == b
Repeat 100 times
double equal sign means does a equal b and can be true or false. a == a is always true.

In any symbolic logic system or computer language if (a == a) can be false then there is a problem.I do not have it, but the test is for you to run it and see what happens. Doing is part of learning.

It seems like you are trying to fit common computer logic into metaphysics and text going back to Aristotle.

== is a definition regardless of what else exists the realm of logic and philosophy.

logical test definitions
a == b is a and b equal
a <= b is a less than or equal to b
a > = b

a <= a evaluates true
a >= a true
a < a false
a > a false

Steve, this isn't what they are talking about. I'm not sure if you can decipher the original code, but essentially, in Python, the logical operators can return *anything*, depending on how you implement the methods that hook into them. They don't even have to return boolean objects!

Not knowing Python I suspected if there is a problem it might be related to something like t6hat. Thanks.

My eye problems make it difficult to parse things. No peripheral vision, I have to scan a sentence.

Back in the 80s the idea was we'd all lean C as platform independent portable language.
 
Steve, this isn't what they are talking about. I'm not sure if you can decipher the original code, but essentially, in Python, the logical operators can return *anything*, depending on how you implement the methods that hook into them. They don't even have to return boolean objects!

Not knowing Python I suspected if there is a problem it might be related to something like t6hat. Thanks.

My eye problems make it difficult to parse things. No peripheral vision, I have to scan a sentence.

Back in the 80s the idea was we'd all lean C as platform independent portable language.

Yeah, I figured that your vision problems might have obscured what the Python code was doing, especially since it isn't formatted. But essentially, Python is a very different language than C. Everything is an object, and there are no primitive data types. Operators are essentially syntactic sugar for methods on objects.
 
Steve, this isn't what they are talking about. I'm not sure if you can decipher the original code, but essentially, in Python, the logical operators can return *anything*, depending on how you implement the methods that hook into them. They don't even have to return boolean objects!

Not knowing Python I suspected if there is a problem it might be related to something like t6hat. Thanks.

My eye problems make it difficult to parse things. No peripheral vision, I have to scan a sentence.

Back in the 80s the idea was we'd all lean C as platform independent portable language.

Yeah, I figured that your vision problems might have obscured what the Python code was doing, especially since it isn't formatted. But essentially, Python is a very different language than C. Everything is an object, and there are no primitive data types. Operators are essentially syntactic sugar for methods on objects.

Sounds like opportunity for monster code of years past.

Are there free binaries and development environments with debuggers?
 
The contradiction is in having first A==A evaluates as true and then A==A evaluates as false. It doesn't matter it's not the same A.

Of course it matters. It makes those two different statements. A contradiction is for the same statement to be both true and false, not for one of two similar statements to be true while the other is false.
First, I agree that whenever "==" is overwritten by a method specific to A, then "A==A" and "B==B" don't use the same method for comparison and therefore can give different results contrary to A=A and B=B which are effectively equivalent for the ordinary notion of equality since for all x, x=x is true.

However, what this guy does is to replace the axiom of identity that says "for all x, x=x is true" with a freak axiom of non-identity that says "for all x, x=x is true except that for A, A=A is false".

The contradiction then comes from evaluating A==A as true using the default method that implement the axiom of identity, and then, in the same programme, evaluating A==A as false using the method specific to A that implement the freak axiom of non-identity.

You have first the verification of the Law of Identity and then the falsification of the Law of Identity.
EB

There's no falsification of the Law of Identity. First of all, `==` in Python doesn't check identity (but rather equality) at the best of times, and second, it's been overwritten with something that's neither an identity check nor an equality check. Basically, all he's showing is that applying function f to entity A doesn't need to have the same effect as applying function g to entity B, only he's trying to play us by labelling both entities "A" and both functions "f".

If we can agree that "f(A) != g(B)" isn't a contradiction, we can agree that he has no contradiction to show.

The contradiction is in getting the same formalism A==A evaluate first as true, and then as false, in the same programme. Again, I agree it's trivial and doesn't prove anything, but it's nonetheless a contradiction, a purely formal contradiction but code is purely formal anyway, or at least I expect it's meant to be.

I think there is an implementation of the notion of identity in Python, noted Id(x). If so, I would expect you can evaluate Id(x)==Id(y). I would also expect that you can perform the same trick with Id(A)==Id(A) as he did with A==A, unless there is a specific and hardwired "firewall" in Python's syntactic rules against that particular move. It would be interesting to see if the designers of Python have thought about that possibility... If not, maybe it's time you put a word to these guys to think about doing something about it.
EB
 
Also, I would expect that the Curry-Howard correspondence is between a programme and the logic it implements. Given that Python allows you to implement in a programme a logic different from classical logic, the programme is only a proof in the logic implemented and therefore isn't a proof in classical logic.
Any expertise on this aspect of the issue?
EB
 
First, I agree that whenever "==" is overwritten by a method specific to A, then "A==A" and "B==B" don't use the same method for comparison and therefore can give different results contrary to A=A and B=B which are effectively equivalent for the ordinary notion of equality since for all x, x=x is true.

However, what this guy does is to replace the axiom of identity that says "for all x, x=x is true" with a freak axiom of non-identity that says "for all x, x=x is true except that for A, A=A is false".

The contradiction then comes from evaluating A==A as true using the default method that implement the axiom of identity, and then, in the same programme, evaluating A==A as false using the method specific to A that implement the freak axiom of non-identity.

You have first the verification of the Law of Identity and then the falsification of the Law of Identity.
EB

There's no falsification of the Law of Identity. First of all, `==` in Python doesn't check identity (but rather equality) at the best of times, and second, it's been overwritten with something that's neither an identity check nor an equality check. Basically, all he's showing is that applying function f to entity A doesn't need to have the same effect as applying function g to entity B, only he's trying to play us by labelling both entities "A" and both functions "f".

If we can agree that "f(A) != g(B)" isn't a contradiction, we can agree that he has no contradiction to show.

The contradiction is in getting the same formalism A==A evaluate first as true, and then as false, in the same programme.

Not a contradiction when you redefine both A and `==` in between, just obfuscating labelling.
 
One can understand equality mathematically with these three axioms:
  1. Reflexivity: x == x
  2. Symmetry: x == y implies y == x
  3. Transitivity: x == y and y == z imply x == z
The law of identity is the first axiom, it seems.
 
One can understand equality mathematically with these three axioms:
  1. Reflexivity: x == x
  2. Symmetry: x == y implies y == x
  3. Transitivity: x == y and y == z imply x == z
The law of identity is the first axiom, it seems.

They are arbitrary definitions.

It is saying we will stipulate x is the same thing as x.

Even if they are in a different place.
 
Back
Top Bottom