BT00XX · Bertrand theorem

double_quotient_carry_prefix_exists

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

Doubled quotient prefixes admit a beta-coded carry 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

∀ p. ∀ n. ∀ b. ∀ c. ∀ d. ∀ e. ∀ l. PowerQuotPrefix(p,n,b,c,l)PowerQuotPrefix(p,n + n,d,e,l) → ∃ x. ∃ y. ∀ z. Lt(z,l) → ∃ m. ∃ k. ∃ i. BetaAt(b,c,z,m) ∧ (BetaAt(d,e,z,k) ∧ (BetaAt(x,y,z,i) ∧ (i = 0 ∧ k = m + m ∨ i = 1 ∧ k = S (m + m))))

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

6 occurrences

In local proof propositions

8 occurrences

Exact expanded native-PA statement
forall p n b c d e l. (forall bls_index_b5ccpx_left. (exists bls_gap_b5ccpx_left_bound. bls_gap_b5ccpx_left_bound + S (bls_index_b5ccpx_left) = (l)) -> exists bls_power_b5ccpx_left bls_quotient_b5ccpx_left bls_remainder_b5ccpx_left. ((exists bpvi_b_bls_b5ccpx_left_power bpvi_c_bls_b5ccpx_left_power. ((forall bpvi_i_bls_b5ccpx_left_power. (exists bpvi_repeat_gap_bls_b5ccpx_left_power. bpvi_repeat_gap_bls_b5ccpx_left_power + S bpvi_i_bls_b5ccpx_left_power = S bls_index_b5ccpx_left) -> (((exists bpvi_h_bls_b5ccpx_left_power_repeat. bpvi_h_bls_b5ccpx_left_power_repeat + S (p) = S ((S (bpvi_i_bls_b5ccpx_left_power)) * bpvi_c_bls_b5ccpx_left_power)) /\ exists bpvi_q_bls_b5ccpx_left_power_repeat. bpvi_b_bls_b5ccpx_left_power = bpvi_q_bls_b5ccpx_left_power_repeat * S ((S (bpvi_i_bls_b5ccpx_left_power)) * bpvi_c_bls_b5ccpx_left_power) + (p)))) /\ (exists bpvi_u_bls_b5ccpx_left_power bpvi_v_bls_b5ccpx_left_power. ((((exists bpvi_h_bls_b5ccpx_left_power_start. bpvi_h_bls_b5ccpx_left_power_start + S (1) = S ((S (0)) * bpvi_v_bls_b5ccpx_left_power)) /\ exists bpvi_q_bls_b5ccpx_left_power_start. bpvi_u_bls_b5ccpx_left_power = bpvi_q_bls_b5ccpx_left_power_start * S ((S (0)) * bpvi_v_bls_b5ccpx_left_power) + (1))) /\ ((((exists bpvi_h_bls_b5ccpx_left_power_terminal. bpvi_h_bls_b5ccpx_left_power_terminal + S (bls_power_b5ccpx_left) = S ((S (S bls_index_b5ccpx_left)) * bpvi_v_bls_b5ccpx_left_power)) /\ exists bpvi_q_bls_b5ccpx_left_power_terminal. bpvi_u_bls_b5ccpx_left_power = bpvi_q_bls_b5ccpx_left_power_terminal * S ((S (S bls_index_b5ccpx_left)) * bpvi_v_bls_b5ccpx_left_power) + (bls_power_b5ccpx_left))) /\ forall bpvi_j_bls_b5ccpx_left_power. (exists bpvi_product_gap_bls_b5ccpx_left_power. bpvi_product_gap_bls_b5ccpx_left_power + S bpvi_j_bls_b5ccpx_left_power = S bls_index_b5ccpx_left) -> exists bpvi_factor_bls_b5ccpx_left_power bpvi_partial_bls_b5ccpx_left_power bpvi_successor_bls_b5ccpx_left_power. ((((exists bpvi_h_bls_b5ccpx_left_power_factor. bpvi_h_bls_b5ccpx_left_power_factor + S (bpvi_factor_bls_b5ccpx_left_power) = S ((S (bpvi_j_bls_b5ccpx_left_power)) * bpvi_c_bls_b5ccpx_left_power)) /\ exists bpvi_q_bls_b5ccpx_left_power_factor. bpvi_b_bls_b5ccpx_left_power = bpvi_q_bls_b5ccpx_left_power_factor * S ((S (bpvi_j_bls_b5ccpx_left_power)) * bpvi_c_bls_b5ccpx_left_power) + (bpvi_factor_bls_b5ccpx_left_power))) /\ ((((exists bpvi_h_bls_b5ccpx_left_power_partial. bpvi_h_bls_b5ccpx_left_power_partial + S (bpvi_partial_bls_b5ccpx_left_power) = S ((S (bpvi_j_bls_b5ccpx_left_power)) * bpvi_v_bls_b5ccpx_left_power)) /\ exists bpvi_q_bls_b5ccpx_left_power_partial. bpvi_u_bls_b5ccpx_left_power = bpvi_q_bls_b5ccpx_left_power_partial * S ((S (bpvi_j_bls_b5ccpx_left_power)) * bpvi_v_bls_b5ccpx_left_power) + (bpvi_partial_bls_b5ccpx_left_power))) /\ ((((exists bpvi_h_bls_b5ccpx_left_power_successor. bpvi_h_bls_b5ccpx_left_power_successor + S (bpvi_successor_bls_b5ccpx_left_power) = S ((S (S bpvi_j_bls_b5ccpx_left_power)) * bpvi_v_bls_b5ccpx_left_power)) /\ exists bpvi_q_bls_b5ccpx_left_power_successor. bpvi_u_bls_b5ccpx_left_power = bpvi_q_bls_b5ccpx_left_power_successor * S ((S (S bpvi_j_bls_b5ccpx_left_power)) * bpvi_v_bls_b5ccpx_left_power) + (bpvi_successor_bls_b5ccpx_left_power))) /\ bpvi_successor_bls_b5ccpx_left_power = bpvi_partial_bls_b5ccpx_left_power * bpvi_factor_bls_b5ccpx_left_power)))))))) /\ ((((exists ff_h_bls_b5ccpx_left_quotient_entry. ff_h_bls_b5ccpx_left_quotient_entry + S (bls_quotient_b5ccpx_left) = S ((S (bls_index_b5ccpx_left)) * c)) /\ exists ff_q_bls_b5ccpx_left_quotient_entry. b = ff_q_bls_b5ccpx_left_quotient_entry * S ((S (bls_index_b5ccpx_left)) * c) + (bls_quotient_b5ccpx_left))) /\ ((n = bls_power_b5ccpx_left * bls_quotient_b5ccpx_left + bls_remainder_b5ccpx_left /\ exists bls_remainder_gap_b5ccpx_left_division. bls_remainder_gap_b5ccpx_left_division + S (bls_remainder_b5ccpx_left) = bls_power_b5ccpx_left))))) -> (forall bls_index_b5ccpx_right. (exists bls_gap_b5ccpx_right_bound. bls_gap_b5ccpx_right_bound + S (bls_index_b5ccpx_right) = (l)) -> exists bls_power_b5ccpx_right bls_quotient_b5ccpx_right bls_remainder_b5ccpx_right. ((exists bpvi_b_bls_b5ccpx_right_power bpvi_c_bls_b5ccpx_right_power. ((forall bpvi_i_bls_b5ccpx_right_power. (exists bpvi_repeat_gap_bls_b5ccpx_right_power. bpvi_repeat_gap_bls_b5ccpx_right_power + S bpvi_i_bls_b5ccpx_right_power = S bls_index_b5ccpx_right) -> (((exists bpvi_h_bls_b5ccpx_right_power_repeat. bpvi_h_bls_b5ccpx_right_power_repeat + S (p) = S ((S (bpvi_i_bls_b5ccpx_right_power)) * bpvi_c_bls_b5ccpx_right_power)) /\ exists bpvi_q_bls_b5ccpx_right_power_repeat. bpvi_b_bls_b5ccpx_right_power = bpvi_q_bls_b5ccpx_right_power_repeat * S ((S (bpvi_i_bls_b5ccpx_right_power)) * bpvi_c_bls_b5ccpx_right_power) + (p)))) /\ (exists bpvi_u_bls_b5ccpx_right_power bpvi_v_bls_b5ccpx_right_power. ((((exists bpvi_h_bls_b5ccpx_right_power_start. bpvi_h_bls_b5ccpx_right_power_start + S (1) = S ((S (0)) * bpvi_v_bls_b5ccpx_right_power)) /\ exists bpvi_q_bls_b5ccpx_right_power_start. bpvi_u_bls_b5ccpx_right_power = bpvi_q_bls_b5ccpx_right_power_start * S ((S (0)) * bpvi_v_bls_b5ccpx_right_power) + (1))) /\ ((((exists bpvi_h_bls_b5ccpx_right_power_terminal. bpvi_h_bls_b5ccpx_right_power_terminal + S (bls_power_b5ccpx_right) = S ((S (S bls_index_b5ccpx_right)) * bpvi_v_bls_b5ccpx_right_power)) /\ exists bpvi_q_bls_b5ccpx_right_power_terminal. bpvi_u_bls_b5ccpx_right_power = bpvi_q_bls_b5ccpx_right_power_terminal * S ((S (S bls_index_b5ccpx_right)) * bpvi_v_bls_b5ccpx_right_power) + (bls_power_b5ccpx_right))) /\ forall bpvi_j_bls_b5ccpx_right_power. (exists bpvi_product_gap_bls_b5ccpx_right_power. bpvi_product_gap_bls_b5ccpx_right_power + S bpvi_j_bls_b5ccpx_right_power = S bls_index_b5ccpx_right) -> exists bpvi_factor_bls_b5ccpx_right_power bpvi_partial_bls_b5ccpx_right_power bpvi_successor_bls_b5ccpx_right_power. ((((exists bpvi_h_bls_b5ccpx_right_power_factor. bpvi_h_bls_b5ccpx_right_power_factor + S (bpvi_factor_bls_b5ccpx_right_power) = S ((S (bpvi_j_bls_b5ccpx_right_power)) * bpvi_c_bls_b5ccpx_right_power)) /\ exists bpvi_q_bls_b5ccpx_right_power_factor. bpvi_b_bls_b5ccpx_right_power = bpvi_q_bls_b5ccpx_right_power_factor * S ((S (bpvi_j_bls_b5ccpx_right_power)) * bpvi_c_bls_b5ccpx_right_power) + (bpvi_factor_bls_b5ccpx_right_power))) /\ ((((exists bpvi_h_bls_b5ccpx_right_power_partial. bpvi_h_bls_b5ccpx_right_power_partial + S (bpvi_partial_bls_b5ccpx_right_power) = S ((S (bpvi_j_bls_b5ccpx_right_power)) * bpvi_v_bls_b5ccpx_right_power)) /\ exists bpvi_q_bls_b5ccpx_right_power_partial. bpvi_u_bls_b5ccpx_right_power = bpvi_q_bls_b5ccpx_right_power_partial * S ((S (bpvi_j_bls_b5ccpx_right_power)) * bpvi_v_bls_b5ccpx_right_power) + (bpvi_partial_bls_b5ccpx_right_power))) /\ ((((exists bpvi_h_bls_b5ccpx_right_power_successor. bpvi_h_bls_b5ccpx_right_power_successor + S (bpvi_successor_bls_b5ccpx_right_power) = S ((S (S bpvi_j_bls_b5ccpx_right_power)) * bpvi_v_bls_b5ccpx_right_power)) /\ exists bpvi_q_bls_b5ccpx_right_power_successor. bpvi_u_bls_b5ccpx_right_power = bpvi_q_bls_b5ccpx_right_power_successor * S ((S (S bpvi_j_bls_b5ccpx_right_power)) * bpvi_v_bls_b5ccpx_right_power) + (bpvi_successor_bls_b5ccpx_right_power))) /\ bpvi_successor_bls_b5ccpx_right_power = bpvi_partial_bls_b5ccpx_right_power * bpvi_factor_bls_b5ccpx_right_power)))))))) /\ ((((exists ff_h_bls_b5ccpx_right_quotient_entry. ff_h_bls_b5ccpx_right_quotient_entry + S (bls_quotient_b5ccpx_right) = S ((S (bls_index_b5ccpx_right)) * e)) /\ exists ff_q_bls_b5ccpx_right_quotient_entry. d = ff_q_bls_b5ccpx_right_quotient_entry * S ((S (bls_index_b5ccpx_right)) * e) + (bls_quotient_b5ccpx_right))) /\ ((n + n = bls_power_b5ccpx_right * bls_quotient_b5ccpx_right + bls_remainder_b5ccpx_right /\ exists bls_remainder_gap_b5ccpx_right_division. bls_remainder_gap_b5ccpx_right_division + S (bls_remainder_b5ccpx_right) = bls_power_b5ccpx_right))))) -> exists f g. (forall b5cc_index_b5ccpx_result. (exists bcf_lt_gap_b5ccpx_result_bound. bcf_lt_gap_b5ccpx_result_bound + S (b5cc_index_b5ccpx_result) = l) -> exists b5cc_left_b5ccpx_result b5cc_right_b5ccpx_result b5cc_bit_b5ccpx_result. (((exists fs_h_b5cc_b5ccpx_result_left. fs_h_b5cc_b5ccpx_result_left + S (b5cc_left_b5ccpx_result) = S ((S (b5cc_index_b5ccpx_result)) * c)) /\ exists fs_q_b5cc_b5ccpx_result_left. b = fs_q_b5cc_b5ccpx_result_left * S ((S (b5cc_index_b5ccpx_result)) * c) + (b5cc_left_b5ccpx_result))) /\ ((((exists fs_h_b5cc_b5ccpx_result_right. fs_h_b5cc_b5ccpx_result_right + S (b5cc_right_b5ccpx_result) = S ((S (b5cc_index_b5ccpx_result)) * e)) /\ exists fs_q_b5cc_b5ccpx_result_right. d = fs_q_b5cc_b5ccpx_result_right * S ((S (b5cc_index_b5ccpx_result)) * e) + (b5cc_right_b5ccpx_result))) /\ ((((exists fs_h_b5cc_b5ccpx_result_bit. fs_h_b5cc_b5ccpx_result_bit + S (b5cc_bit_b5ccpx_result) = S ((S (b5cc_index_b5ccpx_result)) * g)) /\ exists fs_q_b5cc_b5ccpx_result_bit. f = fs_q_b5cc_b5ccpx_result_bit * S ((S (b5cc_index_b5ccpx_result)) * g) + (b5cc_bit_b5ccpx_result))) /\ (((b5cc_bit_b5ccpx_result = 0 /\ b5cc_right_b5ccpx_result = b5cc_left_b5ccpx_result + b5cc_left_b5ccpx_result) \/ (b5cc_bit_b5ccpx_result = 1 /\ b5cc_right_b5ccpx_result = S (b5cc_left_b5ccpx_result + b5cc_left_b5ccpx_result)))))))

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

