BX000C

binary_modular_step_exists

Every guarded square-and-optional-multiply binary transition has a canonical result.

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

∀ m. ∀ x. ∀ a. ∀ b. BinaryModulus(m) → b = 0 ∨ b = 1 → ∃ y. BinaryModularStep(m,x,a,b,y)

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall m x a b. (exists ff_modulus_gap_binary_guard. ff_modulus_gap_binary_guard + S 1 = m) -> (b = 0 \/ b = 1) -> exists r. ((((b = 0) /\ (((exists ff_gap_binary_step_square. ff_gap_binary_step_square + S (r) = m) /\ (exists ff_left_binary_step_square_congruence ff_right_binary_step_square_congruence. (x * x) + m * ff_left_binary_step_square_congruence = (r) + m * ff_right_binary_step_square_congruence)))) \/ ((b = 1) /\ (((exists ff_gap_binary_step_multiply. ff_gap_binary_step_multiply + S (r) = m) /\ (exists ff_left_binary_step_multiply_congruence ff_right_binary_step_multiply_congruence. ((x * x) * a) + m * ff_left_binary_step_multiply_congruence = (r) + m * ff_right_binary_step_multiply_congruence))))))

Complete unchanged native tactic proof

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

Read the argument

Proof checkpoints

29 script commands · 12 reading checkpoints · 2 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–6

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

  1. L1
    intro m
  2. L2
    intro x
  3. L3
    intro a
  4. L4
    intro b
  5. L5
    intro hmodulus
  6. L6
    intro hbit
02Separate the logical casesL7–7

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

  1. L7
    cases hbit
03Establish hsquareL8–12

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply binary canonical residue exists.

  1. L8
    have hsquare : exists r. (((exists ff_gap_binary_step_square_witness. ff_gap_binary_step_square_witness + S (r) = m) /\ (exists ff_left_binary_step_square_witness_congruence ff_right_binary_step_square_witness_congruence. (x * x) + m * ff_left_binary_step_square_witness_congruence = (r) + m * ff_right_binary_step_square_witness_congruence)))
  2. L9
    specialize binary_canonical_residue_exists m
  3. L10
    specialize binary_canonical_residue_exists (x * x)
  4. L11
    apply binary_canonical_residue_exists
  5. L12
    exact hmodulus
04Separate the logical casesL13–13

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

  1. L13
    cases hsquare
05Construct an explicit witnessL14–14

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

  1. L14
    exists x1
06Separate the logical casesL15–16

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

  1. L15
    left
  2. L16
    split
07Use earlier factsL17–18

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

  1. L17
    exact hbit_left
  2. L18
    exact hsquare_witness
08Establish hproductL19–23

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply binary canonical residue exists.

  1. L19
    have hproduct : exists r. (((exists ff_gap_binary_step_product_witness. ff_gap_binary_step_product_witness + S (r) = m) /\ (exists ff_left_binary_step_product_witness_congruence ff_right_binary_step_product_witness_congruence. ((x * x) * a) + m * ff_left_binary_step_product_witness_congruence = (r) + m * ff_right_binary_step_product_witness_congruence)))
  2. L20
    specialize binary_canonical_residue_exists m
  3. L21
    specialize binary_canonical_residue_exists ((x * x) * a)
  4. L22
    apply binary_canonical_residue_exists
  5. L23
    exact hmodulus
09Separate the logical casesL24–24

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

  1. L24
    cases hproduct
10Construct an explicit witnessL25–25

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

  1. L25
    exists x1
11Separate the logical casesL26–27

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

  1. L26
    right
  2. L27
    split
12Use earlier factsL28–29

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

  1. L28
    exact hbit_right
  2. L29
    exact hproduct_witness

Library-wide reading audit

Original defined command ledger · 29 lines
  1. 0001intro m
  2. 0002intro x
  3. 0003intro a
  4. 0004intro b
  5. 0005intro hmodulus
  6. 0006intro hbit
  7. 0007cases hbit
  8. 0008have hsquare : exists r. (((exists ff_gap_binary_step_square_witness. ff_gap_binary_step_square_witness + S (r) = m) /\ (exists ff_left_binary_step_square_witness_congruence ff_right_binary_step_square_witness_congruence. (x * x) + m * ff_left_binary_step_square_witness_congruence = (r) + m * ff_right_binary_step_square_witness_congruence)))
  9. 0009specialize binary_canonical_residue_exists m
  10. 0010specialize binary_canonical_residue_exists (x * x)
  11. 0011apply binary_canonical_residue_exists
  12. 0012exact hmodulus
  13. 0013cases hsquare
  14. 0014exists x1
  15. 0015left
  16. 0016split
  17. 0017exact hbit_left
  18. 0018exact hsquare_witness
  19. 0019have hproduct : exists r. (((exists ff_gap_binary_step_product_witness. ff_gap_binary_step_product_witness + S (r) = m) /\ (exists ff_left_binary_step_product_witness_congruence ff_right_binary_step_product_witness_congruence. ((x * x) * a) + m * ff_left_binary_step_product_witness_congruence = (r) + m * ff_right_binary_step_product_witness_congruence)))
  20. 0020specialize binary_canonical_residue_exists m
  21. 0021specialize binary_canonical_residue_exists ((x * x) * a)
  22. 0022apply binary_canonical_residue_exists
  23. 0023exact hmodulus
  24. 0024cases hproduct
  25. 0025exists x1
  26. 0026right
  27. 0027split
  28. 0028exact hbit_right
  29. 0029exact hproduct_witness