I'm working through a proof of the least squares estimators, i.e. proving that estimators of the regression coefficients are,
$$\hat{\beta}_0=\bar{y}-\hat{\beta}_1 \bar x$$ and, $$\hat{\beta}_1=\frac{S_{xy}}{S_x^2}$$
So far in my proof, I've got to this line: $$\sum_{i=1}^n y_i -n\beta_0 -\beta_1\sum_{i=1}^nx_i = 0$$ (1)
Which I'm told leads to:
$$\hat{\beta_0}=\frac{1}{n}\bigg(\sum_{i=1}^n y_i -{\beta_1}\sum_{i=1}^nx_i\bigg)$$(2) $$\hat \beta_0 = \bar y - \hat \beta_1 \bar x$$(3)
My problem is that I don't understand why $\beta_0$ became $\hat \beta_0$ on the second line, and why $\beta_1$ became $\hat \beta_1$ on the third line. To me, the first line leads to this:
$${\beta_0}=\frac{1}{n}\bigg(\sum_{i=1}^n y_i -{\beta_1}\sum_{i=1}^nx_i\bigg)$$ $$\beta_0 = \bar y -\beta_1 \bar x$$
But of course, I wouldn't know how this then leads to the desired result. So why do the regression coefficients suddenly become their estimator counterparts in lines 2 and 3?