@@ -186,7 +186,7 @@ def IQ_points_of_bounded_height(PS, K, dim, bound):
186
186
possible_norm_set = set ()
187
187
for i in range (class_number ):
188
188
for k in range (1 , floor (bound + 1 )):
189
- possible_norm_set .add (k * class_group_ideal_norms [i ])
189
+ possible_norm_set .add (k * class_group_ideal_norms [i ])
190
190
191
191
coordinate_space = {}
192
192
coordinate_space [0 ] = [K (0 )]
@@ -199,11 +199,9 @@ def IQ_points_of_bounded_height(PS, K, dim, bound):
199
199
a_norm_bound = bound * a_norm
200
200
a_coordinates = []
201
201
202
- for m in coordinate_space :
202
+ for m , coord_m in coordinate_space . items () :
203
203
if m <= a_norm_bound :
204
- for x in coordinate_space [m ]:
205
- if x in a :
206
- a_coordinates .append (x )
204
+ a_coordinates .extend (x for x in coord_m if x in a )
207
205
208
206
points_in_class_a = set ()
209
207
t = len (a_coordinates ) - 1
@@ -213,7 +211,7 @@ def IQ_points_of_bounded_height(PS, K, dim, bound):
213
211
if a == K .ideal (point_coordinates ):
214
212
for p in itertools .permutations (point_coordinates ):
215
213
for u in unit_tuples :
216
- point = PS ([i * j for i , j in zip (u , p )] + [p [dim ]])
214
+ point = PS ([i * j for i , j in zip (u , p )] + [p [dim ]])
217
215
218
216
if point not in points_in_class_a :
219
217
points_in_class_a .add (point )
@@ -360,21 +358,18 @@ def points_of_bounded_height(PS, K, dim, bound, prec=53):
360
358
vertex = sum ([coefficient_tuple [i ]* fund_unit_logs [i ] for i in range (r )])
361
359
fund_parallelotope_vertices .append (vertex )
362
360
363
- D_numbers = []
364
- for v in range (r + 1 ):
365
- D_numbers .append (max ([vertex [v ] for vertex in fund_parallelotope_vertices ]))
361
+ D_numbers = [max (vertex [v ] for vertex in fund_parallelotope_vertices )
362
+ for v in range (r + 1 )]
366
363
367
- A_numbers = []
368
- for v in range (r + 1 ):
369
- A_numbers .append (min ([pr_ideal_gen_logs [y ][v ] for y in pr_ideal_gen_logs ]))
364
+ A_numbers = [min (pr_ideal_gen_logs [y ][v ] for y in pr_ideal_gen_logs )
365
+ for v in range (r + 1 )]
370
366
371
- aux_constant = (1 / K_degree ) * Reals (norm_bound ).log ()
367
+ aux_constant = (1 / K_degree ) * Reals (norm_bound ).log ()
372
368
373
- L_numbers = []
374
- for v in range (r1 ):
375
- L_numbers .append (aux_constant + D_numbers [v ] - A_numbers [v ])
376
- for v in range (r1 , r + 1 ):
377
- L_numbers .append (2 * aux_constant + D_numbers [v ] - A_numbers [v ])
369
+ L_numbers = [aux_constant + D_numbers [v ] - A_numbers [v ]
370
+ for v in range (r1 )]
371
+ L_numbers .extend (2 * aux_constant + D_numbers [v ] - A_numbers [v ]
372
+ for v in range (r1 , r + 1 ))
378
373
L_numbers = vector (L_numbers ).change_ring (QQ )
379
374
380
375
T = column_matrix (fund_unit_logs ).delete_rows ([r ]).change_ring (QQ )
0 commit comments