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.
Statement with defined notation
∀ b. ∀ c. ∀ l. ∀ n. BitCount(b,c,l,n) → Le(n,l)Every purple notation token opens its conservative definition. Expanding the displayed statement recovers the exact first-order Peano-arithmetic formula checked by the unchanged kernel.
Definitions used by this theorem
In the theorem statement
2 occurrences
In local proof propositions
3 occurrences
Exact expanded native-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 = lProof neighborhood
Direct theorem prerequisites
Direct theorem dependents
Definition-aware tactic body
Only local propositions introduced by have or suffices are compacted. Every changed line has an exact-AST conservative-expansion receipt; the kernel still receives the immutable original tactic script.
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.
- L20
have hdecomp : ∃ a. ∃ r. BetaAt(b,c,l,a) ∧ (BitCount(b,c,l,r) ∧ ((a = 0 ∨ a = 1) ∧ n = r + a))Definitions: BetaAt(b,c,l,a)BitCount(b,c,l,r)Original native command in the exact edition - L21
specialize bit_count_succ_decompose b - L22
specialize bit_count_succ_decompose c - L23
specialize bit_count_succ_decompose l - L24
specialize bit_count_succ_decompose (S l) - L25
specialize bit_count_succ_decompose n - L26
apply bit_count_succ_decompose - L27
refl - L28
exact hcount
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 defined 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 : ∃ a. ∃ r. BetaAt(b,c,l,a) ∧ (BitCount(b,c,l,r) ∧ ((a = 0 ∨ a = 1) ∧ n = r + a))Exact native replay line
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 : Le(x1,l)Exact native replay line
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