{
  "schema_version": "ocme-derivation-reader-v1",
  "guide_id": "derivation-mko-matrix-01",
  "mko_id": "mko-matrix",
  "title": {
    "zh-Hant": "矩陣：尺寸、一起算索引、逐項加法與轉置",
    "en": "Matrices: dimensions, one-based indexing, entrywise addition and transpose"
  },
  "contract": {
    "schema_version": "ocme-derivation-guide-v0.1",
    "guide_id": "derivation-mko-matrix-01",
    "source": {
      "mko_id": "mko-matrix",
      "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
      "sha256": "c0233ecc6ee07427af1589feb16108500eb2e48b0b2fb84b5b39f0f38b02f109",
      "english_sha256": "18504021d52173d8f2f8aa663d83dc058f5205bea2c677a9722daba770776432"
    },
    "mode": "definition_walkthrough",
    "audience_prerequisites": [
      "numeric_evaluation",
      "function_def",
      "add_comm",
      "forall_intro"
    ],
    "goal": {
      "zh-Hant": "設 M=[[2,−1,0],[5,3,7]]、N=[[1,4,−2],[0,−3,6]]（每個內層括號是一行，row）。求兩者尺寸，讀出 M(1,2)、M(2,3)，判定 M(3,1) 是否存在；求 M+N、Mᵀ、Nᵀ；對任意同尺寸實矩陣證明 (A+B)ᵀ=Aᵀ+Bᵀ 與 (Aᵀ)ᵀ=A，並在 M、N 上核對；說明 M+Mᵀ 無定義；最後以反例區分轉置與「逐行倒序」及「反矩陣」，並把程式的零起算索引對應回一起算索引。",
      "en": "Let M=[[2,−1,0],[5,3,7]] and N=[[1,4,−2],[0,−3,6]] (each inner bracket is one row). Find their dimensions, read off M(1,2) and M(2,3), and decide whether M(3,1) exists; compute M+N, Mᵀ and Nᵀ; prove (A+B)ᵀ=Aᵀ+Bᵀ and (Aᵀ)ᵀ=A for all real matrices of equal size and check them on M and N; explain why M+Mᵀ is undefined; finally use counterexamples to separate the transpose from reversing the rows and from the inverse matrix, and translate zero-based program indices back to one-based indices."
    },
    "givens": [
      {
        "id": "G1",
        "statement": {
          "zh-Hant": "約定：實矩陣；外部行列索引從 1 開始；每邊尺寸 1 至 5，各行等長且非空；M、N 等具體例子的元素為整數（MKO 假設 a1、a2），一般轉置恆等式則對實數元素證明。",
          "en": "Conventions: real matrices; external row and column indices start at 1; each dimension is from 1 to 5, with nonempty rows of equal length; the concrete matrices such as M,N have integer entries (MKO assumptions a1, a2), while the general transpose identities are proved for real entries."
        }
      },
      {
        "id": "G2",
        "statement": {
          "zh-Hant": "M 的兩行為 (2,−1,0) 與 (5,3,7)；N 的兩行為 (1,4,−2) 與 (0,−3,6)。",
          "en": "The two rows of M are (2,−1,0) and (5,3,7); the two rows of N are (1,4,−2) and (0,−3,6)."
        }
      },
      {
        "id": "G3",
        "statement": {
          "zh-Hant": "某程式以零起算陣列 a 逐行儲存 M：a[i][j]，0≤i≤1、0≤j≤2。另有方陣 S 的兩行為 (1,2) 與 (3,4)，只用於反例。",
          "en": "A program stores M row by row in a zero-based array a: a[i][j] with 0≤i≤1 and 0≤j≤2. Also a square matrix S with rows (1,2) and (3,4) is used only in a counterexample."
        }
      }
    ],
    "steps": [
      {
        "id": "S01",
        "uses": [
          "G1"
        ],
        "before_tex": "M\\in\\mathbb{R}^{m\\times n}",
        "after_tex": "M(i,j)\\ (1\\le i\\le m,\\ 1\\le j\\le n);\\ (A+B)(i,j)=A(i,j)+B(i,j);\\ M^{\\mathsf T}(j,i)=M(i,j)",
        "relation": "definition",
        "rule": "mko_matrix_def",
        "conditions": [
          "m,n\\ge 1"
        ],
        "explanation": {
          "zh-Hant": "寫出 MKO 的定義：矩陣是由兩個索引指定的實數表，第一個索引是行（row）、第二個是列（column），都從 1 開始。加法只對同尺寸矩陣定義，逐項相加；轉置 Mᵀ 是 n×m，把 M(i,j) 放到位置 (j,i)。",
          "en": "State the MKO's definition: a matrix is a table of reals indexed by two indices, the first the row and the second the column, both starting at 1. Addition is defined only for matrices of equal dimensions, entry by entry; the transpose Mᵀ is n×m and places M(i,j) at position (j,i)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G1",
            "mko_matrix_def"
          ],
          "explanation": {
            "zh-Hant": "此步只寫出定義，不推出新事實。",
            "en": "This step only states the definition; it derives no new fact."
          }
        },
        "leaf_basis": "mko_matrix_def + def_unfold"
      },
      {
        "id": "S02",
        "uses": [
          "S01",
          "G2"
        ],
        "before_tex": "M=\\begin{pmatrix}2&-1&0\\\\5&3&7\\end{pmatrix},\\ N=\\begin{pmatrix}1&4&-2\\\\0&-3&6\\end{pmatrix}",
        "after_tex": "M,N\\in\\mathbb{R}^{2\\times 3}",
        "relation": "implies",
        "rule": "mko_matrix_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "M 有 2 行，每行都有 3 個元素（各行等長、非空），所以 M 是 2×3，共 2·3=6 個元素；N 同樣是 2×3。尺寸先寫行數再寫列數，2×3 與 3×2 是不同尺寸。",
          "en": "M has 2 rows, each with 3 entries (rows of equal length, nonempty), so M is 2×3 with 2·3=6 entries; N is likewise 2×3. Dimensions list rows first and columns second, so 2×3 and 3×2 are different dimensions."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mko_matrix_def",
            "G2"
          ],
          "explanation": {
            "zh-Hant": "需要各行等長；若某行長度不同，就不是矩陣。尺寸由實際行列數決定，與元素數值無關。",
            "en": "It needs rows of equal length; with a row of different length the table would not be a matrix. Dimensions are fixed by the actual numbers of rows and columns, not by the entry values."
          }
        },
        "leaf_basis": "mko_matrix_def + numeric_evaluation"
      },
      {
        "id": "S03",
        "uses": [
          "S01",
          "S02"
        ],
        "before_tex": "M(1,2),\\ M(2,3),\\ M(2,1)",
        "after_tex": "M(1,2)=-1,\\ M(2,3)=7,\\ M(2,1)=5",
        "relation": "equivalent",
        "rule": "def_unfold",
        "conditions": [
          "1\\le i\\le 2",
          "1\\le j\\le 3"
        ],
        "explanation": {
          "zh-Hant": "M(1,2) 是第 1 行第 2 個元素 −1；M(2,3) 是第 2 行第 3 個元素 7；M(2,1) 是第 2 行第 1 個元素 5。M(1,2)≠M(2,1)：兩個索引的次序有意義，先行後列。",
          "en": "M(1,2) is the 2nd entry of row 1, namely −1; M(2,3) is the 3rd entry of row 2, namely 7; M(2,1) is the 1st entry of row 2, namely 5. M(1,2)≠M(2,1): the order of the two indices matters, row first and column second."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "def_unfold",
            "mko_matrix_def"
          ],
          "explanation": {
            "zh-Hant": "讀取元素就是展開定義，兩邊指同一個數，雙向成立。",
            "en": "Reading an entry is unfolding the definition; both sides name the same number, so it is two-way."
          }
        },
        "leaf_basis": "def_unfold + mko_matrix_def"
      },
      {
        "id": "S04",
        "uses": [
          "S01",
          "S02"
        ],
        "before_tex": "M(3,1)",
        "after_tex": "(3,1)\\ \\text{is not a legal index of } M",
        "relation": "implies",
        "rule": "mko_matrix_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "M 只有 2 行，合法的行索引是 1≤i≤2。3>2，所以 M(3,1) 沒有定義；它不是 0，也不是「最後一行」。取元素前兩個索引都必須落在合法範圍（MKO 第二段）。",
          "en": "M has only 2 rows, so the legal row indices are 1≤i≤2. Since 3>2, M(3,1) is undefined; it is neither 0 nor 'the last row'. Before reading an entry both indices must lie in the legal range (MKO second paragraph)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "mko_matrix_def",
            "order_basics"
          ],
          "explanation": {
            "zh-Hant": "只用到尺寸 2×3 與 3>2；不宣稱程式語言對越界索引的行為。",
            "en": "It uses only the dimensions 2×3 and 3>2; it makes no claim about how a programming language treats out-of-range indices."
          }
        },
        "leaf_basis": "mko_matrix_def + order_basics"
      },
      {
        "id": "S05",
        "uses": [
          "S01",
          "S02"
        ],
        "before_tex": "M,N\\in\\mathbb{R}^{2\\times 3}",
        "after_tex": "M+N\\ \\text{defined},\\ M+N\\in\\mathbb{R}^{2\\times 3}",
        "relation": "implies",
        "rule": "mko_matrix_def",
        "conditions": [
          "\\dim M=\\dim N"
        ],
        "explanation": {
          "zh-Hant": "加法前先驗尺寸（MKO 假設 a3）：M 與 N 都是 2×3，所以 M+N 有定義，而且也是 2×3。",
          "en": "Check dimensions before adding (MKO assumption a3): M and N are both 2×3, so M+N is defined and is also 2×3."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "mko_matrix_def"
          ],
          "explanation": {
            "zh-Hant": "尺寸相同是加法的必要條件；S12 顯示尺寸不同時加法沒有定義。",
            "en": "Equal dimensions are required for addition; S12 shows that addition is undefined when they differ."
          }
        },
        "leaf_basis": "mko_matrix_def"
      },
      {
        "id": "S06",
        "uses": [
          "S05",
          "G2"
        ],
        "before_tex": "M+N",
        "after_tex": "\\begin{pmatrix}2+1&-1+4&0+(-2)\\\\5+0&3+(-3)&7+6\\end{pmatrix}=\\begin{pmatrix}3&3&-2\\\\5&0&13\\end{pmatrix}",
        "relation": "equivalent",
        "rule": "mko_matrix_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "逐項相加：同一位置 (i,j) 的兩個元素相加，共 6 個位置。例如 (M+N)(2,3)=7+6=13，(M+N)(2,2)=3+(−3)=0。",
          "en": "Add entry by entry: the two entries at the same position (i,j) are added, at all 6 positions. For example (M+N)(2,3)=7+6=13 and (M+N)(2,2)=3+(−3)=0."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mko_matrix_def",
            "numeric_evaluation",
            "matrix_eq"
          ],
          "explanation": {
            "zh-Hant": "兩邊尺寸相同、各位置元素相等（N1 到 N6），依 matrix_eq 是同一矩陣，雙向成立。",
            "en": "Both sides have the same dimensions and equal entries at every position (N1 to N6), so by matrix_eq they are the same matrix, two-way."
          }
        },
        "leaf_basis": "mko_matrix_def + numeric_evaluation + matrix_eq"
      },
      {
        "id": "S07",
        "uses": [
          "S01",
          "S02",
          "S03"
        ],
        "before_tex": "M^{\\mathsf T}",
        "after_tex": "\\begin{pmatrix}2&5\\\\-1&3\\\\0&7\\end{pmatrix}\\in\\mathbb{R}^{3\\times 2}",
        "relation": "equivalent",
        "rule": "mko_matrix_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "Mᵀ 是 3×2，Mᵀ(j,i)=M(i,j)：Mᵀ 的第 j 行就是 M 的第 j 列。M 的三列是 (2,5)、(−1,3)、(0,7)，所以 Mᵀ 的三行就是它們。核對：Mᵀ(3,2)=M(2,3)=7，Mᵀ(2,1)=M(1,2)=−1。",
          "en": "Mᵀ is 3×2 with Mᵀ(j,i)=M(i,j): row j of Mᵀ is column j of M. The three columns of M are (2,5), (−1,3), (0,7), so these are the three rows of Mᵀ. Check: Mᵀ(3,2)=M(2,3)=7 and Mᵀ(2,1)=M(1,2)=−1."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mko_matrix_def",
            "matrix_eq"
          ],
          "explanation": {
            "zh-Hant": "對每個位置 (j,i) 兩邊都是 M(i,j)，尺寸都是 3×2，依 matrix_eq 相等。",
            "en": "At every position (j,i) both sides are M(i,j) and both are 3×2, so they are equal by matrix_eq."
          }
        },
        "leaf_basis": "mko_matrix_def + matrix_eq"
      },
      {
        "id": "S08",
        "uses": [
          "S01",
          "S02",
          "G2"
        ],
        "before_tex": "N^{\\mathsf T}",
        "after_tex": "\\begin{pmatrix}1&0\\\\4&-3\\\\-2&6\\end{pmatrix}\\in\\mathbb{R}^{3\\times 2}",
        "relation": "equivalent",
        "rule": "mko_matrix_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "同理，Nᵀ 的三行是 N 的三列 (1,0)、(4,−3)、(−2,6)。",
          "en": "Likewise, the three rows of Nᵀ are the three columns (1,0), (4,−3), (−2,6) of N."
        },
        "reverse_audit": {
          "kind": "inverse_equivalence",
          "required_ids": [
            "mko_matrix_def",
            "matrix_eq"
          ],
          "explanation": {
            "zh-Hant": "與 S07 相同，逐位置相等。",
            "en": "As in S07, equal at every position."
          }
        },
        "leaf_basis": "mko_matrix_def + matrix_eq"
      },
      {
        "id": "S09",
        "uses": [
          "S05",
          "L_transpose_sum"
        ],
        "before_tex": "(M+N)^{\\mathsf T}",
        "after_tex": "M^{\\mathsf T}+N^{\\mathsf T}",
        "relation": "theorem_application",
        "rule": "L_transpose_sum",
        "conditions": [
          "M,N\\in\\mathbb{R}^{2\\times 3}"
        ],
        "explanation": {
          "zh-Hant": "M、N 同為 2×3，依引理 L_transpose_sum（A=M、B=N），(M+N)ᵀ=Mᵀ+Nᵀ。引理對所有同尺寸實矩陣在 S09.1、S09.2 證明；S10 再以數字核對本例。",
          "en": "M and N are both 2×3, so by Lemma L_transpose_sum (A=M, B=N), (M+N)ᵀ=Mᵀ+Nᵀ. The lemma is proved for all real matrices of equal size in S09.1 and S09.2; S10 checks this example numerically."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S05",
            "L_transpose_sum"
          ],
          "explanation": {
            "zh-Hant": "引理需要 A、B 同尺寸，否則 A+B 無定義；這由 S05 確認。",
            "en": "The lemma needs A and B of equal size, otherwise A+B is undefined; S05 confirms this."
          }
        },
        "leaf_basis": "L_transpose_sum"
      },
      {
        "id": "S09.1",
        "uses": [
          "mko_matrix_def"
        ],
        "before_tex": "A,B\\in\\mathbb{R}^{m\\times n}",
        "after_tex": "(A+B)^{\\mathsf T},\\ A^{\\mathsf T}+B^{\\mathsf T}\\in\\mathbb{R}^{n\\times m}",
        "relation": "implies",
        "rule": "mko_matrix_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "A+B 是 m×n，所以 (A+B)ᵀ 是 n×m。Aᵀ、Bᵀ 都是 n×m，尺寸相同，所以 Aᵀ+Bᵀ 有定義且是 n×m。兩邊尺寸一致。",
          "en": "A+B is m×n, so (A+B)ᵀ is n×m. Aᵀ and Bᵀ are both n×m, of equal size, so Aᵀ+Bᵀ is defined and is n×m. The two sides have the same dimensions."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mko_matrix_def"
          ],
          "explanation": {
            "zh-Hant": "只比較尺寸；元素相等在 S09.2 處理。",
            "en": "Only dimensions are compared here; equality of entries is handled in S09.2."
          }
        },
        "leaf_basis": "mko_matrix_def"
      },
      {
        "id": "S09.2",
        "uses": [
          "S09.1",
          "matrix_eq",
          "forall_intro"
        ],
        "before_tex": "(A+B)^{\\mathsf T}(j,i)",
        "after_tex": "(A+B)(i,j)=A(i,j)+B(i,j)=A^{\\mathsf T}(j,i)+B^{\\mathsf T}(j,i)=(A^{\\mathsf T}+B^{\\mathsf T})(j,i)",
        "relation": "implies",
        "rule": "matrix_eq",
        "conditions": [
          "1\\le j\\le n",
          "1\\le i\\le m"
        ],
        "explanation": {
          "zh-Hant": "取任意合法位置 (j,i)。依轉置定義、加法定義、再用一次轉置定義（兩次）與加法定義，得到等式鏈。這個位置是任意的，沒有其他假設，依 forall_intro 對所有位置成立；配合 S09.1 的尺寸相同，依 matrix_eq 得 (A+B)ᵀ=Aᵀ+Bᵀ。S09.1 與 S09.2 合起來證得引理 L_transpose_sum。",
          "en": "Take an arbitrary legal position (j,i). Applying the definition of transpose, the definition of addition, the definition of transpose again (twice) and the definition of addition gives the chain of equalities. The position is arbitrary with no further assumption, so by forall_intro the equality holds at every position; with equal dimensions from S09.1, matrix_eq gives (A+B)ᵀ=Aᵀ+Bᵀ. S09.1 and S09.2 together prove Lemma L_transpose_sum."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S09.1",
            "matrix_eq",
            "mko_matrix_def",
            "forall_intro"
          ],
          "explanation": {
            "zh-Hant": "需要尺寸相同（S09.1）與每個位置元素相等；只檢查有限個例子不足以代替這個對任意位置的論證。",
            "en": "It needs equal dimensions (S09.1) and equal entries at every position; checking a few examples could not replace this argument for an arbitrary position."
          }
        },
        "leaf_basis": "matrix_eq + mko_matrix_def + forall_intro + eq_refl_symm_trans"
      },
      {
        "id": "S10",
        "uses": [
          "S06",
          "S07",
          "S08",
          "S09"
        ],
        "before_tex": "(M+N)^{\\mathsf T},\\ M^{\\mathsf T}+N^{\\mathsf T}",
        "after_tex": "\\begin{pmatrix}3&5\\\\3&0\\\\-2&13\\end{pmatrix}=\\begin{pmatrix}2+1&5+0\\\\-1+4&3+(-3)\\\\0+(-2)&7+6\\end{pmatrix}",
        "relation": "implies",
        "rule": "numeric_evaluation",
        "conditions": [],
        "explanation": {
          "zh-Hant": "直接轉置 S06 的 M+N，三行是 (3,5)、(3,0)、(−2,13)；把 S07、S08 逐項相加也得到同樣的 3×2 矩陣。這是對本例的數值核對，與 S09 的一般結論一致；一般結論的根據是 S09.2，不是這次計算。",
          "en": "Transposing M+N from S06 directly gives the rows (3,5), (3,0), (−2,13); adding S07 and S08 entry by entry gives the same 3×2 matrix. This is a numeric check of the example, consistent with the general result of S09; the general result rests on S09.2, not on this computation."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S06",
            "S07",
            "S08",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "有限的數值核對只支持本例，不宣稱它證明一般引理。",
            "en": "A finite numeric check supports this example only and is not claimed to prove the general lemma."
          }
        },
        "leaf_basis": "numeric_evaluation + matrix_eq"
      },
      {
        "id": "S11",
        "uses": [
          "S07",
          "L_double_transpose"
        ],
        "before_tex": "(M^{\\mathsf T})^{\\mathsf T}",
        "after_tex": "M",
        "relation": "theorem_application",
        "rule": "L_double_transpose",
        "conditions": [],
        "explanation": {
          "zh-Hant": "依引理 L_double_transpose，(Mᵀ)ᵀ=M：把 S07 的 3×2 矩陣再轉置，三行 (2,5)、(−1,3)、(0,7) 變回三列，得到原本的 2×3 矩陣 M。引理在 S11.1 證明。",
          "en": "By Lemma L_double_transpose, (Mᵀ)ᵀ=M: transposing the 3×2 matrix of S07 again turns its rows (2,5), (−1,3), (0,7) back into the three columns and returns the original 2×3 matrix M. The lemma is proved in S11.1."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "L_double_transpose"
          ],
          "explanation": {
            "zh-Hant": "引理對所有實矩陣成立，沒有附加條件。",
            "en": "The lemma holds for every real matrix, with no side condition."
          }
        },
        "leaf_basis": "L_double_transpose"
      },
      {
        "id": "S11.1",
        "uses": [
          "mko_matrix_def",
          "matrix_eq"
        ],
        "before_tex": "A\\in\\mathbb{R}^{m\\times n}",
        "after_tex": "(A^{\\mathsf T})^{\\mathsf T}\\in\\mathbb{R}^{m\\times n},\\ (A^{\\mathsf T})^{\\mathsf T}(i,j)=A^{\\mathsf T}(j,i)=A(i,j)",
        "relation": "implies",
        "rule": "matrix_eq",
        "conditions": [],
        "explanation": {
          "zh-Hant": "Aᵀ 是 n×m，所以 (Aᵀ)ᵀ 是 m×n，與 A 同尺寸。對任意合法 (i,j)，兩次使用轉置定義得 (Aᵀ)ᵀ(i,j)=Aᵀ(j,i)=A(i,j)。依 matrix_eq，(Aᵀ)ᵀ=A。這證得引理 L_double_transpose。",
          "en": "Aᵀ is n×m, so (Aᵀ)ᵀ is m×n, the same size as A. For any legal (i,j), using the definition of transpose twice gives (Aᵀ)ᵀ(i,j)=Aᵀ(j,i)=A(i,j). By matrix_eq, (Aᵀ)ᵀ=A. This proves Lemma L_double_transpose."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "mko_matrix_def",
            "matrix_eq",
            "forall_intro"
          ],
          "explanation": {
            "zh-Hant": "需要尺寸相同與每個位置相等；位置是任意的。",
            "en": "It needs equal dimensions and equality at every position; the position is arbitrary."
          }
        },
        "leaf_basis": "matrix_eq + mko_matrix_def + forall_intro"
      },
      {
        "id": "S12",
        "uses": [
          "S02",
          "S07",
          "S05"
        ],
        "before_tex": "M+M^{\\mathsf T},\\ M\\in\\mathbb{R}^{2\\times 3},\\ M^{\\mathsf T}\\in\\mathbb{R}^{3\\times 2}",
        "after_tex": "M+M^{\\mathsf T}\\ \\text{undefined}",
        "relation": "implies",
        "rule": "mko_matrix_def",
        "conditions": [
          "2\\neq 3"
        ],
        "explanation": {
          "zh-Hant": "M 是 2×3，Mᵀ 是 3×2；因為 2≠3，兩者尺寸不同，逐項加法無法讓所有位置完整配對（例如 M(1,3) 存在，但 Mᵀ(1,3) 不存在），所以 M+Mᵀ 沒有定義。只有方陣（m=n）的轉置才保持尺寸。",
          "en": "M is 2×3 and Mᵀ is 3×2; since 2≠3 the dimensions differ, and entrywise addition cannot match every position (for example M(1,3) exists but Mᵀ(1,3) does not), so M+Mᵀ is undefined. Only for a square matrix (m=n) does the transpose keep the dimensions."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "S02",
            "S07",
            "mko_matrix_def"
          ],
          "explanation": {
            "zh-Hant": "加法的前提是尺寸相同，這裡不成立；不宣稱任何「補零」的延伸定義。",
            "en": "Addition requires equal dimensions, which fails here; no extended definition by 'padding with zeros' is claimed."
          }
        },
        "leaf_basis": "mko_matrix_def + numeric_evaluation"
      },
      {
        "id": "S13",
        "uses": [
          "S07",
          "G2",
          "matrix_eq"
        ],
        "before_tex": "R=\\begin{pmatrix}5&3&7\\\\2&-1&0\\end{pmatrix}\\ \\text{(rows of } M\\text{ reversed)}",
        "after_tex": "R\\in\\mathbb{R}^{2\\times 3},\\ M^{\\mathsf T}\\in\\mathbb{R}^{3\\times 2}\\ \\Rightarrow\\ R\\neq M^{\\mathsf T}",
        "relation": "implies",
        "rule": "matrix_eq",
        "conditions": [],
        "explanation": {
          "zh-Hant": "把 M 的兩行倒序得到 R，R 仍是 2×3；Mᵀ 是 3×2。尺寸不同，依 matrix_eq，R≠Mᵀ。轉置交換的是行與列的角色，不是行的先後次序（MKO 假設 a3）。",
          "en": "Reversing the two rows of M gives R, which is still 2×3, while Mᵀ is 3×2. The dimensions differ, so R≠Mᵀ by matrix_eq. The transpose exchanges the roles of rows and columns; it does not reverse the order of the rows (MKO assumption a3)."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "matrix_eq",
            "S07"
          ],
          "explanation": {
            "zh-Hant": "尺寸不同就足以推出不相等；不需逐項比較。",
            "en": "Different dimensions suffice for inequality; no entrywise comparison is needed."
          }
        },
        "leaf_basis": "matrix_eq"
      },
      {
        "id": "S14",
        "uses": [
          "G3",
          "matrix_product_def",
          "matrix_eq"
        ],
        "before_tex": "S=\\begin{pmatrix}1&2\\\\3&4\\end{pmatrix},\\ S^{\\mathsf T}=\\begin{pmatrix}1&3\\\\2&4\\end{pmatrix}",
        "after_tex": "SS^{\\mathsf T}=\\begin{pmatrix}5&11\\\\11&25\\end{pmatrix}\\neq I",
        "relation": "implies",
        "rule": "matrix_product_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "若 Sᵀ 是 S 的反矩陣，SSᵀ 必須是單位矩陣 I。依矩陣乘法定義：(SSᵀ)(1,1)=1·1+2·2=5，(SSᵀ)(1,2)=1·3+2·4=11，(SSᵀ)(2,1)=3·1+4·2=11，(SSᵀ)(2,2)=3·3+4·4=25。左上角 5≠1，所以 SSᵀ≠I，Sᵀ 不是 S 的反矩陣。轉置只搬動元素，對每個矩陣都有定義；反矩陣是另一個概念。",
          "en": "If Sᵀ were the inverse of S, SSᵀ would have to be the identity matrix I. By the definition of the matrix product: (SSᵀ)(1,1)=1·1+2·2=5, (SSᵀ)(1,2)=1·3+2·4=11, (SSᵀ)(2,1)=3·1+4·2=11, (SSᵀ)(2,2)=3·3+4·4=25. The top-left entry 5≠1, so SSᵀ≠I and Sᵀ is not the inverse of S. The transpose only moves entries and is defined for every matrix; the inverse is a different notion."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "matrix_product_def",
            "matrix_eq",
            "numeric_evaluation"
          ],
          "explanation": {
            "zh-Hant": "一個不相等的元素就足以推出 SSᵀ≠I；本稿不宣稱任何一般的可逆性判準。",
            "en": "One unequal entry suffices for SSᵀ≠I; no general invertibility criterion is claimed here."
          }
        },
        "leaf_basis": "matrix_product_def + matrix_eq + numeric_evaluation"
      },
      {
        "id": "S15",
        "uses": [
          "G3",
          "S03",
          "function_def"
        ],
        "before_tex": "a[i][j],\\ 0\\le i\\le 1,\\ 0\\le j\\le 2",
        "after_tex": "a[i][j]=M(i+1,\\,j+1);\\ a[1][2]=M(2,3)=7",
        "relation": "implies",
        "rule": "function_def",
        "conditions": [],
        "explanation": {
          "zh-Hant": "零起算陣列逐行儲存 M，所以陣列位置 (i,j) 對應外部索引 (i+1, j+1)；這是兩個索引範圍之間的雙射。a[1][2] 因此是 M(2,3)=7，而不是 M(1,2)=−1。外部敘述一律用一起算索引（MKO 假設 a1），程式內部的零起算索引必須先加一再對應。",
          "en": "The zero-based array stores M row by row, so array position (i,j) corresponds to the external index (i+1, j+1); this is a bijection between the two index ranges. Hence a[1][2] is M(2,3)=7, not M(1,2)=−1. External statements always use one-based indices (MKO assumption a1), and zero-based program indices must have one added before they are matched."
        },
        "reverse_audit": {
          "kind": "premise_audit",
          "required_ids": [
            "G3",
            "S03",
            "function_def"
          ],
          "explanation": {
            "zh-Hant": "對應關係依賴 G3 所說的「逐行儲存、零起算」；若程式改為逐列儲存，對應也會改變。",
            "en": "The correspondence depends on G3's 'row by row, zero-based' storage; if the program stored column by column, the correspondence would change."
          }
        },
        "leaf_basis": "function_def + numeric_evaluation"
      },
      {
        "id": "S16",
        "uses": [
          "S02",
          "S03",
          "S04",
          "S06",
          "S07",
          "S09",
          "S10",
          "S11",
          "S12",
          "S13",
          "S14",
          "S15"
        ],
        "before_tex": "\\text{tasks of the goal}",
        "after_tex": "M,N\\in\\mathbb{R}^{2\\times 3},\\ M^{\\mathsf T}\\in\\mathbb{R}^{3\\times 2},\\ (M+N)^{\\mathsf T}=M^{\\mathsf T}+N^{\\mathsf T}",
        "relation": "implies",
        "rule": "and_intro_elim",
        "conditions": [],
        "explanation": {
          "zh-Hant": "合併各步：尺寸 2×3，M(1,2)=−1、M(2,3)=7，M(3,1) 不存在；M+N、Mᵀ、Nᵀ 如上；(A+B)ᵀ=Aᵀ+Bᵀ 與 (Aᵀ)ᵀ=A 對所有同尺寸實矩陣已證並在本例核對；M+Mᵀ 無定義；轉置不是倒序也不是反矩陣；a[1][2]=M(2,3)。",
          "en": "Combine the steps: dimensions 2×3; M(1,2)=−1 and M(2,3)=7, while M(3,1) does not exist; M+N, Mᵀ and Nᵀ as above; (A+B)ᵀ=Aᵀ+Bᵀ and (Aᵀ)ᵀ=A are proved for all real matrices of equal size and checked on the example; M+Mᵀ is undefined; the transpose is neither row reversal nor the inverse; a[1][2]=M(2,3)."
        },
        "reverse_audit": {
          "kind": "sufficient_goal_reduction",
          "required_ids": [
            "S02",
            "S03",
            "S04",
            "S06",
            "S07",
            "S09",
            "S11",
            "S12",
            "S13",
            "S14",
            "S15"
          ],
          "explanation": {
            "zh-Hant": "目標 G：題目要求的各項。足夠條件 H：S02 到 S15 的結論；H⇒G 只用合取。H 由 G1 到 G3 正向推出，沒有把 G 當作前提。",
            "en": "Goal G: the items asked for. Sufficient condition H: the conclusions of S02 to S15; H⇒G uses only conjunction. H is derived forwards from G1 to G3; G is never used as a premise."
          }
        },
        "leaf_basis": "and_intro_elim"
      }
    ],
    "result": {
      "zh-Hant": "M、N 都是 2×3；M(1,2)=−1、M(2,3)=7，M(3,1) 無定義。M+N 的兩行是 (3,3,−2)、(5,0,13)；Mᵀ 是 3×2，三行 (2,5)、(−1,3)、(0,7)。對所有同尺寸實矩陣，(A+B)ᵀ=Aᵀ+Bᵀ 且 (Aᵀ)ᵀ=A。M+Mᵀ 無定義；逐行倒序得到的仍是 2×3 矩陣，不是 Mᵀ；SSᵀ≠I，所以轉置不是反矩陣。零起算的 a[1][2] 是 M(2,3)。",
      "en": "M and N are 2×3; M(1,2)=−1 and M(2,3)=7, while M(3,1) is undefined. M+N has rows (3,3,−2) and (5,0,13); Mᵀ is 3×2 with rows (2,5), (−1,3), (0,7). For all real matrices of equal size, (A+B)ᵀ=Aᵀ+Bᵀ and (Aᵀ)ᵀ=A. M+Mᵀ is undefined; reversing the rows still gives a 2×3 matrix, not Mᵀ; SSᵀ≠I, so the transpose is not the inverse. The zero-based a[1][2] is M(2,3)."
    },
    "negative_controls": [
      {
        "claim": {
          "zh-Hant": "M(2,1)=−1",
          "en": "M(2,1)=−1"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "M(2,1) 是第 2 行第 1 列，等於 5；−1 是 M(1,2)。",
          "en": "M(2,1) is row 2, column 1, which is 5; −1 is M(1,2)."
        }
      },
      {
        "claim": {
          "zh-Hant": "M+Mᵀ 可以逐項相加，得到一個 2×3 矩陣",
          "en": "M+Mᵀ can be added entrywise to give a 2×3 matrix"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "M 是 2×3、Mᵀ 是 3×2，尺寸不同，加法無定義。",
          "en": "M is 2×3 and Mᵀ is 3×2; the dimensions differ, so the sum is undefined."
        }
      },
      {
        "claim": {
          "zh-Hant": "Mᵀ 就是把 M 的行倒序：[[5,3,7],[2,−1,0]]",
          "en": "Mᵀ is M with its rows reversed: [[5,3,7],[2,−1,0]]"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "倒序後仍是 2×3，而 Mᵀ 是 3×2。",
          "en": "The reversed matrix is still 2×3, whereas Mᵀ is 3×2."
        }
      },
      {
        "claim": {
          "zh-Hant": "對 S=[[1,2],[3,4]]，Sᵀ 是 S 的反矩陣",
          "en": "For S=[[1,2],[3,4]], Sᵀ is the inverse of S"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "SSᵀ=[[5,11],[11,25]]≠I。",
          "en": "SSᵀ=[[5,11],[11,25]]≠I."
        }
      },
      {
        "claim": {
          "zh-Hant": "M(3,1)=0，因為不存在的元素視為零",
          "en": "M(3,1)=0, because missing entries count as zero"
        },
        "expected": "reject",
        "reason": {
          "zh-Hant": "M 只有 2 行，索引 (3,1) 不合法，M(3,1) 沒有定義。",
          "en": "M has only 2 rows; the index (3,1) is not legal and M(3,1) is undefined."
        }
      }
    ],
    "status": "candidate",
    "gaps": [],
    "verification": {
      "structure": "checked_local_script",
      "mathematics": "candidate_argument",
      "formalization": "not_formalized"
    },
    "rule_glossary": [
      {
        "id": "numeric_evaluation",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "明確整數或有理數算式的精確求值；可以獨立重算。",
          "en": "Exact evaluation of an explicit integer or rational expression; independently recomputable."
        }
      },
      {
        "id": "function_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "函數：f:A→B 對每個 a∈A 指定恰好一個 f(a)∈B。兩函數相等 ⇔ 定義域、對應域相同且對每個 a 都有相同值。",
          "en": "Function: f:A→B assigns to each a∈A exactly one f(a)∈B. Two functions are equal ⇔ they have the same domain and codomain and agree at every a."
        }
      },
      {
        "id": "add_comm",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "加法交換律：u+v=v+u。",
          "en": "Commutativity of addition: u+v=v+u."
        }
      },
      {
        "id": "forall_intro",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "∀引入（全稱推廣）：若某命題對一個「任意的」元素 x 證成，而證明沒有對 x 加任何額外假設，則它對論域中所有 x 成立。",
          "en": "∀-introduction (generalization): if a statement is proved for an arbitrary element x, with no extra assumption on x, it holds for every x in the domain."
        }
      },
      {
        "id": "def_unfold",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "展開定義：把一個已定義的詞換成它的定義內容（或反向收回），命題的真假不變。",
          "en": "Unfolding a definition: replacing a defined term by its definition (or folding it back) does not change whether a statement is true."
        }
      },
      {
        "id": "order_basics",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "實數的序：任兩數恰有 u<v、u=v、u>v 之一；u<v 且 v<w 推出 u<w；u<v 推出 u+w<v+w；u<v 且 w>0 推出 uw<vw；u<v 且 w<0 推出 uw>vw。",
          "en": "Order of the reals: exactly one of u<v, u=v, u>v holds; u<v and v<w give u<w; u<v gives u+w<v+w; u<v and w>0 give uw<vw; u<v and w<0 give uw>vw."
        }
      },
      {
        "id": "eq_refl_symm_trans",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "等號的性質：u=u；若 u=v 則 v=u；若 u=v 且 v=w 則 u=w。",
          "en": "Properties of equality: u=u; if u=v then v=u; if u=v and v=w then u=w."
        }
      },
      {
        "id": "matrix_product_def",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "矩陣乘法：若 A 為 m×n、B 為 n×p，則 (AB)_{ij}=Σ_{k=1}^{n} A_{ik}B_{kj}。矩陣乘法一般不可交換。",
          "en": "Matrix product: for A of size m×n and B of size n×p, (AB)_{ij}=Σ_{k=1}^{n} A_{ik}B_{kj}. Matrix multiplication is in general not commutative."
        }
      },
      {
        "id": "and_intro_elim",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "合取：由 P 與 Q 得 P∧Q；由 P∧Q 可分別得 P 與 Q。",
          "en": "Conjunction: from P and Q infer P∧Q; from P∧Q infer P and infer Q."
        }
      },
      {
        "id": "mko_matrix_def",
        "kind": "cited",
        "source": {
          "mko_id": "mko-matrix",
          "sha256": "c0233ecc6ee07427af1589feb16108500eb2e48b0b2fb84b5b39f0f38b02f109",
          "commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f"
        },
        "statement": {
          "zh-Hant": "m×n 實矩陣 M 是以行 i 與列 j 指定的實數表，m、n 為正整數。本輪外部索引從1開始，M(i,j) 是第i行第j列元素。同尺寸矩陣逐項相加；轉置 Mᵀ 的尺寸是 n×m，並把 M(i,j) 放到 Mᵀ(j,i)。",
          "en": "An m×n real matrix M is a table of real entries indexed by row i and column j, with positive integers m,n. External indices in this pulse start at one: M(i,j) is the entry in row i and column j. Matrices of the same dimensions add entrywise. The transpose Mᵀ has dimensions n×m and places M(i,j) at Mᵀ(j,i)."
        }
      },
      {
        "id": "matrix_eq",
        "kind": "prerequisite",
        "statement": {
          "zh-Hant": "兩矩陣相等 ⇔ 尺寸相同，且在每個合法索引 (i,j) 上元素相等。",
          "en": "Two matrices are equal ⇔ they have the same dimensions and equal entries at every legal index (i,j)."
        }
      },
      {
        "id": "L_transpose_sum",
        "kind": "lemma",
        "proved_in": [
          "S09.1",
          "S09.2"
        ],
        "statement": {
          "zh-Hant": "對任意 m×n 實矩陣 A、B：(A+B)ᵀ=Aᵀ+Bᵀ。",
          "en": "For all m×n real matrices A and B: (A+B)ᵀ=Aᵀ+Bᵀ."
        }
      },
      {
        "id": "L_double_transpose",
        "kind": "lemma",
        "proved_in": [
          "S11.1"
        ],
        "statement": {
          "zh-Hant": "對任意 m×n 實矩陣 A：(Aᵀ)ᵀ=A。",
          "en": "For every m×n real matrix A: (Aᵀ)ᵀ=A."
        }
      }
    ],
    "revision_log": [],
    "numeric_checks": [
      {
        "id": "N1",
        "step": "S06",
        "lhs": "2+1",
        "rhs": "3"
      },
      {
        "id": "N2",
        "step": "S06",
        "lhs": "-1+4",
        "rhs": "3"
      },
      {
        "id": "N3",
        "step": "S06",
        "lhs": "0+(-2)",
        "rhs": "-2"
      },
      {
        "id": "N4",
        "step": "S06",
        "lhs": "5+0",
        "rhs": "5"
      },
      {
        "id": "N5",
        "step": "S06",
        "lhs": "3+(-3)",
        "rhs": "0"
      },
      {
        "id": "N6",
        "step": "S06",
        "lhs": "7+6",
        "rhs": "13"
      },
      {
        "id": "N7",
        "step": "S02",
        "lhs": "2*3",
        "rhs": "6"
      },
      {
        "id": "N8",
        "step": "S14",
        "lhs": "1*1+2*2",
        "rhs": "5"
      },
      {
        "id": "N9",
        "step": "S14",
        "lhs": "1*3+2*4",
        "rhs": "11"
      },
      {
        "id": "N10",
        "step": "S14",
        "lhs": "3*1+4*2",
        "rhs": "11"
      },
      {
        "id": "N11",
        "step": "S14",
        "lhs": "3*3+4*4",
        "rhs": "25"
      },
      {
        "id": "N12",
        "step": "S14",
        "lhs": "5",
        "relation": "!=",
        "rhs": "1"
      },
      {
        "id": "N13",
        "step": "S15",
        "lhs": "1+1",
        "rhs": "2"
      },
      {
        "id": "N14",
        "step": "S15",
        "lhs": "2+1",
        "rhs": "3"
      },
      {
        "id": "N15",
        "step": "S12",
        "lhs": "2",
        "relation": "!=",
        "rhs": "3"
      }
    ]
  },
  "presentation": {
    "md_scope": {
      "zh-Hant": "只在 MKO 的範圍內：實矩陣、正的行數與列數（1 到 5）、外部索引從 1 開始、同尺寸逐項加法與轉置。完整證明轉置與加法相容及二次轉置還原；矩陣乘法只在一個反例中用來說明轉置不是反矩陣。不處理零維矩陣、行列式、一般可逆性，也不做 Lean 的 Fin 索引橋接；不改動 canonical MKO 或英文 edition。",
      "en": "Stays inside the MKO's scope: real matrices with positive numbers of rows and columns (1 to 5), one-based external indices, entrywise addition of equal-size matrices, and transpose. It fully proves that transpose is compatible with addition and that transposing twice restores the matrix; the matrix product appears only in one counterexample showing that the transpose is not the inverse. It does not treat zero-dimensional matrices, determinants or invertibility in general, and does not build the Lean Fin-index bridge; it does not change the canonical MKO or its English edition."
    },
    "md_symbols": [
      [
        "M(i,j)",
        "第 i 行（row）第 j 列（column）的元素；MKO 用語中「行」指 row、「列」指 column",
        "the entry in row i and column j; in the MKO's wording 行 means row and 列 means column"
      ],
      [
        "m\\times n",
        "m 行 n 列的尺寸",
        "the dimensions: m rows and n columns"
      ],
      [
        "M^{\\mathsf T}",
        "M 的轉置",
        "the transpose of M"
      ],
      [
        "a[i][j]",
        "程式中零起算的陣列索引",
        "a zero-based program array index"
      ],
      [
        "A,B",
        "任意同尺寸實矩陣",
        "arbitrary real matrices of equal size"
      ]
    ],
    "md_error_controls": [
      {
        "title": "先行後列，不可顛倒 / Row first, then column",
        "zh": "MKO 的誤解之一是行列顛倒。M(1,2)=−1，但 M(2,1)=5（S03）。尺寸也一樣：2×3 是 2 行 3 列，與 3×2 不同。",
        "en": "One misconception the MKO names is swapping rows and columns. M(1,2)=−1 but M(2,1)=5 (S03). The same holds for dimensions: 2×3 means 2 rows and 3 columns, which differs from 3×2."
      },
      {
        "title": "一起算與零起算不可混用 / Do not mix one-based and zero-based indices",
        "zh": "程式陣列 a[1][2] 是第 2 行第 3 列，對應 M(2,3)=7；若直接當成 M(1,2) 會讀到 −1（S15）。外部敘述一律一起算，換到程式時每個索引減一。",
        "en": "The program entry a[1][2] is row 2, column 3, which corresponds to M(2,3)=7; reading it as M(1,2) would give −1 (S15). External statements are one-based throughout, and each index is reduced by one when moving into the program."
      },
      {
        "title": "轉置不是倒序，也不是反矩陣 / The transpose is neither reversal nor the inverse",
        "zh": "逐行倒序的 R 仍是 2×3，不可能等於 3×2 的 Mᵀ（S13）。對方陣 S，SSᵀ 的左上角是 5≠1，所以 Sᵀ 不是 S 的反矩陣（S14）。",
        "en": "Reversing the rows gives R, still 2×3, which cannot equal the 3×2 matrix Mᵀ (S13). For the square matrix S, the top-left entry of SSᵀ is 5≠1, so Sᵀ is not the inverse of S (S14)."
      }
    ],
    "md_open_items": [
      {
        "zh-Hant": "S14 只用一個反例說明轉置不是反矩陣，不建立任何可逆性判準；可逆性屬於行列式條目。",
        "en": "S14 uses a single counterexample to show the transpose is not the inverse and establishes no invertibility criterion; invertibility belongs to the determinant entry."
      },
      {
        "zh-Hant": "零維矩陣不在本輪論域；MKO 的 formal next（Matrix、Fin 索引與 transpose 的橋接）未做。",
        "en": "Zero-dimensional matrices are outside this pulse; the MKO's formal next step (bridging Matrix, Fin indices and transpose) is not done."
      }
    ]
  },
  "revision": {
    "id": "production-20261019-adopted-96",
    "source_commit": "b28a5edbd46279b1db2a3f3f48bb3f447e18899f",
    "adopted_source_sha256": "11d27b132fd8b4c156a7d9df045c5b76fa1ae688439164a3b668eba604457062",
    "original_source_sha256": "ab1824ca602b6e508a8860bde242742b7d3d7b9592baf70d2bfaeb895c821baf",
    "owner_adopted": true,
    "bilingual_sync": "complete_source_bound",
    "formal_Lean": "NOT_RUN",
    "independent_AI_concurrence": "NOT_MEASURED",
    "issue_ids": [
      "BR-M017",
      "BR-M018",
      "BR-M019"
    ],
    "scope": "Owner-adopted natural-language teaching guide; not a formal proof, canonical MKO rewrite or evidence-status promotion."
  }
}
