MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: (2/3)[[1]]

  • To: mathgroup at
  • Subject: [mg96474] Re: [mg96407] Re: (2/3)[[1]]
  • From: Murray Eisenberg <murray at>
  • Date: Sat, 14 Feb 2009 03:10:32 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <gn11e8$7vn$> <>
  • Reply-to: murray at

Although one cannot argue with the definitive answer that the 
Mathematica interpreter gives to such questions, I've never been 
satisfied with the rationale offered for this situation.

After all, it's not just the way that Rational[2,3] prints (as an actual 
fraction) that confuses.  Rather, it's the very internal form


that confuses.  Indeed:

   FullForm[ Rational[2,3] ]

This looks like an expression of the form f[x,y].  And one has:

   part[f[x,y], 1]

Further, in the documentation page for Part, there is no explicit 
statement that something for which AtomQ returns True does not have 
parts.  Still Further, the documentation for AtomQ says that AtomQ[expr] 
yields True if expr is an expression which cannot be divided into 
subexpressions; it's only under the More Information for AtomQ that one 
finds, "AtomQ gives True for symbols, numbers...."

The situation begs for clarification!

David Bailey wrote:
> obott0 at wrote:
>> I'm not sure if this has been asked before, but why can't Part be used
>> with Rational?
>> i.e. (2/3)[[1]]
>> Thanks.
> Internally, Mathematica considers rational numbers to be atomic objects 
> - they only print in a way that makes them look otherwise. You will find 
> that Complex[2,3] behaves in the same way for the same reason.
> David Bailey

Murray Eisenberg                     murray at
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

  • References:
  • Prev by Date: Re: Problem with DSolve
  • Next by Date: Re: Logarithmic Plot
  • Previous by thread: Re: (2/3)[[1]]
  • Next by thread: Re: (2/3)[[1]]