PP0012

prime_field_polynomial_add_commutative

Coefficient addition commutes for actual finite tables, including the empty table.

Alpha v34 checked-use · first admitted v31 · 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.

Length is representation length, not polynomial degree. Leading zeros and the empty zero polynomial are allowed; the canonical argument guard x<p also applies to the empty case. Evaluation is defined by actual field-operation steps, not an assumed residue invariant. Polynomial division, gcd, irreducibles and general prime-power extension fields remain open; this does not close G091.

Exact theorem in conservative defined notation

∀ p. ∀ ab. ∀ ac. ∀ bb. ∀ bc. ∀ cb. ∀ cc. ∀ l. FpPolyAdd(p,ab,ac,bb,bc,cb,cc,l)FpPolyAdd(p,bb,bc,ab,ac,cb,cc,l)

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall p ab ac bb bc cb cc l. (forall pfp_index_add_comm_old. (exists pfa_gap_add_comm_oldindex. pfa_gap_add_comm_oldindex + S (pfp_index_add_comm_old) = (l)) -> exists pfp_left_add_comm_old pfp_right_add_comm_old pfp_value_add_comm_old. ((((exists ff_h_pfp_add_comm_oldleft. ff_h_pfp_add_comm_oldleft + S (pfp_left_add_comm_old) = S ((S (pfp_index_add_comm_old)) * ac)) /\ exists ff_q_pfp_add_comm_oldleft. ab = ff_q_pfp_add_comm_oldleft * S ((S (pfp_index_add_comm_old)) * ac) + (pfp_left_add_comm_old))) /\ (((((exists ff_h_pfp_add_comm_oldright. ff_h_pfp_add_comm_oldright + S (pfp_right_add_comm_old) = S ((S (pfp_index_add_comm_old)) * bc)) /\ exists ff_q_pfp_add_comm_oldright. bb = ff_q_pfp_add_comm_oldright * S ((S (pfp_index_add_comm_old)) * bc) + (pfp_right_add_comm_old))) /\ (((((exists ff_h_pfp_add_comm_oldtarget. ff_h_pfp_add_comm_oldtarget + S (pfp_value_add_comm_old) = S ((S (pfp_index_add_comm_old)) * cc)) /\ exists ff_q_pfp_add_comm_oldtarget. cb = ff_q_pfp_add_comm_oldtarget * S ((S (pfp_index_add_comm_old)) * cc) + (pfp_value_add_comm_old))) /\ ((((exists pfa_gap_add_comm_oldoperationleft. pfa_gap_add_comm_oldoperationleft + S (pfp_left_add_comm_old) = (p)) /\ (((exists pfa_gap_add_comm_oldoperationright. pfa_gap_add_comm_oldoperationright + S (pfp_right_add_comm_old) = (p)) /\ ((((exists pfa_gap_add_comm_oldoperationresultbound. pfa_gap_add_comm_oldoperationresultbound + S (pfp_value_add_comm_old) = (p)) /\ ((exists pfa_offset_left_add_comm_oldoperationresultcongruence pfa_offset_right_add_comm_oldoperationresultcongruence. ((pfp_left_add_comm_old) + (pfp_right_add_comm_old)) + (p) * pfa_offset_left_add_comm_oldoperationresultcongruence = (pfp_value_add_comm_old) + (p) * pfa_offset_right_add_comm_oldoperationresultcongruence)))))))))))))))) -> (forall pfp_index_add_comm_new. (exists pfa_gap_add_comm_newindex. pfa_gap_add_comm_newindex + S (pfp_index_add_comm_new) = (l)) -> exists pfp_left_add_comm_new pfp_right_add_comm_new pfp_value_add_comm_new. ((((exists ff_h_pfp_add_comm_newleft. ff_h_pfp_add_comm_newleft + S (pfp_left_add_comm_new) = S ((S (pfp_index_add_comm_new)) * bc)) /\ exists ff_q_pfp_add_comm_newleft. bb = ff_q_pfp_add_comm_newleft * S ((S (pfp_index_add_comm_new)) * bc) + (pfp_left_add_comm_new))) /\ (((((exists ff_h_pfp_add_comm_newright. ff_h_pfp_add_comm_newright + S (pfp_right_add_comm_new) = S ((S (pfp_index_add_comm_new)) * ac)) /\ exists ff_q_pfp_add_comm_newright. ab = ff_q_pfp_add_comm_newright * S ((S (pfp_index_add_comm_new)) * ac) + (pfp_right_add_comm_new))) /\ (((((exists ff_h_pfp_add_comm_newtarget. ff_h_pfp_add_comm_newtarget + S (pfp_value_add_comm_new) = S ((S (pfp_index_add_comm_new)) * cc)) /\ exists ff_q_pfp_add_comm_newtarget. cb = ff_q_pfp_add_comm_newtarget * S ((S (pfp_index_add_comm_new)) * cc) + (pfp_value_add_comm_new))) /\ ((((exists pfa_gap_add_comm_newoperationleft. pfa_gap_add_comm_newoperationleft + S (pfp_left_add_comm_new) = (p)) /\ (((exists pfa_gap_add_comm_newoperationright. pfa_gap_add_comm_newoperationright + S (pfp_right_add_comm_new) = (p)) /\ ((((exists pfa_gap_add_comm_newoperationresultbound. pfa_gap_add_comm_newoperationresultbound + S (pfp_value_add_comm_new) = (p)) /\ ((exists pfa_offset_left_add_comm_newoperationresultcongruence pfa_offset_right_add_comm_newoperationresultcongruence. ((pfp_left_add_comm_new) + (pfp_right_add_comm_new)) + (p) * pfa_offset_left_add_comm_newoperationresultcongruence = (pfp_value_add_comm_new) + (p) * pfa_offset_right_add_comm_newoperationresultcongruence))))))))))))))))

