BX000F

binary_modular_exponentiation_result_functional

Any two exact bounded residues of the same relational power are equal.

Alpha v34 checked-use · first admitted v21 · independently kernel and Lean verified; not Stable

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.

G102 was OPEN when this family was first admitted in Alpha v21. It is now CLOSED in Alpha v23: every arbitrary exponent has actual canonical beta-coded digits, a complete modular execution, and exact counted bound operations≤3*BitLen(e)+2.

Exact theorem in conservative defined notation

∀ a. ∀ e. ∀ m. ∀ r. ∀ s. BinaryModularPower(a,e,m,r)BinaryModularPower(a,e,m,s) → r = s

Every linked abbreviation expands hygienically to the identical original native formula.

Definition DAG

Actual proof prerequisites

pow_functional · checked external prerequisitebinary_canonical_residue_functional
Original expanded first-order statement
forall a e m r s. (exists ff_power_binary_result. ((exists ff_b_binary_result_value ff_c_binary_result_value. ((forall ff_i_binary_result_value_repeat. (exists ff_lt_binary_result_value_repeat_bound. ff_lt_binary_result_value_repeat_bound + S ff_i_binary_result_value_repeat = e) -> (((exists ff_h_binary_result_value_repeat_decoded. ff_h_binary_result_value_repeat_decoded + S (a) = S ((S (ff_i_binary_result_value_repeat)) * ff_c_binary_result_value)) /\ exists ff_q_binary_result_value_repeat_decoded. ff_b_binary_result_value = ff_q_binary_result_value_repeat_decoded * S ((S (ff_i_binary_result_value_repeat)) * ff_c_binary_result_value) + (a)))) /\ (exists ff_u_binary_result_value_product ff_v_binary_result_value_product. ((((exists ff_h_binary_result_value_product_start. ff_h_binary_result_value_product_start + S (1) = S ((S (0)) * ff_v_binary_result_value_product)) /\ exists ff_q_binary_result_value_product_start. ff_u_binary_result_value_product = ff_q_binary_result_value_product_start * S ((S (0)) * ff_v_binary_result_value_product) + (1))) /\ ((((exists ff_h_binary_result_value_product_terminal. ff_h_binary_result_value_product_terminal + S (ff_power_binary_result) = S ((S (e)) * ff_v_binary_result_value_product)) /\ exists ff_q_binary_result_value_product_terminal. ff_u_binary_result_value_product = ff_q_binary_result_value_product_terminal * S ((S (e)) * ff_v_binary_result_value_product) + (ff_power_binary_result))) /\ forall ff_i_binary_result_value_product. (exists ff_lt_binary_result_value_product_bound. ff_lt_binary_result_value_product_bound + S ff_i_binary_result_value_product = e) -> exists ff_p_binary_result_value_product ff_r_binary_result_value_product ff_s_binary_result_value_product. ((((exists ff_h_binary_result_value_product_factor. ff_h_binary_result_value_product_factor + S (ff_p_binary_result_value_product) = S ((S (ff_i_binary_result_value_product)) * ff_c_binary_result_value)) /\ exists ff_q_binary_result_value_product_factor. ff_b_binary_result_value = ff_q_binary_result_value_product_factor * S ((S (ff_i_binary_result_value_product)) * ff_c_binary_result_value) + (ff_p_binary_result_value_product))) /\ ((((exists ff_h_binary_result_value_product_partial. ff_h_binary_result_value_product_partial + S (ff_r_binary_result_value_product) = S ((S (ff_i_binary_result_value_product)) * ff_v_binary_result_value_product)) /\ exists ff_q_binary_result_value_product_partial. ff_u_binary_result_value_product = ff_q_binary_result_value_product_partial * S ((S (ff_i_binary_result_value_product)) * ff_v_binary_result_value_product) + (ff_r_binary_result_value_product))) /\ ((((exists ff_h_binary_result_value_product_successor. ff_h_binary_result_value_product_successor + S (ff_s_binary_result_value_product) = S ((S (S ff_i_binary_result_value_product)) * ff_v_binary_result_value_product)) /\ exists ff_q_binary_result_value_product_successor. ff_u_binary_result_value_product = ff_q_binary_result_value_product_successor * S ((S (S ff_i_binary_result_value_product)) * ff_v_binary_result_value_product) + (ff_s_binary_result_value_product))) /\ ff_s_binary_result_value_product = ff_r_binary_result_value_product * ff_p_binary_result_value_product)))))))) /\ (((exists ff_gap_binary_result_residue. ff_gap_binary_result_residue + S (r) = m) /\ (exists ff_left_binary_result_residue_congruence ff_right_binary_result_residue_congruence. (ff_power_binary_result) + m * ff_left_binary_result_residue_congruence = (r) + m * ff_right_binary_result_residue_congruence))))) -> (exists ff_power_binary_other. ((exists ff_b_binary_other_value ff_c_binary_other_value. ((forall ff_i_binary_other_value_repeat. (exists ff_lt_binary_other_value_repeat_bound. ff_lt_binary_other_value_repeat_bound + S ff_i_binary_other_value_repeat = e) -> (((exists ff_h_binary_other_value_repeat_decoded. ff_h_binary_other_value_repeat_decoded + S (a) = S ((S (ff_i_binary_other_value_repeat)) * ff_c_binary_other_value)) /\ exists ff_q_binary_other_value_repeat_decoded. ff_b_binary_other_value = ff_q_binary_other_value_repeat_decoded * S ((S (ff_i_binary_other_value_repeat)) * ff_c_binary_other_value) + (a)))) /\ (exists ff_u_binary_other_value_product ff_v_binary_other_value_product. ((((exists ff_h_binary_other_value_product_start. ff_h_binary_other_value_product_start + S (1) = S ((S (0)) * ff_v_binary_other_value_product)) /\ exists ff_q_binary_other_value_product_start. ff_u_binary_other_value_product = ff_q_binary_other_value_product_start * S ((S (0)) * ff_v_binary_other_value_product) + (1))) /\ ((((exists ff_h_binary_other_value_product_terminal. ff_h_binary_other_value_product_terminal + S (ff_power_binary_other) = S ((S (e)) * ff_v_binary_other_value_product)) /\ exists ff_q_binary_other_value_product_terminal. ff_u_binary_other_value_product = ff_q_binary_other_value_product_terminal * S ((S (e)) * ff_v_binary_other_value_product) + (ff_power_binary_other))) /\ forall ff_i_binary_other_value_product. (exists ff_lt_binary_other_value_product_bound. ff_lt_binary_other_value_product_bound + S ff_i_binary_other_value_product = e) -> exists ff_p_binary_other_value_product ff_r_binary_other_value_product ff_s_binary_other_value_product. ((((exists ff_h_binary_other_value_product_factor. ff_h_binary_other_value_product_factor + S (ff_p_binary_other_value_product) = S ((S (ff_i_binary_other_value_product)) * ff_c_binary_other_value)) /\ exists ff_q_binary_other_value_product_factor. ff_b_binary_other_value = ff_q_binary_other_value_product_factor * S ((S (ff_i_binary_other_value_product)) * ff_c_binary_other_value) + (ff_p_binary_other_value_product))) /\ ((((exists ff_h_binary_other_value_product_partial. ff_h_binary_other_value_product_partial + S (ff_r_binary_other_value_product) = S ((S (ff_i_binary_other_value_product)) * ff_v_binary_other_value_product)) /\ exists ff_q_binary_other_value_product_partial. ff_u_binary_other_value_product = ff_q_binary_other_value_product_partial * S ((S (ff_i_binary_other_value_product)) * ff_v_binary_other_value_product) + (ff_r_binary_other_value_product))) /\ ((((exists ff_h_binary_other_value_product_successor. ff_h_binary_other_value_product_successor + S (ff_s_binary_other_value_product) = S ((S (S ff_i_binary_other_value_product)) * ff_v_binary_other_value_product)) /\ exists ff_q_binary_other_value_product_successor. ff_u_binary_other_value_product = ff_q_binary_other_value_product_successor * S ((S (S ff_i_binary_other_value_product)) * ff_v_binary_other_value_product) + (ff_s_binary_other_value_product))) /\ ff_s_binary_other_value_product = ff_r_binary_other_value_product * ff_p_binary_other_value_product)))))))) /\ (((exists ff_gap_binary_other_residue. ff_gap_binary_other_residue + S (s) = m) /\ (exists ff_left_binary_other_residue_congruence ff_right_binary_other_residue_congruence. (ff_power_binary_other) + m * ff_left_binary_other_residue_congruence = (s) + m * ff_right_binary_other_residue_congruence))))) -> r = s

