Exact expanded PA statement
forall b c l. (forall fom_index_wpoi_terminal_bounded. (exists fom_gap_wpoi_terminal_bounded_index_bound. fom_gap_wpoi_terminal_bounded_index_bound + S (fom_index_wpoi_terminal_bounded) = l) -> exists fom_value_wpoi_terminal_bounded. ((((exists fom_beta_height_wpoi_terminal_bounded_entry. fom_beta_height_wpoi_terminal_bounded_entry + S (fom_value_wpoi_terminal_bounded) = S ((S (fom_index_wpoi_terminal_bounded)) * c)) /\ exists fom_beta_quotient_wpoi_terminal_bounded_entry. b = fom_beta_quotient_wpoi_terminal_bounded_entry * S ((S (fom_index_wpoi_terminal_bounded)) * c) + (fom_value_wpoi_terminal_bounded))) /\ (exists fom_gap_wpoi_terminal_bounded_value_bound. fom_gap_wpoi_terminal_bounded_value_bound + S (fom_value_wpoi_terminal_bounded) = S (S l)))) -> (forall wpo_position_wpoi_terminal_nonendpoint wpo_value_wpoi_terminal_nonendpoint. (exists wpo_gap_wpoi_terminal_nonendpoint_position_bound. wpo_gap_wpoi_terminal_nonendpoint_position_bound + S (wpo_position_wpoi_terminal_nonendpoint) = l) -> (((exists wpo_beta_height_wpoi_terminal_nonendpoint_entry. wpo_beta_height_wpoi_terminal_nonendpoint_entry + S (wpo_value_wpoi_terminal_nonendpoint) = S ((S (wpo_position_wpoi_terminal_nonendpoint)) * c)) /\ exists wpo_beta_quotient_wpoi_terminal_nonendpoint_entry. b = wpo_beta_quotient_wpoi_terminal_nonendpoint_entry * S ((S (wpo_position_wpoi_terminal_nonendpoint)) * c) + (wpo_value_wpoi_terminal_nonendpoint))) -> (~(wpo_value_wpoi_terminal_nonendpoint = 0) /\ ~((S wpo_value_wpoi_terminal_nonendpoint) = S (S l)))) -> (forall wpo_injective_left_wpoi_terminal_injective wpo_injective_right_wpoi_terminal_injective wpo_injective_value_wpoi_terminal_injective. (exists wpo_gap_wpoi_terminal_injective_left_bound. wpo_gap_wpoi_terminal_injective_left_bound + S (wpo_injective_left_wpoi_terminal_injective) = l) -> (exists wpo_gap_wpoi_terminal_injective_right_bound. wpo_gap_wpoi_terminal_injective_right_bound + S (wpo_injective_right_wpoi_terminal_injective) = l) -> (((exists wpo_beta_height_wpoi_terminal_injective_left_entry. wpo_beta_height_wpoi_terminal_injective_left_entry + S (wpo_injective_value_wpoi_terminal_injective) = S ((S (wpo_injective_left_wpoi_terminal_injective)) * c)) /\ exists wpo_beta_quotient_wpoi_terminal_injective_left_entry. b = wpo_beta_quotient_wpoi_terminal_injective_left_entry * S ((S (wpo_injective_left_wpoi_terminal_injective)) * c) + (wpo_injective_value_wpoi_terminal_injective))) -> (((exists wpo_beta_height_wpoi_terminal_injective_right_entry. wpo_beta_height_wpoi_terminal_injective_right_entry + S (wpo_injective_value_wpoi_terminal_injective) = S ((S (wpo_injective_right_wpoi_terminal_injective)) * c)) /\ exists wpo_beta_quotient_wpoi_terminal_injective_right_entry. b = wpo_beta_quotient_wpoi_terminal_injective_right_entry * S ((S (wpo_injective_right_wpoi_terminal_injective)) * c) + (wpo_injective_value_wpoi_terminal_injective))) -> wpo_injective_left_wpoi_terminal_injective = wpo_injective_right_wpoi_terminal_injective) -> forall s. (exists wpo_gap_wpoi_terminal_value_bound. wpo_gap_wpoi_terminal_value_bound + S (s) = S (S l)) -> (~(s = 0) /\ ~((S s) = S (S l))) -> (exists q. ((exists wpo_gap_wpoi_terminal_index_bound. wpo_gap_wpoi_terminal_index_bound + S (q) = l) /\ (((exists wpo_beta_height_wpoi_terminal_entry. wpo_beta_height_wpoi_terminal_entry + S (s) = S ((S (q)) * c)) /\ exists wpo_beta_quotient_wpoi_terminal_entry. b = wpo_beta_quotient_wpoi_terminal_entry * S ((S (q)) * c) + (s)))))Structural proof guide
Generated structural guide
A bounded injective terminal prefix covers exactly every nonendpoint value below n = l+2.
Use the direct prerequisites one_le_of_ne_zero, le_of_succ_le_succ, le_eq_or_lt, nonzero_is_succ, beta_magnitude_predecessor_recode_exists, beta_magnitude_predecessor_recode_surjective, beta_magnitude_predecessor_recode_reflect as previously established PA formulas.
The proof proceeds by case analysis (11), intermediate claims (14), equality transport (6).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA002L one_le_of_ne_zero PA000V le_of_succ_le_succ PA000W le_eq_or_lt PA001V nonzero_is_succ PA007D beta_magnitude_predecessor_recode_exists PA00B3 beta_magnitude_predecessor_recode_surjective PA007T beta_magnitude_predecessor_recode_reflectDirect 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 b - 0002
intro c - 0003
intro l - 0004
intro hbounded - 0005
intro hnonendpoint - 0006
intro hinjective - 0007
have hmagnitude : forall gmp_index_wpoi_terminal_magnitude_range. (exists gsp_lt_gap_wpoi_terminal_magnitude_range_index_bound. gsp_lt_gap_wpoi_terminal_magnitude_range_index_bound + S gmp_index_wpoi_terminal_magnitude_range = l) -> exists gmp_magnitude_wpoi_terminal_magnitude_range. ((((exists ff_h_gmp_wpoi_terminal_magnitude_range_decoded. ff_h_gmp_wpoi_terminal_magnitude_range_decoded + S (gmp_magnitude_wpoi_terminal_magnitude_range) = S ((S (gmp_index_wpoi_terminal_magnitude_range)) * c)) /\ exists ff_q_gmp_wpoi_terminal_magnitude_range_decoded. b = ff_q_gmp_wpoi_terminal_magnitude_range_decoded * S ((S (gmp_index_wpoi_terminal_magnitude_range)) * c) + (gmp_magnitude_wpoi_terminal_magnitude_range))) /\ ((exists gsp_lt_gap_wpoi_terminal_magnitude_range_positive. gsp_lt_gap_wpoi_terminal_magnitude_range_positive + S 0 = gmp_magnitude_wpoi_terminal_magnitude_range) /\ (exists gsp_le_gap_wpoi_terminal_magnitude_range_bounded. gsp_le_gap_wpoi_terminal_magnitude_range_bounded + gmp_magnitude_wpoi_terminal_magnitude_range = l))) - 0008
intro q - 0009
intro hq - 0010
have hbounded_entry : exists x. ((((exists wpo_beta_height_wpoi_terminal_source_entry_x. wpo_beta_height_wpoi_terminal_source_entry_x + S (x) = S ((S (q)) * c)) /\ exists wpo_beta_quotient_wpoi_terminal_source_entry_x. b = wpo_beta_quotient_wpoi_terminal_source_entry_x * S ((S (q)) * c) + (x))) /\ (exists wpo_gap_wpoi_terminal_source_bound_x. wpo_gap_wpoi_terminal_source_bound_x + S (x) = S (S l))) - 0011
specialize hbounded q - 0012
apply hbounded - 0013
exact hq - 0014
cases hbounded_entry - 0015
cases hbounded_entry_witness - 0016
have hxnonendpoint : ~(x = 0) /\ ~((S x) = S (S l)) - 0017
specialize hnonendpoint q - 0018
specialize hnonendpoint x - 0019
apply hnonendpoint - 0020
exact hq - 0021
exact hbounded_entry_witness_left - 0022
cases hxnonendpoint - 0023
exists x - 0024
split - 0025
exact hbounded_entry_witness_left - 0026
split - 0027
specialize one_le_of_ne_zero x - 0028
apply one_le_of_ne_zero - 0029
exact hxnonendpoint_left - 0030
have hxle_succ : exists h. h + x = S l - 0031
specialize le_of_succ_le_succ x - 0032
specialize le_of_succ_le_succ (S l) - 0033
apply le_of_succ_le_succ - 0034
exact hbounded_entry_witness_right - 0035
have hxsplit : x = S l \/ exists h. h + S x = S l - 0036
specialize le_eq_or_lt x - 0037
specialize le_eq_or_lt (S l) - 0038
apply le_eq_or_lt - 0039
exact hxle_succ - 0040
cases hxsplit - 0041
exfalso - 0042
apply hxnonendpoint_right - 0043
rewrite hxsplit_left - 0044
refl - 0045
specialize le_of_succ_le_succ x - 0046
specialize le_of_succ_le_succ l - 0047
apply le_of_succ_le_succ - 0048
exact hxsplit_right - 0049
have hrecode_exists : exists rb rc. (forall gmp_index_wpoi_terminal_recode gmp_predecessor_wpoi_terminal_recode. (exists gsp_lt_gap_wpoi_terminal_recode_index_bound. gsp_lt_gap_wpoi_terminal_recode_index_bound + S gmp_index_wpoi_terminal_recode = l) -> (((exists gsp_beta_height_gmp_wpoi_terminal_recode_source. gsp_beta_height_gmp_wpoi_terminal_recode_source + S (S gmp_predecessor_wpoi_terminal_recode) = S ((S (gmp_index_wpoi_terminal_recode)) * c)) /\ exists gsp_beta_quotient_gmp_wpoi_terminal_recode_source. b = gsp_beta_quotient_gmp_wpoi_terminal_recode_source * S ((S (gmp_index_wpoi_terminal_recode)) * c) + (S gmp_predecessor_wpoi_terminal_recode))) -> (((exists ff_h_gmp_wpoi_terminal_recode_target. ff_h_gmp_wpoi_terminal_recode_target + S (gmp_predecessor_wpoi_terminal_recode) = S ((S (gmp_index_wpoi_terminal_recode)) * rc)) /\ exists ff_q_gmp_wpoi_terminal_recode_target. rb = ff_q_gmp_wpoi_terminal_recode_target * S ((S (gmp_index_wpoi_terminal_recode)) * rc) + (gmp_predecessor_wpoi_terminal_recode)))) - 0050
specialize beta_magnitude_predecessor_recode_exists b - 0051
specialize beta_magnitude_predecessor_recode_exists c - 0052
specialize beta_magnitude_predecessor_recode_exists l - 0053
specialize beta_magnitude_predecessor_recode_exists l - 0054
apply beta_magnitude_predecessor_recode_exists - 0055
exact hmagnitude - 0056
cases hrecode_exists - 0057
cases hrecode_exists_witness - 0058
have hrecode : forall gmp_index_wpoi_terminal_recode_x gmp_predecessor_wpoi_terminal_recode_x. (exists gsp_lt_gap_wpoi_terminal_recode_x_index_bound. gsp_lt_gap_wpoi_terminal_recode_x_index_bound + S gmp_index_wpoi_terminal_recode_x = l) -> (((exists gsp_beta_height_gmp_wpoi_terminal_recode_x_source. gsp_beta_height_gmp_wpoi_terminal_recode_x_source + S (S gmp_predecessor_wpoi_terminal_recode_x) = S ((S (gmp_index_wpoi_terminal_recode_x)) * c)) /\ exists gsp_beta_quotient_gmp_wpoi_terminal_recode_x_source. b = gsp_beta_quotient_gmp_wpoi_terminal_recode_x_source * S ((S (gmp_index_wpoi_terminal_recode_x)) * c) + (S gmp_predecessor_wpoi_terminal_recode_x))) -> (((exists ff_h_gmp_wpoi_terminal_recode_x_target. ff_h_gmp_wpoi_terminal_recode_x_target + S (gmp_predecessor_wpoi_terminal_recode_x) = S ((S (gmp_index_wpoi_terminal_recode_x)) * x1)) /\ exists ff_q_gmp_wpoi_terminal_recode_x_target. x = ff_q_gmp_wpoi_terminal_recode_x_target * S ((S (gmp_index_wpoi_terminal_recode_x)) * x1) + (gmp_predecessor_wpoi_terminal_recode_x))) - 0059
exact hrecode_exists_witness_witness - 0060
have hsurjective : forall fp_value_wpoi_terminal_recode_surjective_x. (exists fp_gap_wpoi_terminal_recode_surjective_x_value. fp_gap_wpoi_terminal_recode_surjective_x_value + S fp_value_wpoi_terminal_recode_surjective_x = l) -> exists fp_i_wpoi_terminal_recode_surjective_x. ((exists fp_gap_wpoi_terminal_recode_surjective_x_index. fp_gap_wpoi_terminal_recode_surjective_x_index + S fp_i_wpoi_terminal_recode_surjective_x = l) /\ (((exists ff_h_wpoi_terminal_recode_surjective_x_entry. ff_h_wpoi_terminal_recode_surjective_x_entry + S (fp_value_wpoi_terminal_recode_surjective_x) = S ((S (fp_i_wpoi_terminal_recode_surjective_x)) * x1)) /\ exists ff_q_wpoi_terminal_recode_surjective_x_entry. x = ff_q_wpoi_terminal_recode_surjective_x_entry * S ((S (fp_i_wpoi_terminal_recode_surjective_x)) * x1) + (fp_value_wpoi_terminal_recode_surjective_x)))) - 0061
specialize beta_magnitude_predecessor_recode_surjective b - 0062
specialize beta_magnitude_predecessor_recode_surjective c - 0063
specialize beta_magnitude_predecessor_recode_surjective x - 0064
specialize beta_magnitude_predecessor_recode_surjective x1 - 0065
specialize beta_magnitude_predecessor_recode_surjective l - 0066
apply beta_magnitude_predecessor_recode_surjective - 0067
exact hmagnitude - 0068
exact hinjective - 0069
exact hrecode - 0070
intro s - 0071
intro hsbound - 0072
intro hsendpoints - 0073
cases hsendpoints - 0074
have hspred : exists r. s = S r - 0075
specialize nonzero_is_succ s - 0076
apply nonzero_is_succ - 0077
exact hsendpoints_left - 0078
cases hspred - 0079
have hsle : exists h. h + s = S l - 0080
specialize le_of_succ_le_succ s - 0081
specialize le_of_succ_le_succ (S l) - 0082
apply le_of_succ_le_succ - 0083
exact hsbound - 0084
rewrite hspred_witness at hsle - 0085
have hrle : exists h. h + x2 = l - 0086
specialize le_of_succ_le_succ x2 - 0087
specialize le_of_succ_le_succ l - 0088
apply le_of_succ_le_succ - 0089
exact hsle - 0090
have hrsplit : x2 = l \/ exists h. h + S x2 = l - 0091
specialize le_eq_or_lt x2 - 0092
specialize le_eq_or_lt l - 0093
apply le_eq_or_lt - 0094
exact hrle - 0095
cases hrsplit - 0096
exfalso - 0097
apply hsendpoints_right - 0098
rewrite hspred_witness - 0099
rewrite hrsplit_left - 0100
refl - 0101
have htarget : exists q. ((exists wpo_gap_wpoi_terminal_target_occurrence_bound. wpo_gap_wpoi_terminal_target_occurrence_bound + S (q) = l) /\ (((exists wpo_beta_height_wpoi_terminal_target_occurrence_entry. wpo_beta_height_wpoi_terminal_target_occurrence_entry + S (x2) = S ((S (q)) * x1)) /\ exists wpo_beta_quotient_wpoi_terminal_target_occurrence_entry. x = wpo_beta_quotient_wpoi_terminal_target_occurrence_entry * S ((S (q)) * x1) + (x2)))) - 0102
specialize hsurjective x2 - 0103
apply hsurjective - 0104
exact hrsplit_right - 0105
cases htarget - 0106
cases htarget_witness - 0107
have hsource : ((exists wpo_beta_height_wpoi_terminal_source_entry_x2_succ_r. wpo_beta_height_wpoi_terminal_source_entry_x2_succ_r + S (S x2) = S ((S (x3)) * c)) /\ exists wpo_beta_quotient_wpoi_terminal_source_entry_x2_succ_r. b = wpo_beta_quotient_wpoi_terminal_source_entry_x2_succ_r * S ((S (x3)) * c) + (S x2)) - 0108
specialize beta_magnitude_predecessor_recode_reflect b - 0109
specialize beta_magnitude_predecessor_recode_reflect c - 0110
specialize beta_magnitude_predecessor_recode_reflect x - 0111
specialize beta_magnitude_predecessor_recode_reflect x1 - 0112
specialize beta_magnitude_predecessor_recode_reflect l - 0113
specialize beta_magnitude_predecessor_recode_reflect l - 0114
specialize beta_magnitude_predecessor_recode_reflect x3 - 0115
specialize beta_magnitude_predecessor_recode_reflect x2 - 0116
apply beta_magnitude_predecessor_recode_reflect - 0117
exact hmagnitude - 0118
exact hrecode - 0119
exact htarget_witness_left - 0120
exact htarget_witness_right - 0121
exists x3 - 0122
split - 0123
exact htarget_witness_left - 0124
rewrite hspred_witness - 0125
rewrite hspred_witness - 0126
exact hsource