Anonymous' answer is wrong! The lens IS compatible with the D5100.
Quote Pixelfriedhof.com:
AF-P was only introduced in 2016. You could say it's the quieter evolution of AF-S.
Again, an autofocus motor integrated in the lens drives the focusing.
The integrated motor is a modern stepper motor that is driven by a pulse (hence the "P" in the name).
Compared to the earlier AF-S standard, AF-P lenses offer even quieter operation and are therefore particularly suitable for filming or focusing in applications such as wildlife photography, where loud noises should be avoided. In addition, AF-P lenses can be operated not only by a switch on the lens body, but also by digital control of the lens by the camera, for example from the menu.