# 第 27778 題：Wilson定理

[返回所在分頁 139](https://ocme.evemisslab.com/zh-Hant/questions/page/139/)

[← 逐題詳解目錄](https://ocme.evemisslab.com/zh-Hant/questions/) · [原題批次](https://ocme.evemisslab.com/zh-Hant/practice/batch-20261015-advance-20261118-r04-wilson-theorem-foundations/#q-20261015-advance-20261118-r04-wilson-theorem-0028)

本頁是已完成第二對話 AI 數理與中英語義覆核的教學詳解，只支持本題明示的模型與前提。沒有人工審查或新 Lean 證明，也不提升原題或 MKO 的 Canonical 真值狀態。

R0054-27778 · q-20261015-advance-20261118-r04-wilson-theorem-0028



## 原題與已知條件

n>1、factorial congruence與prime-residue inverse pairing責任。操作=wilson-prime-inverse-pairing；資料={"p":5}。請依 exact_ordered_tuple_declared_by_interface 欄序回答。


- G001 — n>1、factorial congruence與prime-residue inverse pairing責任。操作=wilson-prime-inverse-pairing；資料={"p":5}。請依 exact_ordered_tuple_declared_by_interface 欄序回答。





## 定義與適用範圍

沿用原題明示的論域、假設與來源 MKO 定義。本題已完成第二對話數理與中英語義覆核，並由原始參數逐題獨立重算模型、答案與每個算術步驟；原題仍為 candidate。


- [mko-wilson-theorem](https://ocme.evemisslab.com/zh-Hant/mko/mko-wilson-theorem/)





## 逐步推導

S001 · implies操作前

source roles = [wilson-prime-inverse-pairing]

操作後

derived = [[p, all_inverse_pairs, self_inverse_residues, distinct_cancelling_pairs, self_inverse_scope, factorial_residue, Wilson_congruence]]

條件：無

直接明列此操作與mode完整欄序，不依JavaScript、不由答案形狀猜角色；布林、字串、null與未作聲稱保持不同。

步驟識別與依賴規則：source_ordered_fields_without_JS · 依賴：G001





S002 · implies操作前

source roles = [5, 1]

操作後

derived = [1, 1]

條件：無

prime modulus的非零residue均為units，逐a找來源首inverse；若有兩個inverse，乘a的消去性使其相同。

步驟識別與依賴規則：Wilson_EVERY_nonzero_prime_residue_unique_inverse · 依賴：G001, S001





S003 · implies操作前

source roles = [5, 2]

操作後

derived = [3, 1]

條件：無

prime modulus的非零residue均為units，逐a找來源首inverse；若有兩個inverse，乘a的消去性使其相同。

步驟識別與依賴規則：Wilson_EVERY_nonzero_prime_residue_unique_inverse · 依賴：G001, S002





S004 · implies操作前

source roles = [5, 3]

操作後

derived = [2, 1]

條件：無

prime modulus的非零residue均為units，逐a找來源首inverse；若有兩個inverse，乘a的消去性使其相同。

步驟識別與依賴規則：Wilson_EVERY_nonzero_prime_residue_unique_inverse · 依賴：G001, S003





S005 · implies操作前

source roles = [5, 4]

操作後

derived = [4, 1]

條件：無

prime modulus的非零residue均為units，逐a找來源首inverse；若有兩個inverse，乘a的消去性使其相同。

步驟識別與依賴規則：Wilson_EVERY_nonzero_prime_residue_unique_inverse · 依賴：G001, S004





S006 · calculation操作前

Wilson ORIGINAL prime factorial ORIGINAL running factorial product1 := mul(1, 1)

操作後

Wilson ORIGINAL prime factorial ORIGINAL running factorial product1 = 1

條件：無

以原始角色與已證中間量精確代值，不用近似或自洽但換過的操作數；額外教學代數不另縮來源域。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S005





S007 · implies操作前

source roles = [Wilson ORIGINAL prime factorial, 5, 1, 1, 1]

操作後

derived = [0, 1, 是, 是]

條件：無

逐k保前residue與完整乘積，再以唯一Euclidean餘數縮回0..n-1；累積不變量是value≡k! mod n，不把table最後一項當未算的假設。

步驟識別與依賴規則：Wilson_EACH_running_factorial_exact_Euclidean_remainder · 依賴：G001, S006





S008 · calculation操作前

Wilson ORIGINAL prime factorial ORIGINAL running factorial product2 := mul(1, 2)

操作後

Wilson ORIGINAL prime factorial ORIGINAL running factorial product2 = 2

條件：無

以原始角色與已證中間量精確代值，不用近似或自洽但換過的操作數；額外教學代數不另縮來源域。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S007





S009 · implies操作前

source roles = [Wilson ORIGINAL prime factorial, 5, 2, 1, 2]

操作後

derived = [0, 2, 是, 是]

條件：無

逐k保前residue與完整乘積，再以唯一Euclidean餘數縮回0..n-1；累積不變量是value≡k! mod n，不把table最後一項當未算的假設。

步驟識別與依賴規則：Wilson_EACH_running_factorial_exact_Euclidean_remainder · 依賴：G001, S008





S010 · calculation操作前

Wilson ORIGINAL prime factorial ORIGINAL running factorial product3 := mul(2, 3)

操作後

Wilson ORIGINAL prime factorial ORIGINAL running factorial product3 = 6

條件：無

以原始角色與已證中間量精確代值，不用近似或自洽但換過的操作數；額外教學代數不另縮來源域。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S009





S011 · implies操作前

source roles = [Wilson ORIGINAL prime factorial, 5, 3, 2, 6]

操作後

derived = [1, 1, 是, 是]

條件：無

逐k保前residue與完整乘積，再以唯一Euclidean餘數縮回0..n-1；累積不變量是value≡k! mod n，不把table最後一項當未算的假設。

步驟識別與依賴規則：Wilson_EACH_running_factorial_exact_Euclidean_remainder · 依賴：G001, S010





S012 · calculation操作前

Wilson ORIGINAL prime factorial ORIGINAL running factorial product4 := mul(1, 4)

操作後

Wilson ORIGINAL prime factorial ORIGINAL running factorial product4 = 4

條件：無

以原始角色與已證中間量精確代值，不用近似或自洽但換過的操作數；額外教學代數不另縮來源域。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S011





S013 · implies操作前

source roles = [Wilson ORIGINAL prime factorial, 5, 4, 1, 4]

操作後

derived = [0, 4, 是, 是]

條件：無

逐k保前residue與完整乘積，再以唯一Euclidean餘數縮回0..n-1；累積不變量是value≡k! mod n，不把table最後一項當未算的假設。

步驟識別與依賴規則：Wilson_EACH_running_factorial_exact_Euclidean_remainder · 依賴：G001, S012





S014 · implies操作前

source roles = [5, [[1, 1], [2, 3], [3, 2], [4, 4]]]

操作後

derived = [[1, 4], [[2, 3, 1]], 4, 是]

條件：無

非self-inverse成對相乘1；self-inverse解(r-1)(r+1)=0 mod prime，故只±1。p>2相異乘積-1；p2僅1=-1一個。這是一般教學理由，有限表／本程式不冒稱Lean proof。

步驟識別與依賴規則：Wilson_GENERAL_inverse_pairing_and_p2_exception · 依賴：G001, S013









## 逐步反向核對


- S014 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S013 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S012 · premise_and_result_audit — 以精確有理數重算 Wilson ORIGINAL prime factorial ORIGINAL running factorial product4，不以小數近似替代。
- S011 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S010 · premise_and_result_audit — 以精確有理數重算 Wilson ORIGINAL prime factorial ORIGINAL running factorial product3，不以小數近似替代。
- S009 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S008 · premise_and_result_audit — 以精確有理數重算 Wilson ORIGINAL prime factorial ORIGINAL running factorial product2，不以小數近似替代。
- S007 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S006 · premise_and_result_audit — 以精確有理數重算 Wilson ORIGINAL prime factorial ORIGINAL running factorial product1，不以小數近似替代。
- S005 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S004 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S003 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S002 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。
- S001 · premise_and_result_audit — 回查原始資料、操作數、完整範圍與本步前提；有限見證、條件式定理引用與形式證明分開。





## 結論

(5, [[1, 1], [2, 3], [3, 2], [4, 4]], [1, 4], [[2, 3, 1]], self_inverse_residues_1_and_p_minus_1, 4, 是)

依上列完整代值及條件核對得到原題答案；原題編號、格式與狀態保持不變。





## 本題覆核與來源綁定

覆核日期：2026-10-26

原題、答案、步驟表達式、數值 AST 與既有歷史保持原樣；原來的候選狀態屬於來源歷史，不覆寫為形式化證明。

來源雜湊與覆核憑證
- input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
- original question SHA-256: ad79b0e14b94312f9fae96c93c1928d386965b83dd9c1fc10158457120c5bc79
- candidate record SHA-256: b375b4bce2ec47517e76277acbd47f43d89a865d7543092bc498010c6b800a99
- semantic review receipt SHA-256: 0a76d8e93c08bb16998a0483f3dfc0504f269fc3e1982e6cd868cab0a2856d54
- question-first witness SHA-256: 09127b736c225714dfa0b7ceb0e6a6e66df27438b480cad8217d3c2f99ce9437
- Lean: NOT_RUN · human review: NOT_PERFORMED

[同源完整 JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261015-advance-20261118-r04-wilson-theorem-0028.json)