73 script commands · 13 reading checkpoints · 5 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 (6)
01Fix variables and assumptionsL1–6

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

  1. L1
    intro p
  2. L2
    intro n
  3. L3
    intro b
  4. L4
    intro c
  5. L5
    intro d
  6. L6
    intro e
02Induction on lL7–9

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

  1. L7
    induction l
  2. L8
    intro hleft
  3. L9
    intro hright
03Construct an explicit witnessL10–11

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

  1. L10
    exists 0
  2. L11
    exists 0
04Fix variables and assumptionsL12–13

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

  1. L12
    intro i
  2. L13
    intro hi
05Separate the logical casesL14–15

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

  1. L14
    exfalso
  2. L15
    cases hi
06Establish hzeroL16–25

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

  1. L16
    have hzero : S i = 0
  2. L17
    specialize add_eq_zero_right x
  3. L18
    specialize add_eq_zero_right (S i)
  4. L19
    apply add_eq_zero_right
  5. L20
    exact hi_witness
  6. L21
    specialize succ_ne_zero i
  7. L22
    apply succ_ne_zero
  8. L23
    exact hzero
  9. L24
    intro hleft
  10. L25
    intro hright
07Establish hleft_prefixL26–34

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

  1. L26
    have hleft_prefix : PowerQuotPrefix(p,n,b,c,l)Definitions: PowerQuotPrefix(p,n,b,c,l)Original native command in the exact edition
  2. L27
    intro i
  3. L28
    intro hi
  4. L29
    specialize hleft i
  5. L30
    apply hleft
  6. L31
    specialize le_succ (S i)
  7. L32
    specialize le_succ l
  8. L33
    apply le_succ
  9. L34
    exact hi
