BT00SE · Bertrand theorem

eisenstein_initial_segment_prefix_extend

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

Append one exact threshold bit while preserving the old 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

∀ q. ∀ b. ∀ c. ∀ l. (∀ x. Lt(x,l) → ∃ y. BetaAt(b,c,x,y) ∧ (y = 1 ∧ Lt(x,q) ∨ y = 0 ∧ Lt(q,S x))) → (∃ x. x = 1 ∧ Lt(l,q) ∨ x = 0 ∧ Lt(q,S l)) → ∃ x. ∃ y. ∀ z. Lt(z,S l) → ∃ n. BetaAt(x,y,z,n) ∧ (n = 1 ∧ Lt(z,q) ∨ n = 0 ∧ Lt(q,S z))

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

10 occurrences

In local proof propositions

4 occurrences

Exact expanded native-PA statement
forall q b c l. (forall eis_index_initial_segment_extend_before. (exists eis_lt_gap_initial_segment_extend_before_bound. eis_lt_gap_initial_segment_extend_before_bound + S (eis_index_initial_segment_extend_before) = l) -> exists eis_bit_initial_segment_extend_before. ((((exists ff_h_eis_initial_segment_extend_before_decoded. ff_h_eis_initial_segment_extend_before_decoded + S (eis_bit_initial_segment_extend_before) = S ((S (eis_index_initial_segment_extend_before)) * c)) /\ exists ff_q_eis_initial_segment_extend_before_decoded. b = ff_q_eis_initial_segment_extend_before_decoded * S ((S (eis_index_initial_segment_extend_before)) * c) + (eis_bit_initial_segment_extend_before))) /\ (((eis_bit_initial_segment_extend_before = 1 /\ (exists eis_le_gap_initial_segment_extend_before_choice_inside. eis_le_gap_initial_segment_extend_before_choice_inside + (S eis_index_initial_segment_extend_before) = q)) \/ (eis_bit_initial_segment_extend_before = 0 /\ (exists eis_lt_gap_initial_segment_extend_before_choice_outside. eis_lt_gap_initial_segment_extend_before_choice_outside + S (q) = S eis_index_initial_segment_extend_before)))))) -> (exists bit. (((bit = 1 /\ (exists eis_le_gap_initial_segment_extend_last_inside. eis_le_gap_initial_segment_extend_last_inside + (S l) = q)) \/ (bit = 0 /\ (exists eis_lt_gap_initial_segment_extend_last_outside. eis_lt_gap_initial_segment_extend_last_outside + S (q) = S l))))) -> exists z d. (forall eis_index_initial_segment_extend_after. (exists eis_lt_gap_initial_segment_extend_after_bound. eis_lt_gap_initial_segment_extend_after_bound + S (eis_index_initial_segment_extend_after) = S l) -> exists eis_bit_initial_segment_extend_after. ((((exists ff_h_eis_initial_segment_extend_after_decoded. ff_h_eis_initial_segment_extend_after_decoded + S (eis_bit_initial_segment_extend_after) = S ((S (eis_index_initial_segment_extend_after)) * d)) /\ exists ff_q_eis_initial_segment_extend_after_decoded. z = ff_q_eis_initial_segment_extend_after_decoded * S ((S (eis_index_initial_segment_extend_after)) * d) + (eis_bit_initial_segment_extend_after))) /\ (((eis_bit_initial_segment_extend_after = 1 /\ (exists eis_le_gap_initial_segment_extend_after_choice_inside. eis_le_gap_initial_segment_extend_after_choice_inside + (S eis_index_initial_segment_extend_after) = q)) \/ (eis_bit_initial_segment_extend_after = 0 /\ (exists eis_lt_gap_initial_segment_extend_after_choice_outside. eis_lt_gap_initial_segment_extend_after_choice_outside + S (q) = S eis_index_initial_segment_extend_after))))))

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

46 script commands · 19 reading checkpoints · 2 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–6

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

  1. L1
    intro q
  2. L2
    intro b
  3. L3
    intro c
  4. L4
    intro l
  5. L5
    intro hprefix
  6. L6
    intro hchoice
02Separate the logical casesL7–7

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

  1. L7
    cases hchoice
03Use earlier factsL8–11

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

  1. L8
    specialize beta_prefix_extend l
  2. L9
    specialize beta_prefix_extend b
  3. L10
    specialize beta_prefix_extend c
  4. L11
    specialize beta_prefix_extend x
04Separate the logical casesL12–14

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

  1. L12
    cases beta_prefix_extend
  2. L13
    cases beta_prefix_extend_witness
  3. L14
    cases beta_prefix_extend_witness_witness
05Construct an explicit witnessL15–16

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

  1. L15
    exists x1
  2. L16
    exists x2
06Fix variables and assumptionsL17–18

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

  1. L17
    intro j
  2. L18
    intro hj
