Reed-Muller Codes : Generator and Parity Check Matrices and the Minimum Distance

Generator Matrix Construction for RM Codes

While the polynomial evaluation method provides a powerful algebraic definition for Reed-Muller codes, an alternative and equally fundamental approach is to construct their generator matrix directly using linear algebra, specifically the Kronecker product. This method reveals the code's recursive structure and provides a direct path to its implementation.

1. The Kronecker Product

The Kronecker product, denoted by the symbol \otimes, is an operation on two matrices of arbitrary size, resulting in a larger block matrix.

If AA is an m×nm \times n matrix and BB is a p×qp \times q matrix, their Kronecker product ABA \otimes B is the mp×nqmp \times nq block matrix:

AB=(a11Ba12Ba1nBa21Ba22Ba2nBam1Bam2BamnB)(1) A \otimes B = \begin{pmatrix} a_{11}B & a_{12}B & \cdots & a_{1n}B \\ a_{21}B & a_{22}B & \cdots & a_{2n}B \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1}B & a_{m2}B & \cdots & a_{mn}B \end{pmatrix} \tag{1}

Essentially, each element aija_{ij} of matrix AA is replaced by the scaled matrix aijBa_{ij}B.

The Kronecker product is associative, meaning we can extend it to multiple matrices in a straightforward sequence:

ABC=(AB)C=A(BC)(2) A \otimes B \otimes C = (A \otimes B) \otimes C = A \otimes (B \otimes C) \tag{2}

This allows us to define the mm-fold Kronecker product of a matrix with itself, denoted GmG^{\otimes m}.

2. The RM Generator Kernel

The entire family of Reed-Muller codes can be constructed from the mm-fold Kronecker product of a simple 2×22 \times 2 kernel matrix, operating in the binary field F2\mathbb{F}_2:

G2=(1101)(3) G_2 = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} \tag{3}

The matrix for an RM(m,m)RM(m, m) code, which is the space of all possible Boolean functions in mm variables, is given by G2mG_2^{\otimes m}. This is a 2m×2m2^m \times 2^m matrix.

Example: Small values of mm

  • For m=2m=2, the matrix is G22G_2^{\otimes 2}:

    G22=G2G2=(1G21G20G21G2)=(1111010100110001)(4) G_2^{\otimes 2} = G_2 \otimes G_2 = \begin{pmatrix} 1 \cdot G_2 & 1 \cdot G_2 \\ 0 \cdot G_2 & 1 \cdot G_2 \end{pmatrix} = \begin{pmatrix} 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 \end{pmatrix} \tag{4}

  • For m=3m=3, the matrix is G23G_2^{\otimes 3}: G23=G22G2=(1111111101010101001100110001000100001111000001010000001100000001)(5) G_2^{\otimes 3} = G_2^{\otimes 2} \otimes G_2 = \begin{pmatrix} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \end{pmatrix} \tag{5}

3. Selecting Rows for the Generator Matrix

The generator matrix for a specific RM(r,m)RM(r,m) code is a submatrix of G2mG_2^{\otimes m}, formed by selecting a specific subset of its rows.

An observation on the matrix G2mG_2^{\otimes m} is that the Hamming weight of its rows takes values 2k2^k for k{0,1,...,m}k \in \{0, 1, ..., m\}. The selection rule is based on these weights:

The generator matrix for the RM(r,m)RM(r,m) code, denoted GRM(r,m)G_{RM(r,m)}, is formed by taking all rows of G2mG_2^{\otimes m} whose Hamming weight is greater than or equal to 2mr2^{m-r}.

  • Number of Rows: The number of rows selected by this rule is precisely k=i=0r(mi)k = \sum_{i=0}^r \binom{m}{i}, which is the dimension of the RM(r,m)RM(r,m) code.
  • Linear Independence: Since G2G_2 is an invertible matrix, its mm-fold Kronecker product G2mG_2^{\otimes m} is also invertible. This means all of its 2m2^m rows are linearly independent. Therefore, any subset of these rows—including the set we select for our generator matrix—is also linearly independent.

