Ok, here we go, the problem I'm trying to solve is in the top of the image. I've solved it all but the last steps from M to P.
M would be the acyl chloride I've drawn. Then we add 2 equivalents of diazomethane. The first equivalent will give the compound M-N (addition to carbonyl, chlorine leaves, and then attacks the new carbon liberating nitrogen gas).
Now is when the trouble starts. I see quite a few ways the reaction could follow. The first one is that diazomethane just attacks carbon attached to chlorine, and we add another carbon to the molecule, obtaining compound N3.
The other way is that diazomethane's carbon attacks carbonyl, giving the intermediate MNN. That intermediate would be very unstable, and I think it would go to compound N1. But in both N1 and N3 we have a problem, the next step. Next step is adding an alkene under hv conditions. I believe that this last reaction is supposed to be the formation of a carbene, and then addition to alkene to give a cyclopropane.
Ok, that sounds logic, but the only way that could happen is that we have as compound N a molecule tat still has a -N
2 susbtituent. That gives me 2 possibilities, one is N2 (don't think so, so unstable compound) and a compound like N3 but with a -N
2 instead of chlorine.
The problem is that I don't see how that could happen with free chlorines all around capable of pushing N2 out of the molecule, or in the epoxide case, the oxygen.
Where does my reasoning fail?