Given the structure of quadratic forms of negative discriminant D, returns the sequence of all primitive reduced forms of discriminant D.
Given the structure of quadratic forms of positive discriminant D, returns the sequence of all reduced orbits of primitive forms of discriminant D, as an indexed set.
Al: MonStgElt Default: "Automatic"
FactorBasisBound: FldReElt Default: 0.1
ProofBound: FldReElt Default: 6
ExtraRelations: RngIntElt Default: 1
The class number of binary quadratic forms Q of discriminant D. The parameter Al may be supplied to select the method used to calculate the class number. The possible values are "ReducedForms" (enumerating all reduced forms), "Shanks" (using a Shanks-based algorithm in the class group), "Sieve" or "NoSieve". The default is to use reduced form enumeration for small discriminants, the Shanks algorithm for the middle range, a class group index-calculus for large discriminants and the sieve method described in [Jac99] for very large discriminants.The remaining parameters apply to the index-calculus computations only; for details about the parameters Factor-Basis-Bound, Proof-Bound and Extra-Relations see the description of ClassGroup.
FactorBasisBound: FldReElt Default: 0.1
ProofBound: FldReElt Default: 6
ExtraRelations: RngIntElt Default: 1
Al: MonStgElt Default: "Automatic"
The class group of the binary quadratic forms Q of discriminant D. The function also returns a map from the abelian group to the structure of quadratic forms.Depending on the size of D, either a Shanks-based method is used ([Tes98], [BJT97]) an index calculus variant ([CDO93], [HM89], [Coh93]) or a sieving method. The parameters FactorBasisBound, ProofBound and ExtraRelations apply to the index calculus method only. This method performs in two steps: In the first step a factor basis containing prime forms of norm < B1 is build. Next, one looks for generators for the full lattice of relations between the forms in the factor basis. The determinant of this lattice will be the class number and the Smith-form of the relation matrix gives the structure of the class group. Once the matrix is of full rank, the algorithm will look for ExtraRelations more relations to potentially decrease the discriminant.
In the second stage, for all prime forms of norm < B2 it is verified that they are in the class group generated by the forms of the first step. The bounds are chosen to be B1 := FactorBasisBound.log2 |D| and B2 := ProofBound.log2 |D|, so the result is correct under the assumption of GRH.
The final result is then checked against the Euler product over the first 30.000 primes. If the quotient becomes to large, a warning is issued. In this case one should increase the ExtraRelations parameter.
If the parameter Al is set to "Sieve" (regardless of the size of D) or D is larger than 1020 then the sieving method described in [Jac99] which uses the multiple polynomial quadratic sieve (MPQS) will be used. This is currently only proven under GRH. If the parameter Al is set to "NoSieve" then the sieving method will not be used regardless of the size of D.
The structure of the class group of the binary quadratic forms Q of discriminant D returned as a sequence of integers giving the abelian invariants.For details about the parameters Al, Factor-Basis-Bound, Proof-Bound and Extra-Relations, see ClassGroup.
Enumerates the ambiguous forms of negative discriminant D, where D is the discriminant of the magma of binary quadratic forms Q.
The subgroup of 2--torsion elements of in the class group of Q.
> Q<z> := QuadraticField(7537543); // arbitrary choice > Q := QuadraticForms(Discriminant(Q)); > 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); > Identity(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; > d, Identity(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