3.1 Examples of Generator Matrix Construction

  • Example 1: The RM(1,2)RM(1,2) Code

    • Parameters: m=2,r=1m=2, r=1.
    • Selection Rule: Select rows from G22G_2^{\otimes 2} with weight 221=2\ge 2^{2-1} = 2.
    • The matrix G22G_2^{\otimes 2} has rows with weights (4, 2, 2, 1). We select the first three rows.
    • G_RM(1,2)=(111101010011)(6) G\_{RM(1,2)} = \begin{pmatrix} 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 \end{pmatrix} \tag{6}
  • Example 2: The RM(1,3)RM(1,3) Code

    • Parameters: m=3,r=1m=3, r=1.
    • Selection Rule: Select rows from G23G_2^{\otimes 3} with weight 231=4\ge 2^{3-1} = 4.
    • The rows of G23G_2^{\otimes 3} have weights (8, 4, 4, 2, 4, 2, 2, 1). We select the rows with weights 8 and 4. These are the rows with indices 0, 1, 2, and 4.
    • G_RM(1,3)=(11111111010101010011001100001111)(7) G\_{RM(1,3)} = \begin{pmatrix} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \end{pmatrix} \tag{7}
  • Example 3: The RM(2,3)RM(2,3) Code

    • Parameters: m=3,r=2m=3, r=2.
    • Selection Rule: Select rows from G23G_2^{\otimes 3} with weight 232=2\ge 2^{3-2} = 2.
    • The rows of G23G_2^{\otimes 3} have weights (8, 4, 4, 2, 4, 2, 2, 1). We select all rows except the last one (which has weight 1). This gives us 7 rows.
    • G_RM(2,3)=(11111111010101010011001100010001000011110000010100000011)(8) G\_{RM(2,3)} = \begin{pmatrix} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \end{pmatrix} \tag{8}
  • Example 4: The RM(0,m)RM(0,m) Code (Repetition Code)

    • Parameters: mm is any integer, r=0r=0.
    • Selection Rule: Select rows from G2mG_2^{\otimes m} with weight 2m0=2m\ge 2^{m-0} = 2^m.
    • Only the first row (the all-ones vector) of G2mG_2^{\otimes m} has this weight.
    • G_RM(0,m)=(111)(9) G\_{RM(0,m)} = \begin{pmatrix} 1 & 1 & \cdots & 1 \end{pmatrix} \tag{9}
  • Example 5: The RM(m,m)RM(m,m) Code (The full space F22m\mathbb{F}_2^{2^m})

    • Parameters: r=mr=m.
    • Selection Rule: Select rows from G2mG_2^{\otimes m} with weight 2mm=20=1\ge 2^{m-m} = 2^0 = 1.
    • All non-zero rows of G2mG_2^{\otimes m} have a weight of at least 1. Since the matrix is invertible, all rows are non-zero. Thus, we select all rows.
    • G_RM(m,m)=G2m(10) G\_{RM(m,m)} = G_2^{\otimes m} \tag{10}

4. Connection to the Polynomial Definition

This constructive method is perfectly equivalent to the polynomial evaluation definition. The rows of G2mG_2^{\otimes m} are, in fact, the evaluation vectors of all possible monomials of mm variables.

The correspondence is as follows: Let the binary representation of the row index jj be (b1b2bm)(b_1 b_2 \dots b_m), where b1b_1 is the most significant bit (MSB). The jj-th row of G2mG_2^{\otimes m} corresponds to the evaluation vector of the monomial Mj=i=1mXibiM_j = \prod_{i=1}^m X_i^{b_i}. For instance, if m=3m=3 and j=5j=5, its binary representation is (101)2(101)_2, so the monomial is X11X20X31=X1X3X_1^1 X_2^0 X_3^1 = X_1 X_3.

