(lp1 S"Worksheet 'Emory Talk' (2009-02-27 at 01:01)\n{{{id=167|\na[0,0]\n///\n\n-166292944138230638086442095166624790146\n}}}" p2 aS"Worksheet 'Emory Talk' (2009-02-27 at 01:01)\n{{{id=27|\nmaple.with_package('LinearAlgebra')\nB = maple(a)\nt = maple.cputime()\ntime c = B.Determinant()\nmaple.cputime(t)\n///\n\nTime: CPU 0.00 s, Wall: 24.99 s\n22.300999999999998\n}}}" p3 aS"Worksheet 'Emory Talk' (2009-02-27 at 01:01)\n{{{id=168|\nc == d\n///\n\nTrue\n}}}" p4 aS"Worksheet 'Emory Talk' (2009-02-27 at 01:02)\n{{{id=82|\nB = magma(a)\nt = magma.cputime()\ntime e = B.Determinant()\nmagma.cputime(t)\n///\n\nTime: CPU 0.00 s, Wall: 10.85 s\n10.6\n}}}" p5 aS"Worksheet 'Emory Talk' (2009-02-27 at 02:01)\n{{{id=172|\nf(x,y,z) = sin(3*x)*x + log(x) + 1/(1+x)^2\n///\n}}}" p6 aS"Worksheet 'Emory Talk' (2009-02-27 at 02:01)\n{{{id=74|\ng = f._fast_float_(x,y,z)\ntimeit('g(4.5r,3.2r,5.7r)')\n///\n\n625 loops, best of 3: 574 ns per loop\n}}}" p7 aS"Worksheet 'Emory Talk' (2009-02-27 at 02:01)\n{{{id=75|\n%python \nimport math\ndef g(x): return math.sin(3*x)*x + log(x) + 1/(1+x)**2\n///\n}}}" p8 aS"Worksheet 'Emory Talk' (2009-02-27 at 02:01)\n{{{id=77|\ntimeit('g(4.5r)')\n///\n\n625 loops, best of 3: 6.93 \xc2\xb5s per loop\n}}}" p9 aS'Worksheet \'BSD\' (2009-02-27 at 02:05)\n{{{id=8|\nP = C.gens()[0]\nprint P\nprint P.order()\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090227-emory/nb/worksheets/admin/3/code/348.py", line 7, in \n P = C.gens()[_sage_const_0 ]\nIndexError: list index out of range\n}}}' p10 aS"Worksheet 'BSD' (2009-02-27 at 02:05)\n{{{id=5|\nn = 5; x,y = var('x,y')\nC = EllipticCurve(y^2 == x^3 - n^2 * x); C\n///\n\nElliptic Curve defined by y^2 = x^3 - 25*x over Rational Field\n}}}" p11 aS"Worksheet 'BSD' (2009-02-27 at 02:05)\n{{{id=8|\nP = C.gens()[0]\nprint P\nprint P.order()\n///\n\n(-4 : 6 : 1)\n+Infinity\n}}}" p12 aS'Worksheet \'BSD\' (2009-02-27 at 02:05)\n{{{id=8|\nP = C.gens()[0]\nprint P\nprint "order of P = ", P.order()\n///\n\n(-4 : 6 : 1)\norder of P = +Infinity\n}}}' p13 aS"Worksheet 'Emory Talk' (2009-02-27 at 15:59)\n{{{id=160|\n2 + 3\n///\n\n5\n}}}" p14 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:32)\n{{{id=23|\nx, y = var('x,y')\ntype(x)}\n///\nSyntax Error:\n type(x)}\n}}}" p15 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:32)\n{{{id=23|\nx, y = var('x,y')\ntype(x)\n///\n\n\n}}}" p16 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:33)\n{{{id=19|\na = 1 + sqrt(2) + pi + 2/3 + x^y\n///\n}}}" p17 aS'Worksheet \'Emory Talk\' (2009-02-27 at 16:33)\n{{{id=163|\nshow(a)\n///\n\n
{x}^{y} + \\pi + \\sqrt{ 2 } + \\frac{5}{3}
\n}}}' p18 aS'Worksheet \'Emory Talk\' (2009-02-27 at 16:33)\n{{{id=20|\nshow(expand(a^2))\n///\n\n
{x}^{{2 y}} + {{2 \\pi} {x}^{y} } + {{2 \\sqrt{ 2 }} {x}^{y} } + \\frac{{10 {x}^{y} }}{3} + {\\pi}^{2} + {{2 \\sqrt{ 2 }} \\pi} + \\frac{{10 \\pi}}{3} + \\frac{{10 \\sqrt{ 2 }}}{3} + \\frac{43}{9}
\n}}}' p19 aS'Worksheet \'Emory Talk\' (2009-02-27 at 16:33)\n{{{id=19|\na = 1 + sqrt(7)^2 + pi^e + 2/3 + x^y\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090227-emory/nb/worksheets/admin/1/code/25.py", line 7, in \n exec compile(ur\'a = _sage_const_1 + sqrt(_sage_const_7 )**_sage_const_2 + pi**e + _sage_const_2 /_sage_const_3 + x**y\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.3/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in \n \n File "/U...\n}}}' p20 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:33)\n{{{id=197|\nreset('e')\n///\n}}}" p21 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:33)\n{{{id=19|\na = 1 + sqrt(7)^2 + pi^e + 2/3 + x^y\n///\n}}}" p22 aS'Worksheet \'Emory Talk\' (2009-02-27 at 16:33)\n{{{id=163|\nshow(a)\n///\n\n
{x}^{y} + {\\pi}^{e} + \\frac{26}{3}
\n}}}' p23 aS'Worksheet \'Emory Talk\' (2009-02-27 at 16:34)\n{{{id=20|\nshow(expand(a^2))\n///\n\n
{x}^{{2 y}} + {{2 {\\pi}^{e} } {x}^{y} } + \\frac{{52 {x}^{y} }}{3} + {\\pi}^{{2 e}} + \\frac{{52 {\\pi}^{e} }}{3} + \\frac{676}{9}
\n}}}' p24 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:38)\n{{{id=164|\nA = random_matrix(QQ, 500); v = random_matrix(QQ,500,1)\ntime x = A \\ v\n///\n\nTime: CPU 1.56 s, Wall: 1.54 s\n}}}" p25 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:38)\n{{{id=200|\nQQ\n///\n\nRational Field\n}}}" p26 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:38)\n{{{id=201|\nRDF\n///\n\nReal Double Field\n}}}" p27 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:38)\n{{{id=202|\nR = RIF(100); R\n///\n\n100\n}}}" p28 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:39)\n{{{id=202|\nR = RealInterval(100); R\n///\n\n100\n}}}" p29 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:39)\n{{{id=202|\nR = RealIntervalField(100); R\n///\n\n100\n}}}" p30 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:39)\n{{{id=202|\nR = RealIntervalField(100); R\n///\n\nReal Interval Field with 100 bits of precision\n}}}" p31 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:39)\n{{{id=203|\nR((1,1.1))\n///\n\n1.1?\n}}}" p32 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:39)\n{{{id=203|\nR((1,1.010332))\n///\n\n1.01?\n}}}" p33 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:39)\n{{{id=203|\nR((1.01030,1.010332))\n///\n\n1.0103?\n}}}" p34 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:41)\n{{{id=204|\na = 290823098423/2349023094823084\n///\n}}}" p35 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:41)\n{{{id=205|\na\n///\n\n290823098423/2349023094823084\n}}}" p36 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:41)\n{{{id=206|\na^20\n///\n\n18731732272438885579309471548372824428588245150340221923545430485496458533735980578867523409620449920918256575231891509136504267736928258649691464628040600331999325542157848840014655340456935577675516272236483489312137742807911201/26166505842766494283561401292089146973182567348625157751659094334594689380717152836075367631811803015423294643035334638273762419270762402702701922882086138228898233623197512253298025231805031827112521943486787630994426538549...\n}}}" p37 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:41)\n{{{id=207|\nQQ[sqrt(2)]\n///\n\nNumber Field in sqrt2 with defining polynomial x^2 - 2\n}}}" p38 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:42)\n{{{id=31|\na = random_matrix(ZZ,200,x=-2^127,y=2^127)\ntime d = a.determinant()\nlen(str(d))\n///\n\nTime: CPU 3.78 s, Wall: 3.85 s\n7786\n}}}" p39 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:42)\n{{{id=167|\na[0,0]\n///\n\n-91532941219663566551217034654788002094\n}}}" p40 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:43)\n{{{id=27|\nmaple.with_package('LinearAlgebra')\nB = maple(a)\nt = maple.cputime()\ntime c = B.Determinant()\nmaple.cputime(t)\n///\n\nTime: CPU 0.00 s, Wall: 23.18 s\n22.613\n}}}" p41 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:45)\n{{{id=168|\nc == d\n///\n\nTrue\n}}}" p42 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:46)\n{{{id=112|\n\n///\n}}}" p43 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:48)\n{{{id=82|\nB = magma(a)\nt = magma.cputime()\ntime e = B.Determinant()\nmagma.cputime(t)\n///\n\nTime: CPU 0.00 s, Wall: 10.74 s\n10.51\n}}}" p44 aS"Worksheet 'Emory Talk' (2009-02-27 at 16:48)\n{{{id=208|\ne == c\n///\n\nTrue\n}}}" p45 aS'Worksheet \'Emory Talk\' (2009-02-27 at 16:51)\n{{{id=44|\nimport pylab\nA_image = pylab.mean(pylab.imread(DATA + \'emoryimage.png\'), 2)\n@interact\ndef svd_image(i=(20,(1..100)), display_axes=True):\n u,s,v = pylab.linalg.svd(A_image)\n A = sum(s[j]*pylab.outer(u[0:,j], v[j,0:]) for j in range(i))\n g = graphics_array([matrix_plot(A),matrix_plot(A_image)])\n show(g, axes=display_axes, figsize=(8,3))\n html(\'

