BD000E

binary_digit_prefix_bit_count_exists

Every actual beta-coded binary prefix has an independently beta-witnessed exact population count.

Alpha v34 checked-use · first admitted v23 · independently kernel and Lean verified; not Stable

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.

The exact G102 milestone is fully proved for every natural exponent and every modulus greater than one, including actual canonical digits, a beta-coded accumulator execution, modular-power correctness, and the formal bound k≤3·BitLen(e)+2. The independent T13 determinant/rank/integer-span substrate is now closed in the separate Alpha-v27 integer-linear-algebra branch. Full T13 proof · Alpha v27

Exact theorem in conservative defined notation

∀ b. ∀ c. ∀ l. BinaryDigitPrefix(b,c,l) → ∃ x. BitCount(b,c,l,x)

Every linked abbreviation expands hygienically to the identical original native formula.

Definition DAG

Actual proof prerequisites

binary_digit_prefix_all_bitsbit_count_exists · checked external prerequisite
Original expanded first-order statement
forall b c l. (forall ff_index_be_bd_old ff_digit_be_bd_old. (exists ff_lt_be_bd_old_bound. ff_lt_be_bd_old_bound + S ff_index_be_bd_old = l) -> (((exists ff_h_be_bd_old_digit. ff_h_be_bd_old_digit + S (ff_digit_be_bd_old) = S ((S (ff_index_be_bd_old)) * c)) /\ exists ff_q_be_bd_old_digit. b = ff_q_be_bd_old_digit * S ((S (ff_index_be_bd_old)) * c) + (ff_digit_be_bd_old))) -> (ff_digit_be_bd_old = 0 \/ ff_digit_be_bd_old = 1)) -> exists ones. (((exists ff_u_bd_prefix_count_sum ff_v_bd_prefix_count_sum. ((((exists ff_h_bd_prefix_count_sum_start. ff_h_bd_prefix_count_sum_start + S (0) = S ((S (0)) * ff_v_bd_prefix_count_sum)) /\ exists ff_q_bd_prefix_count_sum_start. ff_u_bd_prefix_count_sum = ff_q_bd_prefix_count_sum_start * S ((S (0)) * ff_v_bd_prefix_count_sum) + (0))) /\ ((((exists ff_h_bd_prefix_count_sum_terminal. ff_h_bd_prefix_count_sum_terminal + S (ones) = S ((S (l)) * ff_v_bd_prefix_count_sum)) /\ exists ff_q_bd_prefix_count_sum_terminal. ff_u_bd_prefix_count_sum = ff_q_bd_prefix_count_sum_terminal * S ((S (l)) * ff_v_bd_prefix_count_sum) + (ones))) /\ forall ff_i_bd_prefix_count_sum. (exists ff_lt_bd_prefix_count_sum_bound. ff_lt_bd_prefix_count_sum_bound + S ff_i_bd_prefix_count_sum = l) -> exists ff_a_bd_prefix_count_sum ff_r_bd_prefix_count_sum ff_s_bd_prefix_count_sum. ((((exists ff_h_bd_prefix_count_sum_summand. ff_h_bd_prefix_count_sum_summand + S (ff_a_bd_prefix_count_sum) = S ((S (ff_i_bd_prefix_count_sum)) * c)) /\ exists ff_q_bd_prefix_count_sum_summand. b = ff_q_bd_prefix_count_sum_summand * S ((S (ff_i_bd_prefix_count_sum)) * c) + (ff_a_bd_prefix_count_sum))) /\ ((((exists ff_h_bd_prefix_count_sum_partial. ff_h_bd_prefix_count_sum_partial + S (ff_r_bd_prefix_count_sum) = S ((S (ff_i_bd_prefix_count_sum)) * ff_v_bd_prefix_count_sum)) /\ exists ff_q_bd_prefix_count_sum_partial. ff_u_bd_prefix_count_sum = ff_q_bd_prefix_count_sum_partial * S ((S (ff_i_bd_prefix_count_sum)) * ff_v_bd_prefix_count_sum) + (ff_r_bd_prefix_count_sum))) /\ ((((exists ff_h_bd_prefix_count_sum_successor. ff_h_bd_prefix_count_sum_successor + S (ff_s_bd_prefix_count_sum) = S ((S (S ff_i_bd_prefix_count_sum)) * ff_v_bd_prefix_count_sum)) /\ exists ff_q_bd_prefix_count_sum_successor. ff_u_bd_prefix_count_sum = ff_q_bd_prefix_count_sum_successor * S ((S (S ff_i_bd_prefix_count_sum)) * ff_v_bd_prefix_count_sum) + (ff_s_bd_prefix_count_sum))) /\ ff_s_bd_prefix_count_sum = ff_r_bd_prefix_count_sum + ff_a_bd_prefix_count_sum)))))) /\ (forall ff_i_bd_prefix_count_bits. (exists ff_lt_bd_prefix_count_bits_bound. ff_lt_bd_prefix_count_bits_bound + S ff_i_bd_prefix_count_bits = l) -> exists ff_bit_bd_prefix_count_bits. ((((exists ff_h_bd_prefix_count_bits_decoded. ff_h_bd_prefix_count_bits_decoded + S (ff_bit_bd_prefix_count_bits) = S ((S (ff_i_bd_prefix_count_bits)) * c)) /\ exists ff_q_bd_prefix_count_bits_decoded. b = ff_q_bd_prefix_count_bits_decoded * S ((S (ff_i_bd_prefix_count_bits)) * c) + (ff_bit_bd_prefix_count_bits))) /\ (ff_bit_bd_prefix_count_bits = 0 \/ ff_bit_bd_prefix_count_bits = 1)))))

