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 PA statement
forall p a n h A. p = S n -> ((~(p = 1) /\ forall frm_prime_left_eca_prime frm_prime_right_eca_prime. p = frm_prime_left_eca_prime * frm_prime_right_eca_prime -> frm_prime_left_eca_prime = 1 \/ frm_prime_right_eca_prime = 1)) -> (~(exists frm_factor_eca_not_divisor. a = p * frm_factor_eca_not_divisor)) -> n = h + h -> (exists ff_b_eca_power_endpoint ff_c_eca_power_endpoint. ((forall ff_i_eca_power_endpoint_repeat. (exists ff_lt_eca_power_endpoint_repeat_bound. ff_lt_eca_power_endpoint_repeat_bound + S ff_i_eca_power_endpoint_repeat = h) -> (((exists ff_h_eca_power_endpoint_repeat_decoded. ff_h_eca_power_endpoint_repeat_decoded + S (a) = S ((S (ff_i_eca_power_endpoint_repeat)) * ff_c_eca_power_endpoint)) /\ exists ff_q_eca_power_endpoint_repeat_decoded. ff_b_eca_power_endpoint = ff_q_eca_power_endpoint_repeat_decoded * S ((S (ff_i_eca_power_endpoint_repeat)) * ff_c_eca_power_endpoint) + (a)))) /\ (exists ff_u_eca_power_endpoint_product ff_v_eca_power_endpoint_product. ((((exists ff_h_eca_power_endpoint_product_start. ff_h_eca_power_endpoint_product_start + S (1) = S ((S (0)) * ff_v_eca_power_endpoint_product)) /\ exists ff_q_eca_power_endpoint_product_start. ff_u_eca_power_endpoint_product = ff_q_eca_power_endpoint_product_start * S ((S (0)) * ff_v_eca_power_endpoint_product) + (1))) /\ ((((exists ff_h_eca_power_endpoint_product_terminal. ff_h_eca_power_endpoint_product_terminal + S (A) = S ((S (h)) * ff_v_eca_power_endpoint_product)) /\ exists ff_q_eca_power_endpoint_product_terminal. ff_u_eca_power_endpoint_product = ff_q_eca_power_endpoint_product_terminal * S ((S (h)) * ff_v_eca_power_endpoint_product) + (A))) /\ forall ff_i_eca_power_endpoint_product. (exists ff_lt_eca_power_endpoint_product_bound. ff_lt_eca_power_endpoint_product_bound + S ff_i_eca_power_endpoint_product = h) -> exists ff_p_eca_power_endpoint_product ff_r_eca_power_endpoint_product ff_s_eca_power_endpoint_product. ((((exists ff_h_eca_power_endpoint_product_factor. ff_h_eca_power_endpoint_product_factor + S (ff_p_eca_power_endpoint_product) = S ((S (ff_i_eca_power_endpoint_product)) * ff_c_eca_power_endpoint)) /\ exists ff_q_eca_power_endpoint_product_factor. ff_b_eca_power_endpoint = ff_q_eca_power_endpoint_product_factor * S ((S (ff_i_eca_power_endpoint_product)) * ff_c_eca_power_endpoint) + (ff_p_eca_power_endpoint_product))) /\ ((((exists ff_h_eca_power_endpoint_product_partial. ff_h_eca_power_endpoint_product_partial + S (ff_r_eca_power_endpoint_product) = S ((S (ff_i_eca_power_endpoint_product)) * ff_v_eca_power_endpoint_product)) /\ exists ff_q_eca_power_endpoint_product_partial. ff_u_eca_power_endpoint_product = ff_q_eca_power_endpoint_product_partial * S ((S (ff_i_eca_power_endpoint_product)) * ff_v_eca_power_endpoint_product) + (ff_r_eca_power_endpoint_product))) /\ ((((exists ff_h_eca_power_endpoint_product_successor. ff_h_eca_power_endpoint_product_successor + S (ff_s_eca_power_endpoint_product) = S ((S (S ff_i_eca_power_endpoint_product)) * ff_v_eca_power_endpoint_product)) /\ exists ff_q_eca_power_endpoint_product_successor. ff_u_eca_power_endpoint_product = ff_q_eca_power_endpoint_product_successor * S ((S (S ff_i_eca_power_endpoint_product)) * ff_v_eca_power_endpoint_product) + (ff_s_eca_power_endpoint_product))) /\ ff_s_eca_power_endpoint_product = ff_r_eca_power_endpoint_product * ff_p_eca_power_endpoint_product)))))))) -> ((((exists qr_x_eca_qres_a. exists qr_u_eca_qres_a qr_v_eca_qres_a. qr_x_eca_qres_a * qr_x_eca_qres_a + p * qr_u_eca_qres_a = a + p * qr_v_eca_qres_a) -> (exists wpp_mod_left_eca_mod_one wpp_mod_right_eca_mod_one. (A) + p * wpp_mod_left_eca_mod_one = (1) + p * wpp_mod_right_eca_mod_one)) /\ ((exists wpp_mod_left_eca_mod_one wpp_mod_right_eca_mod_one. (A) + p * wpp_mod_left_eca_mod_one = (1) + p * wpp_mod_right_eca_mod_one) -> (exists qr_x_eca_qres_a. exists qr_u_eca_qres_a qr_v_eca_qres_a. qr_x_eca_qres_a * qr_x_eca_qres_a + p * qr_u_eca_qres_a = a + p * qr_v_eca_qres_a))))Structural proof guide
Generated structural guide
Euler's residue equivalence for an arbitrary nonmultiple representative.
Use the direct prerequisites prime_nonzero, nondivisor_canonical_remainder_exists, quadratic_residue_mod_equiv, pow_congruent_base_witness, bounded_euler_criterion_residue_iff, mod_eq_symm, mod_eq_trans as previously established PA formulas.
The proof proceeds by case analysis (7), intermediate claims (10).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA0031 prime_nonzero PA0086 nondivisor_canonical_remainder_exists PA0087 quadratic_residue_mod_equiv PA0088 pow_congruent_base_witness PA00BQ bounded_euler_criterion_residue_iff PA003L mod_eq_symm PA0024 mod_eq_transDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Linked names are exact direct references. This Alpha-v25 checked-use theorem is independently kernel-checked when replayed; it is not a Stable theorem.
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 (7)
01Fix variables and assumptionsL1–10
02Establish hp0L11–16
03Establish hcanonicalL17–22
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply nondivisor canonical remainder exists.
- L17
have hcanonical : exists r. ~(r = 0) /\ ((exists wpo_gap_eca_local_r_bound. wpo_gap_eca_local_r_bound + S (r) = p) /\ (exists wpp_mod_left_eca_local_a_r wpp_mod_right_eca_local_a_r. (a) + p * wpp_mod_left_eca_local_a_r = (r) + p * wpp_mod_right_eca_local_a_r)) - L18
specialize nondivisor_canonical_remainder_exists p - L19
specialize nondivisor_canonical_remainder_exists a - L20
apply nondivisor_canonical_remainder_exists - L21
exact hp0 - L22
exact hnotdiv
04Separate the logical casesL23–25
05Establish hpower_transportL26–34
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply pow congruent base witness.
- L26
- L27
specialize pow_congruent_base_witness p - L28
specialize pow_congruent_base_witness a - L29
specialize pow_congruent_base_witness x - L30
specialize pow_congruent_base_witness h - L31
specialize pow_congruent_base_witness A - L32
apply pow_congruent_base_witness - L33
exact hcanonical_witness_right_right - L34
exact hpower
06Separate the logical casesL35–36
07Establish hqres_equivL37–42
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply quadratic residue mod equiv.
08Establish hboundedL43–52
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply bounded euler criterion residue iff.
- L43
- L44
specialize bounded_euler_criterion_residue_iff p - L45
specialize bounded_euler_criterion_residue_iff x - L46
specialize bounded_euler_criterion_residue_iff n - L47
specialize bounded_euler_criterion_residue_iff h - L48
specialize bounded_euler_criterion_residue_iff x1 - L49
apply bounded_euler_criterion_residue_iff - L50
exact hpn - L51
exact hp - L52
exact hcanonical_witness_left
09Use earlier factsL53–55
10Separate the logical casesL56–58
11Fix variables and assumptionsL59–59
Work with arbitrary variables or the premises of the current implication.
- L59
intro hqa
12Establish hqrL60–62
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hqres equiv left.
13Establish hRoneL63–72
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hbounded left.
- L63
have hRone : exists wpp_mod_left_eca_proof_x1_one wpp_mod_right_eca_proof_x1_one. (x1) + p * wpp_mod_left_eca_proof_x1_one = (1) + p * wpp_mod_right_eca_proof_x1_one - L64
apply hbounded_left - L65
exact hqr - L66
specialize mod_eq_trans p - L67
specialize mod_eq_trans A - L68
specialize mod_eq_trans x1 - L69
specialize mod_eq_trans 1 - L70
apply mod_eq_trans - L71
exact hpower_transport_witness_right - L72
exact hRone
14Fix variables and assumptionsL73–73
Work with arbitrary variables or the premises of the current implication.
- L73
intro hAone
15Establish hRAL74–79
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq symm.
16Establish hRoneL80–87
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq trans.
- L80
have hRone : exists wpp_mod_left_eca_proof_x1_one wpp_mod_right_eca_proof_x1_one. (x1) + p * wpp_mod_left_eca_proof_x1_one = (1) + p * wpp_mod_right_eca_proof_x1_one - L81
specialize mod_eq_trans p - L82
specialize mod_eq_trans x1 - L83
specialize mod_eq_trans A - L84
specialize mod_eq_trans 1 - L85
apply mod_eq_trans - L86
exact hRA - L87
exact hAone
17Establish hqrL88–92
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hbounded right.
Original exact command ledger · 92 lines
- 0001
intro p - 0002
intro a - 0003
intro n - 0004
intro h - 0005
intro A - 0006
intro hpn - 0007
intro hp - 0008
intro hnotdiv - 0009
intro heven - 0010
intro hpower - 0011
have hp0 : ~(p = 0) - 0012
intro hpzero - 0013
specialize prime_nonzero p - 0014
apply prime_nonzero - 0015
exact hp - 0016
exact hpzero - 0017
have hcanonical : exists r. ~(r = 0) /\ ((exists wpo_gap_eca_local_r_bound. wpo_gap_eca_local_r_bound + S (r) = p) /\ (exists wpp_mod_left_eca_local_a_r wpp_mod_right_eca_local_a_r. (a) + p * wpp_mod_left_eca_local_a_r = (r) + p * wpp_mod_right_eca_local_a_r)) - 0018
specialize nondivisor_canonical_remainder_exists p - 0019
specialize nondivisor_canonical_remainder_exists a - 0020
apply nondivisor_canonical_remainder_exists - 0021
exact hp0 - 0022
exact hnotdiv - 0023
cases hcanonical - 0024
cases hcanonical_witness - 0025
cases hcanonical_witness_right - 0026
have hpower_transport : exists R. (exists ff_b_eca_proof_power_x_R ff_c_eca_proof_power_x_R. ((forall ff_i_eca_proof_power_x_R_repeat. (exists ff_lt_eca_proof_power_x_R_repeat_bound. ff_lt_eca_proof_power_x_R_repeat_bound + S ff_i_eca_proof_power_x_R_repeat = h) -> (((exists ff_h_eca_proof_power_x_R_repeat_decoded. ff_h_eca_proof_power_x_R_repeat_decoded + S (x) = S ((S (ff_i_eca_proof_power_x_R_repeat)) * ff_c_eca_proof_power_x_R)) /\ exists ff_q_eca_proof_power_x_R_repeat_decoded. ff_b_eca_proof_power_x_R = ff_q_eca_proof_power_x_R_repeat_decoded * S ((S (ff_i_eca_proof_power_x_R_repeat)) * ff_c_eca_proof_power_x_R) + (x)))) /\ (exists ff_u_eca_proof_power_x_R_product ff_v_eca_proof_power_x_R_product. ((((exists ff_h_eca_proof_power_x_R_product_start. ff_h_eca_proof_power_x_R_product_start + S (1) = S ((S (0)) * ff_v_eca_proof_power_x_R_product)) /\ exists ff_q_eca_proof_power_x_R_product_start. ff_u_eca_proof_power_x_R_product = ff_q_eca_proof_power_x_R_product_start * S ((S (0)) * ff_v_eca_proof_power_x_R_product) + (1))) /\ ((((exists ff_h_eca_proof_power_x_R_product_terminal. ff_h_eca_proof_power_x_R_product_terminal + S (R) = S ((S (h)) * ff_v_eca_proof_power_x_R_product)) /\ exists ff_q_eca_proof_power_x_R_product_terminal. ff_u_eca_proof_power_x_R_product = ff_q_eca_proof_power_x_R_product_terminal * S ((S (h)) * ff_v_eca_proof_power_x_R_product) + (R))) /\ forall ff_i_eca_proof_power_x_R_product. (exists ff_lt_eca_proof_power_x_R_product_bound. ff_lt_eca_proof_power_x_R_product_bound + S ff_i_eca_proof_power_x_R_product = h) -> exists ff_p_eca_proof_power_x_R_product ff_r_eca_proof_power_x_R_product ff_s_eca_proof_power_x_R_product. ((((exists ff_h_eca_proof_power_x_R_product_factor. ff_h_eca_proof_power_x_R_product_factor + S (ff_p_eca_proof_power_x_R_product) = S ((S (ff_i_eca_proof_power_x_R_product)) * ff_c_eca_proof_power_x_R)) /\ exists ff_q_eca_proof_power_x_R_product_factor. ff_b_eca_proof_power_x_R = ff_q_eca_proof_power_x_R_product_factor * S ((S (ff_i_eca_proof_power_x_R_product)) * ff_c_eca_proof_power_x_R) + (ff_p_eca_proof_power_x_R_product))) /\ ((((exists ff_h_eca_proof_power_x_R_product_partial. ff_h_eca_proof_power_x_R_product_partial + S (ff_r_eca_proof_power_x_R_product) = S ((S (ff_i_eca_proof_power_x_R_product)) * ff_v_eca_proof_power_x_R_product)) /\ exists ff_q_eca_proof_power_x_R_product_partial. ff_u_eca_proof_power_x_R_product = ff_q_eca_proof_power_x_R_product_partial * S ((S (ff_i_eca_proof_power_x_R_product)) * ff_v_eca_proof_power_x_R_product) + (ff_r_eca_proof_power_x_R_product))) /\ ((((exists ff_h_eca_proof_power_x_R_product_successor. ff_h_eca_proof_power_x_R_product_successor + S (ff_s_eca_proof_power_x_R_product) = S ((S (S ff_i_eca_proof_power_x_R_product)) * ff_v_eca_proof_power_x_R_product)) /\ exists ff_q_eca_proof_power_x_R_product_successor. ff_u_eca_proof_power_x_R_product = ff_q_eca_proof_power_x_R_product_successor * S ((S (S ff_i_eca_proof_power_x_R_product)) * ff_v_eca_proof_power_x_R_product) + (ff_s_eca_proof_power_x_R_product))) /\ ff_s_eca_proof_power_x_R_product = ff_r_eca_proof_power_x_R_product * ff_p_eca_proof_power_x_R_product)))))))) /\ (exists wpp_mod_left_eca_proof_A_R wpp_mod_right_eca_proof_A_R. (A) + p * wpp_mod_left_eca_proof_A_R = (R) + p * wpp_mod_right_eca_proof_A_R) - 0027
specialize pow_congruent_base_witness p - 0028
specialize pow_congruent_base_witness a - 0029
specialize pow_congruent_base_witness x - 0030
specialize pow_congruent_base_witness h - 0031
specialize pow_congruent_base_witness A - 0032
apply pow_congruent_base_witness - 0033
exact hcanonical_witness_right_right - 0034
exact hpower - 0035
cases hpower_transport - 0036
cases hpower_transport_witness - 0037
have hqres_equiv : (((exists qr_x_eca_qres_a. exists qr_u_eca_qres_a qr_v_eca_qres_a. qr_x_eca_qres_a * qr_x_eca_qres_a + p * qr_u_eca_qres_a = a + p * qr_v_eca_qres_a) -> (exists qr_x_eca_proof_qres_x. exists qr_u_eca_proof_qres_x qr_v_eca_proof_qres_x. qr_x_eca_proof_qres_x * qr_x_eca_proof_qres_x + p * qr_u_eca_proof_qres_x = x + p * qr_v_eca_proof_qres_x)) /\ ((exists qr_x_eca_proof_qres_x. exists qr_u_eca_proof_qres_x qr_v_eca_proof_qres_x. qr_x_eca_proof_qres_x * qr_x_eca_proof_qres_x + p * qr_u_eca_proof_qres_x = x + p * qr_v_eca_proof_qres_x) -> (exists qr_x_eca_qres_a. exists qr_u_eca_qres_a qr_v_eca_qres_a. qr_x_eca_qres_a * qr_x_eca_qres_a + p * qr_u_eca_qres_a = a + p * qr_v_eca_qres_a))) - 0038
specialize quadratic_residue_mod_equiv p - 0039
specialize quadratic_residue_mod_equiv a - 0040
specialize quadratic_residue_mod_equiv x - 0041
apply quadratic_residue_mod_equiv - 0042
exact hcanonical_witness_right_right - 0043
have hbounded : (((exists qr_x_eca_proof_qres_x. exists qr_u_eca_proof_qres_x qr_v_eca_proof_qres_x. qr_x_eca_proof_qres_x * qr_x_eca_proof_qres_x + p * qr_u_eca_proof_qres_x = x + p * qr_v_eca_proof_qres_x) -> (exists wpp_mod_left_eca_proof_x1_one wpp_mod_right_eca_proof_x1_one. (x1) + p * wpp_mod_left_eca_proof_x1_one = (1) + p * wpp_mod_right_eca_proof_x1_one)) /\ ((exists wpp_mod_left_eca_proof_x1_one wpp_mod_right_eca_proof_x1_one. (x1) + p * wpp_mod_left_eca_proof_x1_one = (1) + p * wpp_mod_right_eca_proof_x1_one) -> (exists qr_x_eca_proof_qres_x. exists qr_u_eca_proof_qres_x qr_v_eca_proof_qres_x. qr_x_eca_proof_qres_x * qr_x_eca_proof_qres_x + p * qr_u_eca_proof_qres_x = x + p * qr_v_eca_proof_qres_x))) - 0044
specialize bounded_euler_criterion_residue_iff p - 0045
specialize bounded_euler_criterion_residue_iff x - 0046
specialize bounded_euler_criterion_residue_iff n - 0047
specialize bounded_euler_criterion_residue_iff h - 0048
specialize bounded_euler_criterion_residue_iff x1 - 0049
apply bounded_euler_criterion_residue_iff - 0050
exact hpn - 0051
exact hp - 0052
exact hcanonical_witness_left - 0053
exact hcanonical_witness_right_left - 0054
exact heven - 0055
exact hpower_transport_witness_left - 0056
cases hqres_equiv - 0057
cases hbounded - 0058
split - 0059
intro hqa - 0060
have hqr : exists qr_x_eca_proof_qres_x. exists qr_u_eca_proof_qres_x qr_v_eca_proof_qres_x. qr_x_eca_proof_qres_x * qr_x_eca_proof_qres_x + p * qr_u_eca_proof_qres_x = x + p * qr_v_eca_proof_qres_x - 0061
apply hqres_equiv_left - 0062
exact hqa - 0063
have hRone : exists wpp_mod_left_eca_proof_x1_one wpp_mod_right_eca_proof_x1_one. (x1) + p * wpp_mod_left_eca_proof_x1_one = (1) + p * wpp_mod_right_eca_proof_x1_one - 0064
apply hbounded_left - 0065
exact hqr - 0066
specialize mod_eq_trans p - 0067
specialize mod_eq_trans A - 0068
specialize mod_eq_trans x1 - 0069
specialize mod_eq_trans 1 - 0070
apply mod_eq_trans - 0071
exact hpower_transport_witness_right - 0072
exact hRone - 0073
intro hAone - 0074
have hRA : exists wpp_mod_left_eca_proof_x1_A wpp_mod_right_eca_proof_x1_A. (x1) + p * wpp_mod_left_eca_proof_x1_A = (A) + p * wpp_mod_right_eca_proof_x1_A - 0075
specialize mod_eq_symm p - 0076
specialize mod_eq_symm A - 0077
specialize mod_eq_symm x1 - 0078
apply mod_eq_symm - 0079
exact hpower_transport_witness_right - 0080
have hRone : exists wpp_mod_left_eca_proof_x1_one wpp_mod_right_eca_proof_x1_one. (x1) + p * wpp_mod_left_eca_proof_x1_one = (1) + p * wpp_mod_right_eca_proof_x1_one - 0081
specialize mod_eq_trans p - 0082
specialize mod_eq_trans x1 - 0083
specialize mod_eq_trans A - 0084
specialize mod_eq_trans 1 - 0085
apply mod_eq_trans - 0086
exact hRA - 0087
exact hAone - 0088
have hqr : exists qr_x_eca_proof_qres_x. exists qr_u_eca_proof_qres_x qr_v_eca_proof_qres_x. qr_x_eca_proof_qres_x * qr_x_eca_proof_qres_x + p * qr_u_eca_proof_qres_x = x + p * qr_v_eca_proof_qres_x - 0089
apply hbounded_right - 0090
exact hRone - 0091
apply hqres_equiv_right - 0092
exact hqr