LU0003 · theorem body

lucas_digit_carry_iff_prime_divides

dependency-curried kernel-checked candidate body; not enrolled in Alpha or Stable

For two base-p digits, carrying is equivalent to prime divisibility of their binomial coefficient.

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. ∀ a. ∀ b. ∀ C. Prime(p)Lt(a,p)Lt(b,p)Choose(a + b,a,C) → (Le(p,a + b)Dvd(p,C)) ∧ (Dvd(p,C)Le(p,a + b))

Every purple notation token opens its conservative definition. This reading surface never changes the unchanged intuitionistic kernel or confers checked-use authority.

Definitions used by this theorem

In the theorem statement

In local proof propositions

none
Exact expanded first-order statement
forall p a b C. ((~(p = 1) /\ forall frm_prime_left_lucas_digit_prime frm_prime_right_lucas_digit_prime. p = frm_prime_left_lucas_digit_prime * frm_prime_right_lucas_digit_prime -> frm_prime_left_lucas_digit_prime = 1 \/ frm_prime_right_lucas_digit_prime = 1)) -> (exists ldc_lt_left. ldc_lt_left + S (a) = p) -> (exists ldc_lt_right. ldc_lt_right + S (b) = p) -> (((exists bcf_lt_gap_lucas_digit_choose_out_of_range. bcf_lt_gap_lucas_digit_choose_out_of_range + S (a + b) = a) /\ C = 0) \/ ((exists bcf_le_gap_lucas_digit_choose_in_range. bcf_le_gap_lucas_digit_choose_in_range + (a) = a + b) /\ (exists bcf_row_code_code_lucas_digit_choose bcf_row_code_scale_lucas_digit_choose bcf_row_scale_code_lucas_digit_choose bcf_row_scale_scale_lucas_digit_choose bcf_row_code_lucas_digit_choose bcf_row_scale_lucas_digit_choose. ((forall bcf_row_index_lucas_digit_choose_table. (exists bcf_lt_gap_lucas_digit_choose_table_row_bound. bcf_lt_gap_lucas_digit_choose_table_row_bound + S (bcf_row_index_lucas_digit_choose_table) = S (a + b)) -> exists bcf_row_code_lucas_digit_choose_table bcf_row_scale_lucas_digit_choose_table. ((((exists bcf_height_lucas_digit_choose_table_decoded_row_code. bcf_height_lucas_digit_choose_table_decoded_row_code + S (bcf_row_code_lucas_digit_choose_table) = S ((S (bcf_row_index_lucas_digit_choose_table)) * bcf_row_code_scale_lucas_digit_choose)) /\ exists bcf_quotient_lucas_digit_choose_table_decoded_row_code. bcf_row_code_code_lucas_digit_choose = bcf_quotient_lucas_digit_choose_table_decoded_row_code * S ((S (bcf_row_index_lucas_digit_choose_table)) * bcf_row_code_scale_lucas_digit_choose) + (bcf_row_code_lucas_digit_choose_table))) /\ ((((exists bcf_height_lucas_digit_choose_table_decoded_row_scale. bcf_height_lucas_digit_choose_table_decoded_row_scale + S (bcf_row_scale_lucas_digit_choose_table) = S ((S (bcf_row_index_lucas_digit_choose_table)) * bcf_row_scale_scale_lucas_digit_choose)) /\ exists bcf_quotient_lucas_digit_choose_table_decoded_row_scale. bcf_row_scale_code_lucas_digit_choose = bcf_quotient_lucas_digit_choose_table_decoded_row_scale * S ((S (bcf_row_index_lucas_digit_choose_table)) * bcf_row_scale_scale_lucas_digit_choose) + (bcf_row_scale_lucas_digit_choose_table))) /\ ((bcf_row_index_lucas_digit_choose_table = 0 /\ (forall bcf_index_lucas_digit_choose_table_zero_row. (exists bcf_lt_gap_lucas_digit_choose_table_zero_row_bound. bcf_lt_gap_lucas_digit_choose_table_zero_row_bound + S (bcf_index_lucas_digit_choose_table_zero_row) = S (a + b)) -> exists bcf_value_lucas_digit_choose_table_zero_row. ((((exists bcf_height_lucas_digit_choose_table_zero_row_entry. bcf_height_lucas_digit_choose_table_zero_row_entry + S (bcf_value_lucas_digit_choose_table_zero_row) = S ((S (bcf_index_lucas_digit_choose_table_zero_row)) * bcf_row_scale_lucas_digit_choose_table)) /\ exists bcf_quotient_lucas_digit_choose_table_zero_row_entry. bcf_row_code_lucas_digit_choose_table = bcf_quotient_lucas_digit_choose_table_zero_row_entry * S ((S (bcf_index_lucas_digit_choose_table_zero_row)) * bcf_row_scale_lucas_digit_choose_table) + (bcf_value_lucas_digit_choose_table_zero_row))) /\ ((bcf_index_lucas_digit_choose_table_zero_row = 0 /\ bcf_value_lucas_digit_choose_table_zero_row = 1) \/ exists bcf_predecessor_lucas_digit_choose_table_zero_row. bcf_index_lucas_digit_choose_table_zero_row = S bcf_predecessor_lucas_digit_choose_table_zero_row /\ bcf_value_lucas_digit_choose_table_zero_row = 0)))) \/ exists bcf_predecessor_lucas_digit_choose_table bcf_previous_code_lucas_digit_choose_table bcf_previous_scale_lucas_digit_choose_table. bcf_row_index_lucas_digit_choose_table = S bcf_predecessor_lucas_digit_choose_table /\ ((((exists bcf_height_lucas_digit_choose_table_decoded_previous_code. bcf_height_lucas_digit_choose_table_decoded_previous_code + S (bcf_previous_code_lucas_digit_choose_table) = S ((S (bcf_predecessor_lucas_digit_choose_table)) * bcf_row_code_scale_lucas_digit_choose)) /\ exists bcf_quotient_lucas_digit_choose_table_decoded_previous_code. bcf_row_code_code_lucas_digit_choose = bcf_quotient_lucas_digit_choose_table_decoded_previous_code * S ((S (bcf_predecessor_lucas_digit_choose_table)) * bcf_row_code_scale_lucas_digit_choose) + (bcf_previous_code_lucas_digit_choose_table))) /\ ((((exists bcf_height_lucas_digit_choose_table_decoded_previous_scale. bcf_height_lucas_digit_choose_table_decoded_previous_scale + S (bcf_previous_scale_lucas_digit_choose_table) = S ((S (bcf_predecessor_lucas_digit_choose_table)) * bcf_row_scale_scale_lucas_digit_choose)) /\ exists bcf_quotient_lucas_digit_choose_table_decoded_previous_scale. bcf_row_scale_code_lucas_digit_choose = bcf_quotient_lucas_digit_choose_table_decoded_previous_scale * S ((S (bcf_predecessor_lucas_digit_choose_table)) * bcf_row_scale_scale_lucas_digit_choose) + (bcf_previous_scale_lucas_digit_choose_table))) /\ (forall bcf_index_lucas_digit_choose_table_row_step. (exists bcf_lt_gap_lucas_digit_choose_table_row_step_bound. bcf_lt_gap_lucas_digit_choose_table_row_step_bound + S (bcf_index_lucas_digit_choose_table_row_step) = S (a + b)) -> exists bcf_value_lucas_digit_choose_table_row_step. ((((exists bcf_height_lucas_digit_choose_table_row_step_entry. bcf_height_lucas_digit_choose_table_row_step_entry + S (bcf_value_lucas_digit_choose_table_row_step) = S ((S (bcf_index_lucas_digit_choose_table_row_step)) * bcf_row_scale_lucas_digit_choose_table)) /\ exists bcf_quotient_lucas_digit_choose_table_row_step_entry. bcf_row_code_lucas_digit_choose_table = bcf_quotient_lucas_digit_choose_table_row_step_entry * S ((S (bcf_index_lucas_digit_choose_table_row_step)) * bcf_row_scale_lucas_digit_choose_table) + (bcf_value_lucas_digit_choose_table_row_step))) /\ ((bcf_index_lucas_digit_choose_table_row_step = 0 /\ bcf_value_lucas_digit_choose_table_row_step = 1) \/ exists bcf_predecessor_lucas_digit_choose_table_row_step bcf_left_lucas_digit_choose_table_row_step bcf_right_lucas_digit_choose_table_row_step. bcf_index_lucas_digit_choose_table_row_step = S bcf_predecessor_lucas_digit_choose_table_row_step /\ ((((exists bcf_height_lucas_digit_choose_table_row_step_previous_left. bcf_height_lucas_digit_choose_table_row_step_previous_left + S (bcf_left_lucas_digit_choose_table_row_step) = S ((S (bcf_predecessor_lucas_digit_choose_table_row_step)) * bcf_previous_scale_lucas_digit_choose_table)) /\ exists bcf_quotient_lucas_digit_choose_table_row_step_previous_left. bcf_previous_code_lucas_digit_choose_table = bcf_quotient_lucas_digit_choose_table_row_step_previous_left * S ((S (bcf_predecessor_lucas_digit_choose_table_row_step)) * bcf_previous_scale_lucas_digit_choose_table) + (bcf_left_lucas_digit_choose_table_row_step))) /\ ((((exists bcf_height_lucas_digit_choose_table_row_step_previous_right. bcf_height_lucas_digit_choose_table_row_step_previous_right + S (bcf_right_lucas_digit_choose_table_row_step) = S ((S (S (bcf_predecessor_lucas_digit_choose_table_row_step))) * bcf_previous_scale_lucas_digit_choose_table)) /\ exists bcf_quotient_lucas_digit_choose_table_row_step_previous_right. bcf_previous_code_lucas_digit_choose_table = bcf_quotient_lucas_digit_choose_table_row_step_previous_right * S ((S (S (bcf_predecessor_lucas_digit_choose_table_row_step))) * bcf_previous_scale_lucas_digit_choose_table) + (bcf_right_lucas_digit_choose_table_row_step))) /\ bcf_value_lucas_digit_choose_table_row_step = bcf_left_lucas_digit_choose_table_row_step + bcf_right_lucas_digit_choose_table_row_step))))))))))) /\ ((((exists bcf_height_lucas_digit_choose_decoded_row_code. bcf_height_lucas_digit_choose_decoded_row_code + S (bcf_row_code_lucas_digit_choose) = S ((S (a + b)) * bcf_row_code_scale_lucas_digit_choose)) /\ exists bcf_quotient_lucas_digit_choose_decoded_row_code. bcf_row_code_code_lucas_digit_choose = bcf_quotient_lucas_digit_choose_decoded_row_code * S ((S (a + b)) * bcf_row_code_scale_lucas_digit_choose) + (bcf_row_code_lucas_digit_choose))) /\ ((((exists bcf_height_lucas_digit_choose_decoded_row_scale. bcf_height_lucas_digit_choose_decoded_row_scale + S (bcf_row_scale_lucas_digit_choose) = S ((S (a + b)) * bcf_row_scale_scale_lucas_digit_choose)) /\ exists bcf_quotient_lucas_digit_choose_decoded_row_scale. bcf_row_scale_code_lucas_digit_choose = bcf_quotient_lucas_digit_choose_decoded_row_scale * S ((S (a + b)) * bcf_row_scale_scale_lucas_digit_choose) + (bcf_row_scale_lucas_digit_choose))) /\ (((exists bcf_height_lucas_digit_choose_decoded_value. bcf_height_lucas_digit_choose_decoded_value + S (C) = S ((S (a)) * bcf_row_scale_lucas_digit_choose)) /\ exists bcf_quotient_lucas_digit_choose_decoded_value. bcf_row_code_lucas_digit_choose = bcf_quotient_lucas_digit_choose_decoded_value * S ((S (a)) * bcf_row_scale_lucas_digit_choose) + (C))))))))) -> ((((exists ldc_le_carry. ldc_le_carry + (p) = a + b) -> (exists ldc_quotient_digit. C = p * ldc_quotient_digit)) /\ ((exists ldc_quotient_digit. C = p * ldc_quotient_digit) -> (exists ldc_le_carry. ldc_le_carry + (p) = a + b))))

