Repository: sympy/sympy

Issue:
sympy.solve variable name loss
My variables get renamed in the solver for some reason. 
https://pastebin.com/LDxgtgsf

Works.
`>>> sympy.solve(eqns[:-1])`
`[{x5**2: x0,...`

Works not.
`>>> sympy.solve(eqns)`
`[{_Dummy_25: 1/36,...`

Workaround.
https://pastebin.com/sbtPjxFh
`>>> sympy.solve(eqns, x)`
`[(1,...`

Running on Ubuntu 16.10 64-bit and Python 3.5.2+.
`>>> sympy.__version__`
`'1.0'`

Discussion:

Patch:
diff --git a/sympy/integrals/risch.py b/sympy/integrals/risch.py
index 7d0560c46a..ed75b61794 100644
--- a/sympy/integrals/risch.py
+++ b/sympy/integrals/risch.py
@@ -160,9 +160,9 @@ class DifferentialExtension(object):
     # to have a safeguard when debugging.
     __slots__ = ('f', 'x', 'T', 'D', 'fa', 'fd', 'Tfuncs', 'backsubs', 'E_K',
         'E_args', 'L_K', 'L_args', 'cases', 'case', 't', 'd', 'newf', 'level',
-        'ts', 'dummy')
+        'ts',)
 
-    def __init__(self, f=None, x=None, handle_first='log', dummy=False, extension=None, rewrite_complex=False):
+    def __init__(self, f=None, x=None, handle_first='log', dummy=True, extension=None, rewrite_complex=False):
         """
         Tries to build a transcendental extension tower from f with respect to x.
 
@@ -217,16 +217,14 @@ def __init__(self, f=None, x=None, handle_first='log', dummy=False, extension=No
         # (e.g., we pull out a constant from an exponential)
         self.f = f
         self.x = x
-        # setting the default value 'dummy'
-        self.dummy = dummy
-        self.reset()
+        self.reset(dummy=dummy)
         exp_new_extension, log_new_extension = True, True
         if rewrite_complex:
             rewritables = {
                 (sin, cos, cot, tan, sinh, cosh, coth, tanh): exp,
                 (asin, acos, acot, atan): log,
             }
-        # rewrite the trigonometric components
+        #rewrite the trigonometric components
             for candidates, rule in rewritables.items():
                 self.newf = self.newf.rewrite(candidates, rule)
         else:
@@ -287,8 +285,8 @@ def update(seq, atoms, func):
             # has been done to guarantee that the simplest solution is
             # returned and that it would be affected be using different
             # variables. Though it is possible that this is the case
-            # one should know that it has not been done intentionally, so
-            # further improvements may be possible.
+            # one should know that it has not been done intentionally so
+            # further improvements may possible.
 
             # TODO: This probably doesn't need to be completely recomputed at
             # each pass.
@@ -330,7 +328,8 @@ def update(seq, atoms, func):
                         # without first manually rewriting it as exp(x*log(x))
                         self.newf = self.newf.xreplace({old: new})
                         self.backsubs += [(new, old)]
-                        log_new_extension = self._log_part([log(i.base)])
+                        log_new_extension = self._log_part([log(i.base)],
+                            dummy=dummy)
                         exps = update(exps, self.newf.atoms(exp), lambda i:
                             i.exp.is_rational_function(*self.T) and i.exp.has(*self.T))
                         continue
@@ -386,16 +385,16 @@ def update(seq, atoms, func):
             logs = sorted(set(logs), key=default_sort_key)
 
             if handle_first == 'exp' or not log_new_extension:
-                exp_new_extension = self._exp_part(exps)
+                exp_new_extension = self._exp_part(exps, dummy=dummy)
                 if exp_new_extension is None:
                     # reset and restart
                     self.f = self.newf
-                    self.reset()
+                    self.reset(dummy=dummy)
                     exp_new_extension = True
                     continue
 
             if handle_first == 'log' or not exp_new_extension:
-                log_new_extension = self._log_part(logs)
+                log_new_extension = self._log_part(logs, dummy=dummy)
 
         self.fa, self.fd = frac_in(self.newf, self.t)
         self._auto_attrs()
@@ -423,7 +422,7 @@ def _auto_attrs(self):
         self.d = self.D[self.level]
         self.case = self.cases[self.level]
 
-    def _exp_part(self, exps):
+    def _exp_part(self, exps, dummy=True):
         """
         Try to build an exponential extension.
 
