A visual introduction to proving loops correct
A loop invariant is like a bookmark that always tells you the truth about what you've read so far.
Like dominoes: if the first falls (Init) and each pushes the next (Maintenance), all will fall!
A good loop invariant captures "what progress have we made so far". At each iteration, it describes the partial result computed up to that point. When the loop finishes, this partial result becomes the complete answer!