Complete unchanged native tactic proof

All 15 lines are the exact independently kernel-checked original script.

Read the argument

Proof checkpoints

15 script commands · 3 reading checkpoints · 1 local claims

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.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

Named ingredients (1)
01Fix variables and assumptionsL1–4

Work with arbitrary variables or the premises of the current implication.

  1. L1
    intro b
  2. L2
    intro c
  3. L3
    intro l
  4. L4
    intro hdigits
02Establish hallL5–14

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply binary digit prefix all bits.

  1. L5
    have hall : (forall ff_i_bd_count_all. (exists ff_lt_bd_count_all_bound. ff_lt_bd_count_all_bound + S ff_i_bd_count_all = l) -> exists ff_bit_bd_count_all. ((((exists ff_h_bd_count_all_decoded. ff_h_bd_count_all_decoded + S (ff_bit_bd_count_all) = S ((S (ff_i_bd_count_all)) * c)) /\ exists ff_q_bd_count_all_decoded. b = ff_q_bd_count_all_decoded * S ((S (ff_i_bd_count_all)) * c) + (ff_bit_bd_count_all))) /\ (ff_bit_bd_count_all = 0 \/ ff_bit_bd_count_all = 1)))
  2. L6
    specialize binary_digit_prefix_all_bits b
  3. L7
    specialize binary_digit_prefix_all_bits c
  4. L8
    specialize binary_digit_prefix_all_bits l
  5. L9
    apply binary_digit_prefix_all_bits
  6. L10
    exact hdigits
  7. L11
    specialize bit_count_exists b
  8. L12
    specialize bit_count_exists c
  9. L13
    specialize bit_count_exists l
  10. L14
    apply bit_count_exists
03Use earlier factsL15–15

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L15
    exact hall

Library-wide reading audit

Original defined command ledger · 15 lines
  1. 0001intro b
  2. 0002intro c
  3. 0003intro l
  4. 0004intro hdigits
  5. 0005have hall : (forall ff_i_bd_count_all. (exists ff_lt_bd_count_all_bound. ff_lt_bd_count_all_bound + S ff_i_bd_count_all = l) -> exists ff_bit_bd_count_all. ((((exists ff_h_bd_count_all_decoded. ff_h_bd_count_all_decoded + S (ff_bit_bd_count_all) = S ((S (ff_i_bd_count_all)) * c)) /\ exists ff_q_bd_count_all_decoded. b = ff_q_bd_count_all_decoded * S ((S (ff_i_bd_count_all)) * c) + (ff_bit_bd_count_all))) /\ (ff_bit_bd_count_all = 0 \/ ff_bit_bd_count_all = 1)))
  6. 0006specialize binary_digit_prefix_all_bits b
  7. 0007specialize binary_digit_prefix_all_bits c
  8. 0008specialize binary_digit_prefix_all_bits l
  9. 0009apply binary_digit_prefix_all_bits
  10. 0010exact hdigits
  11. 0011specialize bit_count_exists b
  12. 0012specialize bit_count_exists c
  13. 0013specialize bit_count_exists l
  14. 0014apply bit_count_exists
  15. 0015exact hall