Inversion positivity and the sharp Hardy–Littlewood–Sobolev inequality