Dimension of Quotient of Noetherian local ring

I have a question regarding the following exercise:

Let $(A,\mathfrak{m})$ be a Noetherian local ring of dimension $d$. Let $k:=A/\mathfrak{m}$ be its residue field. $f_1, \ldots , f_r \in \mathfrak{m}$. Set $\bar{A}:=A/(f_1, \ldots, f_r)$ and $\bar{\mathfrak{m}} \subset \bar{A}$ denote the image of $\mathfrak{m}$.

Assume $A$ is regular. let $\bar{f_1}, \ldots, \bar{f_r} \in \mathfrak{m}/ \mathfrak{m}^2$ denote the images of $f_1, \ldots, f_r$. Show that:

$\bar{A}$ is regular of dimension $d-r \Leftrightarrow \bar{f_1}, \ldots , \bar{f_r}$ are linearly independent over $k$.

My thoughts:

1.) $\dim_k(\bar{m}/\bar{m}^2) \geq \dim(\bar{A}) \geq d-r$

Because: Take $s = \dim(\bar{A})$. Then we choose $y_1, \ldots, y_s \in A$ whose images $\bar{y_1}, \ldots, \bar{y_s} \in \bar{A}$ form a system of parameters for $\bar{\mathfrak{m}}$. $\bar{\mathfrak{m}}$ is the only prime containing $(\bar{y_1}, \ldots, \bar{y_s}) \Rightarrow \bar{\mathfrak{m}}$ is the only prime containing $(f_1, \ldots , f_r, y_1, \ldots , y_s) \Rightarrow \dim(A) \geq r+s \Rightarrow$ Inequality at the right side.

For the inequality on the left side: Set $r:= \dim_k(\bar{\mathfrak{m}}/ \bar{\mathfrak{m}}^2)$. Suppose $\bar{f_1}, \ldots, \bar{f_r} \in \mathfrak{\bar{m}}$ have the property that their images give a $k$-basis of $(\mathfrak{m}/ \mathfrak{m}^2)$. By Nakayama $\Rightarrow \bar{f_1}, \ldots, \bar{f_r}$ generate $\bar{\mathfrak{m}}$. By Krull's dimension theorem $\Rightarrow d=\operatorname{height}(\bar{\mathfrak{m}})\leq r \Rightarrow$ Inequality on left hand side.

2.) We know that if $A$ is a local ring with $f \in \mathfrak{m}$ and f is a non-zerodivisor, then $\dim(A/(f)) = \dim(A)-1$.

So, if $\bar{f_1}, \ldots, \bar{f_r} \in \bar{\mathfrak{m}}$ are linearly independent, then they are all non-zerodivisors, so $\bar{A}$ is regular of dimension $d-r$, by implementing 2.) iteratively $r$ times. Isn't the reverse then also obvious?

Now, my question is, if 2.) is really correct this way, since I'm not sure, if linear independency of $r$ elements implies the regularity and dimension formula given above.

If not, I need to somehow show in 1.) that $\dim(\bar{A}) \leq d-r$ that I can get the equality.

I would be glad, if someone could help me solve this problem. Thank you in advance!