Exact expanded PA statement
forall p n b c i j. p = S n -> ((~(p = 1) /\ forall wip_prime_left_orbit_prime wip_prime_right_orbit_prime. p = wip_prime_left_orbit_prime * wip_prime_right_orbit_prime -> wip_prime_left_orbit_prime = 1 \/ wip_prime_right_orbit_prime = 1)) -> (forall wip_index_orbit_prefix. (exists wip_gap_orbit_prefix_prefix_bound. wip_gap_orbit_prefix_prefix_bound + S wip_index_orbit_prefix = n) -> exists wip_mate_orbit_prefix. ((((exists wip_beta_height_orbit_prefix_decoded. wip_beta_height_orbit_prefix_decoded + S (wip_mate_orbit_prefix) = S ((S (wip_index_orbit_prefix)) * c)) /\ exists wip_beta_quotient_orbit_prefix_decoded. b = wip_beta_quotient_orbit_prefix_decoded * S ((S (wip_index_orbit_prefix)) * c) + (wip_mate_orbit_prefix))) /\ ((exists wip_gap_orbit_prefix_inverse_index_bound. wip_gap_orbit_prefix_inverse_index_bound + S wip_index_orbit_prefix = n) /\ ((exists wip_gap_orbit_prefix_inverse_mate_bound. wip_gap_orbit_prefix_inverse_mate_bound + S wip_mate_orbit_prefix = n) /\ (exists wip_mod_left_orbit_prefix_inverse_mod wip_mod_right_orbit_prefix_inverse_mod. ((S wip_index_orbit_prefix) * S wip_mate_orbit_prefix) + p * wip_mod_left_orbit_prefix_inverse_mod = 1 + p * wip_mod_right_orbit_prefix_inverse_mod))))) -> (exists wip_gap_orbit_source_bound. wip_gap_orbit_source_bound + S i = n) -> (((exists wip_beta_height_orbit_source_entry. wip_beta_height_orbit_source_entry + S (j) = S ((S (i)) * c)) /\ exists wip_beta_quotient_orbit_source_entry. b = wip_beta_quotient_orbit_source_entry * S ((S (i)) * c) + (j))) -> ((~(i = 0) /\ ~((S i) = n))) -> ((~(j = 0) /\ ~((S j) = n)))Structural proof guide
Generated structural guide
The decoded mate of a nonendpoint inverse index is also a nonendpoint.
Use the direct prerequisites prime_inverse_prefix_nonendpoint_not_fixed, inverse_prefix_involutive, prime_is_succ_succ, succ_injective, inverse_prefix_zero_fixed, inverse_prefix_last_fixed, beta_at_unique as previously established PA formulas.
The proof proceeds by case analysis (2), intermediate claims (15), equality transport (4).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA00AI prime_inverse_prefix_nonendpoint_not_fixed PA00AN inverse_prefix_involutive PA0061 prime_is_succ_succ PA003V succ_injective PA00AO inverse_prefix_zero_fixed PA00AP inverse_prefix_last_fixed PA002F beta_at_uniqueDirect 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 b - 0004
intro c - 0005
intro i - 0006
intro j - 0007
intro hpn - 0008
intro hp - 0009
intro hprefix - 0010
intro hi - 0011
intro hat - 0012
intro hnonendpoint - 0013
have hnonfixed : ~(i = j) - 0014
specialize prime_inverse_prefix_nonendpoint_not_fixed p - 0015
specialize prime_inverse_prefix_nonendpoint_not_fixed n - 0016
specialize prime_inverse_prefix_nonendpoint_not_fixed b - 0017
specialize prime_inverse_prefix_nonendpoint_not_fixed c - 0018
specialize prime_inverse_prefix_nonendpoint_not_fixed i - 0019
specialize prime_inverse_prefix_nonendpoint_not_fixed j - 0020
intro hij - 0021
apply prime_inverse_prefix_nonendpoint_not_fixed - 0022
exact hpn - 0023
exact hp - 0024
exact hprefix - 0025
exact hi - 0026
exact hat - 0027
exact hnonendpoint - 0028
exact hij - 0029
have horbit : ((exists wip_gap_orbit_mate_bound. wip_gap_orbit_mate_bound + S j = n) /\ (((exists wip_beta_height_orbit_back_entry. wip_beta_height_orbit_back_entry + S (i) = S ((S (j)) * c)) /\ exists wip_beta_quotient_orbit_back_entry. b = wip_beta_quotient_orbit_back_entry * S ((S (j)) * c) + (i)))) - 0030
specialize inverse_prefix_involutive p - 0031
specialize inverse_prefix_involutive n - 0032
specialize inverse_prefix_involutive b - 0033
specialize inverse_prefix_involutive c - 0034
specialize inverse_prefix_involutive i - 0035
specialize inverse_prefix_involutive j - 0036
apply inverse_prefix_involutive - 0037
exact hpn - 0038
exact hprefix - 0039
exact hi - 0040
exact hat - 0041
cases horbit - 0042
have hsucc_shape : forall a d. S a = S d -> a = d - 0043
exact succ_injective - 0044
have hsucc_mate : forall a d. S a = S d -> a = d - 0045
exact succ_injective - 0046
have hprime_shape : exists k. p = S (S k) - 0047
specialize prime_is_succ_succ p - 0048
apply prime_is_succ_succ - 0049
exact hp - 0050
cases hprime_shape - 0051
have hnk : n = S x - 0052
specialize hsucc_shape n - 0053
specialize hsucc_shape (S x) - 0054
apply hsucc_shape - 0055
trans p - 0056
symm - 0057
exact hpn - 0058
exact hprime_shape_witness - 0059
have hzero : ((exists wio_beta_height_orbit_zero_fixed. wio_beta_height_orbit_zero_fixed + S (0) = S ((S (0)) * c)) /\ exists wio_beta_quotient_orbit_zero_fixed. b = wio_beta_quotient_orbit_zero_fixed * S ((S (0)) * c) + (0)) - 0060
specialize inverse_prefix_zero_fixed p - 0061
specialize inverse_prefix_zero_fixed n - 0062
specialize inverse_prefix_zero_fixed x - 0063
specialize inverse_prefix_zero_fixed b - 0064
specialize inverse_prefix_zero_fixed c - 0065
apply inverse_prefix_zero_fixed - 0066
exact hpn - 0067
exact hnk - 0068
exact hprefix - 0069
have hlast : ((exists wip_beta_height_orbit_last_fixed. wip_beta_height_orbit_last_fixed + S (x) = S ((S (x)) * c)) /\ exists wip_beta_quotient_orbit_last_fixed. b = wip_beta_quotient_orbit_last_fixed * S ((S (x)) * c) + (x)) - 0070
specialize inverse_prefix_last_fixed p - 0071
specialize inverse_prefix_last_fixed n - 0072
specialize inverse_prefix_last_fixed x - 0073
specialize inverse_prefix_last_fixed b - 0074
specialize inverse_prefix_last_fixed c - 0075
apply inverse_prefix_last_fixed - 0076
exact hpn - 0077
exact hnk - 0078
exact hprefix - 0079
split - 0080
intro hjzero - 0081
have hback_zero_raw : ((exists wip_beta_height_orbit_back_entry. wip_beta_height_orbit_back_entry + S (i) = S ((S (j)) * c)) /\ exists wip_beta_quotient_orbit_back_entry. b = wip_beta_quotient_orbit_back_entry * S ((S (j)) * c) + (i)) - 0082
exact horbit_right - 0083
have hback_zero : ((exists wio_beta_height_orbit_back_zero. wio_beta_height_orbit_back_zero + S (i) = S ((S (0)) * c)) /\ exists wio_beta_quotient_orbit_back_zero. b = wio_beta_quotient_orbit_back_zero * S ((S (0)) * c) + (i)) - 0084
rewrite hjzero at hback_zero_raw - 0085
rewrite hjzero at hback_zero_raw - 0086
exact hback_zero_raw - 0087
have hi0 : i = 0 - 0088
specialize beta_at_unique b - 0089
specialize beta_at_unique c - 0090
specialize beta_at_unique 0 - 0091
specialize beta_at_unique i - 0092
specialize beta_at_unique 0 - 0093
apply beta_at_unique - 0094
exact hback_zero - 0095
exact hzero - 0096
apply hnonfixed - 0097
trans 0 - 0098
exact hi0 - 0099
symm - 0100
exact hjzero - 0101
intro hjlast - 0102
have hjx : j = x - 0103
specialize hsucc_mate j - 0104
specialize hsucc_mate x - 0105
apply hsucc_mate - 0106
trans n - 0107
exact hjlast - 0108
exact hnk - 0109
have hback_last_raw : ((exists wip_beta_height_orbit_back_entry. wip_beta_height_orbit_back_entry + S (i) = S ((S (j)) * c)) /\ exists wip_beta_quotient_orbit_back_entry. b = wip_beta_quotient_orbit_back_entry * S ((S (j)) * c) + (i)) - 0110
exact horbit_right - 0111
have hback_last : ((exists wip_beta_height_orbit_back_last. wip_beta_height_orbit_back_last + S (i) = S ((S (x)) * c)) /\ exists wip_beta_quotient_orbit_back_last. b = wip_beta_quotient_orbit_back_last * S ((S (x)) * c) + (i)) - 0112
rewrite hjx at hback_last_raw - 0113
rewrite hjx at hback_last_raw - 0114
exact hback_last_raw - 0115
have hix : i = x - 0116
specialize beta_at_unique b - 0117
specialize beta_at_unique c - 0118
specialize beta_at_unique x - 0119
specialize beta_at_unique i - 0120
specialize beta_at_unique x - 0121
apply beta_at_unique - 0122
exact hback_last - 0123
exact hlast - 0124
apply hnonfixed - 0125
trans x - 0126
exact hix - 0127
symm - 0128
exact hjx