Showing posts with label sage. Show all posts
Showing posts with label sage. Show all posts

Saturday, April 19, 2008

latex on blogger test

This is a test following http://wolverinex02.googlepages.com/emoticonsforblogger2.

The latex code

should display some latex code for pi/4. Cool! (Don't forget to use the compose window, not the "Edit Html" window.) Seems to only work for displayed equations.

Here is another test:


sage: x = var("x")
sage: integral(1/(1+x^2),x,0,1)
pi/4
sage: plot(1/(1+x^2),x,0,1)


The plot is below.



The (Hamming) weight enumerator polynomial $A_C$ is defined by


where


denotes the number of codewords of weight $i$.
The support of $C$ is the set

Sunday, March 23, 2008

Copyright law as it pertains to mathematics

This is a brief survey on copyright law, as it pertains to mathematicians. It does not cover other aspects of intellectual property law, such as laws governing patents, trade secrets, and so on (see for example, [K]). The basic reference is the excellent book by Leaffer [L].

I am not a lawyer and this is not meant as legal advice. However, I think everyone would benefit from more information and discussion of copyright law, so please leave comments if you have something to add.

U.S. copyright law applies to writings, or "physical renderings", produced by an author. For this article, we assume the author is a U. S. citizen and the work was produced on U. S. soil. However, a "writing" is not assumed to be human-readable, so, for example, a software program in executable binary form, or "object code", is included [L], section 3.06. The owner of the copyright of a work has the exclusive right for

* reproduce or copy the work,
* prepare derivative works,
* distribute the work,
* perform the work publically,
* display the work publically.

Before explaining these terms, exceptions to these rights, and how these rights relate especially to mathematical works, we discuss works for which copyright law cannot be applied. The law is designed to protect creative written works.



  1. Ideas which are only communicated oraly are generally not subject to copyright, as they have not been "physically rendered." If you tell a friend your unwritten idea of how to solve the Riemann hypothesis, who proceeds to write up the idea and publish it, feel flattered because copyright law won't help you.

  2. An unoriginal work, or a work "mechanically produced", say by a computer program whose use requires no originality, are not copyrightable (more precisely, are not subject to a separate copyright - the program could, for example, output copyrighted elements). For example, the output of an automatic theorem proving program is not copyrightable. On the other hand, the output of
    an image processing program which takes an image and applies a de-noising algorithm is a "mechanical" derivation of the original image, so the copyright is the same as that of the original.

  3. Data is not copyrightable. It doesn't matter how much money or man power it took to discover, collect, or obtain it. (However, there are various laws which can be used to protect such intellectual property, such as trade secret laws.) In some cases, a creative arrangement of the data itself is copyrightable, even if the data itself is not.

  4. Works in the public domain (in particular most "official" works by the U. S. government), are not copyrightable. All written works eventually pass into the public domain. Due to the variety of copyright laws which have been passed in the United States over the years, the duration of copyright depends on when the work was written, if it is a joint work (or a "work for hire") or not, and various other factors. However, life plus 50 years is a minimum, according to the Berne convention, so that will apply in most cases.


For the owner of a creative mathematical work, whether it is an article or a piece of software, we explain next what these rights mean.

Reproduction: A reproduction is to fix a copy in a tangible and relatively permanent form, such as a xerox copy or a file on a computer (though a copy stored in your cache is exempted). Aside from non-profit, educational, government, or "fair use", the copyright holder have the sole right to make unlimited copies of your work. For example, if you publish a paper or book, you often sign over your copyright to a publisher. If anyone could make a copy of your article freely, the commercial interest of the publisher would disappear. Similarly, if you wrote a mathematical software program which you wanted to market, you would want to restrict the copies of the program to those who paid for it. A research paper downloaded from the internet and then emailed to a colleague is an example of a reproduction.

However, there is a fair use exception to copyright law regarding copying for personal use if you are a scholar (at a non-profit institute) or the educational use of your students if you are a teacher (at a non-profit institute). These do not apply to commercial think-tanks or to commercial training centers. The guidelines are different for research than for educational use, but the basic idea is to copy no more than is necessary. The guidelines for education are more strict. Generally, 1000 words or 10\% of the material (the minimum of the two) are recommended limits [L], section 10.12.

Derivative works: Only the copyright holder can create a new work which is adapted from the original but which contains copyrightable modifications. For example, if you wrote a mathematical textbook and you retained its copyrights, then only you have the right to create a translation into another language or a second edition. Conversely, if you wrote a mathematical software program which you wanted to give away for free but subject to the open source General Public License (GPL), then you want to restrict the modifications or derivations of your program to those who publically redistribute the modified program under the same open source terms. This is what the carefully crafted legal language of the GPL does for you [F], [W]. (An example of such a project is the SAGE software program [S].)

Distribution: A work is distributed if it is made available to the "public" in some form. For example, a copy in a public library or a file posted on a world-accessible internet site are publically distributed. However, defining the term "public" precisely in this context is a technical legal matter, for which we refer to [L], section 8.13.

Performance and display rights generally refer to works of drama or art, and probably less useful to a mathematician. For these rights, we only mention that a talk on a scholarly paper could be a performance. Legally, such a performance does not constitute a "public distribution" or "reproduction" of the paper itself.

References:
[F] Free Software Foundation, http://www.fsf.org

[K] B. Klemens, Math you can't use,
Brooksings Institute Press, Washington DC, 2006.

[L] M. Leaffer, Understanding copyright law, 4th edition, LexisNexis, 2005.

[S] Sage mathematical software, http://www.sagemath.org

[W] M. Webblink, Understanding Open Source Software,
http://www.nswscl.org.au/journal/51/Mark_H_Webbink.html

Thursday, February 21, 2008

new SAGE email list: sage-edu

Group specifics:
* Group name: sage-edu
* Group home page: http://groups.google.com/group/sage-edu
* Group email address sage-edu@googlegroups.com
Please join if you are interested in SAGE and education in a high school
or a university.

Wednesday, January 30, 2008

SAGE and differential calculus

I've finished a book on SAGE and differential calculus. The idea was to simply take the old book Granville's Elements of Calculus, which is public domain now, and slightly modernize and "SAGE-ify" it. The source code, with the pdf form (and the pdf scan of the original book of Granville) can be found at
http://www.opensourcemath.org/books/granville-calculus/ or
http://sage.math.washington.edu/home/wdj/teaching/.
It is open-source and about 230+ pages printed. Hope it is useful for some people.
It is not quite in it's final form, so if you find typos, of have comments, please feel free to email me.

Wednesday, January 2, 2008

first aliquot factor found by SAGE ECM interface

Paul Zimmermann (http://www.loria.fr/~zimmerma/records/aliquot.html) reports:

The SAGE ECM interface found a first factor of the aliquot sequence starting
from 552:

remains 23648161798622140141259448258749760352819524456141488104537419990481892694930432002158957619604181055633215274583954462907657503167424176909 (140 digits)
found factor by ecm: 58417195751812372006463994075468288063413 with parameters {'poly': 'Dickson(6)', 'sigma': '300411371', 'B1': '3990569', 'B2': '8561602150'}
Other nice factors will surely follow.

An aliquot sequence is simply the iteration of the function n -> sigma(n)-n,
where sigma(n) is the "sum of divisors" function. One open question from
Catalan is whether this sequence always converges to 1 (or to a cycle). The
first to perform extensive computations on aliquot sequences was Lehmer, who
found that all sequences starting from n <= 1000 converge, except perhaps
n=276, 552, 564, 660 and 966. These are the "Lehmer five" sequences. Since
several years, together with other people, I try to extend these Lehmer five
sequences. The main difficulty is that to compute sigma(n), you have to
factor n. For the current large numbers we encounter (150-160 digits) we use
a combination of different algorithms (ECM, QS, NFS). I have now converted
to SAGE the script that (tries to) extend aliquot sequences. The above
factorization is a first success of the new script.

Monday, December 10, 2007

Science Dialy: Free Software Brings Affordability, Transparency To Mathematics

ScienceDaily (2007-12-07) -- Mathematicians are on a mission to replace the costly software used in education and research with a free, open-source version. More than 100 mathematicians around the world are helping to develop the tool.
article

ZDNet article: Sage - not a piece of cake

Sage - not a piece of cake, but powerful and open by ZDNet's Christopher Dawson -- Developed at the University of Washington, with contributions from mathematicians worldwide, Sage is a relatively new open-source tool designed to supplant proprietary mathematical analysis programs like Maple, Matlab, and Mathematica. All of these programs are mainstays of most mathematicians’ toolkits, but have recently come under scrutiny because of the black-box nature of their calculations [...]

Thursday, December 6, 2007

Free Open Source Mathematics Software?!

The free open source mathematics program Sage (http://sagemath.org) just won first prize in the scientific software division of Les Trophees du Libre, an international competition for free software. Sage, faced initial skepticism from the mathematics and education communities; soon they will face off against the major software companies.

read more | digg story

Thursday, August 2, 2007

Letter to the editor of the AMS Notices

This was written with William Stein:

Mathematical software has greatly contributed to mathematical
research, enabling exciting advances in mathematics and providing
extensive data for conjectures. Perhaps three of the most well-known
applications of computation to mathematical research are resolution of
the four-color conjecture by Appel and Haken in 1976 (though it is
now reproven without computers by N. Robertson, D. P. Sanders,
P. D. Seymour and R. Thomas), Thomas Hales's proof of the
Kepler's conjecture, and the formulation of the Birch and
Swinnerton-Dyer conjecture, which grew out of extensive numerical
computation.

Open source software has had a profound effect on computing during the
last decade. Careful funding of open source mathematical software
can lead to a lower total
cost of ownership in the research and education community, and to more
efficient and trustworthy mathematical software.

``I think we need a symbolic standard to make computer manipulations
easier to document and verify. And with all due respect to the
free market, perhaps we should not be dependent on commercial
software here. An open source project could, perhaps, find better
answers to the obvious problems such as availability, bugs, backward
compatibility, platform independence, standard libraries, etc.
One can learn from the success of \TeX\ and more specialized software
like Macaulay2. I do hope that funding agencies are looking into this.''

-- Andrei Okounkov, 2006 Fields Medalist
(see "Interviews with Three Fields Medalists,''
Notices of the AMS, March 2007, Volume 54 , Number 3 (2007)
405-410).

The term open source is defined in http://www.opensource.org/,
but basically it means anyone (including commercial companies or
the defense department) should be able to inspect open source software,
modify it, and share it with others.

A key difference between mathematical theorems and software, is that
theorems require little maintenance (other than perhaps submitting an
errata list to the publisher for typos), whereas {\em mathematical
software requires substantial and potentially expensive maintenance}
(bug fixes, changes in the underlying interpreter/compiler, updates
when the underlying algorithms are improved, and so on). Mathematical
research usually generates no direct revenue for researchers, and
likewise open source mathematical software does not directly generate
revenue. The financial support of the NSF (and other organizations)
is thus critical to the success of open source mathematical software.

Wednesday, May 23, 2007

Rantings on open source CAS's

The prevailing view of working mathematicians regarding mathematical software is very practical (first, determine the software which is available and has the desired functionality and then sort that set by ease-of-use). Convenience is king and issues such as proprietariness (if that is a word) is servant. This is natural from a human perspective - there are only so many hours in each day and we only have so much energy to invest in climbing the learning curve of a new system. From a mathematical, or more generally a scientific, perspective, this is not so natural. In this domain, convenience is slave to correctness and verifiability, which rule with an iron fist.


Consequently, it is not surprising that commercial systems built with proprietary code are more popular than free and open source systems. (By the way, MAGMA is technically not commercial - being "not for profit" - but for the purpose of this discussion we shall not distinguish MAGNA from Mathematica or Maple or Matlab, as they all follow a similar funding model.) The cost is based on what the market will bear and that gets leveraged into further development. As they improve, their customer base increases and solidifies.


On the other hand, the current status of many open source computer algebra systems, such as Maxima, is largely based on U.S. government funding (e.g., Dept. of Energy and NSF support) and corporations such as IBM (who developed Scratchpad to illustrate the value of its computers). These days, government finding has dried up and IBM has turned from Scratchpad to programs such as the chess-playing Deep Blue to help sell its latest line of computers.


How does the future look for open source computer algebra systems? Not good, if you think the following hypothetical scenario is reasonable. Programs such as MAGMA will become more and more popular with researchers, especially young ones at NSF-funded top-tier universities with heavy pressure to publish and a software budget to match. Systems such as Maxima will become less and less relavant. Development and maintanace will be supported by community-minded volunteers having full-time
jobs in industry or academia.


Is it healthy for scientific papers, mathematical ones in particular, to be supported by computations which cannot be verified, except by the relatively few employees of the commercial software system they use. Let's think about this for a moment.


By law, the US givernment cannot favor one commercial system over another. Is it ehical for them to favor commercial systems over non-commercial ones? It is right for the NSF or its agents to support proprietary commercial systems over open source systems? It seems to me that this is a sitation where the letter differs significantly from the spirit of the law. In spirit, competition is to be encouraged, with the idea that quality is thereby increased by competitive forces. Open source software fosters competition in the marketplace and at the same time provides a product for lower-income educational institutions. Both of these are in the spirit of the
law. However, the favoring of commercial products by the NSF is not in the spirit of the law. Indeed, in that case, the money simply goes not to the lowest bidder but the best (in the eyes of the NSF agent in charge of awarding the funds) of the commerical products. This is essentially the same as awarding a no-bid contract to the product the NSF thinks is best.


Consider the argument that the NSF shouldn't support open source systems since they (being free) undermine the capitalistic process and do not contribute to the marketplace. This is completely incorrect. Indeed, free software increases the value of the computer and operating system itself. (In fact, this is precisely why corporations such as IBM supported these free systems in the early days. They made the software free since to run it back then, you had to buy their computer.) So, as long as the free program is cross-platform, free software does contribute value to the marketplace as a whole, yet does not favor one company over another.


Finally, let us try to design a CAS based not on human behavior but on objective, logical principles. We want a CAS which is



  • open source (for verifiability and correctness),

  • easy to use and free (for greater availablity, thus fostering cooperation
    and collaboration, and greater practicality),

  • scientifically beneficial (obviously).


These are the three basic principles which are demanded by scientific requirements. Should not organizations such as the NSF and ACM support these open source systems rather than other systems?