@@ -267,23 +267,21 @@ def __mul__(self, other):
267267 check = False )
268268
269269 def lcm (self , other ) -> "Modulus" :
270+ """
271+ missing documentation
272+ """
270273 inf = tuple (set (self .infinite_part ()).union (other .infinite_part ()))
271- # Pe_out = []
272274 self_fact_P , self_fact_e = zip (* self .finite_part ().factor ())
273275 self_fact_P = list (self_fact_P )
274276 self_fact_e = list (self_fact_e )
275- # self_facts = self.finite_part().factor()
276- # of = other.finite_part()
277277 other_facts = other .finite_part ().factor ()
278278 mf = self ._number_field .ideal_monoid ().one ()
279279 for P , e in other_facts :
280280 try :
281281 i = self_fact_P .index (P )
282282 except ValueError :
283- # Pe_out.append([P, e])
284283 mf *= P ** e
285284 continue
286- # Pe_out.append([P, max(e, self_fact_e[i])])
287285 mf *= P ** max (e , self_fact_e [i ])
288286 del self_fact_P [i ]
289287 del self_fact_e [i ]
@@ -292,6 +290,9 @@ def lcm(self, other) -> "Modulus":
292290 return Modulus (mf , inf , check = False )
293291
294292 def divides (self , other ) -> bool :
293+ """
294+ missing documentation
295+ """
295296 if not set (self .infinite_part ()).issubset (other .infinite_part ()):
296297 return False
297298 return self .finite_part ().divides (other .finite_part ())
@@ -324,12 +325,6 @@ def finite_factors(self):
324325 self ._finite_factors = self .finite_part ().factor ()
325326 return self ._finite_factors
326327
327- # def _pari_finite_factors(self):
328- # """
329- # Return
330- # """
331- # return self._number_field.pari_nf().idealfactor(self._finite)
332-
333328 def equivalent_coprime_ideal_multiplier (self , I , other ):
334329 r"""
335330 Given ``I`` coprime to this modulus `m`, return a number field element `\beta`
@@ -394,7 +389,7 @@ def equivalent_ideal_coprime_to_other(self, I, other):
394389 """
395390 return self .equivalent_coprime_ideal_multiplier (I , other ) * I
396391
397- def number_is_one_mod_star (self , a ):
392+ def number_is_one_mod_star (self , a ) -> bool :
398393 """
399394 missing documentation
400395 """
@@ -430,7 +425,10 @@ def fix_signs(self, a):
430425 return t * a
431426
432427 def get_one_mod_star_finite_with_fixed_signs (self , positive , negative ):
433- if len (negative ) == 0 :
428+ """
429+ missing documentation
430+ """
431+ if not negative :
434432 return self .number_field ().one ()
435433 negative = tuple (negative )
436434 try :
@@ -485,10 +483,10 @@ def _signs(self, b):
485483 sigmas = self ._number_field .real_places ()
486484 return [ZZ .one () if sigmas [i ](b ).sign () == - 1 else ZZ .zero () for i in self .infinite_part ()]
487485
488- def is_finite (self ):
486+ def is_finite (self ) -> bool :
489487 return len (self ._infinite ) == 0
490488
491- def is_infinite (self ):
489+ def is_infinite (self ) -> bool :
492490 return self ._finite .is_one ()
493491
494492 def __pari__ (self ):
@@ -518,7 +516,7 @@ def __pari__(self):
518516 inf_mod [pari_index ] = 1
519517 return pari ([self ._finite , inf_mod ])
520518
521- def __hash__ (self ):
519+ def __hash__ (self ) -> int :
522520 """
523521 Return the hash of ``self``.
524522 """
@@ -676,7 +674,7 @@ def inverse(self):
676674
677675 __invert__ = inverse
678676
679- def is_principal (self ):
677+ def is_principal (self ) -> bool :
680678 r"""
681679 Return ``True`` iff this ideal class is the trivial (principal) class.
682680
@@ -923,10 +921,6 @@ def ideal(self, reduce=True):
923921 I = R .ideal_reduce (I )
924922 return I
925923
926- # def reduce(self):
927- # nf = self.parent()._number_field.pari_nf()
928- # return RayClassGroupElement(self.parent(), self.exponents(), nf.idealred(self.value()))
929-
930924
931925class SFractionalIdealClass (FractionalIdealClass ):
932926 r"""
@@ -1197,7 +1191,7 @@ def _iter_inner(self, i0, k):
11971191 i0 = i0 * gk
11981192 return
11991193
1200- def _repr_ (self ):
1194+ def _repr_ (self ) -> str :
12011195 r"""
12021196 Return string representation of ``self``.
12031197
@@ -1238,7 +1232,8 @@ def number_field(self):
12381232class RayClassGroup (AbelianGroup_class ):
12391233 Element = RayClassGroupElement
12401234
1241- def __init__ (self , gens_orders , names , modulus , gens , bnr , proof = True ):
1235+ def __init__ (self , gens_orders , names , modulus ,
1236+ gens , bnr , proof = True ) -> None :
12421237 r"""
12431238 ``gens`` -- a tuple of pari extended ideals
12441239 """
@@ -1433,6 +1428,7 @@ def _ideal_log(self, ideal):
14331428
14341429 def ideal_reduce (self , ideal ):
14351430 """
1431+ missing documentation
14361432 """
14371433 ideal = pari (ideal )
14381434 try :
@@ -1577,7 +1573,7 @@ def _element_constructor_(self, *args, **kwds):
15771573 raise TypeError ("The zero ideal is not a fractional ideal" )
15781574 return self .element_class (self , None , I )
15791575
1580- def _repr_ (self ):
1576+ def _repr_ (self ) -> str :
15811577 r"""
15821578 Return string representation of this S-class group.
15831579
0 commit comments