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 n h. p = S n -> ((~(p = 1) /\ forall frm_prime_left_qsm_prime frm_prime_right_qsm_prime. p = frm_prime_left_qsm_prime * frm_prime_right_qsm_prime -> frm_prime_left_qsm_prime = 1 \/ frm_prime_right_qsm_prime = 1)) -> n = h + h -> ((((((exists qr_x_qsm_predecessor. exists qr_u_qsm_predecessor qr_v_qsm_predecessor. qr_x_qsm_predecessor * qr_x_qsm_predecessor + p * qr_u_qsm_predecessor = n + p * qr_v_qsm_predecessor) -> (exists qsm_even_half. h = 2 * qsm_even_half)) /\ ((exists qsm_even_half. h = 2 * qsm_even_half) -> (exists qr_x_qsm_predecessor. exists qr_u_qsm_predecessor qr_v_qsm_predecessor. qr_x_qsm_predecessor * qr_x_qsm_predecessor + p * qr_u_qsm_predecessor = n + p * qr_v_qsm_predecessor)))) /\ ((((~(exists qr_x_qsm_predecessor. exists qr_u_qsm_predecessor qr_v_qsm_predecessor. qr_x_qsm_predecessor * qr_x_qsm_predecessor + p * qr_u_qsm_predecessor = n + p * qr_v_qsm_predecessor)) -> (exists qsm_odd_half. h = 2 * qsm_odd_half + 1)) /\ ((exists qsm_odd_half. h = 2 * qsm_odd_half + 1) -> (~(exists qr_x_qsm_predecessor. exists qr_u_qsm_predecessor qr_v_qsm_predecessor. qr_x_qsm_predecessor * qr_x_qsm_predecessor + p * qr_u_qsm_predecessor = n + p * qr_v_qsm_predecessor)))))))Constructive proof overview
Generated structural guide
For an odd prime, its predecessor is a quadratic residue exactly when the prime's half is even, and a nonresidue exactly when that half is odd.
The unchanged tactic script uses 6 declared prerequisites and contains 91 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
Proof neighborhood
Direct dependencies
SL0001 prime_predecessor_nonzero pow_exists Stable theorem; checked-use authorized SL0000 bounded_euler_criterion_complete pow_predecessor_parity_mod Stable theorem; checked-use authorized parity_cases Stable theorem; checked-use authorized zero_add Stable theorem; checked-use authorizedDirect 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
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.
Named ingredients (2)
01Fix variables and assumptionsL1–6
02Establish hnonzeroL7–14
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime predecessor nonzero.
03Establish hboundL15–15
Establish this local claim before using it. It is not an additional assumption.
- L15
have hbound : exists wpo_gap_qsm_predecessor_bound. wpo_gap_qsm_predecessor_bound + S (n) = p
04Construct an explicit witnessL16–16
Supply the displayed value, then prove that it has the required property.
- L16
exists 0
05Calculate and transport equalitiesL17–17
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L17
trans S n
06Use earlier factsL18–18
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L18
apply zero_add
07Calculate and transport equalitiesL19–19
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L19
symm
08Use earlier factsL20–20
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L20
exact hpredecessor
09Establish hpowerL21–24
10Separate the logical casesL25–25
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L25
cases hpower
11Establish heulerL26–35
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply bounded euler criterion complete.
- L26
- L27
specialize bounded_euler_criterion_complete p - L28
specialize bounded_euler_criterion_complete n - L29
specialize bounded_euler_criterion_complete n - L30
specialize bounded_euler_criterion_complete h - L31
specialize bounded_euler_criterion_complete x - L32
apply bounded_euler_criterion_complete - L33
exact hpredecessor - L34
exact hprime - L35
exact hnonzero
12Use earlier factsL36–38
13Separate the logical casesL39–41
14Establish hsignL42–49
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply pow predecessor parity mod.
- L42
have hsign : (((exists qsm_even_half. h = 2 * qsm_even_half) -> (exists wpp_mod_left_qsm_mod_one wpp_mod_right_qsm_mod_one. (x) + p * wpp_mod_left_qsm_mod_one = (1) + p * wpp_mod_right_qsm_mod_one)) /\ ((exists qsm_odd_half. h = 2 * qsm_odd_half + 1) -> (exists wpp_mod_left_qsm_mod_predecessor wpp_mod_right_qsm_mod_predecessor. (x) + p * wpp_mod_left_qsm_mod_predecessor = (n) + p * wpp_mod_right_qsm_mod_predecessor))) - L43
specialize pow_predecessor_parity_mod p - L44
specialize pow_predecessor_parity_mod n - L45
specialize pow_predecessor_parity_mod h - L46
specialize pow_predecessor_parity_mod x - L47
apply pow_predecessor_parity_mod - L48
exact hpredecessor - L49
exact hpower_witness
15Separate the logical casesL50–52
16Fix variables and assumptionsL53–53
Work with arbitrary variables or the premises of the current implication.
- L53
intro hresidue
17Use earlier factsL54–54
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L54
specialize parity_cases h
18Separate the logical casesL55–56
19Construct an explicit witnessL57–57
Supply the displayed value, then prove that it has the required property.
- L57
exists x1
20Use earlier factsL58–58
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L58
exact parity_cases_witness_left
21Separate the logical casesL59–59
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L59
exfalso
22Establish hnotresidueL60–63
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply heuler right right.
23Construct an explicit witnessL64–64
Supply the displayed value, then prove that it has the required property.
- L64
exists x1
24Use earlier factsL65–68
25Fix variables and assumptionsL69–69
Work with arbitrary variables or the premises of the current implication.
- L69
intro heven
26Use earlier factsL70–72
27Separate the logical casesL73–73
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L73
split
28Fix variables and assumptionsL74–74
Work with arbitrary variables or the premises of the current implication.
- L74
intro hnotresidue
29Use earlier factsL75–75
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L75
specialize parity_cases h
30Separate the logical casesL76–78
31Use earlier factsL79–81
32Construct an explicit witnessL82–82
Supply the displayed value, then prove that it has the required property.
- L82
exists x1
33Use earlier factsL83–83
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L83
exact parity_cases_witness_left
34Construct an explicit witnessL84–84
Supply the displayed value, then prove that it has the required property.
- L84
exists x1
35Use earlier factsL85–85
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L85
exact parity_cases_witness_right
36Fix variables and assumptionsL86–87
Original exact command ledger · 91 lines
- 0001
intro p - 0002
intro n - 0003
intro h - 0004
intro hpredecessor - 0005
intro hprime - 0006
intro hdouble - 0007
have hnonzero : ~(n = 0) - 0008
intro hzero - 0009
specialize prime_predecessor_nonzero p - 0010
specialize prime_predecessor_nonzero n - 0011
apply prime_predecessor_nonzero - 0012
exact hpredecessor - 0013
exact hprime - 0014
exact hzero - 0015
have hbound : exists wpo_gap_qsm_predecessor_bound. wpo_gap_qsm_predecessor_bound + S (n) = p - 0016
exists 0 - 0017
trans S n - 0018
apply zero_add - 0019
symm - 0020
exact hpredecessor - 0021
have hpower : exists A. (exists ff_b_qsm_exists_power ff_c_qsm_exists_power. ((forall ff_i_qsm_exists_power_repeat. (exists ff_lt_qsm_exists_power_repeat_bound. ff_lt_qsm_exists_power_repeat_bound + S ff_i_qsm_exists_power_repeat = h) -> (((exists ff_h_qsm_exists_power_repeat_decoded. ff_h_qsm_exists_power_repeat_decoded + S (n) = S ((S (ff_i_qsm_exists_power_repeat)) * ff_c_qsm_exists_power)) /\ exists ff_q_qsm_exists_power_repeat_decoded. ff_b_qsm_exists_power = ff_q_qsm_exists_power_repeat_decoded * S ((S (ff_i_qsm_exists_power_repeat)) * ff_c_qsm_exists_power) + (n)))) /\ (exists ff_u_qsm_exists_power_product ff_v_qsm_exists_power_product. ((((exists ff_h_qsm_exists_power_product_start. ff_h_qsm_exists_power_product_start + S (1) = S ((S (0)) * ff_v_qsm_exists_power_product)) /\ exists ff_q_qsm_exists_power_product_start. ff_u_qsm_exists_power_product = ff_q_qsm_exists_power_product_start * S ((S (0)) * ff_v_qsm_exists_power_product) + (1))) /\ ((((exists ff_h_qsm_exists_power_product_terminal. ff_h_qsm_exists_power_product_terminal + S (A) = S ((S (h)) * ff_v_qsm_exists_power_product)) /\ exists ff_q_qsm_exists_power_product_terminal. ff_u_qsm_exists_power_product = ff_q_qsm_exists_power_product_terminal * S ((S (h)) * ff_v_qsm_exists_power_product) + (A))) /\ forall ff_i_qsm_exists_power_product. (exists ff_lt_qsm_exists_power_product_bound. ff_lt_qsm_exists_power_product_bound + S ff_i_qsm_exists_power_product = h) -> exists ff_p_qsm_exists_power_product ff_r_qsm_exists_power_product ff_s_qsm_exists_power_product. ((((exists ff_h_qsm_exists_power_product_factor. ff_h_qsm_exists_power_product_factor + S (ff_p_qsm_exists_power_product) = S ((S (ff_i_qsm_exists_power_product)) * ff_c_qsm_exists_power)) /\ exists ff_q_qsm_exists_power_product_factor. ff_b_qsm_exists_power = ff_q_qsm_exists_power_product_factor * S ((S (ff_i_qsm_exists_power_product)) * ff_c_qsm_exists_power) + (ff_p_qsm_exists_power_product))) /\ ((((exists ff_h_qsm_exists_power_product_partial. ff_h_qsm_exists_power_product_partial + S (ff_r_qsm_exists_power_product) = S ((S (ff_i_qsm_exists_power_product)) * ff_v_qsm_exists_power_product)) /\ exists ff_q_qsm_exists_power_product_partial. ff_u_qsm_exists_power_product = ff_q_qsm_exists_power_product_partial * S ((S (ff_i_qsm_exists_power_product)) * ff_v_qsm_exists_power_product) + (ff_r_qsm_exists_power_product))) /\ ((((exists ff_h_qsm_exists_power_product_successor. ff_h_qsm_exists_power_product_successor + S (ff_s_qsm_exists_power_product) = S ((S (S ff_i_qsm_exists_power_product)) * ff_v_qsm_exists_power_product)) /\ exists ff_q_qsm_exists_power_product_successor. ff_u_qsm_exists_power_product = ff_q_qsm_exists_power_product_successor * S ((S (S ff_i_qsm_exists_power_product)) * ff_v_qsm_exists_power_product) + (ff_s_qsm_exists_power_product))) /\ ff_s_qsm_exists_power_product = ff_r_qsm_exists_power_product * ff_p_qsm_exists_power_product)))))))) - 0022
specialize pow_exists n - 0023
specialize pow_exists h - 0024
exact pow_exists - 0025
cases hpower - 0026
have heuler : (((((exists qr_x_qsm_predecessor. exists qr_u_qsm_predecessor qr_v_qsm_predecessor. qr_x_qsm_predecessor * qr_x_qsm_predecessor + p * qr_u_qsm_predecessor = n + p * qr_v_qsm_predecessor) -> (exists wpp_mod_left_qsm_mod_one wpp_mod_right_qsm_mod_one. (x) + p * wpp_mod_left_qsm_mod_one = (1) + p * wpp_mod_right_qsm_mod_one)) /\ ((exists wpp_mod_left_qsm_mod_one wpp_mod_right_qsm_mod_one. (x) + p * wpp_mod_left_qsm_mod_one = (1) + p * wpp_mod_right_qsm_mod_one) -> (exists qr_x_qsm_predecessor. exists qr_u_qsm_predecessor qr_v_qsm_predecessor. qr_x_qsm_predecessor * qr_x_qsm_predecessor + p * qr_u_qsm_predecessor = n + p * qr_v_qsm_predecessor)))) /\ ((((~(exists qr_x_qsm_predecessor. exists qr_u_qsm_predecessor qr_v_qsm_predecessor. qr_x_qsm_predecessor * qr_x_qsm_predecessor + p * qr_u_qsm_predecessor = n + p * qr_v_qsm_predecessor)) -> (exists wpp_mod_left_qsm_mod_predecessor wpp_mod_right_qsm_mod_predecessor. (x) + p * wpp_mod_left_qsm_mod_predecessor = (n) + p * wpp_mod_right_qsm_mod_predecessor)) /\ ((exists wpp_mod_left_qsm_mod_predecessor wpp_mod_right_qsm_mod_predecessor. (x) + p * wpp_mod_left_qsm_mod_predecessor = (n) + p * wpp_mod_right_qsm_mod_predecessor) -> (~(exists qr_x_qsm_predecessor. exists qr_u_qsm_predecessor qr_v_qsm_predecessor. qr_x_qsm_predecessor * qr_x_qsm_predecessor + p * qr_u_qsm_predecessor = n + p * qr_v_qsm_predecessor)))))) - 0027
specialize bounded_euler_criterion_complete p - 0028
specialize bounded_euler_criterion_complete n - 0029
specialize bounded_euler_criterion_complete n - 0030
specialize bounded_euler_criterion_complete h - 0031
specialize bounded_euler_criterion_complete x - 0032
apply bounded_euler_criterion_complete - 0033
exact hpredecessor - 0034
exact hprime - 0035
exact hnonzero - 0036
exact hbound - 0037
exact hdouble - 0038
exact hpower_witness - 0039
cases heuler - 0040
cases heuler_left - 0041
cases heuler_right - 0042
have hsign : (((exists qsm_even_half. h = 2 * qsm_even_half) -> (exists wpp_mod_left_qsm_mod_one wpp_mod_right_qsm_mod_one. (x) + p * wpp_mod_left_qsm_mod_one = (1) + p * wpp_mod_right_qsm_mod_one)) /\ ((exists qsm_odd_half. h = 2 * qsm_odd_half + 1) -> (exists wpp_mod_left_qsm_mod_predecessor wpp_mod_right_qsm_mod_predecessor. (x) + p * wpp_mod_left_qsm_mod_predecessor = (n) + p * wpp_mod_right_qsm_mod_predecessor))) - 0043
specialize pow_predecessor_parity_mod p - 0044
specialize pow_predecessor_parity_mod n - 0045
specialize pow_predecessor_parity_mod h - 0046
specialize pow_predecessor_parity_mod x - 0047
apply pow_predecessor_parity_mod - 0048
exact hpredecessor - 0049
exact hpower_witness - 0050
cases hsign - 0051
split - 0052
split - 0053
intro hresidue - 0054
specialize parity_cases h - 0055
cases parity_cases - 0056
cases parity_cases_witness - 0057
exists x1 - 0058
exact parity_cases_witness_left - 0059
exfalso - 0060
have hnotresidue : ~(exists qr_x_qsm_predecessor. exists qr_u_qsm_predecessor qr_v_qsm_predecessor. qr_x_qsm_predecessor * qr_x_qsm_predecessor + p * qr_u_qsm_predecessor = n + p * qr_v_qsm_predecessor) - 0061
intro hresidue_again - 0062
apply heuler_right_right - 0063
apply hsign_right - 0064
exists x1 - 0065
exact parity_cases_witness_right - 0066
exact hresidue_again - 0067
apply hnotresidue - 0068
exact hresidue - 0069
intro heven - 0070
apply heuler_left_right - 0071
apply hsign_left - 0072
exact heven - 0073
split - 0074
intro hnotresidue - 0075
specialize parity_cases h - 0076
cases parity_cases - 0077
cases parity_cases_witness - 0078
exfalso - 0079
apply hnotresidue - 0080
apply heuler_left_right - 0081
apply hsign_left - 0082
exists x1 - 0083
exact parity_cases_witness_left - 0084
exists x1 - 0085
exact parity_cases_witness_right - 0086
intro hodd - 0087
intro hresidue - 0088
apply heuler_right_right - 0089
apply hsign_right - 0090
exact hodd - 0091
exact hresidue