Exact expanded PA statement
forall b c z d n sn i x y. sn = S n -> (exists h. h + S i = n) -> (forall fp_i_swap_bound_old. (exists fp_gap_swap_bound_old_index. fp_gap_swap_bound_old_index + S fp_i_swap_bound_old = sn) -> exists fp_value_swap_bound_old. ((((exists ff_h_swap_bound_old_entry. ff_h_swap_bound_old_entry + S (fp_value_swap_bound_old) = S ((S (fp_i_swap_bound_old)) * c)) /\ exists ff_q_swap_bound_old_entry. b = ff_q_swap_bound_old_entry * S ((S (fp_i_swap_bound_old)) * c) + (fp_value_swap_bound_old))) /\ (exists fp_gap_swap_bound_old_value. fp_gap_swap_bound_old_value + S fp_value_swap_bound_old = sn))) -> (((exists ff_h_swap_bound_old_i. ff_h_swap_bound_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_bound_old_i. b = ff_q_swap_bound_old_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_swap_bound_old_n. ff_h_swap_bound_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_bound_old_n. b = ff_q_swap_bound_old_n * S ((S (n)) * c) + (y))) -> (((exists ff_h_swap_bound_new_i. ff_h_swap_bound_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_bound_new_i. z = ff_q_swap_bound_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_swap_bound_new_n. ff_h_swap_bound_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_bound_new_n. z = ff_q_swap_bound_new_n * S ((S (n)) * d) + (x))) -> (forall j a. (exists h. h + S j = S n) -> ~(j = i) -> ~(j = n) -> (((exists ff_h_swap_bound_old_j. ff_h_swap_bound_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_bound_old_j. b = ff_q_swap_bound_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_swap_bound_new_j. ff_h_swap_bound_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_bound_new_j. z = ff_q_swap_bound_new_j * S ((S (j)) * d) + (a)))) -> (forall fp_i_swap_bound_new. (exists fp_gap_swap_bound_new_index. fp_gap_swap_bound_new_index + S fp_i_swap_bound_new = sn) -> exists fp_value_swap_bound_new. ((((exists ff_h_swap_bound_new_entry. ff_h_swap_bound_new_entry + S (fp_value_swap_bound_new) = S ((S (fp_i_swap_bound_new)) * d)) /\ exists ff_q_swap_bound_new_entry. z = ff_q_swap_bound_new_entry * S ((S (fp_i_swap_bound_new)) * d) + (fp_value_swap_bound_new))) /\ (exists fp_gap_swap_bound_new_value. fp_gap_swap_bound_new_value + S fp_value_swap_bound_new = sn)))Structural proof guide
Generated structural guide
A swap-last recoding preserves boundedness of the full successor prefix.
Use the direct prerequisites finite_bounded_entry_lt, eq_decidable, le_succ, le_refl as previously established PA formulas.
The proof proceeds by case analysis (4), intermediate claims (9), equality transport (8).
Referenced ingredients
Proof neighborhood
Direct dependencies
Direct 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
intro b - 0002
intro c - 0003
intro z - 0004
intro d - 0005
intro n - 0006
intro sn - 0007
intro i - 0008
intro x - 0009
intro y - 0010
intro hsn - 0011
intro hi - 0012
intro hbounded - 0013
intro hold_i - 0014
intro hold_n - 0015
intro hnew_i - 0016
intro hnew_n - 0017
intro hpreserve - 0018
rewrite hsn at hbounded - 0019
rewrite hsn at hbounded - 0020
have hisn : exists h. h + S i = S n - 0021
specialize le_succ (S i) - 0022
specialize le_succ n - 0023
apply le_succ - 0024
exact hi - 0025
have hnsn : exists h. h + S n = S n - 0026
specialize le_refl (S n) - 0027
exact le_refl - 0028
have hentry_bound_i : forall b c l i x. (forall fp_i_entry_bound. (exists fp_gap_entry_bound_index. fp_gap_entry_bound_index + S fp_i_entry_bound = l) -> exists fp_value_entry_bound. ((((exists ff_h_entry_bound_entry. ff_h_entry_bound_entry + S (fp_value_entry_bound) = S ((S (fp_i_entry_bound)) * c)) /\ exists ff_q_entry_bound_entry. b = ff_q_entry_bound_entry * S ((S (fp_i_entry_bound)) * c) + (fp_value_entry_bound))) /\ (exists fp_gap_entry_bound_value. fp_gap_entry_bound_value + S fp_value_entry_bound = l))) -> (exists h. h + S i = l) -> (((exists ff_h_entry_bound_at. ff_h_entry_bound_at + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_bound_at. b = ff_q_entry_bound_at * S ((S (i)) * c) + (x))) -> exists h. h + S x = l - 0029
exact finite_bounded_entry_lt - 0030
have hentry_bound_n : forall b c l i x. (forall fp_i_entry_bound. (exists fp_gap_entry_bound_index. fp_gap_entry_bound_index + S fp_i_entry_bound = l) -> exists fp_value_entry_bound. ((((exists ff_h_entry_bound_entry. ff_h_entry_bound_entry + S (fp_value_entry_bound) = S ((S (fp_i_entry_bound)) * c)) /\ exists ff_q_entry_bound_entry. b = ff_q_entry_bound_entry * S ((S (fp_i_entry_bound)) * c) + (fp_value_entry_bound))) /\ (exists fp_gap_entry_bound_value. fp_gap_entry_bound_value + S fp_value_entry_bound = l))) -> (exists h. h + S i = l) -> (((exists ff_h_entry_bound_at. ff_h_entry_bound_at + S (x) = S ((S (i)) * c)) /\ exists ff_q_entry_bound_at. b = ff_q_entry_bound_at * S ((S (i)) * c) + (x))) -> exists h. h + S x = l - 0031
exact finite_bounded_entry_lt - 0032
have hxb : exists h. h + S x = S n - 0033
specialize hentry_bound_i b - 0034
specialize hentry_bound_i c - 0035
specialize hentry_bound_i (S n) - 0036
specialize hentry_bound_i i - 0037
specialize hentry_bound_i x - 0038
apply hentry_bound_i - 0039
exact hbounded - 0040
exact hisn - 0041
exact hold_i - 0042
have hyb : exists h. h + S y = S n - 0043
specialize hentry_bound_n b - 0044
specialize hentry_bound_n c - 0045
specialize hentry_bound_n (S n) - 0046
specialize hentry_bound_n n - 0047
specialize hentry_bound_n y - 0048
apply hentry_bound_n - 0049
exact hbounded - 0050
exact hnsn - 0051
exact hold_n - 0052
have heq_i : forall u v. u = v \/ ~(u = v) - 0053
exact eq_decidable - 0054
have heq_n : forall u v. u = v \/ ~(u = v) - 0055
exact eq_decidable - 0056
rewrite hsn - 0057
rewrite hsn - 0058
intro j - 0059
intro hj - 0060
specialize heq_i j - 0061
specialize heq_i i - 0062
cases heq_i - 0063
exists y - 0064
split - 0065
rewrite heq_i_left - 0066
rewrite heq_i_left - 0067
exact hnew_i - 0068
exact hyb - 0069
specialize heq_n j - 0070
specialize heq_n n - 0071
cases heq_n - 0072
exists x - 0073
split - 0074
rewrite heq_n_left - 0075
rewrite heq_n_left - 0076
exact hnew_n - 0077
exact hxb - 0078
specialize hbounded j - 0079
have hold : exists a. (((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a) /\ exists h. h + S a = S n) - 0080
apply hbounded - 0081
exact hj - 0082
cases hold - 0083
cases hold_witness - 0084
exists x1 - 0085
split - 0086
specialize hpreserve j - 0087
specialize hpreserve x1 - 0088
apply hpreserve - 0089
exact hj - 0090
exact heq_i_right - 0091
exact heq_n_right - 0092
exact hold_witness_left - 0093
exact hold_witness_right