Complete tactic proof in conservative notation

All 36 original proof lines are preserved. Only local proposition formulas are abbreviated; every abbreviation has an exact binder-safe expansion check. The linked exact edition contains the unchanged replay script.

Read the argument

Proof checkpoints

36 script commands · 11 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.

01Fix variables and assumptionsL1–10

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

  1. L1
    intro p
  2. L2
    intro ab
  3. L3
    intro ac
  4. L4
    intro bb
  5. L5
    intro bc
  6. L6
    intro cb
  7. L7
    intro cc
  8. L8
    intro l
  9. L9
    intro h
  10. L10
    intro i
02Fix variables and assumptionsL11–11

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

  1. L11
    intro hi
03Establish hvL12–15

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

  1. L12
    have hv : ∃ a. ∃ b. ∃ r. BetaAt(ab,ac,i,a) ∧ (BetaAt(bb,bc,i,b) ∧ (BetaAt(cb,cc,i,r) ∧ FpAdd(p,a,b,r)))Definitions: BetaAt(ab,ac,i,a)BetaAt(bb,bc,i,b)BetaAt(cb,cc,i,r)FpAdd(p,a,b,r)Original native command in the exact edition
  2. L13
    specialize h (i)
  3. L14
    apply h
  4. L15
    exact hi
04Separate the logical casesL16–21

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

  1. L16
    cases hv
  2. L17
    cases hv_witness
  3. L18
    cases hv_witness_witness
  4. L19
    cases hv_witness_witness_witness
  5. L20
    cases hv_witness_witness_witness_right
  6. L21
    cases hv_witness_witness_witness_right_right
05Construct an explicit witnessL22–24

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

  1. L22
    exists x1
  2. L23
    exists x
  3. L24
    exists x2
06Separate the logical casesL25–25

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

  1. L25
    split
07Use earlier factsL26–26

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

  1. L26
    exact hv_witness_witness_witness_right_left
08Separate the logical casesL27–27

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

  1. L27
    split
09Use earlier factsL28–28

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

  1. L28
    exact hv_witness_witness_witness_left
10Separate the logical casesL29–29

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

  1. L29
    split
11Use earlier factsL30–36

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

  1. L30
    exact hv_witness_witness_witness_right_right_left
  2. L31
    specialize prime_field_add_commutative (p)
  3. L32
    specialize prime_field_add_commutative (x)
  4. L33
    specialize prime_field_add_commutative (x1)
  5. L34
    specialize prime_field_add_commutative (x2)
  6. L35
    apply prime_field_add_commutative
  7. L36
    exact hv_witness_witness_witness_right_right_right

Library-wide reading audit

Original defined command ledger · 36 lines
  1. 0001intro p
  2. 0002intro ab
  3. 0003intro ac
  4. 0004intro bb
  5. 0005intro bc
  6. 0006intro cb
  7. 0007intro cc
  8. 0008intro l
  9. 0009intro h
  10. 0010intro i
  11. 0011intro hi
  12. 0012have hv : ∃ a. ∃ b. ∃ r. BetaAt(ab,ac,i,a) ∧ (BetaAt(bb,bc,i,b) ∧ (BetaAt(cb,cc,i,r)FpAdd(p,a,b,r)))
  13. 0013specialize h (i)
  14. 0014apply h
  15. 0015exact hi
  16. 0016cases hv
  17. 0017cases hv_witness
  18. 0018cases hv_witness_witness
  19. 0019cases hv_witness_witness_witness
  20. 0020cases hv_witness_witness_witness_right
  21. 0021cases hv_witness_witness_witness_right_right
  22. 0022exists x1
  23. 0023exists x
  24. 0024exists x2
  25. 0025split
  26. 0026exact hv_witness_witness_witness_right_left
  27. 0027split
  28. 0028exact hv_witness_witness_witness_left
  29. 0029split
  30. 0030exact hv_witness_witness_witness_right_right_left
  31. 0031specialize prime_field_add_commutative (p)
  32. 0032specialize prime_field_add_commutative (x)
  33. 0033specialize prime_field_add_commutative (x1)
  34. 0034specialize prime_field_add_commutative (x2)
  35. 0035apply prime_field_add_commutative
  36. 0036exact hv_witness_witness_witness_right_right_right