BT00XV · Bertrand theorem

double_quotient_carry_choice

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

Each pair of doubled quotients has a constructive carry bit.

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. ∀ i. PowerQuotPrefix(p,n,b,c,l)PowerQuotPrefix(p,n + n,d,e,l)Lt(i,l) → ∃ x. ∃ y. ∃ z. BetaAt(b,c,i,x) ∧ (BetaAt(d,e,i,y) ∧ (z = 0 ∧ y = x + x ∨ z = 1 ∧ y = S (x + x)))

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

5 occurrences

In local proof propositions

6 occurrences

Exact expanded native-PA statement
forall p n b c d e l i. (forall bls_index_b5ccqc_left. (exists bls_gap_b5ccqc_left_bound. bls_gap_b5ccqc_left_bound + S (bls_index_b5ccqc_left) = (l)) -> exists bls_power_b5ccqc_left bls_quotient_b5ccqc_left bls_remainder_b5ccqc_left. ((exists bpvi_b_bls_b5ccqc_left_power bpvi_c_bls_b5ccqc_left_power. ((forall bpvi_i_bls_b5ccqc_left_power. (exists bpvi_repeat_gap_bls_b5ccqc_left_power. bpvi_repeat_gap_bls_b5ccqc_left_power + S bpvi_i_bls_b5ccqc_left_power = S bls_index_b5ccqc_left) -> (((exists bpvi_h_bls_b5ccqc_left_power_repeat. bpvi_h_bls_b5ccqc_left_power_repeat + S (p) = S ((S (bpvi_i_bls_b5ccqc_left_power)) * bpvi_c_bls_b5ccqc_left_power)) /\ exists bpvi_q_bls_b5ccqc_left_power_repeat. bpvi_b_bls_b5ccqc_left_power = bpvi_q_bls_b5ccqc_left_power_repeat * S ((S (bpvi_i_bls_b5ccqc_left_power)) * bpvi_c_bls_b5ccqc_left_power) + (p)))) /\ (exists bpvi_u_bls_b5ccqc_left_power bpvi_v_bls_b5ccqc_left_power. ((((exists bpvi_h_bls_b5ccqc_left_power_start. bpvi_h_bls_b5ccqc_left_power_start + S (1) = S ((S (0)) * bpvi_v_bls_b5ccqc_left_power)) /\ exists bpvi_q_bls_b5ccqc_left_power_start. bpvi_u_bls_b5ccqc_left_power = bpvi_q_bls_b5ccqc_left_power_start * S ((S (0)) * bpvi_v_bls_b5ccqc_left_power) + (1))) /\ ((((exists bpvi_h_bls_b5ccqc_left_power_terminal. bpvi_h_bls_b5ccqc_left_power_terminal + S (bls_power_b5ccqc_left) = S ((S (S bls_index_b5ccqc_left)) * bpvi_v_bls_b5ccqc_left_power)) /\ exists bpvi_q_bls_b5ccqc_left_power_terminal. bpvi_u_bls_b5ccqc_left_power = bpvi_q_bls_b5ccqc_left_power_terminal * S ((S (S bls_index_b5ccqc_left)) * bpvi_v_bls_b5ccqc_left_power) + (bls_power_b5ccqc_left))) /\ forall bpvi_j_bls_b5ccqc_left_power. (exists bpvi_product_gap_bls_b5ccqc_left_power. bpvi_product_gap_bls_b5ccqc_left_power + S bpvi_j_bls_b5ccqc_left_power = S bls_index_b5ccqc_left) -> exists bpvi_factor_bls_b5ccqc_left_power bpvi_partial_bls_b5ccqc_left_power bpvi_successor_bls_b5ccqc_left_power. ((((exists bpvi_h_bls_b5ccqc_left_power_factor. bpvi_h_bls_b5ccqc_left_power_factor + S (bpvi_factor_bls_b5ccqc_left_power) = S ((S (bpvi_j_bls_b5ccqc_left_power)) * bpvi_c_bls_b5ccqc_left_power)) /\ exists bpvi_q_bls_b5ccqc_left_power_factor. bpvi_b_bls_b5ccqc_left_power = bpvi_q_bls_b5ccqc_left_power_factor * S ((S (bpvi_j_bls_b5ccqc_left_power)) * bpvi_c_bls_b5ccqc_left_power) + (bpvi_factor_bls_b5ccqc_left_power))) /\ ((((exists bpvi_h_bls_b5ccqc_left_power_partial. bpvi_h_bls_b5ccqc_left_power_partial + S (bpvi_partial_bls_b5ccqc_left_power) = S ((S (bpvi_j_bls_b5ccqc_left_power)) * bpvi_v_bls_b5ccqc_left_power)) /\ exists bpvi_q_bls_b5ccqc_left_power_partial. bpvi_u_bls_b5ccqc_left_power = bpvi_q_bls_b5ccqc_left_power_partial * S ((S (bpvi_j_bls_b5ccqc_left_power)) * bpvi_v_bls_b5ccqc_left_power) + (bpvi_partial_bls_b5ccqc_left_power))) /\ ((((exists bpvi_h_bls_b5ccqc_left_power_successor. bpvi_h_bls_b5ccqc_left_power_successor + S (bpvi_successor_bls_b5ccqc_left_power) = S ((S (S bpvi_j_bls_b5ccqc_left_power)) * bpvi_v_bls_b5ccqc_left_power)) /\ exists bpvi_q_bls_b5ccqc_left_power_successor. bpvi_u_bls_b5ccqc_left_power = bpvi_q_bls_b5ccqc_left_power_successor * S ((S (S bpvi_j_bls_b5ccqc_left_power)) * bpvi_v_bls_b5ccqc_left_power) + (bpvi_successor_bls_b5ccqc_left_power))) /\ bpvi_successor_bls_b5ccqc_left_power = bpvi_partial_bls_b5ccqc_left_power * bpvi_factor_bls_b5ccqc_left_power)))))))) /\ ((((exists ff_h_bls_b5ccqc_left_quotient_entry. ff_h_bls_b5ccqc_left_quotient_entry + S (bls_quotient_b5ccqc_left) = S ((S (bls_index_b5ccqc_left)) * c)) /\ exists ff_q_bls_b5ccqc_left_quotient_entry. b = ff_q_bls_b5ccqc_left_quotient_entry * S ((S (bls_index_b5ccqc_left)) * c) + (bls_quotient_b5ccqc_left))) /\ ((n = bls_power_b5ccqc_left * bls_quotient_b5ccqc_left + bls_remainder_b5ccqc_left /\ exists bls_remainder_gap_b5ccqc_left_division. bls_remainder_gap_b5ccqc_left_division + S (bls_remainder_b5ccqc_left) = bls_power_b5ccqc_left))))) -> (forall bls_index_b5ccqc_right. (exists bls_gap_b5ccqc_right_bound. bls_gap_b5ccqc_right_bound + S (bls_index_b5ccqc_right) = (l)) -> exists bls_power_b5ccqc_right bls_quotient_b5ccqc_right bls_remainder_b5ccqc_right. ((exists bpvi_b_bls_b5ccqc_right_power bpvi_c_bls_b5ccqc_right_power. ((forall bpvi_i_bls_b5ccqc_right_power. (exists bpvi_repeat_gap_bls_b5ccqc_right_power. bpvi_repeat_gap_bls_b5ccqc_right_power + S bpvi_i_bls_b5ccqc_right_power = S bls_index_b5ccqc_right) -> (((exists bpvi_h_bls_b5ccqc_right_power_repeat. bpvi_h_bls_b5ccqc_right_power_repeat + S (p) = S ((S (bpvi_i_bls_b5ccqc_right_power)) * bpvi_c_bls_b5ccqc_right_power)) /\ exists bpvi_q_bls_b5ccqc_right_power_repeat. bpvi_b_bls_b5ccqc_right_power = bpvi_q_bls_b5ccqc_right_power_repeat * S ((S (bpvi_i_bls_b5ccqc_right_power)) * bpvi_c_bls_b5ccqc_right_power) + (p)))) /\ (exists bpvi_u_bls_b5ccqc_right_power bpvi_v_bls_b5ccqc_right_power. ((((exists bpvi_h_bls_b5ccqc_right_power_start. bpvi_h_bls_b5ccqc_right_power_start + S (1) = S ((S (0)) * bpvi_v_bls_b5ccqc_right_power)) /\ exists bpvi_q_bls_b5ccqc_right_power_start. bpvi_u_bls_b5ccqc_right_power = bpvi_q_bls_b5ccqc_right_power_start * S ((S (0)) * bpvi_v_bls_b5ccqc_right_power) + (1))) /\ ((((exists bpvi_h_bls_b5ccqc_right_power_terminal. bpvi_h_bls_b5ccqc_right_power_terminal + S (bls_power_b5ccqc_right) = S ((S (S bls_index_b5ccqc_right)) * bpvi_v_bls_b5ccqc_right_power)) /\ exists bpvi_q_bls_b5ccqc_right_power_terminal. bpvi_u_bls_b5ccqc_right_power = bpvi_q_bls_b5ccqc_right_power_terminal * S ((S (S bls_index_b5ccqc_right)) * bpvi_v_bls_b5ccqc_right_power) + (bls_power_b5ccqc_right))) /\ forall bpvi_j_bls_b5ccqc_right_power. (exists bpvi_product_gap_bls_b5ccqc_right_power. bpvi_product_gap_bls_b5ccqc_right_power + S bpvi_j_bls_b5ccqc_right_power = S bls_index_b5ccqc_right) -> exists bpvi_factor_bls_b5ccqc_right_power bpvi_partial_bls_b5ccqc_right_power bpvi_successor_bls_b5ccqc_right_power. ((((exists bpvi_h_bls_b5ccqc_right_power_factor. bpvi_h_bls_b5ccqc_right_power_factor + S (bpvi_factor_bls_b5ccqc_right_power) = S ((S (bpvi_j_bls_b5ccqc_right_power)) * bpvi_c_bls_b5ccqc_right_power)) /\ exists bpvi_q_bls_b5ccqc_right_power_factor. bpvi_b_bls_b5ccqc_right_power = bpvi_q_bls_b5ccqc_right_power_factor * S ((S (bpvi_j_bls_b5ccqc_right_power)) * bpvi_c_bls_b5ccqc_right_power) + (bpvi_factor_bls_b5ccqc_right_power))) /\ ((((exists bpvi_h_bls_b5ccqc_right_power_partial. bpvi_h_bls_b5ccqc_right_power_partial + S (bpvi_partial_bls_b5ccqc_right_power) = S ((S (bpvi_j_bls_b5ccqc_right_power)) * bpvi_v_bls_b5ccqc_right_power)) /\ exists bpvi_q_bls_b5ccqc_right_power_partial. bpvi_u_bls_b5ccqc_right_power = bpvi_q_bls_b5ccqc_right_power_partial * S ((S (bpvi_j_bls_b5ccqc_right_power)) * bpvi_v_bls_b5ccqc_right_power) + (bpvi_partial_bls_b5ccqc_right_power))) /\ ((((exists bpvi_h_bls_b5ccqc_right_power_successor. bpvi_h_bls_b5ccqc_right_power_successor + S (bpvi_successor_bls_b5ccqc_right_power) = S ((S (S bpvi_j_bls_b5ccqc_right_power)) * bpvi_v_bls_b5ccqc_right_power)) /\ exists bpvi_q_bls_b5ccqc_right_power_successor. bpvi_u_bls_b5ccqc_right_power = bpvi_q_bls_b5ccqc_right_power_successor * S ((S (S bpvi_j_bls_b5ccqc_right_power)) * bpvi_v_bls_b5ccqc_right_power) + (bpvi_successor_bls_b5ccqc_right_power))) /\ bpvi_successor_bls_b5ccqc_right_power = bpvi_partial_bls_b5ccqc_right_power * bpvi_factor_bls_b5ccqc_right_power)))))))) /\ ((((exists ff_h_bls_b5ccqc_right_quotient_entry. ff_h_bls_b5ccqc_right_quotient_entry + S (bls_quotient_b5ccqc_right) = S ((S (bls_index_b5ccqc_right)) * e)) /\ exists ff_q_bls_b5ccqc_right_quotient_entry. d = ff_q_bls_b5ccqc_right_quotient_entry * S ((S (bls_index_b5ccqc_right)) * e) + (bls_quotient_b5ccqc_right))) /\ ((n + n = bls_power_b5ccqc_right * bls_quotient_b5ccqc_right + bls_remainder_b5ccqc_right /\ exists bls_remainder_gap_b5ccqc_right_division. bls_remainder_gap_b5ccqc_right_division + S (bls_remainder_b5ccqc_right) = bls_power_b5ccqc_right))))) -> (exists bcf_lt_gap_b5ccqc_bound. bcf_lt_gap_b5ccqc_bound + S (i) = l) -> (exists q Q bit. (((exists fs_h_b5ccqc_result_left. fs_h_b5ccqc_result_left + S (q) = S ((S (i)) * c)) /\ exists fs_q_b5ccqc_result_left. b = fs_q_b5ccqc_result_left * S ((S (i)) * c) + (q))) /\ ((((exists fs_h_b5ccqc_result_right. fs_h_b5ccqc_result_right + S (Q) = S ((S (i)) * e)) /\ exists fs_q_b5ccqc_result_right. d = fs_q_b5ccqc_result_right * S ((S (i)) * e) + (Q))) /\ (((bit = 0 /\ Q = q + q) \/ (bit = 1 /\ Q = S (q + q))))))

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

