Let Ω be a countably infinite set, S = Sym(Ω) the group of permutations of Ω, and E = Self(Ω) the monoid of self-maps of Ω. Given two subgroups G 1 , G 2 ⊆ S, let us write G 1 ≈ S G 2 if there exists a finite subset U ⊆ S such that the groups generated by G 1 ∪ U and G 2 ∪ U are equal. Bergman and Shelah showed that the subgroups which are closed in the function topology on S fall into exactly four equivalence classes with respect to ≈ S . Letting ≈ denote the obvious analog of ≈ S for submonoids of E, we prove an analogous result for a certain class of submonoids of E, from which the theorem for groups can be recovered. Along the way, we show that given two subgroups G 1 , G 2 ⊆ S which are closed in the function topology on S, we have GLet Ω be an arbitrary infinite set, and set E = Self(Ω), the monoid of self-maps of Ω. Elements of E will be written to the right of their arguments. If U ⊆ E is a subset, then we will write U to denote the submonoid generated by U. The cardinality of a set Γ will be denoted by |Γ|. If Σ ⊆ Ω and U ⊆ E are subsets, letDefinition 1. Let M be a monoid that is not finitely generated. Then the cofinality c(M) of M is the least cardinal κ such that M can be expressed as the union of an increasing chain of κ proper submonoids.The main goal of this section is to show that c(E) > |Ω|, which will be needed later on.This section is modeled on Sections 1 and 2 of [2], where analogous statements are proved for the group of all permutations of Ω. Ring-theoretic analogs of these statements are proved in [10].Lemma 2. Let U ⊆ E and Σ ⊆ Ω be such that |Σ| = |Ω| and the set of self-maps of Σ induced by U {Σ} is all of Self(Σ). Then E = gUh, for some g, h ∈ E.Proof. Let g ∈ E be a map that takes Ω bijectively to Σ, and let h ∈ E be a map whose restriction to Σ is the right inverse of g. Then E = gU {Σ} h.We will say that Σ ⊆ Ω is a moiety if |Σ| = |Ω| = |Ω\Σ|. A moiety Σ ⊆ Ω is called full with respect to U ⊆ E if the set of self-maps of Σ induced by members of U {Σ} is all of Self(Σ). The following two results are modeled on group-theoretic results in [9].Lemma 3 (cf. [2, Lemma 3]). Let (U i ) i∈I be any family of subsets of E such that i∈I U i = E and |I| ≤ |Ω|. Then Ω contains a full moiety with respect to some U i .Proof. Since |Ω| is infinite and |I| ≤ |Ω|, we can write Ω as a union of disjoint moieties Σ i , i ∈ I. Suppose that there are no full moieties with respect to U i for any i ∈ I. Then in particular, Σ i is not full with respect to U i for any i ∈ I. Hence, for every i ∈ I there exists a map f i ∈ Self(Σ i ) which is not the restriction to Σ i of any member of (U i ) {Σ i } . Now, if we take f ∈ E to be the map whose restriction to each Σ i is f i , then f is not in U i for any i ∈ I, contradicting i∈I U i = E. Proposition 4. c(E) > |Ω|.Proof. Suppose that (M i ) i∈I is a chain of submonoids of E such that i∈I M i = E and |I| ≤ |Ω|. We will show that E = M i for some i ∈ I.By the preceding lemma, Ω contains a full moiety with respect to some M i . Thus, Lemma 2 implies that E = M i ∪ ...