@@ -517,7 +516,7 @@ def _exp_part(self, exps):
                 self.E_K.append(len(self.T) - 1)
                 self.D.append(darg.as_poly(self.t, expand=False)*Poly(self.t,
                     self.t, expand=False))
-                if self.dummy:
+                if dummy:
                     i = Dummy("i")
                 else:
                     i = Symbol('i')
@@ -530,7 +529,7 @@ def _exp_part(self, exps):
             return None
         return new_extension
 
-    def _log_part(self, logs):
+    def _log_part(self, logs, dummy=True):
         """
         Try to build a logarithmic extension.
 
@@ -571,7 +570,7 @@ def _log_part(self, logs):
                 self.L_K.append(len(self.T) - 1)
                 self.D.append(cancel(darg.as_expr()/arg).as_poly(self.t,
                     expand=False))
-                if self.dummy:
+                if dummy:
                     i = Dummy("i")
                 else:
                     i = Symbol('i')
@@ -596,16 +595,12 @@ def _important_attrs(self):
         return (self.fa, self.fd, self.D, self.T, self.Tfuncs,
             self.backsubs, self.E_K, self.E_args, self.L_K, self.L_args)
 
-    def __repr__(self):
-        return 'DifferentialExtension(extension=dict(fa=%s, fd=%s, D=%s))' % \
-                (self.fa, self.fd, self.D)
+    # TODO: Implement __repr__
 
     def __str__(self):
-        return "{'fa': %s, 'fd': %s, 'D': %s, 'T': %s, 'Tfuncs': %s, " \
-            "'backsubs': %s, 'E_K': %s, 'E_args': %s, 'L_K': %s, 'L_args': %s}" % \
-            (tuple(self._important_attrs[i] for i in range(10)))
+        return str(self._important_attrs)
 
-    def reset(self):
+    def reset(self, dummy=True):
         """
         Reset self to an initial state.  Used by __init__.
         """
@@ -614,7 +609,7 @@ def reset(self):
         self.D = [Poly(1, self.x)]
         self.level = -1
         self.L_K, self.E_K, self.L_args, self.E_args = [], [], [], []
-        if self.dummy:
+        if dummy:
             self.ts = numbered_symbols('t', cls=Dummy)
         else:
             # For testing
@@ -1673,8 +1668,7 @@ def risch_integrate(f, x, extension=None, handle_first='log',
     """
     f = S(f)
 
-    DE = extension or DifferentialExtension(f, x, handle_first=handle_first,
-            dummy=True, rewrite_complex=rewrite_complex)
+    DE = extension or DifferentialExtension(f, x, handle_first=handle_first, rewrite_complex=rewrite_complex)
     fa, fd = DE.fa, DE.fd
 
     result = S(0)
diff --git a/sympy/sets/sets.py b/sympy/sets/sets.py
index ab2515ba5d..ab88ed7d7c 100644
--- a/sympy/sets/sets.py
+++ b/sympy/sets/sets.py
@@ -1866,13 +1866,8 @@ class FiniteSet(Set, EvalfMixin):
     True
 
     >>> members = [1, 2, 3, 4]
-    >>> f = FiniteSet(*members)
-    >>> f
+    >>> FiniteSet(*members)
     {1, 2, 3, 4}
-    >>> f - FiniteSet(2)
-    {1, 3, 4}
-    >>> f + FiniteSet(2, 5)
-    {1, 2, 3, 4, 5}
 
     References
     ==========
