# Is my proof of the following theorem correct?

## Theorem

Let $f : \mathbb{R}^2 \to \mathbb{R}$ and $(a,b)\in \mathbb{R}^2$. Let $f_b : \mathbb{R}\to\mathbb{R}$ be defined by $f_b(x)=(x,b)$ for all $x\in \mathbb{R}$. Then, $$\displaystyle\lim_{(x,y)\to(a,b)}f(x,y)=f(a,b) \iff \left(\displaystyle\lim_{(x,y)\to(a,b)}g(x,y)=0\right)\land \left(\displaystyle\lim_{x\to a}f_{b}(x)=f_b{(a)}\right)$$ where $g:\mathbb{R}^2\to \mathbb{R}$ defined by $g(x,y)=f(x,y)-f(x,b)$.

## My Proof

Necessity Part

Let us first prove that, $$\displaystyle\lim_{(x,y)\to(a,b)}f(x,y)=f(a,b) \implies \left(\displaystyle\lim_{(x,y)\to(a,b)}g(x,y)=0\right)\land \left(\displaystyle\lim_{x\to a}f_{b}(x)=f_b{(a)}\right)$$Let $((x_n,y_n))_{n\ge1}$ be any sequence converging to $(a,b)$. Then since $\displaystyle\lim_{(x,y)\to(a,b)}f(x,y)=f(a,b)$, by definition we have, $$(\forall \varepsilon>0)(\exists n_1(\varepsilon)\in\mathbb{N})[n\ge n_1(\varepsilon)\implies \left\lvert f(x_n,y_n)-f(a,b)\right\rvert<\varepsilon]\tag{1}$$Furthermore since $f_b$ is continuous at $x=a$ (I am skipping the proof of it for now) we have, $$(\forall \varepsilon>0)(\exists n_2(\varepsilon)\in\mathbb{N})[n\ge n_2(\varepsilon)\implies \left\lvert f(x_n,b)-f(a,b)\right\rvert<\varepsilon]\tag{2}$$What remains is to prove that, $\displaystyle\lim_{(x,y)\to(a,b)}g(x,y)=0$. For this observe that from $(1)$ and $(2)$ we can write, $$\left(\forall \dfrac{\varepsilon}{2}>0\right)\left(\exists n_1\left(\dfrac{\varepsilon}{2}\right)\in\mathbb{N}\right)\left[n\ge n_1\left(\dfrac{\varepsilon}{2}\right)\implies \left\lvert f(x_n,y_n)-f(a,b)\right\rvert<\dfrac{\varepsilon}{2}\right]$$$$\left(\forall \dfrac{\varepsilon}{2}>0\right)\left(\exists n_2\left(\dfrac{\varepsilon}{2}\right)\in\mathbb{N}\right)\left[n\ge n_2\left(\dfrac{\varepsilon}{2}\right)\implies \left\lvert f(x_n,b)-f(a,b)\right\rvert<\dfrac{\varepsilon}{2}\right]$$Now taking $N\left(\dfrac{\varepsilon}{2}\right)=\max\left(n_1\left(\dfrac{\varepsilon}{2}\right),n_2\left(\dfrac{\varepsilon}{2}\right)\right)$ we get, $$\left(\forall \dfrac{\varepsilon}{2}>0\right)\left(\exists N\left(\dfrac{\varepsilon}{2}\right)\in\mathbb{N}\right)\left[n\ge N\left(\dfrac{\varepsilon}{2}\right)\implies \left\lvert f(x_n,y_n)-f(a,b)\right\rvert<\dfrac{\varepsilon}{2}\right]\tag{3}$$$$\left(\forall \dfrac{\varepsilon}{2}>0\right)\left(\exists N\left(\dfrac{\varepsilon}{2}\right)\in\mathbb{N}\right)\left[n\ge N\left(\dfrac{\varepsilon}{2}\right)\implies \left\lvert f(x_n,b)-f(a,b)\right\rvert<\dfrac{\varepsilon}{2}\right]\tag{4}$$From $(3)$ and $(4)$ and using Triangle Inequality we get, $$\left(\forall \varepsilon>0\right)\left(\exists N\left(\dfrac{\varepsilon}{2}\right)\in\mathbb{N}\right)\left[n\ge N\left(\dfrac{\varepsilon}{2}\right)\implies \left\lvert f(x_n,y_n)-f(x_n,b)\right\rvert<\varepsilon\right]$$In other words, $$\left(\forall \varepsilon>0\right)\left(\exists N\left(\dfrac{\varepsilon}{2}\right)\in\mathbb{N}\right)\left[n\ge N\left(\dfrac{\varepsilon}{2}\right)\implies \left\lvert g(x_n,y_n)-g(a,b)\right\rvert<\varepsilon\right]$$and this is what we wanted to prove.

Sufficiency Part

Now we try to prove that, $$\displaystyle\lim_{(x,y)\to(a,b)}f(x,y)=f(a,b) \impliedby \left(\displaystyle\lim_{(x,y)\to(a,b)}g(x,y)=0\right)\land \left(\displaystyle\lim_{x\to a}f_{b}(x)=f_b{(a)}\right)$$Let $((x_n,y_n))_{n\ge1}$ be any sequence converging to $(a,b)$. Observe that since $g$ is continuous at $(a,b)$ we have, $$\left(\forall \varepsilon>0\right)\left(\exists n_1\left(\varepsilon\right)\in\mathbb{N}\right)\left[n\ge n_1\left(\varepsilon\right)\implies |g(x_n,y_n)-g(a,b)|<\varepsilon\right]$$In other words, $$\left(\forall \varepsilon>0\right)\left(\exists n_1\left(\varepsilon\right)\in\mathbb{N}\right)\left[n\ge n_1\left(\varepsilon\right)\implies |f(x_n,y_n)-f(x_n,b)|<\varepsilon\right]\tag{5}$$Also, since $f_b$ is continuous at $a$, we have, $$(\forall \varepsilon>0)(\exists n_2(\varepsilon)\in\mathbb{N})[n\ge n_2(\varepsilon)\implies |f(x_n,b)-f(a,b)|<\varepsilon]\tag{6}$$Now observe that from $(5)$ and $(6)$ we can conclude respectively that, $$\left(\forall \dfrac{\varepsilon}{2}>0\right)\left(\exists n_1\left(\dfrac{\varepsilon}{2}\right)\in\mathbb{N}\right)\left[n\ge n_1\left(\dfrac{\varepsilon}{2}\right)\implies |f(x_n,y_n)-f(x_n,b)|<\dfrac{\varepsilon}{2}\right]$$$$\left(\forall \dfrac{\varepsilon}{2}>0\right)\left(\exists n_2\left(\dfrac{\varepsilon}{2}\right)\in\mathbb{N}\right)\left[n\ge n_2\left(\dfrac{\varepsilon}{2}\right)\implies |f(x_n,b)-f(a,b)|<\dfrac{\varepsilon}{2}\right]$$ Now taking $N\left(\dfrac{\varepsilon}{2}\right)=\max\left(n_1\left(\dfrac{\varepsilon}{2}\right),n_2\left(\dfrac{\varepsilon}{2}\right)\right)$ from the above two statements (using Triangle Inequality) we can conclude that, $$\left(\forall\varepsilon>0\right)\left(\exists N\left(\dfrac{\varepsilon}{2}\right)\in\mathbb{N}\right)\left[n\ge N\left(\dfrac{\varepsilon}{2}\right)\implies |f(x_n,y_n)-f(a,b)|<\varepsilon\right]$$Since $((x_n,y_n))_{n\ge1}$ was arbitrary, we are done.