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 b c z d n sn i x y. sn = S n -> (exists h. h + S i = n) -> (((exists ff_h_swap_surj_old_i. ff_h_swap_surj_old_i + S (x) = S ((S (i)) * c)) /\ exists ff_q_swap_surj_old_i. b = ff_q_swap_surj_old_i * S ((S (i)) * c) + (x))) -> (((exists ff_h_swap_surj_old_n. ff_h_swap_surj_old_n + S (y) = S ((S (n)) * c)) /\ exists ff_q_swap_surj_old_n. b = ff_q_swap_surj_old_n * S ((S (n)) * c) + (y))) -> (((exists ff_h_swap_surj_new_i. ff_h_swap_surj_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_swap_surj_new_i. z = ff_q_swap_surj_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_swap_surj_new_n. ff_h_swap_surj_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_swap_surj_new_n. z = ff_q_swap_surj_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_surj_old_j. ff_h_swap_surj_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_swap_surj_old_j. b = ff_q_swap_surj_old_j * S ((S (j)) * c) + (a))) -> (((exists ff_h_swap_surj_new_j. ff_h_swap_surj_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_swap_surj_new_j. z = ff_q_swap_surj_new_j * S ((S (j)) * d) + (a)))) -> (forall fp_value_swap_surj_new. (exists fp_gap_swap_surj_new_value. fp_gap_swap_surj_new_value + S fp_value_swap_surj_new = sn) -> exists fp_i_swap_surj_new. ((exists fp_gap_swap_surj_new_index. fp_gap_swap_surj_new_index + S fp_i_swap_surj_new = sn) /\ (((exists ff_h_swap_surj_new_entry. ff_h_swap_surj_new_entry + S (fp_value_swap_surj_new) = S ((S (fp_i_swap_surj_new)) * d)) /\ exists ff_q_swap_surj_new_entry. z = ff_q_swap_surj_new_entry * S ((S (fp_i_swap_surj_new)) * d) + (fp_value_swap_surj_new))))) -> (forall fp_value_swap_surj_old. (exists fp_gap_swap_surj_old_value. fp_gap_swap_surj_old_value + S fp_value_swap_surj_old = sn) -> exists fp_i_swap_surj_old. ((exists fp_gap_swap_surj_old_index. fp_gap_swap_surj_old_index + S fp_i_swap_surj_old = sn) /\ (((exists ff_h_swap_surj_old_entry. ff_h_swap_surj_old_entry + S (fp_value_swap_surj_old) = S ((S (fp_i_swap_surj_old)) * c)) /\ exists ff_q_swap_surj_old_entry. b = ff_q_swap_surj_old_entry * S ((S (fp_i_swap_surj_old)) * c) + (fp_value_swap_surj_old)))))Structural proof guide
Generated structural guide
Surjectivity of a swapped successor prefix transports back to the original code.
Use the direct prerequisites beta_prefix_swap_last_reflect, le_succ, le_refl as previously established PA formulas.
The proof proceeds by case analysis (8), intermediate claims (6), 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.
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 (3)
01Fix variables and assumptionsL1–10
02Fix variables and assumptionsL11–17
03Calculate and transport equalitiesL18–19
04Establish hisnL20–24
05Establish hnsnL25–27
06Establish hreflectL28–37
Establish this local claim before using it. It is not an additional assumption.
- L28
have hreflect : ∀ b. ∀ c. ∀ z. ∀ d. ∀ n. ∀ i. ∀ x. ∀ y. BetaAt(z,d,i,y) → BetaAt(z,d,n,x) → (∀ m. ∀ k. Lt(m,S n) → ¬m = i → ¬m = n → BetaAt(b,c,m,k) → BetaAt(z,d,m,k)) → ∀ m. ∀ k. Lt(m,S n) → BetaAt(z,d,m,k) → m = i ∧ k = y ∨ (m = n ∧ k = x ∨ ¬m = i ∧ (¬m = n ∧ BetaAt(b,c,m,k)))Definitions: LtBetaAt - L29
exact beta_prefix_swap_last_reflect - L30
specialize hreflect b - L31
specialize hreflect c - L32
specialize hreflect z - L33
specialize hreflect d - L34
specialize hreflect n - L35
specialize hreflect i - L36
specialize hreflect x - L37
specialize hreflect y
07Establish hreflect_entriesL38–47
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hreflect.
- L38
have hreflect_entries : forall j a. (exists h. h + S j = S n) -> ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a) -> ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a))))) - L39
apply hreflect - L40
exact hnew_i - L41
exact hnew_n - L42
exact hpreserve - L43
rewrite hsn - L44
rewrite hsn - L45
intro a - L46
intro ha - L47
specialize hsurjective a
08Establish hoccursL48–50
09Separate the logical casesL51–52
10Use earlier factsL53–54
11Establish hsourceL55–58
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hreflect entries.
12Separate the logical casesL59–60
13Construct an explicit witnessL61–61
Supply the displayed value, then prove that it has the required property.
- L61
exists n
14Separate the logical casesL62–62
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L62
split
15Use earlier factsL63–63
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L63
exact hnsn
16Calculate and transport equalitiesL64–65
17Use earlier factsL66–66
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L66
exact hold_n
18Separate the logical casesL67–68
19Construct an explicit witnessL69–69
Supply the displayed value, then prove that it has the required property.
- L69
exists i
20Separate the logical casesL70–70
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L70
split
21Use earlier factsL71–71
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L71
exact hisn
22Calculate and transport equalitiesL72–73
23Use earlier factsL74–74
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L74
exact hold_i
24Separate the logical casesL75–76
25Construct an explicit witnessL77–77
Supply the displayed value, then prove that it has the required property.
- L77
exists x1
26Separate the logical casesL78–78
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L78
split
Original exact command ledger · 80 lines
- 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 hold_i - 0013
intro hold_n - 0014
intro hnew_i - 0015
intro hnew_n - 0016
intro hpreserve - 0017
intro hsurjective - 0018
rewrite hsn at hsurjective - 0019
rewrite hsn at hsurjective - 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 hreflect : forall b c z d n i x y. (((exists ff_h_reflect_new_i. ff_h_reflect_new_i + S (y) = S ((S (i)) * d)) /\ exists ff_q_reflect_new_i. z = ff_q_reflect_new_i * S ((S (i)) * d) + (y))) -> (((exists ff_h_reflect_new_n. ff_h_reflect_new_n + S (x) = S ((S (n)) * d)) /\ exists ff_q_reflect_new_n. z = ff_q_reflect_new_n * S ((S (n)) * d) + (x))) -> (forall k v. (exists h. h + S k = S n) -> ~(k = i) -> ~(k = n) -> (((exists ff_h_reflect_old_k. ff_h_reflect_old_k + S (v) = S ((S (k)) * c)) /\ exists ff_q_reflect_old_k. b = ff_q_reflect_old_k * S ((S (k)) * c) + (v))) -> (((exists ff_h_reflect_new_k. ff_h_reflect_new_k + S (v) = S ((S (k)) * d)) /\ exists ff_q_reflect_new_k. z = ff_q_reflect_new_k * S ((S (k)) * d) + (v)))) -> forall j a. (exists h. h + S j = S n) -> (((exists ff_h_reflect_new_j. ff_h_reflect_new_j + S (a) = S ((S (j)) * d)) /\ exists ff_q_reflect_new_j. z = ff_q_reflect_new_j * S ((S (j)) * d) + (a))) -> ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ (((exists ff_h_reflect_old_j. ff_h_reflect_old_j + S (a) = S ((S (j)) * c)) /\ exists ff_q_reflect_old_j. b = ff_q_reflect_old_j * S ((S (j)) * c) + (a))))))) - 0029
exact beta_prefix_swap_last_reflect - 0030
specialize hreflect b - 0031
specialize hreflect c - 0032
specialize hreflect z - 0033
specialize hreflect d - 0034
specialize hreflect n - 0035
specialize hreflect i - 0036
specialize hreflect x - 0037
specialize hreflect y - 0038
have hreflect_entries : forall j a. (exists h. h + S j = S n) -> ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a) -> ((j = i /\ a = y) \/ ((j = n /\ a = x) \/ (~(j = i) /\ (~(j = n) /\ ((exists h. h + S a = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + a))))) - 0039
apply hreflect - 0040
exact hnew_i - 0041
exact hnew_n - 0042
exact hpreserve - 0043
rewrite hsn - 0044
rewrite hsn - 0045
intro a - 0046
intro ha - 0047
specialize hsurjective a - 0048
have hoccurs : exists j. ((exists h. h + S j = S n) /\ ((exists h. h + S a = S ((S j) * d)) /\ exists q. z = q * S ((S j) * d) + a)) - 0049
apply hsurjective - 0050
exact ha - 0051
cases hoccurs - 0052
cases hoccurs_witness - 0053
specialize hreflect_entries x1 - 0054
specialize hreflect_entries a - 0055
have hsource : ((x1 = i /\ a = y) \/ ((x1 = n /\ a = x) \/ (~(x1 = i) /\ (~(x1 = n) /\ ((exists h. h + S a = S ((S x1) * c)) /\ exists q. b = q * S ((S x1) * c) + a))))) - 0056
apply hreflect_entries - 0057
exact hoccurs_witness_left - 0058
exact hoccurs_witness_right - 0059
cases hsource - 0060
cases hsource_left - 0061
exists n - 0062
split - 0063
exact hnsn - 0064
rewrite hsource_left_right - 0065
rewrite hsource_left_right - 0066
exact hold_n - 0067
cases hsource_right - 0068
cases hsource_right_left - 0069
exists i - 0070
split - 0071
exact hisn - 0072
rewrite hsource_right_left_right - 0073
rewrite hsource_right_left_right - 0074
exact hold_i - 0075
cases hsource_right_right - 0076
cases hsource_right_right_right - 0077
exists x1 - 0078
split - 0079
exact hoccurs_witness_left - 0080
exact hsource_right_right_right_right