Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved. Exact original first-admission records.
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.
Read the argument
Proof checkpoints
This is a reading aid, not a new proof or a proof-tree certificate. Checkpoint groups are consecutive commands, not inferred branch boundaries. Every step links to the preserved script.
Named ingredients (14)
01Induction on nL1–10
Split the argument into the base and successor obligations. The induction hypothesis is available only in the successor branch.
02Fix variables and assumptionsL11–14
03Establish hcontainsL15–20
Establish this local claim before using it. It is not an additional assumption.
04Separate the logical casesL21–23
05Establish hlastL24–31
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply finite bounded last succ.
- L24
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) - L25
specialize finite_bounded_last_succ b - L26
specialize finite_bounded_last_succ c - L27
specialize finite_bounded_last_succ n - L28
specialize finite_bounded_last_succ (S n) - L29
apply finite_bounded_last_succ - L30
refl - L31
exact hbounded
06Separate the logical casesL32–33
07Establish hswapL34–43
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply beta prefix swap last from entries.
- L34
- L35
specialize beta_prefix_swap_last_from_entries b - L36
specialize beta_prefix_swap_last_from_entries c - L37
specialize beta_prefix_swap_last_from_entries n - L38
specialize beta_prefix_swap_last_from_entries x - L39
specialize beta_prefix_swap_last_from_entries n - L40
specialize beta_prefix_swap_last_from_entries x1 - L41
apply beta_prefix_swap_last_from_entries - L42
exact hcontains_left_witness_left - L43
exact hcontains_left_witness_right
08Use earlier factsL44–44
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L44
exact hlast_witness_left
09Separate the logical casesL45–48
10Establish hswap_boundedL49–58
Establish this local claim before using it. It is not an additional assumption.
- L49
have hswap_bounded : BoundedPrefix(x2,x3,S n)Definitions: BoundedPrefix - L50
specialize finite_swap_last_bounded b - L51
specialize finite_swap_last_bounded c - L52
specialize finite_swap_last_bounded x2 - L53
specialize finite_swap_last_bounded x3 - L54
specialize finite_swap_last_bounded n - L55
specialize finite_swap_last_bounded (S n) - L56
specialize finite_swap_last_bounded x - L57
specialize finite_swap_last_bounded n - L58
specialize finite_swap_last_bounded x1
11Use earlier factsL59–59
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L59
apply finite_swap_last_bounded
12Calculate and transport equalitiesL60–60
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L60
refl
13Use earlier factsL61–67
Instantiate or apply named facts and discharge the corresponding proof obligations.
14Establish hswap_injectiveL68–77
Establish this local claim before using it. It is not an additional assumption.
- L68
have hswap_injective : InjectivePrefix(x2,x3,S n)Definitions: InjectivePrefix - L69
specialize finite_swap_last_injective b - L70
specialize finite_swap_last_injective c - L71
specialize finite_swap_last_injective x2 - L72
specialize finite_swap_last_injective x3 - L73
specialize finite_swap_last_injective n - L74
specialize finite_swap_last_injective (S n) - L75
specialize finite_swap_last_injective x - L76
specialize finite_swap_last_injective n - L77
specialize finite_swap_last_injective x1
15Use earlier factsL78–78
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L78
apply finite_swap_last_injective
16Calculate and transport equalitiesL79–79
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L79
refl
17Use earlier factsL80–86
Instantiate or apply named facts and discharge the corresponding proof obligations.
18Establish hnotopL87–90
Establish this local claim before using it. It is not an additional assumption.
19Establish hjsnL91–95
20Establish hnsnL96–98
21Establish hjneqL99–108
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hswap injective.
22Use earlier factsL109–109
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L109
apply lt_irrefl_expanded
23Calculate and transport equalitiesL110–110
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L110
rewrite hjneq at hj
24Use earlier factsL111–111
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L111
exact hj
25Establish hprefix_boundedL112–120
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply finite bounded prefix without top.
- L112
have hprefix_bounded : BoundedPrefix(x2,x3,n)Definitions: BoundedPrefix - L113
specialize finite_bounded_prefix_without_top x2 - L114
specialize finite_bounded_prefix_without_top x3 - L115
specialize finite_bounded_prefix_without_top n - L116
specialize finite_bounded_prefix_without_top (S n) - L117
apply finite_bounded_prefix_without_top - L118
refl - L119
exact hswap_bounded - L120
exact hnotop
26Establish hprefix_injectiveL121–128
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply finite injective prefix succ.
- L121
have hprefix_injective : InjectivePrefix(x2,x3,n)Definitions: InjectivePrefix - L122
specialize finite_injective_prefix_succ x2 - L123
specialize finite_injective_prefix_succ x3 - L124
specialize finite_injective_prefix_succ n - L125
specialize finite_injective_prefix_succ (S n) - L126
apply finite_injective_prefix_succ - L127
refl - L128
exact hswap_injective
27Establish hprefix_surjectiveL129–134
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply IH.
28Establish hswap_surjectiveL135–144
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply finite surjective succ from prefix.
- L135
have hswap_surjective : SurjectivePrefix(x2,x3,S n)Definitions: SurjectivePrefix - L136
specialize finite_surjective_succ_from_prefix x2 - L137
specialize finite_surjective_succ_from_prefix x3 - L138
specialize finite_surjective_succ_from_prefix n - L139
specialize finite_surjective_succ_from_prefix (S n) - L140
apply finite_surjective_succ_from_prefix - L141
refl - L142
exact hswap_bounded - L143
exact hswap_injective - L144
exact hprefix_surjective
29Use earlier factsL145–154
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L145
specialize finite_swap_last_surjective_back b - L146
specialize finite_swap_last_surjective_back c - L147
specialize finite_swap_last_surjective_back x2 - L148
specialize finite_swap_last_surjective_back x3 - L149
specialize finite_swap_last_surjective_back n - L150
specialize finite_swap_last_surjective_back (S n) - L151
specialize finite_swap_last_surjective_back x - L152
specialize finite_swap_last_surjective_back n - L153
specialize finite_swap_last_surjective_back x1 - L154
apply finite_swap_last_surjective_back
30Calculate and transport equalitiesL155–155
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L155
refl
31Use earlier factsL156–165
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L156
exact hcontains_left_witness_left - L157
exact hcontains_left_witness_right - L158
exact hlast_witness_left - L159
exact hswap_witness_witness_left - L160
exact hswap_witness_witness_right_left - L161
exact hswap_witness_witness_right_right - L162
exact hswap_surjective - L163
specialize finite_no_top_successor_gate b - L164
specialize finite_no_top_successor_gate c - L165
specialize finite_no_top_successor_gate n
32Use earlier factsL166–167
33Calculate and transport equalitiesL168–168
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L168
refl
34Use earlier factsL169–171
35Fix variables and assumptionsL172–173
Original exact command ledger · 178 lines
- 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