diff --git a/sympy/solvers/solvers.py b/sympy/solvers/solvers.py
index e83053a9d3..ada1ce295f 100644
--- a/sympy/solvers/solvers.py
+++ b/sympy/solvers/solvers.py
@@ -878,15 +878,11 @@ def _sympified_list(w):
             for fi in f:
                 pot = preorder_traversal(fi)
                 for p in pot:
-                    if not (p.is_number or p.is_Add or p.is_Mul) or \
-                            isinstance(p, AppliedUndef):
+                    if isinstance(p, AppliedUndef):
                         flags['dict'] = True  # better show symbols
                         symbols.add(p)
                         pot.skip()  # don't go any deeper
         symbols = list(symbols)
-        # supply dummy symbols so solve(3) behaves like solve(3, x)
-        for i in range(len(f) - len(symbols)):
-            symbols.append(Dummy())
 
         ordered_symbols = False
     elif len(symbols) == 1 and iterable(symbols[0]):


Test patch:
diff --git a/sympy/integrals/tests/test_risch.py b/sympy/integrals/tests/test_risch.py
index 41cb6541e9..a0ad2fe2ae 100644
--- a/sympy/integrals/tests/test_risch.py
+++ b/sympy/integrals/tests/test_risch.py
@@ -405,51 +405,56 @@ def test_integer_powers():
 
 
 def test_DifferentialExtension_exp():
-    assert DifferentialExtension(exp(x) + exp(x**2), x)._important_attrs == \
+    assert DifferentialExtension(exp(x) + exp(x**2), x, dummy=False)._important_attrs == \
         (Poly(t1 + t0, t1), Poly(1, t1), [Poly(1, x,), Poly(t0, t0),
         Poly(2*x*t1, t1)], [x, t0, t1], [Lambda(i, exp(i)),
         Lambda(i, exp(i**2))], [], [1, 2], [x, x**2], [], [])
-    assert DifferentialExtension(exp(x) + exp(2*x), x)._important_attrs == \
+    assert DifferentialExtension(exp(x) + exp(2*x), x, dummy=False)._important_attrs == \
         (Poly(t0**2 + t0, t0), Poly(1, t0), [Poly(1, x), Poly(t0, t0)], [x, t0],
         [Lambda(i, exp(i))], [], [1], [x], [], [])
-    assert DifferentialExtension(exp(x) + exp(x/2), x)._important_attrs == \
+    assert DifferentialExtension(exp(x) + exp(x/2), x, dummy=False)._important_attrs == \
         (Poly(t0**2 + t0, t0), Poly(1, t0), [Poly(1, x), Poly(t0/2, t0)],
         [x, t0], [Lambda(i, exp(i/2))], [], [1], [x/2], [], [])
-    assert DifferentialExtension(exp(x) + exp(x**2) + exp(x + x**2), x)._important_attrs == \
+    assert DifferentialExtension(exp(x) + exp(x**2) + exp(x + x**2), x,
+            dummy=False)._important_attrs == \
         (Poly((1 + t0)*t1 + t0, t1), Poly(1, t1), [Poly(1, x), Poly(t0, t0),
         Poly(2*x*t1, t1)], [x, t0, t1], [Lambda(i, exp(i)),
         Lambda(i, exp(i**2))], [], [1, 2], [x, x**2], [], [])
-    assert DifferentialExtension(exp(x) + exp(x**2) + exp(x + x**2 + 1), x)._important_attrs == \
+    assert DifferentialExtension(exp(x) + exp(x**2) + exp(x + x**2 + 1), x,
+            dummy=False)._important_attrs == \
         (Poly((1 + S.Exp1*t0)*t1 + t0, t1), Poly(1, t1), [Poly(1, x),
         Poly(t0, t0), Poly(2*x*t1, t1)], [x, t0, t1], [Lambda(i, exp(i)),
         Lambda(i, exp(i**2))], [], [1, 2], [x, x**2], [], [])
