@@ -36,9 +36,7 @@ def count_modp_solutions__by_Gauss_sum(self, p, m):
36
36
37
37
- `m` -- an integer
38
38
39
- OUTPUT:
40
-
41
- an integer >= 0
39
+ OUTPUT: an integer >= 0
42
40
43
41
EXAMPLES::
44
42
@@ -81,9 +79,7 @@ def local_good_density_congruence_odd(self, p, m, Zvec, NZvec):
81
79
82
80
- Zvec, NZvec -- non-repeating lists of integers in range(self.dim()) or None
83
81
84
- OUTPUT:
85
-
86
- a rational number
82
+ OUTPUT: a rational number
87
83
88
84
EXAMPLES::
89
85
@@ -123,19 +119,19 @@ def local_good_density_congruence_odd(self, p, m, Zvec, NZvec):
123
119
124
120
if NZvec is None :
125
121
if m % p :
126
- total = Q_Unit_minus_Zvec .count_modp_solutions__by_Gauss_sum (p , m ) * p ** len (NonUnitVec_minus_Zvec ) # m != 0 (mod p)
122
+ total = Q_Unit_minus_Zvec .count_modp_solutions__by_Gauss_sum (p , m ) * p ** len (NonUnitVec_minus_Zvec )
127
123
else :
128
- total = (Q_Unit_minus_Zvec .count_modp_solutions__by_Gauss_sum (p , m ) - 1 ) * p ** len (NonUnitVec_minus_Zvec ) # m == 0 (mod p)
124
+ total = (Q_Unit_minus_Zvec .count_modp_solutions__by_Gauss_sum (p , m ) - 1 ) * p ** len (NonUnitVec_minus_Zvec )
129
125
130
126
else :
131
127
UnitVec_minus_ZNZvec = list (UnitVec - (Set (Zvec ) + Set (NZvec )))
132
128
NonUnitVec_minus_ZNZvec = list (NonUnitVec - (Set (Zvec ) + Set (NZvec )))
133
129
Q_Unit_minus_ZNZvec = self .extract_variables (UnitVec_minus_ZNZvec )
134
130
135
- if m % p : # m != 0 (mod p)
131
+ if m % p :
136
132
total = Q_Unit_minus_Zvec .count_modp_solutions__by_Gauss_sum (p , m ) * p ** len (NonUnitVec_minus_Zvec ) \
137
133
- Q_Unit_minus_ZNZvec .count_modp_solutions__by_Gauss_sum (p , m ) * p ** len (NonUnitVec_minus_ZNZvec )
138
- else : # m == 0 (mod p)
134
+ else :
139
135
total = (Q_Unit_minus_Zvec .count_modp_solutions__by_Gauss_sum (p , m ) - 1 ) * p ** len (NonUnitVec_minus_Zvec ) \
140
136
- (Q_Unit_minus_ZNZvec .count_modp_solutions__by_Gauss_sum (p , m ) - 1 ) * p ** len (NonUnitVec_minus_ZNZvec )
141
137
@@ -178,9 +174,7 @@ def local_good_density_congruence_even(self, m, Zvec, NZvec):
178
174
179
175
- Zvec, NZvec -- non-repeating lists of integers in range(self.dim()) or None
180
176
181
- OUTPUT:
182
-
183
- a rational number
177
+ OUTPUT: a rational number
184
178
185
179
EXAMPLES::
186
180
@@ -347,9 +341,7 @@ def local_good_density_congruence(self, p, m, Zvec=None, NZvec=None):
347
341
348
342
- Zvec, NZvec -- non-repeating lists of integers in range(self.dim()) or None
349
343
350
- OUTPUT:
351
-
352
- a rational number
344
+ OUTPUT: a rational number
353
345
354
346
EXAMPLES::
355
347
@@ -390,12 +382,10 @@ def local_good_density_congruence(self, p, m, Zvec=None, NZvec=None):
390
382
if (NZvec is not None ) and (len (Set (NZvec ) + Sn ) > n ):
391
383
raise RuntimeError ("NZvec must be a subset of {0, ..., n-1}." )
392
384
393
- # Check that Q is in local normal form -- should replace this with a diagonalization check?
385
+ # There was here a commented-out check that Q is in local normal form
394
386
# (it often may not be since the reduction procedure
395
387
# often mixes up the order of the valuations...)
396
- #
397
- # if (self != self.local_normal_form(p))
398
- # print "Warning in local_good_density_congruence: Q is not in local normal form! \n";
388
+ # This commented-out code was removed in ticket #32960
399
389
400
390
# Decide which routine to use to compute the Good-type density
401
391
if p > 2 :
@@ -422,9 +412,7 @@ def local_zero_density_congruence(self, p, m, Zvec=None, NZvec=None):
422
412
423
413
- Zvec, NZvec -- non-repeating lists of integers in range(self.dim()) or None
424
414
425
- OUTPUT:
426
-
427
- a rational number
415
+ OUTPUT: a rational number
428
416
429
417
EXAMPLES::
430
418
@@ -498,9 +486,7 @@ def local_badI_density_congruence(self, p, m, Zvec=None, NZvec=None):
498
486
499
487
- Zvec, NZvec -- non-repeating lists of integers in range(self.dim()) or None
500
488
501
- OUTPUT:
502
-
503
- a rational number
489
+ OUTPUT: a rational number
504
490
505
491
EXAMPLES::
506
492
@@ -665,9 +651,7 @@ def local_badII_density_congruence(self, p, m, Zvec=None, NZvec=None):
665
651
666
652
- Zvec, NZvec -- non-repeating lists of integers in range(self.dim()) or None
667
653
668
- OUTPUT:
669
-
670
- a rational number
654
+ OUTPUT: a rational number
671
655
672
656
EXAMPLES::
673
657
@@ -814,9 +798,7 @@ def local_bad_density_congruence(self, p, m, Zvec=None, NZvec=None):
814
798
815
799
- Zvec, NZvec -- non-repeating lists of integers in range(self.dim()) or None
816
800
817
- OUTPUT:
818
-
819
- a rational number
801
+ OUTPUT: a rational number
820
802
821
803
EXAMPLES::
822
804
@@ -875,9 +857,7 @@ def local_density_congruence(self, p, m, Zvec=None, NZvec=None):
875
857
876
858
- Zvec, NZvec -- non-repeating lists of integers in range(self.dim()) or None
877
859
878
- OUTPUT:
879
-
880
- a rational number
860
+ OUTPUT: a rational number
881
861
882
862
EXAMPLES::
883
863
@@ -949,9 +929,7 @@ def local_primitive_density_congruence(self, p, m, Zvec=None, NZvec=None):
949
929
950
930
- Zvec, NZvec -- non-repeating lists of integers in range(self.dim()) or None
951
931
952
- OUTPUT:
953
-
954
- a rational number
932
+ OUTPUT: a rational number
955
933
956
934
EXAMPLES::
957
935
0 commit comments