replacement for const.tex

1 view
Skip to first unread message

David Joyner

unread,
Mar 14, 2008, 9:33:50 AM3/14/08
to sage-devel
Hello:

The "SAGE Constructions" is getting old. Rather than keep updating it,
my preference is to replace the const,tex by a "SAGE Cookbook",
garnered from several
sources. The reason why I'm emailing sage-devel (aside from the fact
that William
Stein recommended it) is because I'm hoping you all will be the
sources. I'd be
happy to edit it.

I'd like to ban, as much as possible, direct calls to Maxima, Pari,
GAP, etc (except
maybe to give an explicit example of pexpect, say) and ban the use of %skip.
I would also like allow graphics images. Does this seem reasonable? Is anyone
interested in contributing? Section topics could run the gamut:

1. Calculus
2. Plotting (2d and 3d)
3. Number theory
4. Modular forms,
5. Group theory,
6. Cryptography
7. various topics in applied math (statistics, special functions, ...)
8. Coding theory
9. p-adics
10. Linear algebra
11. others...

- David Joyner

John Cremona

unread,
Mar 14, 2008, 9:41:07 AM3/14/08
to sage-...@googlegroups.com
I think this is a good idea.

"Number Theory" is a bit too broad, and in any case includes Modular
Forms and p-adics. (I could say that N.T. includes everything else in
mathematics, but I don't suppose many would agree ;)).

A Section on Elementary Number Theory would be helpful (say for things
in most undergraduate courses). Arithmetic Geometry could inlcude
elliptic curves and some other things (hyperelliptics).

Statistics should be a separate section. (Most statisticians I know
would not like it being called a branch of applied!)

Combinatorics ng Graph Theory should be in there (seperate or together?)

John


--
John Cremona

David Joyner

unread,
Mar 14, 2008, 1:46:44 PM3/14/08
to sage-...@googlegroups.com
On Fri, Mar 14, 2008 at 9:41 AM, John Cremona <john.c...@gmail.com> wrote:
>
> I think this is a good idea.
>
> "Number Theory" is a bit too broad, and in any case includes Modular
> Forms and p-adics. (I could say that N.T. includes everything else in
> mathematics, but I don't suppose many would agree ;)).
>
> A Section on Elementary Number Theory would be helpful (say for things
> in most undergraduate courses). Arithmetic Geometry could inlcude
> elliptic curves and some other things (hyperelliptics).
>
> Statistics should be a separate section. (Most statisticians I know
> would not like it being called a branch of applied!)
>
> Combinatorics ng Graph Theory should be in there (separate or together?)

Good points. Here is another shot at a list of possible topics.

1. Calculus
2. Plotting (2d and 3d)

3. Elementary number theory
4. Algebraic number theory
5. Analytic number theory
6. Modular forms,
7. Group theory,
8. Algebraic combinatorics (symmetric functions, etc)
9. Enumerative combinatorics (block designs, etc)
10. Graph theory
11. Cryptography
12. Statistics
13. various topics in applied math (PDEs, special functions, ...)
14. Coding theory
15. p-adic numbers (constructions, applications to number theory, ...)
16. Linear algebra
17. Algebraic geometry (curves of genus > 1, affine varieties,
projective varieties)
18. Elliptic curves (and maybe hyperelliptics too?)
19. Using the SAGE notebook.

root

unread,
Mar 14, 2008, 5:36:53 PM3/14/08
to sage-...@googlegroups.com, sage-...@googlegroups.com
David, John, William,

>Good points. Here is another shot at a list of possible topics.

>1. Calculus
>2. Plotting (2d and 3d)
>3. Elementary number theory
>4. Algebraic number theory
>5. Analytic number theory
>6. Modular forms,
>7. Group theory,
>8. Algebraic combinatorics (symmetric functions, etc)
>9. Enumerative combinatorics (block designs, etc)
>10. Graph theory
>11. Cryptography
>12. Statistics
>13. various topics in applied math (PDEs, special functions, ...)
>14. Coding theory
>15. p-adic numbers (constructions, applications to number theory, ...)
>16. Linear algebra
>17. Algebraic geometry (curves of genus > 1, affine varieties,
>projective varieties)
>18. Elliptic curves (and maybe hyperelliptics too?)
>19. Using the SAGE notebook.

Let me generalize your question for the moment. Given that Sage
contains many different computer algebra systems it seems to me
that it is important to classify the abilities that are available.
It also seems important to say what the default resolution of the
ability is. Where does polynomial arithmetic live? Which system
provides factoring for Sage by default?

Another generalization is the question of "the correct result".
Different systems give different answers to the same input. How
can I know if the integral result returned by, say maxima, is
the same as the integral returned by, say maple? The real
question is, when are the systems "plug-replacable" for a
given domain (e.g, linear algebra)? My feeling is that we need
a series of problems, with mathematically argued results, that
can be computed as examples and test cases for each underlying
system.

There is a real opportunity here to build a taxonomy of computational
mathematics and have it accepted as "the standard" by fiat. I can
see a breakdown of the area not only by subject but also by algorithm.
For instance,

Algebra
Factoring
Pollard-rho
Brent
Trager
Elliptic Curve

etc. This taxonomy could have a global effect on all areas, such
as the classification of algorithms presented at ISSAC.

Ideally, I'd like the classification to be categorical rather than
"topical" but that's my Axiom bias showing through.

I realize that I'm suggesting a generalization that is not Sage
specific but I think it could greatly benefit both Sage and the
rest of the community in the long run.

If you're interested in working on a classification that is more
general and applies to the underlying systems I'd be willing to
help.

Tim Daly
Axiom


William Stein

unread,
Mar 14, 2008, 4:36:37 PM3/14/08
to sage-...@googlegroups.com
On Fri, Mar 14, 2008 at 6:33 AM, David Joyner <wdjo...@gmail.com> wrote:
>
> Hello:
>
> The "SAGE Constructions" is getting old. Rather than keep updating it,
> my preference is to replace the const,tex by a "SAGE Cookbook",
> garnered from several sources.

Don't make it _too_ different. Your Constructions things are really useful.
E.g., yesterday I was trying to figure out how to use Gap to do various
computations. I searched the GAP reference manual, etc., but didn't find
anything very helpful -- a Google search found your "Gap Constructions"
guide, and that was extremely helpful.

So I hope the "Sage Cookbook" has a somewhat similar spirit, i.e., lots
of well-tested examples of _doing_ interesting things.

> The reason why I'm emailing sage-devel (aside from the fact
> that William
> Stein recommended it) is because I'm hoping you all will be the
> sources. I'd be
> happy to edit it.

Excellent. Josh Kantor has some excellent contributions in numerical
computation.
I found an old Magma tutorial for modular forms I wrote a few years
ago -- I could convert
it to Sage and that would go well there.

> I'd like to ban, as much as possible, direct calls to Maxima, Pari,
> GAP, etc (except
> maybe to give an explicit example of pexpect, say)

I think that's reasonable now-a-days. When you wrote "Sage Constructions"
it wasn't, since Sage could do so little at the time.

> and ban the use of %skip.

Definitely.

> I would also like allow graphics images.

Yes. Just make png images and include them in the latex file, hopefully.

> Does this seem reasonable?

Yes, very.

> Is anyone
> interested in contributing? Section topics could run the gamut:

I'm interested in contributing. Could you get the thing going by
simply restructuring const.tex? Then people can contribute easily
by just sending you a patch against hg_doc.

> 1. Calculus
> 2. Plotting (2d and 3d)
> 3. Number theory
> 4. Modular forms,
> 5. Group theory,
> 6. Cryptography
> 7. various topics in applied math (statistics, special functions, ...)
> 8. Coding theory
> 9. p-adics
> 10. Linear algebra
> 11. others...
>
> - David Joyner
>
> >
>

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Jason Grout

unread,
Mar 14, 2008, 5:12:26 PM3/14/08
to sage-...@googlegroups.com


If it's a tex file, using the (now on CTAN) sagetex package might be the
way to go. Images become \sageplot{} commands and everything is done
automatically for you. Sage commands become \sageblock{} environments, etc.

And then there could be a chapter about using Sage in tex, and we could
say that the document that they are currently reading was an example and
they could look at the source code (because it's all open-source and
available). What a way to reinforce the open-source point!

Jason

William Stein

unread,
Mar 14, 2008, 5:31:13 PM3/14/08
to sage-...@googlegroups.com

There is a potentially very serious downside to doing that, because
a huge point of const.tex is that it provides tested examples with
correct output.
If we switch to using sagetex, then the output is whatever Sage happens to
output when texing the file. Thus the only test of the examples is
that the run;
we're not testing anything about the output being correct --only that it is what
the latest version of Sage output.

Maybe I'm missing the point though. Please elaborate.

-- William

Jason Grout

unread,
Mar 14, 2008, 5:44:15 PM3/14/08
to sage-...@googlegroups.com

Good point. I think I was the one that was missing the point. Thanks
for the clarification.

Sagetex could still be used to do non-doctested things (e.g., written
formulas in the expository text or plots), but you still have the
problem of bypassing the manual doctesters (i.e., the readers).

Jason

Jaap Spies

unread,
Mar 15, 2008, 4:24:10 PM3/15/08
to sage-...@googlegroups.com
Hi David.

I would love to contribute (within my possibilities).

Do you have a template or a *.sty suggestion?

Or should we send just plain (la)tex?


Jaap

Franco Saliola

unread,
Mar 16, 2008, 2:56:33 AM3/16/08
to sage-...@googlegroups.com

But the Sage output of texing the file should agree with the correct
output. So using sagetex adds more doctests (by comparing the
"current" Sage output with the correct output) and ensures that all
cookbook examples work in Sage. It will also help keep the cookbook
examples up to date in case some functionality changes.

Franco

--

William Stein

unread,
Mar 16, 2008, 3:40:08 AM3/16/08
to sage-...@googlegroups.com

Ummm, that's the problem. If the functionality changes from
correct to buggy, it keeps it "up to date" by changing the
examples from right to wrong. Not good.

-- William

Dan Drake

unread,
Mar 16, 2008, 7:12:38 AM3/16/08
to sage-...@googlegroups.com
On Fri, 14 Mar 2008 at 02:31PM -0700, William Stein wrote:
> There is a potentially very serious downside to doing that, because a
> huge point of const.tex is that it provides tested examples with
> correct output. If we switch to using sagetex, then the output is
> whatever Sage happens to output when texing the file. Thus the only
> test of the examples is that the run; we're not testing anything about
> the output being correct --only that it is what the latest version of
> Sage output.
>
> Maybe I'm missing the point though. Please elaborate.

No, you've got it exactly right. SageTeX and doctesting go in opposite
directions. When you type \sage{stuff} into your document, you're saying
that you don't want to think about exactly what the answer is, you just
want it put into your document. Doctesting is the opposite: the entire
*idea* is to think about what the answer is, and compare it to what Sage
says.

Dan

--
--- Dan Drake <dr...@mathsci.kaist.ac.kr>
----- KAIST Department of Mathematical Sciences
------- http://math.kaist.ac.kr/~drake

signature.asc

Franco Saliola

unread,
Mar 16, 2008, 10:35:09 AM3/16/08
to sage-...@googlegroups.com
On Sun, Mar 16, 2008 at 3:40 AM, William Stein <wst...@gmail.com> wrote:

> Ummm, that's the problem. If the functionality changes from
> correct to buggy, it keeps it "up to date" by changing the
> examples from right to wrong. Not good.

I am suggesting that Sage+SageTex be used to verify that the examples
in the cookbook give correct answers with every new release of Sage.
Here is how I figure it would work:

1) Before any examples are included in the cookbook, the Sage output
is verified. So one has to think about the solution.