72 script commands · 25 reading checkpoints · 4 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–10

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
  7. L7
    intro l
  8. L8
    intro i
  9. L9
    intro hleft
  10. L10
    intro hright
02Fix variables and assumptionsL11–11

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

  1. L11
    intro hi
03Establish hleft_dataL12–15

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

  1. L12
    have hleft_data : ∃ D. ∃ q. ∃ r. Pow(p,S i,D) ∧ (BetaAt(b,c,i,q) ∧ DivRem(n,D,q,r))Definitions: Pow(p,S i,D)BetaAt(b,c,i,q)DivRem(n,D,q,r)Original native command in the exact edition
  2. L13
    specialize hleft i
  3. L14
    apply hleft
  4. L15
    exact hi
04Separate the logical casesL16–20

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

  1. L16
    cases hleft_data
  2. L17
    cases hleft_data_witness
  3. L18
    cases hleft_data_witness_witness
  4. L19
    cases hleft_data_witness_witness_witness
  5. L20
    cases hleft_data_witness_witness_witness_right
05Establish hright_dataL21–24

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

  1. L21
    have hright_data : ∃ D. ∃ q. ∃ r. Pow(p,S i,D) ∧ (BetaAt(d,e,i,q) ∧ DivRem(n + n,D,q,r))Definitions: Pow(p,S i,D)BetaAt(d,e,i,q)DivRem(n + n,D,q,r)Original native command in the exact edition
  2. L22
    specialize hright i
  3. L23
    apply hright
  4. L24
    exact hi
