From the logic of nominal sets to the logic of higher