Proof neighborhood

Direct theorem prerequisites

Direct theorem dependents

Definition-aware tactic body

Only propositions whose conservative expansion has been checked for exact first-order equivalence are compacted. Every changed line retains its immutable exact replay command.

Read the argument

Proof checkpoints

31 script commands · 8 reading checkpoints · 0 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–8

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

  1. L1
    intro p
  2. L2
    intro a
  3. L3
    intro b
  4. L4
    intro C
  5. L5
    intro hp
  6. L6
    intro ha
  7. L7
    intro hb
  8. L8
    intro hchoose
02Separate the logical casesL9–9

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

  1. L9
    split
03Fix variables and assumptionsL10–10

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

  1. L10
    intro hcarry
04Use earlier factsL11–20

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

  1. L11
    specialize lucas_digit_carry_implies_prime_divides p
  2. L12
    specialize lucas_digit_carry_implies_prime_divides a
  3. L13
    specialize lucas_digit_carry_implies_prime_divides b
  4. L14
    specialize lucas_digit_carry_implies_prime_divides C
  5. L15
    apply lucas_digit_carry_implies_prime_divides
  6. L16
    exact hp
  7. L17
    exact ha
  8. L18
    exact hb
  9. L19
    exact hcarry
  10. L20
    exact hchoose
