CD0024

finite_modular_residue_exists

Every natural has an actual canonical balanced residue at every nonzero modulus.

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. ¬p = 0 → ∃ x. Lt(x,p)ModEq(p,a,x)

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

Definition DAG

Actual proof prerequisites

division_remainder_exists · checked external prerequisiteremainder_decomposition_to_mod_eq · checked external prerequisitemul_comm · checked external prerequisite
Original expanded first-order statement
forall p a. ~(p=0) -> exists r. (exists fms_gap_lt. fms_gap_lt + S (r) = (p)) /\ (exists fms_u_mod fms_v_mod. (a) + (p) * fms_u_mod = (r) + (p) * fms_v_mod)

Complete tactic proof in conservative notation

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

26 script commands · 11 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–3

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

  1. L1
    intro p
  2. L2
    intro a
  3. L3
    intro hp
02Establish hdL4–8

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder exists.

  1. L4
    have hd : ∃ q. ∃ r. a = p · q + r ∧ Lt(r,p)Definitions: Lt(r,p)Original native command in the exact edition
  2. L5
    specialize division_remainder_exists p
  3. L6
    specialize division_remainder_exists a
  4. L7
    apply division_remainder_exists
  5. L8
    exact hp
03Separate the logical casesL9–11

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

  1. L9
    cases hd
  2. L10
    cases hd_witness
  3. L11
    cases hd_witness_witness
04Construct an explicit witnessL12–12

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

  1. L12
    exists x1
05Separate the logical casesL13–13

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

  1. L13
    split
06Use earlier factsL14–19

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

  1. L14
    exact hd_witness_witness_right
  2. L15
    specialize remainder_decomposition_to_mod_eq p
  3. L16
    specialize remainder_decomposition_to_mod_eq a
  4. L17
    specialize remainder_decomposition_to_mod_eq x
  5. L18
    specialize remainder_decomposition_to_mod_eq x1
  6. L19
    apply remainder_decomposition_to_mod_eq
07Calculate and transport equalitiesL20–20

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

  1. L20
    trans p*x+x1
08Use earlier factsL21–21

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

  1. L21
    exact hd_witness_witness_left
09Calculate and transport equalitiesL22–22

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

  1. L22
    congr
10Use earlier factsL23–25

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

  1. L23
    specialize mul_comm p
  2. L24
    specialize mul_comm x
  3. L25
    apply mul_comm
11Calculate and transport equalitiesL26–26

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

  1. L26
    refl

Library-wide reading audit

Original defined command ledger · 26 lines
  1. 0001intro p
  2. 0002intro a
  3. 0003intro hp
  4. 0004have hd : ∃ q. ∃ r. a = p · q + r ∧ Lt(r,p)
  5. 0005specialize division_remainder_exists p
  6. 0006specialize division_remainder_exists a
  7. 0007apply division_remainder_exists
  8. 0008exact hp
  9. 0009cases hd
  10. 0010cases hd_witness
  11. 0011cases hd_witness_witness
  12. 0012exists x1
  13. 0013split
  14. 0014exact hd_witness_witness_right
  15. 0015specialize remainder_decomposition_to_mod_eq p
  16. 0016specialize remainder_decomposition_to_mod_eq a
  17. 0017specialize remainder_decomposition_to_mod_eq x
  18. 0018specialize remainder_decomposition_to_mod_eq x1
  19. 0019apply remainder_decomposition_to_mod_eq
  20. 0020trans p*x+x1
  21. 0021exact hd_witness_witness_left
  22. 0022congr
  23. 0023specialize mul_comm p
  24. 0024specialize mul_comm x
  25. 0025apply mul_comm
  26. 0026refl