FS0033

four_square_descent_below_prime_multiplier_bounded

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

Bounded constructive multiplier induction preserves k<p at every strictly decreasing step and reaches an actual representation of the prime.

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 B p k. (exists gap. gap + k = B) -> ((~(p = 1) /\ forall frm_prime_left_fslb_prime frm_prime_right_fslb_prime. p = frm_prime_left_fslb_prime * frm_prime_right_fslb_prime -> frm_prime_left_fslb_prime = 1 \/ frm_prime_right_fslb_prime = 1)) -> ~(k = 0) -> (exists gap. gap + S k = p) -> (exists fsl_a_fslb_bounded_multiple fsl_b_fslb_bounded_multiple fsl_c_fslb_bounded_multiple fsl_d_fslb_bounded_multiple. (p * k) = fsl_a_fslb_bounded_multiple * fsl_a_fslb_bounded_multiple + fsl_b_fslb_bounded_multiple * fsl_b_fslb_bounded_multiple + fsl_c_fslb_bounded_multiple * fsl_c_fslb_bounded_multiple + fsl_d_fslb_bounded_multiple * fsl_d_fslb_bounded_multiple) -> (forall fslb_bounded_prime_bridge fslb_bounded_multiplier_bridge. ((~(fslb_bounded_prime_bridge = 1) /\ forall frm_prime_left_fslb_bounded_prime_bridge frm_prime_right_fslb_bounded_prime_bridge. fslb_bounded_prime_bridge = frm_prime_left_fslb_bounded_prime_bridge * frm_prime_right_fslb_bounded_prime_bridge -> frm_prime_left_fslb_bounded_prime_bridge = 1 \/ frm_prime_right_fslb_bounded_prime_bridge = 1)) -> ~(fslb_bounded_multiplier_bridge = 0) -> ~(fslb_bounded_multiplier_bridge = 1) -> (exists fslb_bounded_upper_gap_bridge. fslb_bounded_upper_gap_bridge + S fslb_bounded_multiplier_bridge = fslb_bounded_prime_bridge) -> (exists fsl_a_fslb_bounded_source_bridge fsl_b_fslb_bounded_source_bridge fsl_c_fslb_bounded_source_bridge fsl_d_fslb_bounded_source_bridge. (fslb_bounded_prime_bridge * fslb_bounded_multiplier_bridge) = fsl_a_fslb_bounded_source_bridge * fsl_a_fslb_bounded_source_bridge + fsl_b_fslb_bounded_source_bridge * fsl_b_fslb_bounded_source_bridge + fsl_c_fslb_bounded_source_bridge * fsl_c_fslb_bounded_source_bridge + fsl_d_fslb_bounded_source_bridge * fsl_d_fslb_bounded_source_bridge) -> exists fslb_bounded_smaller_bridge. (~(fslb_bounded_smaller_bridge = 0) /\ ((exists fslb_bounded_lower_gap_bridge. fslb_bounded_lower_gap_bridge + S fslb_bounded_smaller_bridge = fslb_bounded_multiplier_bridge) /\ (exists fsl_a_fslb_bounded_target_bridge fsl_b_fslb_bounded_target_bridge fsl_c_fslb_bounded_target_bridge fsl_d_fslb_bounded_target_bridge. (fslb_bounded_prime_bridge * fslb_bounded_smaller_bridge) = fsl_a_fslb_bounded_target_bridge * fsl_a_fslb_bounded_target_bridge + fsl_b_fslb_bounded_target_bridge * fsl_b_fslb_bounded_target_bridge + fsl_c_fslb_bounded_target_bridge * fsl_c_fslb_bounded_target_bridge + fsl_d_fslb_bounded_target_bridge * fsl_d_fslb_bounded_target_bridge)))) -> (exists fsl_a_fslb_prime_result fsl_b_fslb_prime_result fsl_c_fslb_prime_result fsl_d_fslb_prime_result. (p) = fsl_a_fslb_prime_result * fsl_a_fslb_prime_result + fsl_b_fslb_prime_result * fsl_b_fslb_prime_result + fsl_c_fslb_prime_result * fsl_c_fslb_prime_result + fsl_d_fslb_prime_result * fsl_d_fslb_prime_result)

Constructive proof overview

Generated structural guide

Bounded constructive multiplier induction preserves k<p at every strictly decreasing step and reaches an actual representation of the prime.

The unchanged tactic script uses 6 declared prerequisites and contains 70 exact native proof lines.

dependency-curried kernel-checked theorem body; Alpha enrollment and checked-use authority follow separately sealed release evidence; Stable membership remains unchanged

Historical empty-context replay experiment only; that experiment persisted no certificate and granted no release authority. Current checked use follows separately sealed, independently verified proof bundles; there is no Stable promotion.

