Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Remove revert() so it can go on a followup ticket.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Scrimshaw committed Aug 9, 2021
1 parent ba46701 commit 29e139d
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/sage/rings/lazy_laurent_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,34 +1493,6 @@ def __call__(self, g):

return P.element_class(P, CoefficientStream_composition(self._coeff_stream, g._coeff_stream))

def revert(self):
r"""
Return the compositional inverse of ``self``.
EXAMPLES::
sage: L.<z> = LazyLaurentSeriesRing(ZZ)
sage: z.revert()
z + O(z^8)
sage: (1/z).revert()
z^-1 + O(z^6)
sage: (z-z^2).revert()
z + z^2 + 2*z^3 + 5*z^4 + 14*z^5 + 42*z^6 + 132*z^7 + O(z^8)
"""
P = self.parent()
z = P.gen()
if self._coeff_stream._approximate_valuation == 1:
g = self
else:
g = self * z**(1 - self._coeff_stream._approximate_valuation)
f = P(None, valuation=1)
f.define(z/((g/z)(f)))
if self._coeff_stream._approximate_valuation == 1:
return f
else:
return f / z**(1 - self._coeff_stream._approximate_valuation)

def _div_(self, other):
r"""
Return ``self`` divided by ``other``.
Expand Down

0 comments on commit 29e139d

Please sign in to comment.