08Establish hright_prefixL35–43

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

  1. L35
    have hright_prefix : PowerQuotPrefix(p,n + n,d,e,l)Definitions: PowerQuotPrefix(p,n + n,d,e,l)Original native command in the exact edition
  2. L36
    intro i
  3. L37
    intro hi
  4. L38
    specialize hright i
  5. L39
    apply hright
  6. L40
    specialize le_succ (S i)
  7. L41
    specialize le_succ l
  8. L42
    apply le_succ
  9. L43
    exact hi
09Establish hprefixL44–47

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

  1. L44
    have hprefix : ∃ f. ∃ g. ∀ b5cc_index_b5ccpx_previous. Lt(b5cc_index_b5ccpx_previous,l) → ∃ x. ∃ y. ∃ z. BetaAt(b,c,b5cc_index_b5ccpx_previous,x) ∧ (BetaAt(d,e,b5cc_index_b5ccpx_previous,y) ∧ (BetaAt(f,g,b5cc_index_b5ccpx_previous,z) ∧ (z = 0 ∧ y = x + x ∨ z = 1 ∧ y = S (x + x))))Definitions: Lt(b5cc_index_b5ccpx_previous,l)BetaAt(b,c,b5cc_index_b5ccpx_previous,x)BetaAt(d,e,b5cc_index_b5ccpx_previous,y)BetaAt(f,g,b5cc_index_b5ccpx_previous,z)Original native command in the exact edition
  2. L45
    apply IH
  3. L46
    exact hleft_prefix
  4. L47
    exact hright_prefix
