Show that if $A$ is an interval of $\mathbb{R}$, $\forall x \in \mathbb{R}, \inf(A) < x < \sup(A) \Rightarrow x \in A$ I came up with this property from intuition and I don't know if it's true or whether it's formulated correctly. I know that this won't hold for any arbitrary set $A$, so that's why I placed the condition that $A$ is a continuous subset of $\mathbb{R}$, if that's the right way to say it.
 A: It's true for non-empty intervals (sets of the form $(a,b)$, $[a,b)$, $(a,b]$, $[a,b]$), in fact, that's very easy to prove:

Assume $A$ is an interval, for instance, of the form $(a,b)$ where $a<b$, then one can prove that $\operatorname{sup}(A)=b$ and $\operatorname{inf}(A)=a$ so saying that $\operatorname{inf}(A)< x < \operatorname{sup}(A)$ is the same as saying that $a<x<b$, i.e., $x\in A$. The same argument will work for the other type of intervals.

Moreover, this doesn't hold if $A$ is not an interval. Indeed, let $a=\operatorname{inf}(A)$ and $b=\operatorname{sup}(A)$, if $A$ is not an interval, one can prove that $(a,b)\nsubseteq A$ so there is an $x\notin A$ such that $a<x<b$.
A: Assuming you mean $A$ is a connected set of reals:
Any connected subset of real numbers is an interval.
https://proofwiki.org/wiki/Subset_of_Real_Numbers_is_Interval_iff_Connected
Suppose $\inf(A) < x< \sup(A)$. 
Then $x$ is not a lower bound and not an upper bound of $A$.
Since $x$ is not a lower bound nor an upper bound, there exist $y, z \in A$ such that $z<x$ (since $x$ is not a lower bound) and $x<y$ (since $x$ is not an upper bound of $A$). So $z<x<y$.
Since this is an interval, any number between two points in the interval must be in the interval, so $x$ must be in $A$ as well.
