# Question 18868: Gcd Preservation and Termination Have Different Obligations

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

[← Question derivation index](https://ocme.evemisslab.com/en/questions/) · [Original question batch](https://ocme.evemisslab.com/en/practice/batch-20261014-advance-20261105-r03-euclidean-algorithm-foundations/#q-20261014-advance-20261105-r03-euclidean-algorithm-0043)

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.

R0036-18868 · q-20261014-advance-20261105-r03-euclidean-algorithm-0043



## Original question and givens

Use original integers a=1629, b=114. Execute the Euclidean chain on their absolute values; each row [left, right, quotient, remainder] satisfies left=right*quotient+remainder with 0≤remainder<right. Stop before a zero divisor. Restore original signs for Bezout coefficients; use the explicit gcd(0,0)=0 convention only in its boundary family. Give (gcd_pairs, gcd, invariant, certificate).


- G001 — Use original integers a=1629, b=114. Execute the Euclidean chain on their absolute values; each row [left, right, quotient, remainder] satisfies left=right*quotient+remainder with 0≤remainder<right. Stop before a zero divisor. Restore original signs for Bezout coefficients; use the explicit gcd(0,0)=0 convention only in its boundary family. Give (gcd_pairs, gcd, invariant, certificate).





## 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-euclidean-algorithm](https://ocme.evemisslab.com/en/mko/mko-euclidean-algorithm/)





## Step-by-step derivation

S001 · impliesBefore

source operation=euclid-gcd-invariant;original snapshot and mathematics retained

After

explicit ordered source output fields=[gcd_pairs, gcd, invariant, certificate]

Conditions: none

Keep the historical interface marker in the original snapshot while listing the original ordered fields here.No JavaScript or external table is needed for the main text,and field labels are not mathematical evidence.

Step identifiers and dependenciesRule: source_ordered_interface_explicit_without_javascript · Uses: G001





S002 · impliesBefore

original signed inputs a=1629,b=114

After

initial nonnegative chain values=[1629, 114];gcd(a,b)=gcd(abs(a),abs(b));never divide by a zero right input

Conditions: none

Divisibility is unaffected by input signs,and the gcd is nonnegative.Ordinary chain/invariant families require b≠0;the zero boundary separately retains its(0,0)convention.

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





S003 · calculationBefore

Euclid step0 exact ratio := div(1629, 114)

After

Euclid step0 exact ratio = 543/38

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S004 · calculationBefore

Euclid step0 quotient times divisor := mul(14, 114)

After

Euclid step0 quotient times divisor = 1596

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S005 · calculationBefore

Euclid step0 remainder := sub(1629, 1596)

After

Euclid step0 remainder = 33

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S006 · impliesBefore

step=0;left=1629;positive right=114;exact ratio=543/38;floor quotient=14

After

left=right*q+r with r=33 in[0,114);gcd pair=[3, 3]

Conditions: none

An integer d divides both left and right iff it divides right and left−q*right,so the gcd is unchanged.The next nonnegative right is the strictly smaller remainder,so infinite descent is impossible;termination is separate from invariance.

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





S007 · calculationBefore

Euclid step1 exact ratio := div(114, 33)

After

Euclid step1 exact ratio = 38/11

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S008 · calculationBefore

Euclid step1 quotient times divisor := mul(3, 33)

After

Euclid step1 quotient times divisor = 99

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S009 · calculationBefore

Euclid step1 remainder := sub(114, 99)

After

Euclid step1 remainder = 15

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S010 · impliesBefore

step=1;left=114;positive right=33;exact ratio=38/11;floor quotient=3

After

left=right*q+r with r=15 in[0,33);gcd pair=[3, 3]

Conditions: none

An integer d divides both left and right iff it divides right and left−q*right,so the gcd is unchanged.The next nonnegative right is the strictly smaller remainder,so infinite descent is impossible;termination is separate from invariance.

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





S011 · calculationBefore

Euclid step2 exact ratio := div(33, 15)

After

Euclid step2 exact ratio = 11/5

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S012 · calculationBefore

Euclid step2 quotient times divisor := mul(2, 15)

After

Euclid step2 quotient times divisor = 30

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S013 · calculationBefore

Euclid step2 remainder := sub(33, 30)

After

Euclid step2 remainder = 3

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S014 · impliesBefore

step=2;left=33;positive right=15;exact ratio=11/5;floor quotient=2

After

left=right*q+r with r=3 in[0,15);gcd pair=[3, 3]

Conditions: none

An integer d divides both left and right iff it divides right and left−q*right,so the gcd is unchanged.The next nonnegative right is the strictly smaller remainder,so infinite descent is impossible;termination is separate from invariance.

Step identifiers and dependenciesRule: euclid_each_division_common_divisors_and_strict_descent · Uses: G001, S013





S015 · calculationBefore

Euclid step3 exact ratio := div(15, 3)

After

Euclid step3 exact ratio = 5

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S016 · calculationBefore

Euclid step3 quotient times divisor := mul(5, 3)

After

Euclid step3 quotient times divisor = 15

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S017 · calculationBefore

Euclid step3 remainder := sub(15, 15)

After

Euclid step3 remainder = 0

Conditions: none

Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.

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





S018 · impliesBefore

step=3;left=15;positive right=3;exact ratio=5;floor quotient=5

After

left=right*q+r with r=0 in[0,3);gcd pair=[3, 3]

Conditions: none

An integer d divides both left and right iff it divides right and left−q*right,so the gcd is unchanged.The next nonnegative right is the strictly smaller remainder,so infinite descent is impossible;termination is separate from invariance.

Step identifiers and dependenciesRule: euclid_each_division_common_divisors_and_strict_descent · Uses: G001, S017





S019 · impliesBefore

complete division rows=[[1629, 114, 14, 33], [114, 33, 3, 15], [33, 15, 2, 3], [15, 3, 5, 0]];terminal pair=[3, 0]

After

gcd(a,b)=gcd(3,0)=3;all divisions used positive divisors;nonnegative gcd convention

Conditions: none

At termination common divisors are those of the terminal left value,giving its nonnegative gcd.The(0,0)value0 is an explicit separate convention.Do not append a fictitious division by zero.

Step identifiers and dependenciesRule: euclid_terminal_gcd_not_extra_zero_division · Uses: G001, S018









## Reverse checks


- S019 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S018 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S017 · premise_and_result_audit — Recompute Euclid step3 remainder with exact rational arithmetic, not rounded decimals.
- S016 · premise_and_result_audit — Recompute Euclid step3 quotient times divisor with exact rational arithmetic, not rounded decimals.
- S015 · premise_and_result_audit — Recompute Euclid step3 exact ratio with exact rational arithmetic, not rounded decimals.
- S014 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S013 · premise_and_result_audit — Recompute Euclid step2 remainder with exact rational arithmetic, not rounded decimals.
- S012 · premise_and_result_audit — Recompute Euclid step2 quotient times divisor with exact rational arithmetic, not rounded decimals.
- S011 · premise_and_result_audit — Recompute Euclid step2 exact ratio with exact rational arithmetic, not rounded decimals.
- S010 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S009 · premise_and_result_audit — Recompute Euclid step1 remainder with exact rational arithmetic, not rounded decimals.
- S008 · premise_and_result_audit — Recompute Euclid step1 quotient times divisor with exact rational arithmetic, not rounded decimals.
- S007 · premise_and_result_audit — Recompute Euclid step1 exact ratio with exact rational arithmetic, not rounded decimals.
- S006 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S005 · premise_and_result_audit — Recompute Euclid step0 remainder with exact rational arithmetic, not rounded decimals.
- S004 · premise_and_result_audit — Recompute Euclid step0 quotient times divisor with exact rational arithmetic, not rounded decimals.
- S003 · premise_and_result_audit — Recompute Euclid step0 exact ratio with exact rational arithmetic, not rounded decimals.
- S002 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.
- S001 · premise_and_result_audit — Check against the original data and this step's premises; a one-way implication is not an equivalence.





## Result

([[3, 3], [3, 3], [3, 3], [3, 3]], 3, Yes, gcd_invariant_separate_from_termination)

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: 098caf6e9b04c3d48799538a560e48b160afc8619b4c696f5e6ddae9432b8b87
- candidate record SHA-256: 44f66955fbe6dc38139b86e09680a56aebde2e3961a0a1a3a2c97452f028548f
- semantic review receipt SHA-256: efee5462991619d6ed9f64f11ddb085e5614ef33f9f8fcd8cf29b9329f8fd301
- question-first witness SHA-256: acf91fa1622f01d2cf04b2c513294254323665351f660f2628aaafdb869c4ff2
- Lean: NOT_RUN · human review: NOT_PERFORMED

[Same-source full JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261014-advance-20261105-r03-euclidean-algorithm-0043.json)




