From c65e4abe4e9cf967b2c27ceb274dad9675fd2f4b Mon Sep 17 00:00:00 2001 From: David Roe Date: Wed, 23 Aug 2017 16:11:45 +0000 Subject: [PATCH] Fix typo in cluster_seed.py --- .../combinat/cluster_algebra_quiver/cluster_seed.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py index 3aad441d44a..7928fa23f19 100644 --- a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py +++ b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py @@ -4250,6 +4250,17 @@ def greedy(self, a1, a2, algorithm='by_recursion'): (x0^4 + 2*x0^2 + x1^2 + 1)/(x0*x1^2) sage: S.greedy(1, 2, 'by_combinatorics') (x0^4 + 2*x0^2 + x1^2 + 1)/(x0*x1^2) + + TESTS: + + We check that :trac:`23688` has been resolved:: + + sage: S = ClusterSeed(Matrix([[0,1],[-4,0]])); S + A seed for a cluster algebra of rank 2 + sage: S.greedy(1,2) + (x1^4 + x0^2 + 2*x0 + 1)/(x0*x1^2) + sage: S.greedy(1,2,'by_combinatorics') + (x1^4 + x0^2 + 2*x0 + 1)/(x0*x1^2) """ if self.b_matrix().dimensions() == (2, 2): b = abs(self.b_matrix()[0, 1]) @@ -4279,7 +4290,7 @@ def greedy(self, a1, a2, algorithm='by_recursion'): evenT = set(T).symmetric_difference(oddT) ans = ans + S.x(0)**(b*len(evenT)) * S.x(1)**(c*len(oddT)) elif a1 < a2: - if is_LeeLiZel_allowable(T, a2, a1, b, c): + if is_LeeLiZel_allowable(T, a2, a1, c, b): oddT = set(T).intersection(PathSubset(a2, 0)) evenT = set(T).symmetric_difference(oddT) ans = ans + S.x(0)**(b*len(oddT)) * S.x(1)**(c*len(evenT))