BT00YC · Bertrand theorem

double_quotient_carry_prefix_entries_zero

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

Exact doubled quotients and a square tail force every carry to zero.

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. ∀ f. ∀ g. ∀ l. ∀ q. ∀ r. ∀ R. ∀ s. Lt(0,p)Pow(p,2,s)Lt(n + n,s)PowerQuotPrefix(p,n,b,c,l)PowerQuotPrefix(p,n + n,d,e,l) → (∀ x. Lt(x,l) → ∃ y. ∃ z. ∃ m. BetaAt(b,c,x,y) ∧ (BetaAt(d,e,x,z) ∧ (BetaAt(f,g,x,m) ∧ (m = 0 ∧ z = y + y ∨ m = 1 ∧ z = S (y + y))))) → DivRem(n,p,q,r)DivRem(n + n,p,q + q,R)Repeat(f,g,0,l)

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

12 occurrences

In local proof propositions

11 occurrences

Exact expanded native-PA statement
forall p n b c d e f g l q r R s. (exists bcf_le_gap_bdqcpez_base. bcf_le_gap_bdqcpez_base + (1) = p) -> (exists bpvi_b_bdqcpez_square bpvi_c_bdqcpez_square. ((forall bpvi_i_bdqcpez_square. (exists bpvi_repeat_gap_bdqcpez_square. bpvi_repeat_gap_bdqcpez_square + S bpvi_i_bdqcpez_square = 2) -> (((exists bpvi_h_bdqcpez_square_repeat. bpvi_h_bdqcpez_square_repeat + S (p) = S ((S (bpvi_i_bdqcpez_square)) * bpvi_c_bdqcpez_square)) /\ exists bpvi_q_bdqcpez_square_repeat. bpvi_b_bdqcpez_square = bpvi_q_bdqcpez_square_repeat * S ((S (bpvi_i_bdqcpez_square)) * bpvi_c_bdqcpez_square) + (p)))) /\ (exists bpvi_u_bdqcpez_square bpvi_v_bdqcpez_square. ((((exists bpvi_h_bdqcpez_square_start. bpvi_h_bdqcpez_square_start + S (1) = S ((S (0)) * bpvi_v_bdqcpez_square)) /\ exists bpvi_q_bdqcpez_square_start. bpvi_u_bdqcpez_square = bpvi_q_bdqcpez_square_start * S ((S (0)) * bpvi_v_bdqcpez_square) + (1))) /\ ((((exists bpvi_h_bdqcpez_square_terminal. bpvi_h_bdqcpez_square_terminal + S (s) = S ((S (2)) * bpvi_v_bdqcpez_square)) /\ exists bpvi_q_bdqcpez_square_terminal. bpvi_u_bdqcpez_square = bpvi_q_bdqcpez_square_terminal * S ((S (2)) * bpvi_v_bdqcpez_square) + (s))) /\ forall bpvi_j_bdqcpez_square. (exists bpvi_product_gap_bdqcpez_square. bpvi_product_gap_bdqcpez_square + S bpvi_j_bdqcpez_square = 2) -> exists bpvi_factor_bdqcpez_square bpvi_partial_bdqcpez_square bpvi_successor_bdqcpez_square. ((((exists bpvi_h_bdqcpez_square_factor. bpvi_h_bdqcpez_square_factor + S (bpvi_factor_bdqcpez_square) = S ((S (bpvi_j_bdqcpez_square)) * bpvi_c_bdqcpez_square)) /\ exists bpvi_q_bdqcpez_square_factor. bpvi_b_bdqcpez_square = bpvi_q_bdqcpez_square_factor * S ((S (bpvi_j_bdqcpez_square)) * bpvi_c_bdqcpez_square) + (bpvi_factor_bdqcpez_square))) /\ ((((exists bpvi_h_bdqcpez_square_partial. bpvi_h_bdqcpez_square_partial + S (bpvi_partial_bdqcpez_square) = S ((S (bpvi_j_bdqcpez_square)) * bpvi_v_bdqcpez_square)) /\ exists bpvi_q_bdqcpez_square_partial. bpvi_u_bdqcpez_square = bpvi_q_bdqcpez_square_partial * S ((S (bpvi_j_bdqcpez_square)) * bpvi_v_bdqcpez_square) + (bpvi_partial_bdqcpez_square))) /\ ((((exists bpvi_h_bdqcpez_square_successor. bpvi_h_bdqcpez_square_successor + S (bpvi_successor_bdqcpez_square) = S ((S (S bpvi_j_bdqcpez_square)) * bpvi_v_bdqcpez_square)) /\ exists bpvi_q_bdqcpez_square_successor. bpvi_u_bdqcpez_square = bpvi_q_bdqcpez_square_successor * S ((S (S bpvi_j_bdqcpez_square)) * bpvi_v_bdqcpez_square) + (bpvi_successor_bdqcpez_square))) /\ bpvi_successor_bdqcpez_square = bpvi_partial_bdqcpez_square * bpvi_factor_bdqcpez_square)))))))) -> (exists bcf_lt_gap_bdqcpez_strict. bcf_lt_gap_bdqcpez_strict + S (n + n) = s) -> (forall bls_index_bdqcpez_left. (exists bls_gap_bdqcpez_left_bound. bls_gap_bdqcpez_left_bound + S (bls_index_bdqcpez_left) = (l)) -> exists bls_power_bdqcpez_left bls_quotient_bdqcpez_left bls_remainder_bdqcpez_left. ((exists bpvi_b_bls_bdqcpez_left_power bpvi_c_bls_bdqcpez_left_power. ((forall bpvi_i_bls_bdqcpez_left_power. (exists bpvi_repeat_gap_bls_bdqcpez_left_power. bpvi_repeat_gap_bls_bdqcpez_left_power + S bpvi_i_bls_bdqcpez_left_power = S bls_index_bdqcpez_left) -> (((exists bpvi_h_bls_bdqcpez_left_power_repeat. bpvi_h_bls_bdqcpez_left_power_repeat + S (p) = S ((S (bpvi_i_bls_bdqcpez_left_power)) * bpvi_c_bls_bdqcpez_left_power)) /\ exists bpvi_q_bls_bdqcpez_left_power_repeat. bpvi_b_bls_bdqcpez_left_power = bpvi_q_bls_bdqcpez_left_power_repeat * S ((S (bpvi_i_bls_bdqcpez_left_power)) * bpvi_c_bls_bdqcpez_left_power) + (p)))) /\ (exists bpvi_u_bls_bdqcpez_left_power bpvi_v_bls_bdqcpez_left_power. ((((exists bpvi_h_bls_bdqcpez_left_power_start. bpvi_h_bls_bdqcpez_left_power_start + S (1) = S ((S (0)) * bpvi_v_bls_bdqcpez_left_power)) /\ exists bpvi_q_bls_bdqcpez_left_power_start. bpvi_u_bls_bdqcpez_left_power = bpvi_q_bls_bdqcpez_left_power_start * S ((S (0)) * bpvi_v_bls_bdqcpez_left_power) + (1))) /\ ((((exists bpvi_h_bls_bdqcpez_left_power_terminal. bpvi_h_bls_bdqcpez_left_power_terminal + S (bls_power_bdqcpez_left) = S ((S (S bls_index_bdqcpez_left)) * bpvi_v_bls_bdqcpez_left_power)) /\ exists bpvi_q_bls_bdqcpez_left_power_terminal. bpvi_u_bls_bdqcpez_left_power = bpvi_q_bls_bdqcpez_left_power_terminal * S ((S (S bls_index_bdqcpez_left)) * bpvi_v_bls_bdqcpez_left_power) + (bls_power_bdqcpez_left))) /\ forall bpvi_j_bls_bdqcpez_left_power. (exists bpvi_product_gap_bls_bdqcpez_left_power. bpvi_product_gap_bls_bdqcpez_left_power + S bpvi_j_bls_bdqcpez_left_power = S bls_index_bdqcpez_left) -> exists bpvi_factor_bls_bdqcpez_left_power bpvi_partial_bls_bdqcpez_left_power bpvi_successor_bls_bdqcpez_left_power. ((((exists bpvi_h_bls_bdqcpez_left_power_factor. bpvi_h_bls_bdqcpez_left_power_factor + S (bpvi_factor_bls_bdqcpez_left_power) = S ((S (bpvi_j_bls_bdqcpez_left_power)) * bpvi_c_bls_bdqcpez_left_power)) /\ exists bpvi_q_bls_bdqcpez_left_power_factor. bpvi_b_bls_bdqcpez_left_power = bpvi_q_bls_bdqcpez_left_power_factor * S ((S (bpvi_j_bls_bdqcpez_left_power)) * bpvi_c_bls_bdqcpez_left_power) + (bpvi_factor_bls_bdqcpez_left_power))) /\ ((((exists bpvi_h_bls_bdqcpez_left_power_partial. bpvi_h_bls_bdqcpez_left_power_partial + S (bpvi_partial_bls_bdqcpez_left_power) = S ((S (bpvi_j_bls_bdqcpez_left_power)) * bpvi_v_bls_bdqcpez_left_power)) /\ exists bpvi_q_bls_bdqcpez_left_power_partial. bpvi_u_bls_bdqcpez_left_power = bpvi_q_bls_bdqcpez_left_power_partial * S ((S (bpvi_j_bls_bdqcpez_left_power)) * bpvi_v_bls_bdqcpez_left_power) + (bpvi_partial_bls_bdqcpez_left_power))) /\ ((((exists bpvi_h_bls_bdqcpez_left_power_successor. bpvi_h_bls_bdqcpez_left_power_successor + S (bpvi_successor_bls_bdqcpez_left_power) = S ((S (S bpvi_j_bls_bdqcpez_left_power)) * bpvi_v_bls_bdqcpez_left_power)) /\ exists bpvi_q_bls_bdqcpez_left_power_successor. bpvi_u_bls_bdqcpez_left_power = bpvi_q_bls_bdqcpez_left_power_successor * S ((S (S bpvi_j_bls_bdqcpez_left_power)) * bpvi_v_bls_bdqcpez_left_power) + (bpvi_successor_bls_bdqcpez_left_power))) /\ bpvi_successor_bls_bdqcpez_left_power = bpvi_partial_bls_bdqcpez_left_power * bpvi_factor_bls_bdqcpez_left_power)))))))) /\ ((((exists ff_h_bls_bdqcpez_left_quotient_entry. ff_h_bls_bdqcpez_left_quotient_entry + S (bls_quotient_bdqcpez_left) = S ((S (bls_index_bdqcpez_left)) * c)) /\ exists ff_q_bls_bdqcpez_left_quotient_entry. b = ff_q_bls_bdqcpez_left_quotient_entry * S ((S (bls_index_bdqcpez_left)) * c) + (bls_quotient_bdqcpez_left))) /\ ((n = bls_power_bdqcpez_left * bls_quotient_bdqcpez_left + bls_remainder_bdqcpez_left /\ exists bls_remainder_gap_bdqcpez_left_division. bls_remainder_gap_bdqcpez_left_division + S (bls_remainder_bdqcpez_left) = bls_power_bdqcpez_left))))) -> (forall bls_index_bdqcpez_right. (exists bls_gap_bdqcpez_right_bound. bls_gap_bdqcpez_right_bound + S (bls_index_bdqcpez_right) = (l)) -> exists bls_power_bdqcpez_right bls_quotient_bdqcpez_right bls_remainder_bdqcpez_right. ((exists bpvi_b_bls_bdqcpez_right_power bpvi_c_bls_bdqcpez_right_power. ((forall bpvi_i_bls_bdqcpez_right_power. (exists bpvi_repeat_gap_bls_bdqcpez_right_power. bpvi_repeat_gap_bls_bdqcpez_right_power + S bpvi_i_bls_bdqcpez_right_power = S bls_index_bdqcpez_right) -> (((exists bpvi_h_bls_bdqcpez_right_power_repeat. bpvi_h_bls_bdqcpez_right_power_repeat + S (p) = S ((S (bpvi_i_bls_bdqcpez_right_power)) * bpvi_c_bls_bdqcpez_right_power)) /\ exists bpvi_q_bls_bdqcpez_right_power_repeat. bpvi_b_bls_bdqcpez_right_power = bpvi_q_bls_bdqcpez_right_power_repeat * S ((S (bpvi_i_bls_bdqcpez_right_power)) * bpvi_c_bls_bdqcpez_right_power) + (p)))) /\ (exists bpvi_u_bls_bdqcpez_right_power bpvi_v_bls_bdqcpez_right_power. ((((exists bpvi_h_bls_bdqcpez_right_power_start. bpvi_h_bls_bdqcpez_right_power_start + S (1) = S ((S (0)) * bpvi_v_bls_bdqcpez_right_power)) /\ exists bpvi_q_bls_bdqcpez_right_power_start. bpvi_u_bls_bdqcpez_right_power = bpvi_q_bls_bdqcpez_right_power_start * S ((S (0)) * bpvi_v_bls_bdqcpez_right_power) + (1))) /\ ((((exists bpvi_h_bls_bdqcpez_right_power_terminal. bpvi_h_bls_bdqcpez_right_power_terminal + S (bls_power_bdqcpez_right) = S ((S (S bls_index_bdqcpez_right)) * bpvi_v_bls_bdqcpez_right_power)) /\ exists bpvi_q_bls_bdqcpez_right_power_terminal. bpvi_u_bls_bdqcpez_right_power = bpvi_q_bls_bdqcpez_right_power_terminal * S ((S (S bls_index_bdqcpez_right)) * bpvi_v_bls_bdqcpez_right_power) + (bls_power_bdqcpez_right))) /\ forall bpvi_j_bls_bdqcpez_right_power. (exists bpvi_product_gap_bls_bdqcpez_right_power. bpvi_product_gap_bls_bdqcpez_right_power + S bpvi_j_bls_bdqcpez_right_power = S bls_index_bdqcpez_right) -> exists bpvi_factor_bls_bdqcpez_right_power bpvi_partial_bls_bdqcpez_right_power bpvi_successor_bls_bdqcpez_right_power. ((((exists bpvi_h_bls_bdqcpez_right_power_factor. bpvi_h_bls_bdqcpez_right_power_factor + S (bpvi_factor_bls_bdqcpez_right_power) = S ((S (bpvi_j_bls_bdqcpez_right_power)) * bpvi_c_bls_bdqcpez_right_power)) /\ exists bpvi_q_bls_bdqcpez_right_power_factor. bpvi_b_bls_bdqcpez_right_power = bpvi_q_bls_bdqcpez_right_power_factor * S ((S (bpvi_j_bls_bdqcpez_right_power)) * bpvi_c_bls_bdqcpez_right_power) + (bpvi_factor_bls_bdqcpez_right_power))) /\ ((((exists bpvi_h_bls_bdqcpez_right_power_partial. bpvi_h_bls_bdqcpez_right_power_partial + S (bpvi_partial_bls_bdqcpez_right_power) = S ((S (bpvi_j_bls_bdqcpez_right_power)) * bpvi_v_bls_bdqcpez_right_power)) /\ exists bpvi_q_bls_bdqcpez_right_power_partial. bpvi_u_bls_bdqcpez_right_power = bpvi_q_bls_bdqcpez_right_power_partial * S ((S (bpvi_j_bls_bdqcpez_right_power)) * bpvi_v_bls_bdqcpez_right_power) + (bpvi_partial_bls_bdqcpez_right_power))) /\ ((((exists bpvi_h_bls_bdqcpez_right_power_successor. bpvi_h_bls_bdqcpez_right_power_successor + S (bpvi_successor_bls_bdqcpez_right_power) = S ((S (S bpvi_j_bls_bdqcpez_right_power)) * bpvi_v_bls_bdqcpez_right_power)) /\ exists bpvi_q_bls_bdqcpez_right_power_successor. bpvi_u_bls_bdqcpez_right_power = bpvi_q_bls_bdqcpez_right_power_successor * S ((S (S bpvi_j_bls_bdqcpez_right_power)) * bpvi_v_bls_bdqcpez_right_power) + (bpvi_successor_bls_bdqcpez_right_power))) /\ bpvi_successor_bls_bdqcpez_right_power = bpvi_partial_bls_bdqcpez_right_power * bpvi_factor_bls_bdqcpez_right_power)))))))) /\ ((((exists ff_h_bls_bdqcpez_right_quotient_entry. ff_h_bls_bdqcpez_right_quotient_entry + S (bls_quotient_bdqcpez_right) = S ((S (bls_index_bdqcpez_right)) * e)) /\ exists ff_q_bls_bdqcpez_right_quotient_entry. d = ff_q_bls_bdqcpez_right_quotient_entry * S ((S (bls_index_bdqcpez_right)) * e) + (bls_quotient_bdqcpez_right))) /\ ((n + n = bls_power_bdqcpez_right * bls_quotient_bdqcpez_right + bls_remainder_bdqcpez_right /\ exists bls_remainder_gap_bdqcpez_right_division. bls_remainder_gap_bdqcpez_right_division + S (bls_remainder_bdqcpez_right) = bls_power_bdqcpez_right))))) -> (forall b5cc_index_bdqcpez_carry. (exists bcf_lt_gap_bdqcpez_carry_bound. bcf_lt_gap_bdqcpez_carry_bound + S (b5cc_index_bdqcpez_carry) = l) -> exists b5cc_left_bdqcpez_carry b5cc_right_bdqcpez_carry b5cc_bit_bdqcpez_carry. (((exists fs_h_b5cc_bdqcpez_carry_left. fs_h_b5cc_bdqcpez_carry_left + S (b5cc_left_bdqcpez_carry) = S ((S (b5cc_index_bdqcpez_carry)) * c)) /\ exists fs_q_b5cc_bdqcpez_carry_left. b = fs_q_b5cc_bdqcpez_carry_left * S ((S (b5cc_index_bdqcpez_carry)) * c) + (b5cc_left_bdqcpez_carry))) /\ ((((exists fs_h_b5cc_bdqcpez_carry_right. fs_h_b5cc_bdqcpez_carry_right + S (b5cc_right_bdqcpez_carry) = S ((S (b5cc_index_bdqcpez_carry)) * e)) /\ exists fs_q_b5cc_bdqcpez_carry_right. d = fs_q_b5cc_bdqcpez_carry_right * S ((S (b5cc_index_bdqcpez_carry)) * e) + (b5cc_right_bdqcpez_carry))) /\ ((((exists fs_h_b5cc_bdqcpez_carry_bit. fs_h_b5cc_bdqcpez_carry_bit + S (b5cc_bit_bdqcpez_carry) = S ((S (b5cc_index_bdqcpez_carry)) * g)) /\ exists fs_q_b5cc_bdqcpez_carry_bit. f = fs_q_b5cc_bdqcpez_carry_bit * S ((S (b5cc_index_bdqcpez_carry)) * g) + (b5cc_bit_bdqcpez_carry))) /\ (((b5cc_bit_bdqcpez_carry = 0 /\ b5cc_right_bdqcpez_carry = b5cc_left_bdqcpez_carry + b5cc_left_bdqcpez_carry) \/ (b5cc_bit_bdqcpez_carry = 1 /\ b5cc_right_bdqcpez_carry = S (b5cc_left_bdqcpez_carry + b5cc_left_bdqcpez_carry))))))) -> (((n) = (p) * (q) + (r) /\ (exists bcf_lt_gap_bdqcpez_first_bound. bcf_lt_gap_bdqcpez_first_bound + S (r) = p))) -> (((n + n) = (p) * (q + q) + (R) /\ (exists bcf_lt_gap_bdqcpez_double_bound. bcf_lt_gap_bdqcpez_double_bound + S (R) = p))) -> forall i. (exists bcf_lt_gap_bdqcpez_bound. bcf_lt_gap_bdqcpez_bound + S (i) = l) -> (((exists fs_h_bdqcpez_result. fs_h_bdqcpez_result + S (0) = S ((S (i)) * g)) /\ exists fs_q_bdqcpez_result. f = fs_q_bdqcpez_result * S ((S (i)) * g) + (0)))

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

