On Fri, Jan 02, 2009 at 12:50:44PM -0800, Erik Max Francis wrote: >>> Identity isn't defined on math objects, only on Python objects; there >>> is no notion of 'is' in math. >> >> This is also false, it even has its own operator (which requires >> Unicode to display): ≡ > > That can mean a number of things, one of which means "is identically > equal to,"
Quite so. > but identity means something different in mathematics than it means > here. But for non-mutable objects, aren't they essentially the same? Mathematics has no concept of "objects" in the sense that computer science does, so of course the best you can really do is draw parallels. > In mathematics, identity means a relationship that is true > regardless of the value of the variables involved (as opposed to > equality which is only true under more specific circumstances). Does 2 = 2 not qualify? Isn't it true that 2 ≡ 2 and 2 is 2? :) Yet there are no variables at all... The "objects" of mathematics are numbers, which are constants, which as such I would argue always have the same "identity" as themselves. Other components of mathematics are "expressions", which may or may not evaluate to constants, depending on the set conditions. Python has those too, and they are not the same as objects. > In computer science, identity means that two expressions are > represented by the same object, something which not only has no > meaning in mathematics, We're getting way off track here, but I would argue this is also false. Take sets, for example: A = { 1, 2, 3 } B = { 1, 2, 3 } Is it not true that A ≡ B and in fact these two sets are the same, i.e. they are not actually two different sets at all; the have the same identity, even considering a definition of "identity" which reflects that in Python? A and B are in fact simply two different names we've given to the same mathematical entity. The major difference between mathematics and Python is that mathematical objects are essentially unique, i.e. the constant 1 is arguably always the same 1 wherever it appears, because there is no mathematical need to have multiple instances of the constant 1: Wherever you see the symbol '1' OR an expression which evaluates to the constant 1, it refers to a *concept* of the numerical value representing mathematical singularity and wholeness. In python, you can have multiple instances of objects which are identical to each other (though for this simple case, even python only creates one instance of the object). > but which should also be clear since > mathematical identities need not have any individual variables on > either side of the triple bar; take, for instance, the > trigonometric identity > > cos^2 theta + sin^2 theta = 1. Is theta not a variable? :) Not that it matters... > Even if you write this equation with the triple bar to represent a > mathematical identity (which it is), it obviously doesn't say anything > about which "objects" are the same as each other. I don't imagine I would agree, based on what I just said. To elaborate, each side of the expression contain symbols which always evaluate to the same constant. The identity of a constant is constant. :) Thus the objects on both sides are indeed the same identical mathematical entity... they are just expressed differently. It's just like if you refered to your kitchen table (assuming you have only one kitchen table) as "the table" or as "the large table I eat on in the kitchen..." No matter what you call it, it's still the same table. In the case where the identity can not be reduced to constants, the two expressions still evaluate to the same mathematical entity... except that you need to set the conditions (i.e. give values to the variables) to find out what that actually is. It seems exactly analogous to Python to me, except that again, unlike Python, there is no possibility that there can ever be two instances of the same object and thus applying the term "identity" to mathematical objects is not useful. It's not that it is meaningless, it just isn't very interesting. Clearly though, 2 is not 3, and these two mathematical objects do not have the same identity. Perhaps there is no concept of identity in mathematics precisely because it is unnecessary: 1 is always 1, by definition. But that is the definition of "is"... :) But the discussion is bordering on philosophy, and I will resign from it at this point, having previously made the points I intended to. -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D
pgpAiEkpMH3gD.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list