Repository: sympy/sympy

Issue:
fibonacci(n).limit(n, oo) should be oo rather than fibonacci(oo)
This is consistent with `factorial(n).limit(n, oo)`, `subfactorial(n).limit(n, oo)`, etc.

Discussion:

Patch:
diff --git a/AUTHORS b/AUTHORS
index 07e0a52f59..f4cfe080ae 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -390,7 +390,3 @@ Chris Swierczewski <cswiercz@gmail.com>
 Sumith <sumith1896@gmail.com>
 Konstantin Togoi <togoi.konstantin@outlook.com>
 Param Singh <paramsingh258@gmail.com>
-Philippe Bouafia <philippe.bouafia@ensea.fr>
-Lucas Jones <lucas@lucasjones.co.uk>
-Peter Schmidt <peter@peterjs.com>
-Jiaxing Liang <liangjiaxing57@gmail.com>
diff --git a/doc/src/aboutus.rst b/doc/src/aboutus.rst
index 1f02eff625..c40452b128 100644
--- a/doc/src/aboutus.rst
+++ b/doc/src/aboutus.rst
@@ -395,10 +395,6 @@ want to be mentioned here, so see our repository history for a full list).
 #. Sumith: implemented columnspace of a matrix
 #. Konstantin Togoi: added truth_table and binary digit utilities to boolalg
 #. Param Singh: added missing units from mks system
-#. Philippe Bouafia: Fixed a typo.
-#. Lucas Jones: Add a test in integrals
-#. Peter Schmidt: Removed duplicate tests
-#. Jiaxing Liang: Fix infinite recursion issue in test_f
 
 Up-to-date list in the order of the first contribution is given in the `AUTHORS
 <https://github.com/sympy/sympy/blob/master/AUTHORS>`_ file.
diff --git a/examples/galgebra/physics_check_latex.py b/examples/galgebra/physics_check_latex.py
index 3b69622d9c..e7dda69f59 100755
--- a/examples/galgebra/physics_check_latex.py
+++ b/examples/galgebra/physics_check_latex.py
@@ -28,7 +28,7 @@ def Maxwells_Equations_in_Geometric_Calculus():
     print('\\text{Electromagnetic Field Bi-Vector\\;\\;} F = E+IB =', F)
     print('%\\text{Four Current Density\\;\\;} J =', J)
     gradF = grad*F
-    print('#Geometric Derivative of Electromagnetic Field Bi-Vector')
+    print('#Geometric Derivative of Electomagnetic Field Bi-Vector')
     gradF.Fmt(3, 'grad*F')
 
     print('#Maxwell Equations')
diff --git a/examples/intermediate/coupled_cluster.py b/examples/intermediate/coupled_cluster.py
index eebda39f4c..5f5ab28b92 100755
--- a/examples/intermediate/coupled_cluster.py
+++ b/examples/intermediate/coupled_cluster.py
@@ -88,7 +88,7 @@ def main():
     comm4 = evaluate_deltas(comm4)
     comm4 = substitute_dummies(comm4)
 
-    print("construct Hausdorff expansion...")
+    print("construct Hausdoff expansion...")
     eq = H + comm1 + comm2/2 + comm3/6 + comm4/24
     eq = eq.expand()
     eq = evaluate_deltas(eq)
diff --git a/sympy/functions/combinatorial/numbers.py b/sympy/functions/combinatorial/numbers.py
index 6c10e4e1ab..b639372835 100644
--- a/sympy/functions/combinatorial/numbers.py
+++ b/sympy/functions/combinatorial/numbers.py
@@ -96,6 +96,9 @@ def _fibpoly(n, prev):
 
     @classmethod
     def eval(cls, n, sym=None):
+        if n is S.Infinity:
+            return S.Infinity
+
         if n.is_Integer:
             n = int(n)
             if n < 0:
@@ -142,6 +145,9 @@ class lucas(Function):
 
     @classmethod
     def eval(cls, n):
+        if n is S.Infinity:
+            return S.Infinity
+
         if n.is_Integer:
             return fibonacci(n + 1) + fibonacci(n - 1)
 
diff --git a/sympy/functions/elementary/exponential.py b/sympy/functions/elementary/exponential.py
index 01559e77d8..8b9881d7e3 100644
--- a/sympy/functions/elementary/exponential.py
+++ b/sympy/functions/elementary/exponential.py
@@ -687,9 +687,6 @@ def _eval_is_positive(self):
     def _eval_is_zero(self):
         return (self.args[0] - 1).is_zero
 
-    def _eval_is_nonnegative(self):
-        return (self.args[0] - 1).is_nonnegative
-
     def _eval_nseries(self, x, n, logx):
         # NOTE Please see the comment at the beginning of this file, labelled
         #      IMPORTANT.
diff --git a/sympy/functions/elementary/trigonometric.py b/sympy/functions/elementary/trigonometric.py
index df0117467b..4ad9068349 100644
--- a/sympy/functions/elementary/trigonometric.py
+++ b/sympy/functions/elementary/trigonometric.py
@@ -1942,9 +1942,6 @@ def _eval_is_rational(self):
     def _eval_is_positive(self):
         return self.args[0].is_positive
 
-    def _eval_is_nonnegative(self):
-        return self.args[0].is_nonnegative
-
     @classmethod
     def eval(cls, arg):
         if arg.is_Number:


