CD000D

finite_bit_count_missing_zero

Alpha v34 independently verified · alpha_closed; checked-use authorized; not Stable

If a bit count is not the ambient size, finite search returns an actual zero position.

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 first-order arithmetic statement

forall b c l n. (((exists ff_u_fms_count ff_v_fms_count. ((((exists ff_h_fms_count_start. ff_h_fms_count_start + S (0) = S ((S (0)) * ff_v_fms_count)) /\ exists ff_q_fms_count_start. ff_u_fms_count = ff_q_fms_count_start * S ((S (0)) * ff_v_fms_count) + (0))) /\ ((((exists ff_h_fms_count_terminal. ff_h_fms_count_terminal + S ((n)) = S ((S ((l))) * ff_v_fms_count)) /\ exists ff_q_fms_count_terminal. ff_u_fms_count = ff_q_fms_count_terminal * S ((S ((l))) * ff_v_fms_count) + ((n)))) /\ forall ff_i_fms_count. (exists ff_lt_fms_count_bound. ff_lt_fms_count_bound + S ff_i_fms_count = (l)) -> exists ff_a_fms_count ff_r_fms_count ff_s_fms_count. ((((exists ff_h_fms_count_summand. ff_h_fms_count_summand + S (ff_a_fms_count) = S ((S (ff_i_fms_count)) * (c))) /\ exists ff_q_fms_count_summand. (b) = ff_q_fms_count_summand * S ((S (ff_i_fms_count)) * (c)) + (ff_a_fms_count))) /\ ((((exists ff_h_fms_count_partial. ff_h_fms_count_partial + S (ff_r_fms_count) = S ((S (ff_i_fms_count)) * ff_v_fms_count)) /\ exists ff_q_fms_count_partial. ff_u_fms_count = ff_q_fms_count_partial * S ((S (ff_i_fms_count)) * ff_v_fms_count) + (ff_r_fms_count))) /\ ((((exists ff_h_fms_count_successor. ff_h_fms_count_successor + S (ff_s_fms_count) = S ((S (S ff_i_fms_count)) * ff_v_fms_count)) /\ exists ff_q_fms_count_successor. ff_u_fms_count = ff_q_fms_count_successor * S ((S (S ff_i_fms_count)) * ff_v_fms_count) + (ff_s_fms_count))) /\ ff_s_fms_count = ff_r_fms_count + ff_a_fms_count)))))) /\ (forall ff_i_fms_count. (exists ff_lt_fms_count_bound. ff_lt_fms_count_bound + S ff_i_fms_count = (l)) -> exists ff_bit_fms_count. ((((exists ff_h_fms_count_decoded. ff_h_fms_count_decoded + S (ff_bit_fms_count) = S ((S (ff_i_fms_count)) * (c))) /\ exists ff_q_fms_count_decoded. (b) = ff_q_fms_count_decoded * S ((S (ff_i_fms_count)) * (c)) + (ff_bit_fms_count))) /\ (ff_bit_fms_count = 0 \/ ff_bit_fms_count = 1))))) -> ~(n=l) -> exists i. (exists fms_gap_lt. fms_gap_lt + S (i) = (l)) /\ (((exists fs_h_fms_missing_zero. fs_h_fms_missing_zero + S (0) = S ((S (i)) * c)) /\ exists fs_q_fms_missing_zero. b = fs_q_fms_missing_zero * S ((S (i)) * c) + (0)))

Constructive proof overview

Generated structural guide

If a bit count is not the ambient size, finite search returns an actual zero position.

The unchanged tactic script uses 2 declared prerequisites and contains 41 exact native proof lines.

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

Proof neighborhood

Direct dependencies

finite_contains_decidable Stable theorem; checked-use authorized beta_all_one_bit_count_exact Alpha theorem; checked-use authorized

Direct dependents

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. This exact body belongs to a complete independently kernel-checked constructive proof bundle and has Alpha checked-use authority; it does not imply Stable membership.

Read the argument

Proof checkpoints

41 script commands · 19 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.

01Fix variables and assumptionsL1–6

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 n
  5. L5
    intro hcount
  6. L6
    intro hne
02Use earlier factsL7–10

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

  1. L7
    specialize finite_contains_decidable b
  2. L8
    specialize finite_contains_decidable c
  3. L9
    specialize finite_contains_decidable l
  4. L10
    specialize finite_contains_decidable 0
03Separate the logical casesL11–11

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L11
    cases finite_contains_decidable
