 This lecture is part of an online commutative algebra course, and will be about flat extensions of rings. So, and the problem is as follows. Suppose we've got two rings, R and S, and a morphism between them. So we can say that S is an R algebra, or it's an extension of R. And the problem we want to discuss is how do we relate R modules to S modules? Well, there are obvious ways to convert an S module to an R module just by restricting the ring action. On the other hand, if you've got an R module M, we can convert it to an S module just by taking S tensor over R of M. And this is in fact sort of a joint to the function of restriction. And what we want to know is how are the, if we've got modules over R, how are the corresponding modules over S related? Well, the most obvious question is, suppose we've got two modules, M and N over R, we can look at the homomorphisms of R modules from M to N. On the other hand, we can look at the homomorphisms of S modules from S tensor over R M to S tensor over R N. And we can ask, how are these related? Well, first of all, there's an obvious function from one to the other, because if we've got a homomorphism from M to N, then this obviously induces a homomorphism from S tensor M to S tensor N. So there's a function here. We can ask, is this an isomorphism? And it's usually not. In fact, there's no particular reason why it should be an isomorphism. For example, this thing on the right is an S module. And there's actually no reason why this should be an S module at all. There's no S module structure anywhere in sight here. So in general, there's absolutely no reason why there should be an isomorphism. Well, obviously what we forgot to do was convert this into an S module. So let's try again. Let's take S tensor over R of hom R M to N and map this to hom over S from S tensor over R M to S tensor over R N. And this is much better. You see, we've just applied the function from R modules to S modules to this R module. So now there's actually some reasonable chance that this will be a homomorphism or isomorphism. So we can ask, is this an isomorphism? And the answer is no. And there's a very easy count. For example, let's just take R equals Z, S equals Z modulo 2 Z. And let's take M equals Z modulo 2 Z and let's take N equals Z. And then hom over R from M to N is just zero because there are no homomorphisms from Z modulo 2 Z to Z, apart from the zero one. And now we can take S tensor over R of M. This is again Z over 2 Z. And now S tensor over R of N is now still Z over 2 Z. So the homomorphism over S from S tensor over R M, S tensor over R M is just Z over 2 Z. And you can see that this is zero. So even if we tensor over R with S, this is still zero and this is Z over 2 Z. And there's no sensible way to get Z modulo 2 Z from zero. And these are just not the same at all. However, there's one very important case in which this map is an isomorphism. So the map is an isomorphism if S is flat R module and M is finitely presented. So you recall flat means that tensioning with S preserves exactness. M being finitely presented just means first of all, M is finitely generated. So there's a map from R to the N to M to zero. So this is on two and N is finite. And furthermore, the kernel of this map also has to be finitely generated. So there's another map from R to the M onto here where M is also finite. So we recall that if R is notarian, then finitely generated implies finitely presented. So most of the time we're working with notarian rings and saying that M is finitely presented is just a rather variation of saying it's finitely generated. But the correct condition is finitely presented rather than finitely generated. This is one of the cases when being finitely generated isn't quite good enough in general. So how do we prove this? Well, so we want to prove that this map here is an isomorphism. And the first case, it's pretty much trivial if M equals R, because then you can homomorphisms from R to N is just the same as N and you can check that both sides are the same. And secondly, it's almost obvious if M is equal to R to the N where N is finite. This is because if it's true for M1 and M2, it's also true for M1 plus M2 because both sides are additive in M in some sense. So it's obvious, it's more or less obvious if M is a finitely generated free module. I'm going to emphasize that N has to be finite here. We'll see later that this does actually fail if N is infinite. So it's okay, we've done this if M is a finitely generated free R module. Now we're going to start with the exact sequence R to the M goes to R to the N goes to M goes to zero. And do you remember M and N are finite. And now we can apply a hom functor to this. So we're going to apply the functor hom of something to N. And you remember if we apply this functor to something it reverses the direction of all arrows. So instead of reversing the direction of the arrows which confuses me, I'll just switch the direction of the sequence. So we get hom from M to N, maps to hom of R to the N to N. This maps to hom of R to the M to N. So this is again exact and these are all homs over R so far I hope. Next, we're going to apply the functor tensoring with S. And here we use the fact that S is flat. And then we get naught goes to S tensor over R with hom R M N. And this maps to S tensor over R of hom R R to the N to N. And this maps to S tensor over R of hom R to the N to N. And here, remember the flatness is used to show that we can add a naught at the end. Now, we start in the other direction and we take this exact sequence and we just tensor it with S again. So we're going to tensor this thing with S. So we start with R to the M goes to R to the N goes to M goes to zero. And with S we get S tensor R to the M goes to S tensor R to the N goes to S tensor M goes to zero and these are all over R of course. And now we're going to apply hom from something to S tensor over R N. So again, we have to reverse everything so we get naught goes to hom of hom over S tensor M to S tensor N and this maps to hom of S tensor over R with R to the N to S tensor M to S tensor M tensor N and this maps to hom of S tensor R to the M to S tensor N. And now what you observe is that these are all homs over S should point out. Now what you observe is that these two are isomorphisms by our result for taking M to be the finitely generated module R to the N or R to the M. So these are isomorphisms and this is an isomorphism and we've got a natural map going this way and we want to know if this is an isomorphism. So what we're trying that the theorem we're trying to prove is that this map here is an isomorphism. And now this follows from immediately from the famous five lemma. So the five lemma says suppose we've got a whole lot of modules like this. So I've got 10 modules which is why it's called the five lemma because someone got a factor of two wrong when counting them I guess. So here we've got two rows of five modules and this row we're going to assume is exact and this row is also exact. And these four things here are all assumed to be isomorphisms. Then the conclusion is that the middle one is also an isomorphism. So if we apply this to the previous diagram then we see immediately that it implies this is an isomorphism. And if you're querying we've only got four modules there instead of five as in the five lemma what we can do is just add zero there and zero there and you can see that this map is also an isomorphism. And the isomorphism that the five lemma if you haven't seen it is done by a typical piece of diagram chasing. So I will demonstrate diagram chasing what the five lemma really is it splits as two different lemmas. First of all there's one lemma which says that if you've got four maps here like this and if this is on two and this is on two and this is injective then this map here is also on two. So we're trying to prove that this is on two. And if we apply this to these four rows here we see it implies this map here is on two. And there's a similar thing with four other maps where this except that three of them would be into and the one on the left would be on two. So I'm just going to explain this one and leave the other one to you. And the proof can be indicated by the following diagram by the following path. What we're going to do is we're going to do some diagram chasing. We're going to start here and then we're going to follow the following path. We're going to go around there, around there then along here then back up to here and then down to here and then back up here and then along here and then down there and then around there and then end up here. And the thing about diagram chasing should never read anybody else's diagram chasing proof because they're quite easy to do, but they're very confusing to follow. So what I'm going to do is I'm going to sort of explain it, but you shouldn't make too much attention to the explanation. What you should do when you've seen the idea of the explanation is you should go off and try and do this for yourself. So what we do is we pick an element, say let's call it A here, and we're trying to prove that A is the image of something up there. So what we do is we follow this green line. The image of A is some element B down here, and then the image of B is zero here because this is exact. So if we come back to B here, we can take B as going to be the image of some element C here because this is onto, and then we follow C down here and down here, and we see that the image of C here is zero, and this map here is injective, so C maps to something that's zero here. And since it maps to something zero here, it must be the image of some element D here. And now we can take D down here to see some element E, and we ask is E equal to A? Well, what we can say is that E and A, both of the same image here, but that doesn't prove that E equals A. All it proves is the sum map here, which maps to E minus A. And then this map here is onto, so there's some element G up here mapping to F, and then this element G, we can pull it along to here and then down to here, and this element G will then map to E minus, it will map to E minus the image of A so that A can be written in terms of the image of this element and this element. Okay, so you see it's a simple, but really confusing argument. And as I said, you should take the other one, which I'll just write it out quickly to make it clear which maps are onto and which are injected and so on. So the other one we have to do, this map is injective, this map is injective, this map is onto, and this map here we want to know is injective. This looks a bit funny, because in order to prove this map is onto, it's reasonable these should both be onto, but it seems a little odd that this map here should be injective. If we assume only that this map is onto, then we can't actually deduce that this map is onto. You can see that this from the following examples. First we take zero to zero to Z to Z, and then we take zero to Z to Z to zero. Then you notice that this is onto, this is onto, this is onto, and these are exact, and this is exact, but this map here isn't onto. So we really do need to, in order to show that some map is onto, we need to show that some other map is injective, which seems a little bit odd, but anyway. Okay, so that ends the proof of the five lemma, which ends the proof of the theorem about homomorphisms of flat modules. Well, we're going to finish with an example to show what happens if M is not finitely presented. And if M is not finitely presented, then this result that we proved usually doesn't hold, and there are some fairly simple examples where it doesn't. So we can just take R to be the rationals Q, so it's a field, and we're going to take S to be the ring of polynomials over Q, so it's a really ordinary example, and S is flat as an R module. In fact, every R module is flat because R is a field, so all modules are free, and we're going to take M to be just at any infinite dimensional vector space. So M is not finitely generated, but otherwise it's as nice as it could possibly be. It's a vector space, and we're going to take M to be a one-dimensional vector space over a field again, about as nice as it could possibly be. And what we're looking is, we're looking at QX tensored with home over Q from M to N, and we're trying to compare this with the homomorphisms over Q of X from QX plus QX and so on to Q of X tensored with Q. So this is just Q of X tensored with M, and this is Q of X tensored with M, and we want to know, are these equal? And what we're going to do is to show that they're actually not equal. So let's just work out both sides. Well, M is just an infinite dimensional vector space, so the homomorphisms from Q to N is just Q, because that's morphisms from a one-dimensional vector space to itself. So this can be written as Q of X tensored with, well, we have to be a little bit careful here. This isn't an infinite sum of vector spaces, it's an infinite product of one-dimensional vector spaces, because the homomorphisms from an infinite sum of vector spaces to Q is an infinite product of the homomorphisms from Q to Q. So that's equal to that, and this on the other hand, well, homomorphisms over Q of X from a free module over the ring of polynomials to Q of X times Q of X. So this is again, just an infinite product of an infinite number of copies of Q of X tensored with Q. So now we've got to ask, is this equal to this? So here we've got an infinite product of Q and then we tension with Q of X, and here we're first tension with Q of X, and then taking the infinite product. So we can ask, does taking a tensor product commute with infinite products? Now it does commute with infinite sums, as we sort of showed earlier, and it certainly commutes with finite products, because a finite product is exactly the same as a finite sum, but tensor products do not generally commute with infinite products. And we can see this just by looking at both sides. So what's the infinite product of this? Well, a typical element of the infinite product of this will look like an infinite family of polynomials, F1 of X, F2 of X, F3 of X, and so on, with FI of X, just a polynomial in Q. On the other hand, what's this? Well, this can be written as the sum over all I of X to the I times product of an infinite number of copies of Q, and X to the I tensored with an infinite product of copies of Q is just a sequence A1, one X to the I, A2, X to the I, and so on. So if we take a sum of these over all I, what we get is an infinite sequence of polynomials, F1 of X, F2 of X, and so on, which looks exactly the same as that, except if you notice, we're taking a sum. So the I is for which this is a sum, I is for which this is none zero, have to be bounded. So here, all FI have degree less than or equal to some fixed number I. So the elements of this space here consists of sequences of polynomials whose degree is bounded, whereas this just consists of all polynomials. So we can easily write down an element in this space that's not in this space. We just take the polynomial, say, one X, X squared, X cubed, and so on, not the polynomial of the sequence. So these spaces are quite similar. In some sense, this space here is some sort of dense subspace of this space, and it's suitable to apology, but they're still not equal. They're similar but not equal. So this fails if M is not, in general, if M is not finitely generated. This is incident in example of the fact that the homomorphisms from M to N can be a bit weird if M is not finitely generated. If M is finitely generated and all modules are countable and this tends to be a countable module, but if M is not finitely generated, then even if M is countable, this space of homomorphisms can be uncountable. You see, we've got an infinite product which tends to be uncountable, whereas infinite sums tend to be countable. Okay, that's enough about flat modules for the moment, although we'll be saying plenty more about them later. And next lecture, we'll be moving on to discuss artinian rings and modules.