I want to make a non-complex (for algorithmic implementation) logical condition to test whether some real interval contains any integer points.
Let $x$ be an interval with bounds $l, r$;
Let $LI(x)$ be a predicate that holds if $x$'s left boundary is inclusive and $RI(x)$ be a predicate that holds if $x$'s right boundary is inclusive.
Finally, let $P(x)$ be a predicate which holds if $x$ does contain at least one integer point.
Here's what I have produced so far:
$P(x) \equiv (\lfloor l \rfloor + 1 < r) \lor (RI(x) \land (r \in \mathbb Z) ) \lor (LI(x) \land (l \in \mathbb Z))$
Is this insufficient or superfluous? Can anyone make up a better formula? Thank you!