In group theory, a branch of mathematics, the commutator collecting process is a method for writing an element of a group as a product of generators and their higher commutators arranged in a certain order. The commutator collecting process was introduced by Philip Hall in 1934 and articulated by Wilhelm Magnus in 1937. The process is sometimes called a "collection process". The process can be generalized to define a totally ordered subset of a free non-associative algebra, that is, a free magma; this subset is called the Hall set. Members of the Hall set are binary trees; these can be placed in one-to-one correspondence with words, these being called the Hall words; the Lyndon words are a special case. Hall sets are used to construct a basis for a free Lie algebra, entirely analogously to the commutator collecting process. Hall words also provide a unique factorization of monoids. The commutator collecting process is usually stated for free groups, as a similar theorem then holds for any group by writing it as a quotient of a free group. Suppose F1 is a free group on generators a1, ..., am. Define the descending central series by putting Fn+1 = [Fn, F1] The basic commutators are elements of F1 defined and ordered as follows: The basic commutators of weight 1 are the generators a1, ..., am. The basic commutators of weight w > 1 are the elements [x, y] where x and y are basic commutators whose weights sum to w, such that x > y and if x = [u, v] for basic commutators u and v then v ≤ y. Commutators are ordered so that x > y if x has weight greater than that of y, and for commutators of any fixed weight some total ordering is chosen. Then Fn /Fn+1 is a finitely generated free abelian group with a basis consisting of basic commutators of weight n. Then any element of F can be written as where the ci are the basic commutators of weight at most m arranged in order, and c is a product of commutators of weight greater than m, and the ni are integers.