TS0016

balanced_zero_sum_implies_squared_congruence

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

If two naturals sum to zero modulo a modulus, their squares are balanced-congruent without subtraction.

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.

Exact expanded first-order arithmetic statement

forall p a b. (exists ftcn_left_opposite ftcn_right_opposite. (a + b) + (p) * ftcn_left_opposite = (0) + (p) * ftcn_right_opposite) -> (exists ftcn_left_opposite_squares ftcn_right_opposite_squares. (a * a) + (p) * ftcn_left_opposite_squares = (b * b) + (p) * ftcn_right_opposite_squares)

Constructive proof overview

Generated structural guide

If two naturals sum to zero modulo a modulus, their squares are balanced-congruent without subtraction.

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

dependency-curried kernel-checked theorem body; Alpha enrollment and checked-use authority follow separately sealed release evidence; Stable membership remains unchanged

Historical empty-context replay experiment only; that experiment persisted no certificate and granted no release authority. Current checked use follows separately sealed, independently verified proof bundles; there is no Stable promotion.

Proof neighborhood

Direct dependencies

mod_eq_mul_left Stable theorem; checked-use authorized mod_eq_symm Stable theorem; checked-use authorized mod_eq_trans Stable theorem; checked-use authorized mul_add Stable theorem; checked-use authorized add_comm Stable theorem; checked-use authorized mul_comm Stable theorem; checked-use authorized mod_eq_add_cancel_left 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 · 9 reading checkpoints · 8 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.

01Fix variables and assumptionsL1–4

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

  1. L1
    intro p
  2. L2
    intro a
  3. L3
    intro b
  4. L4
    intro hsum
02Establish haL5–11

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

  1. L5
    have ha : exists ftcn_left_opposite_left ftcn_right_opposite_left. (a * (a + b)) + (p) * ftcn_left_opposite_left = (a * 0) + (p) * ftcn_right_opposite_left
  2. L6
    specialize mod_eq_mul_left p
  3. L7
    specialize mod_eq_mul_left (a + b)
  4. L8
    specialize mod_eq_mul_left 0
  5. L9
    specialize mod_eq_mul_left a
  6. L10
    apply mod_eq_mul_left
  7. L11
    exact hsum
03Establish ha_zeroL12–14

Establish this local claim before using it. It is not an additional assumption.

  1. L12
    have ha_zero : a * 0 = 0
  2. L13
    simp
  3. L14
    rewrite ha_zero at ha
04Establish hbL15–21

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

  1. L15
    have hb : exists ftcn_left_opposite_right ftcn_right_opposite_right. (b * (a + b)) + (p) * ftcn_left_opposite_right = (b * 0) + (p) * ftcn_right_opposite_right
  2. L16
    specialize mod_eq_mul_left p
  3. L17
    specialize mod_eq_mul_left (a + b)
  4. L18
    specialize mod_eq_mul_left 0
  5. L19
    specialize mod_eq_mul_left b
  6. L20
    apply mod_eq_mul_left
  7. L21
    exact hsum
05Establish hb_zeroL22–24

Establish this local claim before using it. It is not an additional assumption.

  1. L22
    have hb_zero : b * 0 = 0
  2. L23
    simp
  3. L24
    rewrite hb_zero at hb
06Establish hreverseL25–30

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

  1. L25
    have hreverse : exists ftcn_left_opposite_reverse ftcn_right_opposite_reverse. (0) + (p) * ftcn_left_opposite_reverse = (b * (a + b)) + (p) * ftcn_right_opposite_reverse
  2. L26
    specialize mod_eq_symm p
  3. L27
    specialize mod_eq_symm (b * (a + b))
  4. L28
    specialize mod_eq_symm 0
  5. L29
    apply mod_eq_symm
  6. L30
    exact hb
07Establish hequalL31–38

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

  1. L31
    have hequal : exists ftcn_left_opposite_equal ftcn_right_opposite_equal. (a * (a + b)) + (p) * ftcn_left_opposite_equal = (b * (a + b)) + (p) * ftcn_right_opposite_equal
  2. L32
    specialize mod_eq_trans p
  3. L33
    specialize mod_eq_trans (a * (a + b))
  4. L34
    specialize mod_eq_trans 0
  5. L35
    specialize mod_eq_trans (b * (a + b))
  6. L36
    apply mod_eq_trans
  7. L37
    exact ha
  8. L38
    exact hreverse
08Establish hleftL39–40

Establish this local claim before using it. It is not an additional assumption.

  1. L39
    have hleft : a * (a + b) = a * b + a * a
  2. L40
    simp [mul_add, add_comm]
09Establish hrightL41–50

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

  1. L41
    have hright : b * (a + b) = a * b + b * b
  2. L42
    simp [mul_add, mul_comm]
  3. L43
    rewrite hleft at hequal
  4. L44
    rewrite hright at hequal
  5. L45
    specialize mod_eq_add_cancel_left p
  6. L46
    specialize mod_eq_add_cancel_left (a * b)
  7. L47
    specialize mod_eq_add_cancel_left (a * a)
  8. L48
    specialize mod_eq_add_cancel_left (b * b)
  9. L49
    apply mod_eq_add_cancel_left
  10. L50
    exact hequal

Library-wide reading audit

Original exact command ledger · 50 lines
  1. 0001intro p
  2. 0002intro a
  3. 0003intro b
  4. 0004intro hsum
  5. 0005have ha : exists ftcn_left_opposite_left ftcn_right_opposite_left. (a * (a + b)) + (p) * ftcn_left_opposite_left = (a * 0) + (p) * ftcn_right_opposite_left
  6. 0006specialize mod_eq_mul_left p
  7. 0007specialize mod_eq_mul_left (a + b)
  8. 0008specialize mod_eq_mul_left 0
  9. 0009specialize mod_eq_mul_left a
  10. 0010apply mod_eq_mul_left
  11. 0011exact hsum
  12. 0012have ha_zero : a * 0 = 0
  13. 0013simp
  14. 0014rewrite ha_zero at ha
  15. 0015have hb : exists ftcn_left_opposite_right ftcn_right_opposite_right. (b * (a + b)) + (p) * ftcn_left_opposite_right = (b * 0) + (p) * ftcn_right_opposite_right
  16. 0016specialize mod_eq_mul_left p
  17. 0017specialize mod_eq_mul_left (a + b)
  18. 0018specialize mod_eq_mul_left 0
  19. 0019specialize mod_eq_mul_left b
  20. 0020apply mod_eq_mul_left
  21. 0021exact hsum
  22. 0022have hb_zero : b * 0 = 0
  23. 0023simp
  24. 0024rewrite hb_zero at hb
  25. 0025have hreverse : exists ftcn_left_opposite_reverse ftcn_right_opposite_reverse. (0) + (p) * ftcn_left_opposite_reverse = (b * (a + b)) + (p) * ftcn_right_opposite_reverse
  26. 0026specialize mod_eq_symm p
  27. 0027specialize mod_eq_symm (b * (a + b))
  28. 0028specialize mod_eq_symm 0
  29. 0029apply mod_eq_symm
  30. 0030exact hb
  31. 0031have hequal : exists ftcn_left_opposite_equal ftcn_right_opposite_equal. (a * (a + b)) + (p) * ftcn_left_opposite_equal = (b * (a + b)) + (p) * ftcn_right_opposite_equal
  32. 0032specialize mod_eq_trans p
  33. 0033specialize mod_eq_trans (a * (a + b))
  34. 0034specialize mod_eq_trans 0
  35. 0035specialize mod_eq_trans (b * (a + b))
  36. 0036apply mod_eq_trans
  37. 0037exact ha
  38. 0038exact hreverse
  39. 0039have hleft : a * (a + b) = a * b + a * a
  40. 0040simp [mul_add, add_comm]
  41. 0041have hright : b * (a + b) = a * b + b * b
  42. 0042simp [mul_add, mul_comm]
  43. 0043rewrite hleft at hequal
  44. 0044rewrite hright at hequal
  45. 0045specialize mod_eq_add_cancel_left p
  46. 0046specialize mod_eq_add_cancel_left (a * b)
  47. 0047specialize mod_eq_add_cancel_left (a * a)
  48. 0048specialize mod_eq_add_cancel_left (b * b)
  49. 0049apply mod_eq_add_cancel_left
  50. 0050exact hequal