Exact expanded PA statement
forall p n l. p = S n -> ((~(p = 1) /\ forall wip_prime_left_bounded_prime wip_prime_right_bounded_prime. p = wip_prime_left_bounded_prime * wip_prime_right_bounded_prime -> wip_prime_left_bounded_prime = 1 \/ wip_prime_right_bounded_prime = 1)) -> (exists wip_weak_gap_bounded_length. wip_weak_gap_bounded_length + l = n) -> exists b c. (forall wip_index_bounded_result. (exists wip_gap_bounded_result_prefix_bound. wip_gap_bounded_result_prefix_bound + S wip_index_bounded_result = l) -> exists wip_mate_bounded_result. ((((exists wip_beta_height_bounded_result_decoded. wip_beta_height_bounded_result_decoded + S (wip_mate_bounded_result) = S ((S (wip_index_bounded_result)) * c)) /\ exists wip_beta_quotient_bounded_result_decoded. b = wip_beta_quotient_bounded_result_decoded * S ((S (wip_index_bounded_result)) * c) + (wip_mate_bounded_result))) /\ ((exists wip_gap_bounded_result_inverse_index_bound. wip_gap_bounded_result_inverse_index_bound + S wip_index_bounded_result = n) /\ ((exists wip_gap_bounded_result_inverse_mate_bound. wip_gap_bounded_result_inverse_mate_bound + S wip_mate_bounded_result = n) /\ (exists wip_mod_left_bounded_result_inverse_mod wip_mod_right_bounded_result_inverse_mod. ((S wip_index_bounded_result) * S wip_mate_bounded_result) + p * wip_mod_left_bounded_result_inverse_mod = 1 + p * wip_mod_right_bounded_result_inverse_mod)))))Structural proof guide
Generated structural guide
Every length bounded by p-1 has a beta-coded inverse prefix.
Use the direct prerequisites add_eq_zero_right, succ_ne_zero, lt_to_le, prime_inverse_prefix_extend as previously established PA formulas.
The proof proceeds by structural induction (1), case analysis (5), intermediate claims (4).
Referenced ingredients
Proof neighborhood
Direct dependencies
Direct 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
induction l - 0004
intro hpn - 0005
intro hp - 0006
intro hln - 0007
exists 0 - 0008
exists 0 - 0009
intro i - 0010
intro hi - 0011
exfalso - 0012
cases hi - 0013
have hsi : S i = 0 - 0014
specialize add_eq_zero_right x - 0015
specialize add_eq_zero_right (S i) - 0016
apply add_eq_zero_right - 0017
exact hi_witness - 0018
specialize succ_ne_zero i - 0019
apply succ_ne_zero - 0020
exact hsi - 0021
intro hpn - 0022
intro hp - 0023
intro hln - 0024
have hprev_bound : exists h. h + l = n - 0025
specialize lt_to_le l - 0026
specialize lt_to_le n - 0027
apply lt_to_le - 0028
exact hln - 0029
have hprev : exists b c. (forall wip_index_bounded_previous. (exists wip_gap_bounded_previous_prefix_bound. wip_gap_bounded_previous_prefix_bound + S wip_index_bounded_previous = l) -> exists wip_mate_bounded_previous. ((((exists wip_beta_height_bounded_previous_decoded. wip_beta_height_bounded_previous_decoded + S (wip_mate_bounded_previous) = S ((S (wip_index_bounded_previous)) * c)) /\ exists wip_beta_quotient_bounded_previous_decoded. b = wip_beta_quotient_bounded_previous_decoded * S ((S (wip_index_bounded_previous)) * c) + (wip_mate_bounded_previous))) /\ ((exists wip_gap_bounded_previous_inverse_index_bound. wip_gap_bounded_previous_inverse_index_bound + S wip_index_bounded_previous = n) /\ ((exists wip_gap_bounded_previous_inverse_mate_bound. wip_gap_bounded_previous_inverse_mate_bound + S wip_mate_bounded_previous = n) /\ (exists wip_mod_left_bounded_previous_inverse_mod wip_mod_right_bounded_previous_inverse_mod. ((S wip_index_bounded_previous) * S wip_mate_bounded_previous) + p * wip_mod_left_bounded_previous_inverse_mod = 1 + p * wip_mod_right_bounded_previous_inverse_mod))))) - 0030
apply IH - 0031
exact hpn - 0032
exact hp - 0033
exact hprev_bound - 0034
cases hprev - 0035
cases hprev_witness - 0036
have hnext : exists z d. (forall wip_index_bounded_successor. (exists wip_gap_bounded_successor_prefix_bound. wip_gap_bounded_successor_prefix_bound + S wip_index_bounded_successor = S l) -> exists wip_mate_bounded_successor. ((((exists wip_beta_height_bounded_successor_decoded. wip_beta_height_bounded_successor_decoded + S (wip_mate_bounded_successor) = S ((S (wip_index_bounded_successor)) * d)) /\ exists wip_beta_quotient_bounded_successor_decoded. z = wip_beta_quotient_bounded_successor_decoded * S ((S (wip_index_bounded_successor)) * d) + (wip_mate_bounded_successor))) /\ ((exists wip_gap_bounded_successor_inverse_index_bound. wip_gap_bounded_successor_inverse_index_bound + S wip_index_bounded_successor = n) /\ ((exists wip_gap_bounded_successor_inverse_mate_bound. wip_gap_bounded_successor_inverse_mate_bound + S wip_mate_bounded_successor = n) /\ (exists wip_mod_left_bounded_successor_inverse_mod wip_mod_right_bounded_successor_inverse_mod. ((S wip_index_bounded_successor) * S wip_mate_bounded_successor) + p * wip_mod_left_bounded_successor_inverse_mod = 1 + p * wip_mod_right_bounded_successor_inverse_mod))))) - 0037
specialize prime_inverse_prefix_extend p - 0038
specialize prime_inverse_prefix_extend n - 0039
specialize prime_inverse_prefix_extend x - 0040
specialize prime_inverse_prefix_extend x1 - 0041
specialize prime_inverse_prefix_extend l - 0042
apply prime_inverse_prefix_extend - 0043
exact hpn - 0044
exact hp - 0045
exact hln - 0046
exact hprev_witness_witness - 0047
cases hnext - 0048
cases hnext_witness - 0049
exists x2 - 0050
exists x3 - 0051
exact hnext_witness_witness