The statement of the Squeeze Theorem as given in Introduction to Real Analysis, 4th Edition by Bartle and Sherbert is :
Let A $\subseteq \Bbb R$, let $f,g,h:A \to \Bbb R$ and let $c \in \Bbb R$ be a cluster point of A. If $$f(x) \leq g(x) \leq h(x)~~\forall~~x\in A,~x\neq c$$ and if $\lim_{x\to c}~f=L=\lim_{x\to c}~h$, then $\lim_{x\to c}~g = L$.
Then, there is a solved example:
$$\lim_{x \to 0}~x^{3/2}=0~(x>0)$$ Let $f(x)=x^{3/2}$ for $x > 0$. Since the inequality $x<x^{1/2}\leq1$ holds for $0 < x \leq1$, it follows that $x^2\leq f(x)=x^{3/2}<x$ for $0<x\leq1$. Since $\lim_{x\to0}~x^2=0$ and $\lim_{x\to0}x=0$,
It follows from the Squeeze Theorem that $\lim_{x\to0}x^{3/2}=0$.
Here is another example from the book:
$$\lim_{x\to 0}~sinx = 0$$ $$-x\leq sinx \leq x~~\forall~~x\geq0$$ Using Squeeze Theorem, we get the desired result.
My question is:
In the statement of the Theorem, it is mentioned that the inequality $f(x) \leq g(x) \leq h(x)$ must hold for all $x \in A$ with $x\neq c$. However, as we see from the first solved example, Squeeze Theorem is applied even though the inequality holds for only a subset $A=(0,\infty)$. Similarly, in the second example, it is applied even though the inequality holds in $[0,\infty)$ instead of $A=\Bbb R$ as the statement says.
Why is this allowed? I am looking for a rigorous proof / explanation.