FP0039

prime_field_add_table_lookup

Alpha v34 independently verified · alpha_closed; checked-use authorized; not Stable

Every decoded add table lookup has exactly the proved canonical arithmetic meaning.

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 expanded first-order arithmetic statement

forall p B C a b v. (forall pft_index_addlookup_table. (exists pfa_gap_addlookup_tableprefix. pfa_gap_addlookup_tableprefix + S (pft_index_addlookup_table) = ((p) * (p))) -> exists pft_value_addlookup_table. (((((exists ff_h_pft_addlookup_tablepointentry. ff_h_pft_addlookup_tablepointentry + S (pft_value_addlookup_table) = S ((S (pft_index_addlookup_table)) * C)) /\ exists ff_q_pft_addlookup_tablepointentry. B = ff_q_pft_addlookup_tablepointentry * S ((S (pft_index_addlookup_table)) * C) + (pft_value_addlookup_table))) /\ ((exists pft_row_addlookup_tablepointvalue pft_column_addlookup_tablepointvalue. (((pft_index_addlookup_table) = pft_row_addlookup_tablepointvalue * (p) + pft_column_addlookup_tablepointvalue) /\ ((((exists pfa_gap_addlookup_tablepointvalueoperationleft. pfa_gap_addlookup_tablepointvalueoperationleft + S (pft_row_addlookup_tablepointvalue) = (p)) /\ (((exists pfa_gap_addlookup_tablepointvalueoperationright. pfa_gap_addlookup_tablepointvalueoperationright + S (pft_column_addlookup_tablepointvalue) = (p)) /\ ((((exists pfa_gap_addlookup_tablepointvalueoperationresultbound. pfa_gap_addlookup_tablepointvalueoperationresultbound + S (pft_value_addlookup_table) = (p)) /\ ((exists pfa_offset_left_addlookup_tablepointvalueoperationresultcongruence pfa_offset_right_addlookup_tablepointvalueoperationresultcongruence. ((pft_row_addlookup_tablepointvalue) + (pft_column_addlookup_tablepointvalue)) + (p) * pfa_offset_left_addlookup_tablepointvalueoperationresultcongruence = (pft_value_addlookup_table) + (p) * pfa_offset_right_addlookup_tablepointvalueoperationresultcongruence)))))))))))))))) -> (exists pfa_gap_addlookup_a. pfa_gap_addlookup_a + S (a) = (p)) -> (exists pfa_gap_addlookup_b. pfa_gap_addlookup_b + S (b) = (p)) -> (((exists ff_h_pft_addlookup_at. ff_h_pft_addlookup_at + S (v) = S ((S (a*p+b)) * C)) /\ exists ff_q_pft_addlookup_at. B = ff_q_pft_addlookup_at * S ((S (a*p+b)) * C) + (v))) -> (((exists pfa_gap_addlookup_graphleft. pfa_gap_addlookup_graphleft + S (a) = (p)) /\ (((exists pfa_gap_addlookup_graphright. pfa_gap_addlookup_graphright + S (b) = (p)) /\ ((((exists pfa_gap_addlookup_graphresultbound. pfa_gap_addlookup_graphresultbound + S (v) = (p)) /\ ((exists pfa_offset_left_addlookup_graphresultcongruence pfa_offset_right_addlookup_graphresultcongruence. ((a) + (b)) + (p) * pfa_offset_left_addlookup_graphresultcongruence = (v) + (p) * pfa_offset_right_addlookup_graphresultcongruence)))))))))

Constructive proof overview

Generated structural guide

Every decoded add table lookup has exactly the proved canonical arithmetic meaning.

The unchanged tactic script uses 3 declared prerequisites and contains 39 exact native proof lines.

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

Proof neighborhood

Direct dependencies

matrix_recursive_flattened_index_bound Alpha theorem; checked-use authorized beta_at_unique Stable theorem; checked-use authorized FP0038 prime_field_add_grid_value_lookup

Direct dependents

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. This exact body belongs to a complete independently kernel-checked constructive proof bundle and has Alpha checked-use authority; it does not imply Stable membership.

Read the argument

Proof checkpoints

39 script commands · 6 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.

Named ingredients (1)

Long local formulas use this family’s existing definitions. Each new abbreviation was expanded back to the identical native formula, including its free-variable context. The original edition is preserved below.

01Fix variables and assumptionsL1–10

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

  1. L1
    intro p
  2. L2
    intro B
  3. L3
    intro C
  4. L4
    intro a
  5. L5
    intro b
  6. L6
    intro v
  7. L7
    intro htable
  8. L8
    intro ha
  9. L9
    intro hb
  10. L10
    intro hat