07Establish hsplitL19–23

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply finite lt succ eq or lt.

  1. L19
    have hsplit : j = l ∨ Lt(j,l)Definitions: Lt(j,l)Original native command in the exact edition
  2. L20
    specialize finite_lt_succ_eq_or_lt l
  3. L21
    specialize finite_lt_succ_eq_or_lt j
  4. L22
    apply finite_lt_succ_eq_or_lt
  5. L23
    exact hj
08Separate the logical casesL24–24

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

  1. L24
    cases hsplit
09Construct an explicit witnessL25–25

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

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

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

  1. L26
    split
11Calculate and transport equalitiesL27–28

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

  1. L27
    rewrite hsplit_left
  2. L28
    rewrite hsplit_left
12Use earlier factsL29–29

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

  1. L29
    exact beta_prefix_extend_witness_witness_left
13Calculate and transport equalitiesL30–31

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

  1. L30
    rewrite hsplit_left
  2. L31
    rewrite hsplit_left
14Use earlier factsL32–32

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

  1. L32
    exact hchoice_witness
15Establish holdL33–36

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

  1. L33
    have hold : ∃ oldbit. BetaAt(b,c,j,oldbit) ∧ (oldbit = 1 ∧ Lt(j,q) ∨ oldbit = 0 ∧ Lt(q,S j))Definitions: BetaAt(b,c,j,oldbit)Lt(j,q)Lt(q,S j)Original native command in the exact edition
  2. L34
    specialize hprefix j
  3. L35
    apply hprefix
  4. L36
    exact hsplit_right
16Separate the logical casesL37–38

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

  1. L37
    cases hold
  2. L38
    cases hold_witness
17Construct an explicit witnessL39–39

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

  1. L39
    exists x3
18Separate the logical casesL40–40

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

  1. L40
    split
19Use earlier factsL41–46

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

  1. L41
    specialize beta_prefix_extend_witness_witness_right j
  2. L42
    specialize beta_prefix_extend_witness_witness_right x3
  3. L43
    apply beta_prefix_extend_witness_witness_right
  4. L44
    exact hsplit_right
  5. L45
    exact hold_witness_left
  6. L46
    exact hold_witness_right

Library-wide reading audit

Original defined command ledger · 46 lines
  1. 0001intro q
  2. 0002intro b
  3. 0003intro c
  4. 0004intro l
  5. 0005intro hprefix
  6. 0006intro hchoice
  7. 0007cases hchoice
  8. 0008specialize beta_prefix_extend l
  9. 0009specialize beta_prefix_extend b
  10. 0010specialize beta_prefix_extend c
  11. 0011specialize beta_prefix_extend x
  12. 0012cases beta_prefix_extend
  13. 0013cases beta_prefix_extend_witness
  14. 0014cases beta_prefix_extend_witness_witness
  15. 0015exists x1
  16. 0016exists x2
  17. 0017intro j
  18. 0018intro hj
  19. 0019have hsplit : j = l ∨ Lt(j,l)
    Exact native replay linehave hsplit : j = l \/ exists gap. gap + S j = l
  20. 0020specialize finite_lt_succ_eq_or_lt l
  21. 0021specialize finite_lt_succ_eq_or_lt j
  22. 0022apply finite_lt_succ_eq_or_lt
  23. 0023exact hj
  24. 0024cases hsplit
  25. 0025exists x
  26. 0026split
  27. 0027rewrite hsplit_left
  28. 0028rewrite hsplit_left
  29. 0029exact beta_prefix_extend_witness_witness_left
  30. 0030rewrite hsplit_left
  31. 0031rewrite hsplit_left
  32. 0032exact hchoice_witness
  33. 0033have hold : ∃ oldbit. BetaAt(b,c,j,oldbit) ∧ (oldbit = 1 ∧ Lt(j,q) ∨ oldbit = 0 ∧ Lt(q,S j))
    Exact native replay linehave hold : exists oldbit. ((((exists ff_h_initial_segment_old. ff_h_initial_segment_old + S (oldbit) = S ((S (j)) * c)) /\ exists ff_q_initial_segment_old. b = ff_q_initial_segment_old * S ((S (j)) * c) + (oldbit))) /\ (((oldbit = 1 /\ (exists eis_le_gap_initial_segment_extend_old_choice_inside. eis_le_gap_initial_segment_extend_old_choice_inside + (S j) = q)) \/ (oldbit = 0 /\ (exists eis_lt_gap_initial_segment_extend_old_choice_outside. eis_lt_gap_initial_segment_extend_old_choice_outside + S (q) = S j)))))
  34. 0034specialize hprefix j
  35. 0035apply hprefix
  36. 0036exact hsplit_right
  37. 0037cases hold
  38. 0038cases hold_witness
  39. 0039exists x3
  40. 0040split
  41. 0041specialize beta_prefix_extend_witness_witness_right j
  42. 0042specialize beta_prefix_extend_witness_witness_right x3
  43. 0043apply beta_prefix_extend_witness_witness_right
  44. 0044exact hsplit_right
  45. 0045exact hold_witness_left
  46. 0046exact hold_witness_right