<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Modulo Errors &#187; Algebra</title>
	<atom:link href="http://maths.straylight.co.uk/archives/category/algebra/feed" rel="self" type="application/rss+xml" />
	<link>http://maths.straylight.co.uk</link>
	<description>for when the margin is too small</description>
	<lastBuildDate>Mon, 12 Jul 2010 18:25:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>First Year Presentation</title>
		<link>http://maths.straylight.co.uk/archives/88</link>
		<comments>http://maths.straylight.co.uk/archives/88#comments</comments>
		<pubDate>Mon, 11 Jun 2007 19:12:16 +0000</pubDate>
		<dc:creator>Graeme</dc:creator>
				<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Algebraic Geometry]]></category>
		<category><![CDATA[Group Theory]]></category>
		<category><![CDATA[Number Theory]]></category>
		<category><![CDATA[PhD]]></category>
		<category><![CDATA[Talks]]></category>

		<guid isPermaLink="false">http://maths.straylight.co.uk/?p=88</guid>
		<description><![CDATA[Slides and Report from my first year presentation on the point counting problem.]]></description>
			<content:encoded><![CDATA[<p>Tomorrow I give my first year presentation, which determines whether I&#8217;m allowed to continue my studies. At 20-30 minutes, it&#8217;s a rather condensed version of my recent geometry club talk on the point counting problem, although this time I&#8217;m skipping more quickly through the fundamentals so that I can discuss some of the algorithms in depth, and taking a (hopefully) clearer route. </p>
<p>Both <a href="http://www.maths.ed.ac.uk/~s0677951/y1report.pdf">the report itself</a> and <a href="http://www.maths.ed.ac.uk/~s0677951/y1talk.pdf">the OHP slides</a> version are available (pdf).  Content covered: hyperelliptic curves, points, divisors, mumford polynomials and the Picard group/Jacobian; the discrete logarithm problem; explicit group law computation; characteristic polynomial of Frobenius and Weil theorems/interval; group-theoretic approaches; Schoof&#8217;s algorithm, SEA in genus 1,  genus 2 hybrid algorithms.</p>
]]></content:encoded>
			<wfw:commentRss>http://maths.straylight.co.uk/archives/88/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mathematical tourism</title>
		<link>http://maths.straylight.co.uk/archives/82</link>
		<comments>http://maths.straylight.co.uk/archives/82#comments</comments>
		<pubDate>Mon, 23 Apr 2007 21:43:59 +0000</pubDate>
		<dc:creator>Graeme</dc:creator>
				<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Ring Theory]]></category>

		<guid isPermaLink="false">http://maths.straylight.co.uk/?p=82</guid>
		<description><![CDATA[In search of the quarternions.]]></description>
			<content:encoded><![CDATA[<p><a href="http://gallery.straylight.co.uk/dublin/dub23"><img src="http://gallery.straylight.co.uk/albums/dublin/dub23.sized.jpg"/><br /><em>The plaque marking the discovery of the quarternions, Dublin.</em></a></p>
<p>I&#8217;ve spent the last three days in Dublin, and whilst there I couldn&#8217;t resist taking a rare opportunity for mathematical tourism. Hamilton figured out the structure of the quarternions in &#8220;a flash of genius&#8221; during a morning walk along Dublin&#8217;s royal canal, carving them into the nearby Brougham bridge. Whilst the carving does not survive, there is a plaque at the spot to mark this discovery, and it was that I set off to see.</p>
<p>Getting there doesn&#8217;t seem too difficult, though: I got the 120 bus from Parnell Street (conveniently close to my hotel on Parnell Square) to Broombridge road. This is the opposite of advice found elsewhere online, but the suggested 20 route doesn&#8217;t seem to exist any more. If you have a map, it&#8217;s easy enough to follow the bus route, but as I didn&#8217;t I just asked the driver to give me a shout when we got there. Brougham is pronounced <em>broom</em>, so all you need to do is to find where Broombridge road crosses the canal and (it turns out) railway tracks: presumably taking the western suburban line would be an even easier way to get there, as the platform is next to the bridge. Of course, I went the wrong way along Broombridge road, which is easily detected by reaching the end without finding a bridge!</p>
<p>It&#8217;s been described as &#8220;the least visited tourist attraction in Dublin&#8221;, partly because the area isn&#8217;t particularly appealing today  but presumably because there aren&#8217;t that many mathematical tourists! </p>
<p>It does seem a shame that the site &#8211; and Hamilton &#8211;  are so overlooked compared to the attention that, say,  local authors or artists get. But it&#8217;s better than nothing, as mathematical tourist attractions are few and far between, especially outside of universities. The bridges of KÃ¶nigsberg are often suggested; I&#8217;d also be fascinated to tour Japan in search of <a href="http://www.everything2.com/?node=sangaku">sangaku</a>.  If you have other ideas, why not mention them in the comments?</p>
]]></content:encoded>
			<wfw:commentRss>http://maths.straylight.co.uk/archives/82/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A less very, very stupid way of counting points on elliptic curves</title>
		<link>http://maths.straylight.co.uk/archives/67</link>
		<comments>http://maths.straylight.co.uk/archives/67#comments</comments>
		<pubDate>Fri, 09 Feb 2007 11:40:21 +0000</pubDate>
		<dc:creator>Graeme</dc:creator>
				<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Algebraic Geometry]]></category>
		<category><![CDATA[Maple]]></category>
		<category><![CDATA[Number Theory]]></category>
		<category><![CDATA[PhD]]></category>
		<category><![CDATA[SAGE]]></category>

		<guid isPermaLink="false">http://maths.straylight.co.uk/?p=67</guid>
		<description><![CDATA[Sidestepping brute-force determination of the number of points over a finite field by construction of zeta functions.]]></description>
			<content:encoded><![CDATA[<p>Ask SAGE for the cardinality (that is, number of points) of an elliptic curve over a finite field and, unless you happen to have a prime field, it&#8217;ll warn you that it&#8217;s resorting to the &#8220;very, very stupid&#8221; algorithm of testing every point. Can we do better?</p>
<h3>Background: The Zeta function</h3>
<p>Recall that the <i>zeta function</i> of a curve encodes information about the number of points over an infinite family of fields. For a curve C over the field <b>F</b><sub>q</sub> This is defined as
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?Z(T)=\exp\left(\displaystyle\sum_{r=1}^{\infty} \sharp C(\mathbb{F}_{q^r})\frac{T^r}{r}\right)\,\, \in\, \mathbb{Q}[[T]]"/></p>
<p>Thus, we can recover the cardinality over <b>F</b><sub>q<sup>r</sup></sub> by differentiating <i>r</i> times with respect to <i>T</i>, evaluating for <i>T=0</i> and dividing through by <i>(r-1)!</i>. This is all well and good, provided that computing the zeta function is less work than simply testing points in the field directly. For this, we need a couple of results:</p>
<blockquote><p><strong>Weil Conjectures for curve C over F<sub>q</sub></strong><br />
We have
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?Z(T)=\displaystyle\frac{P(T)}{(1-T)(1-qT)}"/></p>
<p>such that</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?P(T)=\displaystyle\prod_{i=1}^{2g}(1-\alpha_i T) \in \mathbb{Z}[T]"/></p>
<p>with the &alpha;<sub>i</sub> algebraic integers such that |&alpha;<sub>i</sub>|=q<sup>1/2</sup>. </p>
</blockquote>
<p>For such &alpha;<sub>i</sub> we then have</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?\sharp C(\mathbb{F}_{q^r})=q^r+1-\displaystyle\sum_{i=1}^{2g}{\alpha_i}^r"/></p>
<p>For <strong>F</strong><sub>q</sub> to be a field, <i>q=p<sup>r</sup></i> for some prime <i>p</i>. Thus we need only compute the zeta function over <strong>F</strong><sub>p</sub> to be able to retrieve <i>#C(<strong>F</strong><sub>q</sub>)</i> or indeed any higher <i>#C(<strong>F</strong><sub>q<sup>r</sup></sub>)</i>. The question is, therefore, whether computing the zeta function for <strong>F</strong><sub>p</sub>  is any easier than the naive point search. With Weil&#8217;s result, we can see that knowledge of <i>#C(<strong>F</strong><sub>p</sub>)</i>,&#8230;,<i>#C(<strong>F</strong><sub>p<sup>2g</sup></sub>)</i> would, via some Taylor series trickery, be enough to determine <i>P(T)</i> and hence <i>Z(T)</i>. If <i>q</i> is a high power of <i>p</i>, or we are interested in high powers of <i>q</i>, then this is already progress. But if q was itself a (potentially very large) prime, this approach would be useless for finding <i>#C(<strong>F</strong><sub>q</sub>)</i> since it would require knowledge of <i>#C(<strong>F</strong><sub>q</sub>)</i> (!) and at least <i>#C(<strong>F</strong><sub>q<sup>2</sup></sub>)</i> too! Fortunately SAGE does not complain about searching over prime fields- there are a couple of algorithms &#8211; so we can restrict our attention to the original problem, that of composite <i>q</i>.</p>
<h3>Elliptic Curves</h3>
<p>Let us consider then the problem of finding <i>#E(<strong>F</strong><sub>q<sup>r</sup></sub>)</i> where <i>q=p<sup>s</sup></i> for a prime <i>p</i> with <i>rs&ge;2</i> and <i>E</i> an Elliptic curve with coefficients from <strong>F</strong><sub>p</sub>. Then by the above we need only find <i>#E(<strong>F</strong><sub>p</sub>)</i> and <i>#E(<strong>F</strong><sub>p<sup>2</sup></sub>)</i>, which by brute force is rarely more work than finding <i>#E(<strong>F</strong><sub>q<sup>r</sup></sub>)</i>=<i>#E(<strong>F</strong><sub>p<sup>rs</sup></sub>)</i>. But, since the genus is 1 the various results allow us to cut down our workload still further:</p>
<blockquote><p><strong>Weil Conjectures for Elliptic curve E over F<sub>p</sub></strong></p>
<p>We have</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?Z(T)=\displaystyle\frac{P(T)}{(1-T)(1-pT)}"/></p>
<p>such that</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?P(T)=(1-\alpha_1 T)(1-\alpha_2 T) \in \mathbb{Z}[T]"/></p>
<p>with the &alpha;<sub>i</sub> algebraic integers such that |&alpha;<sub>i</sub>|=p<sup>1/2</sup>. </p>
</blockquote>
<p>For such &alpha;<sub>i</sub> we then have</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?\sharp E(\mathbb{F}_{p^r})=p^r+1-({\alpha_1}^r+{\alpha_2}^r)"/></p>
<p>It follows that &alpha;<sub>1</sub>, &alpha;<sub>2</sub> are conjugates, so over <strong>F</strong><sub>p</sub> we have</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?Z(T)=\displaystyle\frac{(1-\alpha_p T)(1-\overline{\alpha_p} T)}{(1-T)(1-pT)}= \displaystyle\frac{1-(\alpha_p+\overline{\alpha_p})T+pT^2}{(1-T)(1-pT)}"/></p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?\sharp E(\mathbb{F}_{p})=p+1-({\alpha_p}+\overline{\alpha_2})"/></p>
<p>and
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?|\alpha_p|=\sqrt{p}"/></p>
<p>So, </p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?\mu:=\alpha_p+\overline{\alpha_p}=p+1- \sharp E(\mathbb{F}_{p})"/></p>
<p>meaning that the zeta function can be constructed from just <i>#E(<strong>F</strong><sub>p</sub>)</i> as it is simply:</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?Z(T)=\displaystyle\frac{(1-\alpha_p T)(1-\overline{\alpha_p} T)}{(1-T)(1-pT)}= \displaystyle\frac{1-\mu T+pT^2}{(1-T)(1-pT)}"/></p>
<p>This then allows us to recover <i>#E(<strong>F</strong><sub>q<sup>r</sup></sub>)</i>=<i>#E(<strong>F</strong><sub>p<sup>rs</sup></sub>)</i> as desired, by repeated differentiation to recover the <i>rs</i>&#8216;th coefficient.</p>
<h4>Comparison</h4>
<p>For an elliptic curve over a finite field,  using SAGE to calculate the cardinality over a field of <i>p<sup>r</sup></i> elements by the &#8220;very, very stupid&#8221; algorithm rapidly gets impractical. For instance, for a given elliptic curve <i>y<sup>2</sup>=x<sup>3</sup>+Ax+b</i> with <i>A,B</i> from <strong>F</strong><sub>5</sub> determining the cardinality takes about 0.04s over <strong>F</strong><sub>5</sub>; about a second over <strong>F</strong><sub>25</sub>, around 3.7s for <strong>F</strong><sub>125</sub> and a tedious 19s over <strong>F</strong><sub>625</sub>. Implementing the approach above, asking for the cardinality of three such curves over <strong>F</strong><sub>625</sub> is rapid enough in Maple to not register on its timer. This is despite my program lazily using brute force for the #E(<strong>F</strong><sub>5</sub>) calculations! (The same machine, with a 2.6ghz celeron processor, was used for each run; with Maple on Windows XP and SAGE in Xubuntu Linux; SAGE timings were for CPU rather than wall time.) </p>
<h4>Smarter Still</h4>
<p>In fact, if we only wish to determine a single <i>#E(<strong>F</strong><sub>q<sup>r</sup></sub>)</i> we can sidestep the construction of the zeta function by working with the &alpha;<sub>p</sub>, since </p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?\sharp E(\mathbb{F}_{q^r}) = \sharp E(\mathbb{F}_{p^{rs}})=p^{rs}+1-({\alpha_p}^{rs}+\overline{\alpha_p}^{rs})"/></p>
<p>Thus if <i>&alpha;<sub>p</sub>=a+bi</i> then </p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?a=\frac{1}{2}(\alpha_p+\overline{\alpha_p})=\frac{\mu}{2}"/></p>
<p>and</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?a^2+b^2=p"/></p>
<p>So</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?\alpha_p=\frac{\mu}{2}+ i\sqrt{p-\mu^2/4}"/></p>
<p>will suffice, and again this requires only knowledge of <i>#E(<strong>F</strong><sub>p</sub>)</i>.</p>
<h4>Maple Source</h4>
<p>The file <a href="http://www.maths.ed.ac.uk/~s0677951/ellCount.mpl">ellCount</a> contains Maple procedures for finding the cardinality of elliptic curves over finite fields (with coefficients from the prime subfield). Simply put, <tt>CountPoints(F,q)</tt> will find the number of points over the field of <i>q</i> elements for an Elliptic curve <i>F=0</i>. For instance, <tt>CountPoints(y^2-x^3-x-2,625)</tt> gives the cardinality of <i>E: y<sup>2</sup>=x<sup>3</sup>+x+2</i> over <strong>F</strong><sub>5<sup>4</sup></sub> (should be 640). The route taken is to find points over <strong>F</strong><sub>5</sub>, determine <i>&alpha;</i> then directly calculate from the formula in the previous section. You can retrieve the zeta function with <tt>ellZeta(F,q)</tt>, or <tt>ellZetap(F,p)</tt>, if you know that <i>q</i> is prime (which saves Maple trying to determine the prime factor). Thus the number of points over <strong>F</strong><sub>q<sup>r</sup></sub> can be retrieved with <tt>getZetaCoeffr(Z,r)</tt> which performs the appropriate differentiation and scaling; this is useful to avoid having to calculate the number of solutions over the prime field, or indeed determine the prime, every time. <tt>ZetaCountPoints(F,q)</tt> behaves as <tt>CountPoints</tt> except it follows this alternative route.</p>
]]></content:encoded>
			<wfw:commentRss>http://maths.straylight.co.uk/archives/67/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Small defect types in Maple</title>
		<link>http://maths.straylight.co.uk/archives/66</link>
		<comments>http://maths.straylight.co.uk/archives/66#comments</comments>
		<pubDate>Thu, 25 Jan 2007 11:39:51 +0000</pubDate>
		<dc:creator>Graeme</dc:creator>
				<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Algebraic Geometry]]></category>
		<category><![CDATA[Maple]]></category>
		<category><![CDATA[Number Theory]]></category>
		<category><![CDATA[PhD]]></category>

		<guid isPermaLink="false">http://maths.straylight.co.uk/archives/66</guid>
		<description><![CDATA[Maple procedures for finding polynomials of a given trace and degree; hence for establishing the possible types of zeta function for small defect.]]></description>
			<content:encoded><![CDATA[<p>The procedure I described in my previous post for computing types of zeta functions is informative the first time you try it and tedious thereafter; thus I&#8217;ve cobbled together <a href="http://www.maths.ed.ac.uk/~s0677951/defectTable.mpl">some maple code</a> to do the job for some simple cases. </p>
<p>A call to <tt>totalTrace(d,t)</tt> will scurry off and determine all degree <i>d</i> polynomials of trace <i>t</i>, provided neither your chosen trace or degree are too high (data tables only exist up to a certain point, and I wasn&#8217;t patient enough to implement much of what is known, either!). If you&#8217;re confident that the trace is sufficiently small to guarantee a building block from the set of exceptional polynomials <i>S</i>, you can use the fractionally faster <tt>totalTraceS(d,t)</tt> instead- it&#8217;ll tell you if you&#8217;re wrong!</p>
<p>Calling <tt>smallDefectPol(g)</tt> will, for a genus g, display the possible polynomials Q (whose roots are the &beta;<sub>i</sub>) corresponding to small defect curves (where small means at most 0.780022g, using the exceptional set S). You can get the types (of the form used e.g. by Serre) instead by calling <tt>smallDefectTypes(g)</tt>. </p>
<p>Some defects that don&#8217;t meet the bound for small can nonetheless be computed with <tt>totalTrace(d,t)</tt>, use its output as the argument for <tt>zetaTypes(X)</tt> to recover their corresponding types. This will become more useful if I add additional cases from the data tables. </p>
]]></content:encoded>
			<wfw:commentRss>http://maths.straylight.co.uk/archives/66/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Torsion subgroup of an Elliptic Curve</title>
		<link>http://maths.straylight.co.uk/archives/57</link>
		<comments>http://maths.straylight.co.uk/archives/57#comments</comments>
		<pubDate>Wed, 15 Nov 2006 20:49:25 +0000</pubDate>
		<dc:creator>Graeme</dc:creator>
				<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Algebraic Geometry]]></category>
		<category><![CDATA[Maple]]></category>
		<category><![CDATA[Number Theory]]></category>
		<category><![CDATA[PhD]]></category>

		<guid isPermaLink="false">http://maths.straylight.co.uk/archives/57</guid>
		<description><![CDATA[Yet more Maple code, this time for finding/classifying torsion points of an elliptic curve.]]></description>
			<content:encoded><![CDATA[<p>One of the central results in the study of Elliptic curves is the Mordell-Weil theorem, which asserts that the group E(K) is finitely generated. Thus it consists of a finite part- the torsion subgroup &#8211; and a free abelian part, the rank of which is notoriously difficult to compute. However, the torsion subgroup is relatively accessible, and this is something I&#8217;ve been playing with for a while. It covers a range of techniques and ideas and attempting a concrete implementation in <i>Maple</i> has helped considerably in my understanding of those, even if it is effectively reinventing the wheel given the existence of John Cremona&#8217;s <i><a href="http://www.maths.nott.ac.uk/personal/jec/book/fulltext/index.html">Algorithms for elliptic curves</a></i>. The procedures themselves and worked examples are after the cut; first, some theory. </p>
<h3>Mazur&#8217;s Theorem</h3>
<blockquote><p>Let E/<b>Q</b> be an elliptic curve. Then the torsion subgroup E<sub>tors</sub>(<b>Q</b>) is one of the following fifteen groups:</p>
<p><b>Z</b>/n<b>Z</b> for 1&le;n&le;10 or n=12;<br />
<br /><b>Z</b>/2<b>Z</b> X <b>Z</b>/2n<b>Z</b> 1&le;n&le;4.</p>
<p>Further, each of these groups does occur as an E<sub>tors</sub>(<b>Q</b>).
</p></blockquote>
<p>This result is particularly handy as it allows for an experimental approach to be taken, gathering enough computational evidence to determine which form the torsion subgroup takes; knowledge of the order of points being especially useful. For instance, the presence of an order 7 element instantly shows that E<sub>tors</sub>(<b>Q</b>) is <b>Z</b>/7<b>Z</b>. Better still, there are results which aid in finding such points:</p>
<h3>Nagell-Lutz Theorem</h3>
<blockquote><p>Let E/<b>Q</b> be an elliptic curve of the form
<p align="center"><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?E: y^2=x^3+ax^2+bx+c" alt="Curve with no xy, y terms" /></p>
<p> (that is, with the usual labelling of coefficients, a_1=a_3=0) with a,b,c integers. If P an element of E(<b>Q</b>) has finite order then x(P), y(P) are also integers.<br />
<br />Further, For such a point either y(P)=0 or y(P) divides
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?\Delta_0:=27c^2+4a^3c+4b^3-a^2b^2-18abc" alt="discriminant/16"/></p>
</blockquote>
<p>Hence for such curves it is sufficient to look for integer points; and only finitely many such points are suitable candidates for being torsion points. </p>
<h3>Good and Bad Reduction</h3>
<p>What of Elliptic curves not in the above form? It is possible to bound the number of torsion elements (and generate candidates) by working over finite fields (which I&#8217;ve coincidentally considered before). Save for finitely many primes of bad reduction &#8211; those which divide the discriminant of the elliptic curve &#8211; it transpires that the torsion subgroup maps injectively to E(<strong>F</strong><sub>p</sub>). For small primes, this is readily found without anything more sophisticated than brute force. Testing a number of primes can give an upper bound whilst naive searches for integer points can provide a lower bound: appealing again to Mazur&#8217;s theorem then usually settles the question.</p>
<p><span id="more-57"></span></p>
<h3>Procedures</h3>
<p>I&#8217;ve bundled together various Maple procedures based on these ideas as <a href="http://www.maths.ed.ac.uk/~s0677951/torsion_tools.mpl">torsion_tools.mpl</a>; they require <a href="http://www.maths.ed.ac.uk/~s0677951/gla.mpl">gla.mpl</a>. Various number theory subprocedures are included to make it all work (the <tt>numtheory</tt> package is invoked as well), but the following procedures should be the only ones you&#8217;re likely to need to work with directly.</p>
<h4><tt>ellorder(<i>point</i>)</tt></h4>
<p><tt>gla.mpl</tt> comes with a procedure, <tt>modgetorder</tt> for calculating the order of a point when working modulo a prime; <tt>ellorder</tt> should now always be used instead. When working on <tt>gla</tt>, I&#8217;d been aware of the possibility of torsion points in non-finite fields, but didn&#8217;t know of any good way to ensure that a point was genuinely of infinite rather than very large order. However, due to the Nagell-Lutz result this is now easy: if any multiple of the point is non-integral, it cannot be a torsion point (since the multiple of a torsion point is a torsion point, and they have integral co-ordinates). Better still, Mazur&#8217;s theorem ensures that the maximum order of a torsion point is 12, so simply testing multiples will be fast. Thus <tt>ellorder</tt> performs repeated addition until either the group identity or a non-integral point is found, and (along with a test for the group identity as input) is therefore suitable regardless of whether you are working in a finite field. I&#8217;m keeping <tt>modgetorder</tt> around so that my earlier examples still work, hence <tt>ellorder</tt> lazily calls that when <tt>workModM</tt> is <tt>true</tt>.</p>
<h4><tt>torsion()</tt></h4>
<p>If <tt>workModM</tt> is set to <tt>true</tt>, then this simply tests all possible <i>(x,y)</i> pairs for membership of the curve. Any that are found are returned along with their order.</p>
<p>If a_1 and a_3 are both zero, then the Nagell-Lutz result holds and the algorithm given in Cremona&#8217;s book is implemented, with each point with positive <i>y</i> co-ordinate given, along with its order. From this it is usually obvious (by Mazur&#8217;s theorem) which group they come from; playing around with <tt>ncopies</tt> usually confirms this, or can be employed to give an explicit list of all points and the relationship between them.</p>
<p>Otherwise, alternative methods using reduction need to be employed, the use of which is described below.</p>
<h4><tt>testRange(<i>x1,x2,y1,y2</i>)</tt></h4>
<p>This provides a brute-force test of points <i>(x,y)</i> such that x1&le;x&le;x2 and y1&le;y&le;y2 for membership of the curve, paying attention to <tt>workModM</tt>. Whenever a point is found, it is displayed along with its order.</p>
<p>The variant <tt>testRangeQuiet</tt> takes the same arguments and performs a similar task, but instead returns a count of the number of points found and suppresses the points themselves. This is useful for comparing the upper bounds of several good reductions, which is precisely what the next procedure does.</p>
<h4><tt>boundTorsion(<i>n</i>)</tt></h4>
<p>This is actually just a wrapper for <tt>boundForOrder</tt>, feeding it the primes of bad reduction; <i>n</i> primes of good reduction are then used to place upper bounds on the size of the torsion subgroup; the least upper bound is found and displayed, along with the points found when working modulo that prime, which may give assist in identifying genuine torsion points.</p>
<p>I&#8217;m unsure as to whether 2 should always be rejected as a prime of bad reduction; if you wish to exclude it, call <tt>boundTorsion2</tt> instead.</p>
<h3>Examples</h3>
<p>Exercise 8.12 of Silverman&#8217;s <i>Arithmetic of Elliptic Curves</i> supposedly gives examples of each possible type of torsion group; we can attempt to verify these using <tt>torsion_tools</tt>. (Start a maple worksheet and enter <tt>read "torsion_tools.mpl"</tt> to load them; this requires that both <tt>torsion_tools.mpl</tt> and <tt>gla.mpl</tt> be somewhere <i>Maple</i> can find them, typically your home directory.)</p>
<h4>a) y<sup>2</sup>=x<sup>3</sup>-2</h4>
<blockquote><p><tt>&gt;a_1:=0;a_3:=0;a_2:=0;a_4:=0;a_6:=-2;<br />torsion();</p>
<p>Nagell-Lutz search for non-identity torsion points, with order, yields:<br />
<br />x, y, order</tt></p></blockquote>
<p>Nagell-Lutz theorem applies, but no points other than the identity are found. Thus we have <b>Z</b>/1<b>Z</b> i.e., the trivial group {0}.</p>
<h4>b) y<sup>2</sup>=x<sup>3</sup>+8</h4>
<blockquote><p><tt>&gt;a_1:=0;a_3:=0;a_2:=0;a_4:=0;a_6:=8;<br />torsion();</p>
<p>Nagell-Lutz search for non-identity torsion points, with order, yields:<br />
<br />x, y, order<br />
<br />-2, 0, 2<br />
</tt></p></blockquote>
<p>We have one other point, of order 2; so the torsion subgroup is <b>Z</b>/2<b>Z</b>, consisting of the identity and (-2,0).</p>
<h4>c) y<sup>2</sup>=x<sup>3</sup>+4</h4>
<blockquote><p><tt>&gt;a_1:=0;a_3:=0;a_2:=0;a_4:=0;a_6:=4;<br />torsion();</p>
<p>Nagell-Lutz search for non-identity torsion points, with order, yields:<br />
<br />x, y, order<br />
<br />0, 2, 3<br />
</tt></p></blockquote>
<p>We have a point (0,2) of order 3; so the torsion subgroup is clearly <b>Z</b>/3<b>Z</b>. We can explicity find all the elements of the group:</p>
<blockquote><p><tt>&gt;> ncopies(1,0,2);<br />
<br />0, 2<br />
<br />&gt; ncopies(2,0,2);<br />
<br />0, -2<br />
<br />&gt; ncopies(3,0,2);<br />
<br />zero</tt>
</p></blockquote>
<p>So they are the identity, P=(0,2) and 2P=(0,-2).</p>
<h4>d) y<sup>2</sup>=x<sup>3</sup>+4x</h4>
<blockquote><p><tt>&gt;a_1:=0;a_3:=0;a_2:=0;a_4:=4;a_6:=0;<br />torsion();</p>
<p>Nagell-Lutz search for non-identity torsion points, with order, yields:<br />
<br />x, y, order<br />
<br />0, 0, 2<br />
<br />2, 4, 4<br />
</tt></p></blockquote>
<p>Now things get slightly more interesting. We have an element P=(2,4) of order 4, so we have a subgroup of size 4 consisting of the multiples of P. Does this include the other point found, (0,0)?</p>
<blockquote><p><tt>&gt; ncopies(1,2,4);<br />
<br />2, 4<br />
<br />&gt; ncopies(2,2,4);<br />
<br />0, 0<br />
<br />&gt; ncopies(3,2,4);</p>
<p>2, -4<br />
<br />&gt; ncopies(4,2,4);<br />
<br />zero</tt></p></blockquote>
<p>Since it does, we can safely conclude that the torsion subgroup is <b>Z</b>/4<b>Z</b>.</p>
<h4>e) y<sup>2</sup>-y=x<sup>3</sup>-x<sup>2</sup></h4>
<blockquote><p><tt>&gt;a_1:=0;a_3:=-1;a_2:=-1;a_4:=0;a_6:=0;<br />torsion();<br />Error, expected a_1=a_3=0<br />
<br />Try working with reduced curve modulo a prime not from the set {11}<br />
<br />To test l such primes call boundTorsion(l)<br />
</tt></p></blockquote>
<p>We are no longer in the convenient situation of being able to apply the Nagell-Lutz result. Thus we try to place a bound on the torsion:</p>
<blockquote><p><tt>&gt; boundTorsion(10);<br />
<br />At most 5 points, example: working mod 5, brute force search for points on curve with order yields<br />
<br />0, 0, 5<br />
<br />0, 1, 5<br />
<br />1, 0, 5<br />
<br />1, 1, 5<br />
<br />4 points, plus point at infinity for a total of 5 points.<br />
</tt></p></blockquote>
<p>The torsion group can have no more than five elements, but it may of course have less. If, however, we can verify the existence of a point of order 5 (not working modulo a prime) then we are clearly done (note that after its calculations for various moduli, <tt>boundTorsion</tt> resets <tt>workModM</tt> to <tt>false</tt>.</p>
<blockquote><p><tt>&gt; ncopies(5,0,0);<br />zero</tt></p></blockquote>
<p>So, as suspected, the group is <b>Z</b>/5<b>Z</b> with (0,0) a generator.</p>
<h4>f) y<sup>2</sup>=x<sup>3</sup>+1</h4>
<blockquote><p><tt>&gt;a_1:=0;a_3:=0;a_2:=0;a_4:=0;a_6:=1;<br />torsion();<br />Nagell-Lutz search for non-identity torsion points, with order, yields:<br />
<br />x, y, order<br />
<br />-1, 0, 2<br />
<br />0, 1, 3<br />
<br />2, 3, 6<br />
</tt></p></blockquote>
<p>Another easy one; using <tt>ncopies</tt> it is readily verified that P=(2,3) is a generator for the other elements found, so the group is <b>Z</b>/6<b>Z</b>.</p>
<h4>g) y<sup>2</sup>+y=x<sup>3</sup>-x+137</h4>
<p>This one seems to be broken, given the structure of the exercise it should yield <b>Z</b>/7<b>Z</b>. However:</p>
<blockquote><p><tt>&gt;a_1:=0;a_3:=1;a_2:=0;a_4:=-1;a_6:=167; <br />&gt; torsion(); <br />Error, expected a_1=a_3=0<br />
<br />Try working with reduced curve modulo a prime not from the set {11, 659, 1667}<br />
<br />To test l such primes call boundTorsion(l)</p>
<p>&gt; boundTorsion(10);<br />
<br />At most 1 points, example: working mod 2, brute force search for points on curve with order yields<br />
<br />0 points, plus point at infinity for a total of 1 points.</tt></p></blockquote>
<p>Or, excluding the prime 2,</p>
<blockquote><p><tt>&gt; boundTorsion(2); <br />At most 4 points, example: working mod 3, brute force search for points on curve with order yields<br />
<br />0, 1, 2<br />
<br />1, 1, 2<br />
<br />2, 1, 2<br />
<br />3 points, plus point at infinity for a total of 4 points.</tt></p></blockquote>
<p>So in neither case can there be an element of order 7.</p>
<h4>h) y<sup>2</sup> + 7xy =x<sup>3</sup>+16x</h4>
<blockquote><p><tt>&gt;a_1:=7;a_3:=0;a_2:=0;a_4:=16;a_6:=0; <br />&gt; torsion(); <br />Error, expected a_1=a_3=0<br />
<br />Try working with reduced curve modulo a prime not from the set {2, 3, 17}<br />
<br />To test l such primes call boundTorsion(l)<br />
<br />&gt; boundTorsion(10);<br />
<br />At most 8 points, example: working mod 7, brute force search for points on curve with order yields<br />
<br />0, 0, 2</p>
<p>4, 3, 4<br />
<br />4, 4, 4<br />
<br />5, 3, 8<br />
<br />5, 4, 8<br />
<br />6, 2, 8<br />
<br />6, 5, 8<br />
<br />7 points, plus point at infinity for a total of 8 points.<br />
</tt></p></blockquote>
<p>By Mazur&#8217;s Theorem, a torsion group with 8 elements (assuming there is no better bound) could be <b>Z</b>/8<b>Z</b>, or <b>Z</b>/2<b>Z</b> X <b>Z</b>/4<b>Z</b>. Thus we need to test for the existence of an order 8 element; the points found above being possibilities. However, <tt>ncopies</tt> confirms they are not suitable, so we try a brute-force search:</p>
<blockquote><p><tt>&gt; testRange(-20,20,-20,20);<br />
<br />-8, 16, 8<br />
<br />-2, 4, 8<br />
<br />-2, 10, 8<br />
<br />0, 0, 2<br />
<br />4, 4, 4<br />
<br />5<br />
</tt></p></blockquote>
<p>So, for instance, P=(-2,10) &#8211; corresponding to (5,3) mod 7 &#8211; is of order 8, so we have <b>Z</b>/8<b>Z</b>.</p>
<h4>i) y<sup>2</sup>+xy+y=x<sup>3</sup>-x<sup>2</sup>-14x+29</h4>
<blockquote><p><tt>&gt;a_1:=1;a_3:=1;a_2:=-1;a_4:=-14;a_6:=29; <br />&gt; torsion(); <br />Error, expected a_1=a_3=0<br />
<br />Try working with reduced curve modulo a prime not from the set {2, 3}<br />
<br />To test l such primes call boundTorsion(l)<br />
<br />&gt; boundTorsion(10);<br />
<br />At most 9 points, example: working mod 11, brute force search for points on curve with order yields<br />
<br />1, 3, 3<br />
<br />1, 6, 3<br />
<br />3, 1, 9<br />
<br />3, 6, 9<br />
<br />8, 6, 9<br />
<br />8, 7, 9<br />
<br />9, 4, 9<br />
<br />9, 8, 9</p>
<p>8 points, plus point at infinity for a total of 9 points.</tt></p></blockquote>
<p>We suspect <b>Z</b>/9<b>Z</b>, and indeed <tt>ncopies(9,3,1)</tt> gives <tt>zero</tt>, so the suspicion is correct.</p>
<h4>j) y<sup>2</sup>+xy=x<sup>3</sup>-45x+81</h4>
<blockquote><p><tt>&gt;a_1:=1;a_3:=0;a_2:=0;a_4:=-45;a_6:=81; <br />&gt; torsion(); <br />Error, expected a_1=a_3=0<br />
<br />Try working with reduced curve modulo a prime not from the set {2, 3, 11}<br />
<br />To test l such primes call boundTorsion(l)<br />
<br />&gt; boundTorsion(10);<br />
<br />At most 10 points, example: working mod 13, brute force search for points on curve with order yields<br />
<br />0, 4, 10<br />
<br />0, 9, 10<br />
<br />2, 12, 2<br />
<br />5, 10, 5<br />
<br />5, 11, 5<br />
<br />6, 3, 5<br />
<br />6, 4, 5<br />
<br />7, 2, 10</p>
<p>7, 4, 10<br />
<br />9 points, plus point at infinity for a total of 10 points.<br />
</tt></p></blockquote>
<p>(0,4) fails, but (0,9) turns out to genuinely be of order 10 (using <tt>ellorder</tt>, for a change!). So this gives rise to a torsion group of <b>Z</b>/10<b>Z</b>.</p>
<h4>k) y<sup>2</sup>+43xy-210y=x<sup>3</sup>-210x<sup>2</sup></h4>
<blockquote><p><tt>&gt;a_1:=43;a_3:=-210;a_2:=-210;a_4:=0;a_6:=0; <br />&gt; torsion(); <br />Error, expected a_1=a_3=0<br />
<br />Try working with reduced curve modulo a prime not from the set {2, 3, 5, 7, 13}<br />
<br />To test l such primes call boundTorsion(l)<br />
<br />&gt; boundTorsion(10);<br />
<br />At most 12 points, example: working mod 17, brute force search for points on curve with order yields<br />
<br />0, 0, 12<br />
<br />0, 6, 12<br />
<br />6, 0, 6<br />
<br />6, 3, 6<br />
<br />9, 13, 4<br />
<br />9, 14, 4<br />
<br />11, 10, 12<br />
<br />11, 16, 12</p>
<p>13, 1, 3<br />
<br />13, 7, 3<br />
<br />14, 8, 2<br />
<br />11 points, plus point at infinity for a total of 12 points.</tt></p></blockquote>
<p>(0,0) is of order 12, so the torsion group is <b>Z</b>/12<b>Z</b>.</p>
<h4>l) y<sup>2</sup>=x<sup>3</sup>-4x</h4>
<blockquote><p><tt>&gt; a_1:=0;a_3:=0;a_2:=0;a_4:=-4;a_6:=0; <br />&gt; torsion(); <br />Nagell-Lutz search for non-identity torsion points, with order, yields:<br />
<br />x, y, order<br />
<br />-2, 0, 2<br />
<br />0, 0, 2<br />
<br />2, 0, 2<br />
</tt></p></blockquote>
<p>Since we were able to use Nagell-Lutz, this is all the points with positive y co-ordinate. Along with the identity, there are thus at least 4 points, but none of order 4. So by Mazur&#8217;s theorem we have <b>Z</b>/2<b>Z</b> X <b>Z</b>/2<b>Z</b>, so the points above must be related. We can confirm this:</p>
<blockquote><p><tt>&gt; P:=-2,0;<br />
<br />P := -2, 0<br />
<br />&gt; Q:=0,0;<br />
<br />Q := 0, 0<br />
<br />&gt; ella(P,Q);<br />
<br />2, 0<br />
</tt></p></blockquote>
<p>So we can think of the group as {0,P} X {0,Q}.</p>
<h4>m) y<sup>2</sup>+xy-5y = x<sup>3</sup> -5x<sup>2</sup></h4>
<p>Again, I&#8217;m unsure as to whether or not 2 should always be avoided as a prime of bad reduction since it is also misleading here, claiming no more than 4 elements. Using <tt>boundTorsion2</tt> (and then <tt>ellorder</tt>) we find P=(0,0) of order 4, and Q=(1,2) of order 2; Q is not 2P so they are independent, that is, there are 8 elements in contradiction to the result when reducing modulo 2. The torsion group therefore appears to be (in line with the structure of the exercise) {0,Q} X {0,P} = <b>Z</b>/2<b>Z</b> X <b>Z</b>/4<b>Z</b>.</p>
<h4>n) y<sup>2</sup>+5xy-6y=x<sup>3</sup>-3x<sup>2</sup></h4>
<blockquote><p><tt>&gt; a_1:=5;a_3:=-6;a_2:=-3;a_4:=0;a_6:=0; <br /> &gt; torsion(); <br /> Error, expected a_1=a_3=0<br />
<br />Try working with reduced curve modulo a prime not from the set {2, 3, 5}<br />
<br />To test l such primes call boundTorsion(l)<br />
<br /> &gt; boundTorsion(10);<br />
<br />At most 12 points, example: working mod 17, brute force search for points on curve with order yields<br />
<br />0, 0, 6<br />
<br />0, 6, 6<br />
<br />2, 15, 2<br />
<br />3, 0, 3</p>
<p>3, 8, 3<br />
<br />5, 16, 2<br />
<br />11, 1, 2<br />
<br />12, 1, 6<br />
<br />12, 13, 6<br />
<br />14, 1, 6<br />
<br />14, 3, 6<br />
<br />11 points, plus point at infinity for a total of 12 points.<br />
</tt></p></blockquote>
<p>P=(0,0) has order 6, whilst the suggestion of 12 points yet none of order 12 implies <b>Z</b>/2<b>Z</b> X <b>Z</b>/6<b>Z</b>. None of the potential order 2 points above have finite order when not working modulo 17; so we search by brute force:</p>
<blockquote><p><tt>&gt; testRange(-10,10,-10,10);<br />
<br />-3, 3, infinity<br />
<br />0, 0, 6<br />
<br />0, 6, 6<br />
<br />2, -2, 2<br />
<br />3, -9, 3<br />
<br />3, 0, 3<br />
<br />6<br />
</tt></p></blockquote>
<p>This turns up a point Q=(2,-2) of order 2; we must verify it is not generated by P:</p>
<blockquote><p><tt><br />
<br />&gt; ncopies(2,0,0);<br />
<br />3, -9<br />
<br />&gt; ncopies(3,0,0);</p>
<p>-6, 18<br />
<br />&gt; ncopies(4,0,0);<br />
<br />3, 0<br />
<br />&gt; ncopies(5,0,0);<br />
<br />0, 6<br />
</tt></p></blockquote>
<p>As this is not the case, we conclude that the group is {0,Q} X {0,P} = <b>Z</b>/2<b>Z</b> X <b>Z</b>/6<b>Z</b>.</p>
<h4>o) y<sup>2</sup>+17xy-120y = x<sup>3</sup>-60x<sup>2</sup></h4>
<blockquote><p><tt>&gt; a_1:=17;a_3:=-120;a_2:=-60;a_4:=0;a_6:=0; <br /> &gt; torsion(); <br /> Error, expected a_1=a_3=0<br />
<br />Try working with reduced curve modulo a prime not from the set {2, 3, 5, 7}<br />
<br />To test l such primes call boundTorsion(l)<br />
<br /> &gt; boundTorsion(10);</p>
<p>At most 16 points, example: working mod 19, brute force search for points on curve with order yields<br />
<br />0, 0, 8<br />
<br />0, 6, 8<br />
<br />3, 0, 4<br />
<br />3, 12, 4<br />
<br />5, 8, 2<br />
<br />7, 3, 4<br />
<br />7, 17, 4<br />
<br />8, 9, 8<br />
<br />8, 13, 8<br />
<br />11, 4, 8<br />
<br />11, 5, 8<br />
<br />12, 14, 8<br />
<br />12, 16, 8<br />
<br />17, 1, 2<br />
<br />18, 2, 2<br />
<br />15 points, plus point at infinity for a total of 16 points.</p>
<p></tt></p></blockquote>
<p>Again, P=(0,0) turns out to be a legitimate point of order 8; it generates 2P=(60,-900), 3P=(-30,180), 4P=(24,-144), 5P=(-30,450), 6P=(60,0), 7P=(0,120). None of the suggested points of order 2 work, so again we search, this time over much larger ranges (given the values for multiples of P)-</p>
<blockquote><p><tt><br />
&gt; testRange(-500,500,-500,500);<br />
<br />-40, 400, 2<br />
<br />-30, 180, 8<br />
<br />-30, 450, 8<br />
<br />-12, 36, 4<br />
<br />-12, 288, 4<br />
<br />0, 0, 8<br />
<br />0, 120, 8<br />
<br />24, -144, 2<br />
<br />30, -300, 8<br />
<br />30, -90, 8<br />
<br />60, 0, 4</p>
<p>11<br />
</tt></p></blockquote>
<p>Q=(-40,400) is of order 2 and not a multiple of P, so we have {0,Q} X {0,P} = <b>Z</b>/2<b>Z</b> X <b>Z</b>/8<b>Z</b> for the torsion subgroup.</p>
]]></content:encoded>
			<wfw:commentRss>http://maths.straylight.co.uk/archives/57/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementing the Group Law Algorithm in Maple- finite fields</title>
		<link>http://maths.straylight.co.uk/archives/56</link>
		<comments>http://maths.straylight.co.uk/archives/56#comments</comments>
		<pubDate>Sun, 29 Oct 2006 20:43:05 +0000</pubDate>
		<dc:creator>Graeme</dc:creator>
				<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Algebraic Geometry]]></category>
		<category><![CDATA[MA40188]]></category>
		<category><![CDATA[Maple]]></category>
		<category><![CDATA[Number Theory]]></category>
		<category><![CDATA[PhD]]></category>

		<guid isPermaLink="false">http://maths.straylight.co.uk/archives/56</guid>
		<description><![CDATA[Extension of Maple code to finite fields. ]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve added a couple of extra toys to <a href="http://www.maths.ed.ac.uk/~s0677951/gla.mpl">my Maple procedures</a> for elliptic curves. The major change is that it now supports calculation over some finite fields; that is, the integers modulo some prime. To activate this, set <tt>workModM</tt> to <tt>true</tt> and specify a modulus <em>M</em>. Then the usual commands <tt>ella</tt>, <tt>ellm</tt>, <tt>ncopies</tt> and <tt>mnadd</tt> will compute answers mod <em>M</em> instead.</p>
<p>This also makes it much more likely that you&#8217;ll be interested in the order of a point, so a procedure <tt>modgetorder</tt> is included to calculate this by brute force- that is, repeated addition until the <em>zero</em> element is reached.</p>
<p>This makes questions of the type I faced in <em>MA40188: Algebraic Curves</em> much easier. For instance, consider the curve
</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?E: y^2z-x^3+9xz^2-11z^3=0" alt="Curve in Weierstrass form"/></p>
<p>Over the field with 37 elements, and with a suitable dehomogenisation, the point <em>P: (x,y)=(0,23)</em> is easily verified as an element of <em>E</em>. Then we may easily determine the point <em>Q</em>=-2<em>P</em>, the third intersection of <em>E</em> with the tangent to <em>E</em> at <em>P</em>:</p>
<blockquote><p>
<tt>&gt;read "gla.mpl";<br />
<br />&gt; a_1:=0;a_2:=0;a_4:=-9;a_3:=0;a_6:=11;<br />
<br />&gt;workModM:=true;<br />
<br />&gt;<br />
<br />&gt;M:=37;<br />
<br />&gt;Q:=ncopies(-2,0,23);<br />
<br /> 1,22<br />
</tt></p></blockquote>
<p>So <em>Q</em>=(1,22). Further, <em>Q</em> is an inflexion point: that is, the tangent to <em>E</em> at <em>Q</em> meets <em>E</em> three times at <em>Q</em>. In terms of the group law, this means -2<em>Q</em>=<em>Q</em>, or equivalently 3<em>Q</em>=0. We can verify this in a couple of ways:</p>
<blockquote><p>
<tt>&gt; ncopies(3,Q);<br />
<br /> zero<br />
<br />&gt; modgetorder(Q);<br />
<br /> 3<br />
</tt></p></blockquote>
<p>Since <em>Q</em>=-2<em>P</em> and 3<em>Q</em>=0, it should follow that 6<em>P</em>=0. Which, fortunately, it does:</p>
<blockquote><p>
<tt>&gt; modgetorder(0,23);<br />
<br />6<br />
</tt></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://maths.straylight.co.uk/archives/56/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementing the Group Law Algorithm in Maple- Examples</title>
		<link>http://maths.straylight.co.uk/archives/55</link>
		<comments>http://maths.straylight.co.uk/archives/55#comments</comments>
		<pubDate>Thu, 19 Oct 2006 20:39:27 +0000</pubDate>
		<dc:creator>Graeme</dc:creator>
				<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Algebraic Geometry]]></category>
		<category><![CDATA[Maple]]></category>
		<category><![CDATA[Number Theory]]></category>
		<category><![CDATA[PhD]]></category>

		<guid isPermaLink="false">http://maths.straylight.co.uk/archives/55</guid>
		<description><![CDATA[Sample problems from Silverman on the Elliptic curve group law.]]></description>
			<content:encoded><![CDATA[<p>Here are some applications of the procedures developed in the previous post.</p>
<h4>Example 1</h4>
<p>We consider example 2.4/problem 3.4 from Silverman;  </p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?<br />
    E:y^2=x^3+17" alt="E:y^2=x^3+17"/></p>
<p>By inspection we can identify some integer points, such as <em>P<sub>1</sub>=(-2,3)</em> and <em>P<sub>3</sub>=(2,5)</em>. A brute force search for x in the range -1000 to 1000 generates the following results-</p>
<blockquote><p>
<tt>&gt; #naive point search;</p>
<p>&gt; for k from -1000 to 1000 do</p>
<p>&gt; if(type(simplify((k^3+17)^(1/2)),integer)) then print(k,simplify((k^3+17)^(1/2))); end;<br />
<br />&gt; end; </p>
<p>-2, 3<br />
<br />-1, 4<br />
<br />2, 5<br />
<br />4, 9<br />
<br />8, 23<br />
<br />43, 282<br />
<br />52, 375<br />
</tt>
</p></blockquote>
<p>Silverman tells us there is a further point, <em>P<sub>8</sub>=(5234,378661)</em>, plus we have missed all the inverses of our points (since only the positive square root was computed). Brute force on the range -6000 to 6000 of course uncovers <em>P<sub>8</sub></em>, but this computation takes 70.6 seconds, 10.24mb of memory and produces alarming sounds from my new office computer. Silverman observes that (due to a result of Nagell) the rational points are generated by integer combinations of <em>P<sub>1</sub>, P<sub>3</sub></em>, so we can proceed by testing some of these instead:</p>
<blockquote><p>
<tt>&gt; read "gla.mpl";<br />
<br />&gt; a_1:=0;a_3:=0;a_2:=0;a_4:=0;a_6:=17; #setting<br />
up the curve;</p>
<p>&gt;#smarter search<br />
<br />&gt; for i from -5 to 5 do<br />
<br />&gt; for j from -5 to 5 do<br />
<br />&gt; if(type(mnadd(i,j,-2,3,-1,4)[1],integer) and type(mnadd(i,j,-2,3,-1,4)[2],integer)) then print(i,j,mnadd(i,j,-2,3,-1,4));<br />
<br />&gt; end if;<br />
<br />&gt; end:<br />
<br />&gt; end:</p>
<p>-3, -2, 43, -282<br />
<br />-2, -3, 5234, -378661</p>
<p>-2, -1, 2, -5<br />
<br />-2, 0, 8, 23<br />
<br />-1, -1, 4, 9<br />
<br />-1, 0, -2, -3<br />
<br />-1, 1, 52, -375<br />
<br />0, -1, -1, -4<br />
<br />0, 1, -1, 4<br />
<br />1, -1, 52, 375<br />
<br />1, 0, -2, 3<br />
<br />1, 1, 4, -9<br />
<br />2, 0, 8, -23<br />
<br />2, 1, 2, 5<br />
<br />2, 3, 5234, 378661</p>
<p>3, 2, 43, 282<br />
</tt>
</p></blockquote>
<p>All sixteen points are recovered in 0.02 seconds, consuming merely 0.31mb of memory!</p>
<p>Of course, for this example I&#8217;m cheating somewhat because I know where I&#8217;d like to get to in that I know this list is complete; although a priori there&#8217;s no indication of how large the arguments <em>m,n</em> needed to be to generate points such as <em>P<sub>7</sub></em> or <em>P<sub>8</sub></em>. Nonetheless, this indicates that the procedures allow for more rapid exploration of points on the curve, even if they don&#8217;t prove anything (besides existence) by themselves.</p>
<h4>Example 2</h4>
<p>Maple&#8217;s own <tt>algcurves</tt> package can also be useful to tackle problems given in projective terms. For instance, we can rapidly demonstrate the first result claimed in Exercise 3.3b. Here we are concerned with the curve</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?<br />
    E:X^3+Y^3=AZ^3" alt="X^3+Y^3=AZ^3"/></p>
<p>which homogenizing away from Z=0 gives</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?<br />
    E:x^3+y^3=A" alt="x^3+y^3=A"/></p>
<p>However, this is not of Weierstrass form; but we can retrieve this from Maple:</p>
<blockquote><p><tt><br />
&gt; with(algcurves):<br />
<br />&gt; f:=x^3+y^3-A</p>
<p>&gt; Weierstrassform(f,x,y,x0,y0)<br />
</tt></p></blockquote>
<p>This yields</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?<br />
    [{x_0}^{3}+{y_0}^{2}+{\frac {27}{4}}\,{A}^{2}\,,-3\,{y}^{2}+3<br />
\,yx-3\,{x}^{2}\,,9\,{y}^{2}x-9\,y{x}^{2}+9\,{x}^{3}-9/2\,A" alt="Weierstass form"/><br />
<br />
<img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?1/6\,{\frac<br />
{-9\,A-2\,y0}{x0}},1/6\,{\frac {-9\,A+2\,y_0}{x_0<br />
}}]" alt="Weierstrass form"/></p>
<p>But this is not quite of the Weierstrass form as used in Silverman; we substitute <em>-x<sub>0</sub></em> for <em>x<sub>0</sub></em> to arrive at</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?E: y_0^2=x_0^3-\frac{27A^2}{4}=0" alt="Modified Weierstrass form"/><br />
<br />
<img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?x_0=3y^2-3yx+3x^2 ,\,\, y_0= 9y^2x-9yx^2+9x^3-\frac{9A}{2}" alt="Modified Weierstrass form"/><br />
<br />
<img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?x=\frac{9A+2y_0}{6x_0} ,\,\, y=\frac{9A-2y_0}{6x_0}" alt="Modified Weierstrass form"/></p>
<p>That is, we have that the curve coefficients <em>a<sub>i</sub></em> are all zero except <em>a<sub>6</sub>=27A<sup>2</sup>/4</em>; we also have an isomorphism &phi; between <em>E</em> and its Weierstrass form given coordinatewise. We can verify with the procedure <tt>j_invariant</tt> that these are indeed the same curve (it turns out to have j invariant zero, too). Moreover, we can show the desired result, that</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?P=[X,Y,Z]\in E \Rightarrow -P=[Y,X,Z]" alt="Exercise 3.3b"/>
</p>
<p>For this, let <em>P=(x_0,y_0)</em> a point on the curve in Weierstrass form. Then we compute <em>-P</em>:</p>
<blockquote><p>
<tt><br />
&gt; a_1:=0;a_3:=0;a_2:=0;a_4:=0,a_6=-27*A^2/4:<br />
<br />&gt; read "gla.mpl":<br />
<br />&gt; ellm(x_0,y_0);</p>
<p>x_0, -y_0<br />
</tt>
</p></blockquote>
<p>Then, identifying <em>P</em> with a projective point via the isomorphism, we find</p>
</p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?\phi^{-1}((x_0,y_0))=\phi^{-1}([x_0,y_0,1])=\left[\frac{9A+2y_0}{6x_0},\frac{9A-2y_0}{6x_0},1\right]:=[X,Y,Z]\in E" alt="Applying inverse to P"/></p>
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?\phi^{-1}(-P)=\phi^{-1}((x_0,-y_0))=\left[\frac{9A-2y_0}{6x_0},\frac{9A+2y_0}{6x_0},1\right]=[Y,X,Z]" alt="Applying inverse to -P"/></p>
<p>Which is the desired result.</p>
]]></content:encoded>
			<wfw:commentRss>http://maths.straylight.co.uk/archives/55/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementing the Group Law Algorithm in Maple- Code</title>
		<link>http://maths.straylight.co.uk/archives/54</link>
		<comments>http://maths.straylight.co.uk/archives/54#comments</comments>
		<pubDate>Thu, 19 Oct 2006 20:36:19 +0000</pubDate>
		<dc:creator>Graeme</dc:creator>
				<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Algebraic Geometry]]></category>
		<category><![CDATA[Maple]]></category>
		<category><![CDATA[PhD]]></category>

		<guid isPermaLink="false">http://maths.straylight.co.uk/archives/54</guid>
		<description><![CDATA[Maple procedures for group law computation on Elliptic curves.]]></description>
			<content:encoded><![CDATA[<p><strong>Update: These procedures have been replaced with a more general (and efficient) set: see <a href="http://maths.straylight.co.uk/archives/75">this post</a>!</strong></p>
<h3>Overview</h3>
<p>These maple procedures implement the group law algorithm for an elliptic curve as given in Chapter III Section 2.3 of Silverman&#8217;s <i>The Arithmetic of Elliptic Curves</i>. In particular, they can handle the group identity symbolically as it arises during calculations.</p>
<h3>Loading the procedures</h3>
<p>The procedures can be downloaded as the maple file <tt><a href="http://www.maths.ed.ac.uk/~s0677951/gla.mpl">gla.mpl</a></tt>, which should be placed in whatever directory Maple expects to find it. To be more helfpul, this is probably your home directory on Unix based systems; on Windows it could be the application directory, although if you invoke maple by opening a worksheet, it&#8217;ll be the directory that sheet resides in. If you&#8217;re unsure, entering the following:</p>
<blockquote><p>
<tt></p>
<p>&gt; x:=5;<br />
<br />
&gt; save x, "test.m";<br />
</tt>
</p></blockquote>
<p>Will create a file <tt>test.m</tt> which you can then search for to determine the appropriate directory.
</p>
<p>Having established where the file goes, you then need to read it into Maple:</p>
<blockquote>
<p><tt><br />
&gt; read "gla.mpl";</p>
<p></tt>
</p></blockquote>
<p>Which after some shameless self-promotion gives you the procedures. The assumption is that you have an Elliptic curve given by a Weierstrass equation determined by coefficients a<sub>1</sub>,&#8230;,a<sub>6</sub> as in Silverman:
<p align=center><img src="http://straylight.co.uk/cgi-bin/mimetex.cgi?<br />
    E:y^2+a_1xy+a_3y=x^3+a_2x^2+a_4x+a_6" alt="Weierstrass Equation"/></p>
<p>You can of course work in full generality without defining these coefficients. The point at infinity is referred to as <tt>zero</tt>, whilst a point <em>P=(x,y)</em> can be specified as <tt>x,y</tt> (using <tt>(x,y)</tt> will likely give errors).</p>
<h3>The procedures</h3>
<p>Looking at the source you&#8217;ll find various procedures, some of which are only needed for the internal workings- in particular, <tt>elladd</tt> cannot handle <tt>zero</tt> and should not be used directly. The operations available are:</p>
<h4>Elliptic addition (<tt>ella</tt>)</h4>
<p>Addition with the group law is achieved by a call to the <tt>ella</tt> procedure; a typical call is <tt>ella(x1,y1,x2,y2)</tt> to compute <tt>x1,y1</tt>+<tt>x2,y2</tt>=<em>P<sub>1</sub>&oplus;P<sub>2</sub></em>; however, you may substitute <tt>zero</tt> for either or both points (for instance, <tt>ella(zero,x,y)</tt> is valid). In accordance with 2.3(b) this either returns <tt>zero</tt> or <em>x(P<sub>1</sub>+P<sub>2</sub>),y(P<sub>1</sub>+P<sub>2</sub>)</em>.</p>
<h4>Inverse of a point (<tt>ellm</tt>)</h4>
<p>Given a point <em>P=(x,y)</em>, <tt>ellm(x,y)</tt> returns the group inverse, i.e., the point <em>-P</em>. <tt>zero</tt> is understood and is its own inverse.</p>
<h4>Integer multiples (<tt>ncopies</tt>)</h4>
<p>Repeated iteration of <tt>ella</tt> for a single point <em>P=(x,y)</em> is made available by <tt>ncopies(n,x,y)</tt>, for n an integer. As before, <tt>zero</tt> may be (somewhat pointlessly) subsituted for <tt>x,y</tt>. Care is taken to ensure <tt>zero</tt> is appropriately handled at each stage, and thus may be returned as an answer (always, for <em>n=0</em>). Negative values of <em>n</em> are of course handled by returning <em>n</em> copies of <em>-P</em>, so this provides an alternative to <tt>ellm</tt>.</p>
<h4>Addition of integer multiples (<tt>mnadd</tt>)</h4>
<p>For convenience, two such integer multiples <em>[m]P<sub>1</sub></em>,<em>[n]P<sub>2</sub></em> can be added using <tt>mnadd(m,n,x1,y1,y2)</tt>; as usual <tt>zero</tt> can replace a pair of coordinates (or both).</p>
]]></content:encoded>
			<wfw:commentRss>http://maths.straylight.co.uk/archives/54/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lecture notes- Galois Theory</title>
		<link>http://maths.straylight.co.uk/archives/52</link>
		<comments>http://maths.straylight.co.uk/archives/52#comments</comments>
		<pubDate>Wed, 09 Aug 2006 20:27:37 +0000</pubDate>
		<dc:creator>Graeme</dc:creator>
				<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Galois Theory]]></category>
		<category><![CDATA[MA40037]]></category>
		<category><![CDATA[Ring Theory]]></category>

		<guid isPermaLink="false">http://maths.straylight.co.uk/archives/52</guid>
		<description><![CDATA[Notes from MA40037 Galois Theory, as pdf.]]></description>
			<content:encoded><![CDATA[<p>
<a HREF="http://aleph.straylight.co.uk/MA40037.pdf"><img SRC="http://www.straylight.co.uk/images/pdf.jpg" alt="Galois Theory"/></a>
</p>
<p>To save carrying the original paperwork about, and to give myself a recap on the material, I&#8217;ve written up the lecture notes from <em><a href="http://people.bath.ac.uk/masgcs/ma30037/">MA40037:Galois Theory</a></em> as taught at the <a href="http://www.bath.ac.uk/math-sci/">University of Bath</a> by <a href="http://people.bath.ac.uk/masgcs/">Geoff Smith</a>. </p>
<p>The content is broadly as follows: Rings, Integral Domains, Fields of Fractions, Units, Ideals, Homomorphisms, The First Isomorphism Theorem, The Chinese Remainder Theorem, Irreducibles, Field Extensions, Characteristic, Minimal Polynomials and Algebraic Numbers, Galois Theory.</p>
<p>The notes very closely match those I made and hence the lectures given, except the section on the Chinese Remainder Theorem, which was adapted from problem sheets. There have been various minor linguistic tweaks, but few mathematical ones. </p>
<p>It should be noted (to avoid confusion under composition) that the convention of writing function arguments to the left (i.e., (x)f rather than f(x)) is adopted here; and that square brackets are sometimes used for factors in polynomials where these appear in expressions also featuring function or polynomial evaluations (which are denoted by round brackets).</p>
<p>Proof reading would be appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://maths.straylight.co.uk/archives/52/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Moments of the Riemann Zeta function</title>
		<link>http://maths.straylight.co.uk/archives/47</link>
		<comments>http://maths.straylight.co.uk/archives/47#comments</comments>
		<pubDate>Fri, 05 May 2006 19:14:18 +0000</pubDate>
		<dc:creator>Graeme</dc:creator>
				<category><![CDATA[Algebra]]></category>
		<category><![CDATA[Group Theory]]></category>
		<category><![CDATA[Number Theory]]></category>
		<category><![CDATA[Physics]]></category>

		<guid isPermaLink="false">http://maths.straylight.co.uk/archives/47</guid>
		<description><![CDATA[Follow up of some ideas from Nina Snaith's talk to the undergraduate maths club.]]></description>
			<content:encoded><![CDATA[<p>
I managed to arrange a talk by <a href="http://www.maths.bris.ac.uk/~mancs/">Nina Snaith</a> for the final event by the undergraduate maths club I helped set up this year. As <a href="http://maths.straylight.co.uk/archives/40">at Durham</a>, she spoke on her work connecting quantum chaos to the moments of the riemann zeta function, via random matrix theory. Turnout was good, including some postgrads and staff, and the advantage of hearing the talk here is that I benefit from any feedback or insights they have. </p>
<p>
To calculate the moments requires knowledge of a particularly elusive coefficient <em>g<sub>k</sub></em>, about which very little is known: g<sub>0</sub> is trivially 1, Hardy and Littlewood established that g<sub>1</sub>=1 in the early part of the 20th century, Ingham proved that g<sub>2</sub>=2 in 1926. No progress was made until 1995, when Conrey and Ghosh conjectured that g<sub>3</sub> was, of all things, 42. At a conference in Vienna, Conrey and Gonek planned to present a conjecture for g<sub>4</sub>; yet the random matrix theorists had a conjecture for all values of k. Following some frantic checking at a blackboard, it was confirmed that the two conjectures agreed for g<sub>4</sub>=24024: and thus that quantum physics really could offer predictions about number theory!</p>
<p>
One of my lecturers plugged the coefficients 1,1,2,42,24024 into the <a href="http://www.research.att.com/~njas/sequences/Seis.html">OEIS</a>, and just one result comes up, sequence <a href="http://www.research.att.com/~njas/sequences/A039622">A039622</a>. Curiously, this is about <a href="http://en.wikipedia.org/wiki/Young_diagram">Young diagrams</a>, which are linked to irreducible representations of the symmetric group. Young Tableau themselves describe a fairly elegant number theory puzzle. I&#8217;ve been studying representation theory this semester, and I&#8217;m always amazed by how different strands of mathematics can pull together like this- from quantum theory to distribution of primes to symmetry, somehow they&#8217;re all woven together.
</p>
<p>
For an overview of the current status of work on the Riemann Hypothesis, including Random Matrix Theory, see <a href="http://www.ams.org/notices/200303/fea-conrey-web.pdf">this article</a> by Conrey. Marcus Du Sautoy&#8217;s <em>the music of the primes</em> also mentions Nina&#8217;s work, and Riemann&#8217;s own study of problems in Physics alongside the zeta function. </p>
]]></content:encoded>
			<wfw:commentRss>http://maths.straylight.co.uk/archives/47/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
