Recently Bill Shillito posted on Twitter about a correspondence between Lagrange interpolation and the Chinese remainder theorem (which I’ll call the remainder theorem) that I found pretty interesting. I’ll expand on this connection a little by describing how both Lagrange interpolation and the remainder theorem can be derived from a geometric fact accessible to anyone who knows what a scheme is. For beginners in algebraic geometry, this ought to help illustrate some of the basic ideas of the correspondence between schemes and ring theory.

Lagrange interpolation is a procedure for producing a polynomial that takes on specified values at specified points. Let be distinct real numbers and be real numbers. Then satisfies for each . For example, with and , the polynomial has the desired behaviour. The idea here is that we have a sum of terms where at each all but one vanish. We can then weight the outputs of each term as we like.

Evidently there’s no need for the and to actually be real; they could be in any field. What’s surprising is that we don’t even need them to be in the same ring. As Shillito points out, if are pairwise coprime integers, and we would like to find a solution to for integers , we can do so as follows. For each , since we require the to be coprime, we can find an inverse modulo . Let denote an integer with residue . Then the integer has the desired residues. For example, with our previous values for and , we get .

What’s going on here? Well, in the first case, we have functions that we want to take on certain values at certain points. In the second case, we have ring elements that we want to take on certain values at certain ideals. The key concept underlying the construction of schemes is that these are completely equivalent things: ring elements are really functions on some space, and ideals are points, or at least closed subsets, of these spaces.

Closed Submanifolds and Closed Subschemes

What makes a manifold a closed submanifold? Let’s look at how restriction of functions (equivalently, pullback along inclusion) works in two unambiguous examples. First, consider the usual embedding of the unit circle . Given any function on , we can extend to a map . In other words, the pullback map from global functions to global functions is surjective. First, extend to by letting be constant on each ray out from the origin. Let be a bump function on a small neighborhood of the origin. Then extends across the origin and agrees with on .

On the other hand, if is an embedding that fits inside a compact subset, say by , then it is easy to come up with a function that doesn’t extend to : take any function that runs off to infinity as we approach .

More generally, we have the following – we assume in the proof that the reader has some fluency with partitions of unity.

Theorem: Let be an embedded submanifold. Then the following are equivalent:

is a closed submanifold. Restriction is surjective as a map from global functions to global functions. For every point and every neighborhood of , if is a function on , there exists a neighborhood of and a function on so that .

Proof: To show 1 implies 2, suppose is a closed submanifold and let be a smooth function on . For each , choose local coordinates about in which is cut out by vanishing of the first coordinates, and extend across by letting it be constant on the remaining coordinates. A partition of unity then patches the extended functions together to give a function on which pulls back to .

If 2 holds, let be as in 3. A partition of unity extends for some smaller containing to a global function on , which by assumption extends to a global function on . This function restricted to gives us the desired .

If 3 holds, suppose for the sake of contradiction that there is a point , where the closure is taken in . We can take a sequence of points in approaching . Let be collection of all the . Since our spaces are Hausdorff the limit point of is unique and not in , so is a closed submanifold of . Since 1 implies 2 the function on which takes to extends to a global function on . Letting in our hypothesis, any satisfying 3 would have to have , a contradiction. Thus is closed in . ☐

Here is another way of stating condition 3: the canonical morphism of sheaves is an epimorphism (i.e. surjective on stalks).

Now, what is a closed subscheme? Here is more or less the standard definition.

Definition 1: A closed embedding of schemes is a morphism which is topologically a closed embedding, and for which the induced map of sheaves is an epimorphism.

The equivalence between 1 and 3 in the above theorem ought to motivate this definition. On the other hand the equivalence between 1 and 2 motivates an alternative definition, which you will find in Vakil. Recall that a morphism is affine if every preimage of an affine open subset is affine open.

Definition 2: A closed embedding of schemes is an affine morphism for which pullback is a surjective ring map for every affine open subset of .

There is an important difference between this and case 2 for manifolds: this only tells us we can extend functions locally. That is, for any function and any point , we can extend to a small neighborhood of in , but it may not be possible to patch these local extensions together. The issue here is that while affine schemes permit some tricks resembling partitions of unity, on larger schemes no such tool exists – analogies with smooth or general manifolds are helpful for building intuition, but schemes which arise naturally really have more in common with analytic or complex manifolds.

