BT00U8 · Bertrand theorem

primorial_factor_prefix_exists

Alpha v34 checked-use theorem · independently kernel and Lean verified; not Stable

Every finite length has a beta-coded selector prefix.

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.

Statement with defined notation

∀ m. ∃ b. ∃ c. ∀ x. Lt(x,m) → ∃ y. BetaAt(b,c,x,y) ∧ (Prime(S x) ∧ y = S x ∨ ¬Prime(S x) ∧ y = 1)

Every purple notation token opens its conservative definition. Expanding the displayed statement recovers the exact first-order Peano-arithmetic formula checked by the unchanged kernel.

Definitions used by this theorem

In the theorem statement

4 occurrences

In local proof propositions

8 occurrences

Exact expanded native-PA statement
forall m. exists b c. (forall bpr_index_bpfpx_result. (exists bpr_gap_bpfpx_result_bound. bpr_gap_bpfpx_result_bound + S (bpr_index_bpfpx_result) = m) -> exists bpr_value_bpfpx_result. ((((exists bpr_height_bpfpx_result_decoded. bpr_height_bpfpx_result_decoded + S (bpr_value_bpfpx_result) = S ((S (bpr_index_bpfpx_result)) * c)) /\ exists bpr_quotient_bpfpx_result_decoded. b = bpr_quotient_bpfpx_result_decoded * S ((S (bpr_index_bpfpx_result)) * c) + (bpr_value_bpfpx_result))) /\ (((((~(S (bpr_index_bpfpx_result) = 1) /\ forall bpr_left_bpfpx_result_choice_prime bpr_right_bpfpx_result_choice_prime. S (bpr_index_bpfpx_result) = bpr_left_bpfpx_result_choice_prime * bpr_right_bpfpx_result_choice_prime -> bpr_left_bpfpx_result_choice_prime = 1 \/ bpr_right_bpfpx_result_choice_prime = 1)) /\ bpr_value_bpfpx_result = S (bpr_index_bpfpx_result)) \/ (~((~(S (bpr_index_bpfpx_result) = 1) /\ forall bpr_left_bpfpx_result_choice_prime bpr_right_bpfpx_result_choice_prime. S (bpr_index_bpfpx_result) = bpr_left_bpfpx_result_choice_prime * bpr_right_bpfpx_result_choice_prime -> bpr_left_bpfpx_result_choice_prime = 1 \/ bpr_right_bpfpx_result_choice_prime = 1)) /\ bpr_value_bpfpx_result = 1)))))

Proof neighborhood

Direct theorem prerequisites

Direct theorem dependents

Definition-aware tactic body

Only local propositions introduced by have or suffices are compacted. Every changed line has an exact-AST conservative-expansion receipt; the kernel still receives the immutable original tactic script.

Read the argument

Proof checkpoints

20 script commands · 8 reading checkpoints · 3 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 (3)
01Induction on mL1–1

Split the argument into the base and successor obligations. The induction hypothesis is available only in the successor branch.

  1. L1
    induction m
02Construct an explicit witnessL2–3

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

  1. L2
    exists 0
  2. L3
    exists 0
03Fix variables and assumptionsL4–5

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

  1. L4
    intro i
  2. L5
    intro hi
04Separate the logical casesL6–7

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

  1. L6
    exfalso
  2. L7
    cases hi
05Establish hsiL8–12

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

  1. L8
    have hsi : S i = 0
  2. L9
    apply add_eq_zero_right
  3. L10
    exact hi_witness
  4. L11
    apply succ_ne_zero
  5. L12
    exact hsi
06Establish hpreviousL13–14

Establish this local claim before using it. It is not an additional assumption.

  1. L13
    have hprevious : ∃ b. ∃ c. ∀ x. Lt(x,m) → ∃ y. BetaAt(b,c,x,y) ∧ (Prime(S x) ∧ y = S x ∨ ¬Prime(S x) ∧ y = 1)Definitions: Lt(x,m)BetaAt(b,c,x,y)Prime(S x)Original native command in the exact edition
  2. L14
    exact IH
07Separate the logical casesL15–16

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

  1. L15
    cases hprevious
  2. L16
    cases hprevious_witness
08Establish hnextL17–20

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply primorial factor prefix extend.

  1. L17
    have hnext : ∃ b. ∃ c. ∀ x. Lt(x,S m) → ∃ y. BetaAt(b,c,x,y) ∧ (Prime(S x) ∧ y = S x ∨ ¬Prime(S x) ∧ y = 1)Definitions: Lt(x,S m)BetaAt(b,c,x,y)Prime(S x)Original native command in the exact edition
  2. L18
    apply primorial_factor_prefix_extend
  3. L19
    exact hprevious_witness_witness
  4. L20
    exact hnext

Library-wide reading audit