Compressed using %s eigenvalues

\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
= QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =  "Use the source, Luke..."\n}}}' p90 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:02)\n{{{id=180|\n@parallel\ndef f(n):\n return factor(n)\n///\n}}}" p91 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:02)\n{{{id=180|\n@parallel(4)\ndef f(n):\n return factor(n)\n///\n}}}" p92 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:02)\n{{{id=59|\nfor x in f([100..110]): print x\n///\n\n(((103,), {}), 103)\n(((104,), {}), 2^3 * 13)\n(((105,), {}), 3 * 5 * 7)\n(((106,), {}), 2 * 53)\n(((107,), {}), 107)\n(((102,), {}), 2 * 3 * 17)\n(((108,), {}), 2^2 * 3^3)\n(((100,), {}), 2^2 * 5^2)\n(((109,), {}), 109)\n(((101,), {}), 101)\n(((110,), {}), 2 * 5 * 11)\n}}}" p93 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:03)\n{{{id=209|\nf(2^123-1)\n///\n\n7 * 13367 * 3887047 * 164511353 * 177722253954175633\n}}}" p94 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:03)\n{{{id=209|\nf(2^129-1)\n///\n\n7 * 431 * 9719 * 2099863 * 11053036065049294753459639\n}}}" p95 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:03)\n{{{id=209|\nf(2^139-1)\n///\n\n5625767248687 * 123876132205208335762278423601\n}}}" p96 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:03)\n{{{id=209|\ntime f(2^139-1)\n///\n\n5625767248687 * 123876132205208335762278423601\nTime: CPU 0.38 s, Wall: 0.41 s\n}}}" p97 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:03)\n{{{id=59|\nfor x in f([2^139-1]*4): print x\n///\n\n(((696898287454081973172991196020261297061887,), {}), 5625767248687 * 123876132205208335762278423601)\n(((696898287454081973172991196020261297061887,), {}), 5625767248687 * 123876132205208335762278423601)\n(((696898287454081973172991196020261297061887,), {}), 5625767248687 * 123876132205208335762278423601)\n(((696898287454081973172991196020261297061887,), {}), 5625767248687 * 123876132205208335762278423601)\n}}}" p98 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:03)\n{{{id=59|\n%time\nfor x in f([2^139-1]*4): \n print x\n///\n\n(((696898287454081973172991196020261297061887,), {}), 5625767248687 * 123876132205208335762278423601)\n(((696898287454081973172991196020261297061887,), {}), 5625767248687 * 123876132205208335762278423601)\n(((696898287454081973172991196020261297061887,), {}), 5625767248687 * 123876132205208335762278423601)\n(((696898287454081973172991196020261297061887,), {}), 5625767248687 * 123876132205208335762278423601)\nCPU time: 0.03 s, Wall time: 0.85 s\n}}}" p99 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:03)\n{{{id=59|\n%time\nfor x in f([2^139-1]*2): \n print x\n///\n\n(((696898287454081973172991196020261297061887,), {}), 5625767248687 * 123876132205208335762278423601)\n(((696898287454081973172991196020261297061887,), {}), 5625767248687 * 123876132205208335762278423601)\nCPU time: 0.03 s, Wall time: 0.47 s\n}}}" p100 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:05)\n{{{id=52|\nn = 1903923^939\n///\n}}}" p101 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:05)\n{{{id=107|\nn.save('a')\n///\n}}}" p102 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:06)\n{{{id=106|\nsave_session\n///\n}}}" p103 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:06)\n{{{id=106|\nsave_session\n///\n}}}" p104 aS"Worksheet 'Emory Talk' (2009-02-27 at 17:09)\n{{{id=106|\nsave_session\n///\n\n\n}}}" p105 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:01)\n{{{id=2|\n2+3\n///\n\n5\n}}}" p106 aS'Worksheet \'BSD\' (2009-02-28 at 10:01)\n{{{id=57|\n"Birch and Swinnerton-Dyer"\n///\n\n\'Birch and Swinnerton-Dyer\'\n}}}' p107 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:26)\n{{{id=210|\nZZ.random_le\n///\n}}}" p108 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:26)\n{{{id=210|\nZZ.random_leel\n///\n}}}" p109 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:26)\n{{{id=210|\nZZ.random_element\n///\n}}}" p110 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:26)\n{{{id=210|\nZZ.random_element\n///\n}}}" p111 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:27)\n{{{id=210|\n\n///\n}}}" p112 aS'Worksheet \'Sage Days 13 Talk\' (2009-02-28 at 10:31)\n{{{id=50|\nx = var(\'x\')\nf(x) = sin(3*x)*x+log(x) + 1/(x+1)^2\nshow(f)\n///\n\n
x \\ {\\mapsto}\\ {x \\sin \\left( {3 x} \\right)} + \\log \\left( x \\right) + \\frac{1}{{\\left( x + 1 \\right)}^{2} }
\n}}}' p113 aS'Worksheet \'Sage Days 13 Talk\' (2009-02-28 at 10:31)\n{{{id=171|\nshow(f.integrate(x))\n///\n\n
x \\ {\\mapsto}\\ \\frac{\\sin \\left( {3 x} \\right) - {{3 x} \\cos \\left( {3 x} \\right)}}{9} + {x \\log \\left( x \\right)} - \\frac{1}{x + 1} - x
\n}}}' p114 aS'Worksheet \'Sage Days 13 Talk\' (2009-02-28 at 10:32)\n{{{id=109|\nplot(f,(0.01,2), thickness=4) + text("Mathematica-style plotting in Sage", (1,-2), rgbcolor=\'black\')\n///\n}}}' p115 aS'Worksheet \'Sage Days 13 Talk\' (2009-02-28 at 10:32)\n{{{id=109|\nplot(f,(0.01,2), thickness=4) + text("Mathematica-style plotting in Sage", (1,-2), rgbcolor=\'black\')\n///\n}}}' p116 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:32)\n{{{id=159|\nimport pylab as p\np.figure()\nt = p.arange(0.01, 2.0, 0.01)\ns = p.sin(2 * p.pi * t)\ns = p.array([float(f(x)) for x in t])\nP = p.plot(t, s, linewidth=4)\np.xlabel('time (s)'); p.ylabel('voltage (mV)')\np.title('Matlab-style plotting in Sage')\np.grid(True)\np.savefig('sage.png')\n///\n}}}" p117 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:35)\n{{{id=172|\nf(x,y,z) = sin(3*x)*x + log(z) + 1/(1+y)^2\n///\n}}}" p118 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:35)\n{{{id=74|\ng = f._fast_float_(x,y,z)\ntimeit('g(4.5r,3.2r,5.7r)')\n///\n\n625 loops, best of 3: 557 ns per loop\n}}}" p119 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:35)\n{{{id=75|\n%python \nimport math\ndef g(x): return math.sin(3*x)*x + log(z) + 1/(1+y)**2\n///\n}}}" p120 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:35)\n{{{id=77|\ntimeit('g(4.5r)')\n///\n\n625 loops, best of 3: 163 \xc2\xb5s per loop\n}}}" p121 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:36)\n{{{id=48|\nplot3d(sin(3*x*y) + x*y^3, (x,0,3), (y,0,3))\n///\n}}}" p122 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:37)\n{{{id=48|\nplot3d(sin(3*x*y) + x*y^3 + sin(y^3), (x,0,3), (y,0,3))\n///\n}}}" p123 aS"Worksheet 'Sage Days 13 Talk' (2009-02-28 at 10:37)\n{{{id=48|\nplot3d(sin(3*x*y) + x*y + sin(y^3), (x,0,3), (y,0,3))\n///\n}}}" p124 aS'Worksheet \'Sage Days 13 Talk\' (2009-02-28 at 10:38)\n{{{id=44|\nimport pylab\nA_image = pylab.mean(pylab.imread(DATA + \'emoryimage.png\'), 2)\n@interact\ndef svd_image(i=(20,(1..100)), display_axes=True):\n u,s,v = pylab.linalg.svd(A_image)\n A = sum(s[j]*pylab.outer(u[0:,j], v[j,0:]) for j in range(i))\n g = graphics_array([matrix_plot(A),matrix_plot(A_image)])\n show(g, axes=display_axes, figsize=(8,3))\n html(\'

Compressed using %s eigenvalues

\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
number_of_points 
\n \t
\n \t
number_of_points 
\n \t
\n \t
number_of_points 
\n \t
\n \t
"Use the source, Luke..."\n}}}' p132 aS'Worksheet \'BSD\' (2009-02-28 at 10:48)\n{{{id=63|\n@interact\ndef f(F = (\'F(x,y) = \', \'y*(y+1) - x*(x-1)*(x+1)\'), max_den=(5..100)):\n R. = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-5,5), (y,-5,5), plot_points=200) + \n points([(a/d,b/d) for a in [-5..5] for b in [-5..5] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B*max_den..B*max_den] for \n b in [-B*max_den..B*max_den] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B*max_den..B*max_den] for \n b in [-B*max_den..B*max_den] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B*max_den..B*max_den] for \n b in [-B*max_den..B*max_den] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B*max_den..B*max_den] for \n b in [-B*max_den..B*max_den] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B*max_den..B*max_den] for \n b in [-B*max_den..B*max_den] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B*max_den..B*max_den] for \n b in [-B*max_den..B*max_den] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B*max_den..B*max_den] for \n b in [-B*max_den..B*max_den] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B*max_den..B*max_den] for \n b in [-B*max_den..B*max_den] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B*max_den..B*max_den] for \n b in [-B*max_den..B*max_den] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =   = QQ[]\n try: F = R(F.lower())\n except: print "Enter a polynomial with rational coefficients."; return\n g = F._fast_float_()\n show(implicit_plot(F, (x,-B,B), (y,-B,B), plot_points=200) + \n points([(a/d,b/d) for a in [-B..B] for \n b in [-B..B] for d in [1..max_den]\n if g(a/d,b/d) == 0], pointsize=40))\n///\n\n
F(x,y) =  
", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/2.py", line 7, in \n exec compile(ur\'a = _sage_const_1 + sqrt(_sage_const_7 )**_sage_const_2 + pi**e + _sage_const_2 /_sage_const_3 + x**y\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in \n \n...\n}}}' p172 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:13)\n{{{id=119|\n\n///\n}}}" p173 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:14)\n{{{id=23|\nx, y = var('x,y')\ntype(x)\n///\n\n\n}}}" p174 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:14)\n{{{id=197|\nreset('e')\n///\n}}}" p175 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:14)\n{{{id=19|\na = 1 + sqrt(7)^2 + pi^e + 2/3 + x^y\n///\n}}}" p176 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:14)\n{{{id=163|\nshow(a)\n///\n\n
{x}^{y} + {\\pi}^{e} + \\frac{26}{3}
\n}}}' p177 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:14)\n{{{id=20|\nshow(expand(a^2))\n///\n\n
{x}^{{2 y}} + {{2 {\\pi}^{e} } {x}^{y} } + \\frac{{52 {x}^{y} }}{3} + {\\pi}^{{2 e}} + \\frac{{52 {\\pi}^{e} }}{3} + \\frac{676}{9}
\n}}}' p178 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:14)\n{{{id=101|\nvar(\'a,b,c,x\')\nshow(solve(x^2 + sqrt(17)*a*x + b == 0, x))\n///\n\n
\\begin{array}{l}[x = \\frac{-\\left( \\sqrt{ {17 {a}^{2} } - {4 b} } \\right) - {\\sqrt{ 17 } a}}{2},\\\\\nx = \\frac{\\sqrt{ {17 {a}^{2} } - {4 b} } - {\\sqrt{ 17 } a}}{2}]\\end{array}
\n}}}' p179 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:14)\n{{{id=181|\nvar(\'a,b,c,x\')\nshow(solve(a*x^3 + b*x + c == 0, x)[0])\n///\n\n
x = {\\left( \\frac{{-\\sqrt{ 3 } i}}{2} - \\frac{1}{2} \\right) {\\left( \\frac{\\sqrt{ \\frac{{{27 a} {c}^{2} } + {4 {b}^{3} }}{a} }}{{{6 \\sqrt{ 3 }} a}} - \\frac{c}{{2 a}} \\right)}^{\\frac{1}{3}} } - \\frac{{\\left( \\frac{{\\sqrt{ 3 } i}}{2} - \\frac{1}{2} \\right) b}}{{{3 a} {\\left( \\frac{\\sqrt{ \\frac{{{27 a} {c}^{2} } + {4 {b}^{3} }}{a} }}{{{6 \\sqrt{ 3 }} a}} - \\frac{c}{{2 a}} \\right)}^{\\frac{1}{3}} }}
\n}}}' p180 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:15)\n{{{id=50|\nx = var(\'x\')\nf(x) = sin(3*x)*x+log(x) + 1/(x+1)^2\nshow(f)\n///\n\n
x \\ {\\mapsto}\\ {x \\sin \\left( {3 x} \\right)} + \\log \\left( x \\right) + \\frac{1}{{\\left( x + 1 \\right)}^{2} }
\n}}}' p181 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:15)\n{{{id=171|\nshow(f.integrate(x))\n///\n\n
x \\ {\\mapsto}\\ \\frac{\\sin \\left( {3 x} \\right) - {{3 x} \\cos \\left( {3 x} \\right)}}{9} + {x \\log \\left( x \\right)} - \\frac{1}{x + 1} - x
\n}}}' p182 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:16)\n{{{id=109|\nplot(f,(0.01,2), thickness=4) + text("Mathematica-style plotting in Sage", (1,-2), rgbcolor=\'black\')\n///\n}}}' p183 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:16)\n{{{id=172|\nf(x,y,z) = sin(3*x)*x + log(x*y*z)^3 + 1/(1+y)^2\n///\n}}}" p184 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:16)\n{{{id=74|\ng = f._fast_float_(x,y,z)\ntimeit('g(4.5r,3.2r,5.7r)')\n///\n\n625 loops, best of 3: 666 ns per loop\n}}}" p185 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:16)\n{{{id=75|\n%python \nimport math\ndef g(x,y,z): return math.sin(3*x)*x + log(x*y*z)^3 + 1/(1+y)**2\n///\n}}}" p186 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:16)\n{{{id=77|\ntimeit(\'g(4.5r,3.2r,5.7r)\')\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/17.py", line 6, in \n exec compile(ur\'timeit(\\u0027g(4.5r,3.2r,5.7r)\\u0027)\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in \n \n File "sage_timeit_class.pyx", line 82, in sage.misc.sage_timeit_...\n}}}' p187 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:17)\n{{{id=75|\n%python \nimport math\ndef g(x,y,z): return math.sin(3*x)*x + log(x*y*z)**3 + 1/(1+y)**2\n///\n}}}" p188 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:17)\n{{{id=77|\ntimeit('g(4.5r,3.2r,5.7r)')\n///\n\n625 loops, best of 3: 7.25 \xc2\xb5s per loop\n}}}" p189 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:17)\n{{{id=213|\n7.25/.666\n///\n\n10.8858858858859\n}}}" p190 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:18)\n{{{id=48|\n\n///\n}}}" p191 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:19)\n{{{id=172|\nf(x,y,z) = sin(3*x)*x + log(x*y*z)^3 + 1/(1+y)^2\n///\n}}}" p192 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:19)\n{{{id=74|\ng = f._fast_float_(x,y,z)\ntimeit('g(4.5r,3.2r,5.7r)')\n///\n\n625 loops, best of 3: 669 ns per loop\n}}}" p193 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:19)\n{{{id=75|\n%python \nimport math\ndef g(x,y,z): return math.sin(3*x)*x + log(x*y*z)**3 + 1/(1+y)**2\n///\n}}}" p194 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:19)\n{{{id=77|\ntimeit('g(4.5r,3.2r,5.7r)')\n///\n\n625 loops, best of 3: 7.15 \xc2\xb5s per loop\n}}}" p195 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:19)\n{{{id=213|\n7.25/.666\n///\n\n10.8858858858859\n}}}" p196 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:19)\n{{{id=213|\n7.15/.669\n///\n\n10.6875934230194\n}}}" p197 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:20)\n{{{id=83|\nvar(\'x\')\nf = sin(3*x)*x+log(x) + 1/(x+1)^2\nshow(integrate(f))\n///\n\n
\\frac{\\sin \\left( {3 x} \\right) - {{3 x} \\cos \\left( {3 x} \\right)}}{9} + {x \\log \\left( x \\right)} - \\frac{1}{x + 1} - x
\n}}}' p198 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:20)\n{{{id=0|\nm = maple(f); m\n///\n\nsin(3*x)*x+ln(x)+1/(x+1)^2\n}}}" p199 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:20)\n{{{id=89|\ntype(m)\n///\n\n\n}}}" p200 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:20)\n{{{id=90|\nm.parent()\n///\n\nMaple\n}}}" p201 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:20)\n{{{id=91|\nm.parent().pid()\n///\n\n67798\n}}}" p202 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:20)\n{{{id=92|\nos.system('ps ax |grep 24038')\n///\n\n67818 s001 S+ 0:00.00 sh -c ps ax |grep 24038\n67820 s001 R+ 0:00.00 grep 24038\n0\n}}}" p203 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:20)\n{{{id=88|\nshow(m.integrate(\'x\'))\n///\n\n
1/9\\,\\sin \\left( 3\\,x \\right) -1/3\\,\\cos \\left( 3\\,x \\right) x+\\ln \n \\left( x \\right) x-x- \\left( x+1 \\right) ^{-1}
\n}}}' p204 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:20)\n{{{id=42|\nmathematica(f).Integrate(x)\n///\n\n-x - (1 + x)^(-1) - (x*Cos[3*x])/3 + x*Log[x] + Sin[3*x]/9\n}}}" p205 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:22)\n{{{id=97|\n# first just play\nimport pylab\nA = pylab.imread(DATA + 'simons.png')\ngraphics_array([matrix_plot(A), matrix_plot(1-A[0:,0:,2])]).show(figsize=[10,4])\n///\n}}}" p206 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:22)\n{{{id=97|\n# first just play\nimport pylab\nA = pylab.imread(DATA + 'simons.png')\ngraphics_array([matrix_plot(A), matrix_plot(A[0:,0:,2]**2)]).show(figsize=[10,4])\n///\n}}}" p207 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:22)\n{{{id=97|\n# first just play\nimport pylab\nA = pylab.imread(DATA + 'simons.png')\ngraphics_array([matrix_plot(A), matrix_plot(A[0:,0:,2])]).show(figsize=[10,4])\n///\n}}}" p208 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:22)\n{{{id=44|\nimport pylab\nA_image = pylab.mean(pylab.imread(DATA + \'simons.png\'), 2)\n@interact\ndef svd_image(i=(20,(1..100)), display_axes=True):\n u,s,v = pylab.linalg.svd(A_image)\n A = sum(s[j]*pylab.outer(u[0:,j], v[j,0:]) for j in range(i))\n g = graphics_array([matrix_plot(A),matrix_plot(A_image)])\n show(g, axes=display_axes, figsize=(8,3))\n html(\'

