Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 115
def extend_table(T,g): n = len(T) h = g.reduced_form() d = {T[i]:i for i in range(0,n)} r = 1 while not h in d: for i in range(0,n): T.append((h*T[i]).reduced_form()) h = (g*h).reduced_form(); r = r+1 return r,d[h]
D = -5291 T = [BinaryQF([1,1,1323])] a = [BinaryQF([3,1,441]),BinaryQF([5,3,265]),BinaryQF([7,1,189])] r = [0,0,0] s = [0,0,0] for i in range(len(a)): r[i],s[i]=extend_table(T,a[i]) assert len(T) == QuadraticField(D).class_number() print "a =",a print "r =",r print "s =",s
a = [3*x^2 + x*y + 441*y^2, 5*x^2 + 3*x*y + 265*y^2, 7*x^2 + x*y + 189*y^2] r = [9, 2, 2] s = [0, 4, 6]