CD0026

finite_modular_inverse_shift

Opposite additive shifts invert one another in balanced modular arithmetic by explicit witnesses.

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. ∀ t. ∀ d. ∀ a. ∀ b. t + d = p → ModEq(p,a + t,b)ModEq(p,b + d,a)

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

Definition DAG

Actual proof prerequisites

add_assoc · checked external prerequisiteadd_comm · checked external prerequisite
Original expanded first-order statement
forall p t d a b. t+d=p -> (exists fms_u_mod fms_v_mod. (a+t) + (p) * fms_u_mod = (b) + (p) * fms_v_mod) -> (exists fms_u_mod fms_v_mod. (b+d) + (p) * fms_u_mod = (a) + (p) * fms_v_mod)

Complete tactic proof in conservative notation

All 22 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

22 script commands · 6 reading checkpoints · 0 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–7

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

  1. L1
    intro p
  2. L2
    intro t
  3. L3
    intro d
  4. L4
    intro a
  5. L5
    intro b
  6. L6
    intro htd
  7. L7
    intro hmod
02Separate the logical casesL8–9

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

  1. L8
    cases hmod
  2. L9
    cases hmod_witness
03Construct an explicit witnessL10–11

Supply the displayed value, then prove that it has the required property.

  1. L10
    exists x1
  2. L11
    exists S x
04Calculate and transport equalitiesL12–16

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

  1. L12
    trans (b+p*x1)+d
  2. L13
    simp [add_assoc, add_comm]
  3. L14
    trans ((a+t)+p*x)+d
  4. L15
    congr
  5. L16
    symm
05Use earlier factsL17–17

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

  1. L17
    exact hmod_witness_witness
06Calculate and transport equalitiesL18–22

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

  1. L18
    refl
  2. L19
    trans (a+(t+d))+p*x
  3. L20
    simp [add_assoc, add_comm]
  4. L21
    rewrite htd
  5. L22
    simp [add_assoc, add_comm]

Library-wide reading audit

Original defined command ledger · 22 lines
  1. 0001intro p
  2. 0002intro t
  3. 0003intro d
  4. 0004intro a
  5. 0005intro b
  6. 0006intro htd
  7. 0007intro hmod
  8. 0008cases hmod
  9. 0009cases hmod_witness
  10. 0010exists x1
  11. 0011exists S x
  12. 0012trans (b+p*x1)+d
  13. 0013simp [add_assoc, add_comm]
  14. 0014trans ((a+t)+p*x)+d
  15. 0015congr
  16. 0016symm
  17. 0017exact hmod_witness_witness
  18. 0018refl
  19. 0019trans (a+(t+d))+p*x
  20. 0020simp [add_assoc, add_comm]
  21. 0021rewrite htd
  22. 0022simp [add_assoc, add_comm]