Definition of a division ring in category theory I'm wondering how one can define a division ring in category theory. More precisely, is there a well-defined concept of "division ring object" such that a division ring object in the category of sets is a division ring in the standard sense ?
The fact that division is not defined everywhere seems to be a problem for me, so how can we categorically define division rings (or fields) ? And by "categorically define", I mean "define by using categorical tools like universal arrows and properties".
Edit :
I thought of a possible answer, although it probably isn't very satisfying.
Let's start with the concept of a ring object : it is the data of an object and several arrows satisfying some conditions. In particular, we have the arrows $0:1\rightarrow R$, $e:1\rightarrow R$ and $m:R\times R\rightarrow R$ corresponding to the additive identity, the multiplicative identity and the multiplication on $R$.
Now if we suppose that the category has image factorization and is boolean (it's a strong assumption, I know, but we can try to weaken it afterwards), then we have a subobject of $R$ given by $\text{im}\,0\rightarrow R$, and we can take its complement in the lattice of subobjects of $R$, here denoted by $i:R^\times\rightarrow R$ ($i$ is monic). Then we can add the requirement (to get a division ring) that we have an arrow $(\ )^{-1}:R^\times\rightarrow R^\times$ such that :
$$
m\circ\langle i, i\circ (\ )^{-1}\rangle = e\,\circ\,! = m\circ\langle i\circ (\ )^{-1}, i\rangle
$$
where $!$ is the unique arrow $R^\times\rightarrow 1$. (A diagram would be clearer but I don't know how to draw it here.) Of course, this just means that for every non-zero $a\in R$, there exists $a^{-1}$ such that $aa^{-1}=e=a^{-1}a$.
Here I lazily supposed that the category is boolean so I could form the subobject $R^\times$ of non-zero elements of $R$, but I imagine that we could define that complement by other means (as shown in Kevin Carlson's answer) and still keep the rest of the definition.
Do you think this is a viable definition of a division ring object ?
 A: WARNING: A few details below only work for fields, or for right division rings, but no substantial changes are necessary, so I'm probably going to leave fixing this to the reader.
The idea is roughly this. Work in some category $\mathcal C$, to which we'll add properties as we need them. One way to express the notion of division ring was given in the comments by Derek: a division ring is a ring $\mathcal R$ (that is, a ring object: an object $\mathcal R$ equipped with maps $\times,+:\mathcal R\times \mathcal R\to \mathcal R,0,1:*\to \mathcal R$ satisfying the usual axioms) in which the union of the subobjects $0$ (a map out of a terminal object is always a monomorphism) and $\mathcal R^\times$ is all of $\mathcal R$. So, we have to have unions of subobjects available in $\mathcal C$. 
We also have to be able to define $\mathcal R^\times$, which is supposed to satisfy some sentence like $\mathcal R^\times=\{x\in \mathcal R:\exists x'\in \mathcal R:xx'=1\}$. This isn't too hard. We have a subobject $H\subset \mathcal R\times\mathcal  R$ which should be defined as $\{(x,x')\in \mathcal R\times \mathcal R:xx'=1\}$. To define this categorically, we simply take the pullback of the multiplication map $\times:\mathcal R\times \mathcal R\to \mathcal R$ along the unit map $1:*\to \mathcal R$. Having defined $H$, we can construct $\mathcal R^\times$ as the image of the first projection map $H\to \mathcal R$. So, in $\mathcal C$ we need every morphism to have an image which is a subobject. 
However, this definition is a bit strong. For instance, if your category is the topos of sheaves on an interesting topological space $X$, and $\mathcal R$ is the sheaf of continuous functions valued in some topological ring $R$, then $\mathcal R^\times(U)$ will be the elements of $\mathcal R(U)$ which are everywhere nonzero in $U$. So it'll be almost impossible to make $\mathcal R$ a division ring in the above sense: you'd be asking that every section of the sheaf be either everywhere or nowhere zero. This is the reason for the other notions of field in the nLab article linked by Derek. 
A particularly nice alternative is to say that the complement of $\mathcal R^\times$ is precisely $0$. This sounds like the same thing, of course, but logic internal to a category is rarely classical, so it's actually not. More formally, we define 
the complement $\left(\mathcal R^\times\right)'$ to be the largest subobject of $\mathcal R$ whose intersection with $\mathcal R^\times$ is empty (initial.) To define the complement directly in this way, $\mathcal C$ needs to admit arbitrary unions of subobjects; it's possible to get away with less than this by characterizing the complement differently, but in so we need $\mathcal C$ to be a "Heyting" category. In the example of sheaves on $X$ valued in a topological ring $R$, this is the subsheaf of functions $f:U\to R$ such that $f^{-1}((R^\times)')$ is dense: $f$ is almost everywhere valued in nonunits. It's much easier to make $\mathcal R$ a division ring under this definition! We merely need to know that a continuous $R$-valued function which is a non-unit on a dense subset is actually everywhere zero. For this it suffices that $R$ itself be a division ring in which $0$ is a closed subset, as is usually the case. 
It may be worth observing that in our example, the union of $\mathcal R^\times$ with its complement is not all of $\mathcal R$: it doesn't include those $R$-valued functions whose zeroset is nonempty but nowhere dense. This non-Boolean aspect of the logic is, again, characteristic of most categories. Unfortunately, it means that even though there are many "division rings" in many categories, not all theorems of elementary linear algebra hold. For instance, we cannot prove that every finitely generated $\mathcal R$-module admits a basis, which would imply in particular that every finite-dimensional vector bundle (viewed as a $C^0(\mathbb{R})$-module) was a direct sum of line bundles. 