Compressed using %s eigenvalues

\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/57.py", line 9, in \n exec compile(ur\'P + sphere((_sage_const_0 ,_sage_const_0 ,_sage_const_0 ),_sage_const_1 ,color=\\u0027red\\u0027, aspect_ratio=_sage_const_1 )\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line...\n}}}' p227 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:26)\n{{{id=84|\nvar(\'x,y\')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2))\nP + sphere((0,0,0),1,color=\'red\', aspect_ratio=[1,1])\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/58.py", line 9, in \n exec compile(ur\'P + sphere((_sage_const_0 ,_sage_const_0 ,_sage_const_0 ),_sage_const_1 ,color=\\u0027red\\u0027, aspect_ratio=[_sage_const_1 ,_sage_const_1 ])\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-...\n}}}' p228 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:26)\n{{{id=84|\nvar('x,y')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2))\nP + sphere((0,0,0),1,color='red', aspect_ratio=[1,1,1])\n///\n}}}" p229 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:26)\n{{{id=84|\nvar('x,y')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2), opacity=0.7)\nP + sphere((0,0,0),1,color='red', aspect_ratio=[1,1,1])\n///\n}}}" p230 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:26)\n{{{id=84|\nvar('x,y')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2), opacity=0.9)\nP + sphere((0,0,0),1,color='red', aspect_ratio=[1,1,1])\n///\n}}}" p231 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:26)\n{{{id=84|\nvar('x,y')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2), opacity=0.75)\nP + sphere((0,0,0),1,color='red', aspect_ratio=[1,1,1])\n///\n}}}" p232 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:26)\n{{{id=84|\nvar('x,y')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2), opacity=0.75)\nP + sphere((0,0,0),2,color='red', aspect_ratio=[1,1,1])\n///\n}}}" p233 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:26)\n{{{id=84|\nvar('x,y')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2), opacity=0.75)\nP + sphere((0,0,0),2,color='red', aspect_ratio=[1,1,1], opacity=0.75)\n///\n}}}" p234 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:27)\n{{{id=84|\nvar('x,y')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2), opacity=0.75)\nP + sphere((0,0,0),2,color='red', aspect_ratio=[1,1,1], opacity=0.5)\n///\n}}}" p235 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:27)\n{{{id=84|\nvar('x,y')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2), opacity=0.7)\nP + sphere((0,0,0),2,color='red', aspect_ratio=[1,1,1], opacity=0.6)\n///\n}}}" p236 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:27)\n{{{id=84|\nvar('x,y')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2), color='blue', opacity=0.7)\nP + sphere((0,0,0),2,color='red', aspect_ratio=[1,1,1], opacity=0.6)\n///\n}}}" p237 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:28)\n{{{id=117|\n\n///\n}}}" p238 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:28)\n{{{id=215|\n\n///\n}}}" p239 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:28)\n{{{id=216|\n\n///\n}}}" p240 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:28)\n{{{id=2|\n\n///\n}}}" p241 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:34)\n{{{id=216|\n3.4/6.9\n///\n\n0.492753623188406\n}}}" p242 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:34)\n{{{id=216|\n(3.4/6.9)*60\n///\n\n29.5652173913043\n}}}" p243 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:42)\n{{{id=222|\nimplicit_\n///\n}}}" p244 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:42)\n{{{id=222|\nimplicit__p\n///\n}}}" p245 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:42)\n{{{id=222|\nimplicit_plot\n///\n}}}" p246 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:42)\n{{{id=222|\nimplicit_plot\n///\n}}}" p247 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:42)\n{{{id=222|\nvar("x y")\nimplicit_plot(x^2+y^2-2, (-3,3), (-3,3)).show(aspect_ratio=1)\n///\n}}}' p248 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:43)\n{{{id=222|\nvar("x y")\nimplicit_plot(x^2+y^2-2, (-3,3), (-3,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p249 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:43)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^4 + x*y - x^3 - x, (-3,3), (-3,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p250 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:43)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^2 + x*y - x^3 - x, (-3,3), (-3,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p251 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:43)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^2 + x*y - x^3 - x, (-3,3), (0,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p252 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:43)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^2 + x*y - x^3 - x, (-3,3), (-1,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p253 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:43)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^2 + x*y - x^2 - x, (-3,3), (-1,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p254 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:43)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^2 + x*y - x^2 - x, (-3,3), (-3,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p255 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:44)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^3 + x*y - x^2 - x, (-3,3), (-3,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p256 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:44)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^3 + x*y - x^2 - x, (-2,3), (-3,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p257 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:44)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^3 + x*y - x^2 - x, (-2,3), (-3,3), plot_points=400, color=\'blue\').show(aspect_ratio=1)\n///\n\nverbose 0 (84: primitive.py, options) WARNING: Ignoring option \'color\'=blue\nverbose 0 (84: primitive.py, options) \nThe allowed options for ContourPlot defined by a 399 x 399 data grid are:\n cmap the name of a predefined colormap, \n a list of colors or an instance of a \n matplotlib Colormap.\n contours Either an integer specifying the number of \n contour levels, or...\n}}}' p258 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:44)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^3 + x*y - x^2 - x, (-2,3), (-3,3), plot_points=400, rgbcolor=\'blue\').show(aspect_ratio=1)\n///\n\nverbose 0 (84: primitive.py, options) WARNING: Ignoring option \'rgbcolor\'=blue\nverbose 0 (84: primitive.py, options) \nThe allowed options for ContourPlot defined by a 399 x 399 data grid are:\n cmap the name of a predefined colormap, \n a list of colors or an instance of a \n matplotlib Colormap.\n contours Either an integer specifying the number of \n contour levels,...\n}}}' p259 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:44)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^3 + x*y - x^2 - x, (-2,3), (-3,3), plot_points=400, cmap=\'hsv\').show(aspect_ratio=1)\n///\n}}}' p260 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:44)\n{{{id=223|\nvar("x y")\nimplicit_plot(y^3 + x*y - x^2 - x, (-2,3), (-3,3), plot_points=400, cmap=\'hsv\').show(aspect_ratio=1)\n///\n}}}' p261 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:45)\n{{{id=224|\nvar("x y")\nimplicit_plot(x^2+y^2-2, (-3,3), (-3,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p262 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:45)\n{{{id=224|\nvar("x y")\nimplicit_plot3d(x^2+y^2-2, (-3,3), (-3,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p263 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:45)\n{{{id=224|\nvar("x y")\nimplicit_plot3d(x^2+y^2-2, (-3,3), (-3,3), plot_points=400).show(aspect_ratio=1)\n///\n}}}' p264 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:46)\n{{{id=224|\n sage: x, y, z = var('x,y,z')\n sage: T = RDF(golden_ratio)\n sage: p = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \n sage: r = 4.77\n sage: implicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40).show(viewer='tachyon')\n///\n}}}" p265 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:46)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 4.77\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40)\n///\n}}}" p266 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:46)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 4.77\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40, zoom=1.5)\n///\n}}}" p267 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:46)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 4.77\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40, zoom=3)\n///\n}}}" p268 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:46)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 2.77\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40)\n///\n}}}" p269 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:47)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 3.77\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40)\n///\n}}}" p270 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:47)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 3.2\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40)\n///\n}}}" p271 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:47)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 3.2\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40).show(zoom=2)\n///\n}}}" p272 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:47)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 4.77\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40).show(zoom=2)\n///\n}}}" p273 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:47)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 4.77\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40).show(zoom=1.1)\n///\n}}}" p274 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:47)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 4.77\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40).show(zoom=1)\n///\n}}}" p275 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:47)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 4.77\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40).show(zoom=1.1)\n///\n}}}" p276 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:48)\n{{{id=224|\nx, y, z = var('x,y,z')\nT = RDF(golden_ratio)\np = 2 - (cos(x + T*y) + cos(x - T*y) + cos(y + T*z) + cos(y - T*z) + cos(z - T*x) + cos(z + T*x)) \nr = 4.77\nimplicit_plot3d(p, (-r, r), (-r, r), (-r, r), plot_points=40)\n///\n}}}" p277 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:49)\n{{{id=225|\nvar('x,y,z')\nimplicit_plot3d(z^2 - x^2 + y^2 - 3, (-3, 3), (-3, 3), (-3,3))\n///\n}}}" p278 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:49)\n{{{id=225|\nvar('x,y,z')\nimplicit_plot3d(z^2 - x^2 + y^2 - 3, (-6, 6), (-3, 3), (-3,3))\n///\n}}}" p279 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:49)\n{{{id=225|\nvar('x,y,z')\nimplicit_plot3d(z^2 - x^2 + y^2 - 3, (-6, 6), (-6, 6), (-6,6))\n///\n}}}" p280 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:49)\n{{{id=225|\nvar('x,y,z')\nimplicit_plot3d(z^2 - x^2 + y^2 - 3, (-6, 6), (-6, 6), (-6,6), color='blue')\n///\n}}}" p281 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:50)\n{{{id=225|\nvar('x,y,z')\nimplicit_plot3d(z^2 - x^2 + y^3 - 3, (-6, 6), (-6, 6), (-6,6))\n///\n}}}" p282 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:51)\n{{{id=225|\nvar('x,y,z')\nimplicit_plot3d(z^2 - x^2 + y^3 - 3, (-6, 6), (-6, 6), (-6,6))\n///\n}}}" p283 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:51)\n{{{id=225|\nvar('x,y,z')\nimplicit_plot3d(z^2 - x^2 + y^2 - 3, (-6, 6), (-6, 6), (-6,6))\n///\n}}}" p284 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:51)\n{{{id=54|\nvar('x,y')\nP = plot3d(sqrt(x^2-y^2+3), (x,-3,3), (y,-2,2), color='blue', opacity=0.7)\nP + sphere((0,0,0),2,color='red', aspect_ratio=[1,1,1], opacity=0.6)\n///\n}}}" p285 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:52)\n{{{id=225|\nvar('x,y,z')\nimplicit_plot3d(z^2 - x^2 + y^2 - 3, (-6, 6), (-6, 6), (-6,6))\n///\n}}}" p286 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:53)\n{{{id=53|\n# Yoda! -- over 50,000 triangles.\nfrom scipy import io\nX = io.loadmat(DATA + \'yodapose.mat\')\nfrom sage.plot.plot3d.index_face_set import IndexFaceSet\nV = X[\'V\']; F3=X[\'F3\']-1; F4=X[\'F4\']-1\nY = IndexFaceSet(F3,V,color=\'green\') + IndexFaceSet(F4,V,color=\'green\')\nY = Y.rotateX(-1)\nY.show(aspect_ratio=[1,1,1], frame=False, figsize=4)\nhtml(\'"Use the source, Luke..."\')\n///\n\n"Use the source, Luke..."\n}}}' p287 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:54)\n{{{id=44|\nimport pylab\nA_image = pylab.mean(pylab.imread(DATA + \'simons.png\'), 2)\n@interact\ndef svd_image(i=(20,(1..100)), display_axes=True):\n u,s,v = pylab.linalg.svd(A_image)\n A = sum(s[j]*pylab.outer(u[0:,j], v[j,0:]) for j in range(i))\n g = graphics_array([matrix_plot(A),matrix_plot(A_image)])\n show(g, axes=display_axes, figsize=(8,3))\n html(\'

Compressed using %s eigenvalues

\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
...\n}}}' p292 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:54)\n{{{id=219|\nimport pylab\nA_image = pylab.mean(pylab.imread(DATA + \'simons.png\'), 2)\n@interact\ndef svd_image(i=(20,(1..100)), display_axes=True):\n u,s,v = pylab.linalg.svd(A_image)\n A = sum(s[j]*pylab.outer(u[0:,j], v[j,0:]) for j in range(i))\n g = graphics_array([matrix_plot(A),matrix_plot(A_image)])\n show(g, axes=display_axes, figsize=(8,3))\n html(\'