Proof neighborhood

Direct dependencies

le_zero Stable theorem; checked-use authorized eq_decidable Stable theorem; checked-use authorized mul_one Stable theorem; checked-use authorized le_trans Stable theorem; checked-use authorized le_of_succ_le_succ Stable theorem; checked-use authorized lt_trans 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

70 script commands · 17 reading checkpoints · 4 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.

An induction bound turns strict descent into a finite argument

This lemma assumes a strict descent step; it does not prove that step. Its job is to iterate that hypothesis safely. Induction is on an upper bound B for the multiplier k, while the prime p and multiplier k remain arbitrary. The assumptions retain k not equal to zero, k less than p, and a four-square representation of p times k.

At bound zero, a nonzero multiplier is impossible. In the successor case, k equal to one already gives the desired representation of p. Otherwise the assumed descent step produces a nonzero smaller multiplier x and a representation of p times x. The remaining bounds put x within the induction hypothesis and keep x below p. This explains why those intermediate inequalities are needed.

Mathematical commentary bound to this exact script; it grants no proof authority.

01Fix variables and assumptionsL1–1

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

  1. L1
    intro B
02Induction on BL2–10

Induct on the bound B, not on a fixed multiplier. Keeping p and k universally quantified makes the hypothesis reusable at the smaller multiplier returned by descent.

  1. L2
    induction B
  2. L3
    intro p
  3. L4
    intro k
  4. L5
    intro hbound
  5. L6
    intro hprime
  6. L7
    intro hnonzero
  7. L8
    intro hbelow
  8. L9
    intro hrepresented
  9. L10
    intro hstep
03Separate the logical casesL11–11

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

  1. L11
    exfalso
04Use earlier factsL12–15

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

  1. L12
    apply hnonzero
  2. L13
    specialize le_zero k
  3. L14
    apply le_zero
  4. L15
    exact hbound
05Fix variables and assumptionsL16–23

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

  1. L16
    intro p
  2. L17
    intro k
  3. L18
    intro hbound
  4. L19
    intro hprime
  5. L20
    intro hnonzero
  6. L21
    intro hbelow
  7. L22
    intro hrepresented
  8. L23
    intro hstep
06Use earlier factsL24–25

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

  1. L24
    specialize eq_decidable k
  2. L25
    specialize eq_decidable 1
07Separate the logical casesL26–26

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

  1. L26
    cases eq_decidable
08Calculate and transport equalitiesL27–27

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

  1. L27
    rewrite eq_decidable_left at hrepresented
09Use earlier factsL28–28

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

  1. L28
    specialize mul_one p
10Calculate and transport equalitiesL29–29

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

  1. L29
    rewrite mul_one at hrepresented
11Use earlier factsL30–30

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

  1. L30
    exact hrepresented
12Establish hsmallerL31–39

Apply the assumed strict descent step to obtain a nonzero x smaller than k and a four-square representation of p times x. This is the promised output of hstep, not a guessed construction.

  1. L31
    have hsmaller : (exists r. (~(r = 0) /\ ((exists gap. gap + S r = k) /\ (exists fsl_a_fslb_bounded_smaller fsl_b_fslb_bounded_smaller fsl_c_fslb_bounded_smaller fsl_d_fslb_bounded_smaller. (p * r) = fsl_a_fslb_bounded_smaller * fsl_a_fslb_bounded_smaller + fsl_b_fslb_bounded_smaller * fsl_b_fslb_bounded_smaller + fsl_c_fslb_bounded_smaller * fsl_c_fslb_bounded_smaller + fsl_d_fslb_bounded_smaller * fsl_d_fslb_bounded_smaller))))
  2. L32
    specialize hstep p
  3. L33
    specialize hstep k
  4. L34
    apply hstep
  5. L35
    exact hprime
  6. L36
    exact hnonzero
  7. L37
    exact eq_decidable_right
  8. L38
    exact hbelow
  9. L39
    exact hrepresented
13Separate the logical casesL40–42

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

  1. L40
    cases hsmaller
  2. L41
    cases hsmaller_witness
  3. L42
    cases hsmaller_witness_right
14Establish hsuccessor_boundL43–49

Combine x + 1 at most k with k at most B + 1. This produces the successor inequality needed for the next cancellation step.

  1. L43
    have hsuccessor_bound : exists gap. gap + S x = S B
  2. L44
    specialize le_trans (S x)
  3. L45
    specialize le_trans k
  4. L46
    specialize le_trans (S B)
  5. L47
    apply le_trans
  6. L48
    exact hsmaller_witness_right_left
  7. L49
    exact hbound
15Establish hsmaller_boundL50–54

