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_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))))Structural proof guide
Generated structural guide
Euler's nonresidue 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_nonresidue_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 PA00BS bounded_euler_criterion_nonresidue_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-v16 checked-use theorem is independently kernel-checked when replayed; it is not a Stable theorem.
- 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_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 : ~(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 : 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 : 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 : 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 : ~(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