CD0024

finite_modular_residue_exists

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

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

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. ~(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)

Constructive proof overview

Generated structural guide

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

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

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

Proof neighborhood

Direct dependencies

division_remainder_exists Stable theorem; checked-use authorized remainder_decomposition_to_mod_eq Stable theorem; checked-use authorized mul_comm Stable 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

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.

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 : exists q r. a=p*q+r /\ (exists fms_gap_lt. fms_gap_lt + S (r) = (p))
  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 exact command ledger · 26 lines
  1. 0001intro p
  2. 0002intro a
  3. 0003intro hp
  4. 0004have hd : exists q r. a=p*q+r /\ (exists fms_gap_lt. fms_gap_lt + S (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