The Hamming weight of the evaluation vector for a monomial of degree dd is exactly 2md2^{m-d}.

Therefore, our row selection rule, weight 2mr\ge 2^{m-r}, can be translated into the polynomial degree:

weight(Eval(Mj))2mr    2md2mr    mdmr    dr(11) \text{weight}( \text{Eval}(M_j) ) \ge 2^{m-r} \implies 2^{m-d} \ge 2^{m-r} \implies m-d \ge m-r \implies d \le r \tag{11}

This shows that selecting rows with weight at least 2mr2^{m-r} is identical to selecting the basis functions (monomials) of degree at most rr.

Example: Constructing GRM(1,3)G_{RM(1,3)}

  • Parameters: m=3,r=1m=3, r=1.
  • Selection Rule: Select rows from G23G_2^{\otimes 3} with Hamming weight 231=4\ge 2^{3-1} = 4.

Let's examine the rows of G23G_2^{\otimes 3} and their corresponding monomials, with X1X_1 as the MSB.

Row Index (jj) Binary Rep. (b1b2b3b_1b_2b_3) Monomial Hamming Weight Select? (Weight 4\ge 4)
0 000 11 8=2308 = 2^{3-0} Yes
1 001 X3X_3 4=2314 = 2^{3-1} Yes
2 010 X2X_2 4=2314 = 2^{3-1} Yes
3 011 X2X3X_2X_3 2=2322 = 2^{3-2} No
4 100 X1X_1 4=2314 = 2^{3-1} Yes
5 101 X1X3X_1X_3 2=2322 = 2^{3-2} No
6 110 X1X2X_1X_2 2=2322 = 2^{3-2} No
7 111 X1X2X3X_1X_2X_3 1=2331 = 2^{3-3} No

The selected monomials are {1,X1,X2,X3}\{1, X_1, X_2, X_3\}. The generator matrix is formed by taking the rows from G23G_2^{\otimes 3} with indices 0, 1, 2, and 4, in that specific order.

GRM(1,3)=(11111111010101010011001100001111)Eval(1)Eval(X3)Eval(X2)Eval(X1)(12) G_{RM(1,3)} = \begin{pmatrix} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \end{pmatrix} \begin{matrix} \leftarrow \text{Eval}(1) \\ \leftarrow \text{Eval}(X_3) \\ \leftarrow \text{Eval}(X_2) \\ \leftarrow \text{Eval}(X_1) \end{matrix} \tag{12}


5. The Duality of Reed-Muller Codes

A remarkable property of RM codes is that they are duals of each other. The dual of a linear code C\mathcal{C}, denoted C\mathcal{C}^{\perp}, is the set of all vectors that are orthogonal to every codeword in C\mathcal{C}. A generator matrix for one code can serve as a parity-check matrix for its dual.

Theorem: The dual of the RM(r,m)RM(r, m) code is the RM(mr1,m)RM(m-r-1, m) code.

[RM(r,m)]=RM(mr1,m)(12) [RM(r, m)]^{\perp} = RM(m-r-1, m) \tag{12}

This implies that a generator matrix for RM(mr1,m)RM(m-r-1, m) is a valid parity-check matrix for RM(r,m)RM(r, m). Let GrG_r be the generator matrix for RM(r,m)RM(r,m) and let H=Gmr1H = G_{m-r-1} be the generator matrix for RM(mr1,m)RM(m-r-1,m). To prove the duality, we must show that GrHT=0G_r H^T = \mathbf{0}.

Proof: This condition is satisfied if the dot product of any row from GrG_r with any row from HH is zero. Let's analyze this using the polynomial representation.

  1. A row in GrG_r is the evaluation vector Eval(f)\text{Eval}(f) of a basis monomial f(X)f(\mathbf{X}) where deg(f)r\text{deg}(f) \le r.
  2. A row in HH is the evaluation vector Eval(g)\text{Eval}(g) of a basis monomial g(X)g(\mathbf{X}) where deg(g)mr1\text{deg}(g) \le m-r-1.

