10.08.2013 Views

A Brief Introduction to Classical and Adelic Algebraic ... - William Stein

A Brief Introduction to Classical and Adelic Algebraic ... - William Stein

A Brief Introduction to Classical and Adelic Algebraic ... - William Stein

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

40 CHAPTER 7. COMPUTING<br />

Time: 4.900<br />

> n := 200; A := Matrix(n,n,[R<strong>and</strong>om(100) : i in [1..n^2]]);<br />

> time B := SmithForm(A);<br />

Time: 19.160<br />

Magma can also work with finitely generated abelian groups.<br />

> G := AbelianGroup([3,5,18]);<br />

> G;<br />

Abelian Group isomorphic <strong>to</strong> Z/3 + Z/90<br />

Defined on 3 genera<strong>to</strong>rs<br />

Relations:<br />

3*G.1 = 0<br />

5*G.2 = 0<br />

18*G.3 = 0<br />

> #G;<br />

270<br />

> H := sub;<br />

> #H;<br />

15<br />

> G/H;<br />

Abelian Group isomorphic <strong>to</strong> Z/18<br />

7.2.2 Q <strong>and</strong> Number Fields<br />

Magma has many comm<strong>and</strong>s for doing basic arithmetic with Q.<br />

> Qbar := <strong>Algebraic</strong>Closure(RationalField());<br />

> Qbar;<br />

> S := PolynomialRing(Qbar);<br />

> r := Roots(x^3-2);<br />

> r;<br />

[<br />

,<br />

,<br />

<br />

]<br />

> a := r[1][1];<br />

> MinimalPolynomial(a);<br />

x^3 - 2<br />

> s := Roots(x^2-7);<br />

> b := s[1][1];<br />

> MinimalPolynomial(b);<br />

x^2 - 7<br />

> a+b;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!