BX0003

binary_canonical_residue_functional

Two canonical residues of the same natural and modulus are equal.

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

G102 was OPEN when this family was first admitted in Alpha v21. It is now CLOSED in Alpha v23: every arbitrary exponent has actual canonical beta-coded digits, a complete modular execution, and exact counted bound operations≤3*BitLen(e)+2.

Exact theorem in conservative defined notation

∀ m. ∀ n. ∀ r. ∀ s. CanonicalModularResidue(m,n,r) → CanonicalModularResidue(m,n,s) → r = s

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

Definition DAG

Actual proof prerequisites

mod_eq_symm · checked external prerequisitemod_eq_trans · checked external prerequisitemod_eq_bounded_unique · checked external prerequisite
Original expanded first-order statement
forall m n r s. (((exists ff_gap_binary_value. ff_gap_binary_value + S (r) = m) /\ (exists ff_left_binary_value_congruence ff_right_binary_value_congruence. (n) + m * ff_left_binary_value_congruence = (r) + m * ff_right_binary_value_congruence))) -> (((exists ff_gap_binary_other. ff_gap_binary_other + S (s) = m) /\ (exists ff_left_binary_other_congruence ff_right_binary_other_congruence. (n) + m * ff_left_binary_other_congruence = (s) + m * ff_right_binary_other_congruence))) -> r = s

Complete unchanged native tactic proof

All 29 lines are the exact independently kernel-checked original script.

Read the argument

Proof checkpoints

29 script commands · 5 reading checkpoints · 2 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–6

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

  1. L1
    intro m
  2. L2
    intro n
  3. L3
    intro r
  4. L4
    intro s
  5. L5
    intro hr
  6. L6
    intro hs
02Separate the logical casesL7–8

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

  1. L7
    cases hr
  2. L8
    cases hs
03Establish hreverseL9–14

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

  1. L9
    have hreverse : exists ff_left_binary_functional_reverse ff_right_binary_functional_reverse. (r) + m * ff_left_binary_functional_reverse = (n) + m * ff_right_binary_functional_reverse
  2. L10
    specialize mod_eq_symm m
  3. L11
    specialize mod_eq_symm n
  4. L12
    specialize mod_eq_symm r
  5. L13
    apply mod_eq_symm
  6. L14
    exact hr_right
04Establish hrelatedL15–24

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

  1. L15
    have hrelated : exists ff_left_binary_functional_related ff_right_binary_functional_related. (r) + m * ff_left_binary_functional_related = (s) + m * ff_right_binary_functional_related
  2. L16
    specialize mod_eq_trans m
  3. L17
    specialize mod_eq_trans r
  4. L18
    specialize mod_eq_trans n
  5. L19
    specialize mod_eq_trans s
  6. L20
    apply mod_eq_trans
  7. L21
    exact hreverse
  8. L22
    exact hs_right
  9. L23
    specialize mod_eq_bounded_unique m
  10. L24
    specialize mod_eq_bounded_unique r
05Use earlier factsL25–29

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

  1. L25
    specialize mod_eq_bounded_unique s
  2. L26
    apply mod_eq_bounded_unique
  3. L27
    exact hr_left
  4. L28
    exact hs_left
  5. L29
    exact hrelated

Library-wide reading audit

Original defined command ledger · 29 lines
  1. 0001intro m
  2. 0002intro n
  3. 0003intro r
  4. 0004intro s
  5. 0005intro hr
  6. 0006intro hs
  7. 0007cases hr
  8. 0008cases hs
  9. 0009have hreverse : exists ff_left_binary_functional_reverse ff_right_binary_functional_reverse. (r) + m * ff_left_binary_functional_reverse = (n) + m * ff_right_binary_functional_reverse
  10. 0010specialize mod_eq_symm m
  11. 0011specialize mod_eq_symm n
  12. 0012specialize mod_eq_symm r
  13. 0013apply mod_eq_symm
  14. 0014exact hr_right
  15. 0015have hrelated : exists ff_left_binary_functional_related ff_right_binary_functional_related. (r) + m * ff_left_binary_functional_related = (s) + m * ff_right_binary_functional_related
  16. 0016specialize mod_eq_trans m
  17. 0017specialize mod_eq_trans r
  18. 0018specialize mod_eq_trans n
  19. 0019specialize mod_eq_trans s
  20. 0020apply mod_eq_trans
  21. 0021exact hreverse
  22. 0022exact hs_right
  23. 0023specialize mod_eq_bounded_unique m
  24. 0024specialize mod_eq_bounded_unique r
  25. 0025specialize mod_eq_bounded_unique s
  26. 0026apply mod_eq_bounded_unique
  27. 0027exact hr_left
  28. 0028exact hs_left
  29. 0029exact hrelated