189 script commands · 52 reading checkpoints · 14 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 (8)
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 f
  8. L8
    intro g
  9. L9
    intro l
  10. L10
    intro q
02Fix variables and assumptionsL11–20

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

  1. L11
    intro r
  2. L12
    intro R
  3. L13
    intro s
  4. L14
    intro hbase
  5. L15
    intro hsquare
  6. L16
    intro hstrict
  7. L17
    intro hleft
  8. L18
    intro hright
  9. L19
    intro hcarry
  10. L20
    intro hfirst
03Fix variables and assumptionsL21–23

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

  1. L21
    intro hdouble
  2. L22
    intro i
  3. L23
    intro hi
04Establish hleft_dataL24–27

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

  1. L24
    have hleft_data : ∃ D. ∃ u. ∃ a. Pow(p,S i,D) ∧ (BetaAt(b,c,i,u) ∧ DivRem(n,D,u,a))Definitions: Pow(p,S i,D)BetaAt(b,c,i,u)DivRem(n,D,u,a)Original native command in the exact edition
  2. L25
    specialize hleft i
  3. L26
    apply hleft
  4. L27
    exact hi
05Separate the logical casesL28–32

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

  1. L28
    cases hleft_data
  2. L29
    cases hleft_data_witness
  3. L30
    cases hleft_data_witness_witness
  4. L31
    cases hleft_data_witness_witness_witness
  5. L32
    cases hleft_data_witness_witness_witness_right
