@@ -84,7 +84,7 @@ def EtaGroup(level):
84
84
85
85
class EtaGroupElement (Element ):
86
86
87
- def __init__ (self , parent , rdict ):
87
+ def __init__ (self , parent , rdict ) -> None :
88
88
r"""
89
89
Create an eta product object. Usually called implicitly via
90
90
EtaGroup_class.__call__ or the EtaProduct factory function.
@@ -419,7 +419,7 @@ class EtaGroup_class(UniqueRepresentation, Parent):
419
419
True
420
420
"""
421
421
422
- def __init__ (self , level ):
422
+ def __init__ (self , level ) -> None :
423
423
r"""
424
424
Create the group of eta products of a given level, which must be a
425
425
positive integer.
@@ -662,7 +662,7 @@ def EtaProduct(level, dic) -> EtaGroupElement:
662
662
return EtaGroup (level )(dic )
663
663
664
664
665
- def num_cusps_of_width (N , d ) -> Integer :
665
+ def n_cusps_of_width (N , d ) -> Integer :
666
666
r"""
667
667
Return the number of cusps on `X_0(N)` of width ``d``.
668
668
@@ -674,13 +674,21 @@ def num_cusps_of_width(N, d) -> Integer:
674
674
675
675
EXAMPLES::
676
676
677
- sage: from sage.modular.etaproducts import num_cusps_of_width
678
- sage: [num_cusps_of_width (18,d) for d in divisors(18)]
677
+ sage: from sage.modular.etaproducts import n_cusps_of_width
678
+ sage: [n_cusps_of_width (18,d) for d in divisors(18)]
679
679
[1, 1, 2, 2, 1, 1]
680
- sage: num_cusps_of_width (4,8)
680
+ sage: n_cusps_of_width (4,8)
681
681
Traceback (most recent call last):
682
682
...
683
683
ValueError: N and d must be positive integers with d|N
684
+
685
+ TESTS:
686
+
687
+ The old method name is kept as an alias::
688
+
689
+ sage: from sage.modular.etaproducts import num_cusps_of_width
690
+ sage: [num_cusps_of_width(6,d) for d in divisors(6)]
691
+ [1, 1, 1, 1]
684
692
"""
685
693
N = ZZ (N )
686
694
d = ZZ (d )
@@ -690,9 +698,12 @@ def num_cusps_of_width(N, d) -> Integer:
690
698
return euler_phi (d .gcd (N // d ))
691
699
692
700
701
+ num_cusps_of_width = n_cusps_of_width
702
+
703
+
693
704
def AllCusps (N ) -> list :
694
705
r"""
695
- Return a list of CuspFamily objects corresponding to the cusps of
706
+ Return a list of :class:` CuspFamily` objects corresponding to the cusps of
696
707
`X_0(N)`.
697
708
698
709
INPUT:
@@ -714,7 +725,7 @@ def AllCusps(N) -> list:
714
725
715
726
c = []
716
727
for d in divisors (N ):
717
- n = num_cusps_of_width (N , d )
728
+ n = n_cusps_of_width (N , d )
718
729
if n == 1 :
719
730
c .append (CuspFamily (N , d ))
720
731
elif n > 1 :
@@ -728,7 +739,7 @@ class CuspFamily(SageObject):
728
739
r"""
729
740
A family of elliptic curves parametrising a region of `X_0(N)`.
730
741
"""
731
- def __init__ (self , N , width , label = None ):
742
+ def __init__ (self , N , width , label = None ) -> None :
732
743
r"""
733
744
Create the cusp of width d on X_0(N) corresponding to the family
734
745
of Tate curves `(\CC_p/q^d, \langle \zeta q\rangle)`.
@@ -751,9 +762,9 @@ def __init__(self, N, width, label=None):
751
762
self ._width = width
752
763
if N % width :
753
764
raise ValueError ("bad width" )
754
- if num_cusps_of_width (N , width ) > 1 and label is None :
755
- raise ValueError ("there are %s > 1 cusps of width %s on X_0(%s): specify a label" % (num_cusps_of_width (N , width ), width , N ))
756
- if num_cusps_of_width (N , width ) == 1 and label is not None :
765
+ if n_cusps_of_width (N , width ) > 1 and label is None :
766
+ raise ValueError ("there are %s > 1 cusps of width %s on X_0(%s): specify a label" % (n_cusps_of_width (N , width ), width , N ))
767
+ if n_cusps_of_width (N , width ) == 1 and label is not None :
757
768
raise ValueError ("there is only one cusp of width %s on X_0(%s): no need to specify a label" % (width , N ))
758
769
self .label = label
759
770
0 commit comments