# Question 31770: Natural GCD and Coprimality Including Zero

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

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261013-advance-20261018-r03-gcd-coprime-foundations/#q-20261013-advance-20261018-r03-gcd-coprime-0070)

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.

R0062-31770 · q-20261013-advance-20261018-r03-gcd-coprime-0070



## Original question and givens

a=19, b=39 are natural numbers, including 0; gcd(0,0)=0. Give (a, b, gcd, gcd=1?). Coprime does not mean that both inputs are prime.


- G001 — a=19, b=39 are natural numbers, including 0; gcd(0,0)=0. Give (a, b, gcd, gcd=1?). Coprime does not mean that both inputs are prime.





## Definition and scope

Use the original question domain, assumptions and cited MKO definitions. This item has second-context mathematical and bilingual review, with the model, answer and every arithmetic step independently recomputed from the original parameters; the source question remains a candidate.


- [mko-gcd-coprime](https://ocme.evemisslab.com/en/mko/mko-gcd-coprime/)





## Step-by-step derivation

S001 · impliesBefore

source roles = [qf-ext18-gcd-coprime-classification, Nat_gcd, gcd-coprime-classification, no-form-field]

After

derived = [[a, b, gcd, gcd_equals1]]

Conditions: none

Check THIS bank interface:BASE equations use form/domain;BASE events/complement have no operation;factorials have no domain.ext18 uses local hyphens,other legacy operations underscores.Do not force every answer into a tuple or fraction.

Step identifiers and dependenciesRule: R62_EXACT_source_keys_domain_operation_form_AND_output_types · Uses: G001





S002 · calculationBefore

GCD Euclid row0 ORIGINAL quotient times y := mul(0, 39)

After

GCD Euclid row0 ORIGINAL quotient times y = 0

Conditions: none

Use ORIGINAL operands and declared order for exact integer/rational arithmetic,not floats.Bounds are family-specific:do not revalidate derived values as RAW inputs or add blanket SAFE/n64 caps to BASE families.

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





S003 · calculationBefore

GCD Euclid row0 ORIGINAL x minus qy := sub(19, 0)

After

GCD Euclid row0 ORIGINAL x minus qy = 19

Conditions: none

Use ORIGINAL operands and declared order for exact integer/rational arithmetic,not floats.Bounds are family-specific:do not revalidate derived values as RAW inputs or add blanket SAFE/n64 caps to BASE families.

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





S004 · impliesBefore

source roles = [19, 39, 0]

After

derived = [0, 19, [19, 39, 19]]

Conditions: none

With y≠0,divide to get x=qy+r and0≤r<y.A divisor common to x,y divides y,r,and the converse follows from x=qy+r,so common divisors are unchanged.Positive remainders strictly decrease,ensuring termination.

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





S005 · calculationBefore

GCD Euclid row1 ORIGINAL quotient times y := mul(2, 19)

After

GCD Euclid row1 ORIGINAL quotient times y = 38

Conditions: none

Use ORIGINAL operands and declared order for exact integer/rational arithmetic,not floats.Bounds are family-specific:do not revalidate derived values as RAW inputs or add blanket SAFE/n64 caps to BASE families.

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





S006 · calculationBefore

GCD Euclid row1 ORIGINAL x minus qy := sub(39, 38)

After

GCD Euclid row1 ORIGINAL x minus qy = 1

Conditions: none

Use ORIGINAL operands and declared order for exact integer/rational arithmetic,not floats.Bounds are family-specific:do not revalidate derived values as RAW inputs or add blanket SAFE/n64 caps to BASE families.

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





S007 · impliesBefore

source roles = [39, 19, 2]

After

derived = [38, 1, [39, 19, 1]]

Conditions: none

With y≠0,divide to get x=qy+r and0≤r<y.A divisor common to x,y divides y,r,and the converse follows from x=qy+r,so common divisors are unchanged.Positive remainders strictly decrease,ensuring termination.

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





S008 · calculationBefore

GCD Euclid row2 ORIGINAL quotient times y := mul(19, 1)

After

GCD Euclid row2 ORIGINAL quotient times y = 19

Conditions: none

Use ORIGINAL operands and declared order for exact integer/rational arithmetic,not floats.Bounds are family-specific:do not revalidate derived values as RAW inputs or add blanket SAFE/n64 caps to BASE families.

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





S009 · calculationBefore

GCD Euclid row2 ORIGINAL x minus qy := sub(19, 19)

After

GCD Euclid row2 ORIGINAL x minus qy = 0

Conditions: none

Use ORIGINAL operands and declared order for exact integer/rational arithmetic,not floats.Bounds are family-specific:do not revalidate derived values as RAW inputs or add blanket SAFE/n64 caps to BASE families.

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





S010 · impliesBefore

source roles = [19, 1, 19]

After

derived = [19, 0, [19, 1, 0]]

Conditions: none

With y≠0,divide to get x=qy+r and0≤r<y.A divisor common to x,y divides y,r,and the converse follows from x=qy+r,so common divisors are unchanged.Positive remainders strictly decrease,ensuring termination.

Step identifiers and dependenciesRule: GCD_EUCLID_nonzero_divisor_exact_quotient_remainder_INVARIANT · Uses: G001, S009





S011 · impliesBefore

source roles = [19, 39, [[19, 39, 19], [39, 19, 1], [19, 1, 0]]]

After

derived = [1, 0]

Conditions: none

At second value0 retain the last x.For nonzero x,gcd(x,0)=x;the two-way common-divisor invariant transfers this to the original pair.At(0,0)use the EXPLICIT convention gcd=0,not a claim that0 is the largest positive divisor.

Step identifiers and dependenciesRule: GCD_TERMINAL_last_x_ZEROsecond_and_explicit_gcd00_convention · Uses: G001, S010





S012 · impliesBefore

source roles = [19, 39, 1]

After

derived = [Yes]

Conditions: none

Coprime means ONLY gcd=1,not that both inputs are prime.(0,1)is coprime;(0,0)is not.

Step identifiers and dependenciesRule: GCD_COPRIME_IFF_gcd1_NOT_both_prime · Uses: G001, S011









## Reverse checks


- S012 · premise_and_result_audit — Reverse-check the ORIGINAL inputs,field roles,domain and premises.Consistency does not imply unique recovery of premises.Keep finite checking,independent review,formal proof and publication separate.
- S011 · premise_and_result_audit — Reverse-check the ORIGINAL inputs,field roles,domain and premises.Consistency does not imply unique recovery of premises.Keep finite checking,independent review,formal proof and publication separate.
- S010 · premise_and_result_audit — Reverse-check the ORIGINAL inputs,field roles,domain and premises.Consistency does not imply unique recovery of premises.Keep finite checking,independent review,formal proof and publication separate.
- S009 · premise_and_result_audit — Recompute GCD Euclid row2 ORIGINAL x minus qy with exact rational arithmetic, not rounded decimals.
- S008 · premise_and_result_audit — Recompute GCD Euclid row2 ORIGINAL quotient times y with exact rational arithmetic, not rounded decimals.
- S007 · premise_and_result_audit — Reverse-check the ORIGINAL inputs,field roles,domain and premises.Consistency does not imply unique recovery of premises.Keep finite checking,independent review,formal proof and publication separate.
- S006 · premise_and_result_audit — Recompute GCD Euclid row1 ORIGINAL x minus qy with exact rational arithmetic, not rounded decimals.
- S005 · premise_and_result_audit — Recompute GCD Euclid row1 ORIGINAL quotient times y with exact rational arithmetic, not rounded decimals.
- S004 · premise_and_result_audit — Reverse-check the ORIGINAL inputs,field roles,domain and premises.Consistency does not imply unique recovery of premises.Keep finite checking,independent review,formal proof and publication separate.
- S003 · premise_and_result_audit — Recompute GCD Euclid row0 ORIGINAL x minus qy with exact rational arithmetic, not rounded decimals.
- S002 · premise_and_result_audit — Recompute GCD Euclid row0 ORIGINAL quotient times y with exact rational arithmetic, not rounded decimals.
- S001 · premise_and_result_audit — Reverse-check the ORIGINAL inputs,field roles,domain and premises.Consistency does not imply unique recovery of premises.Keep finite checking,independent review,formal proof and publication separate.





## Result

(19, 39, 1, Yes)

The full substitutions and premise checks give the original answer; source identity,format and status are unchanged.





## 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: f6377928c88f6ed45b3d85745c1947813fce9232976f542dea1763d79d081196
- candidate record SHA-256: 0092a95e9f4c5b268eb0a67fe60b05314ab4995ab535220486415cdc7a872bbe
- semantic review receipt SHA-256: 963099ffc9f754069fdce6792949a85ed350472465eaceb3038fa8011cf672bd
- question-first witness SHA-256: d7655324c5d11528e1af90b757384cebd3313e19dc5f6f5b9b8ea7624fb06f6f
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261013-advance-20261018-r03-gcd-coprime-0070.json)