Compressed using %s eigenvalues

\'%i)\n///\n\n
\n \t
\n \t
...\n}}}' p293 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:56)\n{{{id=144|\nR. = QQ[]\nI = R.ideal([x^2, y^2])\n///\n}}}" p294 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:56)\n{{{id=133|\nI.groebner_\n///\n}}}" p295 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:56)\n{{{id=133|\nI.groebner_basis\n///\n}}}" p296 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:56)\n{{{id=133|\nI.groebner_basis\n///\n}}}" p297 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:57)\n{{{id=144|\n\n///\n}}}" p298 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:57)\n{{{id=227|\nP. = PolynomialRing(QQ,3, order='lex')\nsage.rings.ideal.Katsura(P,3).groebner_basis()\n///\n\n[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]\n}}}" p299 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:57)\n{{{id=228|\nP. = PolynomialRing(QQ,3, order='lex')\nP\n///\n\nMultivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p300 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:57)\n{{{id=227|\nsage.rings.ideal.Katsura(P,3).groebner_basis()\n///\n\n[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]\n}}}" p301 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:57)\n{{{id=227|\nshow(sage.rings.ideal.Katsura(P,3).groebner_basis())\n///\n\n
\\begin{array}{l}[a - 60 c^{3} + \\frac{158}{7} c^{2} + \\frac{8}{7} c - 1,\\\\\nb + 30 c^{3} - \\frac{79}{7} c^{2} + \\frac{3}{7} c,\\\\\nc^{4} - \\frac{10}{21} c^{3} + \\frac{1}{84} c^{2} + \\frac{1}{84} c]\\end{array}
\n}}}' p302 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:58)\n{{{id=229|\nshow(sage.rings.ideal.Katsura(P,3).groebner_basis(\'singular:std\'))\n///\n\n
\\begin{array}{l}[a - 60 c^{3} + \\frac{158}{7} c^{2} + \\frac{8}{7} c - 1,\\\\\nb + 30 c^{3} - \\frac{79}{7} c^{2} + \\frac{3}{7} c,\\\\\nc^{4} - \\frac{10}{21} c^{3} + \\frac{1}{84} c^{2} + \\frac{1}{84} c]\\end{array}
\n}}}' p303 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:58)\n{{{id=230|\nshow(sage.rings.ideal.Katsura(P,3).groebner_basis(\'singular:slimgb\'))\n///\n\n
\\begin{array}{l}[a - 60 c^{3} + \\frac{158}{7} c^{2} + \\frac{8}{7} c - 1,\\\\\nb + 30 c^{3} - \\frac{79}{7} c^{2} + \\frac{3}{7} c,\\\\\nc^{4} - \\frac{10}{21} c^{3} + \\frac{1}{84} c^{2} + \\frac{1}{84} c]\\end{array}
\n}}}' p304 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:58)\n{{{id=231|\nshow(sage.rings.ideal.Katsura(P,3).groebner_basis(\'macaulay2\'))\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/23.py", line 7, in \n exec compile(ur\'show(sage.rings.ideal.Katsura(P,_sage_const_3 ).groebner_basis(\\u0027macaulay2\\u0027))\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in \n \n File "/Users/ws...\n}}}' p305 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 00:59)\n{{{id=232|\nshow(sage.rings.ideal.Katsura(P,3).groebner_basis(\'magma\'))\n///\n\n
\\begin{array}{l}[a - 60 c^{3} + \\frac{158}{7} c^{2} + \\frac{8}{7} c - 1,\\\\\nb + 30 c^{3} - \\frac{79}{7} c^{2} + \\frac{3}{7} c,\\\\\nc^{4} - \\frac{10}{21} c^{3} + \\frac{1}{84} c^{2} + \\frac{1}{84} c]\\end{array}
\n}}}' p306 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:59)\n{{{id=133|\n\n///\n}}}" p307 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:59)\n{{{id=133|\nI = show(sage.rings.ideal.Katsura(P,3)\n///\n line 4\n I = show(sage.rings.ideal.Katsura(P,_sage_const_3 )\n \n^\nSyntaxError: invalid syntax\n}}}" p308 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:59)\n{{{id=133|\nI = sage.rings.ideal.Katsura(P,3)\n///\n}}}" p309 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:59)\n{{{id=61|\nI.groebner_\n///\n}}}" p310 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:59)\n{{{id=61|\nI.groebner_fan\n///\n}}}" p311 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:59)\n{{{id=61|\nF = I.groebner_fan()\n///\n}}}" p312 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:59)\n{{{id=233|\nF\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p313 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:59)\n{{{id=233|\nF.\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p314 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 00:59)\n{{{id=61|\nF = I.groebner_fan()\nF\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p315 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=233|\nF.\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p316 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=233|\nF.\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p317 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=233|\nF.\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p318 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=233|\nF.\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p319 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=233|\nF.tropical_\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p320 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=233|\nF.tropical_basis\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p321 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:00)\n{{{id=233|\nF.tropical_basis()\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/39.py", line 6, in \n exec compile(ur\'F.tropical_basis()\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in \n \n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/sage/ri...\n}}}' p322 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:00)\n{{{id=233|\nF.\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/39.py", line 6, in \n exec compile(ur\'F.tropical_basis()\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in \n \n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/sage/ri...\n}}}' p323 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:00)\n{{{id=233|\nF.weight_vectors\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/39.py", line 6, in \n exec compile(ur\'F.tropical_basis()\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in \n \n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/sage/ri...\n}}}' p324 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=233|\nF.weight_vectors()\n///\n\n[(4, 4, 1), (3, 2, 1), (5, 2, 3), (2, 1, 3), (2, 3, 5), (2, 3, 1), (2, 5, 3), (1, 4, 4)]\n}}}" p325 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=108|\nF.\n///\n}}}" p326 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=108|\nF.homogeneity_space\n///\n}}}" p327 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=108|\nF.homogeneity_space()\n///\n\n'_application PolyhedralCone\\n_version 2.2\\n_type PolyhedralCone\\n\\nAMBIENT_DIM\\n3\\n\\nDIM\\n0\\n\\nIMPLIED_EQUATIONS\\n0 0 1\\n0 1 0\\n1 0 0\\n\\nLINEALITY_DIM\\n0\\n\\nLINEALITY_SPACE\\n\\nFACETS\\n\\nRELATIVE_INTERIOR_POINT\\n0 0 0\\n'\n}}}" p328 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=108|\nprint F.homogeneity_space()\n///\n\n_application PolyhedralCone\n_version 2.2\n_type PolyhedralCone\n\nAMBIENT_DIM\n3\n\nDIM\n0\n\nIMPLIED_EQUATIONS\n0 0 1\n0 1 0\n1 0 0\n\nLINEALITY_DIM\n0\n\nLINEALITY_SPACE\n\nFACETS\n\nRELATIVE_INTERIOR_POINT\n0 0 0\n}}}" p329 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=108|\nF.\n///\n\n_application PolyhedralCone\n_version 2.2\n_type PolyhedralCone\n\nAMBIENT_DIM\n3\n\nDIM\n0\n\nIMPLIED_EQUATIONS\n0 0 1\n0 1 0\n1 0 0\n\nLINEALITY_DIM\n0\n\nLINEALITY_SPACE\n\nFACETS\n\nRELATIVE_INTERIOR_POINT\n0 0 0\n}}}" p330 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=108|\nF.ren\n///\n\n_application PolyhedralCone\n_version 2.2\n_type PolyhedralCone\n\nAMBIENT_DIM\n3\n\nDIM\n0\n\nIMPLIED_EQUATIONS\n0 0 1\n0 1 0\n1 0 0\n\nLINEALITY_DIM\n0\n\nLINEALITY_SPACE\n\nFACETS\n\nRELATIVE_INTERIOR_POINT\n0 0 0\n}}}" p331 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=108|\nF.render\n///\n\n_application PolyhedralCone\n_version 2.2\n_type PolyhedralCone\n\nAMBIENT_DIM\n3\n\nDIM\n0\n\nIMPLIED_EQUATIONS\n0 0 1\n0 1 0\n1 0 0\n\nLINEALITY_DIM\n0\n\nLINEALITY_SPACE\n\nFACETS\n\nRELATIVE_INTERIOR_POINT\n0 0 0\n}}}" p332 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:00)\n{{{id=108|\nF.render3d()\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/50.py", line 6, in \n exec compile(ur\'F.render3d()\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in \n \n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/sage/rings/po...\n}}}' p333 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:00)\n{{{id=108|\nF.render()\n///\n}}}" p334 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:03)\n{{{id=108|\nF.render().show(frame=True)\n///\n}}}" p335 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:03)\n{{{id=108|\nF.render().show(frame=True, axes=False)\n///\n}}}" p336 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:03)\n{{{id=108|\nF.render().show(axes=False)\n///\n}}}" p337 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:05)\n{{{id=44|\nimport pylab\nA_image = pylab.mean(pylab.imread(DATA + \'simons.png\'), 2)\n@interact\ndef svd_image(i=(20,(1..100)), display_axes=True):\n u,s,v = pylab.linalg.svd(A_image)\n A = sum(s[j]*pylab.outer(u[0:,j], v[j,0:]) for j in range(i))\n g = graphics_array([matrix_plot(A),matrix_plot(A_image)])\n show(g, axes=display_axes, figsize=(8,3))\n html(\'

Compressed using %s eigenvalues

\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
\\begin{array}{l}[a - 60 c^{3} + \\frac{158}{7} c^{2} + \\frac{8}{7} c - 1,\\\\\nb + 30 c^{3} - \\frac{79}{7} c^{2} + \\frac{3}{7} c,\\\\\nc^{4} - \\frac{10}{21} c^{3} + \\frac{1}{84} c^{2} + \\frac{1}{84} c]\\end{array}
\n}}}' p341 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:10)\n{{{id=245|\nR. = GF(19)[]\n///\n}}}" p342 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:10)\n{{{id=245|\nR. = GF(997)[]\n///\n}}}" p343 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:10)\n{{{id=247|\n(x+y+z+3)^3\n///\n\nx^3 + 3*x^2*y + 3*x*y^2 + y^3 + 3*x^2*z + 6*x*y*z + 3*y^2*z + 3*x*z^2 + 3*y*z^2 + z^3 + 9*x^2 + 18*x*y + 9*y^2 + 18*x*z + 18*y*z + 9*z^2 + 27*x + 27*y + 27*z + 27\n}}}" p344 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:10)\n{{{id=246|\nf = x+y+z+1\ntime f^10*(f^10+1)\n///\n\nx^20 + 20*x^19*y + 190*x^18*y^2 + 143*x^17*y^3 - 140*x^16*y^4 - 448*x^15*y^5 - 123*x^14*y^6 - 246*x^13*y^7 + 348*x^12*y^8 + 464*x^11*y^9 + 311*x^10*y^10 + 464*x^9*y^11 + 348*x^8*y^12 - 246*x^7*y^13 - 123*x^6*y^14 - 448*x^5*y^15 - 140*x^4*y^16 + 143*x^3*y^17 + 190*x^2*y^18 + 20*x*y^19 + y^20 + 20*x^19*z + 380*x^18*y*z + 429*x^17*y^2*z + 437*x^16*y^3*z - 246*x^15*y^4*z + 259*x^14*y^5*z + 272*x^13*y^6*z - 207*x^12*y^7*z + 188*x^11*y^8*z + 119*x^10*y^9*z ...\n}}}" p345 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:10)\n{{{id=246|\nf = x+y+z+1\ntime g = f^10*(f^10+1)\n///\n\nTime: CPU 0.00 s, Wall: 0.00 s\n}}}" p346 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:11)\n{{{id=246|\nf = x+y+z+1\ntime g = f^20*(f^20+1)\n///\n\nTime: CPU 0.12 s, Wall: 0.12 s\n}}}" p347 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:11)\n{{{id=246|\nf = (x+y+z+1)^20\ntime g = f*(f+1)\n///\n\nTime: CPU 0.12 s, Wall: 0.12 s\n}}}" p348 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:11)\n{{{id=248|\n%magma\nR := PolynomialRing(GF(997),3);\nf := (x+y+z+1)^20;\ntime g := f*(f+1);\n///\n\n\n\nTime: 0.280\n}}}" p349 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:11)\n{{{id=246|\nf = (x+y+z+1)^25\ntime g = f*(f+1)\n///\n\nTime: CPU 0.41 s, Wall: 0.42 s\n}}}" p350 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:11)\n{{{id=248|\n%magma\nR := PolynomialRing(GF(997),3);\nf := (x+y+z+1)^25;\ntime g := f*(f+1);\n///\n\n\n\nTime: 0.930\n}}}" p351 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:12)\n{{{id=246|\nf = (x+y+z+1)^15\ntime g = f*(f+1)\n///\n\nTime: CPU 0.03 s, Wall: 0.03 s\n}}}" p352 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:12)\n{{{id=248|\n%magma\nR := PolynomialRing(GF(997),3);\nf := (x+y+z+1)^15;\ntime g := f*(f+1);\n///\n\n\n\nTime: 0.090\n}}}" p353 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:12)\n{{{id=246|\nf = (x+y+z+1)^20\ntime g = f*(f+1)\n///\n\nTime: CPU 0.11 s, Wall: 0.11 s\n}}}" p354 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:12)\n{{{id=248|\n%magma\nR := PolynomialRing(GF(997),3);\nf := (x+y+z+1)^20;\ntime g := f*(f+1);\n///\n\n\n\nTime: 0.270\n}}}" p355 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:14)\n{{{id=249|\nmf = magma(f)\ntime g = mf*(mf+1)\n///\n\nTime: CPU 0.00 s, Wall: 0.31 s\n}}}" p356 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:15)\n{{{id=245|\nR. = GF(997)[]R\n///\n line 4\n R = GF(_sage_const_997 )[]R; (x, y, z,) = R._first_ngens(3)\n ^\nSyntaxError: invalid syntax\n}}}" p357 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:15)\n{{{id=245|\nR. = GF(997)[]\n///\n}}}" p358 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:15)\n{{{id=245|\nR. = GF(997)[]; R\n///\n\nMultivariate Polynomial Ring in x, y, z over Finite Field of size 997\n}}}" p359 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:15)\n{{{id=247|\n(x+y+z+3)^3\n///\n\nx^3 + 3*x^2*y + 3*x*y^2 + y^3 + 3*x^2*z + 6*x*y*z + 3*y^2*z + 3*x*z^2 + 3*y*z^2 + z^3 + 9*x^2 + 18*x*y + 9*y^2 + 18*x*z + 18*y*z + 9*z^2 + 27*x + 27*y + 27*z + 27\n}}}" p360 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:15)\n{{{id=247|\n(x+y+z+3)^2\n///\n\nx^2 + 2*x*y + y^2 + 2*x*z + 2*y*z + z^2 + 6*x + 6*y + 6*z + 9\n}}}" p361 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:15)\n{{{id=247|\nshow((x+y+z+3)^2)\n///\n\n
x^{2} + 2 x y + y^{2} + 2 x z + 2 y z + z^{2} + 6 x + 6 y + 6 z + 9
\n}}}' p362 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:15)\n{{{id=246|\nf = (x+y+z+1)^20\ntime g = f*(f+1)\n///\n\nTime: CPU 0.11 s, Wall: 0.12 s\n}}}" p363 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:15)\n{{{id=248|\n%magma\nR := PolynomialRing(GF(997),3);\nf := (x+y+z+1)^20;\ntime g := f*(f+1);\n///\n\n\n\nTime: 0.280\n}}}" p364 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:15)\n{{{id=249|\nmf = magma(f)\ntime g = mf*(mf+1)\n///\n\nTime: CPU 0.00 s, Wall: 0.30 s\n}}}" p365 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:26)\n{{{id=252|\nshow(expand(a^2))\n///\n\n
a^{2}
\n}}}' p366 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:26)\n{{{id=252|\n\n///\n}}}" p367 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:26)\n{{{id=253|\nshow(expand(a^2))\n///\n\n
a^{2}
\n}}}' p368 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:26)\n{{{id=252|\n\n///\n}}}" p369 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:26)\n{{{id=254|\n\n///\n}}}" p370 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:27)\n{{{id=23|\nx, y = var('x,y')\ntype(x)\n///\n\n\n}}}" p371 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:27)\n{{{id=197|\nreset('e')\n///\n}}}" p372 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:27)\n{{{id=19|\na = 1 + sqrt(7)^2 + pi^e + 2/3 + x^y\n///\n}}}" p373 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:27)\n{{{id=163|\nshow(a)\n///\n\n
{x}^{y} + {\\pi}^{e} + \\frac{26}{3}
\n}}}' p374 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:27)\n{{{id=253|\nshow(expand(a^2))\n///\n\n
{x}^{{2 y}} + {{2 {\\pi}^{e} } {x}^{y} } + \\frac{{52 {x}^{y} }}{3} + {\\pi}^{{2 e}} + \\frac{{52 {\\pi}^{e} }}{3} + \\frac{676}{9}
\n}}}' p375 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:27)\n{{{id=254|\nshow(integrate(sin(x^2)))\n///\n\n
\\frac{{\\sqrt{ \\pi } \\left( {\\left( {\\sqrt{ 2 } i} + \\sqrt{ 2 } \\right) \\text{erf} \\left( \\frac{{\\left( {\\sqrt{ 2 } i} + \\sqrt{ 2 } \\right) x}}{2} \\right)} + {\\left( {\\sqrt{ 2 } i} - \\sqrt{ 2 } \\right) \\text{erf} \\left( \\frac{{\\left( {\\sqrt{ 2 } i} - \\sqrt{ 2 } \\right) x}}{2} \\right)} \\right)}}{8}
\n}}}' p376 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:29)\n{{{id=44|\nimport pylab\nA_image = pylab.mean(pylab.imread(DATA + \'simons.png\'), 2)\n@interact\ndef svd_image(i=(20,(1..100)), display_axes=True):\n u,s,v = pylab.linalg.svd(A_image)\n A = sum(s[j]*pylab.outer(u[0:,j], v[j,0:]) for j in range(i))\n g = graphics_array([matrix_plot(A),matrix_plot(A_image)])\n show(g, axes=display_axes, figsize=(8,3))\n html(\'