06Establish hright_dataL33–36

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

  1. L33
    have hright_data : ∃ D. ∃ u. ∃ a. Pow(p,S i,D) ∧ (BetaAt(d,e,i,u) ∧ DivRem(n + n,D,u,a))Definitions: Pow(p,S i,D)BetaAt(d,e,i,u)DivRem(n + n,D,u,a)Original native command in the exact edition
  2. L34
    specialize hright i
  3. L35
    apply hright
  4. L36
    exact hi
07Separate the logical casesL37–41

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

  1. L37
    cases hright_data
  2. L38
    cases hright_data_witness
  3. L39
    cases hright_data_witness_witness
  4. L40
    cases hright_data_witness_witness_witness
  5. L41
    cases hright_data_witness_witness_witness_right
08Establish hsemanticL42–45

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

  1. L42
    have hsemantic : ∃ q. ∃ Q. ∃ bit. BetaAt(b,c,i,q) ∧ (BetaAt(d,e,i,Q) ∧ (BetaAt(f,g,i,bit) ∧ (bit = 0 ∧ Q = q + q ∨ bit = 1 ∧ Q = S (q + q))))Definitions: BetaAt(b,c,i,q)BetaAt(d,e,i,Q)BetaAt(f,g,i,bit)Original native command in the exact edition
  2. L43
    specialize hcarry i
  3. L44
    apply hcarry
  4. L45
    exact hi