The dot product of these two vectors is the sum of their component-wise product:

Eval(f)Eval(g)=vF2mf(v)g(v)=vF2m(fg)(v)(13) \text{Eval}(f) \cdot \text{Eval}(g) = \sum_{\mathbf{v} \in \mathbb{F}_2^m} f(\mathbf{v}) g(\mathbf{v}) = \sum_{\mathbf{v} \in \mathbb{F}_2^m} (f \cdot g)(\mathbf{v}) \tag{13}

The degree of the product polynomial p(X)=f(X)g(X)p(\mathbf{X}) = f(\mathbf{X})g(\mathbf{X}) is:

deg(p)=deg(f)+deg(g)r+(mr1)=m1(14) \text{deg}(p) = \text{deg}(f) + \text{deg}(g) \le r + (m-r-1) = m-1 \tag{14}

We use a fundamental property of Boolean functions: for any non-zero Boolean polynomial p(X)p(\mathbf{X}) with degree less than mm, the sum of its evaluations over all 2m2^m points is zero.

vF2mp(v)=0(15) \sum_{\mathbf{v} \in \mathbb{F}_2^m} p(\mathbf{v}) = 0 \tag{15}

Since deg(p)<m\text{deg}(p) < m, the dot product is zero. This holds for any pair of basis vectors (rows), proving the duality.

5.1 Duality Example: The Self-Dual RM(1,3)RM(1,3) Code

Let's verify the property GHT=0GH^T = \mathbf{0} with an example.

  • Consider the code C=RM(1,3)\mathcal{C} = RM(1,3). Here m=3,r=1m=3, r=1.
  • Its dual is C=RM(mr1,m)=RM(311,3)=RM(1,3)\mathcal{C}^{\perp} = RM(m-r-1, m) = RM(3-1-1, 3) = RM(1,3).
  • This is a self-dual code, meaning the code and its dual are identical. Therefore, its generator matrix GG can also serve as its parity-check matrix HH. We must verify that GGT=0G G^T = \mathbf{0}.

From the previous section, the generator matrix is:

G=GRM(1,3)=(11111111010101010011001100001111)(16) G = G_{RM(1,3)} = \begin{pmatrix} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \end{pmatrix} \tag{16}

Its transpose is:

GT=(10001100101011101001110110111111)(17) G^T = \begin{pmatrix} 1 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 \\ 1 & 0 & 1 & 0 \\ 1 & 1 & 1 & 0 \\ 1 & 0 & 0 & 1 \\ 1 & 1 & 0 & 1 \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 1 & 1 \end{pmatrix} \tag{17}

Now, we compute the product GGTG G^T. Each entry (i,j)(i,j) of the resulting matrix is the dot product of row ii of GG with row jj of GG. All calculations are in F2\mathbb{F}_2.

GGT=(8444442242424224)(mod2)=(0000000000000000)(18) G G^T = \begin{pmatrix} 8 & 4 & 4 & 4 \\ 4 & 4 & 2 & 2 \\ 4 & 2 & 4 & 2 \\ 4 & 2 & 2 & 4 \end{pmatrix} \pmod 2 = \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix} \tag{18}

The result is the 4×44 \times 4 zero matrix, confirming that the generator matrix for RM(1,3)RM(1,3) is a valid parity-check matrix for itself, as expected for a self-dual code.

6. Minimum Distance from the Generator Matrix Construction

The recursive construction of the generator matrix provides an elegant way to prove the minimum distance of an RM(r,m)RM(r,m) code. We can prove by induction that the minimum Hamming distance is exactly dmin=2mrd_{min} = 2^{m-r}.

Theorem: The minimum distance of the RM(r,m)RM(r,m) code is 2mr2^{m-r}.

Proof: We will use induction on mm.

