Exact expanded PA statement
forall p n a r s. p = S n -> ((~(p = 1) /\ forall frm_prime_left_injective_prime frm_prime_right_injective_prime. p = frm_prime_left_injective_prime * frm_prime_right_injective_prime -> frm_prime_left_injective_prime = 1 \/ frm_prime_right_injective_prime = 1)) -> (~(exists frm_factor_injective_multiplier. a = p * frm_factor_injective_multiplier)) -> (forall frm_index_injective_map. (exists frm_gap_injective_map_index_bound. frm_gap_injective_map_index_bound + S frm_index_injective_map = n) -> (exists frm_residue_injective_map_result. (exists frm_gap_injective_map_result_residue_bound. frm_gap_injective_map_result_residue_bound + S frm_residue_injective_map_result = n) /\ ((((exists ff_h_frm_injective_map_result_decoded. ff_h_frm_injective_map_result_decoded + S (frm_residue_injective_map_result) = S ((S (frm_index_injective_map)) * s)) /\ exists ff_q_frm_injective_map_result_decoded. r = ff_q_frm_injective_map_result_decoded * S ((S (frm_index_injective_map)) * s) + (frm_residue_injective_map_result))) /\ (exists frm_mod_left_injective_map_result_congruence frm_mod_right_injective_map_result_congruence. a * S frm_index_injective_map + p * frm_mod_left_injective_map_result_congruence = S frm_residue_injective_map_result + p * frm_mod_right_injective_map_result_congruence)))) -> (forall fp_i_injective_result fp_j_injective_result fp_value_injective_result. (exists fp_gap_injective_result_i. fp_gap_injective_result_i + S fp_i_injective_result = n) -> (exists fp_gap_injective_result_j. fp_gap_injective_result_j + S fp_j_injective_result = n) -> (((exists ff_h_injective_result_left. ff_h_injective_result_left + S (fp_value_injective_result) = S ((S (fp_i_injective_result)) * s)) /\ exists ff_q_injective_result_left. r = ff_q_injective_result_left * S ((S (fp_i_injective_result)) * s) + (fp_value_injective_result))) -> (((exists ff_h_injective_result_right. ff_h_injective_result_right + S (fp_value_injective_result) = S ((S (fp_j_injective_result)) * s)) /\ exists ff_q_injective_result_right. r = ff_q_injective_result_right * S ((S (fp_j_injective_result)) * s) + (fp_value_injective_result))) -> fp_i_injective_result = fp_j_injective_result)Structural proof guide
Generated structural guide
Multiplication by a nonzero prime residue is injective on 0,...,p-2.
Use the direct prerequisites beta_at_unique, succ_le_succ, mod_eq_symm, mod_eq_trans, prime_mod_cancel, mod_eq_bounded_unique, succ_injective as previously established PA formulas.
The proof proceeds by case analysis (6), intermediate claims (10), equality transport (4).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA002F beta_at_unique PA002K succ_le_succ PA003L mod_eq_symm PA0024 mod_eq_trans PA003S prime_mod_cancel PA002U mod_eq_bounded_unique PA003V succ_injectiveDirect 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 n - 0003
intro a - 0004
intro r - 0005
intro s - 0006
intro hpn - 0007
intro hp - 0008
intro hnotdiv - 0009
intro hmap - 0010
intro i - 0011
intro k - 0012
intro value - 0013
intro hi - 0014
intro hk - 0015
intro hri - 0016
intro hrk - 0017
have hmi : exists frm_residue_injective_i. (exists frm_gap_injective_i_residue_bound. frm_gap_injective_i_residue_bound + S frm_residue_injective_i = n) /\ ((((exists ff_h_frm_injective_i_decoded. ff_h_frm_injective_i_decoded + S (frm_residue_injective_i) = S ((S (i)) * s)) /\ exists ff_q_frm_injective_i_decoded. r = ff_q_frm_injective_i_decoded * S ((S (i)) * s) + (frm_residue_injective_i))) /\ (exists frm_mod_left_injective_i_congruence frm_mod_right_injective_i_congruence. a * S i + p * frm_mod_left_injective_i_congruence = S frm_residue_injective_i + p * frm_mod_right_injective_i_congruence)) - 0018
specialize hmap i - 0019
apply hmap - 0020
exact hi - 0021
cases hmi - 0022
cases hmi_witness - 0023
cases hmi_witness_right - 0024
have hmk : exists frm_residue_injective_k. (exists frm_gap_injective_k_residue_bound. frm_gap_injective_k_residue_bound + S frm_residue_injective_k = n) /\ ((((exists ff_h_frm_injective_k_decoded. ff_h_frm_injective_k_decoded + S (frm_residue_injective_k) = S ((S (k)) * s)) /\ exists ff_q_frm_injective_k_decoded. r = ff_q_frm_injective_k_decoded * S ((S (k)) * s) + (frm_residue_injective_k))) /\ (exists frm_mod_left_injective_k_congruence frm_mod_right_injective_k_congruence. a * S k + p * frm_mod_left_injective_k_congruence = S frm_residue_injective_k + p * frm_mod_right_injective_k_congruence)) - 0025
specialize hmap k - 0026
apply hmap - 0027
exact hk - 0028
cases hmk - 0029
cases hmk_witness - 0030
cases hmk_witness_right - 0031
have hvalue_i : value = x - 0032
specialize beta_at_unique r - 0033
specialize beta_at_unique s - 0034
specialize beta_at_unique i - 0035
specialize beta_at_unique value - 0036
specialize beta_at_unique x - 0037
apply beta_at_unique - 0038
exact hri - 0039
exact hmi_witness_right_left - 0040
have hvalue_k : value = x1 - 0041
specialize beta_at_unique r - 0042
specialize beta_at_unique s - 0043
specialize beta_at_unique k - 0044
specialize beta_at_unique value - 0045
specialize beta_at_unique x1 - 0046
apply beta_at_unique - 0047
exact hrk - 0048
exact hmk_witness_right_left - 0049
rewrite <- hvalue_i at hmi_witness_right_right - 0050
rewrite <- hvalue_k at hmk_witness_right_right - 0051
have hreverse : exists frr_reverse_left_injective_reverse frr_reverse_right_injective_reverse. S value + p * frr_reverse_left_injective_reverse = a * S k + p * frr_reverse_right_injective_reverse - 0052
specialize mod_eq_symm p - 0053
specialize mod_eq_symm (a * S k) - 0054
specialize mod_eq_symm (S value) - 0055
apply mod_eq_symm - 0056
exact hmk_witness_right_right - 0057
have hscaled : exists frr_scaled_left_injective_scaled frr_scaled_right_injective_scaled. a * S i + p * frr_scaled_left_injective_scaled = a * S k + p * frr_scaled_right_injective_scaled - 0058
specialize mod_eq_trans p - 0059
specialize mod_eq_trans (a * S i) - 0060
specialize mod_eq_trans (S value) - 0061
specialize mod_eq_trans (a * S k) - 0062
apply mod_eq_trans - 0063
exact hmi_witness_right_right - 0064
exact hreverse - 0065
have hcancel : exists frr_cancel_left_injective_canceled frr_cancel_right_injective_canceled. S i + p * frr_cancel_left_injective_canceled = S k + p * frr_cancel_right_injective_canceled - 0066
specialize prime_mod_cancel p - 0067
specialize prime_mod_cancel a - 0068
specialize prime_mod_cancel (S i) - 0069
specialize prime_mod_cancel (S k) - 0070
apply prime_mod_cancel - 0071
exact hp - 0072
exact hnotdiv - 0073
exact hscaled - 0074
have hibound : exists frr_successor_bound_injective_i_bound. frr_successor_bound_injective_i_bound + S (S i) = p - 0075
rewrite hpn - 0076
specialize succ_le_succ (S i) - 0077
specialize succ_le_succ n - 0078
apply succ_le_succ - 0079
exact hi - 0080
have hkbound : exists frr_successor_bound_injective_k_bound. frr_successor_bound_injective_k_bound + S (S k) = p - 0081
rewrite hpn - 0082
specialize succ_le_succ (S k) - 0083
specialize succ_le_succ n - 0084
apply succ_le_succ - 0085
exact hk - 0086
have hsucc : S i = S k - 0087
specialize mod_eq_bounded_unique p - 0088
specialize mod_eq_bounded_unique (S i) - 0089
specialize mod_eq_bounded_unique (S k) - 0090
apply mod_eq_bounded_unique - 0091
exact hibound - 0092
exact hkbound - 0093
exact hcancel - 0094
specialize succ_injective i - 0095
specialize succ_injective k - 0096
apply succ_injective - 0097
exact hsucc