GC0012

crt_lcm_gcd_cofactor_product

For a nonzero relational gcd, the actual binary LCM is exactly its gcd times the product of the two coprime cofactors.

Alpha v34 checked-use · first admitted v25 · 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.

Historical partial components only: this chapter proves canonical solutions under successive-merge compatibility and in the pairwise-compatible dominating-last case. G011 is now closed in the separate Alpha-v27 generalized-crt branch for arbitrary pairwise-compatible finite lists, including noncoprime moduli. Full G011 proof · Alpha v27

Exact theorem in conservative defined notation

∀ a. ∀ b. ∀ g. ∀ A. ∀ B. ∀ L. ¬g = 0 → a = g · A → b = g · B → IsGCD(g,a,b)Dvd(a,L)Dvd(b,L) ∧ (∀ x. Dvd(a,x)Dvd(b,x)Dvd(L,x)) → L = g · (A · B)

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

Definition DAG

Actual proof prerequisites

gcd_lcm_product · checked external prerequisitemul_assoc · checked external prerequisitemul_comm · checked external prerequisitemul_left_cancel_nonzero · checked external prerequisite
Original expanded first-order statement
forall a b g A B L. ~(g = 0) -> a = g * A -> b = g * B -> ((((exists hag_left_factor_gcomp_lcm_factor_gcd. a = g * hag_left_factor_gcomp_lcm_factor_gcd) /\ (exists hag_right_factor_gcomp_lcm_factor_gcd. b = g * hag_right_factor_gcomp_lcm_factor_gcd)) /\ forall hag_divisor_gcomp_lcm_factor_gcd. (exists hag_common_left_gcomp_lcm_factor_gcd. a = hag_divisor_gcomp_lcm_factor_gcd * hag_common_left_gcomp_lcm_factor_gcd) -> (exists hag_common_right_gcomp_lcm_factor_gcd. b = hag_divisor_gcomp_lcm_factor_gcd * hag_common_right_gcomp_lcm_factor_gcd) -> exists hag_greatest_factor_gcomp_lcm_factor_gcd. g = hag_divisor_gcomp_lcm_factor_gcd * hag_greatest_factor_gcomp_lcm_factor_gcd)) -> ((((exists hlcm_left_factor_gcomp_lcm_factor_source. L = a * hlcm_left_factor_gcomp_lcm_factor_source) /\ (exists hlcm_right_factor_gcomp_lcm_factor_source. L = b * hlcm_right_factor_gcomp_lcm_factor_source)) /\ forall hlcm_common_gcomp_lcm_factor_source. (exists hlcm_left_common_gcomp_lcm_factor_source. hlcm_common_gcomp_lcm_factor_source = a * hlcm_left_common_gcomp_lcm_factor_source) -> (exists hlcm_right_common_gcomp_lcm_factor_source. hlcm_common_gcomp_lcm_factor_source = b * hlcm_right_common_gcomp_lcm_factor_source) -> exists hlcm_least_factor_gcomp_lcm_factor_source. hlcm_common_gcomp_lcm_factor_source = L * hlcm_least_factor_gcomp_lcm_factor_source)) -> L = g * (A * B)

Complete unchanged native tactic proof

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

Read the argument

Proof checkpoints

30 script commands · 4 reading checkpoints · 2 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.

01Fix variables and assumptionsL1–10

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

  1. L1
    intro a
  2. L2
    intro b
  3. L3
    intro g
  4. L4
    intro A
  5. L5
    intro B
  6. L6
    intro L
  7. L7
    intro hnonzero
  8. L8
    intro ha
  9. L9
    intro hb
  10. L10
    intro hg
02Fix variables and assumptionsL11–11

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

  1. L11
    intro hlcm
03Establish hproductL12–21

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

  1. L12
    have hproduct : g * L = a * b
  2. L13
    specialize gcd_lcm_product g
  3. L14
    specialize gcd_lcm_product L
  4. L15
    specialize gcd_lcm_product a
  5. L16
    specialize gcd_lcm_product b
  6. L17
    apply gcd_lcm_product
  7. L18
    exact hg
  8. L19
    exact hlcm
  9. L20
    rewrite ha at hproduct
  10. L21
    rewrite hb at hproduct
04Establish hshuffleL22–30

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mul left cancel nonzero.

  1. L22
    have hshuffle : (g * A) * (g * B) = g * (g * (A * B))
  2. L23
    simp [mul_assoc, mul_comm]
  3. L24
    rewrite hshuffle at hproduct
  4. L25
    specialize mul_left_cancel_nonzero g
  5. L26
    specialize mul_left_cancel_nonzero L
  6. L27
    specialize mul_left_cancel_nonzero (g * (A * B))
  7. L28
    apply mul_left_cancel_nonzero
  8. L29
    exact hnonzero
  9. L30
    exact hproduct

Library-wide reading audit

Original defined command ledger · 30 lines
  1. 0001intro a
  2. 0002intro b
  3. 0003intro g
  4. 0004intro A
  5. 0005intro B
  6. 0006intro L
  7. 0007intro hnonzero
  8. 0008intro ha
  9. 0009intro hb
  10. 0010intro hg
  11. 0011intro hlcm
  12. 0012have hproduct : g * L = a * b
  13. 0013specialize gcd_lcm_product g
  14. 0014specialize gcd_lcm_product L
  15. 0015specialize gcd_lcm_product a
  16. 0016specialize gcd_lcm_product b
  17. 0017apply gcd_lcm_product
  18. 0018exact hg
  19. 0019exact hlcm
  20. 0020rewrite ha at hproduct
  21. 0021rewrite hb at hproduct
  22. 0022have hshuffle : (g * A) * (g * B) = g * (g * (A * B))
  23. 0023simp [mul_assoc, mul_comm]
  24. 0024rewrite hshuffle at hproduct
  25. 0025specialize mul_left_cancel_nonzero g
  26. 0026specialize mul_left_cancel_nonzero L
  27. 0027specialize mul_left_cancel_nonzero (g * (A * B))
  28. 0028apply mul_left_cancel_nonzero
  29. 0029exact hnonzero
  30. 0030exact hproduct