AR(1) with random effects in R -- checking my understanding

I am running a model which I am basing on the code for AR(1) model with random effects as shown in page 38 of "Panel Data Econometrics in R: The plm Package." I have the code working and confirmed that model provides the best fit out of a variety of models, but I wanted to check that my understanding of what the code is doing statistically is indeed what it is doing. If anyone who is familiar with these models could confirm that my description below matches the code, that would be very helpful.
The sample code providing in the text is the following:
data("Grunfeld", package = "plm")
reAR1ML <- lme(inv ~ value + capital, data = Grunfeld,
random = ~ 1 | firm, correlation = corAR1(0, form = ~ year | firm))
Here is my attempt at trying to describe the model this code is fitting:
Yit = Xitꞵ + μit
μit = δ + it
it = ρit-1 + ϵit
Where Yit is the gross investment of the ith firm in year t, Xit is a row vector of the independent variables variables (value and capita) , and muit is a random error term, uncorrelated with Xit, which captures variation around the mean.
The second equation which decomposes μit includes an unobserved heterogeneity component, δ, which varies across firms but is constant across time. It reflects unobserved characteristics of firms which render a given firm’s investment less or more than what would be predicted from Xitꞵ. vit contains the autoregressive component, which is further decomposed in equation (3).
The AR(1) component in equation(3) allows the firm’s investment to vary systematically by year around the firm’s own mean, according to that firm’s previous year’s investment (it-1) and the error term.