06Separate the logical casesL25–29

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

  1. L25
    cases hright_data
  2. L26
    cases hright_data_witness
  3. L27
    cases hright_data_witness_witness
  4. L28
    cases hright_data_witness_witness_witness
  5. L29
    cases hright_data_witness_witness_witness_right
07Establish hpower_eqL30–39

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

  1. L30
    have hpower_eq : x = x3
  2. L31
    specialize pow_functional p
  3. L32
    specialize pow_functional (S i)
  4. L33
    specialize pow_functional x
  5. L34
    specialize pow_functional x3
  6. L35
    apply pow_functional
  7. L36
    exact hleft_data_witness_witness_witness_left
  8. L37
    exact hright_data_witness_witness_witness_left
  9. L38
    rewrite <- hpower_eq at hright_data_witness_witness_witness_right_right
  10. L39
    rewrite <- hpower_eq at hright_data_witness_witness_witness_right_right
08Establish hcarryL40–49

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

  1. L40
    have hcarry : x4 = x1 + x1 \/ x4 = S (x1 + x1)
  2. L41
    specialize division_double_quotient_bit x
  3. L42
    specialize division_double_quotient_bit n
  4. L43
    specialize division_double_quotient_bit x1
  5. L44
    specialize division_double_quotient_bit x2
  6. L45
    specialize division_double_quotient_bit x4
  7. L46
    specialize division_double_quotient_bit x5
  8. L47
    apply division_double_quotient_bit
  9. L48
    exact hleft_data_witness_witness_witness_right_right
  10. L49
    exact hright_data_witness_witness_witness_right_right