Test patch:
diff --git a/bin/coverage_doctest.py b/bin/coverage_doctest.py
index dfe02413e7..02e4c77198 100755
--- a/bin/coverage_doctest.py
+++ b/bin/coverage_doctest.py
@@ -396,7 +396,7 @@ def coverage(module_path, verbose=False, no_color=False, sphinx=True):
     contained. It then goes through each of the classes/functions to get
     the docstring and doctest coverage of the module. """
 
-    # Import the package and find members
+    # Import the package and find membmers
     m = None
     try:
         __import__(module_path)
diff --git a/sympy/functions/combinatorial/tests/test_comb_numbers.py b/sympy/functions/combinatorial/tests/test_comb_numbers.py
index 0dd6f62dc1..b201a4ea4a 100644
--- a/sympy/functions/combinatorial/tests/test_comb_numbers.py
+++ b/sympy/functions/combinatorial/tests/test_comb_numbers.py
@@ -60,6 +60,11 @@ def test_fibonacci():
     assert fibonacci(3, x) == x**2 + 1
     assert fibonacci(4, x) == x**3 + 2*x
 
+    # issue #8800
+    n = Dummy('n')
+    assert fibonacci(n).limit(n, S.Infinity) == S.Infinity
+    assert lucas(n).limit(n, S.Infinity) == S.Infinity
+
 
 def test_bell():
     assert [bell(n) for n in range(8)] == [1, 1, 2, 5, 15, 52, 203, 877]
diff --git a/sympy/functions/elementary/tests/test_exponential.py b/sympy/functions/elementary/tests/test_exponential.py
index a2057365d8..279254d9dd 100644
--- a/sympy/functions/elementary/tests/test_exponential.py
+++ b/sympy/functions/elementary/tests/test_exponential.py
@@ -1,5 +1,5 @@
 from sympy import (
-    symbols, log, ln, Float, nan, oo, zoo, I, pi, E, exp, Symbol,
+    symbols, log, Float, nan, oo, zoo, I, pi, E, exp, Symbol,
     LambertW, sqrt, Rational, expand_log, S, sign, conjugate,
     sin, cos, sinh, cosh, tanh, exp_polar, re, Function, simplify)
 
@@ -444,7 +444,6 @@ def test_log_product():
     expr = log(Product(-2, (n, 0, 4)))
     assert simplify(expr) == expr
 
-
 def test_issue_8866():
     x = Symbol('x')
     assert simplify(log(x, 10, evaluate=False)) == simplify(log(x, 10))
@@ -457,10 +456,3 @@ def test_issue_8866():
     b2 = log(exp(y), exp(5), evaluate=False)
     assert simplify(log(l1, b1)) == simplify(log(l2, b2))
     assert expand_log(log(l1, b1)) == expand_log(log(l2, b2))
-
-
-def test_issue_9116():
-    n = Symbol('n', positive=True, integer=True)
-
-    assert ln(n).is_nonnegative is True
-    assert log(n).is_nonnegative is True
diff --git a/sympy/functions/elementary/tests/test_trigonometric.py b/sympy/functions/elementary/tests/test_trigonometric.py
index 5bc62b70d9..f94d1c341f 100644
--- a/sympy/functions/elementary/tests/test_trigonometric.py
+++ b/sympy/functions/elementary/tests/test_trigonometric.py
@@ -1390,8 +1390,3 @@ def test_issue_8653():
     assert sin(n).is_irrational is None
     assert cos(n).is_irrational is None
     assert tan(n).is_irrational is None
-
-
-def test_issue_9157():
-    n = Symbol('n', integer=True, positive=True)
-    atan(n - 1).is_nonnegative is True
diff --git a/sympy/integrals/tests/test_integrals.py b/sympy/integrals/tests/test_integrals.py
index 3b59ab1713..b34db5b37d 100644
--- a/sympy/integrals/tests/test_integrals.py
+++ b/sympy/integrals/tests/test_integrals.py
@@ -1087,9 +1087,3 @@ def test_issue_8901():
     assert integrate(sinh(1.0*x)) == 1.0*cosh(1.0*x)
     assert integrate(tanh(1.0*x)) == 1.0*x - 1.0*log(tanh(1.0*x) + 1)
     assert integrate(tanh(x)) == x - log(tanh(x) + 1)
-
-
-def test_issue_7130():
-    i, L, a, b = symbols('i L a b')
-    integrand = (cos(pi*i*x/L)**2 / (a + b*x)).rewrite(exp)
-    assert x not in integrate(integrand, (x, 0, L)).free_symbols
diff --git a/sympy/series/tests/test_limits.py b/sympy/series/tests/test_limits.py
index bd160ac9fa..16dd4efeae 100644
--- a/sympy/series/tests/test_limits.py
+++ b/sympy/series/tests/test_limits.py
@@ -37,6 +37,9 @@ def test_basic1():
     assert limit(gamma(1/x + 3), x, oo) == 2
     assert limit(S.NaN, x, -oo) == S.NaN
     assert limit(Order(2)*x, x, S.NaN) == S.NaN
+    assert limit(gamma(1/x + 3), x, oo) == 2
+    assert limit(S.NaN, x, -oo) == S.NaN
+    assert limit(Order(2)*x, x, S.NaN) == S.NaN
     assert limit(1/(x - 1), x, 1, dir="+") == oo
     assert limit(1/(x - 1), x, 1, dir="-") == -oo
     assert limit(1/(5 - x)**3, x, 5, dir="+") == -oo
diff --git a/sympy/series/tests/test_residues.py b/sympy/series/tests/test_residues.py
index 23db6f4fee..676f603677 100644
--- a/sympy/series/tests/test_residues.py
+++ b/sympy/series/tests/test_residues.py
@@ -26,8 +26,9 @@ def test_basic2():
 
 
 def _test_f():
+    # FIXME: we get infinite recursion here:
     f = Function("f")
-    assert residue(f(x)/x**5, x, 0) == f(x).diff(x, 4).subs(x, 0)/24
+    assert residue(f(x)/x**5, x, 0) == f.diff(x, 4)/24
 
 
 def test_functions():