These definitions are equivalent, by an argument that isn’t horribly long or difficult but which isn’t really enlightening enough to write up here. A closed subscheme is the information of a closed embedding. Note that in the affine case, for a ring with an ideal , we always have that is a closed subscheme of , with image exactly .

The Geometric Remainder Theorem

Here is the statement which generalizes the remainder theorem.

Theorem: Let be a collection of closed subschemes of with pairwise disjoint image. Then the induced morphism from the disjoint union is a closed embedding.

Proof: We show that this satisfies the first definition. Clearly we have a topological embedding. If is not in the image of any , the surjectivity of the map of stalks is evident. If is in the image of some , then pick any neighborhood of and intersect it with the finitely many complements of the images of the other . The resulting neighborhood of is open and has preimage only , so the induced map from the stalk at to the stalk at its preimage is exactly that of . ☐

Let us recover the remainder theorem.

Corollary: Let be a ring and be ideals. Then the natural map has kernel , and if for every pair of distinct we have , then the map is surjective. In particular, if the ideals have trivial intersection and the second condition holds, is an isomorphism.

Proof: That the kernel is as indicated is evident. Suppose the condition on the ideals is met. If any point lies in with , then every element of or vanishes at , so certainly the constant function cannot be in , which is a contradiction. Thus the vanishing sets of the ideals are pairwise disjoint. By the equivalence of categories between rings and affine schemes, is given by pullback along the morphism . Since this is a closed subscheme, the associated ring map is surjective. ☐

An Interpolation Algorithm

All this raises the question: given a function on a closed subscheme , how can we actually find an extension of to ? With a certain amount of prior information this is actually super easy to do. First, suppose we can decompose into a finite collection of disjoint closed subschemes , and that we know how to extend functions individually from each of the . We’ll write to indicate we’re extending a function to . We need functions so that each contains and is disjoint from each other . On an affine scheme, these always exist.

Now let be a function on . Since for , we always have that does not vanish on , we know that is invertible. So invert it, extend that, and call the result . That is, . Let on be defined by . Now, when we restrict to any , every term except the -th has a factor and thus vanishes, while in the -th term, every factor except cancels and goes to , so that . Since this holds for every , we have , as desired.

When we apply this algorithm in the case that and is a collection of distinct rational points, we recover Lagrange interpolation. When we apply it in the case that , we obtain the method of applying the remainder theorem that Shallito posted about.

(An update: my next post works out an example of an application of the algorithm to a closed subscheme more complicated than a collection of points. If you can get the setup in place, it turns out not to be too hard to use.)

Generalizing Further

One can expand further on the remainder theorem by obtaining slightly better statements about ideals or by stating it for modules, but as far as I know, its story is substantially concluded by the above considerations.

The general theme of identifying obstructions to extending local data to global data, however, pervades algebraic geometry, and no matter how we try to pursue it, we will probably almost immediately end up at one or another key tool in the theory. For example, suppose we try to come up with a version of our algorithm for line bundles (viewed in a certain light, line bundles or invertible sheaves are a natural generalization of functions: a section of a line bundle is like a function which is allowed to only actually have well defined values after a choice of local ‘coordinates,’ with the exception that a function that vanishes in any coordinates vanishes in all of them). For line bundles, there is no point in attempting to prescribe values to sections unless those values are zeros. The zero set of something that is locally a nonzero function ought to have codimension one, just like the zero set of an actual function, so the problem of determining whether line bundles have sections with prescribed values forces us to invent divisors. With a great deal of further struggle, we might go on to invent other tools like Riemann-Roch or cohomology that give us a better handle on what sections of line bundles can look like.

-ing it all

We saw that the strange resemblance between the remainder theorem and lagrange interpolation comes from their common interpretation as a solution to a geometric problem, and then saw that this geometric problem itself leads naturally into some central ideas in algebraic geometry. If there’s a key takeaway here, it’s that I think the above is very cool, but if there’s an actually helpful takeaway it’s that sometimes thinking about problems from within a different frame can make them easier to connect to each other and easier to generalize.