FS001M · theorem body

four_square_descent_centered_signed_remainder_exists

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

Every natural has a constructively chosen signed residue m with 2m≤k and either n=kq+m or n+m=kq.

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.

Statement with defined notation

∀ k. ∀ n. ¬k = 0 → ∃ x. Le(x + x,k) ∧ ((∃ y. n = k · y + x) ∨ Dvd(k,n + x))

Every purple notation token opens its conservative definition. This reading surface never changes the unchanged intuitionistic kernel or confers checked-use authority.

Definitions used by this theorem

In the theorem statement

In local proof propositions

Exact expanded first-order statement
forall k n. ~(k = 0) -> exists m. (((exists fsd_center_bound_single. fsd_center_bound_single + (m + m) = k) /\ ((exists fsd_center_lower_single. n = k * fsd_center_lower_single + m) \/ (exists fsd_center_upper_single. n + m = k * fsd_center_upper_single))))

Proof neighborhood

Direct theorem prerequisites

Direct theorem dependents

Definition-aware tactic body

Only propositions whose conservative expansion has been checked for exact first-order equivalence are compacted. Every changed line retains its immutable exact replay command.

Read the argument

Proof checkpoints

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

Named ingredients (2)
01Fix variables and assumptionsL1–3

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

  1. L1
    intro k
  2. L2
    intro n
  3. L3
    intro hnonzero
02Establish hpartsL4–8

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

  1. L4
    have hparts : ∃ q. ∃ r. ∃ s. n = k · q + r ∧ (r + s = k ∧ (Le(r,s) ∨ Le(s,r)))Definitions: Le(r,s)Le(s,r)Original native command in the exact edition
  2. L5
    specialize four_square_descent_remainder_complement_exists k
  3. L6
    specialize four_square_descent_remainder_complement_exists n
  4. L7
    apply four_square_descent_remainder_complement_exists
  5. L8
    exact hnonzero
03Separate the logical casesL9–15

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

  1. L9
    cases hparts
  2. L10
    cases hparts_witness
  3. L11
    cases hparts_witness_witness
  4. L12
    cases hparts_witness_witness_witness
  5. L13
    cases hparts_witness_witness_witness_right
  6. L14
    cases hparts_witness_witness_witness_right_right
  7. L15
    cases hparts_witness_witness_witness_right_right_left
04Construct an explicit witnessL16–16

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

  1. L16
    exists x1
05Separate the logical casesL17–17

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

  1. L17
    split
06Construct an explicit witnessL18–18

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

  1. L18
    exists x3
07Calculate and transport equalitiesL19–19

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

  1. L19
    trans x1 + (x3 + x1)
08Use earlier factsL20–20

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

  1. L20
    apply four_square_add_swap_right_tail
09Calculate and transport equalitiesL21–23

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

  1. L21
    trans x1 + x2
  2. L22
    congr
  3. L23
    refl
10Use earlier factsL24–25

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

  1. L24
    exact hparts_witness_witness_witness_right_right_left_witness
  2. L25
    exact hparts_witness_witness_witness_right_left
11Separate the logical casesL26–26

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

  1. L26
    left
12Construct an explicit witnessL27–27

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

  1. L27
    exists x
13Use earlier factsL28–28

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

  1. L28
    exact hparts_witness_witness_witness_left
14Separate the logical casesL29–29

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

  1. L29
    cases hparts_witness_witness_witness_right_right_right
15Construct an explicit witnessL30–30

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

  1. L30
    exists x2
16Separate the logical casesL31–31

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

  1. L31
    split
17Construct an explicit witnessL32–32

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

  1. L32
    exists x3
18Calculate and transport equalitiesL33–34

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

  1. L33
    trans (x3 + x2) + x2
  2. L34
    symm
19Use earlier factsL35–35

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

  1. L35
    apply add_assoc
