A statement that is true upon entering the loop, and after every iteration.
Proving Loop Invariance
Basis
Show that LI holds when entering the loop
Induction Step
We show that LI holds before an iteration and holds after that iteration
A statement that is true upon entering the loop, and after every iteration.
Show that LI holds when entering the loop
We show that LI holds before an iteration and holds after that iteration