From 0bed1504c11670d190626aa6fad42103c6755c20 Mon Sep 17 00:00:00 2001 From: DavidAyotte Date: Tue, 7 Mar 2023 18:23:11 -0500 Subject: [PATCH 1/6] fix some \mathrm{val} --- src/sage/rings/lazy_series.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/sage/rings/lazy_series.py b/src/sage/rings/lazy_series.py index 51eeaf5d065..c1fe570cd83 100644 --- a/src/sage/rings/lazy_series.py +++ b/src/sage/rings/lazy_series.py @@ -3388,9 +3388,9 @@ def __call__(self, g, *, check=True): Given two Laurent series `f` and `g` over the same base ring, the composition `(f \circ g)(z) = f(g(z))` is defined if and only if: - - `g = 0` and `val(f) >= 0`, + - `g = 0` and `\mathrm{val}(f) >= 0`, - `g` is non-zero and `f` has only finitely many non-zero coefficients, - - `g` is non-zero and `val(g) > 0`. + - `g` is non-zero and `\mathrm{val}(g) > 0`. INPUT: @@ -3574,7 +3574,7 @@ def __call__(self, g, *, check=True): y We look at cases where the composition does not exist. - `g = 0` and `val(f) < 0`:: + `g = 0` and `\mathrm{val}(f) < 0`:: sage: g = L(0) sage: f = z^-1 + z^-2 @@ -3585,7 +3585,7 @@ def __call__(self, g, *, check=True): ... ZeroDivisionError: the valuation of the series must be nonnegative - `g \neq 0` and `val(g) \leq 0` and `f` has infinitely many + `g \neq 0` and `\mathrm{val}(g) \leq 0` and `f` has infinitely many non-zero coefficients:: sage: g = z^-1 + z^-2 @@ -3797,7 +3797,7 @@ def revert(self): The compositional inverse exists if and only if: - - `val(f) = 1`, or + - `\mathrm{val}(f) = 1`, or - `f = a + b z` with `a, b \neq 0`, or @@ -3870,7 +3870,7 @@ def revert(self): ... ValueError: compositional inverse does not exist - `val(f) != 1` and `f(0) * f(1) = 0`:: + `\mathrm{val}(f) != 1` and `f(0) * f(1) = 0`:: sage: (z^2).revert() Traceback (most recent call last): @@ -4348,7 +4348,7 @@ def __call__(self, *g, check=True): - `g_i` is zero, or - setting all variables except the `i`th in `f` to zero yields a polynomial, or - - `val(g_i) > 0`. + - `\mathrm{val}(g_i) > 0`. If `f` is a univariate 'exact' series, we can check whether `f` is a actually a polynomial. However, if `f` is a @@ -4621,7 +4621,7 @@ def revert(self): The compositional inverse exists if and only if: - - `val(f) = 1`, or + - `\mathrm{val}(f) = 1`, or - `f = a + b z` with `a, b \neq 0` @@ -4681,7 +4681,7 @@ def revert(self): ... ValueError: compositional inverse does not exist - `val(f) != 1` and `f(0) * f(1) = 0`:: + `\mathrm{val}(f) != 1` and `f(0) * f(1) = 0`:: sage: (z^2).revert() Traceback (most recent call last): @@ -5290,7 +5290,7 @@ def __call__(self, *args, check=True): - setting all alphabets except the `i`th in `f` to zero yields a symmetric function with only finitely many non-zero coefficients, or - - `val(g) > 0`. + - `\mathrm{val}(g) > 0`. If `f` is a univariate 'exact' lazy symmetric function, we can check whether `f` has only finitely many non-zero @@ -5489,7 +5489,7 @@ def revert(self): The compositional inverse exists if and only if: - - `val(f) = 1`, or + - `\mathrm{val}(f) = 1`, or - `f = a + b p_1` with `a, b \neq 0`. From 28cc74e2086f494dcd504f1246ef2ba6fe74e0d2 Mon Sep 17 00:00:00 2001 From: DavidAyotte Date: Tue, 7 Mar 2023 18:23:53 -0500 Subject: [PATCH 2/6] add missing hyphen --- src/sage/rings/lazy_series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/lazy_series.py b/src/sage/rings/lazy_series.py index c1fe570cd83..6f4fbb66fb0 100644 --- a/src/sage/rings/lazy_series.py +++ b/src/sage/rings/lazy_series.py @@ -4346,7 +4346,7 @@ def __call__(self, *g, check=True): `1\leq k\leq n`: - `g_i` is zero, or - - setting all variables except the `i`th in `f` to zero + - setting all variables except the `i`-th in `f` to zero yields a polynomial, or - `\mathrm{val}(g_i) > 0`. From 51e3bfbb9da8f3818212912e60a7eb1566c50922 Mon Sep 17 00:00:00 2001 From: DavidAyotte Date: Tue, 7 Mar 2023 18:39:18 -0500 Subject: [PATCH 3/6] minor latex and string fixes --- src/sage/rings/lazy_series.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/lazy_series.py b/src/sage/rings/lazy_series.py index 6f4fbb66fb0..c5b19acf40a 100644 --- a/src/sage/rings/lazy_series.py +++ b/src/sage/rings/lazy_series.py @@ -584,7 +584,7 @@ def map_coefficients(self, f): def truncate(self, d): r""" - Return this series with its terms of degree >= ``d`` truncated. + Return this series with its terms of degree `\geq` ``d`` truncated. INPUT: @@ -3388,7 +3388,7 @@ def __call__(self, g, *, check=True): Given two Laurent series `f` and `g` over the same base ring, the composition `(f \circ g)(z) = f(g(z))` is defined if and only if: - - `g = 0` and `\mathrm{val}(f) >= 0`, + - `g = 0` and `\mathrm{val}(f) \geq 0`, - `g` is non-zero and `f` has only finitely many non-zero coefficients, - `g` is non-zero and `\mathrm{val}(g) > 0`. @@ -4287,7 +4287,7 @@ def exponential(self): def compute_coefficients(self, i): r""" - Computes all the coefficients of self up to i. + Computes all the coefficients of ``self`` up to ``i``. This method is deprecated, it has no effect anymore. @@ -5287,7 +5287,7 @@ def __call__(self, *args, check=True): is defined if and only if for each `1\leq k\leq n`: - `g_i = 0`, or - - setting all alphabets except the `i`th in `f` to zero + - setting all alphabets except the `i`-th in `f` to zero yields a symmetric function with only finitely many non-zero coefficients, or - `\mathrm{val}(g) > 0`. From 549a59db3317b0f91cc6dbbae34ddfcfd2bfdc35 Mon Sep 17 00:00:00 2001 From: DavidAyotte Date: Tue, 7 Mar 2023 19:49:39 -0500 Subject: [PATCH 4/6] add the full name of some trigonometric functions --- src/sage/rings/lazy_series.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sage/rings/lazy_series.py b/src/sage/rings/lazy_series.py index c5b19acf40a..3f94a6eb583 100644 --- a/src/sage/rings/lazy_series.py +++ b/src/sage/rings/lazy_series.py @@ -1989,7 +1989,7 @@ def sec(self): def arcsin(self): r""" - Return the arcsin of ``self``. + Return the arcsine of ``self``. EXAMPLES:: @@ -2021,7 +2021,7 @@ def f(n): def arccos(self): r""" - Return the arccos of ``self``. + Return the arccosine of ``self``. EXAMPLES:: @@ -2116,7 +2116,7 @@ def arccot(self): def sinh(self): r""" - Return the sinh of ``self``. + Return the hyperbolic sine of ``self``. EXAMPLES:: @@ -2144,7 +2144,7 @@ def sinh(self): def cosh(self): r""" - Return the cosh of ``self``. + Return the hyperbolic cosine of ``self``. EXAMPLES:: @@ -2171,7 +2171,7 @@ def cosh(self): def tanh(self): r""" - Return the tanh of ``self``. + Return the hyperbolic tangent of ``self``. EXAMPLES:: From 93a58eaa6ca2c74afd3d4f5a99cf0c169ed36a23 Mon Sep 17 00:00:00 2001 From: DavidAyotte Date: Thu, 9 Mar 2023 23:21:26 -0500 Subject: [PATCH 5/6] change description of truncate method --- src/sage/rings/lazy_series.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/lazy_series.py b/src/sage/rings/lazy_series.py index 3f94a6eb583..c156cb12538 100644 --- a/src/sage/rings/lazy_series.py +++ b/src/sage/rings/lazy_series.py @@ -584,7 +584,8 @@ def map_coefficients(self, f): def truncate(self, d): r""" - Return this series with its terms of degree `\geq` ``d`` truncated. + Return the series obtained by removing all terms of degree at least + ``d``. INPUT: From 48bb425681ab70a33c706f93317aa74e16172e4b Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Thu, 29 Sep 2022 11:59:36 +0200 Subject: [PATCH 6/6] cherry pick the commit from https://github.com/sagemath/sage/issues/34610 --- src/sage/rings/lazy_series.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/lazy_series.py b/src/sage/rings/lazy_series.py index c156cb12538..c9e079702bc 100644 --- a/src/sage/rings/lazy_series.py +++ b/src/sage/rings/lazy_series.py @@ -4344,7 +4344,7 @@ def __call__(self, *g, check=True): Given a Taylor series `f` of arity `n` and a tuple of Taylor series `g = (g_1,\dots, g_n)` over the same base ring, the composition `f \circ g` is defined if and only if for each - `1\leq k\leq n`: + `1\leq i\leq n`: - `g_i` is zero, or - setting all variables except the `i`-th in `f` to zero @@ -5285,7 +5285,7 @@ def __call__(self, *args, check=True): Given a lazy symmetric function `f` of arity `n` and a tuple of lazy symmetric functions `g = (g_1,\dots, g_n)` over the same base ring, the composition (or plethysm) `(f \circ g)` - is defined if and only if for each `1\leq k\leq n`: + is defined if and only if for each `1\leq i\leq n`: - `g_i = 0`, or - setting all alphabets except the `i`-th in `f` to zero