|
87 | 87 | # https://www.gnu.org/licenses/
|
88 | 88 | # ****************************************************************************
|
89 | 89 |
|
90 |
| -from sage.structure.element import Element, parent |
| 90 | +from sage.structure.element import Element, parent, ModuleElement, RingElement |
91 | 91 | from sage.structure.richcmp import op_EQ, op_NE
|
92 | 92 | from sage.functions.other import factorial
|
93 | 93 | from sage.arith.power import generic_power
|
|
114 | 114 | Stream_dirichlet_invert
|
115 | 115 | )
|
116 | 116 |
|
117 |
| -class LazyModuleElement(Element): |
| 117 | + |
| 118 | +class LazyModuleElement(ModuleElement): |
118 | 119 | r"""
|
119 | 120 | A lazy sequence with a module structure given by term-wise
|
120 | 121 | addition and scalar multiplication.
|
@@ -858,7 +859,6 @@ def _unicode_art_(self):
|
858 | 859 | return UnicodeArt('Uninitialized Lazy Laurent Series')
|
859 | 860 | return self._format_series(unicode_art, True)
|
860 | 861 |
|
861 |
| - |
862 | 862 | def change_ring(self, ring):
|
863 | 863 | r"""
|
864 | 864 | Return ``self`` with coefficients converted to elements of ``ring``.
|
@@ -1971,10 +1971,10 @@ def sqrt(self):
|
1971 | 1971 | sage: f*f - Z
|
1972 | 1972 | O(1/(8^s))
|
1973 | 1973 | """
|
1974 |
| - return self ** (1/ZZ(2)) |
| 1974 | + return self ** (~ZZ(2)) |
1975 | 1975 |
|
1976 | 1976 |
|
1977 |
| -class LazyCauchyProductSeries(LazyModuleElement): |
| 1977 | +class LazyCauchyProductSeries(RingElement, LazyModuleElement): |
1978 | 1978 | r"""
|
1979 | 1979 | A class for series where multiplication is the Cauchy product.
|
1980 | 1980 |
|
|
0 commit comments