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

Commit

Permalink
small enhancements in MZV
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Aug 21, 2022
1 parent 12be2d9 commit 2761f34
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/sage/modular/multiple_zeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,19 @@ def some_elements(self):
"""
return self([]), self([2]), self([3]), self([4]), self((1, 2))

def an_element(self):
r"""
Return an element of the algebra.
EXAMPLES::
sage: M = Multizetas(QQ)
sage: M.an_element()
ζ() + ζ(1,2) + 1/2*ζ(5)
"""
cf = self.base_ring().an_element()
return self([]) + self([1, 2]) + cf * self([5])

def product_on_basis(self, w1, w2):
r"""
Compute the product of two monomials.
Expand Down Expand Up @@ -1790,6 +1803,29 @@ def D_on_basis(self, k, w):
coprod += left.regularise().tensor(right.regularise())
return coprod

def D(self, k):
"""
Return the operator `D_k`.
INPUT:
- ``k`` -- an odd integer, at least 3
EXAMPLES::
sage: from sage.modular.multiple_zeta import Multizetas_iterated
sage: M = Multizetas_iterated(QQ)
sage: D3 = M.D(3)
sage: elt = M((1,0,1,0,0)) + 2 * M((1,1,0,0,1,0))
sage: D3(elt)
-6*I(100) # I(110) + 3*I(100) # I(10)
"""
def map_on_basis(elt):
return self.D_on_basis(k, elt)
cod = Multizetas_iterated(self.base_ring()).tensor_square()
return self.module_morphism(map_on_basis, position=0,
codomain=cod)

@cached_method
def phi_extended(self, w):
r"""
Expand Down

0 comments on commit 2761f34

Please sign in to comment.