# Example

I've managed to boil down the expression to the following (divergent) example:

$Assumptions=Element[x,Reals]&&0<x<1&&Element[ep,Reals]&&-1/1000<ep<0; foo=x^(-1-ep)*(j[x]*nn[x,0]^(2-2*ep) +(nn[0,0]^(2-2*ep)-nn[0,y]^(2-2*ep) -(ff[x]*nn[x,0]^(2-2*ep))/ff[0] +(ff[x]*nn[x,y]^(2-2*ep))/ff[0])); Limit[foo,x->0,Analytic->True]  The result is \[Infinity] j[0] nn[0, 0]^(2 - 2 ep) which is fine, since I expect the expression to be divergent. The first evaluation of the Limit command yields the messages Series::cas: "Warning: contradictory assumption(s) Re[x]>4096&&-(1/4096)<Im[x]<1/4096&&x\[Element]Reals&&0<x<1&&ep\[Element]Reals&&-(1/1000)<ep<0 encountered." Series::cas: "Warning: contradictory assumption(s) Re[x]>4096&&-(1/4096)<Im[x]<1/4096&&x\[Element]Reals&&0<x<1&&ep\[Element]Reals&&-(1/1000)<ep<0 encountered."  What bothers me are the additional assumptions Re[x]>4096&&-(1/4096)<Im[x]<1/4096 which seem to be added inerternally by Series (which is at the heart of Limit if I understand things correctly). # Question What exacly leads to these messages and how can I avoid them in general? I know that I can turn off messages using Quiet or more selectively using Off. I am more interested in getting to the root cause of this problem since I would like to use code based upon this to automatically detect divergent (sub-)expressions. I found the somewhat related question Difficulty with computing a limit. However, the answer only addresses how to work around the problem in the specific case of the question. # Further observations If I evaluate the command a second time there are no messages. After calling ClearSystemCache[] the messages reappar during the next evaluation. I suppose that the results of the call to Series are being cached. If I supply the same assumptions to Limit directly via the option Assumptions, no messages appear: ClearSystemCache[];$Assumptions=True;
Limit[foo,x->0,Analytic->True,
Assumptions->Element[x,Reals]&&0<x<1&&Element[ep,Reals]&&-1/1000<ep<0]


Using Assuming leads to messages, just like when using \$Assumptions.

Further stripping down the example by removing subexpressions usually gets rid of the messages.

I've encountered this behaviour in Mathematica 11.0.1.0, 11.0.0.0, 10.2.0.0, 9.0.1.0 on Linux x86 (64bit).

Limit::alimv: Warning: Assumptions that involve the limit variable are ignored.

One can only influence the limit variable via the Direction option of Limit.