02Establish hpointL11–19

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

  1. L11
    have hpoint : ∃ w. BetaAt(B,C,a · p + b,w) ∧ FpAddGridValue(p,a · p + b,w)Definitions: FpAddGridValueBetaAt
  2. L12
    specialize htable (a*p+b)
  3. L13
    apply htable
  4. L14
    specialize matrix_recursive_flattened_index_bound (p)
  5. L15
    specialize matrix_recursive_flattened_index_bound (a)
  6. L16
    specialize matrix_recursive_flattened_index_bound (b)
  7. L17
    apply matrix_recursive_flattened_index_bound
  8. L18
    exact ha
  9. L19
    exact hb
03Separate the logical casesL20–21

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

  1. L20
    cases hpoint
  2. L21
    cases hpoint_witness
04Establish heqL22–31

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

  1. L22
    have heq : x = v
  2. L23
    specialize beta_at_unique (B)
  3. L24
    specialize beta_at_unique (C)
  4. L25
    specialize beta_at_unique (a*p+b)
  5. L26
    specialize beta_at_unique (x)
  6. L27
    specialize beta_at_unique (v)
  7. L28
    apply beta_at_unique
  8. L29
    exact hpoint_witness_left
  9. L30
    exact hat
  10. L31
    rewrite heq at hpoint_witness_right
05Calculate and transport equalitiesL32–32

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

  1. L32
    rewrite heq at hpoint_witness_right
06Use earlier factsL33–39

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

  1. L33
    specialize prime_field_add_grid_value_lookup (p)
  2. L34
    specialize prime_field_add_grid_value_lookup (a)
  3. L35
    specialize prime_field_add_grid_value_lookup (b)
  4. L36
    specialize prime_field_add_grid_value_lookup (v)
  5. L37
    apply prime_field_add_grid_value_lookup
  6. L38
    exact hb
  7. L39
    exact hpoint_witness_right

Library-wide reading audit

Original exact command ledger · 39 lines
  1. 0001intro p
  2. 0002intro B
  3. 0003intro C
  4. 0004intro a
  5. 0005intro b
  6. 0006intro v
  7. 0007intro htable
  8. 0008intro ha
  9. 0009intro hb
  10. 0010intro hat
  11. 0011have hpoint : exists w. (((((exists ff_h_pft_addlookup_pointentry. ff_h_pft_addlookup_pointentry + S (w) = S ((S (a*p+b)) * C)) /\ exists ff_q_pft_addlookup_pointentry. B = ff_q_pft_addlookup_pointentry * S ((S (a*p+b)) * C) + (w))) /\ ((exists pft_row_addlookup_pointvalue pft_column_addlookup_pointvalue. (((a*p+b) = pft_row_addlookup_pointvalue * (p) + pft_column_addlookup_pointvalue) /\ ((((exists pfa_gap_addlookup_pointvalueoperationleft. pfa_gap_addlookup_pointvalueoperationleft + S (pft_row_addlookup_pointvalue) = (p)) /\ (((exists pfa_gap_addlookup_pointvalueoperationright. pfa_gap_addlookup_pointvalueoperationright + S (pft_column_addlookup_pointvalue) = (p)) /\ ((((exists pfa_gap_addlookup_pointvalueoperationresultbound. pfa_gap_addlookup_pointvalueoperationresultbound + S (w) = (p)) /\ ((exists pfa_offset_left_addlookup_pointvalueoperationresultcongruence pfa_offset_right_addlookup_pointvalueoperationresultcongruence. ((pft_row_addlookup_pointvalue) + (pft_column_addlookup_pointvalue)) + (p) * pfa_offset_left_addlookup_pointvalueoperationresultcongruence = (w) + (p) * pfa_offset_right_addlookup_pointvalueoperationresultcongruence)))))))))))))))
  12. 0012specialize htable (a*p+b)
  13. 0013apply htable
  14. 0014specialize matrix_recursive_flattened_index_bound (p)
  15. 0015specialize matrix_recursive_flattened_index_bound (a)
  16. 0016specialize matrix_recursive_flattened_index_bound (b)
  17. 0017apply matrix_recursive_flattened_index_bound
  18. 0018exact ha
  19. 0019exact hb
  20. 0020cases hpoint
  21. 0021cases hpoint_witness
  22. 0022have heq : x = v
  23. 0023specialize beta_at_unique (B)
  24. 0024specialize beta_at_unique (C)
  25. 0025specialize beta_at_unique (a*p+b)
  26. 0026specialize beta_at_unique (x)
  27. 0027specialize beta_at_unique (v)
  28. 0028apply beta_at_unique
  29. 0029exact hpoint_witness_left
  30. 0030exact hat
  31. 0031rewrite heq at hpoint_witness_right
  32. 0032rewrite heq at hpoint_witness_right
  33. 0033specialize prime_field_add_grid_value_lookup (p)
  34. 0034specialize prime_field_add_grid_value_lookup (a)
  35. 0035specialize prime_field_add_grid_value_lookup (b)
  36. 0036specialize prime_field_add_grid_value_lookup (v)
  37. 0037apply prime_field_add_grid_value_lookup
  38. 0038exact hb
  39. 0039exact hpoint_witness_right