Auto correlation function of AR(p) process I am doing a time series course and in the theory part there are few things I don't understand.In obtaining auto correlation function for AR(p) process it is done as:
$$\newcommand{\Var}{{\rm Var}}\newcommand{\cov}{{\rm Cov}}
AR(p)=X_t = α_1X_{t−1} + α_2X_{t−2}+ · · · + α_pX_{t−p} + z_t$$  
And then let $Y_t=X_t-\mu$.
\begin{align}
\gamma(k) &= \cov(Y_t,Y_{t+k})  \\
&= \cov(Y_t,Y_{t-k})  \\
&= E[Y_{t-k}Y_t]  \\
&= \alpha_1\gamma(k-1)+\alpha_2\gamma(k-2)+...\alpha_p\gamma(k-p)
\end{align}
Then in order to obtain auto correlation function it is divided by $\gamma(0)$. My question is to be able to divide by  $\gamma(0)$ shouldn't the AR(p) process need to be stationary? Also
$$\cov(Y_t,Y_{t+k})=\cov(Y_t,Y_{t-k})$$
can be written only if the process is stationary right?  Because auto correlation,
$$P(k)=\frac{\cov(X_t,X_{t+k})}{\sqrt{\Var(X_t)\Var(X_{t+k})}}$$
If $\cov(X_t,X_{t+k})$ is denoted by $\gamma(k)$ when the process is stationary as the variance is constant,
$$\Var(X_t)\Var(X_{t+k})=\Var(X_t)\Var(X_{t})=\gamma(0)\gamma(0)$$
(As variance does not depend on lag when stationary). Therefore when stationary we can say that
$$P(k)={\gamma(X_t,X_{t+k})\over\gamma(0)}$$
This division by $\gamma(0)$ is valid only when the series is stationary right? Is the way I understood this wrong?
But the AR(p) process is not always stationary? Therefore in obtaining 
$$P(k)=\alpha_1P(k-1)+\alpha_2P(k-2)+...+\alpha_pP(k-p)$$
is it assumed that the process is stationary?
 A: It helps to distinguish the equation for AR(p) process and the process itself. The AR(p) equation  is the following:
$$Y_t=\alpha_1Y_{t-1}+...+\alpha_pY_{t-p}+Z_t. (1)$$
The question is whether this equation has the solution which is stationary? And the answer yes it has, when the complex roots of polynomial:
$$1-\alpha_1z-...-\alpha_pz^p=0$$
are not on the unit circle. When this condition is satisfied, the equation (1) has the solution which is a stationary process. We call this process,  AR(p) process. Unfortunately AR(p) equation can have a non-stationary solution, and again it is called AR(p) process, only usually it is mentioned that it is not stationary. 
When calculating the autocorrelation function for AR(p) process we must then choose whether we are are talking about the stationary solution to AR(p) equation, or non-stationary. In the first case $cov(Y_t,Y_{t-k})=\gamma(k)$ for all $t$ and $k$ and $cov(Y_t,Y_t)=\gamma(0)$ is a constant, i.e. all the properties of stationary process must hold. In the second case naturally these properties need not hold. Take for example the unit root process $Y_t=Y_{t-1}+Z_t$, which is a $AR(1)$ process. We have
$$cov(Y_t,Y_t)=cov(Y_{t-1},Y_{t-1})+cov(Z_t,Z_t),$$
if we assume that $cov(Y_{t-1},Z_t)=0$ (which is already an assumption which is not easily justified). Then if $cov(Y_t,Y_t)=cov(Y_{t-1},Y_{t-1})$ as it should be for stationary process, then we get $cov(Z_t,Z_t)=0$, which means that $Z_t\equiv 0$, which in turn means that $Y_t\equiv0$, which does not make sense. So clearly stationarity assumption is a key assumption for calculation of autocorrelation function of $AR(p)$ process.
