FP0008

prime_field_add_exists

Construct the unique canonical add output for every pair of residues.

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.

This checkpoint constructs prime-order fields (k=1), with genuine finite arithmetic tables, cardinality, and characteristic. Inversion is proved only for nonzero elements; the table's zero entry is a zero-to-zero convention. G091 for every prime power p^k, with an irreducible polynomial of degree k, remains open. No extension-field construction or G091 closure is claimed.

Exact theorem in conservative defined notation

∀ p. ∀ a. ∀ b. Prime(p)Lt(a,p)Lt(b,p) → ∃ x. FpAdd(p,a,b,x)

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall p a b. (~((p) = 1) /\ forall pfa_factor_left_adddomain pfa_factor_right_adddomain. (p) = pfa_factor_left_adddomain * pfa_factor_right_adddomain -> pfa_factor_left_adddomain = 1 \/ pfa_factor_right_adddomain = 1) -> (exists pfa_gap_addleft. pfa_gap_addleft + S (a) = (p)) -> (exists pfa_gap_addright. pfa_gap_addright + S (b) = (p)) -> exists c. (((exists pfa_gap_addexistsleft. pfa_gap_addexistsleft + S (a) = (p)) /\ (((exists pfa_gap_addexistsright. pfa_gap_addexistsright + S (b) = (p)) /\ ((((exists pfa_gap_addexistsresultbound. pfa_gap_addexistsresultbound + S (c) = (p)) /\ ((exists pfa_offset_left_addexistsresultcongruence pfa_offset_right_addexistsresultcongruence. ((a) + (b)) + (p) * pfa_offset_left_addexistsresultcongruence = (c) + (p) * pfa_offset_right_addexistsresultcongruence)))))))))

Complete tactic proof in conservative notation

All 22 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

22 script commands · 8 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–6

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

  1. L1
    intro p
  2. L2
    intro a
  3. L3
    intro b
  4. L4
    intro hp
  5. L5
    intro ha
  6. L6
    intro hb
02Establish hrL7–15

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

  1. L7
    have hr : ∃ c. CanonicalModularResidue(p,a + b,c)Definitions: CanonicalModularResidue(p,a + b,c)Original native command in the exact edition
  2. L8
    specialize hensel_canonical_residue_exists (p)
  3. L9
    specialize hensel_canonical_residue_exists (a + b)
  4. L10
    apply hensel_canonical_residue_exists
  5. L11
    intro hz
  6. L12
    specialize prime_nonzero (p)
  7. L13
    apply prime_nonzero
  8. L14
    exact hp
  9. L15
    exact hz
03Separate the logical casesL16–16

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

  1. L16
    cases hr
04Construct an explicit witnessL17–17

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

  1. L17
    exists x
05Separate the logical casesL18–18

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

  1. L18
    split
06Use earlier factsL19–19

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

  1. L19
    exact ha
07Separate the logical casesL20–20

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

  1. L20
    split
08Use earlier factsL21–22

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

  1. L21
    exact hb
  2. L22
    exact hr_witness

Library-wide reading audit

Original defined command ledger · 22 lines
  1. 0001intro p
  2. 0002intro a
  3. 0003intro b
  4. 0004intro hp
  5. 0005intro ha
  6. 0006intro hb
  7. 0007have hr : ∃ c. CanonicalModularResidue(p,a + b,c)
  8. 0008specialize hensel_canonical_residue_exists (p)
  9. 0009specialize hensel_canonical_residue_exists (a + b)
  10. 0010apply hensel_canonical_residue_exists
  11. 0011intro hz
  12. 0012specialize prime_nonzero (p)
  13. 0013apply prime_nonzero
  14. 0014exact hp
  15. 0015exact hz
  16. 0016cases hr
  17. 0017exists x
  18. 0018split
  19. 0019exact ha
  20. 0020split
  21. 0021exact hb
  22. 0022exact hr_witness