Exact expanded PA statement
forall n b c. (forall fp_i_pigeon_bounded. (exists fp_gap_pigeon_bounded_index. fp_gap_pigeon_bounded_index + S fp_i_pigeon_bounded = n) -> exists fp_value_pigeon_bounded. ((((exists ff_h_pigeon_bounded_entry. ff_h_pigeon_bounded_entry + S (fp_value_pigeon_bounded) = S ((S (fp_i_pigeon_bounded)) * c)) /\ exists ff_q_pigeon_bounded_entry. b = ff_q_pigeon_bounded_entry * S ((S (fp_i_pigeon_bounded)) * c) + (fp_value_pigeon_bounded))) /\ (exists fp_gap_pigeon_bounded_value. fp_gap_pigeon_bounded_value + S fp_value_pigeon_bounded = n))) -> (forall fp_i_pigeon_injective fp_j_pigeon_injective fp_value_pigeon_injective. (exists fp_gap_pigeon_injective_i. fp_gap_pigeon_injective_i + S fp_i_pigeon_injective = n) -> (exists fp_gap_pigeon_injective_j. fp_gap_pigeon_injective_j + S fp_j_pigeon_injective = n) -> (((exists ff_h_pigeon_injective_left. ff_h_pigeon_injective_left + S (fp_value_pigeon_injective) = S ((S (fp_i_pigeon_injective)) * c)) /\ exists ff_q_pigeon_injective_left. b = ff_q_pigeon_injective_left * S ((S (fp_i_pigeon_injective)) * c) + (fp_value_pigeon_injective))) -> (((exists ff_h_pigeon_injective_right. ff_h_pigeon_injective_right + S (fp_value_pigeon_injective) = S ((S (fp_j_pigeon_injective)) * c)) /\ exists ff_q_pigeon_injective_right. b = ff_q_pigeon_injective_right * S ((S (fp_j_pigeon_injective)) * c) + (fp_value_pigeon_injective))) -> fp_i_pigeon_injective = fp_j_pigeon_injective) -> (forall fp_value_pigeon_surjective. (exists fp_gap_pigeon_surjective_value. fp_gap_pigeon_surjective_value + S fp_value_pigeon_surjective = n) -> exists fp_i_pigeon_surjective. ((exists fp_gap_pigeon_surjective_index. fp_gap_pigeon_surjective_index + S fp_i_pigeon_surjective = n) /\ (((exists ff_h_pigeon_surjective_entry. ff_h_pigeon_surjective_entry + S (fp_value_pigeon_surjective) = S ((S (fp_i_pigeon_surjective)) * c)) /\ exists ff_q_pigeon_surjective_entry. b = ff_q_pigeon_surjective_entry * S ((S (fp_i_pigeon_surjective)) * c) + (fp_value_pigeon_surjective)))))Structural proof guide
Generated structural guide
Every bounded injective beta-coded prefix is surjective onto its finite interval.
Use the direct prerequisites finite_surjective_zero, finite_contains_decidable, finite_bounded_last_succ, beta_prefix_swap_last_from_entries, finite_swap_last_bounded, finite_swap_last_injective, finite_bounded_prefix_without_top, finite_injective_prefix_succ, finite_surjective_succ_from_prefix, finite_swap_last_surjective_back, finite_no_top_successor_gate, beta_at_unique, le_succ, le_refl, lt_irrefl_expanded as previously established PA formulas.
The proof proceeds by structural induction (1), case analysis (9), intermediate claims (13), equality transport (1).
Referenced ingredients
PA004F finite_surjective_zero PA004H finite_contains_decidable PA004I finite_bounded_last_succ PA004K beta_prefix_swap_last_from_entries PA004M finite_swap_last_bounded PA004O finite_swap_last_injective PA004P finite_bounded_prefix_without_top PA004Q finite_injective_prefix_succ PA004T finite_surjective_succ_from_prefix PA004U finite_swap_last_surjective_back PA004V finite_no_top_successor_gate PA002F beta_at_unique PA002O le_succ PA001A le_refl PA0010 lt_irrefl_expandedProof neighborhood
Direct dependencies
PA004F finite_surjective_zero PA004H finite_contains_decidable PA004I finite_bounded_last_succ PA004K beta_prefix_swap_last_from_entries PA004M finite_swap_last_bounded PA004O finite_swap_last_injective PA004P finite_bounded_prefix_without_top PA004Q finite_injective_prefix_succ PA004T finite_surjective_succ_from_prefix PA004U finite_swap_last_surjective_back PA004V finite_no_top_successor_gate PA002F beta_at_unique PA002O le_succ PA001A le_refl PA0010 lt_irrefl_expandedDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Linked names are exact direct references. This Stable checked-use theorem is independently kernel-checked when replayed.
- 0001
induction n - 0002
intro b - 0003
intro c - 0004
intro hbounded - 0005
intro hinjective - 0006
specialize finite_surjective_zero b - 0007
specialize finite_surjective_zero c - 0008
specialize finite_surjective_zero 0 - 0009
apply finite_surjective_zero - 0010
refl - 0011
intro b - 0012
intro c - 0013
intro hbounded - 0014
intro hinjective - 0015
have hcontains : (exists fp_i_contains_top. ((exists fp_gap_contains_top_index. fp_gap_contains_top_index + S fp_i_contains_top = n) /\ (((exists ff_h_contains_top_entry. ff_h_contains_top_entry + S (n) = S ((S (fp_i_contains_top)) * c)) /\ exists ff_q_contains_top_entry. b = ff_q_contains_top_entry * S ((S (fp_i_contains_top)) * c) + (n))))) \/ ~(exists fp_i_contains_top. ((exists fp_gap_contains_top_index. fp_gap_contains_top_index + S fp_i_contains_top = n) /\ (((exists ff_h_contains_top_entry. ff_h_contains_top_entry + S (n) = S ((S (fp_i_contains_top)) * c)) /\ exists ff_q_contains_top_entry. b = ff_q_contains_top_entry * S ((S (fp_i_contains_top)) * c) + (n))))) - 0016
specialize finite_contains_decidable b - 0017
specialize finite_contains_decidable c - 0018
specialize finite_contains_decidable n - 0019
specialize finite_contains_decidable n - 0020
exact finite_contains_decidable - 0021
cases hcontains - 0022
cases hcontains_left - 0023
cases hcontains_left_witness - 0024
have hlast : exists y. (((exists h. h + S y = S ((S n) * c)) /\ exists q. b = q * S ((S n) * c) + y) /\ exists h. h + S y = S n) - 0025
specialize finite_bounded_last_succ b - 0026
specialize finite_bounded_last_succ c - 0027
specialize finite_bounded_last_succ n - 0028
specialize finite_bounded_last_succ (S n) - 0029
apply finite_bounded_last_succ - 0030
refl - 0031
exact hbounded - 0032
cases hlast - 0033
cases hlast_witness - 0034
have hswap : exists z d. ((((exists ff_h_pigeon_swap_new_i. ff_h_pigeon_swap_new_i + S (x1) = S ((S (x)) * d)) /\ exists ff_q_pigeon_swap_new_i. z = ff_q_pigeon_swap_new_i * S ((S (x)) * d) + (x1))) /\ ((((exists ff_h_pigeon_swap_new_n. ff_h_pigeon_swap_new_n + S (n) = S ((S (n)) * d)) /\ exists ff_q_pigeon_swap_new_n. z = ff_q_pigeon_swap_new_n * S ((S (n)) * d) + (n))) /\ forall j a. (exists h. h + S j = S n) -> ~(j = x) -> ~(j = n) -> (((exists ff_h_pigeon_swap_old_other. ff_h_pigeon_swap_old_other + S (a) = S ((S (j)) * c)) /\ exists ff_q_pigeon_swap_old_other. b = ff_q_pigeon_swap_old_other * S ((S (j)) * c) + (a))) -> (((exists ff_h_pigeon_swap_new_other. ff_h_pigeon_swap_new_other + S (a) = S ((S (j)) * d)) /\ exists ff_q_pigeon_swap_new_other. z = ff_q_pigeon_swap_new_other * S ((S (j)) * d) + (a))))) - 0035
specialize beta_prefix_swap_last_from_entries b - 0036
specialize beta_prefix_swap_last_from_entries c - 0037
specialize beta_prefix_swap_last_from_entries n - 0038
specialize beta_prefix_swap_last_from_entries x - 0039
specialize beta_prefix_swap_last_from_entries n - 0040
specialize beta_prefix_swap_last_from_entries x1 - 0041
apply beta_prefix_swap_last_from_entries - 0042
exact hcontains_left_witness_left - 0043
exact hcontains_left_witness_right - 0044
exact hlast_witness_left - 0045
cases hswap - 0046
cases hswap_witness - 0047
cases hswap_witness_witness - 0048
cases hswap_witness_witness_right - 0049
have hswap_bounded : forall fp_i_pigeon_swapped_bounded. (exists fp_gap_pigeon_swapped_bounded_index. fp_gap_pigeon_swapped_bounded_index + S fp_i_pigeon_swapped_bounded = S n) -> exists fp_value_pigeon_swapped_bounded. ((((exists ff_h_pigeon_swapped_bounded_entry. ff_h_pigeon_swapped_bounded_entry + S (fp_value_pigeon_swapped_bounded) = S ((S (fp_i_pigeon_swapped_bounded)) * x3)) /\ exists ff_q_pigeon_swapped_bounded_entry. x2 = ff_q_pigeon_swapped_bounded_entry * S ((S (fp_i_pigeon_swapped_bounded)) * x3) + (fp_value_pigeon_swapped_bounded))) /\ (exists fp_gap_pigeon_swapped_bounded_value. fp_gap_pigeon_swapped_bounded_value + S fp_value_pigeon_swapped_bounded = S n)) - 0050
specialize finite_swap_last_bounded b - 0051
specialize finite_swap_last_bounded c - 0052
specialize finite_swap_last_bounded x2 - 0053
specialize finite_swap_last_bounded x3 - 0054
specialize finite_swap_last_bounded n - 0055
specialize finite_swap_last_bounded (S n) - 0056
specialize finite_swap_last_bounded x - 0057
specialize finite_swap_last_bounded n - 0058
specialize finite_swap_last_bounded x1 - 0059
apply finite_swap_last_bounded - 0060
refl - 0061
exact hcontains_left_witness_left - 0062
exact hbounded - 0063
exact hcontains_left_witness_right - 0064
exact hlast_witness_left - 0065
exact hswap_witness_witness_left - 0066
exact hswap_witness_witness_right_left - 0067
exact hswap_witness_witness_right_right - 0068
have hswap_injective : forall fp_i_pigeon_swapped_injective fp_j_pigeon_swapped_injective fp_value_pigeon_swapped_injective. (exists fp_gap_pigeon_swapped_injective_i. fp_gap_pigeon_swapped_injective_i + S fp_i_pigeon_swapped_injective = S n) -> (exists fp_gap_pigeon_swapped_injective_j. fp_gap_pigeon_swapped_injective_j + S fp_j_pigeon_swapped_injective = S n) -> (((exists ff_h_pigeon_swapped_injective_left. ff_h_pigeon_swapped_injective_left + S (fp_value_pigeon_swapped_injective) = S ((S (fp_i_pigeon_swapped_injective)) * x3)) /\ exists ff_q_pigeon_swapped_injective_left. x2 = ff_q_pigeon_swapped_injective_left * S ((S (fp_i_pigeon_swapped_injective)) * x3) + (fp_value_pigeon_swapped_injective))) -> (((exists ff_h_pigeon_swapped_injective_right. ff_h_pigeon_swapped_injective_right + S (fp_value_pigeon_swapped_injective) = S ((S (fp_j_pigeon_swapped_injective)) * x3)) /\ exists ff_q_pigeon_swapped_injective_right. x2 = ff_q_pigeon_swapped_injective_right * S ((S (fp_j_pigeon_swapped_injective)) * x3) + (fp_value_pigeon_swapped_injective))) -> fp_i_pigeon_swapped_injective = fp_j_pigeon_swapped_injective - 0069
specialize finite_swap_last_injective b - 0070
specialize finite_swap_last_injective c - 0071
specialize finite_swap_last_injective x2 - 0072
specialize finite_swap_last_injective x3 - 0073
specialize finite_swap_last_injective n - 0074
specialize finite_swap_last_injective (S n) - 0075
specialize finite_swap_last_injective x - 0076
specialize finite_swap_last_injective n - 0077
specialize finite_swap_last_injective x1 - 0078
apply finite_swap_last_injective - 0079
refl - 0080
exact hcontains_left_witness_left - 0081
exact hinjective - 0082
exact hcontains_left_witness_right - 0083
exact hlast_witness_left - 0084
exact hswap_witness_witness_left - 0085
exact hswap_witness_witness_right_left - 0086
exact hswap_witness_witness_right_right - 0087
have hnotop : forall j. (exists h. h + S j = n) -> ~(((exists ff_h_pigeon_top_j. ff_h_pigeon_top_j + S (n) = S ((S (j)) * x3)) /\ exists ff_q_pigeon_top_j. x2 = ff_q_pigeon_top_j * S ((S (j)) * x3) + (n))) - 0088
intro j - 0089
intro hj - 0090
intro htop - 0091
have hjsn : exists h. h + S j = S n - 0092
specialize le_succ (S j) - 0093
specialize le_succ n - 0094
apply le_succ - 0095
exact hj - 0096
have hnsn : exists h. h + S n = S n - 0097
specialize le_refl (S n) - 0098
exact le_refl - 0099
have hjneq : j = n - 0100
specialize hswap_injective j - 0101
specialize hswap_injective n - 0102
specialize hswap_injective n - 0103
apply hswap_injective - 0104
exact hjsn - 0105
exact hnsn - 0106
exact htop - 0107
exact hswap_witness_witness_right_left - 0108
specialize lt_irrefl_expanded n - 0109
apply lt_irrefl_expanded - 0110
rewrite hjneq at hj - 0111
exact hj - 0112
have hprefix_bounded : forall fp_i_pigeon_swapped_prefix_bounded. (exists fp_gap_pigeon_swapped_prefix_bounded_index. fp_gap_pigeon_swapped_prefix_bounded_index + S fp_i_pigeon_swapped_prefix_bounded = n) -> exists fp_value_pigeon_swapped_prefix_bounded. ((((exists ff_h_pigeon_swapped_prefix_bounded_entry. ff_h_pigeon_swapped_prefix_bounded_entry + S (fp_value_pigeon_swapped_prefix_bounded) = S ((S (fp_i_pigeon_swapped_prefix_bounded)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_bounded_entry. x2 = ff_q_pigeon_swapped_prefix_bounded_entry * S ((S (fp_i_pigeon_swapped_prefix_bounded)) * x3) + (fp_value_pigeon_swapped_prefix_bounded))) /\ (exists fp_gap_pigeon_swapped_prefix_bounded_value. fp_gap_pigeon_swapped_prefix_bounded_value + S fp_value_pigeon_swapped_prefix_bounded = n)) - 0113
specialize finite_bounded_prefix_without_top x2 - 0114
specialize finite_bounded_prefix_without_top x3 - 0115
specialize finite_bounded_prefix_without_top n - 0116
specialize finite_bounded_prefix_without_top (S n) - 0117
apply finite_bounded_prefix_without_top - 0118
refl - 0119
exact hswap_bounded - 0120
exact hnotop - 0121
have hprefix_injective : forall fp_i_pigeon_swapped_prefix_injective fp_j_pigeon_swapped_prefix_injective fp_value_pigeon_swapped_prefix_injective. (exists fp_gap_pigeon_swapped_prefix_injective_i. fp_gap_pigeon_swapped_prefix_injective_i + S fp_i_pigeon_swapped_prefix_injective = n) -> (exists fp_gap_pigeon_swapped_prefix_injective_j. fp_gap_pigeon_swapped_prefix_injective_j + S fp_j_pigeon_swapped_prefix_injective = n) -> (((exists ff_h_pigeon_swapped_prefix_injective_left. ff_h_pigeon_swapped_prefix_injective_left + S (fp_value_pigeon_swapped_prefix_injective) = S ((S (fp_i_pigeon_swapped_prefix_injective)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_injective_left. x2 = ff_q_pigeon_swapped_prefix_injective_left * S ((S (fp_i_pigeon_swapped_prefix_injective)) * x3) + (fp_value_pigeon_swapped_prefix_injective))) -> (((exists ff_h_pigeon_swapped_prefix_injective_right. ff_h_pigeon_swapped_prefix_injective_right + S (fp_value_pigeon_swapped_prefix_injective) = S ((S (fp_j_pigeon_swapped_prefix_injective)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_injective_right. x2 = ff_q_pigeon_swapped_prefix_injective_right * S ((S (fp_j_pigeon_swapped_prefix_injective)) * x3) + (fp_value_pigeon_swapped_prefix_injective))) -> fp_i_pigeon_swapped_prefix_injective = fp_j_pigeon_swapped_prefix_injective - 0122
specialize finite_injective_prefix_succ x2 - 0123
specialize finite_injective_prefix_succ x3 - 0124
specialize finite_injective_prefix_succ n - 0125
specialize finite_injective_prefix_succ (S n) - 0126
apply finite_injective_prefix_succ - 0127
refl - 0128
exact hswap_injective - 0129
have hprefix_surjective : forall fp_value_pigeon_swapped_prefix_surjective. (exists fp_gap_pigeon_swapped_prefix_surjective_value. fp_gap_pigeon_swapped_prefix_surjective_value + S fp_value_pigeon_swapped_prefix_surjective = n) -> exists fp_i_pigeon_swapped_prefix_surjective. ((exists fp_gap_pigeon_swapped_prefix_surjective_index. fp_gap_pigeon_swapped_prefix_surjective_index + S fp_i_pigeon_swapped_prefix_surjective = n) /\ (((exists ff_h_pigeon_swapped_prefix_surjective_entry. ff_h_pigeon_swapped_prefix_surjective_entry + S (fp_value_pigeon_swapped_prefix_surjective) = S ((S (fp_i_pigeon_swapped_prefix_surjective)) * x3)) /\ exists ff_q_pigeon_swapped_prefix_surjective_entry. x2 = ff_q_pigeon_swapped_prefix_surjective_entry * S ((S (fp_i_pigeon_swapped_prefix_surjective)) * x3) + (fp_value_pigeon_swapped_prefix_surjective)))) - 0130
specialize IH x2 - 0131
specialize IH x3 - 0132
apply IH - 0133
exact hprefix_bounded - 0134
exact hprefix_injective - 0135
have hswap_surjective : forall fp_value_pigeon_swapped_surjective. (exists fp_gap_pigeon_swapped_surjective_value. fp_gap_pigeon_swapped_surjective_value + S fp_value_pigeon_swapped_surjective = S n) -> exists fp_i_pigeon_swapped_surjective. ((exists fp_gap_pigeon_swapped_surjective_index. fp_gap_pigeon_swapped_surjective_index + S fp_i_pigeon_swapped_surjective = S n) /\ (((exists ff_h_pigeon_swapped_surjective_entry. ff_h_pigeon_swapped_surjective_entry + S (fp_value_pigeon_swapped_surjective) = S ((S (fp_i_pigeon_swapped_surjective)) * x3)) /\ exists ff_q_pigeon_swapped_surjective_entry. x2 = ff_q_pigeon_swapped_surjective_entry * S ((S (fp_i_pigeon_swapped_surjective)) * x3) + (fp_value_pigeon_swapped_surjective)))) - 0136
specialize finite_surjective_succ_from_prefix x2 - 0137
specialize finite_surjective_succ_from_prefix x3 - 0138
specialize finite_surjective_succ_from_prefix n - 0139
specialize finite_surjective_succ_from_prefix (S n) - 0140
apply finite_surjective_succ_from_prefix - 0141
refl - 0142
exact hswap_bounded - 0143
exact hswap_injective - 0144
exact hprefix_surjective - 0145
specialize finite_swap_last_surjective_back b - 0146
specialize finite_swap_last_surjective_back c - 0147
specialize finite_swap_last_surjective_back x2 - 0148
specialize finite_swap_last_surjective_back x3 - 0149
specialize finite_swap_last_surjective_back n - 0150
specialize finite_swap_last_surjective_back (S n) - 0151
specialize finite_swap_last_surjective_back x - 0152
specialize finite_swap_last_surjective_back n - 0153
specialize finite_swap_last_surjective_back x1 - 0154
apply finite_swap_last_surjective_back - 0155
refl - 0156
exact hcontains_left_witness_left - 0157
exact hcontains_left_witness_right - 0158
exact hlast_witness_left - 0159
exact hswap_witness_witness_left - 0160
exact hswap_witness_witness_right_left - 0161
exact hswap_witness_witness_right_right - 0162
exact hswap_surjective - 0163
specialize finite_no_top_successor_gate b - 0164
specialize finite_no_top_successor_gate c - 0165
specialize finite_no_top_successor_gate n - 0166
specialize finite_no_top_successor_gate (S n) - 0167
apply finite_no_top_successor_gate - 0168
refl - 0169
exact hbounded - 0170
exact hinjective - 0171
exact hcontains_right - 0172
intro hprefix_bounded - 0173
intro hprefix_injective - 0174
specialize IH b - 0175
specialize IH c - 0176
apply IH - 0177
exact hprefix_bounded - 0178
exact hprefix_injective