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 l n. (((exists ff_u_b_sum ff_v_b_sum. ((((exists ff_h_b_sum_start. ff_h_b_sum_start + S (0) = S ((S (0)) * ff_v_b_sum)) /\ exists ff_q_b_sum_start. ff_u_b_sum = ff_q_b_sum_start * S ((S (0)) * ff_v_b_sum) + (0))) /\ ((((exists ff_h_b_sum_terminal. ff_h_b_sum_terminal + S (n) = S ((S (l)) * ff_v_b_sum)) /\ exists ff_q_b_sum_terminal. ff_u_b_sum = ff_q_b_sum_terminal * S ((S (l)) * ff_v_b_sum) + (n))) /\ forall ff_i_b_sum. (exists ff_lt_b_sum_bound. ff_lt_b_sum_bound + S ff_i_b_sum = l) -> exists ff_a_b_sum ff_r_b_sum ff_s_b_sum. ((((exists ff_h_b_sum_summand. ff_h_b_sum_summand + S (ff_a_b_sum) = S ((S (ff_i_b_sum)) * c)) /\ exists ff_q_b_sum_summand. b = ff_q_b_sum_summand * S ((S (ff_i_b_sum)) * c) + (ff_a_b_sum))) /\ ((((exists ff_h_b_sum_partial. ff_h_b_sum_partial + S (ff_r_b_sum) = S ((S (ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_partial. ff_u_b_sum = ff_q_b_sum_partial * S ((S (ff_i_b_sum)) * ff_v_b_sum) + (ff_r_b_sum))) /\ ((((exists ff_h_b_sum_successor. ff_h_b_sum_successor + S (ff_s_b_sum) = S ((S (S ff_i_b_sum)) * ff_v_b_sum)) /\ exists ff_q_b_sum_successor. ff_u_b_sum = ff_q_b_sum_successor * S ((S (S ff_i_b_sum)) * ff_v_b_sum) + (ff_s_b_sum))) /\ ff_s_b_sum = ff_r_b_sum + ff_a_b_sum)))))) /\ (forall ff_i_b_bits. (exists ff_lt_b_bits_bound. ff_lt_b_bits_bound + S ff_i_b_bits = l) -> exists ff_bit_b_bits. ((((exists ff_h_b_bits_decoded. ff_h_b_bits_decoded + S (ff_bit_b_bits) = S ((S (ff_i_b_bits)) * c)) /\ exists ff_q_b_bits_decoded. b = ff_q_b_bits_decoded * S ((S (ff_i_b_bits)) * c) + (ff_bit_b_bits))) /\ (ff_bit_b_bits = 0 \/ ff_bit_b_bits = 1))))) -> exists h. h + n = lStructural proof guide
A zero/one count never exceeds the length of its decoded prefix.
Direct prerequisites: bit_count_zero, bit_count_succ_decompose, add_succ_left, add_assoc. The authored body proceeds by structural induction (1), case analysis (7), intermediate claims (3), equality transport (10).
Proof neighborhood
Direct dependencies
Direct dependents
Formal native tactic body
Dependencies are hypotheses of the historical Alpha-v12 body receipt. The complete historical Alpha-v18 proof bundle independently checks every dependency; current Alpha v25 preserves that checked theorem use without changing Stable membership.
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 (4)
01Fix variables and assumptionsL1–2
02Induction on lL3–5
03Establish hnL6–13
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply bit count zero.
04Construct an explicit witnessL14–14
Supply the displayed value, then prove that it has the required property.
- L14
exists 0
05Calculate and transport equalitiesL15–17
06Fix variables and assumptionsL18–19
07Establish hdecompL20–28
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply bit count succ decompose.
08Separate the logical casesL29–33
09Establish hrL34–37
10Separate the logical casesL38–39
11Construct an explicit witnessL40–40
Supply the displayed value, then prove that it has the required property.
- L40
exists S x2
12Calculate and transport equalitiesL41–43
13Use earlier factsL44–45
14Calculate and transport equalitiesL46–47
15Use earlier factsL48–48
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L48
exact hr_witness
16Construct an explicit witnessL49–49
Supply the displayed value, then prove that it has the required property.
- L49
exists x2
17Calculate and transport equalitiesL50–53
18Use earlier factsL54–54
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L54
apply add_assoc
19Calculate and transport equalitiesL55–57
20Use earlier factsL58–58
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L58
exact hr_witness
Original exact command ledger · 58 lines
- 0001
intro b - 0002
intro c - 0003
induction l - 0004
intro n - 0005
intro hcount - 0006
have hn : n = 0 - 0007
specialize bit_count_zero b - 0008
specialize bit_count_zero c - 0009
specialize bit_count_zero 0 - 0010
specialize bit_count_zero n - 0011
apply bit_count_zero - 0012
refl - 0013
exact hcount - 0014
exists 0 - 0015
rewrite hn - 0016
rewrite PA3 - 0017
refl - 0018
intro n - 0019
intro hcount - 0020
have hdecomp : exists a r. (((exists ff_h_last. ff_h_last + S (a) = S ((S (l)) * c)) /\ exists ff_q_last. b = ff_q_last * S ((S (l)) * c) + (a))) /\ ((((exists ff_u_prefix_sum ff_v_prefix_sum. ((((exists ff_h_prefix_sum_start. ff_h_prefix_sum_start + S (0) = S ((S (0)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_start. ff_u_prefix_sum = ff_q_prefix_sum_start * S ((S (0)) * ff_v_prefix_sum) + (0))) /\ ((((exists ff_h_prefix_sum_terminal. ff_h_prefix_sum_terminal + S (r) = S ((S (l)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_terminal. ff_u_prefix_sum = ff_q_prefix_sum_terminal * S ((S (l)) * ff_v_prefix_sum) + (r))) /\ forall ff_i_prefix_sum. (exists ff_lt_prefix_sum_bound. ff_lt_prefix_sum_bound + S ff_i_prefix_sum = l) -> exists ff_a_prefix_sum ff_r_prefix_sum ff_s_prefix_sum. ((((exists ff_h_prefix_sum_summand. ff_h_prefix_sum_summand + S (ff_a_prefix_sum) = S ((S (ff_i_prefix_sum)) * c)) /\ exists ff_q_prefix_sum_summand. b = ff_q_prefix_sum_summand * S ((S (ff_i_prefix_sum)) * c) + (ff_a_prefix_sum))) /\ ((((exists ff_h_prefix_sum_partial. ff_h_prefix_sum_partial + S (ff_r_prefix_sum) = S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_partial. ff_u_prefix_sum = ff_q_prefix_sum_partial * S ((S (ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_r_prefix_sum))) /\ ((((exists ff_h_prefix_sum_successor. ff_h_prefix_sum_successor + S (ff_s_prefix_sum) = S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum)) /\ exists ff_q_prefix_sum_successor. ff_u_prefix_sum = ff_q_prefix_sum_successor * S ((S (S ff_i_prefix_sum)) * ff_v_prefix_sum) + (ff_s_prefix_sum))) /\ ff_s_prefix_sum = ff_r_prefix_sum + ff_a_prefix_sum)))))) /\ (forall ff_i_prefix_bits. (exists ff_lt_prefix_bits_bound. ff_lt_prefix_bits_bound + S ff_i_prefix_bits = l) -> exists ff_bit_prefix_bits. ((((exists ff_h_prefix_bits_decoded. ff_h_prefix_bits_decoded + S (ff_bit_prefix_bits) = S ((S (ff_i_prefix_bits)) * c)) /\ exists ff_q_prefix_bits_decoded. b = ff_q_prefix_bits_decoded * S ((S (ff_i_prefix_bits)) * c) + (ff_bit_prefix_bits))) /\ (ff_bit_prefix_bits = 0 \/ ff_bit_prefix_bits = 1))))) /\ ((a = 0 \/ a = 1) /\ n = r + a)) - 0021
specialize bit_count_succ_decompose b - 0022
specialize bit_count_succ_decompose c - 0023
specialize bit_count_succ_decompose l - 0024
specialize bit_count_succ_decompose (S l) - 0025
specialize bit_count_succ_decompose n - 0026
apply bit_count_succ_decompose - 0027
refl - 0028
exact hcount - 0029
cases hdecomp - 0030
cases hdecomp_witness - 0031
cases hdecomp_witness_witness - 0032
cases hdecomp_witness_witness_right - 0033
cases hdecomp_witness_witness_right_right - 0034
have hr : exists h. h + x1 = l - 0035
specialize IH x1 - 0036
apply IH - 0037
exact hdecomp_witness_witness_right_left - 0038
cases hr - 0039
cases hdecomp_witness_witness_right_right_left - 0040
exists S x2 - 0041
rewrite hdecomp_witness_witness_right_right_right - 0042
rewrite hdecomp_witness_witness_right_right_left_left - 0043
rewrite PA3 - 0044
specialize add_succ_left x2 - 0045
specialize add_succ_left x1 - 0046
rewrite add_succ_left - 0047
congr - 0048
exact hr_witness - 0049
exists x2 - 0050
rewrite hdecomp_witness_witness_right_right_right - 0051
rewrite hdecomp_witness_witness_right_right_left_right - 0052
trans (x2 + x1) + 1 - 0053
symm - 0054
apply add_assoc - 0055
rewrite PA4 - 0056
rewrite PA3 - 0057
congr - 0058
exact hr_witness