Repository: sympy/sympy

Issue:
Solve ignores dict=True when bools are in the input equations
The docstring for solve says:
```
        'dict'=True (default is False)
            return list (perhaps empty) of solution mappings
```

However when given a list of Eqs where one of the Eqs has auto-evaluated to `True` it doesn't return a list of dicts:
```julia
In [1]: solve([True, Eq(x, 0)], [x])                                                                                                                          
Out[1]: x = 0

In [2]: solve([True, Eq(x, 0)], [x], dict=True)                                                                                                               
Out[2]: x = 0

In [3]: solve([Eq(x, 0)], [x], dict=True)                                                                                                                     
Out[3]: [{x: 0}]
```

Discussion:

Patch:
diff --git a/sympy/solvers/solvers.py b/sympy/solvers/solvers.py
index 97b2e3c707..658eea4048 100644
--- a/sympy/solvers/solvers.py
+++ b/sympy/solvers/solvers.py
@@ -466,7 +466,8 @@ def solve(f, *symbols, **flags):
     * f
         - a single Expr or Poly that must be zero,
         - an Equality
-        - a Relational expression or boolean
+        - a Relational expression
+        - a Boolean
         - iterable of one or more of the above
 
     * symbols (object(s) to solve for) specified as
@@ -919,7 +920,8 @@ def _sympified_list(w):
                        )
                       )
     f, symbols = (_sympified_list(w) for w in [f, symbols])
-
+    if isinstance(f, list):
+        f = [s for s in f if s is not S.true and s is not True]
     implicit = flags.get('implicit', False)
 
     # preprocess symbol(s)
@@ -979,7 +981,7 @@ def _sympified_list(w):
                     fi = fi.rewrite(Add, evaluate=False)
             f[i] = fi
 
-        if isinstance(fi, (bool, BooleanAtom)) or fi.is_Relational:
+        if fi.is_Relational:
             return reduce_inequalities(f, symbols=symbols)
 
         if isinstance(fi, Poly):
@@ -1008,6 +1010,11 @@ def _sympified_list(w):
                 f[i: i + 1] = [fr, fi]
 
     # real/imag handling -----------------------------
+    if any(isinstance(fi, (bool, BooleanAtom)) for fi in f):
+        if flags.get('set', False):
+            return [], set()
+        return []
+
     w = Dummy('w')
     piece = Lambda(w, Piecewise((w, Ge(w, 0)), (-w, True)))
     for i, fi in enumerate(f):


Test patch:
diff --git a/sympy/solvers/tests/test_solvers.py b/sympy/solvers/tests/test_solvers.py
index b71a91aeb8..ce0efd3fb8 100644
--- a/sympy/solvers/tests/test_solvers.py
+++ b/sympy/solvers/tests/test_solvers.py
@@ -164,6 +164,14 @@ def test_solve_args():
     assert solve([(x + y)**2 - 4, x + y - 2]) == [{x: -y + 2}]
     # - linear
     assert solve((x + y - 2, 2*x + 2*y - 4)) == {x: -y + 2}
+    # When one or more args are Boolean
+    assert solve([True, Eq(x, 0)], [x], dict=True) == [{x: 0}]
+    assert solve([Eq(x, x), Eq(x, 0), Eq(x, x+1)], [x], dict=True) == []
+    assert not solve([Eq(x, x+1), x < 2], x)
+    assert solve([Eq(x, 0), x+1<2]) == Eq(x, 0)
+    assert solve([Eq(x, x), Eq(x, x+1)], x) == []
+    assert solve(True, x) == []
+    assert solve([x-1, False], [x], set=True) == ([], set())
 
 
 def test_solve_polynomial1():