Solution (source code)

= Solution

Activate the <oxime> hydroxyl <oxygen> with thionyl <chloride> to give a good N–O leaving group. In the <Beckmann rearrangement> branch, the C–C bond anti to that leaving group migrates onto nitrogen as the N–O bond breaks. Here the migrating <carbon> is the spiro centre. Inserting N between that centre and the former <oxime> <carbon> expands the five-membered <oxime> ring to a six-membered <nitrilium ion> ring. <Water> attacks the electrophilic nitrilium <carbon>, followed by proton transfers and tautomerization to the observed spiro <lactam>. The <lactam> <carbonyl> <oxygen> is introduced in the aqueous work-up.

The competing <Beckmann fragmentation> cleaves the same anti C–C bond instead of completing migration onto N. Formation of the C≡N bond gives an open-chain <nitrile> and a tertiary <carbocation> at the former spiro centre. Loss of a proton from the adjacent chain <carbon> then gives the exocyclic alkene attached to the retained cyclopentane. The key distinction is \b[N insertion and ring expansion for the <lactam>, versus C–C cleavage followed by elimination for the unsaturated <nitrile>]. Stabilization of the resulting tertiary <carbocation> makes fragmentation plausible.