BL0014

binary_length_exists_unique

Every natural has exactly one canonical blueprint-compatible bit length.

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

G101 and G102 were OPEN when these BitLen foundations were first admitted in Alpha v22. Both are now CLOSED in Alpha v23: complete canonical exponent digits and both exact logarithmic execution bounds are proved.

Exact theorem in conservative defined notation

∀ n. ∃ l. BitLen(n,l) ∧ (∀ x. BitLen(n,x) → l = x)

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall n. exists l. (((((n) = 0 /\ (l) = 1) \/ exists ff_exponent_bl_length ff_lower_bl_length ff_upper_bl_length. (((l) = S ff_exponent_bl_length) /\ ((exists ff_positive_bl_length. ff_positive_bl_length + 1 = (n)) /\ ((exists pa_b_bl_length_lower pa_c_bl_length_lower. ((forall pa_i_bl_length_lower_repeat. (exists pa_lt_bl_length_lower_repeat_bound. pa_lt_bl_length_lower_repeat_bound + S pa_i_bl_length_lower_repeat = ff_exponent_bl_length) -> (((exists pa_h_bl_length_lower_repeat_decoded. pa_h_bl_length_lower_repeat_decoded + S (2) = S ((S (pa_i_bl_length_lower_repeat)) * pa_c_bl_length_lower)) /\ exists pa_q_bl_length_lower_repeat_decoded. pa_b_bl_length_lower = pa_q_bl_length_lower_repeat_decoded * S ((S (pa_i_bl_length_lower_repeat)) * pa_c_bl_length_lower) + (2)))) /\ (exists pa_u_bl_length_lower_product pa_v_bl_length_lower_product. ((((exists pa_h_bl_length_lower_product_start. pa_h_bl_length_lower_product_start + S (1) = S ((S (0)) * pa_v_bl_length_lower_product)) /\ exists pa_q_bl_length_lower_product_start. pa_u_bl_length_lower_product = pa_q_bl_length_lower_product_start * S ((S (0)) * pa_v_bl_length_lower_product) + (1))) /\ ((((exists pa_h_bl_length_lower_product_terminal. pa_h_bl_length_lower_product_terminal + S (ff_lower_bl_length) = S ((S (ff_exponent_bl_length)) * pa_v_bl_length_lower_product)) /\ exists pa_q_bl_length_lower_product_terminal. pa_u_bl_length_lower_product = pa_q_bl_length_lower_product_terminal * S ((S (ff_exponent_bl_length)) * pa_v_bl_length_lower_product) + (ff_lower_bl_length))) /\ forall pa_i_bl_length_lower_product. (exists pa_lt_bl_length_lower_product_bound. pa_lt_bl_length_lower_product_bound + S pa_i_bl_length_lower_product = ff_exponent_bl_length) -> exists pa_p_bl_length_lower_product pa_r_bl_length_lower_product pa_s_bl_length_lower_product. ((((exists pa_h_bl_length_lower_product_factor. pa_h_bl_length_lower_product_factor + S (pa_p_bl_length_lower_product) = S ((S (pa_i_bl_length_lower_product)) * pa_c_bl_length_lower)) /\ exists pa_q_bl_length_lower_product_factor. pa_b_bl_length_lower = pa_q_bl_length_lower_product_factor * S ((S (pa_i_bl_length_lower_product)) * pa_c_bl_length_lower) + (pa_p_bl_length_lower_product))) /\ ((((exists pa_h_bl_length_lower_product_partial. pa_h_bl_length_lower_product_partial + S (pa_r_bl_length_lower_product) = S ((S (pa_i_bl_length_lower_product)) * pa_v_bl_length_lower_product)) /\ exists pa_q_bl_length_lower_product_partial. pa_u_bl_length_lower_product = pa_q_bl_length_lower_product_partial * S ((S (pa_i_bl_length_lower_product)) * pa_v_bl_length_lower_product) + (pa_r_bl_length_lower_product))) /\ ((((exists pa_h_bl_length_lower_product_successor. pa_h_bl_length_lower_product_successor + S (pa_s_bl_length_lower_product) = S ((S (S pa_i_bl_length_lower_product)) * pa_v_bl_length_lower_product)) /\ exists pa_q_bl_length_lower_product_successor. pa_u_bl_length_lower_product = pa_q_bl_length_lower_product_successor * S ((S (S pa_i_bl_length_lower_product)) * pa_v_bl_length_lower_product) + (pa_s_bl_length_lower_product))) /\ pa_s_bl_length_lower_product = pa_r_bl_length_lower_product * pa_p_bl_length_lower_product)))))))) /\ ((exists pa_b_bl_length_upper pa_c_bl_length_upper. ((forall pa_i_bl_length_upper_repeat. (exists pa_lt_bl_length_upper_repeat_bound. pa_lt_bl_length_upper_repeat_bound + S pa_i_bl_length_upper_repeat = l) -> (((exists pa_h_bl_length_upper_repeat_decoded. pa_h_bl_length_upper_repeat_decoded + S (2) = S ((S (pa_i_bl_length_upper_repeat)) * pa_c_bl_length_upper)) /\ exists pa_q_bl_length_upper_repeat_decoded. pa_b_bl_length_upper = pa_q_bl_length_upper_repeat_decoded * S ((S (pa_i_bl_length_upper_repeat)) * pa_c_bl_length_upper) + (2)))) /\ (exists pa_u_bl_length_upper_product pa_v_bl_length_upper_product. ((((exists pa_h_bl_length_upper_product_start. pa_h_bl_length_upper_product_start + S (1) = S ((S (0)) * pa_v_bl_length_upper_product)) /\ exists pa_q_bl_length_upper_product_start. pa_u_bl_length_upper_product = pa_q_bl_length_upper_product_start * S ((S (0)) * pa_v_bl_length_upper_product) + (1))) /\ ((((exists pa_h_bl_length_upper_product_terminal. pa_h_bl_length_upper_product_terminal + S (ff_upper_bl_length) = S ((S (l)) * pa_v_bl_length_upper_product)) /\ exists pa_q_bl_length_upper_product_terminal. pa_u_bl_length_upper_product = pa_q_bl_length_upper_product_terminal * S ((S (l)) * pa_v_bl_length_upper_product) + (ff_upper_bl_length))) /\ forall pa_i_bl_length_upper_product. (exists pa_lt_bl_length_upper_product_bound. pa_lt_bl_length_upper_product_bound + S pa_i_bl_length_upper_product = l) -> exists pa_p_bl_length_upper_product pa_r_bl_length_upper_product pa_s_bl_length_upper_product. ((((exists pa_h_bl_length_upper_product_factor. pa_h_bl_length_upper_product_factor + S (pa_p_bl_length_upper_product) = S ((S (pa_i_bl_length_upper_product)) * pa_c_bl_length_upper)) /\ exists pa_q_bl_length_upper_product_factor. pa_b_bl_length_upper = pa_q_bl_length_upper_product_factor * S ((S (pa_i_bl_length_upper_product)) * pa_c_bl_length_upper) + (pa_p_bl_length_upper_product))) /\ ((((exists pa_h_bl_length_upper_product_partial. pa_h_bl_length_upper_product_partial + S (pa_r_bl_length_upper_product) = S ((S (pa_i_bl_length_upper_product)) * pa_v_bl_length_upper_product)) /\ exists pa_q_bl_length_upper_product_partial. pa_u_bl_length_upper_product = pa_q_bl_length_upper_product_partial * S ((S (pa_i_bl_length_upper_product)) * pa_v_bl_length_upper_product) + (pa_r_bl_length_upper_product))) /\ ((((exists pa_h_bl_length_upper_product_successor. pa_h_bl_length_upper_product_successor + S (pa_s_bl_length_upper_product) = S ((S (S pa_i_bl_length_upper_product)) * pa_v_bl_length_upper_product)) /\ exists pa_q_bl_length_upper_product_successor. pa_u_bl_length_upper_product = pa_q_bl_length_upper_product_successor * S ((S (S pa_i_bl_length_upper_product)) * pa_v_bl_length_upper_product) + (pa_s_bl_length_upper_product))) /\ pa_s_bl_length_upper_product = pa_r_bl_length_upper_product * pa_p_bl_length_upper_product)))))))) /\ ((exists ff_lower_gap_bl_length. ff_lower_gap_bl_length + (ff_lower_bl_length) = (n)) /\ (exists ff_upper_gap_bl_length. ff_upper_gap_bl_length + S (n) = (ff_upper_bl_length))))))))) /\ forall L. ((((n) = 0 /\ (L) = 1) \/ exists ff_exponent_bl_other_length ff_lower_bl_other_length ff_upper_bl_other_length. (((L) = S ff_exponent_bl_other_length) /\ ((exists ff_positive_bl_other_length. ff_positive_bl_other_length + 1 = (n)) /\ ((exists pa_b_bl_other_length_lower pa_c_bl_other_length_lower. ((forall pa_i_bl_other_length_lower_repeat. (exists pa_lt_bl_other_length_lower_repeat_bound. pa_lt_bl_other_length_lower_repeat_bound + S pa_i_bl_other_length_lower_repeat = ff_exponent_bl_other_length) -> (((exists pa_h_bl_other_length_lower_repeat_decoded. pa_h_bl_other_length_lower_repeat_decoded + S (2) = S ((S (pa_i_bl_other_length_lower_repeat)) * pa_c_bl_other_length_lower)) /\ exists pa_q_bl_other_length_lower_repeat_decoded. pa_b_bl_other_length_lower = pa_q_bl_other_length_lower_repeat_decoded * S ((S (pa_i_bl_other_length_lower_repeat)) * pa_c_bl_other_length_lower) + (2)))) /\ (exists pa_u_bl_other_length_lower_product pa_v_bl_other_length_lower_product. ((((exists pa_h_bl_other_length_lower_product_start. pa_h_bl_other_length_lower_product_start + S (1) = S ((S (0)) * pa_v_bl_other_length_lower_product)) /\ exists pa_q_bl_other_length_lower_product_start. pa_u_bl_other_length_lower_product = pa_q_bl_other_length_lower_product_start * S ((S (0)) * pa_v_bl_other_length_lower_product) + (1))) /\ ((((exists pa_h_bl_other_length_lower_product_terminal. pa_h_bl_other_length_lower_product_terminal + S (ff_lower_bl_other_length) = S ((S (ff_exponent_bl_other_length)) * pa_v_bl_other_length_lower_product)) /\ exists pa_q_bl_other_length_lower_product_terminal. pa_u_bl_other_length_lower_product = pa_q_bl_other_length_lower_product_terminal * S ((S (ff_exponent_bl_other_length)) * pa_v_bl_other_length_lower_product) + (ff_lower_bl_other_length))) /\ forall pa_i_bl_other_length_lower_product. (exists pa_lt_bl_other_length_lower_product_bound. pa_lt_bl_other_length_lower_product_bound + S pa_i_bl_other_length_lower_product = ff_exponent_bl_other_length) -> exists pa_p_bl_other_length_lower_product pa_r_bl_other_length_lower_product pa_s_bl_other_length_lower_product. ((((exists pa_h_bl_other_length_lower_product_factor. pa_h_bl_other_length_lower_product_factor + S (pa_p_bl_other_length_lower_product) = S ((S (pa_i_bl_other_length_lower_product)) * pa_c_bl_other_length_lower)) /\ exists pa_q_bl_other_length_lower_product_factor. pa_b_bl_other_length_lower = pa_q_bl_other_length_lower_product_factor * S ((S (pa_i_bl_other_length_lower_product)) * pa_c_bl_other_length_lower) + (pa_p_bl_other_length_lower_product))) /\ ((((exists pa_h_bl_other_length_lower_product_partial. pa_h_bl_other_length_lower_product_partial + S (pa_r_bl_other_length_lower_product) = S ((S (pa_i_bl_other_length_lower_product)) * pa_v_bl_other_length_lower_product)) /\ exists pa_q_bl_other_length_lower_product_partial. pa_u_bl_other_length_lower_product = pa_q_bl_other_length_lower_product_partial * S ((S (pa_i_bl_other_length_lower_product)) * pa_v_bl_other_length_lower_product) + (pa_r_bl_other_length_lower_product))) /\ ((((exists pa_h_bl_other_length_lower_product_successor. pa_h_bl_other_length_lower_product_successor + S (pa_s_bl_other_length_lower_product) = S ((S (S pa_i_bl_other_length_lower_product)) * pa_v_bl_other_length_lower_product)) /\ exists pa_q_bl_other_length_lower_product_successor. pa_u_bl_other_length_lower_product = pa_q_bl_other_length_lower_product_successor * S ((S (S pa_i_bl_other_length_lower_product)) * pa_v_bl_other_length_lower_product) + (pa_s_bl_other_length_lower_product))) /\ pa_s_bl_other_length_lower_product = pa_r_bl_other_length_lower_product * pa_p_bl_other_length_lower_product)))))))) /\ ((exists pa_b_bl_other_length_upper pa_c_bl_other_length_upper. ((forall pa_i_bl_other_length_upper_repeat. (exists pa_lt_bl_other_length_upper_repeat_bound. pa_lt_bl_other_length_upper_repeat_bound + S pa_i_bl_other_length_upper_repeat = L) -> (((exists pa_h_bl_other_length_upper_repeat_decoded. pa_h_bl_other_length_upper_repeat_decoded + S (2) = S ((S (pa_i_bl_other_length_upper_repeat)) * pa_c_bl_other_length_upper)) /\ exists pa_q_bl_other_length_upper_repeat_decoded. pa_b_bl_other_length_upper = pa_q_bl_other_length_upper_repeat_decoded * S ((S (pa_i_bl_other_length_upper_repeat)) * pa_c_bl_other_length_upper) + (2)))) /\ (exists pa_u_bl_other_length_upper_product pa_v_bl_other_length_upper_product. ((((exists pa_h_bl_other_length_upper_product_start. pa_h_bl_other_length_upper_product_start + S (1) = S ((S (0)) * pa_v_bl_other_length_upper_product)) /\ exists pa_q_bl_other_length_upper_product_start. pa_u_bl_other_length_upper_product = pa_q_bl_other_length_upper_product_start * S ((S (0)) * pa_v_bl_other_length_upper_product) + (1))) /\ ((((exists pa_h_bl_other_length_upper_product_terminal. pa_h_bl_other_length_upper_product_terminal + S (ff_upper_bl_other_length) = S ((S (L)) * pa_v_bl_other_length_upper_product)) /\ exists pa_q_bl_other_length_upper_product_terminal. pa_u_bl_other_length_upper_product = pa_q_bl_other_length_upper_product_terminal * S ((S (L)) * pa_v_bl_other_length_upper_product) + (ff_upper_bl_other_length))) /\ forall pa_i_bl_other_length_upper_product. (exists pa_lt_bl_other_length_upper_product_bound. pa_lt_bl_other_length_upper_product_bound + S pa_i_bl_other_length_upper_product = L) -> exists pa_p_bl_other_length_upper_product pa_r_bl_other_length_upper_product pa_s_bl_other_length_upper_product. ((((exists pa_h_bl_other_length_upper_product_factor. pa_h_bl_other_length_upper_product_factor + S (pa_p_bl_other_length_upper_product) = S ((S (pa_i_bl_other_length_upper_product)) * pa_c_bl_other_length_upper)) /\ exists pa_q_bl_other_length_upper_product_factor. pa_b_bl_other_length_upper = pa_q_bl_other_length_upper_product_factor * S ((S (pa_i_bl_other_length_upper_product)) * pa_c_bl_other_length_upper) + (pa_p_bl_other_length_upper_product))) /\ ((((exists pa_h_bl_other_length_upper_product_partial. pa_h_bl_other_length_upper_product_partial + S (pa_r_bl_other_length_upper_product) = S ((S (pa_i_bl_other_length_upper_product)) * pa_v_bl_other_length_upper_product)) /\ exists pa_q_bl_other_length_upper_product_partial. pa_u_bl_other_length_upper_product = pa_q_bl_other_length_upper_product_partial * S ((S (pa_i_bl_other_length_upper_product)) * pa_v_bl_other_length_upper_product) + (pa_r_bl_other_length_upper_product))) /\ ((((exists pa_h_bl_other_length_upper_product_successor. pa_h_bl_other_length_upper_product_successor + S (pa_s_bl_other_length_upper_product) = S ((S (S pa_i_bl_other_length_upper_product)) * pa_v_bl_other_length_upper_product)) /\ exists pa_q_bl_other_length_upper_product_successor. pa_u_bl_other_length_upper_product = pa_q_bl_other_length_upper_product_successor * S ((S (S pa_i_bl_other_length_upper_product)) * pa_v_bl_other_length_upper_product) + (pa_s_bl_other_length_upper_product))) /\ pa_s_bl_other_length_upper_product = pa_r_bl_other_length_upper_product * pa_p_bl_other_length_upper_product)))))))) /\ ((exists ff_lower_gap_bl_other_length. ff_lower_gap_bl_other_length + (ff_lower_bl_other_length) = (n)) /\ (exists ff_upper_gap_bl_other_length. ff_upper_gap_bl_other_length + S (n) = (ff_upper_bl_other_length))))))))) -> l = L)

