The discriminant b^2 - 4ac of a quadratic form f=aX^2 + bXY + cY^2.
True if d is the discriminant of some quadratic form; false otherwise.
The fundamental discriminant corresponding to d.
True if d is a fundamental discriminant; false otherwise.
The Weber polynomial for the fundamental discriminant d, which must be negative.
Al: MonStrngElt Default: "Shanks"
Reduction: BoolElt Default: Reduction
The composition of two binary quadratic forms f and g.The optional argument Al can be used on the Composition function to specify whether the algorithm of Gauss or that of Shanks is to be used -- the latter is the default (and requires f and g to have the same discriminant.
The other optional argument must be Reduction (default) or NoReduction, and can be used to indicate whether or not a reduced composite is required.
Al: MonStrngElt Default: "Shanks"
Reduction: BoolElt Default: Reduction
The n-fold composition of a form f. The optional arguments are as in composition.
Returns a binary form equivalent to f that is reduced.
Returns the result of applying one reduction step to the quadratic form f.
True if the quadratic form f is reduced; false otherwise.
> Q<z> := QuadraticField(7537543); // arbitrary choice > C, m := ClassGroup(Q); > C; Abelian Group isomorphic to Z/2 + Z/76 Defined on 2 generators Relations: 76*C.1 = 0 2*C.2 = 0 > // get the generators as quadratic forms: > f := m(C.1); > g := m(C.2); > h := g^2; > g, h; <-1038,4894,1493> <-887,4340,3189> > c := []; // create the cycle of forms equivalent to g^2: > repeat > h := ReductionStep(h); > Append( c, h); > until h eq g^2; > P := Parent(g); > One(P) in c; true // this proves that the second class has order dividing 2 > for d in Divisors(76) do > c := []; > h := f^d; > repeat h := ReductionStep(h); Append( c, h); > until h eq f^d; > print d, One(P) in c, #c; > end for; 1 false 16 2 false 14 4 false 12 // the cycle lengths vary 19 false 18 38 false 16 76 true 14 // so the true order of this class is 76
The action of SL(2, Z) on forms.
We use the function NormEquation to find the prime above p in the Gaussian integers, and we build the set of such primes for which 2 is a biquadratic residue (which means that z^4 = 2 mod p for some z).
> s := { }; > Q := QuadraticField(-1); > for p := 65 to 1000 by 4 do > if IsPrime(p) then > _, x := NormEquation(Q, p); > if BiquadraticResidueSymbol(2, Primary(x)) eq 1 then > Include(~s, p); > end if; > end if; > end for; > s; { 73, 89, 113, 233, 257, 281, 337, 353, 577, 593, 601, 617, 881, 937 }Next we create the set of all primes as above that are of the form x^2 + 64y^2. Note that we have to use the integer version of NormEquation
now, because we want to solve x^2 + 64y^2=p, while QuadraticField(-64 returns just Q(i) in which we can only solve x^2 + y^2=p (in other words: we use the integer version to solve the equation in a suborder of Q(i)).
> t := { }; > for p := 65 to 1000 by 4 do > if IsPrime(p) then > if NormEquation(64, p) then > Include(~t, p); > end if; > end if; > end for; > t; { 73, 89, 113, 233, 257, 281, 337, 353, 577, 593, 601, 617, 881, 937 }[Next] [Prev] [_____] [Left] [Up] [Index] [Root]