09Separate the logical casesL50–50

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

  1. L50
    cases hcarry
10Construct an explicit witnessL51–53

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

  1. L51
    exists x1
  2. L52
    exists x4
  3. L53
    exists 0
11Separate the logical casesL54–54

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

  1. L54
    split
12Use earlier factsL55–55

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

  1. L55
    exact hleft_data_witness_witness_witness_right_left
13Separate the logical casesL56–56

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

  1. L56
    split
14Use earlier factsL57–57

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

  1. L57
    exact hright_data_witness_witness_witness_right_left
15Separate the logical casesL58–59

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

  1. L58
    left
  2. L59
    split
16Calculate and transport equalitiesL60–60

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

  1. L60
    refl
17Use earlier factsL61–61

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

  1. L61
    exact hcarry_left
18Construct an explicit witnessL62–64

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

  1. L62
    exists x1
  2. L63
    exists x4
  3. L64
    exists 1
19Separate the logical casesL65–65

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

  1. L65
    split
20Use earlier factsL66–66

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

  1. L66
    exact hleft_data_witness_witness_witness_right_left
21Separate the logical casesL67–67

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

  1. L67
    split
22Use earlier factsL68–68

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

  1. L68
    exact hright_data_witness_witness_witness_right_left
23Separate the logical casesL69–70

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

  1. L69
    right
  2. L70
    split
