MathGroup Archive 2008

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

Search the Archive

FW: Re: Expressions with ellipsis (...)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93313] FW: [mg93285] Re: Expressions with ellipsis (...)
  • From: "David Park" <djmpark at comcast.net>
  • Date: Mon, 3 Nov 2008 05:29:10 -0500 (EST)

I don't understand your question, or even where you have used an ellipsis,
i.e., a '...' to indicate non-displayed terms in a sum, or items in any kind
of sequence. (The Presentations package actually uses the centered ellipsis,
and allows any symbol to be used for the ellipsis.)

Ellipsis expressions are very common in textbooks and mathematical books and
papers in general. It is very convenient to be able to reproduce these types
of expressions when writing notebooks and then convert them to regular
Mathematica expressions for evaluation. That is what the facilities in the
Presentations package provide.

Here is an example using the standard geometric series. Instead of using
Sum, which would do or attempt immediate evaluation we use iSum, which will
produce a tagged (default tag is tag1) ellipsis expression.

Needs["Presentations`Master`"]

geometricSeries = iSum[a r^(n - 1), {n, 1, 2, Null, i, Null}]

a + a r + ... + a r^(-1+i) + ...

The main difference here is the iterator that contains explicit values of n
to display and uses Null to indicate an ellipsis. So this is basically a
formatting device. But we can convert the expression to a normal Mathematica
Sum by using iSumNormalize, supplying a tag to identify the specific
expression that is being converted and supplying a normal Mathematica
iterator.

geometricSeries // iSumNormalize[tag1, {n, 1, \[Infinity]}];
MapAt[Minus, %, {{1}, {3, 1}}]
a/(1-r)

This can also be used with Product, Table, Sequence and general Infix
expressions. The idea is to be able to use standard mathematical expressions
in derivations and exposition but then be able to smoothly sequel to regular
Mathematica expressions for evaluation. 


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark



From: AES [mailto:siegman at stanford.edu]

In article <geh9sa$fbs$1 at smc.vnet.net>, dch888 <dch888 at googlemail.com>
wrote:

> > Another answer is that Mathematica *should* understand the syntax
> > with ellipsis-- and indeed it can with the facilities of David Park's
> > Presentations application package.

One has to be careful about the use and interpretation of ellipses.

For example the Mathematica documentation for Compound Expression says
that

      expr_1 ;  expr_2 ;  =A9
         evaluates the expr_i in turn, giving the last one as the result.

Would this statement, interpreted very literally using a precise
definition of the ellipsis symbol, cover both

      expr_1 ;  expr_2  ;  expr_3  ;  expr_4  ;

and

      expr_1 ;  expr_2  ;  expr_3  ;  expr_4

or just one of these?  (Which one?)

_Is there_ a precise definition of the ellipsis symbol? (in English, or
in Mathematica)

Is " ;  " technically an expression? (in Mathematica)




  • Prev by Date: Re: Stopping a program
  • Next by Date: Re: Trinomial decics x^10+ax+b = 0; Help with Mathematica code
  • Previous by thread: Re: Expressions with ellipsis (...)
  • Next by thread: Re: Expressions with ellipsis (...)