2) At that point we will know that Sage is working correctly for these
examples, and we will have a file containing all the correct, expected
output from Sage+SageTex.

3) In future releases of Sage, the output of Sage+SageTex can be
compared with that of the original output file---for example, by using
diff.

So if functionality changes from correct to buggy, then it will be
detecting in Step 3.


Franco

--

David Joyner

unread,
Mar 16, 2008, 11:16:50 AM3/16/08
to Martin Albrecht, Jaap Spies, sage-devel
On Sun, Mar 16, 2008 at 10:48 AM, Martin Albrecht
<ma...@informatik.uni-bremen.de> wrote:
> Hi David,
>
> I would like to contribute but I am not sure about the desired format. I am
> not talking about LaTeX style but how such a cookbook receipt would look
> like. Also, where would commutative algebra & polynomial arithmetic live?

That should be a separate entry - I forgot to add that topic to the
earlier list.
Technically, the "cookbook" will be a latex manual (\documentclass{manual}) and
each entry will be a "chapter". For now, if you can please take the
current const.tex
and
(1) simply replace one of the chapters there by your chapter
(2) if it compiles okay (or without too many serious errors), just
send that to me
and I'll compile them into a single file.


>
> Cheers,
> Martin
>
>
> --
> name: Martin Albrecht
> _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _www: http://www.informatik.uni-bremen.de/~malb
> _jab: martinr...@jabber.ccc.de
>
>

Reply all
Reply to author
Forward
0 new messages