Algorithm is a list of well-defined steps for achieving a task and lemma (or theorem) is a proven statement that can be used for solving larger problems.

Lemma and theorem are fomally same.

Consider Pythagoras Theorem. It is having well defined steps to find the hypotenuse of a right triangle.

Let us now consider Euclid's division lemma.

For a pair of given positive integers ?a? and ?b?, there exist unique integers ?q? and ?r? such that

a = bq + r, where, 0 less or equal than r less than b