Mathematical morphology on sets can be understood as a formal language, whose vocabulary comprises erosions, dilations, complementation, intersection and union. This language is complete, that is, it is enough to perform any set operation. Since the
sixties special machines, called morphological machines (MMachs), have been built to implement this language. In the literature, we find hundreds of MMach programs that are used to solve image analysis
problems. However, the design of these programs is not an elementary task. Thus, recently much research effort has been addressed to automating the programming of MMachs. A very promising approach
to this problem is the description of the target operator by input-output pairs of images and the translation of these data into efficient MMach programs. This approach can be decomposed into
two equally important steps: (1) learning of the target operator from pairs of images; (2) search for economical representations for the operators learned. The theory presented in this paper is useful in the second step of this procedure. We present some set operations on collections of closed intervals and give efficient algorithms to perform them. These operations are used to parallelize MMach programs and to prove the equivalence between distinct MMach programs.