  A prefix monoid is a finitely generated submonoid of a finitely presented
group generated by the prefixes of its defining relators. Important results of
Guba (1997), and of Ivanov, Margolis and Meakin (2001), show how the word
problem for certain one-relator monoids, and inverse monoids, can be reduced to
solving the membership problem in prefix monoids of certain one-relator groups.
Motivated by this, in this paper we study the class of prefix monoids of
finitely presented groups. We obtain a complete description of this class of
monoids. All monoids in this family are finitely generated, recursively
presented and group-embeddable. Our results show that not every finitely
generated recursively presented group-embeddable monoid is a prefix monoid, but
for every such monoid if we take a free product with a suitably chosen free
monoid of finite rank, then we do obtain a prefix monoid. Conversely we prove
that every prefix monoid arises in this way. Also, we show that the groups that
arise as groups of units of prefix monoids are precisely the finitely generated
recursively presented groups, while the groups that arise as Sch\"utzenberger
groups of prefix monoids are exactly the recursively enumerable subgroups of
finitely presented groups. We obtain an analogous result classifying the
Sch\"utzenberger groups of monoids of right units of special inverse monoids.
We also give some examples of right cancellative monoids arising as monoids of
right units of finitely presented special inverse monoids, and show that not
all right cancellative recursively presented monoids belong to this class.