10Separate the logical casesL48–49

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

  1. L48
    cases hprefix
  2. L49
    cases hprefix_witness
11Establish hlastL50–59

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply double quotient carry choice.

  1. L50
    have hlast : ∃ q. ∃ Q. ∃ bit. BetaAt(b,c,l,q) ∧ (BetaAt(d,e,l,Q) ∧ (bit = 0 ∧ Q = q + q ∨ bit = 1 ∧ Q = S (q + q)))Definitions: BetaAt(b,c,l,q)BetaAt(d,e,l,Q)Original native command in the exact edition
  2. L51
    specialize double_quotient_carry_choice p
  3. L52
    specialize double_quotient_carry_choice n
  4. L53
    specialize double_quotient_carry_choice b
  5. L54
    specialize double_quotient_carry_choice c
  6. L55
    specialize double_quotient_carry_choice d
  7. L56
    specialize double_quotient_carry_choice e
  8. L57
    specialize double_quotient_carry_choice (S l)
  9. L58
    specialize double_quotient_carry_choice l
  10. L59
    apply double_quotient_carry_choice
12Use earlier factsL60–69

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

  1. L60
    exact hleft
  2. L61
    exact hright
  3. L62
    specialize le_refl (S l)
  4. L63
    exact le_refl
  5. L64
    specialize double_quotient_carry_prefix_extend b
  6. L65
    specialize double_quotient_carry_prefix_extend c
  7. L66
    specialize double_quotient_carry_prefix_extend d
  8. L67
    specialize double_quotient_carry_prefix_extend e
  9. L68
    specialize double_quotient_carry_prefix_extend x
  10. L69
    specialize double_quotient_carry_prefix_extend x1
13Use earlier factsL70–73

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

  1. L70
    specialize double_quotient_carry_prefix_extend l
  2. L71
    apply double_quotient_carry_prefix_extend
  3. L72
    exact hprefix_witness_witness
  4. L73
    exact hlast

Library-wide reading audit