Original defined command ledger · 20 lines
  1. 0001induction m
  2. 0002exists 0
  3. 0003exists 0
  4. 0004intro i
  5. 0005intro hi
  6. 0006exfalso
  7. 0007cases hi
  8. 0008have hsi : S i = 0
  9. 0009apply add_eq_zero_right
  10. 0010exact hi_witness
  11. 0011apply succ_ne_zero
  12. 0012exact hsi
  13. 0013have hprevious : ∃ b. ∃ c. ∀ x. Lt(x,m) → ∃ y. BetaAt(b,c,x,y) ∧ (Prime(S x) ∧ y = S x ∨ ¬Prime(S x) ∧ y = 1)
    Exact native replay linehave hprevious : exists b c. (forall bpr_index_bpfpx_previous. (exists bpr_gap_bpfpx_previous_bound. bpr_gap_bpfpx_previous_bound + S (bpr_index_bpfpx_previous) = m) -> exists bpr_value_bpfpx_previous. ((((exists bpr_height_bpfpx_previous_decoded. bpr_height_bpfpx_previous_decoded + S (bpr_value_bpfpx_previous) = S ((S (bpr_index_bpfpx_previous)) * c)) /\ exists bpr_quotient_bpfpx_previous_decoded. b = bpr_quotient_bpfpx_previous_decoded * S ((S (bpr_index_bpfpx_previous)) * c) + (bpr_value_bpfpx_previous))) /\ (((((~(S (bpr_index_bpfpx_previous) = 1) /\ forall bpr_left_bpfpx_previous_choice_prime bpr_right_bpfpx_previous_choice_prime. S (bpr_index_bpfpx_previous) = bpr_left_bpfpx_previous_choice_prime * bpr_right_bpfpx_previous_choice_prime -> bpr_left_bpfpx_previous_choice_prime = 1 \/ bpr_right_bpfpx_previous_choice_prime = 1)) /\ bpr_value_bpfpx_previous = S (bpr_index_bpfpx_previous)) \/ (~((~(S (bpr_index_bpfpx_previous) = 1) /\ forall bpr_left_bpfpx_previous_choice_prime bpr_right_bpfpx_previous_choice_prime. S (bpr_index_bpfpx_previous) = bpr_left_bpfpx_previous_choice_prime * bpr_right_bpfpx_previous_choice_prime -> bpr_left_bpfpx_previous_choice_prime = 1 \/ bpr_right_bpfpx_previous_choice_prime = 1)) /\ bpr_value_bpfpx_previous = 1)))))
  14. 0014exact IH
  15. 0015cases hprevious
  16. 0016cases hprevious_witness
  17. 0017have hnext : ∃ b. ∃ c. ∀ x. Lt(x,S m) → ∃ y. BetaAt(b,c,x,y) ∧ (Prime(S x) ∧ y = S x ∨ ¬Prime(S x) ∧ y = 1)
    Exact native replay linehave hnext : exists b c. (forall bpr_index_bpfpx_successor. (exists bpr_gap_bpfpx_successor_bound. bpr_gap_bpfpx_successor_bound + S (bpr_index_bpfpx_successor) = S m) -> exists bpr_value_bpfpx_successor. ((((exists bpr_height_bpfpx_successor_decoded. bpr_height_bpfpx_successor_decoded + S (bpr_value_bpfpx_successor) = S ((S (bpr_index_bpfpx_successor)) * c)) /\ exists bpr_quotient_bpfpx_successor_decoded. b = bpr_quotient_bpfpx_successor_decoded * S ((S (bpr_index_bpfpx_successor)) * c) + (bpr_value_bpfpx_successor))) /\ (((((~(S (bpr_index_bpfpx_successor) = 1) /\ forall bpr_left_bpfpx_successor_choice_prime bpr_right_bpfpx_successor_choice_prime. S (bpr_index_bpfpx_successor) = bpr_left_bpfpx_successor_choice_prime * bpr_right_bpfpx_successor_choice_prime -> bpr_left_bpfpx_successor_choice_prime = 1 \/ bpr_right_bpfpx_successor_choice_prime = 1)) /\ bpr_value_bpfpx_successor = S (bpr_index_bpfpx_successor)) \/ (~((~(S (bpr_index_bpfpx_successor) = 1) /\ forall bpr_left_bpfpx_successor_choice_prime bpr_right_bpfpx_successor_choice_prime. S (bpr_index_bpfpx_successor) = bpr_left_bpfpx_successor_choice_prime * bpr_right_bpfpx_successor_choice_prime -> bpr_left_bpfpx_successor_choice_prime = 1 \/ bpr_right_bpfpx_successor_choice_prime = 1)) /\ bpr_value_bpfpx_successor = 1)))))
  18. 0018apply primorial_factor_prefix_extend
  19. 0019exact hprevious_witness_witness
  20. 0020exact hnext