S001 · implies
操作前
a=2, modulus=33
操作後
n=33≥2; seek u with 2u≡1 (mod 33)
條件:無
先固定模數與逆元條件,目標不是整數乘積恰等於 1。
步驟識別與依賴
規則:inverse_definition · 依賴:G001
P250-0057 · q-20261014-advance-20261103-r07-modular-inverse-0057
整數a與模數n大於等於2的exact Euclidean arithmetic。操作=modinv-normalized-inverse;資料={"a":2,"n":33}。請依 [a,n,inverse,product_mod_n,valid,uniqueness] 欄序回答。
G001 — 整數a與模數n大於等於2的exact Euclidean arithmetic。操作=modinv-normalized-inverse;資料={"a":2,"n":33}。請依 [a,n,inverse,product_mod_n,valid,uniqueness] 欄序回答。整數模數 n≥2 且 gcd(a,n)=1;唯一性指模類及指定區間的代表元。
操作前
a=2, modulus=33
操作後
n=33≥2; seek u with 2u≡1 (mod 33)
條件:無
先固定模數與逆元條件,目標不是整數乘積恰等於 1。
規則:inverse_definition · 依賴:G001
操作前
divide 2 by 33
操作後
2=0·33+2
條件:0≤2<33
商為 0、餘數為 2;每次用前一除數與餘數繼續。
規則:euclidean_division · 依賴:G001, S001
操作前
divide 33 by 2
操作後
33=16·2+1
條件:0≤1<2
商為 16、餘數為 1;每次用前一除數與餘數繼續。
規則:euclidean_division · 依賴:G001, S002
操作前
divide 2 by 1
操作後
2=2·1+0
條件:0≤0<1
商為 2、餘數為 0;每次用前一除數與餘數繼續。
規則:euclidean_division · 依賴:G001, S003
操作前
last nonzero Euclidean remainder
操作後
gcd(2,33)=1; 2·(-16)+33·(1)=1
條件:無
沿除法鏈保留整數線性組合,得到實際的 Bézout 等式。
規則:bezout_identity · 依賴:G001, S004
操作前
2·(-16)+33·(1)=1
操作後
-16 mod 33=17; 0≤17<33
條件:無
Bézout 的 a 係數已代表逆元類,再取指定區間內的代表元。
規則:normalize_residue · 依賴:G001, S005
操作前
a·u := mul(2, 17)
操作後
a·u = 34
條件:無
將原 a 與正規化逆元相乘。
規則:exact_rational_arithmetic · 依賴:G001, S006
操作前
a·u=34
操作後
34=1·33+1 ⇒ a·u mod n=1
條件:無
乘積與 1 的差是模數的整數倍,故逆元條件成立。
規則:congruence_check · 依賴:G001, S007
操作前
a·v≡a·u≡1 (mod n), gcd(a,n)=1
操作後
n divides v−u; if 0≤u,v<n then u=v
條件:無
由 n|a(v−u),再把 Bézout 等式乘以 v−u,可知 n|(v−u)。正規化後差的絕對值小於 n,只能為零。
規則:inverse_uniqueness · 依賴:G001, S008
S009 · premise_and_result_audit — 唯一的是模類及指定區間的代表;u+kn 仍是其他整數代表。S008 · premise_and_result_audit — 商數為整數,且餘數確實為 1。S007 · premise_and_result_audit — 以精確有理數重算 a·u,不以小數近似替代。S006 · premise_and_result_audit — 只正規化逆元代表,不要求 Bézout 的兩個係數都在該區間。S005 · premise_and_result_audit — 直接乘開等式兩邊核對,不只相信 gcd 標記。S004 · premise_and_result_audit — 除法等式與 0≤餘數<除數都須成立。S003 · premise_and_result_audit — 除法等式與 0≤餘數<除數都須成立。S002 · premise_and_result_audit — 除法等式與 0≤餘數<除數都須成立。S001 · premise_and_result_audit — 必須先確認 gcd(a,n)=1,才有此模反元素。(2, 33, 17, 1, 是, unique_modulo_n)
逆元代表是 17,唯一性以模 33 解讀。
覆核日期:2026-10-24
原題、答案、步驟表達式、數值 AST 與既有歷史保持原樣;原來的候選狀態屬於來源歷史,不覆寫為形式化證明。
input commit: 0f7be61e2c22317a4075561dc822c87d881a50dboriginal question SHA-256: 9b7acc658dc30b156470d249bef515304387def460e3caab327457e807720d52candidate record SHA-256: fe91666b0db0b5168b430c01deaad24d5b7cb90e026e624b5268ac7d4a59e788semantic review receipt SHA-256: 4727d1bd957a9b7f6cadb7972ddb5ab80a31f5259dc5394c1dff2b71944ed36bquestion-first witness SHA-256: 51e18649133238ac992229f6e16542a5f3af53ca73b2262ab0524508ea937deeLean: NOT_RUN · human review: NOT_PERFORMED