Differences between revisions 1 and 2
Revision 1 as of 2009-11-04 23:00:53
Size: 3692
Comment:
Revision 2 as of 2009-11-05 14:53:32
Size: 2474
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
   * the oriented object syntax must be avoided: a student who see for the first time functions and derivation won't be able to understand f.derive(). The interface must be intuitive from the mathematic *standard* syntax point of vue;
   * the algebra under polynoms must be hided. QQbar, Number fields must stay in backend;
   * the oriented object syntax should sometimes be avoided: the interface must be intuitive from the mathematic *standard* syntax point of vue; on the other side we must keep all python features of list, tuple, dict as they are (ask teachers).
   * the algebra under polynoms must be hided a little bit. QQbar, Number fields and symbolic rings must stay in backend;
Line 11: Line 11:
   * write some help files    * write some help files and a really basic tutorial mixing Sage and python.
Line 13: Line 13:
== Patches ==
Line 14: Line 15:
== program of secondary school in France == Following the development model of Sage, we will use mercurial patches here.

   * [[http://iml.univ-mrs.fr/~delecroi/lycee-vd.patch|Sage patch]]
   * a patch for the documentation will come soon

== Program of high school in France ==
Line 26: Line 32:
== Lycee interface == == Object or not ==
Line 28: Line 34:
The sage lycee interface will be based on sage-4.2 (latest version on the 31rd of October). There is a running notebook server at : https://139.124.6.88:8001 and the corresponding applied patch is at: http://iml.univ-mrs.fr/~delecroi/lycee-vd.patch The python list usage must be kept as it is. But we have the choice to use or not (explicitely) some methods.
Line 30: Line 36:
For a quick overview:
   * demo file for polynoms at https://139.124.6.88:8001/home/pub/0 (in french) or at https://139.124.6.88:8001/home/pub/2/ (in english)
Starting from a list:
{{{
python: l = [1,2,3]
}}}
Line 33: Line 41:
What will be available at initialization : We can use the standard append:
{{{
python: l.append(4)
}}}
or the += concatenation:
{{{
python: l += [4]
}}}
Line 35: Line 50:
Variables and numbers
   * t,x,y,z : are variables (in fact element of polynomial ring over QQ)
   * var : use it to create new variables. var('t1,t2,t3') will create three variables in the global namespace.
   * i, I : the well known complex number
   * e, pi : well known real numbers

Rings and fields:
   * ZZ, QQ, RR, CC : the integers, rationals, reals and complex (there are also more complicated Zmod, Zp, Qp, RDF, CDF, ...)
   * real_part, imag_part : real and imaginary part of a complex

Functions:
   * cos, sin, tan, arcos, ... : trigo
   * cosh, sinh, arctanh, ... : hyperbolic trigo
   * sqrt : the square root function
   * log, exp : logarithm in any base and exponential

Dealing with polynoms:
   * roots : compute the roots of a polynom (just a messy "def roots(p): return p.roots")
   * derivative, integerate : compute the derivative and primitive
   * factor : performs a factorization

Geometry:
   * plot : plot functions or anyobject
   * point, points, point2d : plot points
   * line2d : lines
   * text : some text (could have some latex expression between two '$')
   * show : show a graphic object

Arithmetic:
   * is_prime, gcd, lcm : standard arithmetic functions
   * factor
   * % : the modulo operator (rest of the euclidean division)
   * Zmod(n) : the ring of integers modulo n

What goes wrong in the SAGE notebook interface for secondary school usage

Some of (nice) sage features are not well adapted at an elementary level. In particular:

  • the oriented object syntax should sometimes be avoided: the interface must be intuitive from the mathematic *standard* syntax point of vue; on the other side we must keep all python features of list, tuple, dict as they are (ask teachers).
  • the algebra under polynoms must be hided a little bit. QQbar, Number fields and symbolic rings must stay in backend;
  • the namespace is huge (a general problem of SAGE)
  • the help on elementary functions is not well adapted

Supplementary:

  • do a french translation of commmands (?)
  • write some help files and a really basic tutorial mixing Sage and python.

Patches

Following the development model of Sage, we will use mercurial patches here.

  • Sage patch

  • a patch for the documentation will come soon

Program of high school in France

In bracket are the corresponding levels.

  • second degree polynom [1e S]
  • sequences in particular recursive ones [1e S]
  • sequences and approximations : pi, e, sqrt(2), ... [1e S]
  • continuity and derivation [Tale S]
  • functions study and graphics [Ta1e S]
  • integration[Tale S]
  • elementary graph theory [Tale ES]

Object or not

The python list usage must be kept as it is. But we have the choice to use or not (explicitely) some methods.

Starting from a list:

python: l = [1,2,3]

We can use the standard append:

python: l.append(4)

or the += concatenation:

python: l += [4]

TODO

There is still a lot of problems:

  • clearing the namespace causes some crashes (there are some general memory initialization). I make research to do it properly. For now, I use a "do it, if it works it's good" method.
  • sqrt(n) (log(n), exp(n), ...) returns a symbolic expression which does not evaluate correctly as boolean expression.
  • help topics in the rest documentation
  • latex rendering in plot is not easy to have : sage: text("$" + latex(my_object) + "$", (0,0)). Is there a better way ?

  • latex "bug" for rational fractions : http://groups.google.com/group/sage-devel/browse_thread/thread/9d58693356e11947 and the corresponding (minor) trac ticket http://trac.sagemath.org/sage_trac/ticket/7363