BT00US · Bertrand theorem

primorial_interval_factor_prefix_exists

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

Every offset and length has a beta-coded selector interval.

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

∀ a. ∀ l. ∃ b. ∃ c. ∀ x. Lt(x,l) → ∃ y. BetaAt(b,c,x,y) ∧ (Prime(S (a + x)) ∧ y = S (a + x) ∨ ¬Prime(S (a + 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 a l. exists b c. (forall bpr_index_bpifpx_result. (exists bpr_gap_bpifpx_result_bound. bpr_gap_bpifpx_result_bound + S (bpr_index_bpifpx_result) = l) -> exists bpr_value_bpifpx_result. ((((exists bpr_height_bpifpx_result_decoded. bpr_height_bpifpx_result_decoded + S (bpr_value_bpifpx_result) = S ((S (bpr_index_bpifpx_result)) * c)) /\ exists bpr_quotient_bpifpx_result_decoded. b = bpr_quotient_bpifpx_result_decoded * S ((S (bpr_index_bpifpx_result)) * c) + (bpr_value_bpifpx_result))) /\ (((((~(S (a + bpr_index_bpifpx_result) = 1) /\ forall bpr_left_bpifpx_result_choice_prime bpr_right_bpifpx_result_choice_prime. S (a + bpr_index_bpifpx_result) = bpr_left_bpifpx_result_choice_prime * bpr_right_bpifpx_result_choice_prime -> bpr_left_bpifpx_result_choice_prime = 1 \/ bpr_right_bpifpx_result_choice_prime = 1)) /\ bpr_value_bpifpx_result = S (a + bpr_index_bpifpx_result)) \/ (~((~(S (a + bpr_index_bpifpx_result) = 1) /\ forall bpr_left_bpifpx_result_choice_prime bpr_right_bpifpx_result_choice_prime. S (a + bpr_index_bpifpx_result) = bpr_left_bpifpx_result_choice_prime * bpr_right_bpifpx_result_choice_prime -> bpr_left_bpifpx_result_choice_prime = 1 \/ bpr_right_bpifpx_result_choice_prime = 1)) /\ bpr_value_bpifpx_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

21 script commands · 9 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)
01Fix variables and assumptionsL1–1

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

  1. L1
    intro a
02Induction on lL2–2

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

  1. L2
    induction l
03Construct an explicit witnessL3–4

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

  1. L3
    exists 0
  2. L4
    exists 0
04Fix variables and assumptionsL5–6

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

  1. L5
    intro i
  2. L6
    intro hi
05Separate the logical casesL7–8

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

  1. L7
    exfalso
  2. L8
    cases hi
06Establish hsiL9–13

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

  1. L9
    have hsi : S i = 0
  2. L10
    apply add_eq_zero_right
  3. L11
    exact hi_witness
  4. L12
    apply succ_ne_zero
  5. L13
    exact hsi
07Establish hpreviousL14–15

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

  1. L14
    have hprevious : ∃ b. ∃ c. ∀ x. Lt(x,l) → ∃ y. BetaAt(b,c,x,y) ∧ (Prime(S (a + x)) ∧ y = S (a + x) ∨ ¬Prime(S (a + x)) ∧ y = 1)Definitions: Lt(x,l)BetaAt(b,c,x,y)Prime(S (a + x))Original native command in the exact edition
  2. L15
    exact IH
08Separate the logical casesL16–17

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

  1. L16
    cases hprevious
  2. L17
    cases hprevious_witness
09Establish hnextL18–21

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

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

Library-wide reading audit

Original defined command ledger · 21 lines
  1. 0001intro a
  2. 0002induction l
  3. 0003exists 0
  4. 0004exists 0
  5. 0005intro i
  6. 0006intro hi
  7. 0007exfalso
  8. 0008cases hi
  9. 0009have hsi : S i = 0
  10. 0010apply add_eq_zero_right
  11. 0011exact hi_witness
  12. 0012apply succ_ne_zero
  13. 0013exact hsi
  14. 0014have hprevious : ∃ b. ∃ c. ∀ x. Lt(x,l) → ∃ y. BetaAt(b,c,x,y) ∧ (Prime(S (a + x)) ∧ y = S (a + x) ∨ ¬Prime(S (a + x)) ∧ y = 1)
    Exact native replay linehave hprevious : exists b c. (forall bpr_index_bpifpx_previous. (exists bpr_gap_bpifpx_previous_bound. bpr_gap_bpifpx_previous_bound + S (bpr_index_bpifpx_previous) = l) -> exists bpr_value_bpifpx_previous. ((((exists bpr_height_bpifpx_previous_decoded. bpr_height_bpifpx_previous_decoded + S (bpr_value_bpifpx_previous) = S ((S (bpr_index_bpifpx_previous)) * c)) /\ exists bpr_quotient_bpifpx_previous_decoded. b = bpr_quotient_bpifpx_previous_decoded * S ((S (bpr_index_bpifpx_previous)) * c) + (bpr_value_bpifpx_previous))) /\ (((((~(S (a + bpr_index_bpifpx_previous) = 1) /\ forall bpr_left_bpifpx_previous_choice_prime bpr_right_bpifpx_previous_choice_prime. S (a + bpr_index_bpifpx_previous) = bpr_left_bpifpx_previous_choice_prime * bpr_right_bpifpx_previous_choice_prime -> bpr_left_bpifpx_previous_choice_prime = 1 \/ bpr_right_bpifpx_previous_choice_prime = 1)) /\ bpr_value_bpifpx_previous = S (a + bpr_index_bpifpx_previous)) \/ (~((~(S (a + bpr_index_bpifpx_previous) = 1) /\ forall bpr_left_bpifpx_previous_choice_prime bpr_right_bpifpx_previous_choice_prime. S (a + bpr_index_bpifpx_previous) = bpr_left_bpifpx_previous_choice_prime * bpr_right_bpifpx_previous_choice_prime -> bpr_left_bpifpx_previous_choice_prime = 1 \/ bpr_right_bpifpx_previous_choice_prime = 1)) /\ bpr_value_bpifpx_previous = 1)))))
  15. 0015exact IH
  16. 0016cases hprevious
  17. 0017cases hprevious_witness
  18. 0018have hnext : ∃ b. ∃ c. ∀ x. Lt(x,S l) → ∃ y. BetaAt(b,c,x,y) ∧ (Prime(S (a + x)) ∧ y = S (a + x) ∨ ¬Prime(S (a + x)) ∧ y = 1)
    Exact native replay linehave hnext : exists b c. (forall bpr_index_bpifpx_successor. (exists bpr_gap_bpifpx_successor_bound. bpr_gap_bpifpx_successor_bound + S (bpr_index_bpifpx_successor) = S l) -> exists bpr_value_bpifpx_successor. ((((exists bpr_height_bpifpx_successor_decoded. bpr_height_bpifpx_successor_decoded + S (bpr_value_bpifpx_successor) = S ((S (bpr_index_bpifpx_successor)) * c)) /\ exists bpr_quotient_bpifpx_successor_decoded. b = bpr_quotient_bpifpx_successor_decoded * S ((S (bpr_index_bpifpx_successor)) * c) + (bpr_value_bpifpx_successor))) /\ (((((~(S (a + bpr_index_bpifpx_successor) = 1) /\ forall bpr_left_bpifpx_successor_choice_prime bpr_right_bpifpx_successor_choice_prime. S (a + bpr_index_bpifpx_successor) = bpr_left_bpifpx_successor_choice_prime * bpr_right_bpifpx_successor_choice_prime -> bpr_left_bpifpx_successor_choice_prime = 1 \/ bpr_right_bpifpx_successor_choice_prime = 1)) /\ bpr_value_bpifpx_successor = S (a + bpr_index_bpifpx_successor)) \/ (~((~(S (a + bpr_index_bpifpx_successor) = 1) /\ forall bpr_left_bpifpx_successor_choice_prime bpr_right_bpifpx_successor_choice_prime. S (a + bpr_index_bpifpx_successor) = bpr_left_bpifpx_successor_choice_prime * bpr_right_bpifpx_successor_choice_prime -> bpr_left_bpifpx_successor_choice_prime = 1 \/ bpr_right_bpifpx_successor_choice_prime = 1)) /\ bpr_value_bpifpx_successor = 1)))))
  19. 0019apply primorial_interval_factor_prefix_extend
  20. 0020exact hprevious_witness_witness
  21. 0021exact hnext