S001 · implies
操作前
a=3; n=32≥2
操作後
compute gcd and a Bezout certificate before inversion
條件:無
逆元存在性需要互質;先保留模數條件。
步驟識別與依賴
規則:modular_domain · 依賴:G001
P1000-0331 · q-20261014-advance-20261103-r07-modular-inverse-0006
整數a與模數n大於等於2的exact Euclidean arithmetic。操作=modinv-existence;資料={"a":3,"n":32}。請依 [a,n,gcd,exists,inverse] 欄序回答。
G001 — 整數a與模數n大於等於2的exact Euclidean arithmetic。操作=modinv-existence;資料={"a":3,"n":32}。請依 [a,n,gcd,exists,inverse] 欄序回答。整數 a、模數 n≥2;逆元存在恰當 gcd(a,n)=1,代表元正規化到 [0,n)。
操作前
a=3; n=32≥2
操作後
compute gcd and a Bezout certificate before inversion
條件:無
逆元存在性需要互質;先保留模數條件。
規則:modular_domain · 依賴:G001
操作前
divide 3 by 32
操作後
3=0·32+3
條件:無
下一步改用除數與餘數,非零餘數嚴格下降。
規則:euclidean_division · 依賴:G001, S001
操作前
divide 32 by 3
操作後
32=10·3+2
條件:無
下一步改用除數與餘數,非零餘數嚴格下降。
規則:euclidean_division · 依賴:G001, S002
操作前
divide 3 by 2
操作後
3=1·2+1
條件:無
下一步改用除數與餘數,非零餘數嚴格下降。
規則:euclidean_division · 依賴:G001, S003
操作前
divide 2 by 1
操作後
2=2·1+0
條件:無
下一步改用除數與餘數,非零餘數嚴格下降。
規則:euclidean_division · 依賴:G001, S004
操作前
a·x := mul(3, 11)
操作後
a·x = 33
條件:無
乘回原本帶符號的 a。
規則:exact_rational_arithmetic · 依賴:G001, S005
操作前
n·y := mul(32, -1)
操作後
n·y = -32
條件:無
同時保留模數係數。
規則:exact_rational_arithmetic · 依賴:G001, S006
操作前
Bezout value := sum(33, -32)
操作後
Bezout value = 1
條件:無
兩項相加應等於最後非零餘數 gcd。
規則:exact_rational_arithmetic · 依賴:G001, S007
操作前
3·(11)+32·(-1)=1
操作後
inverse representative=11; 3·11≡1 (mod 32)
條件:無
模 n 下模數項消失,a 的係數就是逆元類,再正規化到[0,n)。
規則:reduce_bezout · 依賴:G001, S008
S009 · premise_and_result_audit — 核對整數等式、餘數範圍與 gcd 條件,不把同餘當整數相等。S008 · premise_and_result_audit — 以精確有理數重算 Bezout value,不以小數近似替代。S007 · premise_and_result_audit — 以精確有理數重算 n·y,不以小數近似替代。S006 · premise_and_result_audit — 以精確有理數重算 a·x,不以小數近似替代。S005 · premise_and_result_audit — 核對整數等式、餘數範圍與 gcd 條件,不把同餘當整數相等。S004 · premise_and_result_audit — 核對整數等式、餘數範圍與 gcd 條件,不把同餘當整數相等。S003 · premise_and_result_audit — 核對整數等式、餘數範圍與 gcd 條件,不把同餘當整數相等。S002 · premise_and_result_audit — 核對整數等式、餘數範圍與 gcd 條件,不把同餘當整數相等。S001 · premise_and_result_audit — 核對整數等式、餘數範圍與 gcd 條件,不把同餘當整數相等。(3, 32, 1, 是, 11)
上述完整代值與條件核對得到原題答案;欄位次序及真假標記保持原始合約。
覆核日期:2026-10-26
原題、答案、步驟表達式、數值 AST 與既有歷史保持原樣;原來的候選狀態屬於來源歷史,不覆寫為形式化證明。
input commit: 0f7be61e2c22317a4075561dc822c87d881a50dboriginal question SHA-256: 61afec91bbb8f32957d1e7ffb3552ec2aae58a64b3a2d551496c21461b92acb4candidate record SHA-256: 3e7251a95a16bd4a7c949eb10d9a94cdc62df8a9c38ae210f9f3df6ebe07ae80semantic review receipt SHA-256: 6c2c6d46aded7582a11ac41a8c0b3bdde2669a53bdb6e796eea2039994a02772question-first witness SHA-256: 77e43898df9efdbf8094ad81fe4ab91cf4b4bd82f481eb9b4699b73cb4da612bLean: NOT_RUN · human review: NOT_PERFORMED