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
∀ p. ∀ a. ∀ n. ∀ h. ∀ A. p = S n → Prime(p) → ¬Dvd(p,a) → n = h + h → Pow(a,h,A) → (¬QRes(p,a) → ModEq(p,A,n)) ∧ (ModEq(p,A,n) → ¬QRes(p,a))Every purple notation token opens its conservative definition. This is a reading surface; the compiler expands the statement before the unchanged kernel checks it.
Definitions used by this theorem
In the theorem statement
7 occurrences
In local proof propositions
17 occurrences
Exact expanded native-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_predecessor wpp_mod_right_eca_mod_predecessor. (A) + p * wpp_mod_left_eca_mod_predecessor = (n) + p * wpp_mod_right_eca_mod_predecessor)) /\ ((exists wpp_mod_left_eca_mod_predecessor wpp_mod_right_eca_mod_predecessor. (A) + p * wpp_mod_left_eca_mod_predecessor = (n) + p * wpp_mod_right_eca_mod_predecessor) -> ~(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))))Proof neighborhood
Direct theorem prerequisites
PA0031 prime_nonzero PA0086 nondivisor_canonical_remainder_exists PA0087 quadratic_residue_mod_equiv PA0088 pow_congruent_base_witness PA00BS bounded_euler_criterion_nonresidue_iff PA003L mod_eq_symm PA0024 mod_eq_transDirect theorem dependents
Definition-aware tactic body
Only local propositions introduced by have or suffices are compacted. The untrusted compiler re-expands each one before the original tactic script is replayed; defined notation is never accepted by the kernel. Open the exact replay line beneath every changed 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.
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 : ∃ r. ¬r = 0 ∧ (Lt(r,p) ∧ ModEq(p,a,r))Definitions: Lt(r,p)ModEq(p,a,r)Original native command in the exact edition - 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
have hpower_transport : ∃ R. Pow(x,h,R) ∧ ModEq(p,A,R)Definitions: Pow(x,h,R)ModEq(p,A,R)Original native command in the exact edition - 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.
- L37
have hqres_equiv : (QRes(p,a) → QRes(p,x)) ∧ (QRes(p,x) → QRes(p,a))Definitions: QRes(p,a)QRes(p,x)Original native command in the exact edition - L38
specialize quadratic_residue_mod_equiv p - L39
specialize quadratic_residue_mod_equiv a - L40
specialize quadratic_residue_mod_equiv x - L41
apply quadratic_residue_mod_equiv - L42
exact hcanonical_witness_right_right
08Establish hboundedL43–52
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply bounded euler criterion nonresidue iff.
- L43
have hbounded : (¬QRes(p,x) → ModEq(p,x1,n)) ∧ (ModEq(p,x1,n) → ¬QRes(p,x))Definitions: QRes(p,x)ModEq(p,x1,n)Original native command in the exact edition - L44
specialize bounded_euler_criterion_nonresidue_iff p - L45
specialize bounded_euler_criterion_nonresidue_iff x - L46
specialize bounded_euler_criterion_nonresidue_iff n - L47
specialize bounded_euler_criterion_nonresidue_iff h - L48
specialize bounded_euler_criterion_nonresidue_iff x1 - L49
apply bounded_euler_criterion_nonresidue_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 hnqa
12Establish hnqrL60–64
13Establish hRminusL65–74
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hbounded left.
14Fix variables and assumptionsL75–75
Work with arbitrary variables or the premises of the current implication.
- L75
intro hAminus
15Establish hRAL76–81
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq symm.
16Establish hRminusL82–89
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq trans.
17Establish hnqrL90–98
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hbounded right.
Original defined command ledger · 98 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 : ∃ r. ¬r = 0 ∧ (Lt(r,p) ∧ ModEq(p,a,r))Exact native replay line
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 : ∃ R. Pow(x,h,R) ∧ ModEq(p,A,R)Exact native replay line
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 : (QRes(p,a) → QRes(p,x)) ∧ (QRes(p,x) → QRes(p,a))Exact native replay line
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 : (¬QRes(p,x) → ModEq(p,x1,n)) ∧ (ModEq(p,x1,n) → ¬QRes(p,x))Exact native replay line
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_predecessor wpp_mod_right_eca_proof_x1_predecessor. (x1) + p * wpp_mod_left_eca_proof_x1_predecessor = (n) + p * wpp_mod_right_eca_proof_x1_predecessor)) /\ ((exists wpp_mod_left_eca_proof_x1_predecessor wpp_mod_right_eca_proof_x1_predecessor. (x1) + p * wpp_mod_left_eca_proof_x1_predecessor = (n) + p * wpp_mod_right_eca_proof_x1_predecessor) -> ~(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_nonresidue_iff p - 0045
specialize bounded_euler_criterion_nonresidue_iff x - 0046
specialize bounded_euler_criterion_nonresidue_iff n - 0047
specialize bounded_euler_criterion_nonresidue_iff h - 0048
specialize bounded_euler_criterion_nonresidue_iff x1 - 0049
apply bounded_euler_criterion_nonresidue_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 hnqa - 0060
have hnqr : ¬QRes(p,x)Exact native replay line
have hnqr : ~(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
intro hqr - 0062
apply hnqa - 0063
apply hqres_equiv_right - 0064
exact hqr - 0065
have hRminus : ModEq(p,x1,n)Exact native replay line
have hRminus : exists wpp_mod_left_eca_proof_x1_predecessor wpp_mod_right_eca_proof_x1_predecessor. (x1) + p * wpp_mod_left_eca_proof_x1_predecessor = (n) + p * wpp_mod_right_eca_proof_x1_predecessor - 0066
apply hbounded_left - 0067
exact hnqr - 0068
specialize mod_eq_trans p - 0069
specialize mod_eq_trans A - 0070
specialize mod_eq_trans x1 - 0071
specialize mod_eq_trans n - 0072
apply mod_eq_trans - 0073
exact hpower_transport_witness_right - 0074
exact hRminus - 0075
intro hAminus - 0076
have hRA : ModEq(p,x1,A)Exact native replay line
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 - 0077
specialize mod_eq_symm p - 0078
specialize mod_eq_symm A - 0079
specialize mod_eq_symm x1 - 0080
apply mod_eq_symm - 0081
exact hpower_transport_witness_right - 0082
have hRminus : ModEq(p,x1,n)Exact native replay line
have hRminus : exists wpp_mod_left_eca_proof_x1_predecessor wpp_mod_right_eca_proof_x1_predecessor. (x1) + p * wpp_mod_left_eca_proof_x1_predecessor = (n) + p * wpp_mod_right_eca_proof_x1_predecessor - 0083
specialize mod_eq_trans p - 0084
specialize mod_eq_trans x1 - 0085
specialize mod_eq_trans A - 0086
specialize mod_eq_trans n - 0087
apply mod_eq_trans - 0088
exact hRA - 0089
exact hAminus - 0090
have hnqr : ¬QRes(p,x)Exact native replay line
have hnqr : ~(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) - 0091
intro hqr - 0092
apply hbounded_right - 0093
exact hRminus - 0094
exact hqr - 0095
intro hqa - 0096
apply hnqr - 0097
apply hqres_equiv_left - 0098
exact hqa