Cancel successors to obtain x at most B. This is exactly the bound required to invoke the induction hypothesis.

  1. L50
    have hsmaller_bound : exists gap. gap + x = B
  2. L51
    specialize le_of_succ_le_succ x
  3. L52
    specialize le_of_succ_le_succ B
  4. L53
    apply le_of_succ_le_succ
  5. L54
    exact hsuccessor_bound
16Establish hsmaller_belowL55–64

Transport x less than k and k less than p to x less than p. The induction hypothesis needs this invariant as well as the decreasing induction bound.

  1. L55
    have hsmaller_below : exists gap. gap + S x = p
  2. L56
    specialize lt_trans x
  3. L57
    specialize lt_trans k
  4. L58
    specialize lt_trans p
  5. L59
    apply lt_trans
  6. L60
    exact hsmaller_witness_right_left
  7. L61
    exact hbelow
  8. L62
    specialize IH p
  9. L63
    specialize IH x
  10. L64
    apply IH
17Use earlier factsL65–70

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

  1. L65
    exact hsmaller_bound
  2. L66
    exact hprime
  3. L67
    exact hsmaller_witness_left
  4. L68
    exact hsmaller_below
  5. L69
    exact hsmaller_witness_right_right
  6. L70
    exact hstep

Library-wide reading audit

Original exact command ledger · 70 lines
  1. 0001intro B
  2. 0002induction B
  3. 0003intro p
  4. 0004intro k
  5. 0005intro hbound
  6. 0006intro hprime
  7. 0007intro hnonzero
  8. 0008intro hbelow
  9. 0009intro hrepresented
  10. 0010intro hstep
  11. 0011exfalso
  12. 0012apply hnonzero
  13. 0013specialize le_zero k
  14. 0014apply le_zero
  15. 0015exact hbound
  16. 0016intro p
  17. 0017intro k
  18. 0018intro hbound
  19. 0019intro hprime
  20. 0020intro hnonzero
  21. 0021intro hbelow
  22. 0022intro hrepresented
  23. 0023intro hstep
  24. 0024specialize eq_decidable k
  25. 0025specialize eq_decidable 1
  26. 0026cases eq_decidable
  27. 0027rewrite eq_decidable_left at hrepresented
  28. 0028specialize mul_one p
  29. 0029rewrite mul_one at hrepresented
  30. 0030exact hrepresented
  31. 0031have hsmaller : (exists r. (~(r = 0) /\ ((exists gap. gap + S r = k) /\ (exists fsl_a_fslb_bounded_smaller fsl_b_fslb_bounded_smaller fsl_c_fslb_bounded_smaller fsl_d_fslb_bounded_smaller. (p * r) = fsl_a_fslb_bounded_smaller * fsl_a_fslb_bounded_smaller + fsl_b_fslb_bounded_smaller * fsl_b_fslb_bounded_smaller + fsl_c_fslb_bounded_smaller * fsl_c_fslb_bounded_smaller + fsl_d_fslb_bounded_smaller * fsl_d_fslb_bounded_smaller))))
  32. 0032specialize hstep p
  33. 0033specialize hstep k
  34. 0034apply hstep
  35. 0035exact hprime
  36. 0036exact hnonzero
  37. 0037exact eq_decidable_right
  38. 0038exact hbelow
  39. 0039exact hrepresented
  40. 0040cases hsmaller
  41. 0041cases hsmaller_witness
  42. 0042cases hsmaller_witness_right
  43. 0043have hsuccessor_bound : exists gap. gap + S x = S B
  44. 0044specialize le_trans (S x)
  45. 0045specialize le_trans k
  46. 0046specialize le_trans (S B)
  47. 0047apply le_trans
  48. 0048exact hsmaller_witness_right_left
  49. 0049exact hbound
  50. 0050have hsmaller_bound : exists gap. gap + x = B
  51. 0051specialize le_of_succ_le_succ x
  52. 0052specialize le_of_succ_le_succ B
  53. 0053apply le_of_succ_le_succ
  54. 0054exact hsuccessor_bound
  55. 0055have hsmaller_below : exists gap. gap + S x = p
  56. 0056specialize lt_trans x
  57. 0057specialize lt_trans k
  58. 0058specialize lt_trans p
  59. 0059apply lt_trans
  60. 0060exact hsmaller_witness_right_left
  61. 0061exact hbelow
  62. 0062specialize IH p
  63. 0063specialize IH x
  64. 0064apply IH
  65. 0065exact hsmaller_bound
  66. 0066exact hprime
  67. 0067exact hsmaller_witness_left
  68. 0068exact hsmaller_below
  69. 0069exact hsmaller_witness_right_right
  70. 0070exact hstep