09Separate the logical casesL46–51

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

  1. L46
    cases hsemantic
  2. L47
    cases hsemantic_witness
  3. L48
    cases hsemantic_witness_witness
  4. L49
    cases hsemantic_witness_witness_witness
  5. L50
    cases hsemantic_witness_witness_witness_right
  6. L51
    cases hsemantic_witness_witness_witness_right_right
10Use earlier factsL52–52

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

  1. L52
    specialize zero_or_succ i
11Separate the logical casesL53–53

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

  1. L53
    cases zero_or_succ
12Establish hexponent_oneL54–56

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

  1. L54
    have hexponent_one : S i = 1
  2. L55
    rewrite zero_or_succ_left
  3. L56
    refl
13Establish hleft_powerL57–63

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

  1. L57
    have hleft_power : x = p
  2. L58
    specialize pow_one p
  3. L59
    specialize pow_one (S i)
  4. L60
    specialize pow_one x
  5. L61
    apply pow_one
  6. L62
    exact hexponent_one
  7. L63
    exact hleft_data_witness_witness_witness_left
14Establish hright_powerL64–73

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

  1. L64
    have hright_power : x3 = p
  2. L65
    specialize pow_one p
  3. L66
    specialize pow_one (S i)
  4. L67
    specialize pow_one x3
  5. L68
    apply pow_one
  6. L69
    exact hexponent_one
  7. L70
    exact hright_data_witness_witness_witness_left
  8. L71
    rewrite hleft_power at hleft_data_witness_witness_witness_right_right
  9. L72
    rewrite hleft_power at hleft_data_witness_witness_witness_right_right
  10. L73
    rewrite hright_power at hright_data_witness_witness_witness_right_right
15Calculate and transport equalitiesL74–74

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

  1. L74
    rewrite hright_power at hright_data_witness_witness_witness_right_right
16Separate the logical casesL75–78

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

  1. L75
    cases hleft_data_witness_witness_witness_right_right
  2. L76
    cases hright_data_witness_witness_witness_right_right
  3. L77
    cases hfirst
  4. L78
    cases hdouble
17Establish hleft_uniqueL79–88

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

  1. L79
    have hleft_unique : x1 = q /\ x2 = r
  2. L80
    specialize division_remainder_unique p
  3. L81
    specialize division_remainder_unique n
  4. L82
    specialize division_remainder_unique x1
  5. L83
    specialize division_remainder_unique x2
  6. L84
    specialize division_remainder_unique q
  7. L85
    specialize division_remainder_unique r
  8. L86
    apply division_remainder_unique
  9. L87
    exact hleft_data_witness_witness_witness_right_right_left
  10. L88
    exact hleft_data_witness_witness_witness_right_right_right
18Use earlier factsL89–90

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

  1. L89
    exact hfirst_left
  2. L90
    exact hfirst_right
19Establish hright_uniqueL91–100

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

  1. L91
    have hright_unique : x4 = q + q /\ x5 = R
  2. L92
    specialize division_remainder_unique p
  3. L93
    specialize division_remainder_unique (n + n)
  4. L94
    specialize division_remainder_unique x4
  5. L95
    specialize division_remainder_unique x5
  6. L96
    specialize division_remainder_unique (q + q)
  7. L97
    specialize division_remainder_unique R
  8. L98
    apply division_remainder_unique
  9. L99
    exact hright_data_witness_witness_witness_right_right_left
  10. L100
    exact hright_data_witness_witness_witness_right_right_right
20Use earlier factsL101–102

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

  1. L101
    exact hdouble_left
  2. L102
    exact hdouble_right
21Separate the logical casesL103–104

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

  1. L103
    cases hleft_unique
  2. L104
    cases hright_unique
22Establish hleft_entryL105–113

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

  1. L105
    have hleft_entry : x1 = x6
  2. L106
    specialize beta_at_unique b
  3. L107
    specialize beta_at_unique c
  4. L108
    specialize beta_at_unique i
  5. L109
    specialize beta_at_unique x1
  6. L110
    specialize beta_at_unique x6
  7. L111
    apply beta_at_unique
  8. L112
    exact hleft_data_witness_witness_witness_right_left
  9. L113
    exact hsemantic_witness_witness_witness_left
