CG0002

linear_congruence_solution_class_iff_reduced_modulus

Alpha v34 independently verified · alpha_closed; checked-use authorized; not Stable

Relative to any actual solution, every natural solution is exactly its class modulo the actual gcd cofactor.

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 expanded first-order arithmetic statement

forall a m g A M b r x. (~(m=0)) -> ((((exists hag_left_factor_lcc_class. a = g * hag_left_factor_lcc_class) /\ (exists hag_right_factor_lcc_class. m = g * hag_right_factor_lcc_class)) /\ forall hag_divisor_lcc_class. (exists hag_common_left_lcc_class. a = hag_divisor_lcc_class * hag_common_left_lcc_class) -> (exists hag_common_right_lcc_class. m = hag_divisor_lcc_class * hag_common_right_lcc_class) -> exists hag_greatest_factor_lcc_class. g = hag_divisor_lcc_class * hag_greatest_factor_lcc_class)) -> (a=g*A) -> (m=g*M) -> (exists hgcrt_mod_left_lcc_class_reference hgcrt_mod_right_lcc_class_reference. (a * r) + m * hgcrt_mod_left_lcc_class_reference = b + m * hgcrt_mod_right_lcc_class_reference) -> ((((exists hgcrt_mod_left_lcc_class_solution hgcrt_mod_right_lcc_class_solution. (a * x) + m * hgcrt_mod_left_lcc_class_solution = b + m * hgcrt_mod_right_lcc_class_solution) -> (exists hgcrt_mod_left_lcc_class_reduced hgcrt_mod_right_lcc_class_reduced. x + M * hgcrt_mod_left_lcc_class_reduced = r + M * hgcrt_mod_right_lcc_class_reduced)) /\ (((exists hgcrt_mod_left_lcc_class_reduced hgcrt_mod_right_lcc_class_reduced. x + M * hgcrt_mod_left_lcc_class_reduced = r + M * hgcrt_mod_right_lcc_class_reduced) -> (exists hgcrt_mod_left_lcc_class_solution hgcrt_mod_right_lcc_class_solution. (a * x) + m * hgcrt_mod_left_lcc_class_solution = b + m * hgcrt_mod_right_lcc_class_solution)))))

Constructive proof overview

Generated structural guide

Relative to any actual solution, every natural solution is exactly its class modulo the actual gcd cofactor.

The unchanged tactic script uses 3 declared prerequisites and contains 50 exact native proof lines.

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

Proof neighborhood

Direct dependencies

CG0001 mod_eq_cancel_gcd_cofactor mod_eq_trans Alpha theorem; checked-use authorized mod_eq_symm Alpha theorem; checked-use authorized

Direct dependents

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. This exact body belongs to a complete independently kernel-checked constructive proof bundle and has Alpha checked-use authority; it does not imply Stable membership.

Read the argument

Proof checkpoints

50 script commands · 10 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.

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–10

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

  1. L1
    intro a
  2. L2
    intro m
  3. L3
    intro g
  4. L4
    intro A
  5. L5
    intro M
  6. L6
    intro b
  7. L7
    intro r
  8. L8
    intro x
  9. L9
    intro hm0
  10. L10
    intro hg
02Fix variables and assumptionsL11–13

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

  1. L11
    intro ha
  2. L12
    intro hm
  3. L13
    intro hr
03Establish hcL14–23

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq cancel gcd cofactor.

  1. L14
    have hc : (ModEq(m,a · x,a · r) → ModEq(M,x,r)) ∧ (ModEq(M,x,r) → ModEq(m,a · x,a · r))Definitions: ModEq
  2. L15
    specialize mod_eq_cancel_gcd_cofactor (a)
  3. L16
    specialize mod_eq_cancel_gcd_cofactor (m)
  4. L17
    specialize mod_eq_cancel_gcd_cofactor (g)
  5. L18
    specialize mod_eq_cancel_gcd_cofactor (A)
  6. L19
    specialize mod_eq_cancel_gcd_cofactor (M)
  7. L20
    specialize mod_eq_cancel_gcd_cofactor (x)
  8. L21
    specialize mod_eq_cancel_gcd_cofactor (r)
  9. L22
    apply mod_eq_cancel_gcd_cofactor
  10. L23
    exact hm0
04Use earlier factsL24–26

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

  1. L24
    exact hg
  2. L25
    exact ha
  3. L26
    exact hm
05Separate the logical casesL27–28

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L27
    cases hc
  2. L28
    split
