CD0003

finite_bit_count_positive_member

Every positive witnessed bit count supplies an actual bounded member.

Alpha v34 checked-use · first admitted v27 · 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.

Sets are complete characteristic-bit codes with actual finite cardinality witnesses. The proof constructs translations and the sumset; no finite-choice oracle, supplied cardinality conclusion, or unproved polynomial-method premise is used.

Exact theorem in conservative defined notation

∀ b. ∀ c. ∀ l. ∀ n. BitCount(b,c,l,n) → ¬n = 0 → ∃ x. ModularSetMember(b,c,l,x)

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

Definition DAG

Actual proof prerequisites

zero_or_succ · checked external prerequisitebit_count_positive_last_one · checked external prerequisite
Original expanded first-order 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=0) -> exists i. (((exists fms_gap_member. fms_gap_member + S (i) = (l)) /\ (((exists fs_h_fms_member. fs_h_fms_member + S (1) = S ((S (i)) * c)) /\ exists fs_q_fms_member. b = fs_q_fms_member * S ((S (i)) * c) + (1)))))

Complete tactic proof in conservative notation

All 28 original proof lines are preserved. Only local proposition formulas are abbreviated; every abbreviation has an exact binder-safe expansion check. The linked exact edition contains the unchanged replay script.

Read the argument

Proof checkpoints

28 script commands · 11 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.

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 hn
02Use earlier factsL7–7

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

  1. L7
    specialize zero_or_succ n
03Separate the logical casesL8–9

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

  1. L8
    cases zero_or_succ
  2. L9
    exfalso
04Use earlier factsL10–11

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

  1. L10
    apply hn
  2. L11
    exact zero_or_succ_left
05Separate the logical casesL12–12

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

  1. L12
    cases zero_or_succ_right
06Calculate and transport equalitiesL13–14

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

  1. L13
    rewrite zero_or_succ_right_witness at hcount
  2. L14
    rewrite zero_or_succ_right_witness at hcount
07Establish hwL15–21

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply bit count positive last one.

  1. L15
    have hw : ∃ i. Lt(i,l) ∧ (BetaAt(b,c,i,1) ∧ Lt(x,S i))Definitions: Lt(i,l)BetaAt(b,c,i,1)Lt(x,S i)Original native command in the exact edition
  2. L16
    specialize bit_count_positive_last_one b
  3. L17
    specialize bit_count_positive_last_one c
  4. L18
    specialize bit_count_positive_last_one l
  5. L19
    specialize bit_count_positive_last_one x
  6. L20
    apply bit_count_positive_last_one
  7. L21
    exact hcount
08Separate the logical casesL22–24

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

  1. L22
    cases hw
  2. L23
    cases hw_witness
  3. L24
    cases hw_witness_right
09Construct an explicit witnessL25–25

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

  1. L25
    exists x1
10Separate the logical casesL26–26

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

  1. L26
    split
11Use earlier factsL27–28

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

  1. L27
    exact hw_witness_left
  2. L28
    exact hw_witness_right_left

Library-wide reading audit

Original defined command ledger · 28 lines
  1. 0001intro b
  2. 0002intro c
  3. 0003intro l
  4. 0004intro n
  5. 0005intro hcount
  6. 0006intro hn
  7. 0007specialize zero_or_succ n
  8. 0008cases zero_or_succ
  9. 0009exfalso
  10. 0010apply hn
  11. 0011exact zero_or_succ_left
  12. 0012cases zero_or_succ_right
  13. 0013rewrite zero_or_succ_right_witness at hcount
  14. 0014rewrite zero_or_succ_right_witness at hcount
  15. 0015have hw : ∃ i. Lt(i,l) ∧ (BetaAt(b,c,i,1)Lt(x,S i))
  16. 0016specialize bit_count_positive_last_one b
  17. 0017specialize bit_count_positive_last_one c
  18. 0018specialize bit_count_positive_last_one l
  19. 0019specialize bit_count_positive_last_one x
  20. 0020apply bit_count_positive_last_one
  21. 0021exact hcount
  22. 0022cases hw
  23. 0023cases hw_witness
  24. 0024cases hw_witness_right
  25. 0025exists x1
  26. 0026split
  27. 0027exact hw_witness_left
  28. 0028exact hw_witness_right_left