The collapse of white dwarfs to neutron stars