Consider a real valued function defined on reals defined by
-for x<0, the value of the function is 0
-for x greater or equal to 0, the value is 1.
Clearly this function has no limit at 0, being discontinuous.
I wrote the following code
p[x_] := Piecewise[{{ 0, x < 0}, {1, x >= 0}}]
(*Plot[p,{x,-1,1},PlotStyle->Thick,ImageSize->150]
*) Limit[p, x -> 0]
The result suplied is 1. I do not understand why.
Please, can someone explain me why is so. Thanks!