FP002B

prime_field_add_grid_value_exists

Public research checkpoint, not admitted to Alpha or Stable. Alpha v30 remains 3222 checked-use theorems; Stable remains 432. The on-demand Alpha Lean service does not yet expose these checkpoint theorems; their independently checked literal bundles and unchanged sources are available below.

Public research checkpoint: original HA and independently compiled Lean verified; not Alpha-enrolled, no Alpha checked-use authority; not Stable

Construct the actual bounded add value at every one of the p*p row-major indices.

Exact expanded first-order arithmetic statement

forall p i. (~((p) = 1) /\ forall pfa_factor_left_addgrid_domain pfa_factor_right_addgrid_domain. (p) = pfa_factor_left_addgrid_domain * pfa_factor_right_addgrid_domain -> pfa_factor_left_addgrid_domain = 1 \/ pfa_factor_right_addgrid_domain = 1) -> (exists pfa_gap_addgrid_bound. pfa_gap_addgrid_bound + S (i) = (p*p)) -> exists v. (exists pft_row_addgrid_result pft_column_addgrid_result. (((i) = pft_row_addgrid_result * (p) + pft_column_addgrid_result) /\ ((((exists pfa_gap_addgrid_resultoperationleft. pfa_gap_addgrid_resultoperationleft + S (pft_row_addgrid_result) = (p)) /\ (((exists pfa_gap_addgrid_resultoperationright. pfa_gap_addgrid_resultoperationright + S (pft_column_addgrid_result) = (p)) /\ ((((exists pfa_gap_addgrid_resultoperationresultbound. pfa_gap_addgrid_resultoperationresultbound + S (v) = (p)) /\ ((exists pfa_offset_left_addgrid_resultoperationresultcongruence pfa_offset_right_addgrid_resultoperationresultcongruence. ((pft_row_addgrid_result) + (pft_column_addgrid_result)) + (p) * pfa_offset_left_addgrid_resultoperationresultcongruence = (v) + (p) * pfa_offset_right_addgrid_resultoperationresultcongruence))))))))))))

Constructive proof overview

Generated structural guide

Construct the actual bounded add value at every one of the p*p row-major indices.

The unchanged tactic script uses 5 declared prerequisites and contains 42 exact native proof lines.

Public research checkpoint: original HA and independently compiled Lean verified; not Alpha-enrolled, no Alpha checked-use authority; not Stable

Proof neighborhood

Direct dependencies

Direct dependents

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. The literal dependency-closed bundle is checked by original HA and the independently compiled Lean verifier. Public delivery grants no Alpha checked-use authority or Stable membership.

Read the argument

Proof checkpoints

42 script commands · 11 reading checkpoints · 3 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.

Named ingredients (1)
01Fix variables and assumptionsL1–4

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

  1. L1
    intro p
  2. L2
    intro i
  3. L3
    intro hp
  4. L4
    intro hi
02Establish hdL5–13

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

  1. L5
    have hd : exists a b. i = p * a + b /\ (exists pfa_gap_addgrid_division. pfa_gap_addgrid_division + S (b) = (p))
  2. L6
    specialize division_remainder_exists (p)
  3. L7
    specialize division_remainder_exists (i)
  4. L8
    apply division_remainder_exists
  5. L9
    intro hz
  6. L10
    specialize prime_nonzero (p)
  7. L11
    apply prime_nonzero
  8. L12
    exact hp
  9. L13
    exact hz
03Separate the logical casesL14–16

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

  1. L14
    cases hd
  2. L15
    cases hd_witness
  3. L16
    cases hd_witness_witness
04Establish hxL17–24

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply matrix recursive quotient row bound.

  1. L17
    have hx : exists pfa_gap_addgrid_row. pfa_gap_addgrid_row + S (x) = (p)
  2. L18
    specialize matrix_recursive_quotient_row_bound (p)
  3. L19
    specialize matrix_recursive_quotient_row_bound (i)
  4. L20
    specialize matrix_recursive_quotient_row_bound (x)
  5. L21
    specialize matrix_recursive_quotient_row_bound (x1)
  6. L22
    apply matrix_recursive_quotient_row_bound
  7. L23
    exact hd_witness_witness_left
  8. L24
    exact hi