20Calculate and transport equalitiesL36–37

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

  1. L36
    trans x1 + x2
  2. L37
    congr
21Use earlier factsL38–38

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

  1. L38
    exact hparts_witness_witness_witness_right_right_right_witness
22Calculate and transport equalitiesL39–39

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

  1. L39
    refl
23Use earlier factsL40–40

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

  1. L40
    exact hparts_witness_witness_witness_right_left
24Separate the logical casesL41–41

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

  1. L41
    right
25Construct an explicit witnessL42–42

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

  1. L42
    exists S x
26Calculate and transport equalitiesL43–44

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

  1. L43
    trans (k * x + x1) + x2
  2. L44
    congr
27Use earlier factsL45–45

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

  1. L45
    exact hparts_witness_witness_witness_left
28Calculate and transport equalitiesL46–47

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

  1. L46
    refl
  2. L47
    trans k * x + (x1 + x2)
29Use earlier factsL48–48

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

  1. L48
    apply add_assoc
30Calculate and transport equalitiesL49–51

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

  1. L49
    trans k * x + k
  2. L50
    congr
  3. L51
    refl
31Use earlier factsL52–52

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

  1. L52
    exact hparts_witness_witness_witness_right_left
32Calculate and transport equalitiesL53–53

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

  1. L53
    symm
33Use earlier factsL54–54

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

  1. L54
    apply PA6

Library-wide reading audit

Original defined command ledger · 54 lines
  1. 0001intro k
  2. 0002intro n
  3. 0003intro hnonzero
  4. 0004have hparts : ∃ q. ∃ r. ∃ s. n = k · q + r ∧ (r + s = k ∧ (Le(r,s)Le(s,r)))
    Exact native replay linehave hparts : exists q r s. ((n = k * q + r) /\ ((r + s = k) /\ ((exists t. t + r = s) \/ (exists t. t + s = r))))
  5. 0005specialize four_square_descent_remainder_complement_exists k
  6. 0006specialize four_square_descent_remainder_complement_exists n
  7. 0007apply four_square_descent_remainder_complement_exists
  8. 0008exact hnonzero
  9. 0009cases hparts
  10. 0010cases hparts_witness
  11. 0011cases hparts_witness_witness
  12. 0012cases hparts_witness_witness_witness
  13. 0013cases hparts_witness_witness_witness_right
  14. 0014cases hparts_witness_witness_witness_right_right
  15. 0015cases hparts_witness_witness_witness_right_right_left
  16. 0016exists x1
  17. 0017split
  18. 0018exists x3
  19. 0019trans x1 + (x3 + x1)
  20. 0020apply four_square_add_swap_right_tail
  21. 0021trans x1 + x2
  22. 0022congr
  23. 0023refl
  24. 0024exact hparts_witness_witness_witness_right_right_left_witness
  25. 0025exact hparts_witness_witness_witness_right_left
  26. 0026left
  27. 0027exists x
  28. 0028exact hparts_witness_witness_witness_left
  29. 0029cases hparts_witness_witness_witness_right_right_right
  30. 0030exists x2
  31. 0031split
  32. 0032exists x3
  33. 0033trans (x3 + x2) + x2
  34. 0034symm
  35. 0035apply add_assoc
  36. 0036trans x1 + x2
  37. 0037congr
  38. 0038exact hparts_witness_witness_witness_right_right_right_witness
  39. 0039refl
  40. 0040exact hparts_witness_witness_witness_right_left
  41. 0041right
  42. 0042exists S x
  43. 0043trans (k * x + x1) + x2
  44. 0044congr
  45. 0045exact hparts_witness_witness_witness_left
  46. 0046refl
  47. 0047trans k * x + (x1 + x2)
  48. 0048apply add_assoc
  49. 0049trans k * x + k
  50. 0050congr
  51. 0051refl
  52. 0052exact hparts_witness_witness_witness_right_left
  53. 0053symm
  54. 0054apply PA6