Original defined command ledger · 73 lines
  1. 0001intro p
  2. 0002intro n
  3. 0003intro b
  4. 0004intro c
  5. 0005intro d
  6. 0006intro e
  7. 0007induction l
  8. 0008intro hleft
  9. 0009intro hright
  10. 0010exists 0
  11. 0011exists 0
  12. 0012intro i
  13. 0013intro hi
  14. 0014exfalso
  15. 0015cases hi
  16. 0016have hzero : S i = 0
  17. 0017specialize add_eq_zero_right x
  18. 0018specialize add_eq_zero_right (S i)
  19. 0019apply add_eq_zero_right
  20. 0020exact hi_witness
  21. 0021specialize succ_ne_zero i
  22. 0022apply succ_ne_zero
  23. 0023exact hzero
  24. 0024intro hleft
  25. 0025intro hright
  26. 0026have hleft_prefix : PowerQuotPrefix(p,n,b,c,l)
    Exact native replay linehave hleft_prefix : forall bls_index_b5ccpx_left_prefix. (exists bls_gap_b5ccpx_left_prefix_bound. bls_gap_b5ccpx_left_prefix_bound + S (bls_index_b5ccpx_left_prefix) = (l)) -> exists bls_power_b5ccpx_left_prefix bls_quotient_b5ccpx_left_prefix bls_remainder_b5ccpx_left_prefix. ((exists bpvi_b_bls_b5ccpx_left_prefix_power bpvi_c_bls_b5ccpx_left_prefix_power. ((forall bpvi_i_bls_b5ccpx_left_prefix_power. (exists bpvi_repeat_gap_bls_b5ccpx_left_prefix_power. bpvi_repeat_gap_bls_b5ccpx_left_prefix_power + S bpvi_i_bls_b5ccpx_left_prefix_power = S bls_index_b5ccpx_left_prefix) -> (((exists bpvi_h_bls_b5ccpx_left_prefix_power_repeat. bpvi_h_bls_b5ccpx_left_prefix_power_repeat + S (p) = S ((S (bpvi_i_bls_b5ccpx_left_prefix_power)) * bpvi_c_bls_b5ccpx_left_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_left_prefix_power_repeat. bpvi_b_bls_b5ccpx_left_prefix_power = bpvi_q_bls_b5ccpx_left_prefix_power_repeat * S ((S (bpvi_i_bls_b5ccpx_left_prefix_power)) * bpvi_c_bls_b5ccpx_left_prefix_power) + (p)))) /\ (exists bpvi_u_bls_b5ccpx_left_prefix_power bpvi_v_bls_b5ccpx_left_prefix_power. ((((exists bpvi_h_bls_b5ccpx_left_prefix_power_start. bpvi_h_bls_b5ccpx_left_prefix_power_start + S (1) = S ((S (0)) * bpvi_v_bls_b5ccpx_left_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_left_prefix_power_start. bpvi_u_bls_b5ccpx_left_prefix_power = bpvi_q_bls_b5ccpx_left_prefix_power_start * S ((S (0)) * bpvi_v_bls_b5ccpx_left_prefix_power) + (1))) /\ ((((exists bpvi_h_bls_b5ccpx_left_prefix_power_terminal. bpvi_h_bls_b5ccpx_left_prefix_power_terminal + S (bls_power_b5ccpx_left_prefix) = S ((S (S bls_index_b5ccpx_left_prefix)) * bpvi_v_bls_b5ccpx_left_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_left_prefix_power_terminal. bpvi_u_bls_b5ccpx_left_prefix_power = bpvi_q_bls_b5ccpx_left_prefix_power_terminal * S ((S (S bls_index_b5ccpx_left_prefix)) * bpvi_v_bls_b5ccpx_left_prefix_power) + (bls_power_b5ccpx_left_prefix))) /\ forall bpvi_j_bls_b5ccpx_left_prefix_power. (exists bpvi_product_gap_bls_b5ccpx_left_prefix_power. bpvi_product_gap_bls_b5ccpx_left_prefix_power + S bpvi_j_bls_b5ccpx_left_prefix_power = S bls_index_b5ccpx_left_prefix) -> exists bpvi_factor_bls_b5ccpx_left_prefix_power bpvi_partial_bls_b5ccpx_left_prefix_power bpvi_successor_bls_b5ccpx_left_prefix_power. ((((exists bpvi_h_bls_b5ccpx_left_prefix_power_factor. bpvi_h_bls_b5ccpx_left_prefix_power_factor + S (bpvi_factor_bls_b5ccpx_left_prefix_power) = S ((S (bpvi_j_bls_b5ccpx_left_prefix_power)) * bpvi_c_bls_b5ccpx_left_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_left_prefix_power_factor. bpvi_b_bls_b5ccpx_left_prefix_power = bpvi_q_bls_b5ccpx_left_prefix_power_factor * S ((S (bpvi_j_bls_b5ccpx_left_prefix_power)) * bpvi_c_bls_b5ccpx_left_prefix_power) + (bpvi_factor_bls_b5ccpx_left_prefix_power))) /\ ((((exists bpvi_h_bls_b5ccpx_left_prefix_power_partial. bpvi_h_bls_b5ccpx_left_prefix_power_partial + S (bpvi_partial_bls_b5ccpx_left_prefix_power) = S ((S (bpvi_j_bls_b5ccpx_left_prefix_power)) * bpvi_v_bls_b5ccpx_left_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_left_prefix_power_partial. bpvi_u_bls_b5ccpx_left_prefix_power = bpvi_q_bls_b5ccpx_left_prefix_power_partial * S ((S (bpvi_j_bls_b5ccpx_left_prefix_power)) * bpvi_v_bls_b5ccpx_left_prefix_power) + (bpvi_partial_bls_b5ccpx_left_prefix_power))) /\ ((((exists bpvi_h_bls_b5ccpx_left_prefix_power_successor. bpvi_h_bls_b5ccpx_left_prefix_power_successor + S (bpvi_successor_bls_b5ccpx_left_prefix_power) = S ((S (S bpvi_j_bls_b5ccpx_left_prefix_power)) * bpvi_v_bls_b5ccpx_left_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_left_prefix_power_successor. bpvi_u_bls_b5ccpx_left_prefix_power = bpvi_q_bls_b5ccpx_left_prefix_power_successor * S ((S (S bpvi_j_bls_b5ccpx_left_prefix_power)) * bpvi_v_bls_b5ccpx_left_prefix_power) + (bpvi_successor_bls_b5ccpx_left_prefix_power))) /\ bpvi_successor_bls_b5ccpx_left_prefix_power = bpvi_partial_bls_b5ccpx_left_prefix_power * bpvi_factor_bls_b5ccpx_left_prefix_power)))))))) /\ ((((exists ff_h_bls_b5ccpx_left_prefix_quotient_entry. ff_h_bls_b5ccpx_left_prefix_quotient_entry + S (bls_quotient_b5ccpx_left_prefix) = S ((S (bls_index_b5ccpx_left_prefix)) * c)) /\ exists ff_q_bls_b5ccpx_left_prefix_quotient_entry. b = ff_q_bls_b5ccpx_left_prefix_quotient_entry * S ((S (bls_index_b5ccpx_left_prefix)) * c) + (bls_quotient_b5ccpx_left_prefix))) /\ ((n = bls_power_b5ccpx_left_prefix * bls_quotient_b5ccpx_left_prefix + bls_remainder_b5ccpx_left_prefix /\ exists bls_remainder_gap_b5ccpx_left_prefix_division. bls_remainder_gap_b5ccpx_left_prefix_division + S (bls_remainder_b5ccpx_left_prefix) = bls_power_b5ccpx_left_prefix))))
  27. 0027intro i
  28. 0028intro hi
  29. 0029specialize hleft i
  30. 0030apply hleft
  31. 0031specialize le_succ (S i)
  32. 0032specialize le_succ l
  33. 0033apply le_succ
  34. 0034exact hi
  35. 0035have hright_prefix : PowerQuotPrefix(p,n + n,d,e,l)
    Exact native replay linehave hright_prefix : forall bls_index_b5ccpx_right_prefix. (exists bls_gap_b5ccpx_right_prefix_bound. bls_gap_b5ccpx_right_prefix_bound + S (bls_index_b5ccpx_right_prefix) = (l)) -> exists bls_power_b5ccpx_right_prefix bls_quotient_b5ccpx_right_prefix bls_remainder_b5ccpx_right_prefix. ((exists bpvi_b_bls_b5ccpx_right_prefix_power bpvi_c_bls_b5ccpx_right_prefix_power. ((forall bpvi_i_bls_b5ccpx_right_prefix_power. (exists bpvi_repeat_gap_bls_b5ccpx_right_prefix_power. bpvi_repeat_gap_bls_b5ccpx_right_prefix_power + S bpvi_i_bls_b5ccpx_right_prefix_power = S bls_index_b5ccpx_right_prefix) -> (((exists bpvi_h_bls_b5ccpx_right_prefix_power_repeat. bpvi_h_bls_b5ccpx_right_prefix_power_repeat + S (p) = S ((S (bpvi_i_bls_b5ccpx_right_prefix_power)) * bpvi_c_bls_b5ccpx_right_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_right_prefix_power_repeat. bpvi_b_bls_b5ccpx_right_prefix_power = bpvi_q_bls_b5ccpx_right_prefix_power_repeat * S ((S (bpvi_i_bls_b5ccpx_right_prefix_power)) * bpvi_c_bls_b5ccpx_right_prefix_power) + (p)))) /\ (exists bpvi_u_bls_b5ccpx_right_prefix_power bpvi_v_bls_b5ccpx_right_prefix_power. ((((exists bpvi_h_bls_b5ccpx_right_prefix_power_start. bpvi_h_bls_b5ccpx_right_prefix_power_start + S (1) = S ((S (0)) * bpvi_v_bls_b5ccpx_right_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_right_prefix_power_start. bpvi_u_bls_b5ccpx_right_prefix_power = bpvi_q_bls_b5ccpx_right_prefix_power_start * S ((S (0)) * bpvi_v_bls_b5ccpx_right_prefix_power) + (1))) /\ ((((exists bpvi_h_bls_b5ccpx_right_prefix_power_terminal. bpvi_h_bls_b5ccpx_right_prefix_power_terminal + S (bls_power_b5ccpx_right_prefix) = S ((S (S bls_index_b5ccpx_right_prefix)) * bpvi_v_bls_b5ccpx_right_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_right_prefix_power_terminal. bpvi_u_bls_b5ccpx_right_prefix_power = bpvi_q_bls_b5ccpx_right_prefix_power_terminal * S ((S (S bls_index_b5ccpx_right_prefix)) * bpvi_v_bls_b5ccpx_right_prefix_power) + (bls_power_b5ccpx_right_prefix))) /\ forall bpvi_j_bls_b5ccpx_right_prefix_power. (exists bpvi_product_gap_bls_b5ccpx_right_prefix_power. bpvi_product_gap_bls_b5ccpx_right_prefix_power + S bpvi_j_bls_b5ccpx_right_prefix_power = S bls_index_b5ccpx_right_prefix) -> exists bpvi_factor_bls_b5ccpx_right_prefix_power bpvi_partial_bls_b5ccpx_right_prefix_power bpvi_successor_bls_b5ccpx_right_prefix_power. ((((exists bpvi_h_bls_b5ccpx_right_prefix_power_factor. bpvi_h_bls_b5ccpx_right_prefix_power_factor + S (bpvi_factor_bls_b5ccpx_right_prefix_power) = S ((S (bpvi_j_bls_b5ccpx_right_prefix_power)) * bpvi_c_bls_b5ccpx_right_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_right_prefix_power_factor. bpvi_b_bls_b5ccpx_right_prefix_power = bpvi_q_bls_b5ccpx_right_prefix_power_factor * S ((S (bpvi_j_bls_b5ccpx_right_prefix_power)) * bpvi_c_bls_b5ccpx_right_prefix_power) + (bpvi_factor_bls_b5ccpx_right_prefix_power))) /\ ((((exists bpvi_h_bls_b5ccpx_right_prefix_power_partial. bpvi_h_bls_b5ccpx_right_prefix_power_partial + S (bpvi_partial_bls_b5ccpx_right_prefix_power) = S ((S (bpvi_j_bls_b5ccpx_right_prefix_power)) * bpvi_v_bls_b5ccpx_right_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_right_prefix_power_partial. bpvi_u_bls_b5ccpx_right_prefix_power = bpvi_q_bls_b5ccpx_right_prefix_power_partial * S ((S (bpvi_j_bls_b5ccpx_right_prefix_power)) * bpvi_v_bls_b5ccpx_right_prefix_power) + (bpvi_partial_bls_b5ccpx_right_prefix_power))) /\ ((((exists bpvi_h_bls_b5ccpx_right_prefix_power_successor. bpvi_h_bls_b5ccpx_right_prefix_power_successor + S (bpvi_successor_bls_b5ccpx_right_prefix_power) = S ((S (S bpvi_j_bls_b5ccpx_right_prefix_power)) * bpvi_v_bls_b5ccpx_right_prefix_power)) /\ exists bpvi_q_bls_b5ccpx_right_prefix_power_successor. bpvi_u_bls_b5ccpx_right_prefix_power = bpvi_q_bls_b5ccpx_right_prefix_power_successor * S ((S (S bpvi_j_bls_b5ccpx_right_prefix_power)) * bpvi_v_bls_b5ccpx_right_prefix_power) + (bpvi_successor_bls_b5ccpx_right_prefix_power))) /\ bpvi_successor_bls_b5ccpx_right_prefix_power = bpvi_partial_bls_b5ccpx_right_prefix_power * bpvi_factor_bls_b5ccpx_right_prefix_power)))))))) /\ ((((exists ff_h_bls_b5ccpx_right_prefix_quotient_entry. ff_h_bls_b5ccpx_right_prefix_quotient_entry + S (bls_quotient_b5ccpx_right_prefix) = S ((S (bls_index_b5ccpx_right_prefix)) * e)) /\ exists ff_q_bls_b5ccpx_right_prefix_quotient_entry. d = ff_q_bls_b5ccpx_right_prefix_quotient_entry * S ((S (bls_index_b5ccpx_right_prefix)) * e) + (bls_quotient_b5ccpx_right_prefix))) /\ ((n + n = bls_power_b5ccpx_right_prefix * bls_quotient_b5ccpx_right_prefix + bls_remainder_b5ccpx_right_prefix /\ exists bls_remainder_gap_b5ccpx_right_prefix_division. bls_remainder_gap_b5ccpx_right_prefix_division + S (bls_remainder_b5ccpx_right_prefix) = bls_power_b5ccpx_right_prefix))))
  36. 0036intro i
  37. 0037intro hi
  38. 0038specialize hright i
  39. 0039apply hright
  40. 0040specialize le_succ (S i)
  41. 0041specialize le_succ l
  42. 0042apply le_succ
  43. 0043exact hi
  44. 0044have hprefix : ∃ f. ∃ g. ∀ b5cc_index_b5ccpx_previous. Lt(b5cc_index_b5ccpx_previous,l) → ∃ x. ∃ y. ∃ z. BetaAt(b,c,b5cc_index_b5ccpx_previous,x) ∧ (BetaAt(d,e,b5cc_index_b5ccpx_previous,y) ∧ (BetaAt(f,g,b5cc_index_b5ccpx_previous,z) ∧ (z = 0 ∧ y = x + x ∨ z = 1 ∧ y = S (x + x))))
    Exact native replay linehave hprefix : exists f g. forall b5cc_index_b5ccpx_previous. (exists bcf_lt_gap_b5ccpx_previous_bound. bcf_lt_gap_b5ccpx_previous_bound + S (b5cc_index_b5ccpx_previous) = l) -> exists b5cc_left_b5ccpx_previous b5cc_right_b5ccpx_previous b5cc_bit_b5ccpx_previous. (((exists fs_h_b5cc_b5ccpx_previous_left. fs_h_b5cc_b5ccpx_previous_left + S (b5cc_left_b5ccpx_previous) = S ((S (b5cc_index_b5ccpx_previous)) * c)) /\ exists fs_q_b5cc_b5ccpx_previous_left. b = fs_q_b5cc_b5ccpx_previous_left * S ((S (b5cc_index_b5ccpx_previous)) * c) + (b5cc_left_b5ccpx_previous))) /\ ((((exists fs_h_b5cc_b5ccpx_previous_right. fs_h_b5cc_b5ccpx_previous_right + S (b5cc_right_b5ccpx_previous) = S ((S (b5cc_index_b5ccpx_previous)) * e)) /\ exists fs_q_b5cc_b5ccpx_previous_right. d = fs_q_b5cc_b5ccpx_previous_right * S ((S (b5cc_index_b5ccpx_previous)) * e) + (b5cc_right_b5ccpx_previous))) /\ ((((exists fs_h_b5cc_b5ccpx_previous_bit. fs_h_b5cc_b5ccpx_previous_bit + S (b5cc_bit_b5ccpx_previous) = S ((S (b5cc_index_b5ccpx_previous)) * g)) /\ exists fs_q_b5cc_b5ccpx_previous_bit. f = fs_q_b5cc_b5ccpx_previous_bit * S ((S (b5cc_index_b5ccpx_previous)) * g) + (b5cc_bit_b5ccpx_previous))) /\ (((b5cc_bit_b5ccpx_previous = 0 /\ b5cc_right_b5ccpx_previous = b5cc_left_b5ccpx_previous + b5cc_left_b5ccpx_previous) \/ (b5cc_bit_b5ccpx_previous = 1 /\ b5cc_right_b5ccpx_previous = S (b5cc_left_b5ccpx_previous + b5cc_left_b5ccpx_previous))))))
  45. 0045apply IH
  46. 0046exact hleft_prefix
  47. 0047exact hright_prefix
  48. 0048cases hprefix
  49. 0049cases hprefix_witness
  50. 0050have hlast : ∃ q. ∃ Q. ∃ bit. BetaAt(b,c,l,q) ∧ (BetaAt(d,e,l,Q) ∧ (bit = 0 ∧ Q = q + q ∨ bit = 1 ∧ Q = S (q + q)))
    Exact native replay linehave hlast : exists q Q bit. (((exists fs_h_b5ccpx_last_left. fs_h_b5ccpx_last_left + S (q) = S ((S (l)) * c)) /\ exists fs_q_b5ccpx_last_left. b = fs_q_b5ccpx_last_left * S ((S (l)) * c) + (q))) /\ ((((exists fs_h_b5ccpx_last_right. fs_h_b5ccpx_last_right + S (Q) = S ((S (l)) * e)) /\ exists fs_q_b5ccpx_last_right. d = fs_q_b5ccpx_last_right * S ((S (l)) * e) + (Q))) /\ (((bit = 0 /\ Q = q + q) \/ (bit = 1 /\ Q = S (q + q)))))
  51. 0051specialize double_quotient_carry_choice p
  52. 0052specialize double_quotient_carry_choice n
  53. 0053specialize double_quotient_carry_choice b
  54. 0054specialize double_quotient_carry_choice c
  55. 0055specialize double_quotient_carry_choice d
  56. 0056specialize double_quotient_carry_choice e
  57. 0057specialize double_quotient_carry_choice (S l)
  58. 0058specialize double_quotient_carry_choice l
  59. 0059apply double_quotient_carry_choice
  60. 0060exact hleft
  61. 0061exact hright
  62. 0062specialize le_refl (S l)
  63. 0063exact le_refl
  64. 0064specialize double_quotient_carry_prefix_extend b
  65. 0065specialize double_quotient_carry_prefix_extend c
  66. 0066specialize double_quotient_carry_prefix_extend d
  67. 0067specialize double_quotient_carry_prefix_extend e
  68. 0068specialize double_quotient_carry_prefix_extend x
  69. 0069specialize double_quotient_carry_prefix_extend x1
  70. 0070specialize double_quotient_carry_prefix_extend l
  71. 0071apply double_quotient_carry_prefix_extend
  72. 0072exact hprefix_witness_witness
  73. 0073exact hlast