The most important use of ylides in synthesis comes from their reactions with aldehydes and ketones, which are initiated in every case by a covalent bonding of the nucleophilic alpha-carbon to the electrophilic carbonyl carbon. Alkylidenephosphorane ylides react to give substituted alkenes in a transformation called the Wittig reaction. This reaction is illustrated by the first three equations below. In each case the new carbon-carbon double bond is colored blue, and the oxygen of the carbonyl reactant is transferred to the phosphorus. The Wittig reaction tolerates epoxides and many other functional groups, as demonstrated by reaction # 1. The carbanionic center may also be substituted, as in reactions # 2 & 3. A principal advantage of alkene synthesis by the Wittig reaction is that the location of the double bond is absolutely fixed, in contrast to the mixtures often produced by alcohol dehydration. With simple substituted ylides Z-alkenes are favored (reaction # 2).
The fourth equation shows a characteristic reaction of a sulfur ylide. Again, the initial carbon-carbon bond is colored blue, but subsequent steps lead to an epoxide product rather than an alkene.
Reaction # 5 illustrates a double Wittig reaction, using a dialdehyde reactant (colored orange). Because of the additional allylic stabilization of the ylide group, the new double bonds (colored blue) have an E-configuration, in contrast to the Z-configuration favored by unstabilized ylides (equation 2). Reaction # 6 shows a related synthesis that employs a phosphonate enolate base as the nucleophile. This is known as the Horner-Wadsworth-Emmons reaction. Here, as with the Wittig reaction, the formation of a stable phosphorus oxygen bond in the phosphate product provides a driving force for the transformation. Again, stabilization of the ylide-like carbanion leads to an E-configuration of the product double bond. These remarkable and useful changes can be explained by the mechanisms displayed below.
Following the initial carbon-carbon bond formation, two intermediates have been identified for the Wittig reaction, a dipolar charge-separated species called a betaine and a four-membered heterocyclic structure referred to as an oxaphosphatane. Cleavage of the oxaphosphatane to alkene and phosphine oxide products is exothermic and irreversible. Depending on the stability of the starting ylide, the betaine may be formed reversibly and this will ultimately influence the stereochemistry of the alkene product.
In contrast to the phosphorus ylides and related reagents, reactions of sulfur ylides with carbonyl compounds do not usually lead to four-membered ring species analogous to oxaphosphatanes. The favored reaction path is therefore an internal SN2 process that leads to an epoxide product. The sulfur leaves as dimethyl sulfide. Additional examples of sulfur ylide reactions, illustrating differences in the reactivity of dimethylsulfonium methylide and dimethyloxosulfonium methylide, are given in the following diagram. Of the two, the oxosulfonium ylide is less reactive and is thought to add reversibly to carbonyl groups, eventually forming the thermodynamically favored product.