Step-by-step derivation
S001 · implies
Before
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 dependencies
Rule: source_ordered_interface_explicit_without_javascript · Uses: G001
S002 · implies
Before
original signed inputs a=1407,b=108
After
initial nonnegative chain values=[1407, 108];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 dependencies
Rule: euclid_signed_inputs_absolute_chain_scope · Uses: G001, S001
S003 · calculation
Before
Euclid step0 exact ratio := div(1407, 108)
After
Euclid step0 exact ratio = 469/36
Conditions: none
Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S002
S004 · calculation
Before
Euclid step0 quotient times divisor := mul(13, 108)
After
Euclid step0 quotient times divisor = 1404
Conditions: none
Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S003
S005 · calculation
Before
Euclid step0 remainder := sub(1407, 1404)
After
Euclid step0 remainder = 3
Conditions: none
Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S004
S006 · implies
Before
step=0;left=1407;positive right=108;exact ratio=469/36;floor quotient=13
After
left=right*q+r with r=3 in[0,108);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 dependencies
Rule: euclid_each_division_common_divisors_and_strict_descent · Uses: G001, S005
S007 · calculation
Before
Euclid step1 exact ratio := div(108, 3)
After
Euclid step1 exact ratio = 36
Conditions: none
Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S006
S008 · calculation
Before
Euclid step1 quotient times divisor := mul(36, 3)
After
Euclid step1 quotient times divisor = 108
Conditions: none
Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S007
S009 · calculation
Before
Euclid step1 remainder := sub(108, 108)
After
Euclid step1 remainder = 0
Conditions: none
Substitute original data and established intermediates exactly,retaining indices,signs and the relevant space.
Step identifiers and dependencies
Rule: exact_rational_arithmetic · Uses: G001, S008
S010 · implies
Before
step=1;left=108;positive right=3;exact ratio=36;floor quotient=36
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 dependencies
Rule: euclid_each_division_common_divisors_and_strict_descent · Uses: G001, S009
S011 · implies
Before
complete division rows=[[1407, 108, 13, 3], [108, 3, 36, 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 dependencies
Rule: euclid_terminal_gcd_not_extra_zero_division · Uses: G001, S010