@@ -677,7 +677,9 @@ def forward_differences(self, **kwds):
677
677
def _mul_ (self , other ):
678
678
r"""
679
679
Return the product of this `k`-regular sequence with ``other``,
680
- where the multiplication is convolution.
680
+ where the multiplication is convolution of power series.
681
+
682
+ The operator `*` is mapped to :meth:`convolution`.
681
683
682
684
INPUT:
683
685
@@ -699,14 +701,28 @@ def _mul_(self, other):
699
701
....: vector([1, 0]), vector([1, 1]))
700
702
sage: E
701
703
2-regular sequence 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, ...
704
+
705
+ We can build the convolution (in the sense of power-series) of `E` by
706
+ itself via::
707
+
708
+ sage: E.convolution(E)
709
+ 2-regular sequence 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, ...
710
+
711
+ This is the same as using multiplication operator::
712
+
702
713
sage: E * E
703
714
2-regular sequence 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, ...
704
715
716
+ Building :meth:`partial_sums` can also be seen as a convolution::
717
+
705
718
sage: o = Seq2.one_hadamard()
706
719
sage: E * o
707
720
2-regular sequence 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, ...
708
721
sage: E * o == E.partial_sums(include_n=True)
709
722
True
723
+
724
+ TESTS::
725
+
710
726
sage: E * o == o * E
711
727
True
712
728
"""
@@ -758,6 +774,8 @@ def blocks(r):
758
774
759
775
return result
760
776
777
+ convolution = _mul_
778
+
761
779
@minimize_result
762
780
def partial_sums (self , include_n = False ):
763
781
r"""
0 commit comments