 In this video, we're going to prove a very important theorem with regard to BCH codes. We haven't defined what they are yet, but the definition will make a lot more sense with this result in our hand, because it'll explain why we define them the way we do. Now let's remind ourselves about a few things. What's a cyclic code again? A cyclic code is a code for which every code word, if you cyclic permute the elements of that code word, gives you another code word. A cyclic code is a linear code closed under cyclic permutation. We've seen that every cyclic code is in one-to-one correspondence with the ideals of the group ring, the group ring over Zn here, where Zn is the finite cyclic group of orn. So more specifically, we have our group ring Z2, a joint Zn like so. This is our group ring. And so this is basically like the polynomial ring. We can view the elements of this group ring as polynomials of a single variable, but we have the extra condition that when you take your variable to the nth power, this is actually equal to one inside of this group ring. And this is a consequence of the fact that for a cyclic group ring, this is actually isomorphic as rings to the quotient ring Z2, a joint X, mod out by the ideal X to the n minus one. So that forms that modding out this ideal gives us this relation on the ring, and this is exactly what the group ring is. And so cyclic codes were in one-to-one correspondence with ideals of this group ring, which of course, as this group ring is the quotient of a principal ideal domain, the group ring also inherits the property that all of its ideals will be principal. Now, the group ring Z2n is not a principal ideal domain. It's not an integral domain. There are going to be proper divisors of zero there, but it does inherit as a quotient of a PID. It does inherit the property that all of these ideals are going to be principal. And in fact, there'll be a single generator G of X, and that's because really in Z2 a joint X, there is literally one unit, just the element one itself. And as such, polynomials aren't going to have any, they're not going to have any associates other than selves. And so there is a single polynomial generator, the minimal generator polynomials, what we call it, a single one that determines this ideal, and the possibilities come down to the divisors of X to the n minus one. And how does it factor over Z2 a joint X? Those are your options for G right here. So you pick one of those and that gives you a cyclic code over Zn, all right? I want you to now consider a primitive nth root of unity, and yes, these ns are intended to be the same thing. So we do have that zeta to the n is equal to one. We have a primitive nth root of unity over Z2 right here. Now, if S consecutive powers of sigma are roots of G of X, so this tells us that G of, let's say that zeta to the R is a root of G of X, then we're saying that, so G evaluated at zeta to the R is equal to zero. But we're also saying that the next one, G times zeta to the R plus one is a root, and G evaluated zeta to the R plus two, and zeta to the R plus three, et cetera, et cetera, all the way down to G evaluated zeta to the R plus S minus one. So we have S many, you have S many roots of unity, zeta R was a primitive one. I'm not saying the other ones are necessarily primitive, they might not be, but we have S many consecutive roots of unity starting with a primitive one. These are all roots of our polynomial G of X. Then in that situation, it turns out that the minimum distance of our cyclic code C is at least S plus one. So if we can guarantee that G has a lot of roots of unity, consecutive roots of unity as its roots, then that can guarantee that our code has a large minimum distance, which then is the tool we use to measure how good our code is at error correction, error detection, things like that. So let's make that assumption. So R zeta to the R, R plus one, R squared, all the way to zeta to the R plus S minus one are all simultaneous roots of the polynomial G. And so consider you have a polynomial F of X, which belongs to the code C here. And let's say that the coefficients are A sub I1 X to the I1 plus A sub I2 times X to the I2 all the way up to A sub IM times X to the IM, like so. And suppose that this polynomial is a polynomial with weight M, and suppose that that weight is less than or equal to S. This same S from before. Now, if you're wondering why did I use the double subscripts here because as you go between these coefficients, I'm not necessarily assuming these are consecutive. I'm not saying we have a constant term because the constant term could be zero. I'm not saying we have a linear term because the coefficient there could be zero. There might not be a quadratic term. There could potentially be big gaps between these two variables here. So we have like X squared and X to the fifth. And so I'm just basically only trying to capture the ones we actually need here. Now, because we're working mod two, of course, if I skip the zeros, then I know these coefficients are one, nonetheless, but this argument actually could be developed in other settings as well. More general codes, not necessarily over Z2, but nonetheless, Z2 is the setting we care about. All right, so we have this polynomial F of X. These are the potentially non-zero coefficients of F of X and suppose that the total amount of these coefficients M is less than or equal to S right here. Now, because F of X belongs to the code and the code is a principle ideal, that means that the generator G must divide F. Now, since each of those Zetas from before, Zeta R, Zeta R plus one, Zeta R plus two, et cetera, since those are all roots of G and G divides F, those Zetas, those roots of unity have to also be roots of F. So F of Zeta to the R is equal to zero. F of Zeta to the R plus one is equal to zero, et cetera, all the way through, all right? So with this observation in mind, we are going to create a system of M by M linear equations. So we have M equations with M variables that are going to look a lot like the following right here. So we're going to take Zeta to the R raised to the I1 power. That's the coefficient of X1. The coefficient of X2 is going to be Zeta to the R raised to the I2 power times X2, all the way down to Zeta to the R to the IM times XM equals zero. So that's our first equation. We replicate that for the second equation, but each of the Zeta R's becomes a Zeta R plus one. The exponents are the same otherwise. And then we continue on. We're going to have an equation for Zeta to the R plus two, Zeta to the R plus three, and we're going all the way down to Zeta to the R plus M minus one. Now, we don't necessarily go to S because M could be strictly smaller than S, but since M is at most S, we do know that we can start from R and go through until we get to R M minus one, which again, worst case scenario, M equals S and you get all of them. So we go from R to R plus S minus one, but we have at least enough Zetas to do each of these things because we are going to have M equations here. So this was our first equation, second equation all the way down to the Mth equation down there. So we have M equations and M variables like so. Now, before we go on, let me give you some motivation on why we came up with this linear system in the first place. We're looking at the polynomials right here, right? We don't know what these coefficients are. So we're actually treating those as, we're going to treat those as the variables here, which I switched them to be X1, X2, X to the M because that's how we usually think of variables of a linear system as X's here. Then if we take this polynomial and evaluate it, like for example, if we evaluate it at F, if we evaluate F at Zeta to the R, each of these X's, this X notice no subscript there, becomes a Zeta to the R and you're going to have Zeta to the R to the I1 power. You're going to have Zeta to the R to the I2 power, like so Zeta to the R to the I M power. So when you look at the left-hand side of this equation right here, this is just F of Zeta to the R. That's exactly what that thing is, which by assumption that's equal to zero, so we get that right there. And so then the second equation, the left-hand side is just F evaluated at Zeta to the R plus one, which also by assumption that's equal to zero, and we get this and we continue all the way through until we have M equations. We want a square system M by M and notice it's going to be a homogeneous system. All the right-hand sides are equal to zero. So this is a system of linear equations we get by our assumptions on F, but as we have some exponential expressions, we can actually swap the roles of these exponents right here. So Zeta to the R to the I1 becomes Zeta to the I1 R, and we're going to do that for each of these so that when you look at the first equation, you always have an exponent of R right here, like so. And so then you have Zeta I1, Zeta I2, up to Zeta IM, like so. And so we did the linear system in that manner. Now, this linear system that you see then on the screen, it's a homogeneous linear system, the right-hand side's all equal to zero. And so in this situation, it really just comes down to studying the coefficient matrix of the linear system, which we're going to call that V right here. The coefficient matrix is going to be this thing right here. And this is an example of a Van Daman matrix, which I mean, that's not exactly true. You do have to factor things out a little bit here. You'll notice that if you look at this equation, or this column right here, there is a scalar of Zeta to the I1 to the R. You can basically factor it out of just that single row, and you can do the same thing right here. Zeta to the I2 to the R power, you can factor out the Rth power, you can factor out the Rth power of Zeta to the IM. Why does that matter here? Because when you're computing the determinant of this matrix V right here, you can factor a single scalar from a column or a row. We're going to do columns in this situation. So we can factor out a Zeta to the I1, Zeta to the I2, all the way down to the Zeta to the IM, each of these raised to the Rth power. And then this will be a determinant of an authentic Van Daman matrix for which things will look a little bit different in that situation. Maybe I'll try to write this on the screen a little bit. If you take away all those R powers, you're going to have ones across the first row, then you're going to have a Zeta to the I1, Zeta to the I2, all the way down to Zeta to the IM, and then you proceed all the way down. In the bottom row, you should then have Zeta to the I1I to the M-1 power. Then the next one would be Zeta to the I2, also raised to the M-1 power. Got a little scrunch there, but despite my crudeness in drawing here, this actually is then a Van Daman matrix here. So this right here gives us a Van Daman determinant for which then you times that by some non-zero number inside of the splitting field. But in particular, when you have a Van Daman matrix, the Van Daman matrix, the Van Daman determinant is always non-zero. We can actually come up with a specific formula here, but that goes beyond the point of what we need right now. This Van Daman determinant is always non-zero. And so up to some adjustments of scalars, this matrix V is a Van Daman matrix. So as this one is non-zero, and this one is non-zero, as we are working with arithmetic in the splitting field, the product who non-zero numbers is non-zero. And then it's a classic linear algebra result that a matrix is non-singular if and only if it's determinant is non-zero. That it's an invertible matrix. What that tells us for the linear system is that the linear system will have a unique solution. Now, because it's a homogeneous system, it's very easy to see that the zero vector is a solution here. Notice of course any matrix times the appropriately sized zero vector will give you back the zero vector. So that's a solution. It's a unique solution. But wait a second. The vector A, where A is given as A sub I1, A sub I2, all the way up to A sub Im, which remember these are the coefficients of our polynomial F. If you take A to be that vector, it's also a solution because if you multiply this matrix by those coefficients, you're each of those columns there. So let's look at this thing over here. When you multiply V times A, you're going to end up with a vector whose entries look like F of zeta to the R. Then you have zeta to the 1, the 1, R plus 1, R plus 2, all the way down to F of zeta to the R plus M minus 1 there. So each, the output vector here, V times A, is going to give you the evaluation of the polynomial at those numbers. That's why Vandermonde matrices are coming into play here. The Vandermonde matrices accomplish polynomial evaluation here. That's the significance. So this has to equal the zero vector. But since we have a non-singular matrix, there can only be one solution. So this then tells us that the vector A has to equal the zero vector, zero. And so all of these numbers, all these coefficients, A sub I1, A sub I2, all the way up to A sub Im, has to equal zero. That actually, since these were the coefficients of F, this actually tells us that F was the zero polynomial. And so this tells us that if we have a polynomial whose weight is less than, less than or equal to S, it actually has to be the zero polynomial. Which then we, from that we infer that every non-zero polynomial of the cyclic code has a weight of at least S plus 1. And since in a linear code, the minimum distance is equivalence to the minimum weight of a non-zero polynomial, then that tells us that the minimum distance here is at least S plus 1. So any cyclic code that has this property S plus 1, we know it's efficacy because its minimum distance is at least S plus 1. That's a pretty nice result.