# Question 377: A Nonunit Has No Modular Inverse

[Return to catalogue page 2](https://ocme.evemisslab.com/en/questions/page/2/)

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261014-advance-20261103-r07-modular-inverse-foundations/#q-20261014-advance-20261103-r07-modular-inverse-0077)

This teaching derivation has second-context AI mathematical and bilingual semantic review, limited to the model and assumptions stated in this question. It has no human review or new Lean proof and does not promote the original question or MKO to Canonical truth.

P1000-0377 · q-20261014-advance-20261103-r07-modular-inverse-0077



## Original question and givens

Use the original signed integer a=3 and modulus n=6≥2. Exact extended Euclid gives nonnegative g=gcd(a,n) and signed coefficients x,y satisfying a*x+n*y=g. An inverse exists exactly when g=1; normalize its representative to 0≤inverse<n. Uniqueness means one residue class modulo n, not a unique integer representative. This family excludes moduli 0 and 1 and does not use approximate division. Require gcd(a,n)>1. Give (a,n,gcd,inverse,exists?,nonunit_has_no_modular_inverse), with inverse=null.


- G001 — Use the original signed integer a=3 and modulus n=6≥2. Exact extended Euclid gives nonnegative g=gcd(a,n) and signed coefficients x,y satisfying a*x+n*y=g. An inverse exists exactly when g=1; normalize its representative to 0≤inverse<n. Uniqueness means one residue class modulo n, not a unique integer representative. This family excludes moduli 0 and 1 and does not use approximate division. Require gcd(a,n)>1. Give (a,n,gcd,inverse,exists?,nonunit_has_no_modular_inverse), with inverse=null.





## Definition and scope

When gcd(a,n)>1 the common divisor divides au+nv, so it cannot equal 1 and no inverse exists; null means absent.


- [mko-modular-inverse](https://ocme.evemisslab.com/en/mko/mko-modular-inverse/)





## Step-by-step derivation

S001 · impliesBefore

a=3; n=6≥2

After

compute gcd and a Bezout certificate before inversion

Conditions: none

Invertibility requires coprimality, after qualifying the modulus.

Step identifiers and dependenciesRule: modular_domain · Uses: G001





S002 · impliesBefore

divide 3 by 6

After

3=0·6+3

Conditions: none

Continue with divisor and remainder; nonzero remainders decrease strictly.

Step identifiers and dependenciesRule: euclidean_division · Uses: G001, S001





S003 · impliesBefore

divide 6 by 3

After

6=2·3+0

Conditions: none

Continue with divisor and remainder; nonzero remainders decrease strictly.

Step identifiers and dependenciesRule: euclidean_division · Uses: G001, S002





S004 · calculationBefore

a·x := mul(3, 1)

After

a·x = 3

Conditions: none

Multiply by the original signed a.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S003





S005 · calculationBefore

n·y := mul(6, 0)

After

n·y = 0

Conditions: none

Retain the modulus coefficient as well.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S004





S006 · calculationBefore

Bezout value := sum(3, 0)

After

Bezout value = 3

Conditions: none

The two terms must sum to the final nonzero remainder, the gcd.

Step identifiers and dependenciesRule: exact_rational_arithmetic · Uses: G001, S005





S007 · impliesBefore

gcd(3,6)=3>1

After

no u can satisfy a·u≡1 (mod n)

Conditions: none

An inverse would give au+nv=1, impossible because the common divisor g divides the left side but not1.

Step identifiers and dependenciesRule: nonunit_obstruction · Uses: G001, S006





S008 · impliesBefore

inverse does not exist

After

inverse field=null; exists=false

Conditions: none

null denotes an absent inverse, not a fabricated inverse representative0.

Step identifiers and dependenciesRule: undefined_inverse · Uses: G001, S007









## Reverse checks


- S008 · premise_and_result_audit — Check integer identities, remainder bounds and gcd conditions; congruence is not integer equality.
- S007 · premise_and_result_audit — Check integer identities, remainder bounds and gcd conditions; congruence is not integer equality.
- S006 · premise_and_result_audit — Recompute Bezout value with exact rational arithmetic, not rounded decimals.
- S005 · premise_and_result_audit — Recompute n·y with exact rational arithmetic, not rounded decimals.
- S004 · premise_and_result_audit — Recompute a·x with exact rational arithmetic, not rounded decimals.
- S003 · premise_and_result_audit — Check integer identities, remainder bounds and gcd conditions; congruence is not integer equality.
- S002 · premise_and_result_audit — Check integer identities, remainder bounds and gcd conditions; congruence is not integer equality.
- S001 · premise_and_result_audit — Check integer identities, remainder bounds and gcd conditions; congruence is not integer equality.





## Result

(3, 6, 3, null, No, nonunit_has_no_modular_inverse)

The full substitutions and premise audits recover the original answer, retaining its field order and verdict meanings.





## This question review and source binding

Review date: 2026-10-26

Original questions, answers, step expressions, numeric ASTs and historical records are retained. Source candidate labels remain historical and are not overwritten as formal proof.

Source hashes and review receipts
- input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
- original question SHA-256: e6de0750407f86691c223f13158ff35ba06b14b70afd2e2707f68e3dd0b487c6
- candidate record SHA-256: 98028e96bd20087c8dbd18f1cad80e78d5dfac05bdf52bfc20aa6224613c7487
- semantic review receipt SHA-256: 6c2c6d46aded7582a11ac41a8c0b3bdde2669a53bdb6e796eea2039994a02772
- question-first witness SHA-256: 77e43898df9efdbf8094ad81fe4ab91cf4b4bd82f481eb9b4699b73cb4da612b
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261014-advance-20261103-r07-modular-inverse-0077.json)




