I understand that the derivation of an inverting amplifier's gain is generally treated as \$G = \dfrac{-R_2}{R_1} \$, and have seen many resources supporting this claim. I understand how the proof works by solving for the current flowing to virtual ground at equilibrium, and am satisfied with this expression. However, my EE textbook showed a different, more generalized version of the expression for gain,
\$ G = \dfrac{-A(1 - B)}{(1 + AB)}, \$
where A is the open-loop gain of the op-amp and \$B = \dfrac{R_1}{R_1 + R_2}. \$
In the limit of high open-loop gain, I understand how this expression simplifies to \$G = 1 - \dfrac{1}{B} = \dfrac{-R_2}{R_1}.\$ Can someone provide an explanation as to how this more generalized transfer function is derived, and why the general derivation that follows is inaccurate in some way for low open-loop gain?
Here is a sample of the derivation that I followed - what simplifying assumptions are made?
\$ I = \dfrac{V_{in}}{R_{1}} \$
\$ V_{out} = V_{in} + IR = V_{in} - V_{in} \times \dfrac{R_2+R_1}{R_1} = V_{in} \times \dfrac{-R_2}{R_1}\$
\$ \therefore \dfrac{V_{out}}{V_{in}} = \dfrac{-R_2}{R_1}\$
Follow-up: Does whatever correction needs to be made to the closed-loop gain of the op-amp affect the input resistance of the op-amp, or is it always \$R_1\$, regardless of the op-amp gain?