PC0037

prime_count_exists_unique

Every bound has a genuinely constructed, uniquely determined exact prime count.

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.

These are the exact finite integer inequalities with constant 8, for every N≥2. The proof uses constructive binomial and primorial infrastructure; it does not assume logarithms, asymptotic estimates, the prime number theorem, or a factorization oracle.

Exact theorem in conservative defined notation

∀ N. ∃ k. PrimeCount(N,k) ∧ (∀ x. PrimeCount(N,x) → k = 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 k. (exists pc_code_count_unique_value pc_scale_count_unique_value. (forall pc_index_count_unique_value_mask. (exists pc_lt_count_unique_value_mask_bound. pc_lt_count_unique_value_mask_bound + S (pc_index_count_unique_value_mask) = (N)) -> exists pc_bit_count_unique_value_mask. (((exists fs_h_pc_count_unique_value_mask_entry. fs_h_pc_count_unique_value_mask_entry + S (pc_bit_count_unique_value_mask) = S ((S (pc_index_count_unique_value_mask)) * pc_scale_count_unique_value)) /\ exists fs_q_pc_count_unique_value_mask_entry. pc_code_count_unique_value = fs_q_pc_count_unique_value_mask_entry * S ((S (pc_index_count_unique_value_mask)) * pc_scale_count_unique_value) + (pc_bit_count_unique_value_mask))) /\ (((((~(S (pc_index_count_unique_value_mask) = 1) /\ forall bpr_left_pc_count_unique_value_mask_choice_prime bpr_right_pc_count_unique_value_mask_choice_prime. S (pc_index_count_unique_value_mask) = bpr_left_pc_count_unique_value_mask_choice_prime * bpr_right_pc_count_unique_value_mask_choice_prime -> bpr_left_pc_count_unique_value_mask_choice_prime = 1 \/ bpr_right_pc_count_unique_value_mask_choice_prime = 1)) /\ pc_bit_count_unique_value_mask = 1) \/ (~((~(S (pc_index_count_unique_value_mask) = 1) /\ forall bpr_left_pc_count_unique_value_mask_choice_prime bpr_right_pc_count_unique_value_mask_choice_prime. S (pc_index_count_unique_value_mask) = bpr_left_pc_count_unique_value_mask_choice_prime * bpr_right_pc_count_unique_value_mask_choice_prime -> bpr_left_pc_count_unique_value_mask_choice_prime = 1 \/ bpr_right_pc_count_unique_value_mask_choice_prime = 1)) /\ pc_bit_count_unique_value_mask = 0)))) /\ (exists fs_u_pc_count_unique_value_sum fs_v_pc_count_unique_value_sum. ((((exists fs_h_pc_count_unique_value_sum_body_start. fs_h_pc_count_unique_value_sum_body_start + S (0) = S ((S (0)) * fs_v_pc_count_unique_value_sum)) /\ exists fs_q_pc_count_unique_value_sum_body_start. fs_u_pc_count_unique_value_sum = fs_q_pc_count_unique_value_sum_body_start * S ((S (0)) * fs_v_pc_count_unique_value_sum) + (0))) /\ ((((exists fs_h_pc_count_unique_value_sum_body_terminal. fs_h_pc_count_unique_value_sum_body_terminal + S (k) = S ((S (N)) * fs_v_pc_count_unique_value_sum)) /\ exists fs_q_pc_count_unique_value_sum_body_terminal. fs_u_pc_count_unique_value_sum = fs_q_pc_count_unique_value_sum_body_terminal * S ((S (N)) * fs_v_pc_count_unique_value_sum) + (k))) /\ forall fs_i_pc_count_unique_value_sum_body_steps. (exists fs_lt_pc_count_unique_value_sum_body_steps_bound. fs_lt_pc_count_unique_value_sum_body_steps_bound + S fs_i_pc_count_unique_value_sum_body_steps = N) -> exists fs_a_pc_count_unique_value_sum_body_steps fs_r_pc_count_unique_value_sum_body_steps fs_s_pc_count_unique_value_sum_body_steps. ((((exists fs_h_pc_count_unique_value_sum_body_steps_summand. fs_h_pc_count_unique_value_sum_body_steps_summand + S (fs_a_pc_count_unique_value_sum_body_steps) = S ((S (fs_i_pc_count_unique_value_sum_body_steps)) * pc_scale_count_unique_value)) /\ exists fs_q_pc_count_unique_value_sum_body_steps_summand. pc_code_count_unique_value = fs_q_pc_count_unique_value_sum_body_steps_summand * S ((S (fs_i_pc_count_unique_value_sum_body_steps)) * pc_scale_count_unique_value) + (fs_a_pc_count_unique_value_sum_body_steps))) /\ ((((exists fs_h_pc_count_unique_value_sum_body_steps_partial. fs_h_pc_count_unique_value_sum_body_steps_partial + S (fs_r_pc_count_unique_value_sum_body_steps) = S ((S (fs_i_pc_count_unique_value_sum_body_steps)) * fs_v_pc_count_unique_value_sum)) /\ exists fs_q_pc_count_unique_value_sum_body_steps_partial. fs_u_pc_count_unique_value_sum = fs_q_pc_count_unique_value_sum_body_steps_partial * S ((S (fs_i_pc_count_unique_value_sum_body_steps)) * fs_v_pc_count_unique_value_sum) + (fs_r_pc_count_unique_value_sum_body_steps))) /\ ((((exists fs_h_pc_count_unique_value_sum_body_steps_successor. fs_h_pc_count_unique_value_sum_body_steps_successor + S (fs_s_pc_count_unique_value_sum_body_steps) = S ((S (S fs_i_pc_count_unique_value_sum_body_steps)) * fs_v_pc_count_unique_value_sum)) /\ exists fs_q_pc_count_unique_value_sum_body_steps_successor. fs_u_pc_count_unique_value_sum = fs_q_pc_count_unique_value_sum_body_steps_successor * S ((S (S fs_i_pc_count_unique_value_sum_body_steps)) * fs_v_pc_count_unique_value_sum) + (fs_s_pc_count_unique_value_sum_body_steps))) /\ fs_s_pc_count_unique_value_sum_body_steps = fs_r_pc_count_unique_value_sum_body_steps + fs_a_pc_count_unique_value_sum_body_steps))))))) /\ forall K. (exists pc_code_count_unique_other pc_scale_count_unique_other. (forall pc_index_count_unique_other_mask. (exists pc_lt_count_unique_other_mask_bound. pc_lt_count_unique_other_mask_bound + S (pc_index_count_unique_other_mask) = (N)) -> exists pc_bit_count_unique_other_mask. (((exists fs_h_pc_count_unique_other_mask_entry. fs_h_pc_count_unique_other_mask_entry + S (pc_bit_count_unique_other_mask) = S ((S (pc_index_count_unique_other_mask)) * pc_scale_count_unique_other)) /\ exists fs_q_pc_count_unique_other_mask_entry. pc_code_count_unique_other = fs_q_pc_count_unique_other_mask_entry * S ((S (pc_index_count_unique_other_mask)) * pc_scale_count_unique_other) + (pc_bit_count_unique_other_mask))) /\ (((((~(S (pc_index_count_unique_other_mask) = 1) /\ forall bpr_left_pc_count_unique_other_mask_choice_prime bpr_right_pc_count_unique_other_mask_choice_prime. S (pc_index_count_unique_other_mask) = bpr_left_pc_count_unique_other_mask_choice_prime * bpr_right_pc_count_unique_other_mask_choice_prime -> bpr_left_pc_count_unique_other_mask_choice_prime = 1 \/ bpr_right_pc_count_unique_other_mask_choice_prime = 1)) /\ pc_bit_count_unique_other_mask = 1) \/ (~((~(S (pc_index_count_unique_other_mask) = 1) /\ forall bpr_left_pc_count_unique_other_mask_choice_prime bpr_right_pc_count_unique_other_mask_choice_prime. S (pc_index_count_unique_other_mask) = bpr_left_pc_count_unique_other_mask_choice_prime * bpr_right_pc_count_unique_other_mask_choice_prime -> bpr_left_pc_count_unique_other_mask_choice_prime = 1 \/ bpr_right_pc_count_unique_other_mask_choice_prime = 1)) /\ pc_bit_count_unique_other_mask = 0)))) /\ (exists fs_u_pc_count_unique_other_sum fs_v_pc_count_unique_other_sum. ((((exists fs_h_pc_count_unique_other_sum_body_start. fs_h_pc_count_unique_other_sum_body_start + S (0) = S ((S (0)) * fs_v_pc_count_unique_other_sum)) /\ exists fs_q_pc_count_unique_other_sum_body_start. fs_u_pc_count_unique_other_sum = fs_q_pc_count_unique_other_sum_body_start * S ((S (0)) * fs_v_pc_count_unique_other_sum) + (0))) /\ ((((exists fs_h_pc_count_unique_other_sum_body_terminal. fs_h_pc_count_unique_other_sum_body_terminal + S (K) = S ((S (N)) * fs_v_pc_count_unique_other_sum)) /\ exists fs_q_pc_count_unique_other_sum_body_terminal. fs_u_pc_count_unique_other_sum = fs_q_pc_count_unique_other_sum_body_terminal * S ((S (N)) * fs_v_pc_count_unique_other_sum) + (K))) /\ forall fs_i_pc_count_unique_other_sum_body_steps. (exists fs_lt_pc_count_unique_other_sum_body_steps_bound. fs_lt_pc_count_unique_other_sum_body_steps_bound + S fs_i_pc_count_unique_other_sum_body_steps = N) -> exists fs_a_pc_count_unique_other_sum_body_steps fs_r_pc_count_unique_other_sum_body_steps fs_s_pc_count_unique_other_sum_body_steps. ((((exists fs_h_pc_count_unique_other_sum_body_steps_summand. fs_h_pc_count_unique_other_sum_body_steps_summand + S (fs_a_pc_count_unique_other_sum_body_steps) = S ((S (fs_i_pc_count_unique_other_sum_body_steps)) * pc_scale_count_unique_other)) /\ exists fs_q_pc_count_unique_other_sum_body_steps_summand. pc_code_count_unique_other = fs_q_pc_count_unique_other_sum_body_steps_summand * S ((S (fs_i_pc_count_unique_other_sum_body_steps)) * pc_scale_count_unique_other) + (fs_a_pc_count_unique_other_sum_body_steps))) /\ ((((exists fs_h_pc_count_unique_other_sum_body_steps_partial. fs_h_pc_count_unique_other_sum_body_steps_partial + S (fs_r_pc_count_unique_other_sum_body_steps) = S ((S (fs_i_pc_count_unique_other_sum_body_steps)) * fs_v_pc_count_unique_other_sum)) /\ exists fs_q_pc_count_unique_other_sum_body_steps_partial. fs_u_pc_count_unique_other_sum = fs_q_pc_count_unique_other_sum_body_steps_partial * S ((S (fs_i_pc_count_unique_other_sum_body_steps)) * fs_v_pc_count_unique_other_sum) + (fs_r_pc_count_unique_other_sum_body_steps))) /\ ((((exists fs_h_pc_count_unique_other_sum_body_steps_successor. fs_h_pc_count_unique_other_sum_body_steps_successor + S (fs_s_pc_count_unique_other_sum_body_steps) = S ((S (S fs_i_pc_count_unique_other_sum_body_steps)) * fs_v_pc_count_unique_other_sum)) /\ exists fs_q_pc_count_unique_other_sum_body_steps_successor. fs_u_pc_count_unique_other_sum = fs_q_pc_count_unique_other_sum_body_steps_successor * S ((S (S fs_i_pc_count_unique_other_sum_body_steps)) * fs_v_pc_count_unique_other_sum) + (fs_s_pc_count_unique_other_sum_body_steps))) /\ fs_s_pc_count_unique_other_sum_body_steps = fs_r_pc_count_unique_other_sum_body_steps + fs_a_pc_count_unique_other_sum_body_steps))))))) -> k = K

Complete tactic proof in conservative notation

All 16 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

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

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

  1. L1
    intro N
02Establish hL2–4

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime count exists.

  1. L2
    have h : ∃ k. PrimeCount(N,k)Definitions: PrimeCount(N,k)Original native command in the exact edition
  2. L3
    specialize prime_count_exists N
  3. L4
    apply prime_count_exists
03Separate the logical casesL5–5

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

  1. L5
    cases h
04Construct an explicit witnessL6–6

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

  1. L6
    exists x
05Separate the logical casesL7–7

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

  1. L7
    split
06Use earlier factsL8–8

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

  1. L8
    exact h_witness
07Fix variables and assumptionsL9–10

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

  1. L9
    intro K
  2. L10
    intro hK
08Use earlier factsL11–16

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

  1. L11
    specialize prime_count_functional N
  2. L12
    specialize prime_count_functional x
  3. L13
    specialize prime_count_functional K
  4. L14
    apply prime_count_functional
  5. L15
    exact h_witness
  6. L16
    exact hK

Library-wide reading audit

Original defined command ledger · 16 lines
  1. 0001intro N
  2. 0002have h : ∃ k. PrimeCount(N,k)
  3. 0003specialize prime_count_exists N
  4. 0004apply prime_count_exists
  5. 0005cases h
  6. 0006exists x
  7. 0007split
  8. 0008exact h_witness
  9. 0009intro K
  10. 0010intro hK
  11. 0011specialize prime_count_functional N
  12. 0012specialize prime_count_functional x
  13. 0013specialize prime_count_functional K
  14. 0014apply prime_count_functional
  15. 0015exact h_witness
  16. 0016exact hK