/* Monday's lectures */ Zx := PolynomialRing(Integers()); f5 := x^5-2; f6 := x^6-x-1; f7a := x^7 - 7*x - 3; f7b := x^7 - 7*x - 4; f8 := x^8 - 16*x+28; degrees := func; factpat := func; factpats := func : i in [1..cut]]>; tally := function(seq) set := Seqset(seq); return Sort([ : s in set]); end function; factpatstats:=func; untally := func; grpstats := func; galgrp := function(f) G := GaloisGroup(f); return ; end function; load galpols; examp := func; cleanup := func; fielddisc := func; factpatstats2:=function(poly1,poly2,cutoff) ugly := tally([[factpat(poly1,NthPrime(j)),factpat(poly2,NthPrime(j))] : j in [1..cutoff]]); return [ : u in ugly]; end function; /* Wednesday's lectures */ Zxy := PolynomialRing(Integers(),2); discpoly := function(poly) return Zx ! Evaluate( Resultant(Evaluate(poly,y),Evaluate(poly,x1+y),y)/x1^Degree(poly),[x,0]); end function; discpolypat := function(f) dp := discpoly(f); return [:s in Factorization(dp)]; end function; messup := function(f) compmat := CompanionMatrix(f); return CharacteristicPolynomial(compmat + compmat*compmat); end function; half := function(f) coeffs := Eltseq(f); return &+[coeffs[i]*x^((i-1) div 2) : i in [1..#coeffs by 2]]; end function; smalldiscpoly := func; smalldiscpolypat := function(f) sdp := smalldiscpoly(f); return [:s in Factorization(sdp)]; end function; coercedown := function(f) coeffs := Eltseq(f); return &+[Round(Real(coeffs[i]))*x^(i-1) : i in [1..#coeffs]]; end function; resk := function(f,k,prec) Cprec := ComplexField(prec); Cprecz := PolynomialRing(Cprec); fprecz := Cprecz ! f; rootpairs := Roots(fprecz); roots := {rp[1] : rp in rootpairs}; newroots := {&+s : s in Subsets(roots,k)}; resz := &*{z - n : n in newroots}; return coercedown(resz); end function; resmid := func; f12 := x^12 - 6*x^10 - 10*x^9 - 90*x^8 - 150*x^7 + 430*x^6 - 720*x^5 + 900*x^4 + 1350*x^3 -1350*x^2 + 4050*x + 675; sextictwin := function(f) G,r,S := GaloisGroup(f); H := Subgroups(G:IndexEqual:=6, IsTransitive:=true)[1]`subgroup; ans := GaloisSubgroup(S,H); return ans; end function; res := function(f,i,j) G,r,S := GaloisGroup(f); H := Subgroups(G:IndexEqual:=i)[j]`subgroup; ans := GaloisSubgroup(S,H); return ans; end function; /* Friday's exercises */ f22 := func; f24 := 2786655204876088 - 1021047515459130*x - 228822955123883*x^2 + 185843346182048*x^3 - 25203414653024*x^4 - 10606348053144*x^5 + 4199550444457*x^6 - 88695572727*x^7 - 244688866763*x^8 + 48774919226*x^9 + 4265317961*x^10 - 2612466661*x^11 + 109304533*x^12 + 99341324*x^13 - 16380692*x^14 - 2490371*x^15 + 1170700*x^16 - 140737*x^17 - 7222*x^18 + 6555*x^19 - 1127*x^20 + 46*x^22 - 11*x^23 + x^24;