23Establish hright_entryL114–122

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

  1. L114
    have hright_entry : x4 = x7
  2. L115
    specialize beta_at_unique d
  3. L116
    specialize beta_at_unique e
  4. L117
    specialize beta_at_unique i
  5. L118
    specialize beta_at_unique x4
  6. L119
    specialize beta_at_unique x7
  7. L120
    apply beta_at_unique
  8. L121
    exact hright_data_witness_witness_witness_right_left
  9. L122
    exact hsemantic_witness_witness_witness_right_left
24Separate the logical casesL123–124

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

  1. L123
    cases hsemantic_witness_witness_witness_right_right_right
  2. L124
    cases hsemantic_witness_witness_witness_right_right_right_left
25Calculate and transport equalitiesL125–126

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

  1. L125
    rewrite hsemantic_witness_witness_witness_right_right_right_left_left at hsemantic_witness_witness_witness_right_right_left
  2. L126
    rewrite hsemantic_witness_witness_witness_right_right_right_left_left at hsemantic_witness_witness_witness_right_right_left
26Use earlier factsL127–127

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

  1. L127
    exact hsemantic_witness_witness_witness_right_right_left
27Separate the logical casesL128–128

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

  1. L128
    cases hsemantic_witness_witness_witness_right_right_right_right
28Calculate and transport equalitiesL129–134

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

  1. L129
    rewrite <- hright_entry at hsemantic_witness_witness_witness_right_right_right_right_right
  2. L130
    rewrite hright_unique_left at hsemantic_witness_witness_witness_right_right_right_right_right
  3. L131
    rewrite <- hleft_entry at hsemantic_witness_witness_witness_right_right_right_right_right
  4. L132
    rewrite <- hleft_entry at hsemantic_witness_witness_witness_right_right_right_right_right
  5. L133
    rewrite hleft_unique_left at hsemantic_witness_witness_witness_right_right_right_right_right
  6. L134
    rewrite hleft_unique_left at hsemantic_witness_witness_witness_right_right_right_right_right
29Separate the logical casesL135–135

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

  1. L135
    exfalso
30Use earlier factsL136–137

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

  1. L136
    specialize lt_irrefl_expanded (q + q)
  2. L137
    apply lt_irrefl_expanded
31Construct an explicit witnessL138–138

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

  1. L138
    exists 0
32Calculate and transport equalitiesL139–139

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

  1. L139
    trans S (q + q)
33Use earlier factsL140–141

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

  1. L140
    specialize zero_add (S (q + q))
  2. L141
    exact zero_add
34Calculate and transport equalitiesL142–142

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

  1. L142
    symm
35Use earlier factsL143–143

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

  1. L143
    exact hsemantic_witness_witness_witness_right_right_right_right_right
36Separate the logical casesL144–144

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

  1. L144
    cases zero_or_succ_right
37Establish hexponent_tailL145–145

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

  1. L145
    have hexponent_tail : Lt(1,S i)Definitions: Lt(1,S i)Original native command in the exact edition
38Construct an explicit witnessL146–146

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

  1. L146
    exists x9
39Calculate and transport equalitiesL147–148

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

  1. L147
    rewrite zero_or_succ_right_witness
  2. L148
    simp
40Establish htailL149–158

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

  1. L149
    have htail : Lt(n + n,x3)Definitions: Lt(n + n,x3)Original native command in the exact edition
  2. L150
    specialize pow_tail_strict_of_square p
  3. L151
    specialize pow_tail_strict_of_square (S i)
  4. L152
    specialize pow_tail_strict_of_square x3
  5. L153
    specialize pow_tail_strict_of_square s
  6. L154
    specialize pow_tail_strict_of_square (n + n)
  7. L155
    apply pow_tail_strict_of_square
  8. L156
    exact hbase
  9. L157
    exact hexponent_tail
  10. L158
    exact hsquare
41Use earlier factsL159–160

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

  1. L159
    exact hright_data_witness_witness_witness_left
  2. L160
    exact hstrict
42Establish hright_zeroL161–168

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

  1. L161
    have hright_zero : x4 = 0
  2. L162
    specialize division_zero_quotient_of_lt x3
  3. L163
    specialize division_zero_quotient_of_lt (n + n)
  4. L164
    specialize division_zero_quotient_of_lt x4
  5. L165
    specialize division_zero_quotient_of_lt x5
  6. L166
    apply division_zero_quotient_of_lt
  7. L167
    exact hright_data_witness_witness_witness_right_right
  8. L168
    exact htail
43Establish hright_entryL169–177

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

  1. L169
    have hright_entry : x4 = x7
  2. L170
    specialize beta_at_unique d
  3. L171
    specialize beta_at_unique e
  4. L172
    specialize beta_at_unique i
  5. L173
    specialize beta_at_unique x4
  6. L174
    specialize beta_at_unique x7
  7. L175
    apply beta_at_unique
  8. L176
    exact hright_data_witness_witness_witness_right_left
  9. L177
    exact hsemantic_witness_witness_witness_right_left
44Separate the logical casesL178–179

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

  1. L178
    cases hsemantic_witness_witness_witness_right_right_right
  2. L179
    cases hsemantic_witness_witness_witness_right_right_right_left
45Calculate and transport equalitiesL180–181

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

  1. L180
    rewrite hsemantic_witness_witness_witness_right_right_right_left_left at hsemantic_witness_witness_witness_right_right_left
  2. L181
    rewrite hsemantic_witness_witness_witness_right_right_right_left_left at hsemantic_witness_witness_witness_right_right_left
46Use earlier factsL182–182

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

  1. L182
    exact hsemantic_witness_witness_witness_right_right_left
47Separate the logical casesL183–183

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

  1. L183
    cases hsemantic_witness_witness_witness_right_right_right_right
48Calculate and transport equalitiesL184–185

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

  1. L184
    rewrite <- hright_entry at hsemantic_witness_witness_witness_right_right_right_right_right
  2. L185
    rewrite hright_zero at hsemantic_witness_witness_witness_right_right_right_right_right
49Separate the logical casesL186–186

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

  1. L186
    exfalso
50Use earlier factsL187–187

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

  1. L187
    apply PA1
51Calculate and transport equalitiesL188–188

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

  1. L188
    symm
52Use earlier factsL189–189

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

  1. L189
    exact hsemantic_witness_witness_witness_right_right_right_right_right

Library-wide reading audit