Base Cases:

  1. For r=0r=0, the RM(0,m)RM(0,m) code is the repetition code with codewords 0=(0,,0)\mathbf{0} = (0, \dots, 0) and 1=(1,,1)\mathbf{1} = (1, \dots, 1). The minimum distance is the weight of the all-ones vector, which is 2m2^m. The formula gives dmin=2m0=2md_{min} = 2^{m-0} = 2^m. This holds.
  2. For r=mr=m, the RM(m,m)RM(m,m) code is the entire space F22m\mathbb{F}_2^{2^m}. The minimum distance is 1 (e.g., the codeword (0,,0,1)(0, \dots, 0, 1)). The formula gives dmin=2mm=20=1d_{min} = 2^{m-m} = 2^0 = 1. This also holds.

Inductive Hypothesis: Assume that for all rmr' \le m', where m<mm' < m, the minimum distance of the RM(r,m)RM(r', m') code is 2mr2^{m'-r'}.

Inductive Step: To construct the generator matrix for RM(r,m)RM(r,m), we select rows from G2mG_2^{\otimes m}. Recall the recursive structure:

G2m=(G2(m1)G2(m1)0G2(m1))(19) G_2^{\otimes m} = \begin{pmatrix} G_2^{\otimes (m-1)} & G_2^{\otimes (m-1)} \\ \mathbf{0} & G_2^{\otimes (m-1)} \end{pmatrix} \tag{19}

The rows of GRM(r,m)G_{RM(r,m)} can be partitioned into two sets based on this structure:

  1. Rows from the top block: These correspond to basis monomials of degree at most rr using only the first m1m-1 variables (X1,,Xm1X_1, \dots, X_{m-1}). These are precisely the basis vectors for the RM(r,m1)RM(r, m-1) code. In the mm-variable space, these rows have the form (vv)(\mathbf{v} | \mathbf{v}), where v\mathbf{v} is a basis vector of RM(r,m1)RM(r, m-1). The generator matrix for this part is thus (GRM(r,m1)GRM(r,m1))(G_{RM(r, m-1)} | G_{RM(r, m-1)}).

  2. Rows from the bottom block: These correspond to basis monomials that include the variable XmX_m. They have the form XmM(X1,,Xm1)X_m \cdot M(X_1, \dots, X_{m-1}), where the degree of MM is at most r1r-1. The vectors generated by these monomials are the basis vectors for the RM(r1,m1)RM(r-1, m-1) code, but shifted into the second half of the codeword. These rows have the form (0u)(\mathbf{0} | \mathbf{u}), where u\mathbf{u} is a basis vector of RM(r1,m1)RM(r-1, m-1). The generator matrix for this part is (0GRM(r1,m1))(\mathbf{0} | G_{RM(r-1, m-1)}).

Combining these, the generator matrix for RM(r,m)RM(r,m) has the following block structure:

GRM(r,m)=(GRM(r,m1)GRM(r,m1)0GRM(r1,m1))(20) G_{RM(r,m)} = \begin{pmatrix} G_{RM(r, m-1)} & G_{RM(r, m-1)} \\ \mathbf{0} & G_{RM(r-1, m-1)} \end{pmatrix} \tag{20}

Now consider an arbitrary non-zero codeword cRM(r,m)\mathbf{c} \in RM(r,m). It is generated by a message vector, which we can partition as (ab)(\mathbf{a} | \mathbf{b}), where a\mathbf{a} is the part for the top block and b\mathbf{b} is for the bottom.

c=(ab)GRM(r,m)=(aGRM(r,m1)aGRM(r,m1))+(0bGRM(r1,m1))(21) \mathbf{c} = (\mathbf{a} | \mathbf{b}) \cdot G_{RM(r,m)} = (\mathbf{a} G_{RM(r, m-1)} | \mathbf{a} G_{RM(r, m-1)}) + (\mathbf{0} | \mathbf{b} G_{RM(r-1, m-1)}) \tag{21}

