Suppose $E$ is a topos, and consider the operations $0,1,+,\times$ (denoting the initial and terminal objects, the coproduct, and the product), and recall that $E$ satisfies the usual arithmetic laws, such as the distributive law.

For the unfamiliar, one should think of objects in $E$ as sets, but of course they don't have to be. An "element" of a "set" $A$ means a map $B\rightarrow A$ for some object $B$. If $B=1$, we say the element $1\rightarrow A$ is a unit element of $A$, and you can think of these instead if you prefer, but note that the "generalized" elements $B\rightarrow A$ of an object $A$ completely define $A$, whereas the unit ones don't.

Suppose $A$ is an object of the topos $E$. A "linked list of type A" is a new object $L$ of the topos in which an element is either the word "null" (meaning empty list) or a pair $(a,l)$ where $a$ is an element of $A$ and $l$ is an element of $L$. Equationally:

(*) L=1+AxL.

By this point, you should understand these things. Ok, now I'm going to tell you the weird puzzle. Suppose we want to "solve" for $L$, so that we can see what it really is. To do this, I'm going to cheat. In a topos, there is no such thing as subtraction nor division.

$$L=1+A\times L$$ $$L-(A\times L)=1$$ $$L\times(1-A)=1$$ $$L=1/(1-A)$$ $$L=1 + A + A^2 + A^3 + \cdots$$

So a linked list of type $A$ is "either the empty list, or an element of $A$, or an ordered pair of elements of $A$, or a triple in $A$, etc."

This faulty computation has led to the correct answer. Once this answer is found, one can check topos-theoretically that it is correct (although note that toposes aren't guaranteed to have infinite coproducts). My question is:

Q: where is this computation actually taking place?

Clearly, as the topos of finite sets is the background for the usual arithmetic of natural numbers, it stands to reason that one would generalize toposes as natural numbers were generalized to rational ones. Has or can this be done? Can this calculation make sense in some appropriate context?