05Fix variables and assumptionsL21–21

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

  1. L21
    intro hdivides
06Use earlier factsL22–27

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

  1. L22
    specialize lucas_choose_prime_divisor_bound (a + b)
  2. L23
    specialize lucas_choose_prime_divisor_bound a
  3. L24
    specialize lucas_choose_prime_divisor_bound b
  4. L25
    specialize lucas_choose_prime_divisor_bound p
  5. L26
    specialize lucas_choose_prime_divisor_bound C
  6. L27
    apply lucas_choose_prime_divisor_bound
07Calculate and transport equalitiesL28–28

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

  1. L28
    refl
08Use earlier factsL29–31

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

  1. L29
    exact hp
  2. L30
    exact hchoose
  3. L31
    exact hdivides

Library-wide reading audit

Original defined command ledger · 31 lines
  1. 0001intro p
  2. 0002intro a
  3. 0003intro b
  4. 0004intro C
  5. 0005intro hp
  6. 0006intro ha
  7. 0007intro hb
  8. 0008intro hchoose
  9. 0009split
  10. 0010intro hcarry
  11. 0011specialize lucas_digit_carry_implies_prime_divides p
  12. 0012specialize lucas_digit_carry_implies_prime_divides a
  13. 0013specialize lucas_digit_carry_implies_prime_divides b
  14. 0014specialize lucas_digit_carry_implies_prime_divides C
  15. 0015apply lucas_digit_carry_implies_prime_divides
  16. 0016exact hp
  17. 0017exact ha
  18. 0018exact hb
  19. 0019exact hcarry
  20. 0020exact hchoose
  21. 0021intro hdivides
  22. 0022specialize lucas_choose_prime_divisor_bound (a + b)
  23. 0023specialize lucas_choose_prime_divisor_bound a
  24. 0024specialize lucas_choose_prime_divisor_bound b
  25. 0025specialize lucas_choose_prime_divisor_bound p
  26. 0026specialize lucas_choose_prime_divisor_bound C
  27. 0027apply lucas_choose_prime_divisor_bound
  28. 0028refl
  29. 0029exact hp
  30. 0030exact hchoose
  31. 0031exact hdivides