Skip to content

Commit 5ce77b6

Browse files
committed
explain that equations in the error messages may be printed in random order
1 parent aad8498 commit 5ce77b6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/sage/rings/lazy_series_ring.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,11 +799,21 @@ def define_implicitly(self, series, equations, max_lookahead=1):
799799
<repr(...) failed: ValueError: could not determine any coefficients:
800800
coefficient [3]: 6*series[3] + (-2*x - 2*y)*series[2] + (x*y)*series[1] == 0>
801801
802+
Let us now try to only specify the degree 0 and degree 1
803+
components. We will see that this is still not enough to
804+
remove the ambiguity, so an error is raised. However, we
805+
will see that the dependence on ``series[1]`` disappears.
806+
The equation which has no unique solution is now
807+
``6*series[3] + (-2*x - 2*y)*series[2] + (x*y*f1) == 0``.::
808+
802809
sage: F = L.undefined()
803810
sage: L.define_implicitly([(F, [0, f1])], [F(2*z) - (1+exp(x*z)+exp(y*z))*F - exp((x+y)*z)*F(-z)])
804-
sage: F # random
811+
sage: F
805812
<repr(...) failed: ValueError: could not determine any coefficients:
806-
coefficient [3]: 6*series[3] + (-2*x - 2*y)*series[2] + (x*y*f1) == 0>
813+
coefficient [3]: ... == 0>
814+
815+
(Note that the order of summands of the equation in the error
816+
message is not deterministic.)
807817
808818
Laurent series examples::
809819

0 commit comments

Comments
 (0)