comp.lang.ada
 help / color / mirror / Atom feed
From: daven@lll-crg.llnl.gov (Dave Nelson)
Subject: Re: Type NATURAL isn't
Date: 24 Jun 88 17:50:55 GMT	[thread overview]
Message-ID: <9072@lll-winken.llnl.gov> (raw)
In-Reply-To: 8806231808.AA15365@spp3.SPP

In article <8806231808.AA15365@spp3.SPP> simpson@spp3.UUCP (Scott Simpson) writes:
>Can anybody explain why the LRM declares NATURAL as
>    
>    subtype NATURAL is INTEGER range 0..INTEGER'LAST;
>
>Natural numbers start at 1!  Any mathematician would assume it
>to be the same declaration as POSITIVE.  A better solution would
>be
>    subtype WHOLE is INTEGER range 0..INTEGER'LAST;
>
>You might argue that I could make the declarations
>
>    subtype WHOLE is NATURAL;
>    subtype NATURAL is STANDARD.NATURAL range 1..INTEGER'LAST;
>
>but then any Ada programmer who reads my code will get thoroughly
>confused.  I talked to my boss, Frank Belz, and he said that when Ada
>was being developed, a number of people complained that they thought
>of natural numbers as starting at zero so they made the language that
>way.  This is clearly incorrect.
>	Scott Simpson
>	TRW Space and Defense Sector
>	...{decvax,ihnp4,ucbvax}!trwrb!simpson  (UUCP)
>	trwrb!simpson@trwind.trw.com		(Internet)
>
One mustn't be so dogmatic about such things!  Speaking for any and all
mathematicians ;-), definitions differ.  For instance, in
van der Waerden's "Algebra", 7th edition, New York: Ungar, 1970, p 3, we see

"We presume that the reader is familiar with the set of natural numbers
(positive integers),

	1, 2, 3, ...,

as well as [the usual stuff about Peano's postulates] ... ."

However, in Lang's "Real Analysis", Reading: Addison-Wesley, 1969, p 4, we see

"We denote by Z+ the set of positive integers (integers > 0), ...
We denote by N the set of natural numbers (integers >= 0)."

Just to show that it's not a battle between the analysts and algebraists,
we see that Halmos, in "Naive Set Theory", New York: Van Nostrand, 1960,
p 44, states:

"A natural number is, by definition, an element of the minimal successor set
omega.  This definition is the rigorous counterpart of the intuitive
description according to which they consist of 0, 1, 2, 3, 'and so on.' "

It doesn't really matter, as long as you define your terms.  And that's just
what the Ada people did.

Dave Nelson

(defrocked mathematician, who has finally found a use for those
old math texts stored in a musty bookcase in his office).

daven (Dave Nelson)
arpa:  daven @ lll-crg.llnl.gov
uucp:  ...{seismo,gymble,mordor,sun,lll-lcc}!lll-crg!daven

  parent reply	other threads:[~1988-06-24 17:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1988-06-23 18:08 Type NATURAL isn't Scott Simpson
1988-06-24 14:45 ` Dennis Doubleday
1988-06-27 15:49   ` Larry Woods
1988-06-28 20:05     ` Walter E. Pohl
1988-06-24 17:50 ` Dave Nelson [this message]
1988-06-28 17:15   ` stt
1988-06-25  0:06 ` Steven Ryan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox