CD0029

finite_modular_shifted_sum_congruence

Moving a common shift between two summands preserves their exact modular sum.

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

Sets are complete characteristic-bit codes with actual finite cardinality witnesses. The proof constructs translations and the sumset; no finite-choice oracle, supplied cardinality conclusion, or unproved polynomial-method premise is used.

Exact theorem in conservative defined notation

∀ p. ∀ a. ∀ b. ∀ x. ∀ y. ∀ t. ModEq(p,a + t,x)ModEq(p,y + t,b)ModEq(p,a + b,x + y)

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

Definition DAG

Actual proof prerequisites

mod_eq_add · checked external prerequisitemod_eq_refl · checked external prerequisitemod_eq_symm · checked external prerequisitemod_eq_trans · checked external prerequisiteadd_assoc · checked external prerequisiteadd_comm · checked external prerequisite
Original expanded first-order statement
forall p a b x y t. (exists fms_u_mod fms_v_mod. (a+t) + (p) * fms_u_mod = (x) + (p) * fms_v_mod) -> (exists fms_u_mod fms_v_mod. (y+t) + (p) * fms_u_mod = (b) + (p) * fms_v_mod) -> (exists fms_u_mod fms_v_mod. (a+b) + (p) * fms_u_mod = (x+y) + (p) * fms_v_mod)

Complete tactic proof in conservative notation

All 50 original proof lines are preserved. Only local proposition formulas are abbreviated; every abbreviation has an exact binder-safe expansion check. The linked exact edition contains the unchanged replay script.

Read the argument

Proof checkpoints

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

01Fix variables and assumptionsL1–8

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 x
  5. L5
    intro y
  6. L6
    intro t
  7. L7
    intro ha
  8. L8
    intro hb
02Use earlier factsL9–18

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

  1. L9
    specialize mod_eq_trans p
  2. L10
    specialize mod_eq_trans a+b
  3. L11
    specialize mod_eq_trans a+(y+t)
  4. L12
    specialize mod_eq_trans x+y
  5. L13
    apply mod_eq_trans
  6. L14
    specialize mod_eq_add p
  7. L15
    specialize mod_eq_add a
  8. L16
    specialize mod_eq_add a
  9. L17
    specialize mod_eq_add b
  10. L18
    specialize mod_eq_add y+t
03Use earlier factsL19–27

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

  1. L19
    apply mod_eq_add
  2. L20
    specialize mod_eq_refl p
  3. L21
    specialize mod_eq_refl a
  4. L22
    apply mod_eq_refl
  5. L23
    specialize mod_eq_symm p
  6. L24
    specialize mod_eq_symm y+t
  7. L25
    specialize mod_eq_symm b
  8. L26
    apply mod_eq_symm
  9. L27
    exact hb
04Establish heL28–37

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

  1. L28
    have he : a+(y+t)=(a+t)+y
  2. L29
    trans a+(t+y)
  3. L30
    congr
  4. L31
    refl
  5. L32
    specialize add_comm y
  6. L33
    specialize add_comm t
  7. L34
    apply add_comm
  8. L35
    symm
  9. L36
    specialize add_assoc a
  10. L37
    specialize add_assoc t
05Use earlier factsL38–39

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

  1. L38
    specialize add_assoc y
  2. L39
    apply add_assoc
06Calculate and transport equalitiesL40–40

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L40
    rewrite he
07Use earlier factsL41–50

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

  1. L41
    specialize mod_eq_add p
  2. L42
    specialize mod_eq_add a+t
  3. L43
    specialize mod_eq_add x
  4. L44
    specialize mod_eq_add y
  5. L45
    specialize mod_eq_add y
  6. L46
    apply mod_eq_add
  7. L47
    exact ha
  8. L48
    specialize mod_eq_refl p
  9. L49
    specialize mod_eq_refl y
  10. L50
    apply mod_eq_refl

Library-wide reading audit

Original defined command ledger · 50 lines
  1. 0001intro p
  2. 0002intro a
  3. 0003intro b
  4. 0004intro x
  5. 0005intro y
  6. 0006intro t
  7. 0007intro ha
  8. 0008intro hb
  9. 0009specialize mod_eq_trans p
  10. 0010specialize mod_eq_trans a+b
  11. 0011specialize mod_eq_trans a+(y+t)
  12. 0012specialize mod_eq_trans x+y
  13. 0013apply mod_eq_trans
  14. 0014specialize mod_eq_add p
  15. 0015specialize mod_eq_add a
  16. 0016specialize mod_eq_add a
  17. 0017specialize mod_eq_add b
  18. 0018specialize mod_eq_add y+t
  19. 0019apply mod_eq_add
  20. 0020specialize mod_eq_refl p
  21. 0021specialize mod_eq_refl a
  22. 0022apply mod_eq_refl
  23. 0023specialize mod_eq_symm p
  24. 0024specialize mod_eq_symm y+t
  25. 0025specialize mod_eq_symm b
  26. 0026apply mod_eq_symm
  27. 0027exact hb
  28. 0028have he : a+(y+t)=(a+t)+y
  29. 0029trans a+(t+y)
  30. 0030congr
  31. 0031refl
  32. 0032specialize add_comm y
  33. 0033specialize add_comm t
  34. 0034apply add_comm
  35. 0035symm
  36. 0036specialize add_assoc a
  37. 0037specialize add_assoc t
  38. 0038specialize add_assoc y
  39. 0039apply add_assoc
  40. 0040rewrite he
  41. 0041specialize mod_eq_add p
  42. 0042specialize mod_eq_add a+t
  43. 0043specialize mod_eq_add x
  44. 0044specialize mod_eq_add y
  45. 0045specialize mod_eq_add y
  46. 0046apply mod_eq_add
  47. 0047exact ha
  48. 0048specialize mod_eq_refl p
  49. 0049specialize mod_eq_refl y
  50. 0050apply mod_eq_refl