Exact expanded PA statement
forall p n u v b c l r. p = S n -> ((~(p = 1) /\ forall wip_prime_left_choose_orbit_prime wip_prime_right_choose_orbit_prime. p = wip_prime_left_choose_orbit_prime * wip_prime_right_choose_orbit_prime -> wip_prime_left_choose_orbit_prime = 1 \/ wip_prime_right_choose_orbit_prime = 1)) -> (forall wip_index_choose_orbit_full_prefix. (exists wip_gap_choose_orbit_full_prefix_prefix_bound. wip_gap_choose_orbit_full_prefix_prefix_bound + S wip_index_choose_orbit_full_prefix = n) -> exists wip_mate_choose_orbit_full_prefix. ((((exists wip_beta_height_choose_orbit_full_prefix_decoded. wip_beta_height_choose_orbit_full_prefix_decoded + S (wip_mate_choose_orbit_full_prefix) = S ((S (wip_index_choose_orbit_full_prefix)) * v)) /\ exists wip_beta_quotient_choose_orbit_full_prefix_decoded. u = wip_beta_quotient_choose_orbit_full_prefix_decoded * S ((S (wip_index_choose_orbit_full_prefix)) * v) + (wip_mate_choose_orbit_full_prefix))) /\ ((exists wip_gap_choose_orbit_full_prefix_inverse_index_bound. wip_gap_choose_orbit_full_prefix_inverse_index_bound + S wip_index_choose_orbit_full_prefix = n) /\ ((exists wip_gap_choose_orbit_full_prefix_inverse_mate_bound. wip_gap_choose_orbit_full_prefix_inverse_mate_bound + S wip_mate_choose_orbit_full_prefix = n) /\ (exists wip_mod_left_choose_orbit_full_prefix_inverse_mod wip_mod_right_choose_orbit_full_prefix_inverse_mod. ((S wip_index_choose_orbit_full_prefix) * S wip_mate_choose_orbit_full_prefix) + p * wip_mod_left_choose_orbit_full_prefix_inverse_mod = 1 + p * wip_mod_right_choose_orbit_full_prefix_inverse_mod))))) -> n = S r -> (exists h. h + S (S (S l)) = n) -> (exists i j. ((exists wpo_gap_choose_orbit_source_bound. wpo_gap_choose_orbit_source_bound + S (i) = n) /\ ((~(i = 0) /\ ~((S i) = n)) /\ ((~(exists wpo_index_choose_orbit_source_omit_contains. ((exists wpo_gap_choose_orbit_source_omit_contains_bound. wpo_gap_choose_orbit_source_omit_contains_bound + S (wpo_index_choose_orbit_source_omit_contains) = l) /\ (((exists wpo_beta_height_choose_orbit_source_omit_contains_entry. wpo_beta_height_choose_orbit_source_omit_contains_entry + S (i) = S ((S (wpo_index_choose_orbit_source_omit_contains)) * c)) /\ exists wpo_beta_quotient_choose_orbit_source_omit_contains_entry. b = wpo_beta_quotient_choose_orbit_source_omit_contains_entry * S ((S (wpo_index_choose_orbit_source_omit_contains)) * c) + (i)))))) /\ ((((exists wpo_beta_height_choose_orbit_forward. wpo_beta_height_choose_orbit_forward + S (j) = S ((S (i)) * v)) /\ exists wpo_beta_quotient_choose_orbit_forward. u = wpo_beta_quotient_choose_orbit_forward * S ((S (i)) * v) + (j))) /\ ((exists wpo_gap_choose_orbit_mate_bound. wpo_gap_choose_orbit_mate_bound + S (j) = n) /\ ((~(j = 0) /\ ~((S j) = n)) /\ (~(i = j) /\ (((exists wpo_beta_height_choose_orbit_back. wpo_beta_height_choose_orbit_back + S (i) = S ((S (j)) * v)) /\ exists wpo_beta_quotient_choose_orbit_back. u = wpo_beta_quotient_choose_orbit_back * S ((S (j)) * v) + (i)))))))))))Structural proof guide
Generated structural guide
Choose an omitted nonendpoint index and extract its distinct, nonendpoint inverse mate together with both decoded directions.
Use the direct prerequisites finite_prefix_choose_unused_nonendpoint, prime_inverse_prefix_nonendpoint_mate, prime_inverse_prefix_nonendpoint_not_fixed, inverse_prefix_involutive as previously established PA formulas.
The proof proceeds by case analysis (6), intermediate claims (8).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA00AE finite_prefix_choose_unused_nonendpoint PA00AQ prime_inverse_prefix_nonendpoint_mate PA00AI prime_inverse_prefix_nonendpoint_not_fixed PA00AN inverse_prefix_involutiveDirect 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 u - 0004
intro v - 0005
intro b - 0006
intro c - 0007
intro l - 0008
intro r - 0009
intro hpn - 0010
intro hp - 0011
intro hprefix - 0012
intro hnr - 0013
intro hshort - 0014
have hchoose : exists y. ((exists wpo_gap_choose_result_bound. wpo_gap_choose_result_bound + S (y) = n) /\ ((~(y = 0) /\ ~((S y) = n)) /\ (~(exists wpo_index_choose_result_omit_contains. ((exists wpo_gap_choose_result_omit_contains_bound. wpo_gap_choose_result_omit_contains_bound + S (wpo_index_choose_result_omit_contains) = l) /\ (((exists wpo_beta_height_choose_result_omit_contains_entry. wpo_beta_height_choose_result_omit_contains_entry + S (y) = S ((S (wpo_index_choose_result_omit_contains)) * c)) /\ exists wpo_beta_quotient_choose_result_omit_contains_entry. b = wpo_beta_quotient_choose_result_omit_contains_entry * S ((S (wpo_index_choose_result_omit_contains)) * c) + (y)))))))) - 0015
specialize finite_prefix_choose_unused_nonendpoint b - 0016
specialize finite_prefix_choose_unused_nonendpoint c - 0017
specialize finite_prefix_choose_unused_nonendpoint l - 0018
specialize finite_prefix_choose_unused_nonendpoint n - 0019
specialize finite_prefix_choose_unused_nonendpoint r - 0020
apply finite_prefix_choose_unused_nonendpoint - 0021
exact hnr - 0022
exact hshort - 0023
cases hchoose - 0024
cases hchoose_witness - 0025
cases hchoose_witness_right - 0026
have hmate_prefix : forall wip_index_choose_orbit_full_prefix. (exists wip_gap_choose_orbit_full_prefix_prefix_bound. wip_gap_choose_orbit_full_prefix_prefix_bound + S wip_index_choose_orbit_full_prefix = n) -> exists wip_mate_choose_orbit_full_prefix. ((((exists wip_beta_height_choose_orbit_full_prefix_decoded. wip_beta_height_choose_orbit_full_prefix_decoded + S (wip_mate_choose_orbit_full_prefix) = S ((S (wip_index_choose_orbit_full_prefix)) * v)) /\ exists wip_beta_quotient_choose_orbit_full_prefix_decoded. u = wip_beta_quotient_choose_orbit_full_prefix_decoded * S ((S (wip_index_choose_orbit_full_prefix)) * v) + (wip_mate_choose_orbit_full_prefix))) /\ ((exists wip_gap_choose_orbit_full_prefix_inverse_index_bound. wip_gap_choose_orbit_full_prefix_inverse_index_bound + S wip_index_choose_orbit_full_prefix = n) /\ ((exists wip_gap_choose_orbit_full_prefix_inverse_mate_bound. wip_gap_choose_orbit_full_prefix_inverse_mate_bound + S wip_mate_choose_orbit_full_prefix = n) /\ (exists wip_mod_left_choose_orbit_full_prefix_inverse_mod wip_mod_right_choose_orbit_full_prefix_inverse_mod. ((S wip_index_choose_orbit_full_prefix) * S wip_mate_choose_orbit_full_prefix) + p * wip_mod_left_choose_orbit_full_prefix_inverse_mod = 1 + p * wip_mod_right_choose_orbit_full_prefix_inverse_mod)))) - 0027
exact hprefix - 0028
have hnonfixed_prefix : forall wip_index_choose_orbit_full_prefix. (exists wip_gap_choose_orbit_full_prefix_prefix_bound. wip_gap_choose_orbit_full_prefix_prefix_bound + S wip_index_choose_orbit_full_prefix = n) -> exists wip_mate_choose_orbit_full_prefix. ((((exists wip_beta_height_choose_orbit_full_prefix_decoded. wip_beta_height_choose_orbit_full_prefix_decoded + S (wip_mate_choose_orbit_full_prefix) = S ((S (wip_index_choose_orbit_full_prefix)) * v)) /\ exists wip_beta_quotient_choose_orbit_full_prefix_decoded. u = wip_beta_quotient_choose_orbit_full_prefix_decoded * S ((S (wip_index_choose_orbit_full_prefix)) * v) + (wip_mate_choose_orbit_full_prefix))) /\ ((exists wip_gap_choose_orbit_full_prefix_inverse_index_bound. wip_gap_choose_orbit_full_prefix_inverse_index_bound + S wip_index_choose_orbit_full_prefix = n) /\ ((exists wip_gap_choose_orbit_full_prefix_inverse_mate_bound. wip_gap_choose_orbit_full_prefix_inverse_mate_bound + S wip_mate_choose_orbit_full_prefix = n) /\ (exists wip_mod_left_choose_orbit_full_prefix_inverse_mod wip_mod_right_choose_orbit_full_prefix_inverse_mod. ((S wip_index_choose_orbit_full_prefix) * S wip_mate_choose_orbit_full_prefix) + p * wip_mod_left_choose_orbit_full_prefix_inverse_mod = 1 + p * wip_mod_right_choose_orbit_full_prefix_inverse_mod)))) - 0029
exact hprefix - 0030
have hback_prefix : forall wip_index_choose_orbit_full_prefix. (exists wip_gap_choose_orbit_full_prefix_prefix_bound. wip_gap_choose_orbit_full_prefix_prefix_bound + S wip_index_choose_orbit_full_prefix = n) -> exists wip_mate_choose_orbit_full_prefix. ((((exists wip_beta_height_choose_orbit_full_prefix_decoded. wip_beta_height_choose_orbit_full_prefix_decoded + S (wip_mate_choose_orbit_full_prefix) = S ((S (wip_index_choose_orbit_full_prefix)) * v)) /\ exists wip_beta_quotient_choose_orbit_full_prefix_decoded. u = wip_beta_quotient_choose_orbit_full_prefix_decoded * S ((S (wip_index_choose_orbit_full_prefix)) * v) + (wip_mate_choose_orbit_full_prefix))) /\ ((exists wip_gap_choose_orbit_full_prefix_inverse_index_bound. wip_gap_choose_orbit_full_prefix_inverse_index_bound + S wip_index_choose_orbit_full_prefix = n) /\ ((exists wip_gap_choose_orbit_full_prefix_inverse_mate_bound. wip_gap_choose_orbit_full_prefix_inverse_mate_bound + S wip_mate_choose_orbit_full_prefix = n) /\ (exists wip_mod_left_choose_orbit_full_prefix_inverse_mod wip_mod_right_choose_orbit_full_prefix_inverse_mod. ((S wip_index_choose_orbit_full_prefix) * S wip_mate_choose_orbit_full_prefix) + p * wip_mod_left_choose_orbit_full_prefix_inverse_mod = 1 + p * wip_mod_right_choose_orbit_full_prefix_inverse_mod)))) - 0031
exact hprefix - 0032
have hstored : exists j. ((((exists wpo_beta_height_choose_orbit_stored_x_entry. wpo_beta_height_choose_orbit_stored_x_entry + S (j) = S ((S (x)) * v)) /\ exists wpo_beta_quotient_choose_orbit_stored_x_entry. u = wpo_beta_quotient_choose_orbit_stored_x_entry * S ((S (x)) * v) + (j))) /\ ((exists wip_gap_choose_orbit_stored_x_inverse_index_bound. wip_gap_choose_orbit_stored_x_inverse_index_bound + S x = n) /\ ((exists wip_gap_choose_orbit_stored_x_inverse_mate_bound. wip_gap_choose_orbit_stored_x_inverse_mate_bound + S j = n) /\ (exists wip_mod_left_choose_orbit_stored_x_inverse_mod wip_mod_right_choose_orbit_stored_x_inverse_mod. ((S x) * S j) + p * wip_mod_left_choose_orbit_stored_x_inverse_mod = 1 + p * wip_mod_right_choose_orbit_stored_x_inverse_mod)))) - 0033
specialize hprefix x - 0034
apply hprefix - 0035
exact hchoose_witness_left - 0036
cases hstored - 0037
cases hstored_witness - 0038
have hmate_nonendpoint : (~(x1 = 0) /\ ~((S x1) = n)) - 0039
specialize prime_inverse_prefix_nonendpoint_mate p - 0040
specialize prime_inverse_prefix_nonendpoint_mate n - 0041
specialize prime_inverse_prefix_nonendpoint_mate u - 0042
specialize prime_inverse_prefix_nonendpoint_mate v - 0043
specialize prime_inverse_prefix_nonendpoint_mate x - 0044
specialize prime_inverse_prefix_nonendpoint_mate x1 - 0045
apply prime_inverse_prefix_nonendpoint_mate - 0046
exact hpn - 0047
exact hp - 0048
exact hmate_prefix - 0049
exact hchoose_witness_left - 0050
exact hstored_witness_left - 0051
exact hchoose_witness_right_left - 0052
have hnonfixed : ~(x = x1) - 0053
intro hxx1 - 0054
specialize prime_inverse_prefix_nonendpoint_not_fixed p - 0055
specialize prime_inverse_prefix_nonendpoint_not_fixed n - 0056
specialize prime_inverse_prefix_nonendpoint_not_fixed u - 0057
specialize prime_inverse_prefix_nonendpoint_not_fixed v - 0058
specialize prime_inverse_prefix_nonendpoint_not_fixed x - 0059
specialize prime_inverse_prefix_nonendpoint_not_fixed x1 - 0060
apply prime_inverse_prefix_nonendpoint_not_fixed - 0061
exact hpn - 0062
exact hp - 0063
exact hnonfixed_prefix - 0064
exact hchoose_witness_left - 0065
exact hstored_witness_left - 0066
exact hchoose_witness_right_left - 0067
exact hxx1 - 0068
have hback : ((exists wpo_gap_choose_orbit_back_x_bound. wpo_gap_choose_orbit_back_x_bound + S (x1) = n) /\ (((exists wpo_beta_height_choose_orbit_back_x_entry. wpo_beta_height_choose_orbit_back_x_entry + S (x) = S ((S (x1)) * v)) /\ exists wpo_beta_quotient_choose_orbit_back_x_entry. u = wpo_beta_quotient_choose_orbit_back_x_entry * S ((S (x1)) * v) + (x)))) - 0069
specialize inverse_prefix_involutive p - 0070
specialize inverse_prefix_involutive n - 0071
specialize inverse_prefix_involutive u - 0072
specialize inverse_prefix_involutive v - 0073
specialize inverse_prefix_involutive x - 0074
specialize inverse_prefix_involutive x1 - 0075
apply inverse_prefix_involutive - 0076
exact hpn - 0077
exact hback_prefix - 0078
exact hchoose_witness_left - 0079
exact hstored_witness_left - 0080
cases hback - 0081
exists x - 0082
exists x1 - 0083
split - 0084
exact hchoose_witness_left - 0085
split - 0086
exact hchoose_witness_right_left - 0087
split - 0088
exact hchoose_witness_right_right - 0089
split - 0090
exact hstored_witness_left - 0091
split - 0092
exact hback_left - 0093
split - 0094
exact hmate_nonendpoint - 0095
split - 0096
exact hnonfixed - 0097
exact hback_right