-    assert DifferentialExtension(exp(x) + exp(x**2) + exp(x/2 + x**2), x)._important_attrs == \
+    assert DifferentialExtension(exp(x) + exp(x**2) + exp(x/2 + x**2), x,
+            dummy=False)._important_attrs == \
         (Poly((t0 + 1)*t1 + t0**2, t1), Poly(1, t1), [Poly(1, x),
         Poly(t0/2, t0), Poly(2*x*t1, t1)], [x, t0, t1],
         [Lambda(i, exp(i/2)), Lambda(i, exp(i**2))],
         [(exp(x/2), sqrt(exp(x)))], [1, 2], [x/2, x**2], [], [])
-    assert DifferentialExtension(exp(x) + exp(x**2) + exp(x/2 + x**2 + 3), x)._important_attrs == \
+    assert DifferentialExtension(exp(x) + exp(x**2) + exp(x/2 + x**2 + 3), x,
+    dummy=False)._important_attrs == \
         (Poly((t0*exp(3) + 1)*t1 + t0**2, t1), Poly(1, t1), [Poly(1, x),
         Poly(t0/2, t0), Poly(2*x*t1, t1)], [x, t0, t1], [Lambda(i, exp(i/2)),
         Lambda(i, exp(i**2))], [(exp(x/2), sqrt(exp(x)))], [1, 2], [x/2, x**2],
         [], [])
-    assert DifferentialExtension(sqrt(exp(x)), x)._important_attrs == \
+    assert DifferentialExtension(sqrt(exp(x)), x, dummy=False)._important_attrs == \
         (Poly(t0, t0), Poly(1, t0), [Poly(1, x), Poly(t0/2, t0)], [x, t0],
         [Lambda(i, exp(i/2))], [(exp(x/2), sqrt(exp(x)))], [1], [x/2], [], [])
 
-    assert DifferentialExtension(exp(x/2), x)._important_attrs == \
+    assert DifferentialExtension(exp(x/2), x, dummy=False)._important_attrs == \
         (Poly(t0, t0), Poly(1, t0), [Poly(1, x), Poly(t0/2, t0)], [x, t0],
         [Lambda(i, exp(i/2))], [], [1], [x/2], [], [])
 
 
 def test_DifferentialExtension_log():
-    assert DifferentialExtension(log(x)*log(x + 1)*log(2*x**2 + 2*x), x)._important_attrs == \
+    assert DifferentialExtension(log(x)*log(x + 1)*log(2*x**2 + 2*x), x,
+        dummy=False)._important_attrs == \
         (Poly(t0*t1**2 + (t0*log(2) + t0**2)*t1, t1), Poly(1, t1),
         [Poly(1, x), Poly(1/x, t0),
         Poly(1/(x + 1), t1, expand=False)], [x, t0, t1],
         [Lambda(i, log(i)), Lambda(i, log(i + 1))], [], [], [],
         [1, 2], [x, x + 1])
-    assert DifferentialExtension(x**x*log(x), x)._important_attrs == \
+    assert DifferentialExtension(x**x*log(x), x, dummy=False)._important_attrs == \
         (Poly(t0*t1, t1), Poly(1, t1), [Poly(1, x), Poly(1/x, t0),
         Poly((1 + t0)*t1, t1)], [x, t0, t1], [Lambda(i, log(i)),
         Lambda(i, exp(t0*i))], [(exp(x*log(x)), x**x)], [2], [t0*x], [1], [x])
@@ -457,24 +462,26 @@ def test_DifferentialExtension_log():
 
 def test_DifferentialExtension_symlog():
     # See comment on test_risch_integrate below
-    assert DifferentialExtension(log(x**x), x)._important_attrs == \
+    assert DifferentialExtension(log(x**x), x, dummy=False)._important_attrs == \
         (Poly(t0*x, t1), Poly(1, t1), [Poly(1, x), Poly(1/x, t0), Poly((t0 +
             1)*t1, t1)], [x, t0, t1], [Lambda(i, log(i)), Lambda(i, exp(i*t0))],
             [(exp(x*log(x)), x**x)], [2], [t0*x], [1], [x])
