Invariant
A statement about a program that stays true the whole way through, even inside a loop. Naming it makes a loop provably correct: "everything before `i` is sorted" tells you when the loop may stop.
- See also: Loop
- See also: Edge case
- Used in: Logic & Problem Solving