Sorry I don't have comment permission.
@Tomas Petricek as you mentioned
A weaker invariant that is also true is that i >= 0 && i < 10 (because this is the continuation condition!)"
How it's a loop invariant?
I hope I am not wrong, as far as I understand[1], Loop invariant will be true at the beginning of the loop (Initialization), it will be true before and after each iteration (Maintenance) and it will also be true after the termination of the loop (Termination). But after the last iteration i becomes 10. So, the condition i >= 0 && i < 10 becomes false and terminates the loop. It violates the third property (Termination) of loop invariant.
[1] http://www.win.tue.nl/~kbuchin/teaching/JBP030/notebooks/loop-invariants.html