Stereoselective synthesis of tetrahydropyran-3-ones by rearrangement of oxonium ylides generated from metal carbenoids.