Tosylhydrazones of aliphatic aldehydes or ketones react with strong bases to give alkenes .

Reacción de Bamford Stevens

Bamford–Stevens mechanism

Tosylhydrazone formed from aldehyde and tosylhydrazine, reacts with sodium methoxide generating an intermediate , which depending on the solvent can evolve into carbocation (protic solvent) or carbene (aprotic solvent).

The decomposition of by loss of nitrogen it generates a carbene that regroups to an alkene.
In protic media (solvent ethanediol) a carbocation is formed which it eliminates by E1 forming the same final alkene.