I am guilty of writing things like the following in proofs:
so by lemma 1.2 we have that for $k<n$ all of the integers $k,k+1,k+2,k+3,\dots ,n$ are pompous.
I really like how this looks, the problem is that $k+3$ might be larger than $n$, so I think this is technically wrong.
Is this sort of thing frowned upon? How do you avoid this problem? Is it ok to do this?
It depends on your audience. If your readers are mathematically quite immatrue, such a phrase might cause trouble. But in general, there's only one possible interpretation, so why bother spelling out the other cases?