Can this class of functions $\mathbb{R} \rightarrow \mathbb{R}$ be made into a commutative ring? Define a partial function $f : \mathbb{R} \rightarrow \mathbb{R}$ as follows: $$f(x) = \frac{1}{x}$$
Then $f$ has the following pair of properties.


*

*$f$ is continuous.

*No proper extension of $f$ is continuous.


In other words, it is a "maximal continuous partial function." There's a tiny bit about such things here.
Now write $R$ for the set of maximal continuous partial functions $\mathbb{R} \rightarrow \mathbb{R}$.

Question. It seems likely that we can make $R$ into a ring as follows:
Given $g,f \in R$, we define $g+f$ and $gf$ by first computing these expressions pointwise, and then getting rid of all removable discontinuities.
Does this actually work?

For example, we should be able to add the partial functions $$\mathop{\lambda}_{x:\mathbb{R}} \left(\frac{1}{x}\right) \qquad \mbox{ and } \qquad \mathop{\lambda}_{x:\mathbb{R}} \left(-\frac{1}{x}\right)$$ to get the (total) function that is $0$ everywhere. Similarly, we should be able to multiply the partial functions $$\mathop{\lambda}_{x:\mathbb{R}} \left(\frac{1}{x}\right) \qquad \mbox{ and } \qquad \mathop{\lambda}_{x:\mathbb{R}} x$$ to get the total function that is $1$ everywhere.
 A: This does work.  The key thing you need to check is that $f$ and $g$ are maximal continuous partial functions with domains $D_f$ and $D_g$, then $D_f\cap D_g$ is still dense in $\mathbb{R}$, so the function you get from $f+g$ or $fg$ by filling in removable singularities is still maximal continuous.  More generally, for checking that the ring axioms are satisfied, you'd like to know that any intersection of finitely many such domains is dense, so that (for instance) you don't have to worry about the domain of $(f+g)+h$ being different from the domain of $f+(g+h)$.  This follows from the following fact, which is closely related to the better-known fact that the points where a total function is continuous form a $G_\delta$ set:

Theorem: Let $D\subseteq\mathbb{R}$ and let $f:D\to\mathbb{R}$ be a continuous function with no removable singularities (i.e., if $x\in\mathbb{R}\setminus D$, then the limit of $f(y)$ as $y$ approaches $x$ via points of $D$ does not exist).  Then $D$ is a $G_\delta$ subset of $\mathbb{R}$.

Given this theorem, let us now note that the domain of any maximal continuous partial function must clearly be dense, and so any such domain is a dense $G_\delta$.  By the Baire category theorem, an intersection of finitely many (even countably many) dense $G_\delta$ subsets of $\mathbb{R}$ is still dense.
Proof of Theorem: For each $n\in\mathbb{N}$, let $U_n\subseteq\mathbb{R}$ be the set of points $x$ such that there is a neighborhood $V\subseteq\mathbb{R}$ of $x$ such that $f(V\cap D)$ has diameter $<1/n$.  Clearly each $U_n$ is open.  If $x\in\overline{D}$, then the limit of $f(y)$ as $y\to x$ exists iff $x\in U_n$ for all $n$.  Since $f$ has no removable singularities, this means $D=\overline{D}\cap\bigcap U_n$.  Since every closed set is $G_\delta$, it follows that $D$ is $G_\delta$.