05Establish hvL25–32

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime field add exists.

  1. L25
    have hv : exists v. (((exists pfa_gap_addgrid_operationleft. pfa_gap_addgrid_operationleft + S (x) = (p)) /\ (((exists pfa_gap_addgrid_operationright. pfa_gap_addgrid_operationright + S (x1) = (p)) /\ ((((exists pfa_gap_addgrid_operationresultbound. pfa_gap_addgrid_operationresultbound + S (v) = (p)) /\ ((exists pfa_offset_left_addgrid_operationresultcongruence pfa_offset_right_addgrid_operationresultcongruence. ((x) + (x1)) + (p) * pfa_offset_left_addgrid_operationresultcongruence = (v) + (p) * pfa_offset_right_addgrid_operationresultcongruence)))))))))
  2. L26
    specialize prime_field_add_exists (p)
  3. L27
    specialize prime_field_add_exists (x)
  4. L28
    specialize prime_field_add_exists (x1)
  5. L29
    apply prime_field_add_exists
  6. L30
    exact hp
  7. L31
    exact hx
  8. L32
    exact hd_witness_witness_right
06Separate the logical casesL33–33

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

  1. L33
    cases hv
07Construct an explicit witnessL34–36

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

  1. L34
    exists x2
  2. L35
    exists x
  3. L36
    exists x1
08Separate the logical casesL37–37

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

  1. L37
    split
09Use earlier factsL38–39

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

  1. L38
    specialize mul_comm p
  2. L39
    specialize mul_comm x
10Calculate and transport equalitiesL40–40

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

  1. L40
    rewrite mul_comm at hd_witness_witness_left
11Use earlier factsL41–42

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

  1. L41
    exact hd_witness_witness_left
  2. L42
    exact hv_witness

Library-wide reading audit

Original exact command ledger · 42 lines
  1. 0001intro p
  2. 0002intro i
  3. 0003intro hp
  4. 0004intro hi
  5. 0005have hd : exists a b. i = p * a + b /\ (exists pfa_gap_addgrid_division. pfa_gap_addgrid_division + S (b) = (p))
  6. 0006specialize division_remainder_exists (p)
  7. 0007specialize division_remainder_exists (i)
  8. 0008apply division_remainder_exists
  9. 0009intro hz
  10. 0010specialize prime_nonzero (p)
  11. 0011apply prime_nonzero
  12. 0012exact hp
  13. 0013exact hz
  14. 0014cases hd
  15. 0015cases hd_witness
  16. 0016cases hd_witness_witness
  17. 0017have hx : exists pfa_gap_addgrid_row. pfa_gap_addgrid_row + S (x) = (p)
  18. 0018specialize matrix_recursive_quotient_row_bound (p)
  19. 0019specialize matrix_recursive_quotient_row_bound (i)
  20. 0020specialize matrix_recursive_quotient_row_bound (x)
  21. 0021specialize matrix_recursive_quotient_row_bound (x1)
  22. 0022apply matrix_recursive_quotient_row_bound
  23. 0023exact hd_witness_witness_left
  24. 0024exact hi
  25. 0025have hv : exists v. (((exists pfa_gap_addgrid_operationleft. pfa_gap_addgrid_operationleft + S (x) = (p)) /\ (((exists pfa_gap_addgrid_operationright. pfa_gap_addgrid_operationright + S (x1) = (p)) /\ ((((exists pfa_gap_addgrid_operationresultbound. pfa_gap_addgrid_operationresultbound + S (v) = (p)) /\ ((exists pfa_offset_left_addgrid_operationresultcongruence pfa_offset_right_addgrid_operationresultcongruence. ((x) + (x1)) + (p) * pfa_offset_left_addgrid_operationresultcongruence = (v) + (p) * pfa_offset_right_addgrid_operationresultcongruence)))))))))
  26. 0026specialize prime_field_add_exists (p)
  27. 0027specialize prime_field_add_exists (x)
  28. 0028specialize prime_field_add_exists (x1)
  29. 0029apply prime_field_add_exists
  30. 0030exact hp
  31. 0031exact hx
  32. 0032exact hd_witness_witness_right
  33. 0033cases hv
  34. 0034exists x2
  35. 0035exists x
  36. 0036exists x1
  37. 0037split
  38. 0038specialize mul_comm p
  39. 0039specialize mul_comm x
  40. 0040rewrite mul_comm at hd_witness_witness_left
  41. 0041exact hd_witness_witness_left
  42. 0042exact hv_witness