-    assert DifferentialExtension(log(x**y), x)._important_attrs == \
+    assert DifferentialExtension(log(x**y), x, dummy=False)._important_attrs == \
         (Poly(y*t0, t0), Poly(1, t0), [Poly(1, x), Poly(1/x, t0)], [x, t0],
         [Lambda(i, log(i))], [(y*log(x), log(x**y))], [], [], [1], [x])
-    assert DifferentialExtension(log(sqrt(x)), x)._important_attrs == \
+    assert DifferentialExtension(log(sqrt(x)), x, dummy=False)._important_attrs == \
         (Poly(t0, t0), Poly(2, t0), [Poly(1, x), Poly(1/x, t0)], [x, t0],
         [Lambda(i, log(i))], [(log(x)/2, log(sqrt(x)))], [], [], [1], [x])
 
 
 def test_DifferentialExtension_handle_first():
-    assert DifferentialExtension(exp(x)*log(x), x, handle_first='log')._important_attrs == \
+    assert DifferentialExtension(exp(x)*log(x), x, handle_first='log',
+    dummy=False)._important_attrs == \
         (Poly(t0*t1, t1), Poly(1, t1), [Poly(1, x), Poly(1/x, t0),
         Poly(t1, t1)], [x, t0, t1], [Lambda(i, log(i)), Lambda(i, exp(i))],
         [], [2], [x], [1], [x])
-    assert DifferentialExtension(exp(x)*log(x), x, handle_first='exp')._important_attrs == \
+    assert DifferentialExtension(exp(x)*log(x), x, handle_first='exp',
+    dummy=False)._important_attrs == \
         (Poly(t0*t1, t1), Poly(1, t1), [Poly(1, x), Poly(t0, t0),
         Poly(1/x, t1)], [x, t0, t1], [Lambda(i, exp(i)), Lambda(i, log(i))],
         [], [1], [x], [2], [x])
