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
∀ B. ∀ p. ∀ k. Le(k,B) → Prime(p) → ¬k = 0 → Lt(k,p) → (∃ x. ∃ y. ∃ z. ∃ n. p · k = x · x + y · y + z · z + n · n) → (∀ x. ∀ y. Prime(x) → ¬y = 0 → ¬y = 1 → Lt(y,x) → (∃ z. ∃ n. ∃ m. ∃ i. x · y = z · z + n · n + m · m + i · i) → ∃ z. ¬z = 0 ∧ (Lt(z,y) ∧ (∃ n. ∃ m. ∃ i. ∃ j. x · z = n · n + m · m + i · i + j · j))) → ∃ x. ∃ y. ∃ z. ∃ n. p = x · x + y · y + z · z + n · nEvery 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 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)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
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.
01Fix variables and assumptionsL1–1
Work with arbitrary variables or the premises of the current implication.
- L1
intro B
02Induction on BL2–10
03Separate the logical casesL11–11
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L11
exfalso
04Use earlier factsL12–15
05Fix variables and assumptionsL16–23
06Use earlier factsL24–25
07Separate the logical casesL26–26
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- 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.
- L27
rewrite eq_decidable_left at hrepresented
09Use earlier factsL28–28
Instantiate or apply named facts and discharge the corresponding proof obligations.
- 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.
- L29
rewrite mul_one at hrepresented
11Use earlier factsL30–30
Instantiate or apply named facts and discharge the corresponding proof obligations.
- 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.
- L31
have hsmaller : ∃ x. ¬x = 0 ∧ (Lt(x,k) ∧ (∃ y. ∃ z. ∃ n. ∃ m. p · x = y · y + z · z + n · n + m · m))Definitions: Lt(x,k)Original native command in the exact edition - L32
specialize hstep p - L33
specialize hstep k - L34
apply hstep - L35
exact hprime - L36
exact hnonzero - L37
exact eq_decidable_right - L38
exact hbelow - L39
exact hrepresented
13Separate the logical casesL40–42
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.
15Establish hsmaller_boundL50–54
Cancel successors to obtain x at most B. This is exactly the bound required to invoke the induction hypothesis.
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.
Original defined command ledger · 70 lines
- 0001
intro B - 0002
induction B - 0003
intro p - 0004
intro k - 0005
intro hbound - 0006
intro hprime - 0007
intro hnonzero - 0008
intro hbelow - 0009
intro hrepresented - 0010
intro hstep - 0011
exfalso - 0012
apply hnonzero - 0013
specialize le_zero k - 0014
apply le_zero - 0015
exact hbound - 0016
intro p - 0017
intro k - 0018
intro hbound - 0019
intro hprime - 0020
intro hnonzero - 0021
intro hbelow - 0022
intro hrepresented - 0023
intro hstep - 0024
specialize eq_decidable k - 0025
specialize eq_decidable 1 - 0026
cases eq_decidable - 0027
rewrite eq_decidable_left at hrepresented - 0028
specialize mul_one p - 0029
rewrite mul_one at hrepresented - 0030
exact hrepresented - 0031
have hsmaller : ∃ x. ¬x = 0 ∧ (Lt(x,k) ∧ (∃ y. ∃ z. ∃ n. ∃ m. p · x = y · y + z · z + n · n + m · m))Exact native replay line
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)))) - 0032
specialize hstep p - 0033
specialize hstep k - 0034
apply hstep - 0035
exact hprime - 0036
exact hnonzero - 0037
exact eq_decidable_right - 0038
exact hbelow - 0039
exact hrepresented - 0040
cases hsmaller - 0041
cases hsmaller_witness - 0042
cases hsmaller_witness_right - 0043
have hsuccessor_bound : Lt(x,S B)Exact native replay line
have hsuccessor_bound : exists gap. gap + S x = S B - 0044
specialize le_trans (S x) - 0045
specialize le_trans k - 0046
specialize le_trans (S B) - 0047
apply le_trans - 0048
exact hsmaller_witness_right_left - 0049
exact hbound - 0050
have hsmaller_bound : Le(x,B)Exact native replay line
have hsmaller_bound : exists gap. gap + x = B - 0051
specialize le_of_succ_le_succ x - 0052
specialize le_of_succ_le_succ B - 0053
apply le_of_succ_le_succ - 0054
exact hsuccessor_bound - 0055
have hsmaller_below : Lt(x,p)Exact native replay line
have hsmaller_below : exists gap. gap + S x = p - 0056
specialize lt_trans x - 0057
specialize lt_trans k - 0058
specialize lt_trans p - 0059
apply lt_trans - 0060
exact hsmaller_witness_right_left - 0061
exact hbelow - 0062
specialize IH p - 0063
specialize IH x - 0064
apply IH - 0065
exact hsmaller_bound - 0066
exact hprime - 0067
exact hsmaller_witness_left - 0068
exact hsmaller_below - 0069
exact hsmaller_witness_right_right - 0070
exact hstep