Skip to content

Commit 5666eae

Browse files
committed
Merge branch 'public/rings/lazy_series_revert-34383' of trac.sagemath.org:sage into t/34413/implement_derivatives_of_lazy_series
2 parents 610078f + 731072a commit 5666eae

File tree

2 files changed

+0
-76
lines changed

2 files changed

+0
-76
lines changed

src/sage/combinat/sf/sfa.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4977,7 +4977,6 @@ def frobenius(self, n):
49774977
# then convert back.
49784978
parent = self.parent()
49794979
m = parent.realization_of().monomial()
4980-
from sage.combinat.partition import Partition
49814980
dct = {lam.stretch(n): coeff for lam, coeff in m(self)}
49824981
result_in_m_basis = m._from_dict(dct)
49834982
return parent(result_in_m_basis)

src/sage/rings/lazy_series.py

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -4671,81 +4671,6 @@ def derivative_with_respect_to_p1(self, n=1):
46714671
-n)
46724672
return P.element_class(P, coeff_stream)
46734673

4674-
4675-
def _format_series(self, formatter, format_strings=False):
4676-
r"""
4677-
Return nonzero ``self`` formatted by ``formatter``.
4678-
4679-
TESTS::
4680-
4681-
sage: h = SymmetricFunctions(ZZ).h()
4682-
sage: e = SymmetricFunctions(ZZ).e()
4683-
sage: L = LazySymmetricFunctions(tensor([h, e]))
4684-
sage: f = L(lambda n: sum(tensor([h[k], e[n-k]]) for k in range(n+1)))
4685-
sage: f._format_series(repr)
4686-
'(h[]#e[])
4687-
+ (h[]#e[1]+h[1]#e[])
4688-
+ (h[]#e[2]+h[1]#e[1]+h[2]#e[])
4689-
+ (h[]#e[3]+h[1]#e[2]+h[2]#e[1]+h[3]#e[])
4690-
+ (h[]#e[4]+h[1]#e[3]+h[2]#e[2]+h[3]#e[1]+h[4]#e[])
4691-
+ (h[]#e[5]+h[1]#e[4]+h[2]#e[3]+h[3]#e[2]+h[4]#e[1]+h[5]#e[])
4692-
+ (h[]#e[6]+h[1]#e[5]+h[2]#e[4]+h[3]#e[3]+h[4]#e[2]+h[5]#e[1]+h[6]#e[])
4693-
+ O^7'
4694-
"""
4695-
P = self.parent()
4696-
cs = self._coeff_stream
4697-
v = cs._approximate_order
4698-
if isinstance(cs, Stream_exact):
4699-
if not cs._constant:
4700-
m = cs._degree
4701-
else:
4702-
m = cs._degree + P.options.constant_length
4703-
else:
4704-
m = v + P.options.display_length
4705-
4706-
atomic_repr = P._internal_poly_ring.base_ring()._repr_option('element_is_atomic')
4707-
mons = [P._monomial(self[i], i) for i in range(v, m) if self[i]]
4708-
if not isinstance(cs, Stream_exact) or cs._constant:
4709-
if P._internal_poly_ring.base_ring() is P.base_ring():
4710-
bigO = ["O(%s)" % P._monomial(1, m)]
4711-
else:
4712-
bigO = ["O^%s" % m]
4713-
else:
4714-
bigO = []
4715-
4716-
from sage.misc.latex import latex
4717-
from sage.typeset.unicode_art import unicode_art
4718-
from sage.typeset.ascii_art import ascii_art
4719-
from sage.misc.repr import repr_lincomb
4720-
from sage.typeset.symbols import ascii_left_parenthesis, ascii_right_parenthesis
4721-
from sage.typeset.symbols import unicode_left_parenthesis, unicode_right_parenthesis
4722-
if formatter == repr:
4723-
poly = repr_lincomb([(1, m) for m in mons + bigO], strip_one=True)
4724-
elif formatter == latex:
4725-
poly = repr_lincomb([(1, m) for m in mons + bigO], is_latex=True, strip_one=True)
4726-
elif formatter == ascii_art:
4727-
if atomic_repr:
4728-
poly = ascii_art(*(mons + bigO), sep = " + ")
4729-
else:
4730-
def parenthesize(m):
4731-
a = ascii_art(m)
4732-
h = a.height()
4733-
return ascii_art(ascii_left_parenthesis.character_art(h),
4734-
a, ascii_right_parenthesis.character_art(h))
4735-
poly = ascii_art(*([parenthesize(m) for m in mons] + bigO), sep = " + ")
4736-
elif formatter == unicode_art:
4737-
if atomic_repr:
4738-
poly = unicode_art(*(mons + bigO), sep = " + ")
4739-
else:
4740-
def parenthesize(m):
4741-
a = unicode_art(m)
4742-
h = a.height()
4743-
return unicode_art(unicode_left_parenthesis.character_art(h),
4744-
a, unicode_right_parenthesis.character_art(h))
4745-
poly = unicode_art(*([parenthesize(m) for m in mons] + bigO), sep = " + ")
4746-
4747-
return poly
4748-
47494674
def symmetric_function(self, degree=None):
47504675
r"""
47514676
Return ``self`` as a symmetric function if ``self`` is actually so.

0 commit comments

Comments
 (0)