GT0009

euclidean_gcd_step_output_unique

Independently witnessed greatest common divisors before and after one exact Euclidean step are equal.

Alpha v34 checked-use · first admitted v22 · independently kernel and Lean verified; not Stable

Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved. Exact original first-admission records.

G101 was OPEN at this family's Alpha-v22 first admission: its complete anchored trace and actual terminal gcd were proved but its logarithmic bound was not. G101 is now CLOSED in Alpha v23, including the exact first-order bound steps≤2*BitLen(b)+1.

Exact theorem in conservative defined notation

∀ g. ∀ G. ∀ a. ∀ b. ∀ q. ∀ r. EuclideanDivision(a,b,q,r)IsGCD(g,a,b)IsGCD(G,b,r) → g = G

Every linked abbreviation expands hygienically to the identical original native formula.

Definition DAG

Actual proof prerequisites

euclidean_gcd_step_forwardis_gcd_unique · checked external prerequisite
Original expanded first-order statement
forall g G a b q r. ((a = b * q + r /\ (exists ff_lt_ec_egt_step_division. ff_lt_ec_egt_step_division + S r = b))) -> ((((exists hag_left_factor_egt_before. a = g * hag_left_factor_egt_before) /\ (exists hag_right_factor_egt_before. b = g * hag_right_factor_egt_before)) /\ forall hag_divisor_egt_before. (exists hag_common_left_egt_before. a = hag_divisor_egt_before * hag_common_left_egt_before) -> (exists hag_common_right_egt_before. b = hag_divisor_egt_before * hag_common_right_egt_before) -> exists hag_greatest_factor_egt_before. g = hag_divisor_egt_before * hag_greatest_factor_egt_before)) -> ((((exists hag_left_factor_egt_other_after. b = G * hag_left_factor_egt_other_after) /\ (exists hag_right_factor_egt_other_after. r = G * hag_right_factor_egt_other_after)) /\ forall hag_divisor_egt_other_after. (exists hag_common_left_egt_other_after. b = hag_divisor_egt_other_after * hag_common_left_egt_other_after) -> (exists hag_common_right_egt_other_after. r = hag_divisor_egt_other_after * hag_common_right_egt_other_after) -> exists hag_greatest_factor_egt_other_after. G = hag_divisor_egt_other_after * hag_greatest_factor_egt_other_after)) -> g = G

Complete unchanged native tactic proof

All 25 lines are the exact independently kernel-checked original script.

Read the argument

Proof checkpoints

25 script commands · 3 reading checkpoints · 1 local claims

This is a reading aid, not a new proof or a proof-tree certificate. Checkpoint groups are consecutive commands, not inferred branch boundaries. Every step links to the preserved script.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

Named ingredients (1)

Long local formulas use this family’s existing definitions. Each new abbreviation was expanded back to the identical native formula, including its free-variable context. The original edition is preserved below.

01Fix variables and assumptionsL1–9

Work with arbitrary variables or the premises of the current implication.

  1. L1
    intro g
  2. L2
    intro G
  3. L3
    intro a
  4. L4
    intro b
  5. L5
    intro q
  6. L6
    intro r
  7. L7
    intro hstep
  8. L8
    intro hg
  9. L9
    intro hG
02Establish htransportL10–19

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply euclidean gcd step forward.

  1. L10
    have htransport : IsGCD(G,a,b)Definitions: IsGCDOriginal native command in the exact edition
  2. L11
    specialize euclidean_gcd_step_forward G
  3. L12
    specialize euclidean_gcd_step_forward a
  4. L13
    specialize euclidean_gcd_step_forward b
  5. L14
    specialize euclidean_gcd_step_forward q
  6. L15
    specialize euclidean_gcd_step_forward r
  7. L16
    apply euclidean_gcd_step_forward
  8. L17
    exact hstep
  9. L18
    exact hG
  10. L19
    specialize is_gcd_unique g
03Use earlier factsL20–25

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L20
    specialize is_gcd_unique G
  2. L21
    specialize is_gcd_unique a
  3. L22
    specialize is_gcd_unique b
  4. L23
    apply is_gcd_unique
  5. L24
    exact hg
  6. L25
    exact htransport

Library-wide reading audit

Original defined command ledger · 25 lines
  1. 0001intro g
  2. 0002intro G
  3. 0003intro a
  4. 0004intro b
  5. 0005intro q
  6. 0006intro r
  7. 0007intro hstep
  8. 0008intro hg
  9. 0009intro hG
  10. 0010have htransport : (((exists hag_left_factor_egt_transport_other. a = G * hag_left_factor_egt_transport_other) /\ (exists hag_right_factor_egt_transport_other. b = G * hag_right_factor_egt_transport_other)) /\ forall hag_divisor_egt_transport_other. (exists hag_common_left_egt_transport_other. a = hag_divisor_egt_transport_other * hag_common_left_egt_transport_other) -> (exists hag_common_right_egt_transport_other. b = hag_divisor_egt_transport_other * hag_common_right_egt_transport_other) -> exists hag_greatest_factor_egt_transport_other. G = hag_divisor_egt_transport_other * hag_greatest_factor_egt_transport_other)
  11. 0011specialize euclidean_gcd_step_forward G
  12. 0012specialize euclidean_gcd_step_forward a
  13. 0013specialize euclidean_gcd_step_forward b
  14. 0014specialize euclidean_gcd_step_forward q
  15. 0015specialize euclidean_gcd_step_forward r
  16. 0016apply euclidean_gcd_step_forward
  17. 0017exact hstep
  18. 0018exact hG
  19. 0019specialize is_gcd_unique g
  20. 0020specialize is_gcd_unique G
  21. 0021specialize is_gcd_unique a
  22. 0022specialize is_gcd_unique b
  23. 0023apply is_gcd_unique
  24. 0024exact hg
  25. 0025exact htransport