@@ -482,9 +489,9 @@ def test_DifferentialExtension_handle_first():
     # This one must have the log first, regardless of what we set it to
     # (because the log is inside of the exponential: x**x == exp(x*log(x)))
     assert DifferentialExtension(-x**x*log(x)**2 + x**x - x**x/x, x,
-    handle_first='exp')._important_attrs == \
+    handle_first='exp', dummy=False)._important_attrs == \
         DifferentialExtension(-x**x*log(x)**2 + x**x - x**x/x, x,
-        handle_first='log')._important_attrs == \
+        handle_first='log', dummy=False)._important_attrs == \
         (Poly((-1 + x - x*t0**2)*t1, t1), Poly(x, t1),
             [Poly(1, x), Poly(1/x, t0), Poly((1 + t0)*t1, t1)], [x, t0, t1],
             [Lambda(i, log(i)), Lambda(i, exp(t0*i))], [(exp(x*log(x)), x**x)],
@@ -493,7 +500,7 @@ def test_DifferentialExtension_handle_first():
 
 def test_DifferentialExtension_all_attrs():
     # Test 'unimportant' attributes
-    DE = DifferentialExtension(exp(x)*log(x), x, handle_first='exp')
+    DE = DifferentialExtension(exp(x)*log(x), x, dummy=False, handle_first='exp')
     assert DE.f == exp(x)*log(x)
     assert DE.newf == t0*t1
     assert DE.x == x
@@ -544,21 +551,21 @@ def test_DifferentialExtension_extension_flag():
 
 def test_DifferentialExtension_misc():
     # Odd ends
-    assert DifferentialExtension(sin(y)*exp(x), x)._important_attrs == \
+    assert DifferentialExtension(sin(y)*exp(x), x, dummy=False)._important_attrs == \
         (Poly(sin(y)*t0, t0, domain='ZZ[sin(y)]'), Poly(1, t0, domain='ZZ'),
         [Poly(1, x, domain='ZZ'), Poly(t0, t0, domain='ZZ')], [x, t0],
         [Lambda(i, exp(i))], [], [1], [x], [], [])
     raises(NotImplementedError, lambda: DifferentialExtension(sin(x), x))
-    assert DifferentialExtension(10**x, x)._important_attrs == \
+    assert DifferentialExtension(10**x, x, dummy=False)._important_attrs == \
         (Poly(t0, t0), Poly(1, t0), [Poly(1, x), Poly(log(10)*t0, t0)], [x, t0],
         [Lambda(i, exp(i*log(10)))], [(exp(x*log(10)), 10**x)], [1], [x*log(10)],
         [], [])
-    assert DifferentialExtension(log(x) + log(x**2), x)._important_attrs in [
+    assert DifferentialExtension(log(x) + log(x**2), x, dummy=False)._important_attrs in [
         (Poly(3*t0, t0), Poly(2, t0), [Poly(1, x), Poly(2/x, t0)], [x, t0],
         [Lambda(i, log(i**2))], [], [], [], [1], [x**2]),
         (Poly(3*t0, t0), Poly(1, t0), [Poly(1, x), Poly(1/x, t0)], [x, t0],
         [Lambda(i, log(i))], [], [], [], [1], [x])]
-    assert DifferentialExtension(S.Zero, x)._important_attrs == \
+    assert DifferentialExtension(S.Zero, x, dummy=False)._important_attrs == \
         (Poly(0, x), Poly(1, x), [Poly(1, x)], [x], [], [], [], [], [], [])
 
 
@@ -566,7 +573,7 @@ def test_DifferentialExtension_Rothstein():
     # Rothstein's integral
     f = (2581284541*exp(x) + 1757211400)/(39916800*exp(3*x) +
     119750400*exp(x)**2 + 119750400*exp(x) + 39916800)*exp(1/(exp(x) + 1) - 10*x)
-    assert DifferentialExtension(f, x)._important_attrs == \
+    assert DifferentialExtension(f, x, dummy=False)._important_attrs == \
         (Poly((1757211400 + 2581284541*t0)*t1, t1), Poly(39916800 +
         119750400*t0 + 119750400*t0**2 + 39916800*t0**3, t1),
         [Poly(1, x), Poly(t0, t0), Poly(-(10 + 21*t0 + 10*t0**2)/(1 + 2*t0 +
@@ -581,7 +588,7 @@ class TestingException(Exception):
 
 
 def test_DecrementLevel():
-    DE = DifferentialExtension(x*log(exp(x) + 1), x)
+    DE = DifferentialExtension(x*log(exp(x) + 1), x, dummy=False)
     assert DE.level == -1
     assert DE.t == t1
     assert DE.d == Poly(t0/(t0 + 1), t1)
@@ -665,14 +672,3 @@ def test_xtothex():
     a = risch_integrate(x**x, x)
     assert a == NonElementaryIntegral(x**x, x)
     assert isinstance(a, NonElementaryIntegral)
-
-
-def test_DifferentialExtension_printing():
-    DE = DifferentialExtension(exp(2*x**2) + log(exp(x**2) + 1), x)
-    assert repr(DE) == "DifferentialExtension(extension=dict(fa=Poly(t1 + t0**2, t1, domain='ZZ[t0]'), " \
-        "fd=Poly(1, t1, domain='ZZ'), D=[Poly(1, x, domain='ZZ'), Poly(2*x*t0, t0, domain='ZZ[x]'), " \
-        "Poly(2*t0*x/(t0 + 1), t1, domain='ZZ(x,t0)')]))"
-    assert str(DE) == "{'fa': Poly(t1 + t0**2, t1, domain='ZZ[t0]'), 'fd': Poly(1, t1, domain='ZZ'), " \
-        "'D': [Poly(1, x, domain='ZZ'), Poly(2*x*t0, t0, domain='ZZ[x]'), Poly(2*t0*x/(t0 + 1), t1, domain='ZZ(x,t0)')], " \
-        "'T': [x, t0, t1], 'Tfuncs': [Lambda(i, exp(i**2)), Lambda(i, log(t0 + 1))], 'backsubs': [], " \
-        "'E_K': [1], 'E_args': [x**2], 'L_K': [2], 'L_args': [t0 + 1]}"
diff --git a/sympy/solvers/tests/test_solvers.py b/sympy/solvers/tests/test_solvers.py
index a4fd893efa..b01bb72cd8 100644
--- a/sympy/solvers/tests/test_solvers.py
+++ b/sympy/solvers/tests/test_solvers.py
@@ -107,7 +107,7 @@ def test_solve_args():
     assert solve([x + y - 3, x - y - 5]) == {x: 4, y: -1}
     assert solve(x - exp(x), x, implicit=True) == [exp(x)]
     # no symbol to solve for
-    assert solve(42) == []
+    assert solve(42) == solve(42, x) == []
     assert solve([1, 2]) == []
     # duplicate symbols removed
     assert solve((x - 3, y + 2), x, y, x) == {x: 3, y: -2}
@@ -1872,3 +1872,25 @@ def test_denoms():
     assert denoms(1/x + 1/y + 1/z, [x, y]) == set([x, y])
     assert denoms(1/x + 1/y + 1/z, x, y) == set([x, y])
     assert denoms(1/x + 1/y + 1/z, set([x, y])) == set([x, y])
+
+def test_issue_12476():
+    x0, x1, x2, x3, x4, x5 = symbols('x0 x1 x2 x3 x4 x5')
+    eqns = [x0**2 - x0, x0*x1 - x1, x0*x2 - x2, x0*x3 - x3, x0*x4 - x4, x0*x5 - x5,
+            x0*x1 - x1, -x0/3 + x1**2 - 2*x2/3, x1*x2 - x1/3 - x2/3 - x3/3,
+            x1*x3 - x2/3 - x3/3 - x4/3, x1*x4 - 2*x3/3 - x5/3, x1*x5 - x4, x0*x2 - x2,
+            x1*x2 - x1/3 - x2/3 - x3/3, -x0/6 - x1/6 + x2**2 - x2/6 - x3/3 - x4/6,
+            -x1/6 + x2*x3 - x2/3 - x3/6 - x4/6 - x5/6, x2*x4 - x2/3 - x3/3 - x4/3,
+            x2*x5 - x3, x0*x3 - x3, x1*x3 - x2/3 - x3/3 - x4/3,
+            -x1/6 + x2*x3 - x2/3 - x3/6 - x4/6 - x5/6,
+            -x0/6 - x1/6 - x2/6 + x3**2 - x3/3 - x4/6, -x1/3 - x2/3 + x3*x4 - x3/3,
+            -x2 + x3*x5, x0*x4 - x4, x1*x4 - 2*x3/3 - x5/3, x2*x4 - x2/3 - x3/3 - x4/3,
+            -x1/3 - x2/3 + x3*x4 - x3/3, -x0/3 - 2*x2/3 + x4**2, -x1 + x4*x5, x0*x5 - x5,
+            x1*x5 - x4, x2*x5 - x3, -x2 + x3*x5, -x1 + x4*x5, -x0 + x5**2, x0 - 1]
+    sols = [{x0: 1, x3: S(1)/6, x2: S(1)/6, x4: -S(2)/3, x1: -S(2)/3, x5: 1},
+            {x0: 1, x3: S(1)/2, x2: -S(1)/2, x4: 0, x1: 0, x5: -1},
+            {x0: 1, x3: -S(1)/3, x2: -S(1)/3, x4: S(1)/3, x1: S(1)/3, x5: 1},
+            {x0: 1, x3: 1, x2: 1, x4: 1, x1: 1, x5: 1},
+            {x0: 1, x3: -S(1)/3, x2: S(1)/3, x4: sqrt(5)/3, x1: -sqrt(5)/3, x5: -1},
+            {x0: 1, x3: -S(1)/3, x2: S(1)/3, x4: -sqrt(5)/3, x1: sqrt(5)/3, x5: -1}]
+
+    assert solve(eqns) == sols