float min [ ]/min equals the minimum item in [ ], [ for(int ! ++/min equals the minimum item in [ ], [ - if ( [iminmin [ ]/min equals the minimum item in [ ], [ - ]and == return minat the beginning of each iterationand end of any iterations beforethe invariant "min equals the minimum item in [ ] [ ]is true it starts off trueand the repeated process and update clearly maintain its truth hencewhen the loop terminates with " = "we know that "min equals the minimum item in [ ] [ ]and hence we can be sure that min can be returned as the required minimum value this is kind of proof by inductionthe invariant is true at the start of the loopand is preserved by each iteration of the looptherefore it must be true at the end of the loop as we noted earlierformal proofs of correctness are beyond the scope of these notesbut identifying suitable loop invariants and their implications for algorithm correctness as we go along will certainly be useful exercise we will also see how invariants (sometimes called inductive assertionscan be used to formulate similar correctness proofs concerning properties of data structures that are defined inductively