Complete unchanged native tactic proof

All 27 lines are the exact independently kernel-checked original script.

Read the argument

Proof checkpoints

27 script commands · 4 reading checkpoints · 1 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 (1)
01Fix variables and assumptionsL1–7

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

  1. L1
    intro a
  2. L2
    intro e
  3. L3
    intro m
  4. L4
    intro r
  5. L5
    intro s
  6. L6
    intro hr
  7. L7
    intro hs
02Separate the logical casesL8–11

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

  1. L8
    cases hr
  2. L9
    cases hr_witness
  3. L10
    cases hs
  4. L11
    cases hs_witness
03Establish hpowerL12–21

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

  1. L12
    have hpower : x = x1
  2. L13
    specialize pow_functional a
  3. L14
    specialize pow_functional e
  4. L15
    specialize pow_functional x
  5. L16
    specialize pow_functional x1
  6. L17
    apply pow_functional
  7. L18
    exact hr_witness_left
  8. L19
    exact hs_witness_left
  9. L20
    rewrite <- hpower at hs_witness_right
  10. L21
    specialize binary_canonical_residue_functional m
04Use earlier factsL22–27

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

  1. L22
    specialize binary_canonical_residue_functional x
  2. L23
    specialize binary_canonical_residue_functional r
  3. L24
    specialize binary_canonical_residue_functional s
  4. L25
    apply binary_canonical_residue_functional
  5. L26
    exact hr_witness_right
  6. L27
    exact hs_witness_right

Library-wide reading audit

Original defined command ledger · 27 lines
  1. 0001intro a
  2. 0002intro e
  3. 0003intro m
  4. 0004intro r
  5. 0005intro s
  6. 0006intro hr
  7. 0007intro hs
  8. 0008cases hr
  9. 0009cases hr_witness
  10. 0010cases hs
  11. 0011cases hs_witness
  12. 0012have hpower : x = x1
  13. 0013specialize pow_functional a
  14. 0014specialize pow_functional e
  15. 0015specialize pow_functional x
  16. 0016specialize pow_functional x1
  17. 0017apply pow_functional
  18. 0018exact hr_witness_left
  19. 0019exact hs_witness_left
  20. 0020rewrite <- hpower at hs_witness_right
  21. 0021specialize binary_canonical_residue_functional m
  22. 0022specialize binary_canonical_residue_functional x
  23. 0023specialize binary_canonical_residue_functional r
  24. 0024specialize binary_canonical_residue_functional s
  25. 0025apply binary_canonical_residue_functional
  26. 0026exact hr_witness_right
  27. 0027exact hs_witness_right