04Use earlier factsL12–12

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

  1. L12
    exact finite_contains_decidable_left
05Separate the logical casesL13–13

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L13
    exfalso
06Use earlier factsL14–19

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

  1. L14
    apply hne
  2. L15
    specialize beta_all_one_bit_count_exact b
  3. L16
    specialize beta_all_one_bit_count_exact c
  4. L17
    specialize beta_all_one_bit_count_exact l
  5. L18
    specialize beta_all_one_bit_count_exact n
  6. L19
    apply beta_all_one_bit_count_exact
07Fix variables and assumptionsL20–21

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

  1. L20
    intro i
  2. L21
    intro hi
08Separate the logical casesL22–22

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L22
    cases hcount
09Use earlier factsL23–23

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

  1. L23
    specialize hcount_right i
10Establish hentryL24–26

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply hcount right.

  1. L24
    have hentry : exists a. (((exists fs_h_fms_nozero_entry. fs_h_fms_nozero_entry + S (a) = S ((S (i)) * c)) /\ exists fs_q_fms_nozero_entry. b = fs_q_fms_nozero_entry * S ((S (i)) * c) + (a))) /\ (a=0 \/ a=1)
  2. L25
    apply hcount_right
  3. L26
    exact hi
11Separate the logical casesL27–30

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L27
    cases hentry
  2. L28
    cases hentry_witness
  3. L29
    cases hentry_witness_right
  4. L30
    exfalso
12Use earlier factsL31–31

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

  1. L31
    apply finite_contains_decidable_right
13Construct an explicit witnessL32–32

Supply the displayed value, then prove that it has the required property.

  1. L32
    exists i
14Separate the logical casesL33–33

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L33
    split
15Use earlier factsL34–34

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

  1. L34
    exact hi
16Calculate and transport equalitiesL35–36

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L35
    rewrite hentry_witness_right_left at hentry_witness_left
  2. L36
    rewrite hentry_witness_right_left at hentry_witness_left
17Use earlier factsL37–37

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

  1. L37
    exact hentry_witness_left
18Calculate and transport equalitiesL38–39

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L38
    rewrite hentry_witness_right_right at hentry_witness_left
  2. L39
    rewrite hentry_witness_right_right at hentry_witness_left
19Use earlier factsL40–41

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

  1. L40
    exact hentry_witness_left
  2. L41
    exact hcount

Library-wide reading audit

Original exact command ledger · 41 lines
  1. 0001intro b
  2. 0002intro c
  3. 0003intro l
  4. 0004intro n
  5. 0005intro hcount
  6. 0006intro hne
  7. 0007specialize finite_contains_decidable b
  8. 0008specialize finite_contains_decidable c
  9. 0009specialize finite_contains_decidable l
  10. 0010specialize finite_contains_decidable 0
  11. 0011cases finite_contains_decidable
  12. 0012exact finite_contains_decidable_left
  13. 0013exfalso
  14. 0014apply hne
  15. 0015specialize beta_all_one_bit_count_exact b
  16. 0016specialize beta_all_one_bit_count_exact c
  17. 0017specialize beta_all_one_bit_count_exact l
  18. 0018specialize beta_all_one_bit_count_exact n
  19. 0019apply beta_all_one_bit_count_exact
  20. 0020intro i
  21. 0021intro hi
  22. 0022cases hcount
  23. 0023specialize hcount_right i
  24. 0024have hentry : exists a. (((exists fs_h_fms_nozero_entry. fs_h_fms_nozero_entry + S (a) = S ((S (i)) * c)) /\ exists fs_q_fms_nozero_entry. b = fs_q_fms_nozero_entry * S ((S (i)) * c) + (a))) /\ (a=0 \/ a=1)
  25. 0025apply hcount_right
  26. 0026exact hi
  27. 0027cases hentry
  28. 0028cases hentry_witness
  29. 0029cases hentry_witness_right
  30. 0030exfalso
  31. 0031apply finite_contains_decidable_right
  32. 0032exists i
  33. 0033split
  34. 0034exact hi
  35. 0035rewrite hentry_witness_right_left at hentry_witness_left
  36. 0036rewrite hentry_witness_right_left at hentry_witness_left
  37. 0037exact hentry_witness_left
  38. 0038rewrite hentry_witness_right_right at hentry_witness_left
  39. 0039rewrite hentry_witness_right_right at hentry_witness_left
  40. 0040exact hentry_witness_left
  41. 0041exact hcount