Course Test · University: upper level

Abstract algebra II: rings, fields and Galois theory: RatMath answers

The same twenty exercises, answered with RatMath Core and the Shelf libraries only. The code below was run when this page was built; its output is shown as printed, and compared with the independent answer.

Agrees 20

Libraries used here: core, algebraic, structures. In this code each library is in scope under its own name (linalg.det, stats.tTest), and Core's names (R, Rational, …) are in scope directly.

  1. 1.Polynomial gcdAgrees
    Find gcd⁡(x3−1,x2−1)\gcd(x^3 - 1, x^2 - 1) in Q[x]\mathbb Q[x].
    Independent answer
    x3−1=(x−1)(x2+x+1)x^3 - 1 = (x - 1)(x^2 + x + 1) and x2−1=(x−1)(x+1)x^2 - 1 = (x - 1)(x + 1); x2+x+1x^2 + x + 1 has no root −1-1, so the gcd is x−1x - 1.
    RatMath code
    const P = structures.polynomialDomain("x");
    String(structures.gcd(P.from("x^3 - 1"), P.from("x^2 - 1")))
    Output
    x − 1
  2. 2.Factoring over QAgrees
    Factor x4+4x^4 + 4 over Q\mathbb Q.
    Independent answer
    Sophie Germain: x4+4=(x2+2)2−(2x)2=(x2+2x+2)(x2−2x+2)x^4 + 4 = (x^2 + 2)^2 - (2x)^2 = (x^2 + 2x + 2)(x^2 - 2x + 2).
    RatMath code
    const R = structures.ring(["x"]);
    structures.factor(R.poly("x^4 + 4")).factors.map((f) => String(f.factor))
    Output
    ["x² + 2x + 2", "x² − 2x + 2"]
    factor and isIrreducible need a polynomial built with ring([...]).poly, while gcd needs one from polynomialDomain(v).from; neither takes plain text.
  3. 3.IrreducibilityAgrees
    Which are irreducible over Q\mathbb Q: x3−2x^3 - 2, x4+4x^4 + 4, x4+6x+3x^4 + 6x + 3?
    Independent answer
    x3−2x^3 - 2: a reducible cubic has a rational root, and ±1,±2\pm1, \pm2 are not roots; irreducible. x4+4x^4 + 4: reducible (previous exercise). x4+6x+3x^4 + 6x + 3: Eisenstein at 3; irreducible.
    RatMath code
    const R = structures.ring(["x"]);
    ["x^3 - 2", "x^4 + 4", "x^4 + 6*x + 3"].map((f) => structures.isIrreducible(R.poly(f)))
    Output
    [true, false, true]
  4. 4.Quotient ringsAgrees
    Is Q[x]/(x2+1)\mathbb Q[x]/(x^2 + 1) a field? Is Q[x]/(x2−1)\mathbb Q[x]/(x^2 - 1) an integral domain?
    Independent answer
    x2+1x^2 + 1 is irreducible, so (x2+1)(x^2 + 1) is maximal: a field (≅Q(i)\cong \mathbb Q(i)). x2−1=(x−1)(x+1)x^2 - 1 = (x-1)(x+1): (x−1)(x+1)=0(x - 1)(x + 1) = 0 in the quotient, so it is not a domain.
    RatMath code
    const R = structures.ring(["x"]);
    const Q = (f) => structures.ideal(R, [R.poly(f)]).quotientRing();
    [Q("x^2 + 1").isField(), Q("x^2 - 1").isIntegralDomain()]
    Output
    [true, false]
    Here isField is a method, while on Zn(7) it is a getter.
  5. 5.Gröbner basesAgrees
    Find a reduced Gröbner basis (lex, x>yx > y) of the ideal (x2+y2−1, x−y)(x^2 + y^2 - 1,\ x - y).
    Independent answer
    Substitute x=yx = y: 2y2−12y^2 - 1. Basis {x−y, y2−12}\{x - y,\ y^2 - \tfrac12\}.
    RatMath code
    const R = structures.ring(["x", "y"], { order: "lex" });
    String(structures.groebner([R.poly("x^2 + y^2 - 1"), R.poly("x - y")]))
    Output
    Gröbner basis (lex) of 2: y² − 1/2, x − y
  6. 6.Unique factorisation failsAgrees
    Show Z[−5]\mathbb Z[\sqrt{-5}] is not a UFD. What is its class number?
    Independent answer
    6=2⋅3=(1+−5)(1−−5)6 = 2\cdot3 = (1 + \sqrt{-5})(1 - \sqrt{-5}), with all four factors irreducible (norms 4, 9, 6, 6, and no element has norm 2 or 3) and not associates. The class number is 2.
    RatMath code
    const R = structures.quadraticRing(-5);
    [R.classNumber(), R.isUFD]
    Output
    [2, false]
  7. 7.Finite fieldsAgrees
    In GF(8)=F2[a]/(a3+a+1)\mathrm{GF}(8) = \mathbb F_2[a]/(a^3 + a + 1), find (a+1)−1(a + 1)^{-1}.
    Independent answer
    (a+1)(a2+a)=a3+a=(a+1)+a=1(a + 1)(a^2 + a) = a^3 + a = (a + 1) + a = 1, so (a+1)−1=a2+a(a + 1)^{-1} = a^2 + a.
    RatMath code
    const F = structures.galoisField(2, 3, [1, 1, 0, 1]);
    F.format(F.inv(F.add(F.gen, F.one)))
    Output
    a² + a
  8. 8.Primitive polynomialsAgrees
    Give the Conway polynomial for GF(16)\mathrm{GF}(16), that is, the least primitive polynomial of degree 4 over F2\mathbb F_2.
    Independent answer
    The irreducible quartics over F2\mathbb F_2 are x4+x+1x^4 + x + 1, x4+x3+1x^4 + x^3 + 1, x4+x3+x2+x+1x^4 + x^3 + x^2 + x + 1; the last has roots of order 5, and x4+x+1x^4 + x + 1 comes first: x4+x+1x^4 + x + 1.
    RatMath code
    structures.conwayPolynomial(2, 4)
    Output
    [1n, 1n, 0n, 0n, 1n]
    The answer is a list of coefficients, constant term first.
  9. 9.Minimal polynomialsAgrees
    Find the minimal polynomial of 2+3\sqrt2 + \sqrt3 over Q\mathbb Q.
    Independent answer
    α2=5+26\alpha^2 = 5 + 2\sqrt6, (α2−5)2=24(\alpha^2 - 5)^2 = 24: x4−10x2+1x^4 - 10x^2 + 1, irreducible since [Q(2,3):Q]=4[\mathbb Q(\sqrt2, \sqrt3):\mathbb Q] = 4.
    RatMath code
    const A = algebraic;
    A.minimalPolynomial(A.add(A.sqrt(A.fromRational(2)), A.sqrt(A.fromRational(3))))
    Output
    [1n, 0n, -10n, 0n, 1n]
  10. 10.Primitive elementAgrees
    Find a primitive element of Q(2,3)\mathbb Q(\sqrt2, \sqrt3) and the degree of the extension.
    Independent answer
    Degree 4 (3∉Q(2)\sqrt3 \notin \mathbb Q(\sqrt2)); 2+3\sqrt2 + \sqrt3 is primitive.
    RatMath code
    const E = structures.extension({ a: "a^2 - 2", b: "b^2 - 3" });
    [E.degreeOver(), String(E.primitiveElement().element)]
    Output
    [4, "a + b"]
  11. 11.Degree of a towerAgrees
    Find [Q(23,ω):Q][\mathbb Q(\sqrt[3]2, \omega) : \mathbb Q] where ω\omega is a primitive cube root of unity.
    Independent answer
    [Q(23):Q]=3[\mathbb Q(\sqrt[3]2):\mathbb Q] = 3 and ω\omega satisfies x2+x+1x^2 + x + 1, not real, so degree 3⋅2=63\cdot2 = 6.
    RatMath code
    structures.extension({ a: "a^3 - 2", w: "w^2 + w + 1" }).degreeOver()
    Output
    6
  12. 12.Galois group of a cubicAgrees
    Find the Galois group of x3−2x^3 - 2 over Q\mathbb Q.
    Independent answer
    Irreducible with discriminant −27⋅4=−108-27\cdot4 = -108, not a square: S3S_3, order 6.
    RatMath code
    const g = algebraic.galoisGroup([-2n, 0n, 0n, 1n]);
    [g.name, g.order, g.discriminant]
    Output
    ["S3", 6, -108]
  13. 13.Discriminant testAgrees
    Find the Galois group of x3−3x+1x^3 - 3x + 1.
    Independent answer
    Irreducible (no rational roots), discriminant −4(−3)3−27=81=92-4(-3)^3 - 27 = 81 = 9^2, a square: A3≅C3A_3 \cong C_3.
    RatMath code
    const g = algebraic.galoisGroup([1n, -3n, 0n, 1n]);
    [g.name, g.discriminant, g.discriminantIsSquare]
    Output
    ["C3", 81, true]
  14. 14.Galois group of x⁴ − 2Agrees
    Find the Galois group of x4−2x^4 - 2 over Q\mathbb Q.
    Independent answer
    Splitting field Q(24,i)\mathbb Q(\sqrt[4]2, i) of degree 8; the group is the dihedral group D4D_4 of order 8.
    RatMath code
    const g = algebraic.galoisGroup([-2n, 0n, 0n, 0n, 1n]);
    [g.name, g.order]
    Output
    ["D4", 8]
  15. 15.Biquadratic extensionAgrees
    Find the Galois group of x4−10x2+1x^4 - 10x^2 + 1.
    Independent answer
    Its roots ±2±3\pm\sqrt2 \pm\sqrt3 generate Q(2,3)\mathbb Q(\sqrt2, \sqrt3) of degree 4, with automorphisms flipping each sign: V4≅C2×C2V_4 \cong C_2\times C_2.
    RatMath code
    const g = algebraic.galoisGroup([1n, 0n, -10n, 0n, 1n]);
    [g.name, g.order]
    Output
    ["V4", 4]
  16. 16.An unsolvable quinticAgrees
    Is x5−x−1x^5 - x - 1 solvable by radicals?
    Independent answer
    It is irreducible (mod 5 it is the Artin–Schreier polynomial, irreducible), and its Galois group is S5S_5, which is not solvable. So no.
    RatMath code
    const g = algebraic.galoisGroup([-1n, -1n, 0n, 0n, 0n, 1n]);
    [g.name, g.solvable]
    Output
    ["S5", false]
  17. 17.Constructibility: the 7-gonAgrees
    Is the regular heptagon constructible with ruler and compass?
    Independent answer
    cos⁡2π7\cos\frac{2\pi}7 is a root of 8x3+4x2−4x−18x^3 + 4x^2 - 4x - 1, irreducible of degree 3, not a power of 2: not constructible.
    RatMath code
    structures.constructible(algebraic.cosMinimal(7)).constructible
    Output
    false
  18. 18.Constructibility: the 17-gonAgrees
    Is the regular 17-gon constructible?
    Independent answer
    Yes (Gauss): 17 is a Fermat prime, φ(17)=16=24\varphi(17) = 16 = 2^4, and Q(cos⁡2π17)\mathbb Q(\cos\frac{2\pi}{17}) is an abelian extension of degree 8.
    RatMath code
    const c = structures.constructible(algebraic.cosMinimal(17));
    [c.constructible, c.factors[0].cosine.n]
    Output
    [true, 17]
    The degree is 8, beyond the Galois groups computed directly, but the polynomial is recognised as the minimal polynomial of cos⁡(2π/17)\cos(2\pi/17), so Gauss–Wantzel decides it.
    Fix: ratmath/structures#6, sign/isEven of a permutation; Gauss–Wantzel inside constructible; chainComplex and homology
  19. 19.Cyclotomic polynomialsAgrees
    Find the cyclotomic polynomial Φ12(x)\Phi_{12}(x).
    Independent answer
    Φ12=(x12−1)(x2−1)(x6−1)(x4−1)=x4−x2+1\Phi_{12} = \dfrac{(x^{12} - 1)(x^2 - 1)}{(x^6 - 1)(x^4 - 1)} = x^4 - x^2 + 1.
    RatMath code
    algebraic.cyclotomic(12)
    Output
    [1n, 0n, -1n, 0n, 1n]
  20. 20.Smith normal formAgrees
    Find the Smith normal form of (244−661210−4−16)\begin{pmatrix}2&4&4\\-6&6&12\\10&-4&-16\end{pmatrix} and the abelian group Z3\mathbb Z^3 modulo its columns.
    Independent answer
    d1=gcd⁡d_1 = \gcd of entries =2= 2; d1d2=gcd⁡d_1d_2 = \gcd of 2×22\times2 minors =12= 12; d1d2d3=∣det⁡∣=144d_1d_2d_3 = |\det| = 144. So diag⁡(2,6,12)\operatorname{diag}(2, 6, 12) and the cokernel is Z2×Z6×Z12\mathbb Z_2\times\mathbb Z_6\times\mathbb Z_{12}.
    RatMath code
    structures.smithForm([[2, 4, 4], [-6, 6, 12], [10, -4, -16]]).diagonal
    Output
    [2n, 6n, 12n]