Compressed using %s eigenvalues

\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
"Use the source, Luke..."\n}}}' p383 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:34)\n{{{id=255|\n7.14/0.03\n///\n\n238.000000000000\n}}}" p384 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:34)\n{{{id=6|\n\n///\n}}}" p385 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:35)\n{{{id=1|\n%cython\nfrom sage.all import is_square\ncdef extern from "math.h":\n long double sqrtl(long double)\ndef f(n):\n uitkomst1=[]\n uitkomst2=[]\n cdef long long eind=int((n+2)/(2*sqrt(3)))\n cdef long long y, t\n for y in range(1,eind): \n t = sqrtl( (3*y*y + 1))\n if t * t == 3*y*y + 1:\n uitkomst1.append((y, (2*t-1)/3))\n t = sqrtl( (48*y*y + 1))\n if t * t == 48*y*y + 1:\n uitkomst2.append((y, (2*t+1)/3))\n print uitkomst1\n een=sum([3*x-1 for (y,x) in uitkomst1 if 3*x-1<10^9])\n print uitkomst2\n twee=sum([3*x+1 for (y,x) in uitkomst2 if 3*x+1<10^9])\n print een+twee\n///\n}}}' p386 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:35)\n{{{id=4|\ntime f(10^6)\n///\n\n[(1L, 1L), (4L, 4L), (15L, 17L), (56L, 64L), (209L, 241L), (780L, 900L), (2911L, 3361L), (10864L, 12544L), (40545L, 46817L), (151316L, 174724L)]\n[(1L, 5L), (14L, 65L), (195L, 901L), (2716L, 12545L), (37829L, 174725L)]\n2\nTime: CPU 0.03 s, Wall: 0.03 s\n}}}" p387 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:36)\n{{{id=228|\nP. = PolynomialRing(QQ,3, order='lex'); P\n///\n\nMultivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p388 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:36)\n{{{id=227|\nsage.rings.ideal.Katsura(P,3).groebner_basis()\n///\n\n[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]\n}}}" p389 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:36)\n{{{id=227|\nshow(sage.rings.ideal.Katsura(P,3).groebner_basis())\n///\n\n
\\begin{array}{l}[a - 60 c^{3} + \\frac{158}{7} c^{2} + \\frac{8}{7} c - 1,\\\\\nb + 30 c^{3} - \\frac{79}{7} c^{2} + \\frac{3}{7} c,\\\\\nc^{4} - \\frac{10}{21} c^{3} + \\frac{1}{84} c^{2} + \\frac{1}{84} c]\\end{array}
\n}}}' p390 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:36)\n{{{id=229|\nsage.rings.ideal.Katsura(P,3).groebner_basis('singular:std')\n///\n\n[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]\n}}}" p391 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:36)\n{{{id=230|\nsage.rings.ideal.Katsura(P,3).groebner_basis('singular:slimgb')\n///\n\n[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]\n}}}" p392 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:36)\n{{{id=231|\nsage.rings.ideal.Katsura(P,3).groebner_basis(\'macaulay2\')\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/111.py", line 7, in \n exec compile(ur\'sage.rings.ideal.Katsura(P,_sage_const_3 ).groebner_basis(\\u0027macaulay2\\u0027)\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in \n \n File "/Users/wstein/...\n}}}' p393 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:37)\n{{{id=232|\nsage.rings.ideal.Katsura(P,3).groebner_basis('magma')\n///\n\n[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]\n}}}" p394 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:37)\n{{{id=231|\nsage.rings.ideal.Katsura(P,3).groebner_basis(\'macaulay2\')\nsage.rings.ideal.Katsura(P,3).groebner_basis(\'singular:slimgb\')\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/113.py", line 7, in \n sage.rings.ideal.Katsura(P,_sage_const_3 ).groebner_basis(\'macaulay2\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/sage/misc/cachefunc.py", line 242, in __call__\n cache[key] = self.f(self._instance, *args, **kwds)\n File "/Users/wstein/bu...\n}}}' p395 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:37)\n{{{id=231|\n#sage.rings.ideal.Katsura(P,3).groebner_basis('macaulay2')\nsage.rings.ideal.Katsura(P,3).groebner_basis('singular:slimgb')\n///\n\n[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]\n}}}" p396 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:37)\n{{{id=232|\nsage.rings.ideal.Katsura(P,3).groebner_basis('magma')\n///\n\n[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]\n}}}" p397 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:37)\n{{{id=133|\nI = sage.rings.ideal.Katsura(P,3)\n///\n}}}" p398 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:37)\n{{{id=61|\nF = I.groebner_fan(); F\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p399 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:38)\n{{{id=258|\nsage.rings.ideal.Katsura(P,3)\n///\n\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p400 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:38)\n{{{id=258|\nI = sage.rings.ideal.Katsura(P,3)\n///\n}}}" p401 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:38)\n{{{id=258|\nI = sage.rings.ideal.Katsura(P,3); I.gens()\n///\n\n(a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b)\n}}}" p402 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:38)\n{{{id=258|\nI = sage.rings.ideal.Katsura(P,3); show(I.gens())\n///\n\n
\\left(a + 2 b + 2 c - 1, \n a^{2} - a + 2 b^{2} + 2 c^{2}, \n 2 a b + 2 b c - b\\right)
\n}}}' p403 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:38)\n{{{id=227|\nshow(tuple(I.groebner_basis()))\n///\n\n
\\left(a - 60 c^{3} + \\frac{158}{7} c^{2} + \\frac{8}{7} c - 1, \n b + 30 c^{3} - \\frac{79}{7} c^{2} + \\frac{3}{7} c, \n c^{4} - \\frac{10}{21} c^{3} + \\frac{1}{84} c^{2} + \\frac{1}{84} c\\right)
\n}}}' p404 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:38)\n{{{id=227|\nI.groebner_basis()\n///\n\n[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]\n}}}" p405 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:38)\n{{{id=133|\nP. = PolynomialRing(QQ,3, order=\'lex\'); P\nI = sage.rings.ideal.Katsura(P,4)\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/124.py", line 8, in \n exec compile(ur\'I = sage.rings.ideal.Katsura(P,_sage_const_4 )\' + \'\\n\', \'\', \'single\')\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in \n \n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/py...\n}}}' p406 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 01:38)\n{{{id=133|\nP. = PolynomialRing(QQ,4, order=\'lex\'); P\nI = sage.rings.ideal.Katsura(P,4)\n///\n\nTraceback (most recent call last):\n File "", line 1, in \n File "/Users/wstein/talks/20090310-msri-sd14/nb/worksheets/admin/1/code/125.py", line 7, in \n P = PolynomialRing(QQ,_sage_const_4 , order=\'lex\', names=(\'a\', \'b\', \'c\',)); (a, b, c,) = P._first_ngens(3); P\n File "/Users/wstein/build/sage-3.4.alpha0/local/lib/python2.5/site-packages/sage/rings/polynomial/polynomial_ring_constructor.py", line 275, in PolynomialRing\n ...\n}}}' p407 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:39)\n{{{id=133|\nP. = PolynomialRing(QQ,4, order='lex'); P\nI = sage.rings.ideal.Katsura(P,4)\n///\n}}}" p408 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:39)\n{{{id=61|\nF = I.groebner_fan(); F\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c + 2*d - 1, a^2 - a + 2*b^2 + 2*c^2 + 2*d^2, 2*a*b + 2*b*c - b + 2*c*d, 2*a*c + b^2 + 2*b*d - c) of Multivariate Polynomial Ring in a, b, c, d over Rational Field\n}}}" p409 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:39)\n{{{id=233|\nF.weight_vectors()\n///\n}}}" p410 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:39)\n{{{id=133|\nP. = PolynomialRing(QQ,3, order='lex'); P\nI = sage.rings.ideal.Katsura(P,3)\n///\n}}}" p411 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:39)\n{{{id=61|\nF = I.groebner_fan(); F\n///\n\nGroebner fan of the ideal:\nIdeal (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b) of Multivariate Polynomial Ring in a, b, c over Rational Field\n}}}" p412 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:39)\n{{{id=233|\nF.weight_vectors()\n///\n\n[(4, 4, 1), (3, 2, 1), (5, 2, 3), (2, 1, 3), (2, 3, 5), (2, 3, 1), (2, 5, 3), (1, 4, 4)]\n}}}" p413 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 01:39)\n{{{id=108|\nF.render().show(axes=False)\n///\n}}}" p414 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 08:58)\n{{{id=215|\n2+3\n///\n\n5\n}}}" p415 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 08:58)\n{{{id=215|\n\n///\n}}}" p416 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:45)\n{{{id=31|\na = random_matrix(ZZ,200,200,x=-2^127,y=2^127)\ntime d = a.determinant()\nlen(str(d))\n///\n\nTime: CPU 4.11 s, Wall: 4.69 s\n7788\n}}}" p417 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:45)\n{{{id=167|\na[0,0]\n///\n\n-57511480170851074417469190457182575086\n}}}" p418 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:46)\n{{{id=27|\nmaple.with_package('LinearAlgebra')\nB = maple(a)\nt = maple.cputime()\ntime c = B.Determinant()\nmaple.cputime(t)\n///\n\nTime: CPU 0.00 s, Wall: 23.42 s\n21.962\n}}}" p419 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:46)\n{{{id=168|\nc == d\n///\n\nTrue\n}}}" p420 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:48)\n{{{id=31|\na = random_matrix(ZZ,200,200,x=-2^127,y=2^127)\ntime d = a.determinant()\nlen(str(d))\n///\n\nTime: CPU 3.26 s, Wall: 3.33 s\n7785\n}}}" p421 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:48)\n{{{id=82|\nB = magma(a)\nt = magma.cputime()\ntime e = B.Determinant()\nmagma.cputime(t)\n///\n\nTime: CPU 0.00 s, Wall: 11.01 s\n10.75\n}}}" p422 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:48)\n{{{id=208|\ne == c\n///\n\nFalse\n}}}" p423 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:49)\n{{{id=208|\ne == d\n///\n\nTrue\n}}}" p424 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:51)\n{{{id=259|\nQQ.random_element\n///\n}}}" p425 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:51)\n{{{id=259|\nQQ.random_element\n///\n}}}" p426 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:51)\n{{{id=259|\nQQ.random_element\n///\n}}}" p427 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:51)\n{{{id=259|\nQQ.random_element?\n///\n}}}" p428 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:51)\n{{{id=259|\nQQ.random_element?\n///\n}}}" p429 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:52)\n{{{id=260|\nZZ\n///\n\nInteger Ring\n}}}" p430 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:52)\n{{{id=260|\nZZ.random_element?\n///\n\nInteger Ring\n}}}" p431 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:52)\n{{{id=260|\n[ZZ.random_element() for _ in [1..100]]\n///\n\n[0, 0, 1, 0, 0, 0, -6, 1, -3, 1, -1, 3, 1, 1, -7, -1, -2, 0, -8, -3, 0, 13, -1, 32, -1, 1, -1, 0, -1, 1, 0, 18, 1, 0, -1, 14, 2, 0, 0, 0, -1, -1, 0, 7, 5, 1, 0, -3, -1, -3, 0, 0, 2, -3, -1, 1, 2, -2, 0, -1, 0, 1, 1, 1, 2, 0, -9, 2, 1, -3, 2, 0, -5, -1, 0, 1, 1, 15, 0, -1, 3, -2, -23, 66, 0, -1, -1, -1, 1, 1, -2, 0, 2, 0, -3, 1, 1, 1, 1, 0]\n}}}" p432 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:52)\n{{{id=260|\n[ZZ.random_element() for _ in [1..1000]]\n///\n\n[-1, 7, 5, 1, -1, -21, 246, 2, 1, -4, 0, 0, 2, 1, 0, -5, -12, 1, 0, 4, 2, -2, -1, -1, 1, 0, -1, 2, 0, -24, 0, 3, 7, 0, -1, -1, 3, -3, -5, 1, -2, 0, 6, -1, 1, -2, 1, 0, 2, 2, 6, -1, 1, 2, 1, -3, 2, 1, -1, 4, -1, -1, 8, 1, 1, 0, -2, -1, 3, 0, -2, -9, -24, 2, 1, 1, -1, 1, 1, 0, 0, 1, 0, 0, -2, 1, 1, -1, 1, -45, 0, 0, 1, -1, 0, -1, 1, -5, 1, -1, -1, 0, 11, -8, 2, 1, 1, 1, 1, 2, -5, -1, -4, 4, -1, 0, -1, 0, 0, 0, 0, -1, -1, 1, 1, -3, -1, 3, 2, 1, 0, -1, 1,...\n}}}" p433 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:53)\n{{{id=260|\n[ZZ.random_element(-5,5) for _ in [1..1000]]\n///\n\n[-3, -3, 3, -3, 2, 1, 4, -1, -2, -5, -4, -3, 3, -1, -1, 0, -1, 0, 2, -2, 2, 1, 4, 4, 3, 4, 0, -1, -2, -1, -2, 0, 1, 3, -4, 4, 0, -3, -3, 3, -4, -1, 1, 0, 3, 0, -1, -3, 2, 4, -5, -3, -5, -2, -3, -1, 4, 2, 0, -1, -4, 0, -4, -5, 0, 1, 2, 2, 1, 1, -5, 3, 1, -3, -1, 2, 0, -3, 4, 1, 3, 2, -1, -1, 2, -2, -2, 2, 2, 4, -5, 2, -1, -3, 2, 3, -5, 3, -4, -2, -2, -3, 0, -5, -3, 0, 4, 4, 0, -5, -3, -3, 3, -5, 4, -3, -5, 1, 4, -3, 1, -1, 2, 2, 2, -1, 3, 3, -4, 1, -5,...\n}}}" p434 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:53)\n{{{id=261|\nimport scipy.stats\n///\n}}}" p435 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:53)\n{{{id=262|\nscipy.stats.\n///\n}}}" p436 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:54)\n{{{id=172|\nf(x,y,z) = sin(3*x)*x + log(x*y*z)^3 + 1/(1+y)^2\n///\n}}}" p437 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:54)\n{{{id=263|\nf(4.5,3.2,5.7)\n///\n\n89.3053908767\n}}}" p438 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:54)\n{{{id=263|\nf(4.5r,3.2r,5.7r)\n///\n\n89.3053908767\n}}}" p439 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:54)\n{{{id=263|\ntimeit('f(4.5r,3.2r,5.7r)')\n///\n\n625 loops, best of 3: 398 \xc2\xb5s per loop\n}}}" p440 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:55)\n{{{id=74|\ng = f._fast_float_(x,y,z)\ntimeit('g(4.5r,3.2r,5.7r)')\n///\n\n625 loops, best of 3: 726 ns per loop\n}}}" p441 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:56)\n{{{id=75|\n%python \nimport math\ndef g(x,y,z): return math.sin(3*x)*x + log(x*y*z)**3 + 1/(1+y)**2\n///\n}}}" p442 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:56)\n{{{id=77|\ntimeit('g(4.5r,3.2r,5.7r)')\n///\n\n625 loops, best of 3: 7.18 \xc2\xb5s per loop\n}}}" p443 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:57)\n{{{id=97|\n# first just play\nimport pylab\nA = pylab.imread(DATA + 'simons.png')\ngraphics_array([matrix_plot(A), matrix_plot(1-A[0:,0:,1])]).show(figsize=[10,4])\n///\n}}}" p444 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:58)\n{{{id=97|\n# first just play\nimport pylab\nA = pylab.imread(DATA + 'simons.png')\ngraphics_array([matrix_plot(A), matrix_plot(A[0:,0:,1]^(-1))]).show(figsize=[10,4])\n///\n}}}" p445 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 09:58)\n{{{id=97|\n# first just play\nimport pylab\nA = pylab.imread(DATA + 'simons.png')\ngraphics_array([matrix_plot(A), matrix_plot(A[0:,0:,1]*A[0:,0:,1])]).show(figsize=[10,4])\n///\n}}}" p446 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 09:58)\n{{{id=44|\nimport pylab\nA_image = pylab.mean(pylab.imread(DATA + \'simons.png\'), 2)\n@interact\ndef svd_image(i=(20,(1..100)), display_axes=True):\n u,s,v = pylab.linalg.svd(A_image)\n A = sum(s[j]*pylab.outer(u[0:,j], v[j,0:]) for j in range(i))\n g = graphics_array([matrix_plot(A),matrix_plot(A_image)])\n show(g, axes=display_axes, figsize=(8,3))\n html(\'

Compressed using %s eigenvalues

\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
Compressed using %s eigenvalues\'%i)\n///\n\n
\n \t
\n \t
"Use the source, Luke..."\n}}}' p499 aS'Worksheet \'Sage Days 14 Talk\' (2009-03-10 at 10:09)\n{{{id=1|\n%cython\nfrom sage.all import is_square\ncdef extern from "math.h":\n long double sqrtl(long double)\ndef f(n):\n uitkomst1=[]\n uitkomst2=[]\n cdef long long eind=int((n+2)/(2*sqrt(3)))\n cdef long long y, t\n for y in range(1,eind): \n t = sqrtl( (3*y*y + 1))\n if t * t == 3*y*y + 1:\n uitkomst1.append((y, (2*t-1)/3))\n t = sqrtl( (48*y*y + 1))\n if t * t == 48*y*y + 1:\n uitkomst2.append((y, (2*t+1)/3))\n print uitkomst1\n een=sum([3*x-1 for (y,x) in uitkomst1 if 3*x-1<10^9])\n print uitkomst2\n twee=sum([3*x+1 for (y,x) in uitkomst2 if 3*x+1<10^9])\n print een+twee\n///\n}}}' p500 aS"Worksheet 'Sage Days 14 Talk' (2009-03-10 at 10:10)\n{{{id=4|\ntime f(10^6)\n///\n\n[(1L, 1L), (4L, 4L), (15L, 17L), (56L, 64L), (209L, 241L), (780L, 900L), (2911L, 3361L), (10864L, 12544L), (40545L, 46817L), (151316L, 174724L)]\n[(1L, 5L), (14L, 65L), (195L, 901L), (2716L, 12545L), (37829L, 174725L)]\n2\nTime: CPU 0.03 s, Wall: 0.03 s\n}}}" p501 a.