Let u=aGRM(r,m1)\mathbf{u} = \mathbf{a} \cdot G_{RM(r, m-1)}, which is a codeword in RM(r,m1)RM(r, m-1), and let v=bGRM(r1,m1)\mathbf{v} = \mathbf{b} \cdot G_{RM(r-1, m-1)}, a codeword in RM(r1,m1)RM(r-1, m-1). The codeword c\mathbf{c} can be written as:

c=(uu+v)(22) \mathbf{c} = (\mathbf{u} | \mathbf{u} + \mathbf{v}) \tag{22}

This is the famous Plotkin construction, or (uu+v)(u|u+v) construction. The Hamming weight of c\mathbf{c} is wt(c)=wt(u)+wt(u+v)wt(\mathbf{c}) = wt(\mathbf{u}) + wt(\mathbf{u} + \mathbf{v}). We need to find the minimum possible weight for a non-zero c\mathbf{c}.

We analyze two cases for the message (ab)(\mathbf{a} | \mathbf{b}):

  • Case 1: b=0\mathbf{b} = \mathbf{0} and a0\mathbf{a} \neq \mathbf{0} In this case, v=0\mathbf{v} = \mathbf{0} and u\mathbf{u} is a non-zero codeword in RM(r,m1)RM(r, m-1). The codeword is c=(uu)\mathbf{c} = (\mathbf{u} | \mathbf{u}). The weight is wt(c)=2wt(u)wt(\mathbf{c}) = 2 \cdot wt(\mathbf{u}). The minimum weight in this case is twice the minimum distance of RM(r,m1)RM(r, m-1). By our inductive hypothesis, this is:

    wtmin,1=2dmin(RM(r,m1))=2(2(m1)r)=2mr(23) wt_{min, 1} = 2 \cdot d_{min}(RM(r, m-1)) = 2 \cdot (2^{(m-1)-r}) = 2^{m-r} \tag{23}

  • Case 2: b0\mathbf{b} \neq \mathbf{0} In this case, v\mathbf{v} is a non-zero codeword in RM(r1,m1)RM(r-1, m-1). Since v\mathbf{v} and u+v\mathbf{u}+\mathbf{v} are vectors in a linear code, their sum v+(u+v)=u\mathbf{v}+(\mathbf{u}+\mathbf{v}) = \mathbf{u} is also in a linear space. The weight of the codeword is wt(c)=wt(u)+wt(u+v)wt(\mathbf{c}) = wt(\mathbf{u}) + wt(\mathbf{u} + \mathbf{v}). It is known from the properties of the (uu+v)(u|u+v) construction that the weight of any such codeword is at least the minimum distance of the code that produces the v\mathbf{v} part. More directly, the minimum weight of v\mathbf{v} is the minimum distance of RM(r1,m1)RM(r-1, m-1). By our inductive hypothesis: wt(v)dmin(RM(r1,m1))=2(m1)(r1)=2mr(24) wt(\mathbf{v}) \ge d_{min}(RM(r-1, m-1)) = 2^{(m-1)-(r-1)} = 2^{m-r} \tag{24} Since the second half of the codeword c\mathbf{c} is u+v\mathbf{u}+\mathbf{v}, its weight is wt(u+v)wt(\mathbf{u}+\mathbf{v}). The total weight is wt(c)=wt(u)+wt(u+v)wt(\mathbf{c}) = wt(\mathbf{u}) + wt(\mathbf{u}+\mathbf{v}). The codewords form a linear code, so the minimum distance is the minimum weight of any non-zero codeword. For any codeword where v0\mathbf{v} \ne 0, its weight is at least dmin(RM(r1,m1))=2mrd_{min}(RM(r-1, m-1)) = 2^{m-r}.

Combining both cases, the minimum weight of any non-zero codeword is the minimum of the minimums from each case:

dmin(RM(r,m))=min(2mr,2mr)=2mr(25) d_{min}(RM(r,m)) = \min(2^{m-r}, 2^{m-r}) = 2^{m-r} \tag{25}

The induction holds, and the proof is complete.