[back] [prev] [next] [index] [root]

 


AbelianGroupEltRandom

Generates a random element of an abelian group.

Syntax:

e := AbelianGroupEltRandom(G);

AbelianGroupElt
  e  
AbelianGroup
  G  

Description:

no detailed description available yet


Example:

We'll produce some representatives for random rays modulo 9 in Q(\sqrt {10}):

kash> o := OrderMaximal(Z, 2, 10);
Generating polynomial: x^2 - 10
Discriminant: 40 

kash> G := RayClassGroupToAbelianGroup(9*o);
RayClassGroupToAbelianGroup(<9>, [  ])
Group with relations:
[2 0]
[0 3]
kash> for i in [1..10] do
> a := AbelianGroupEltRandom(G);
> Print(a, "\t", AbelianGroupDiscreteExp(a), "\n");
> od;
> [0 0]	<1>
[1 2]	<[15806, 6084], [30420, 7903]>
[0 1]	<[7, 6]>
[1 0]	<[14, 12], [60, 7]>
[1 1]	<[818, 168], [840, 409]>
[1 0]	<[14, 12], [60, 7]>
[0 0]	<1>
[0 0]	<1>
[0 1]	<[7, 6]>
[1 1]	<[818, 168], [840, 409]>


<- back[back] [prev] [next] [index] [root]