# More than you ever wanted to know about objects [was: Is everything a refrence or isn't it]

Tim Peters tim.peters at gmail.com
Mon Jan 16 02:49:10 CET 2006

```[Alex Martelli]
...
>> In mathematics, 1 is not "the same" as 1.0 -- there exists a natural
>> morphism of integers into reals that _maps_ 1 to 1.0, but they're still
>> NOT "the same" thing.  And similarly for the real-vs-complex case.

[Xavier Morel]
> I disagree here, 1 and 1.0 are the same mathematical object e.g. 1 (and
> the same as "1+0i"), the difference due to notation only makes sense in
> computer science where integers, real and complex ensembles are disjoin.
> In mathematics, Z is included in IR which is included in C (note: this
> is not mathspeak, but I have no idea how to say it in english), and this
> notation -- at best -- merely determines the ensemble you're currently
> considering.
>
> There is no "natural morphism" of integers into reals because there is
> no mathematical difference between integers and reals, the real ensemble
> is merely a superset of the integers one.
>
> Or so it was last time i got a math course.

This all depends on which math course you last took ;-)  You have more
a physicist's view here.  The simplest case is real versus complex,
where even a physicist <wink> can accept that a complex number,
formally, is an ordered pair of real numbers.  From that view, it's
almost obviously not possible that a complex number could be "the same
object" as a real number.  For example, 1+0i is formally the ordered
pair <1.0, 0.0>, but the real 1.0 is just the real 1.0.  If you'll
grant that a real number is never itself an ordered pair of real
numbers, then the intersection between the complex and real numbers is
necessarily empty.

At lower levels of the "numeric tower" you have in mind, the formal
difference is more extreme, not less.  The natural numbers
("non-negative integers") are often defined in terms of von Neumann
ordinals, so that natural number N "is" the set of all natural numbers
less than N (0 "is" the empty set, 1 "is" the set containing the empty
set, 2 "is" the set containing the empty set and the set containing
the empty set, ...), while defining reals as either Dedekind cuts or
Cauchy sequences requires elaborate formal machinery.

Does it matter?  To foundational mathematicians, certainly.  Luckily,
in a computer all numerics suck, so who cares ;-).

```