Complete unchanged native tactic proof

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

Read the argument

Proof checkpoints

14 script commands · 8 reading checkpoints · 0 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 (2)
01Fix variables and assumptionsL1–1

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

  1. L1
    intro n
02Use earlier factsL2–2

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

  1. L2
    specialize binary_length_exists n
03Separate the logical casesL3–3

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

  1. L3
    cases binary_length_exists
04Construct an explicit witnessL4–4

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

  1. L4
    exists x
05Separate the logical casesL5–5

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

  1. L5
    split
06Use earlier factsL6–6

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

  1. L6
    exact binary_length_exists_witness
07Fix variables and assumptionsL7–8

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

  1. L7
    intro L
  2. L8
    intro hother
08Use earlier factsL9–14

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

  1. L9
    specialize binary_length_functional n
  2. L10
    specialize binary_length_functional x
  3. L11
    specialize binary_length_functional L
  4. L12
    apply binary_length_functional
  5. L13
    exact binary_length_exists_witness
  6. L14
    exact hother

Library-wide reading audit

Original defined command ledger · 14 lines
  1. 0001intro n
  2. 0002specialize binary_length_exists n
  3. 0003cases binary_length_exists
  4. 0004exists x
  5. 0005split
  6. 0006exact binary_length_exists_witness
  7. 0007intro L
  8. 0008intro hother
  9. 0009specialize binary_length_functional n
  10. 0010specialize binary_length_functional x
  11. 0011specialize binary_length_functional L
  12. 0012apply binary_length_functional
  13. 0013exact binary_length_exists_witness
  14. 0014exact hother