The government has confirmed that the state pension will increase by inflation from April 2023.