24Calculate and transport equalitiesL71–71

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

  1. L71
    refl
25Use earlier factsL72–72

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

  1. L72
    exact hcarry_right

Library-wide reading audit

Original defined command ledger · 72 lines
  1. 0001intro p
  2. 0002intro n
  3. 0003intro b
  4. 0004intro c
  5. 0005intro d
  6. 0006intro e
  7. 0007intro l
  8. 0008intro i
  9. 0009intro hleft
  10. 0010intro hright
  11. 0011intro hi
  12. 0012have hleft_data : ∃ D. ∃ q. ∃ r. Pow(p,S i,D) ∧ (BetaAt(b,c,i,q)DivRem(n,D,q,r))
    Exact native replay linehave hleft_data : exists D q r. (exists bpvi_b_b5ccqc_left_power bpvi_c_b5ccqc_left_power. ((forall bpvi_i_b5ccqc_left_power. (exists bpvi_repeat_gap_b5ccqc_left_power. bpvi_repeat_gap_b5ccqc_left_power + S bpvi_i_b5ccqc_left_power = S i) -> (((exists bpvi_h_b5ccqc_left_power_repeat. bpvi_h_b5ccqc_left_power_repeat + S (p) = S ((S (bpvi_i_b5ccqc_left_power)) * bpvi_c_b5ccqc_left_power)) /\ exists bpvi_q_b5ccqc_left_power_repeat. bpvi_b_b5ccqc_left_power = bpvi_q_b5ccqc_left_power_repeat * S ((S (bpvi_i_b5ccqc_left_power)) * bpvi_c_b5ccqc_left_power) + (p)))) /\ (exists bpvi_u_b5ccqc_left_power bpvi_v_b5ccqc_left_power. ((((exists bpvi_h_b5ccqc_left_power_start. bpvi_h_b5ccqc_left_power_start + S (1) = S ((S (0)) * bpvi_v_b5ccqc_left_power)) /\ exists bpvi_q_b5ccqc_left_power_start. bpvi_u_b5ccqc_left_power = bpvi_q_b5ccqc_left_power_start * S ((S (0)) * bpvi_v_b5ccqc_left_power) + (1))) /\ ((((exists bpvi_h_b5ccqc_left_power_terminal. bpvi_h_b5ccqc_left_power_terminal + S (D) = S ((S (S i)) * bpvi_v_b5ccqc_left_power)) /\ exists bpvi_q_b5ccqc_left_power_terminal. bpvi_u_b5ccqc_left_power = bpvi_q_b5ccqc_left_power_terminal * S ((S (S i)) * bpvi_v_b5ccqc_left_power) + (D))) /\ forall bpvi_j_b5ccqc_left_power. (exists bpvi_product_gap_b5ccqc_left_power. bpvi_product_gap_b5ccqc_left_power + S bpvi_j_b5ccqc_left_power = S i) -> exists bpvi_factor_b5ccqc_left_power bpvi_partial_b5ccqc_left_power bpvi_successor_b5ccqc_left_power. ((((exists bpvi_h_b5ccqc_left_power_factor. bpvi_h_b5ccqc_left_power_factor + S (bpvi_factor_b5ccqc_left_power) = S ((S (bpvi_j_b5ccqc_left_power)) * bpvi_c_b5ccqc_left_power)) /\ exists bpvi_q_b5ccqc_left_power_factor. bpvi_b_b5ccqc_left_power = bpvi_q_b5ccqc_left_power_factor * S ((S (bpvi_j_b5ccqc_left_power)) * bpvi_c_b5ccqc_left_power) + (bpvi_factor_b5ccqc_left_power))) /\ ((((exists bpvi_h_b5ccqc_left_power_partial. bpvi_h_b5ccqc_left_power_partial + S (bpvi_partial_b5ccqc_left_power) = S ((S (bpvi_j_b5ccqc_left_power)) * bpvi_v_b5ccqc_left_power)) /\ exists bpvi_q_b5ccqc_left_power_partial. bpvi_u_b5ccqc_left_power = bpvi_q_b5ccqc_left_power_partial * S ((S (bpvi_j_b5ccqc_left_power)) * bpvi_v_b5ccqc_left_power) + (bpvi_partial_b5ccqc_left_power))) /\ ((((exists bpvi_h_b5ccqc_left_power_successor. bpvi_h_b5ccqc_left_power_successor + S (bpvi_successor_b5ccqc_left_power) = S ((S (S bpvi_j_b5ccqc_left_power)) * bpvi_v_b5ccqc_left_power)) /\ exists bpvi_q_b5ccqc_left_power_successor. bpvi_u_b5ccqc_left_power = bpvi_q_b5ccqc_left_power_successor * S ((S (S bpvi_j_b5ccqc_left_power)) * bpvi_v_b5ccqc_left_power) + (bpvi_successor_b5ccqc_left_power))) /\ bpvi_successor_b5ccqc_left_power = bpvi_partial_b5ccqc_left_power * bpvi_factor_b5ccqc_left_power)))))))) /\ ((((exists fs_h_b5ccqc_left_entry. fs_h_b5ccqc_left_entry + S (q) = S ((S (i)) * c)) /\ exists fs_q_b5ccqc_left_entry. b = fs_q_b5ccqc_left_entry * S ((S (i)) * c) + (q))) /\ (((n) = (D) * (q) + (r) /\ (exists bcf_lt_gap_b5ccqc_left_division_bound. bcf_lt_gap_b5ccqc_left_division_bound + S (r) = D))))
  13. 0013specialize hleft i
  14. 0014apply hleft
  15. 0015exact hi
  16. 0016cases hleft_data
  17. 0017cases hleft_data_witness
  18. 0018cases hleft_data_witness_witness
  19. 0019cases hleft_data_witness_witness_witness
  20. 0020cases hleft_data_witness_witness_witness_right
  21. 0021have hright_data : ∃ D. ∃ q. ∃ r. Pow(p,S i,D) ∧ (BetaAt(d,e,i,q)DivRem(n + n,D,q,r))
    Exact native replay linehave hright_data : exists D q r. (exists bpvi_b_b5ccqc_right_power bpvi_c_b5ccqc_right_power. ((forall bpvi_i_b5ccqc_right_power. (exists bpvi_repeat_gap_b5ccqc_right_power. bpvi_repeat_gap_b5ccqc_right_power + S bpvi_i_b5ccqc_right_power = S i) -> (((exists bpvi_h_b5ccqc_right_power_repeat. bpvi_h_b5ccqc_right_power_repeat + S (p) = S ((S (bpvi_i_b5ccqc_right_power)) * bpvi_c_b5ccqc_right_power)) /\ exists bpvi_q_b5ccqc_right_power_repeat. bpvi_b_b5ccqc_right_power = bpvi_q_b5ccqc_right_power_repeat * S ((S (bpvi_i_b5ccqc_right_power)) * bpvi_c_b5ccqc_right_power) + (p)))) /\ (exists bpvi_u_b5ccqc_right_power bpvi_v_b5ccqc_right_power. ((((exists bpvi_h_b5ccqc_right_power_start. bpvi_h_b5ccqc_right_power_start + S (1) = S ((S (0)) * bpvi_v_b5ccqc_right_power)) /\ exists bpvi_q_b5ccqc_right_power_start. bpvi_u_b5ccqc_right_power = bpvi_q_b5ccqc_right_power_start * S ((S (0)) * bpvi_v_b5ccqc_right_power) + (1))) /\ ((((exists bpvi_h_b5ccqc_right_power_terminal. bpvi_h_b5ccqc_right_power_terminal + S (D) = S ((S (S i)) * bpvi_v_b5ccqc_right_power)) /\ exists bpvi_q_b5ccqc_right_power_terminal. bpvi_u_b5ccqc_right_power = bpvi_q_b5ccqc_right_power_terminal * S ((S (S i)) * bpvi_v_b5ccqc_right_power) + (D))) /\ forall bpvi_j_b5ccqc_right_power. (exists bpvi_product_gap_b5ccqc_right_power. bpvi_product_gap_b5ccqc_right_power + S bpvi_j_b5ccqc_right_power = S i) -> exists bpvi_factor_b5ccqc_right_power bpvi_partial_b5ccqc_right_power bpvi_successor_b5ccqc_right_power. ((((exists bpvi_h_b5ccqc_right_power_factor. bpvi_h_b5ccqc_right_power_factor + S (bpvi_factor_b5ccqc_right_power) = S ((S (bpvi_j_b5ccqc_right_power)) * bpvi_c_b5ccqc_right_power)) /\ exists bpvi_q_b5ccqc_right_power_factor. bpvi_b_b5ccqc_right_power = bpvi_q_b5ccqc_right_power_factor * S ((S (bpvi_j_b5ccqc_right_power)) * bpvi_c_b5ccqc_right_power) + (bpvi_factor_b5ccqc_right_power))) /\ ((((exists bpvi_h_b5ccqc_right_power_partial. bpvi_h_b5ccqc_right_power_partial + S (bpvi_partial_b5ccqc_right_power) = S ((S (bpvi_j_b5ccqc_right_power)) * bpvi_v_b5ccqc_right_power)) /\ exists bpvi_q_b5ccqc_right_power_partial. bpvi_u_b5ccqc_right_power = bpvi_q_b5ccqc_right_power_partial * S ((S (bpvi_j_b5ccqc_right_power)) * bpvi_v_b5ccqc_right_power) + (bpvi_partial_b5ccqc_right_power))) /\ ((((exists bpvi_h_b5ccqc_right_power_successor. bpvi_h_b5ccqc_right_power_successor + S (bpvi_successor_b5ccqc_right_power) = S ((S (S bpvi_j_b5ccqc_right_power)) * bpvi_v_b5ccqc_right_power)) /\ exists bpvi_q_b5ccqc_right_power_successor. bpvi_u_b5ccqc_right_power = bpvi_q_b5ccqc_right_power_successor * S ((S (S bpvi_j_b5ccqc_right_power)) * bpvi_v_b5ccqc_right_power) + (bpvi_successor_b5ccqc_right_power))) /\ bpvi_successor_b5ccqc_right_power = bpvi_partial_b5ccqc_right_power * bpvi_factor_b5ccqc_right_power)))))))) /\ ((((exists fs_h_b5ccqc_right_entry. fs_h_b5ccqc_right_entry + S (q) = S ((S (i)) * e)) /\ exists fs_q_b5ccqc_right_entry. d = fs_q_b5ccqc_right_entry * S ((S (i)) * e) + (q))) /\ (((n + n) = (D) * (q) + (r) /\ (exists bcf_lt_gap_b5ccqc_right_division_bound. bcf_lt_gap_b5ccqc_right_division_bound + S (r) = D))))
  22. 0022specialize hright i
  23. 0023apply hright
  24. 0024exact hi
  25. 0025cases hright_data
  26. 0026cases hright_data_witness
  27. 0027cases hright_data_witness_witness
  28. 0028cases hright_data_witness_witness_witness
  29. 0029cases hright_data_witness_witness_witness_right
  30. 0030have hpower_eq : x = x3
  31. 0031specialize pow_functional p
  32. 0032specialize pow_functional (S i)
  33. 0033specialize pow_functional x
  34. 0034specialize pow_functional x3
  35. 0035apply pow_functional
  36. 0036exact hleft_data_witness_witness_witness_left
  37. 0037exact hright_data_witness_witness_witness_left
  38. 0038rewrite <- hpower_eq at hright_data_witness_witness_witness_right_right
  39. 0039rewrite <- hpower_eq at hright_data_witness_witness_witness_right_right
  40. 0040have hcarry : x4 = x1 + x1 \/ x4 = S (x1 + x1)
  41. 0041specialize division_double_quotient_bit x
  42. 0042specialize division_double_quotient_bit n
  43. 0043specialize division_double_quotient_bit x1
  44. 0044specialize division_double_quotient_bit x2
  45. 0045specialize division_double_quotient_bit x4
  46. 0046specialize division_double_quotient_bit x5
  47. 0047apply division_double_quotient_bit
  48. 0048exact hleft_data_witness_witness_witness_right_right
  49. 0049exact hright_data_witness_witness_witness_right_right
  50. 0050cases hcarry
  51. 0051exists x1
  52. 0052exists x4
  53. 0053exists 0
  54. 0054split
  55. 0055exact hleft_data_witness_witness_witness_right_left
  56. 0056split
  57. 0057exact hright_data_witness_witness_witness_right_left
  58. 0058left
  59. 0059split
  60. 0060refl
  61. 0061exact hcarry_left
  62. 0062exists x1
  63. 0063exists x4
  64. 0064exists 1
  65. 0065split
  66. 0066exact hleft_data_witness_witness_witness_right_left
  67. 0067split
  68. 0068exact hright_data_witness_witness_witness_right_left
  69. 0069right
  70. 0070split
  71. 0071refl
  72. 0072exact hcarry_right