Lemma is a proven statement used for proving another statement while algorithm is a series of well defined steps which gives a procedure for solving a type of a problem. Euclid's division lemma: For given any positive integers a and b there exist unique integers q and r satisfying a = bq + r, 0 ≤ r < b.