Original defined command ledger · 189 lines
  1. 0001intro p
  2. 0002intro n
  3. 0003intro b
  4. 0004intro c
  5. 0005intro d
  6. 0006intro e
  7. 0007intro f
  8. 0008intro g
  9. 0009intro l
  10. 0010intro q
  11. 0011intro r
  12. 0012intro R
  13. 0013intro s
  14. 0014intro hbase
  15. 0015intro hsquare
  16. 0016intro hstrict
  17. 0017intro hleft
  18. 0018intro hright
  19. 0019intro hcarry
  20. 0020intro hfirst
  21. 0021intro hdouble
  22. 0022intro i
  23. 0023intro hi
  24. 0024have hleft_data : ∃ D. ∃ u. ∃ a. Pow(p,S i,D) ∧ (BetaAt(b,c,i,u)DivRem(n,D,u,a))
    Exact native replay linehave hleft_data : exists D u a. (exists bpvi_b_bdqcpez_left_power bpvi_c_bdqcpez_left_power. ((forall bpvi_i_bdqcpez_left_power. (exists bpvi_repeat_gap_bdqcpez_left_power. bpvi_repeat_gap_bdqcpez_left_power + S bpvi_i_bdqcpez_left_power = S i) -> (((exists bpvi_h_bdqcpez_left_power_repeat. bpvi_h_bdqcpez_left_power_repeat + S (p) = S ((S (bpvi_i_bdqcpez_left_power)) * bpvi_c_bdqcpez_left_power)) /\ exists bpvi_q_bdqcpez_left_power_repeat. bpvi_b_bdqcpez_left_power = bpvi_q_bdqcpez_left_power_repeat * S ((S (bpvi_i_bdqcpez_left_power)) * bpvi_c_bdqcpez_left_power) + (p)))) /\ (exists bpvi_u_bdqcpez_left_power bpvi_v_bdqcpez_left_power. ((((exists bpvi_h_bdqcpez_left_power_start. bpvi_h_bdqcpez_left_power_start + S (1) = S ((S (0)) * bpvi_v_bdqcpez_left_power)) /\ exists bpvi_q_bdqcpez_left_power_start. bpvi_u_bdqcpez_left_power = bpvi_q_bdqcpez_left_power_start * S ((S (0)) * bpvi_v_bdqcpez_left_power) + (1))) /\ ((((exists bpvi_h_bdqcpez_left_power_terminal. bpvi_h_bdqcpez_left_power_terminal + S (D) = S ((S (S i)) * bpvi_v_bdqcpez_left_power)) /\ exists bpvi_q_bdqcpez_left_power_terminal. bpvi_u_bdqcpez_left_power = bpvi_q_bdqcpez_left_power_terminal * S ((S (S i)) * bpvi_v_bdqcpez_left_power) + (D))) /\ forall bpvi_j_bdqcpez_left_power. (exists bpvi_product_gap_bdqcpez_left_power. bpvi_product_gap_bdqcpez_left_power + S bpvi_j_bdqcpez_left_power = S i) -> exists bpvi_factor_bdqcpez_left_power bpvi_partial_bdqcpez_left_power bpvi_successor_bdqcpez_left_power. ((((exists bpvi_h_bdqcpez_left_power_factor. bpvi_h_bdqcpez_left_power_factor + S (bpvi_factor_bdqcpez_left_power) = S ((S (bpvi_j_bdqcpez_left_power)) * bpvi_c_bdqcpez_left_power)) /\ exists bpvi_q_bdqcpez_left_power_factor. bpvi_b_bdqcpez_left_power = bpvi_q_bdqcpez_left_power_factor * S ((S (bpvi_j_bdqcpez_left_power)) * bpvi_c_bdqcpez_left_power) + (bpvi_factor_bdqcpez_left_power))) /\ ((((exists bpvi_h_bdqcpez_left_power_partial. bpvi_h_bdqcpez_left_power_partial + S (bpvi_partial_bdqcpez_left_power) = S ((S (bpvi_j_bdqcpez_left_power)) * bpvi_v_bdqcpez_left_power)) /\ exists bpvi_q_bdqcpez_left_power_partial. bpvi_u_bdqcpez_left_power = bpvi_q_bdqcpez_left_power_partial * S ((S (bpvi_j_bdqcpez_left_power)) * bpvi_v_bdqcpez_left_power) + (bpvi_partial_bdqcpez_left_power))) /\ ((((exists bpvi_h_bdqcpez_left_power_successor. bpvi_h_bdqcpez_left_power_successor + S (bpvi_successor_bdqcpez_left_power) = S ((S (S bpvi_j_bdqcpez_left_power)) * bpvi_v_bdqcpez_left_power)) /\ exists bpvi_q_bdqcpez_left_power_successor. bpvi_u_bdqcpez_left_power = bpvi_q_bdqcpez_left_power_successor * S ((S (S bpvi_j_bdqcpez_left_power)) * bpvi_v_bdqcpez_left_power) + (bpvi_successor_bdqcpez_left_power))) /\ bpvi_successor_bdqcpez_left_power = bpvi_partial_bdqcpez_left_power * bpvi_factor_bdqcpez_left_power)))))))) /\ ((((exists fs_h_bdqcpez_left_entry. fs_h_bdqcpez_left_entry + S (u) = S ((S (i)) * c)) /\ exists fs_q_bdqcpez_left_entry. b = fs_q_bdqcpez_left_entry * S ((S (i)) * c) + (u))) /\ (((n) = (D) * (u) + (a) /\ (exists bcf_lt_gap_bdqcpez_left_division_bound. bcf_lt_gap_bdqcpez_left_division_bound + S (a) = D))))
  25. 0025specialize hleft i
  26. 0026apply hleft
  27. 0027exact hi
  28. 0028cases hleft_data
  29. 0029cases hleft_data_witness
  30. 0030cases hleft_data_witness_witness
  31. 0031cases hleft_data_witness_witness_witness
  32. 0032cases hleft_data_witness_witness_witness_right
  33. 0033have hright_data : ∃ D. ∃ u. ∃ a. Pow(p,S i,D) ∧ (BetaAt(d,e,i,u)DivRem(n + n,D,u,a))
    Exact native replay linehave hright_data : exists D u a. (exists bpvi_b_bdqcpez_right_power bpvi_c_bdqcpez_right_power. ((forall bpvi_i_bdqcpez_right_power. (exists bpvi_repeat_gap_bdqcpez_right_power. bpvi_repeat_gap_bdqcpez_right_power + S bpvi_i_bdqcpez_right_power = S i) -> (((exists bpvi_h_bdqcpez_right_power_repeat. bpvi_h_bdqcpez_right_power_repeat + S (p) = S ((S (bpvi_i_bdqcpez_right_power)) * bpvi_c_bdqcpez_right_power)) /\ exists bpvi_q_bdqcpez_right_power_repeat. bpvi_b_bdqcpez_right_power = bpvi_q_bdqcpez_right_power_repeat * S ((S (bpvi_i_bdqcpez_right_power)) * bpvi_c_bdqcpez_right_power) + (p)))) /\ (exists bpvi_u_bdqcpez_right_power bpvi_v_bdqcpez_right_power. ((((exists bpvi_h_bdqcpez_right_power_start. bpvi_h_bdqcpez_right_power_start + S (1) = S ((S (0)) * bpvi_v_bdqcpez_right_power)) /\ exists bpvi_q_bdqcpez_right_power_start. bpvi_u_bdqcpez_right_power = bpvi_q_bdqcpez_right_power_start * S ((S (0)) * bpvi_v_bdqcpez_right_power) + (1))) /\ ((((exists bpvi_h_bdqcpez_right_power_terminal. bpvi_h_bdqcpez_right_power_terminal + S (D) = S ((S (S i)) * bpvi_v_bdqcpez_right_power)) /\ exists bpvi_q_bdqcpez_right_power_terminal. bpvi_u_bdqcpez_right_power = bpvi_q_bdqcpez_right_power_terminal * S ((S (S i)) * bpvi_v_bdqcpez_right_power) + (D))) /\ forall bpvi_j_bdqcpez_right_power. (exists bpvi_product_gap_bdqcpez_right_power. bpvi_product_gap_bdqcpez_right_power + S bpvi_j_bdqcpez_right_power = S i) -> exists bpvi_factor_bdqcpez_right_power bpvi_partial_bdqcpez_right_power bpvi_successor_bdqcpez_right_power. ((((exists bpvi_h_bdqcpez_right_power_factor. bpvi_h_bdqcpez_right_power_factor + S (bpvi_factor_bdqcpez_right_power) = S ((S (bpvi_j_bdqcpez_right_power)) * bpvi_c_bdqcpez_right_power)) /\ exists bpvi_q_bdqcpez_right_power_factor. bpvi_b_bdqcpez_right_power = bpvi_q_bdqcpez_right_power_factor * S ((S (bpvi_j_bdqcpez_right_power)) * bpvi_c_bdqcpez_right_power) + (bpvi_factor_bdqcpez_right_power))) /\ ((((exists bpvi_h_bdqcpez_right_power_partial. bpvi_h_bdqcpez_right_power_partial + S (bpvi_partial_bdqcpez_right_power) = S ((S (bpvi_j_bdqcpez_right_power)) * bpvi_v_bdqcpez_right_power)) /\ exists bpvi_q_bdqcpez_right_power_partial. bpvi_u_bdqcpez_right_power = bpvi_q_bdqcpez_right_power_partial * S ((S (bpvi_j_bdqcpez_right_power)) * bpvi_v_bdqcpez_right_power) + (bpvi_partial_bdqcpez_right_power))) /\ ((((exists bpvi_h_bdqcpez_right_power_successor. bpvi_h_bdqcpez_right_power_successor + S (bpvi_successor_bdqcpez_right_power) = S ((S (S bpvi_j_bdqcpez_right_power)) * bpvi_v_bdqcpez_right_power)) /\ exists bpvi_q_bdqcpez_right_power_successor. bpvi_u_bdqcpez_right_power = bpvi_q_bdqcpez_right_power_successor * S ((S (S bpvi_j_bdqcpez_right_power)) * bpvi_v_bdqcpez_right_power) + (bpvi_successor_bdqcpez_right_power))) /\ bpvi_successor_bdqcpez_right_power = bpvi_partial_bdqcpez_right_power * bpvi_factor_bdqcpez_right_power)))))))) /\ ((((exists fs_h_bdqcpez_right_entry. fs_h_bdqcpez_right_entry + S (u) = S ((S (i)) * e)) /\ exists fs_q_bdqcpez_right_entry. d = fs_q_bdqcpez_right_entry * S ((S (i)) * e) + (u))) /\ (((n + n) = (D) * (u) + (a) /\ (exists bcf_lt_gap_bdqcpez_right_division_bound. bcf_lt_gap_bdqcpez_right_division_bound + S (a) = D))))
  34. 0034specialize hright i
  35. 0035apply hright
  36. 0036exact hi
  37. 0037cases hright_data
  38. 0038cases hright_data_witness
  39. 0039cases hright_data_witness_witness
  40. 0040cases hright_data_witness_witness_witness
  41. 0041cases hright_data_witness_witness_witness_right
  42. 0042have hsemantic : ∃ q. ∃ Q. ∃ bit. BetaAt(b,c,i,q) ∧ (BetaAt(d,e,i,Q) ∧ (BetaAt(f,g,i,bit) ∧ (bit = 0 ∧ Q = q + q ∨ bit = 1 ∧ Q = S (q + q))))
    Exact native replay linehave hsemantic : exists q Q bit. (((exists fs_h_bdqcpez_semantic_left. fs_h_bdqcpez_semantic_left + S (q) = S ((S (i)) * c)) /\ exists fs_q_bdqcpez_semantic_left. b = fs_q_bdqcpez_semantic_left * S ((S (i)) * c) + (q))) /\ ((((exists fs_h_bdqcpez_semantic_right. fs_h_bdqcpez_semantic_right + S (Q) = S ((S (i)) * e)) /\ exists fs_q_bdqcpez_semantic_right. d = fs_q_bdqcpez_semantic_right * S ((S (i)) * e) + (Q))) /\ ((((exists fs_h_bdqcpez_semantic_bit. fs_h_bdqcpez_semantic_bit + S (bit) = S ((S (i)) * g)) /\ exists fs_q_bdqcpez_semantic_bit. f = fs_q_bdqcpez_semantic_bit * S ((S (i)) * g) + (bit))) /\ (((bit = 0 /\ Q = q + q) \/ (bit = 1 /\ Q = S (q + q))))))
  43. 0043specialize hcarry i
  44. 0044apply hcarry
  45. 0045exact hi
  46. 0046cases hsemantic
  47. 0047cases hsemantic_witness
  48. 0048cases hsemantic_witness_witness
  49. 0049cases hsemantic_witness_witness_witness
  50. 0050cases hsemantic_witness_witness_witness_right
  51. 0051cases hsemantic_witness_witness_witness_right_right
  52. 0052specialize zero_or_succ i
  53. 0053cases zero_or_succ
  54. 0054have hexponent_one : S i = 1
  55. 0055rewrite zero_or_succ_left
  56. 0056refl
  57. 0057have hleft_power : x = p
  58. 0058specialize pow_one p
  59. 0059specialize pow_one (S i)
  60. 0060specialize pow_one x
  61. 0061apply pow_one
  62. 0062exact hexponent_one
  63. 0063exact hleft_data_witness_witness_witness_left
  64. 0064have hright_power : x3 = p
  65. 0065specialize pow_one p
  66. 0066specialize pow_one (S i)
  67. 0067specialize pow_one x3
  68. 0068apply pow_one
  69. 0069exact hexponent_one
  70. 0070exact hright_data_witness_witness_witness_left
  71. 0071rewrite hleft_power at hleft_data_witness_witness_witness_right_right
  72. 0072rewrite hleft_power at hleft_data_witness_witness_witness_right_right
  73. 0073rewrite hright_power at hright_data_witness_witness_witness_right_right
  74. 0074rewrite hright_power at hright_data_witness_witness_witness_right_right
  75. 0075cases hleft_data_witness_witness_witness_right_right
  76. 0076cases hright_data_witness_witness_witness_right_right
  77. 0077cases hfirst
  78. 0078cases hdouble
  79. 0079have hleft_unique : x1 = q /\ x2 = r
  80. 0080specialize division_remainder_unique p
  81. 0081specialize division_remainder_unique n
  82. 0082specialize division_remainder_unique x1
  83. 0083specialize division_remainder_unique x2
  84. 0084specialize division_remainder_unique q
  85. 0085specialize division_remainder_unique r
  86. 0086apply division_remainder_unique
  87. 0087exact hleft_data_witness_witness_witness_right_right_left
  88. 0088exact hleft_data_witness_witness_witness_right_right_right
  89. 0089exact hfirst_left
  90. 0090exact hfirst_right
  91. 0091have hright_unique : x4 = q + q /\ x5 = R
  92. 0092specialize division_remainder_unique p
  93. 0093specialize division_remainder_unique (n + n)
  94. 0094specialize division_remainder_unique x4
  95. 0095specialize division_remainder_unique x5
  96. 0096specialize division_remainder_unique (q + q)
  97. 0097specialize division_remainder_unique R
  98. 0098apply division_remainder_unique
  99. 0099exact hright_data_witness_witness_witness_right_right_left
  100. 0100exact hright_data_witness_witness_witness_right_right_right
  101. 0101exact hdouble_left
  102. 0102exact hdouble_right
  103. 0103cases hleft_unique
  104. 0104cases hright_unique
  105. 0105have hleft_entry : x1 = x6
  106. 0106specialize beta_at_unique b
  107. 0107specialize beta_at_unique c
  108. 0108specialize beta_at_unique i
  109. 0109specialize beta_at_unique x1
  110. 0110specialize beta_at_unique x6
  111. 0111apply beta_at_unique
  112. 0112exact hleft_data_witness_witness_witness_right_left
  113. 0113exact hsemantic_witness_witness_witness_left
  114. 0114have hright_entry : x4 = x7
  115. 0115specialize beta_at_unique d
  116. 0116specialize beta_at_unique e
  117. 0117specialize beta_at_unique i
  118. 0118specialize beta_at_unique x4
  119. 0119specialize beta_at_unique x7
  120. 0120apply beta_at_unique
  121. 0121exact hright_data_witness_witness_witness_right_left
  122. 0122exact hsemantic_witness_witness_witness_right_left
  123. 0123cases hsemantic_witness_witness_witness_right_right_right
  124. 0124cases hsemantic_witness_witness_witness_right_right_right_left
  125. 0125rewrite hsemantic_witness_witness_witness_right_right_right_left_left at hsemantic_witness_witness_witness_right_right_left
  126. 0126rewrite hsemantic_witness_witness_witness_right_right_right_left_left at hsemantic_witness_witness_witness_right_right_left
  127. 0127exact hsemantic_witness_witness_witness_right_right_left
  128. 0128cases hsemantic_witness_witness_witness_right_right_right_right
  129. 0129rewrite <- hright_entry at hsemantic_witness_witness_witness_right_right_right_right_right
  130. 0130rewrite hright_unique_left at hsemantic_witness_witness_witness_right_right_right_right_right
  131. 0131rewrite <- hleft_entry at hsemantic_witness_witness_witness_right_right_right_right_right
  132. 0132rewrite <- hleft_entry at hsemantic_witness_witness_witness_right_right_right_right_right
  133. 0133rewrite hleft_unique_left at hsemantic_witness_witness_witness_right_right_right_right_right
  134. 0134rewrite hleft_unique_left at hsemantic_witness_witness_witness_right_right_right_right_right
  135. 0135exfalso
  136. 0136specialize lt_irrefl_expanded (q + q)
  137. 0137apply lt_irrefl_expanded
  138. 0138exists 0
  139. 0139trans S (q + q)
  140. 0140specialize zero_add (S (q + q))
  141. 0141exact zero_add
  142. 0142symm
  143. 0143exact hsemantic_witness_witness_witness_right_right_right_right_right
  144. 0144cases zero_or_succ_right
  145. 0145have hexponent_tail : Lt(1,S i)
    Exact native replay linehave hexponent_tail : exists bcf_le_gap_bdqcpez_tail_exponent. bcf_le_gap_bdqcpez_tail_exponent + (2) = S i
  146. 0146exists x9
  147. 0147rewrite zero_or_succ_right_witness
  148. 0148simp
  149. 0149have htail : Lt(n + n,x3)
    Exact native replay linehave htail : exists bcf_lt_gap_bdqcpez_tail_strict. bcf_lt_gap_bdqcpez_tail_strict + S (n + n) = x3
  150. 0150specialize pow_tail_strict_of_square p
  151. 0151specialize pow_tail_strict_of_square (S i)
  152. 0152specialize pow_tail_strict_of_square x3
  153. 0153specialize pow_tail_strict_of_square s
  154. 0154specialize pow_tail_strict_of_square (n + n)
  155. 0155apply pow_tail_strict_of_square
  156. 0156exact hbase
  157. 0157exact hexponent_tail
  158. 0158exact hsquare
  159. 0159exact hright_data_witness_witness_witness_left
  160. 0160exact hstrict
  161. 0161have hright_zero : x4 = 0
  162. 0162specialize division_zero_quotient_of_lt x3
  163. 0163specialize division_zero_quotient_of_lt (n + n)
  164. 0164specialize division_zero_quotient_of_lt x4
  165. 0165specialize division_zero_quotient_of_lt x5
  166. 0166apply division_zero_quotient_of_lt
  167. 0167exact hright_data_witness_witness_witness_right_right
  168. 0168exact htail
  169. 0169have hright_entry : x4 = x7
  170. 0170specialize beta_at_unique d
  171. 0171specialize beta_at_unique e
  172. 0172specialize beta_at_unique i
  173. 0173specialize beta_at_unique x4
  174. 0174specialize beta_at_unique x7
  175. 0175apply beta_at_unique
  176. 0176exact hright_data_witness_witness_witness_right_left
  177. 0177exact hsemantic_witness_witness_witness_right_left
  178. 0178cases hsemantic_witness_witness_witness_right_right_right
  179. 0179cases hsemantic_witness_witness_witness_right_right_right_left
  180. 0180rewrite hsemantic_witness_witness_witness_right_right_right_left_left at hsemantic_witness_witness_witness_right_right_left
  181. 0181rewrite hsemantic_witness_witness_witness_right_right_right_left_left at hsemantic_witness_witness_witness_right_right_left
  182. 0182exact hsemantic_witness_witness_witness_right_right_left
  183. 0183cases hsemantic_witness_witness_witness_right_right_right_right
  184. 0184rewrite <- hright_entry at hsemantic_witness_witness_witness_right_right_right_right_right
  185. 0185rewrite hright_zero at hsemantic_witness_witness_witness_right_right_right_right_right
  186. 0186exfalso
  187. 0187apply PA1
  188. 0188symm
  189. 0189exact hsemantic_witness_witness_witness_right_right_right_right_right