Showing a set of fractions is a ring Let $p$ be a prime number. Let $R$ be the subset of all rational numbers $m / n$ such that $n \neq 0$ and $n$ is not divisible by $p$. Show that $R$ is a ring.
My Proof-trying.
$R1$. Associativity for under addition is clear.
$R2$. $\dfrac {m} {n}+0=0+\dfrac {m} {n}$, so there exist the identitiy element for under addition.
$R3$. $\dfrac {m} {n} + \dfrac {-m} {n}=\dfrac {-m} {n} +  \dfrac {m} {n}$, so there exist inverse element.
$R4$. $\dfrac {m} {n} + \dfrac {m'} {n'}=\dfrac {m'} {n'}+\dfrac {m} {n}$, so commutativity.
So $R$ is an additive abelian group.
$R5$. $\dfrac {m} {n} ( \dfrac {r} {s} + \dfrac {t} {v})=\dfrac {mr} {ns} + \dfrac {mt} {nv}$ and $( \dfrac {r} {s} + \dfrac {t} {v})\dfrac {m} {n}=\dfrac {rm} {sn}+\dfrac {r} {s}+\dfrac {tm} {vn}$
$R6.$ $R$ is associativity for under multiplication, clear.
$R7.$ $1 \dfrac {m} {n}=\dfrac {m} {n} 1 = \dfrac {m} {n}$, so there exist identity element for under multiplication.
Can you check my answer? If false, can you write true answer?
 A: More generally, suppose our denominator set $S$ is a set of integers $\neq 0$  closed under multiplication and $\,1\in S\,$ (true here because integers coprime to $\,p\,$ are closed under multiplication by Euclid). Let $\,R\,$ be the set of all rationals writable in form $\,a/s,\ a\in\Bbb Z,\, s\in S.$
By the subring test $\,R\subseteq \Bbb Q\,$ is a subring if it contains the unit $\,1\,$ of $\,\Bbb Q\,$ and it is closed under multiplication
and subtraction. $R$ contains $1/1 = 1\,$ by $\,1\in S,\,$ and $\,\frac{a}b,\frac{c}d\in R\Rightarrow \frac{a}b\frac{c}d = \frac{ac}{bd}\,$ and $\,\frac{a}b-\frac{c}d = \frac{ad-bc}{bd}\,$ are both in $\,R,\,$ since $S$ is closed under multiplication
Remark $ $ This "$\rm\color{#0a0}{partial}$" fraction ring construction works very generally -  see localization. The classical case of the fraction field is the special case when the denominator set is the set of $\rm\color{#c00}{all}$ nonzero elements in an integral domain (it generalizes to non-domains by inverting $\rm\color{#c00}{all}$ non-zero-divisors, yielding the $\rm\color{#c00}{total}$ ring of fractions).
Any proof that verifies all the ring axioms is of course correct, but is wasteful since we can trivially infer that these axioms persist in all subsets of $\Bbb Q$ due to their logical form (syntax), viz. all ring laws are universal laws ("identities") - those of form $\,\forall x,y\in \Bbb Q\!:\ f(x,y) = g(x,y)\,$  whose truth clearly persists in subsets. This fails for more general axioms, e.g. inverse existence $\,\forall x\neq 0\,\color{#c00}{\exists y}\!:\ x\color{#c00}y = 1,\,$ i.e. subsets may omit $\rm\color{#c00}{roots},\,$ so subrings of fields (e.g. $\Bbb Z\subset \Bbb Q)\,$ need not be fields.
