4: UCount -= 2; break; } // computed invariant: ICount % 3 == 1 || ICount % 3 == 2 } See also Erlangen program Invariant (physics) Invariant estimator in statistics Invariant theory Invariants of tensors Symmetry in mathematics Graph invariant Knot invariant Topological invariant Invariant differential operator Invariant measure Mathematical constant Mathematical constants and functions Notes References J.D. Fokker, H. Zantema, S.D. Swierstra (1991). "Iteratie en invariatie", Programmeren en Correctheid. Academic Service. . External links "Applet: Visual Invariants in Sorting Algorithms" by William Braynen in 1997 Mathematical terminology