06Fix variables and assumptionsL29–29

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

  1. L29
    intro hx
07Use earlier factsL30–39

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

  1. L30
    apply hc_left
  2. L31
    specialize mod_eq_trans (m)
  3. L32
    specialize mod_eq_trans (a*x)
  4. L33
    specialize mod_eq_trans (b)
  5. L34
    specialize mod_eq_trans (a*r)
  6. L35
    apply mod_eq_trans
  7. L36
    exact hx
  8. L37
    specialize mod_eq_symm (m)
  9. L38
    specialize mod_eq_symm (a*r)
  10. L39
    specialize mod_eq_symm (b)
08Use earlier factsL40–41

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

  1. L40
    apply mod_eq_symm
  2. L41
    exact hr
09Fix variables and assumptionsL42–42

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

  1. L42
    intro hx
10Use earlier factsL43–50

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

  1. L43
    specialize mod_eq_trans (m)
  2. L44
    specialize mod_eq_trans (a*x)
  3. L45
    specialize mod_eq_trans (a*r)
  4. L46
    specialize mod_eq_trans (b)
  5. L47
    apply mod_eq_trans
  6. L48
    apply hc_right
  7. L49
    exact hx
  8. L50
    exact hr

Library-wide reading audit

Original exact command ledger · 50 lines
  1. 0001intro a
  2. 0002intro m
  3. 0003intro g
  4. 0004intro A
  5. 0005intro M
  6. 0006intro b
  7. 0007intro r
  8. 0008intro x
  9. 0009intro hm0
  10. 0010intro hg
  11. 0011intro ha
  12. 0012intro hm
  13. 0013intro hr
  14. 0014have hc : (((exists hgcrt_mod_left_lcc_class_pair hgcrt_mod_right_lcc_class_pair. (a * x) + m * hgcrt_mod_left_lcc_class_pair = (a * r) + m * hgcrt_mod_right_lcc_class_pair) -> (exists hgcrt_mod_left_lcc_class_reduced hgcrt_mod_right_lcc_class_reduced. x + M * hgcrt_mod_left_lcc_class_reduced = r + M * hgcrt_mod_right_lcc_class_reduced)) /\ (((exists hgcrt_mod_left_lcc_class_reduced hgcrt_mod_right_lcc_class_reduced. x + M * hgcrt_mod_left_lcc_class_reduced = r + M * hgcrt_mod_right_lcc_class_reduced) -> (exists hgcrt_mod_left_lcc_class_pair hgcrt_mod_right_lcc_class_pair. (a * x) + m * hgcrt_mod_left_lcc_class_pair = (a * r) + m * hgcrt_mod_right_lcc_class_pair))))
  15. 0015specialize mod_eq_cancel_gcd_cofactor (a)
  16. 0016specialize mod_eq_cancel_gcd_cofactor (m)
  17. 0017specialize mod_eq_cancel_gcd_cofactor (g)
  18. 0018specialize mod_eq_cancel_gcd_cofactor (A)
  19. 0019specialize mod_eq_cancel_gcd_cofactor (M)
  20. 0020specialize mod_eq_cancel_gcd_cofactor (x)
  21. 0021specialize mod_eq_cancel_gcd_cofactor (r)
  22. 0022apply mod_eq_cancel_gcd_cofactor
  23. 0023exact hm0
  24. 0024exact hg
  25. 0025exact ha
  26. 0026exact hm
  27. 0027cases hc
  28. 0028split
  29. 0029intro hx
  30. 0030apply hc_left
  31. 0031specialize mod_eq_trans (m)
  32. 0032specialize mod_eq_trans (a*x)
  33. 0033specialize mod_eq_trans (b)
  34. 0034specialize mod_eq_trans (a*r)
  35. 0035apply mod_eq_trans
  36. 0036exact hx
  37. 0037specialize mod_eq_symm (m)
  38. 0038specialize mod_eq_symm (a*r)
  39. 0039specialize mod_eq_symm (b)
  40. 0040apply mod_eq_symm
  41. 0041exact hr
  42. 0042intro hx
  43. 0043specialize mod_eq_trans (m)
  44. 0044specialize mod_eq_trans (a*x)
  45. 0045specialize mod_eq_trans (a*r)
  46. 0046specialize mod_eq_trans (b)
  47. 0047apply mod_eq_trans
  48. 0048apply hc_right
  49. 0049exact hx
  50. 0050exact hr