Skip to content

Commit 9d1d0a1

Browse files
committed
wrap at 80
1 parent a0d5d4a commit 9d1d0a1

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

src/sage/rings/polynomial/polynomial_ring.py

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ def __init__(self, base_ring, name=None, sparse=False, implementation=None,
281281
282282
sage: GF(7)['x']['y'].is_finite()
283283
False
284-
285284
"""
286285
# We trust that, if category is given, it is useful and does not need to be joined
287286
# with the default category
@@ -1626,8 +1625,8 @@ def karatsuba_threshold(self):
16261625

16271626
def set_karatsuba_threshold(self, Karatsuba_threshold):
16281627
"""
1629-
Changes the default threshold for this ring in the method :meth:`_mul_karatsuba`
1630-
to fall back to the schoolbook algorithm.
1628+
Changes the default threshold for this ring in the method
1629+
:meth:`_mul_karatsuba` to fall back to the schoolbook algorithm.
16311630
16321631
.. warning::
16331632
@@ -1948,37 +1947,43 @@ def __init__(self, base_ring, name="x", sparse=False, implementation=None,
19481947
@cached_method(key=lambda self, d, q, sign, lead: (d, q, sign, tuple([x if isinstance(x, (tuple, list)) else (x, 0) for x in lead]) if isinstance(lead, (tuple, list)) else ((lead, 0))))
19491948
def weil_polynomials(self, d, q, sign=1, lead=1):
19501949
r"""
1951-
Return all integer polynomials whose complex roots all have a specified absolute value.
1950+
Return all integer polynomials whose complex roots all have a specified
1951+
absolute value.
19521952
19531953
Such polynomials `f` satisfy a functional equation
19541954
19551955
.. MATH::
19561956
19571957
T^d f(q/T) = s q^{d/2} f(T)
19581958
1959-
where `d` is the degree of `f`, `s` is a sign and `q^{1/2}` is the absolute value
1960-
of the roots of `f`.
1959+
where `d` is the degree of `f`, `s` is a sign and `q^{1/2}` is the
1960+
absolute value of the roots of `f`.
19611961
19621962
INPUT:
19631963
19641964
- ``d`` -- integer, the degree of the polynomials
19651965
1966-
- ``q`` -- integer, the square of the complex absolute value of the roots
1966+
- ``q`` -- integer, the square of the complex absolute value of the
1967+
roots
19671968
1968-
- ``sign`` -- integer (default `1`), the sign `s` of the functional equation
1969+
- ``sign`` -- integer (default `1`), the sign `s` of the functional
1970+
equation
19691971
1970-
- ``lead`` -- integer, list of integers or list of pairs of integers (default `1`),
1971-
constraints on the leading few coefficients of the generated polynomials.
1972-
If pairs `(a, b)` of integers are given, they are treated as a constraint
1973-
of the form `\equiv a \pmod{b}`; the moduli must be in decreasing order by
1974-
divisibility, and the modulus of the leading coefficient must be 0.
1972+
- ``lead`` -- integer, list of integers or list of pairs of integers
1973+
(default `1`), constraints on the leading few coefficients of the
1974+
generated polynomials. If pairs `(a, b)` of integers are given, they
1975+
are treated as a constraint of the form `\equiv a \pmod{b}`; the
1976+
moduli must be in decreasing order by divisibility, and the modulus
1977+
of the leading coefficient must be 0.
19751978
19761979
.. SEEALSO::
19771980
1978-
More documentation and additional options are available using the iterator
1981+
More documentation and additional options are available using the
1982+
iterator
19791983
:class:`sage.rings.polynomial.weil.weil_polynomials.WeilPolynomials`
1980-
directly. In addition, polynomials have a method :meth:`is_weil_polynomial` to
1981-
test whether or not the given polynomial is a Weil polynomial.
1984+
directly. In addition, polynomials have a method
1985+
:meth:`is_weil_polynomial` to test whether or not the given
1986+
polynomial is a Weil polynomial.
19821987
19831988
EXAMPLES::
19841989
@@ -2013,7 +2018,8 @@ def weil_polynomials(self, d, q, sign=1, lead=1):
20132018
20142019
TESTS:
20152020
2016-
We check that products of Weil polynomials are also listed as Weil polynomials::
2021+
We check that products of Weil polynomials are also listed as Weil
2022+
polynomials::
20172023
20182024
sage: all((f * g) in R.weil_polynomials(6, q) for q in [3, 4] # needs sage.libs.flint
20192025
....: for f in R.weil_polynomials(2, q) for g in R.weil_polynomials(4, q))
@@ -2028,13 +2034,15 @@ def weil_polynomials(self, d, q, sign=1, lead=1):
20282034
....: for j in range(1, (3+i)//2 + 1))
20292035
....: for i in range(4)]) for f in simples]
20302036
2031-
Check that every polynomial in this list has 3 real roots between `-2 \sqrt{3}` and `2 \sqrt{3}`::
2037+
Check that every polynomial in this list has 3 real roots between `-2
2038+
\sqrt{3}` and `2 \sqrt{3}`::
20322039
20332040
sage: roots = [f.roots(RR, multiplicities=False) for f in reals] # needs sage.libs.flint
20342041
sage: all(len(L) == 3 and all(x^2 <= 12 for x in L) for L in roots) # needs sage.libs.flint
20352042
True
20362043
2037-
Finally, check that the original polynomials are reconstructed as CM polynomials::
2044+
Finally, check that the original polynomials are reconstructed as CM
2045+
polynomials::
20382046
20392047
sage: all(f == T^3*r(T + 3/T) for (f, r) in zip(simples, reals)) # needs sage.libs.flint
20402048
True
@@ -2190,7 +2198,8 @@ def _element_class():
21902198

21912199
def _ideal_class_(self, n=0):
21922200
"""
2193-
Returns the class representing ideals in univariate polynomial rings over fields.
2201+
Returns the class representing ideals in univariate polynomial rings
2202+
over fields.
21942203
21952204
EXAMPLES::
21962205

0 commit comments

Comments
 (0)