FP0024

prime_field_nonzero_coprime

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

Every nonzero canonical element is genuinely coprime to its prime modulus.

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 a. (~((p) = 1) /\ forall pfa_factor_left_coprime_domain pfa_factor_right_coprime_domain. (p) = pfa_factor_left_coprime_domain * pfa_factor_right_coprime_domain -> pfa_factor_left_coprime_domain = 1 \/ pfa_factor_right_coprime_domain = 1) -> (exists pfa_gap_coprime_bound. pfa_gap_coprime_bound + S (a) = (p)) -> ~(a = 0) -> (forall pfa_divisor_coprime_result. (exists pfa_left_factor_coprime_result. (a) = pfa_divisor_coprime_result * pfa_left_factor_coprime_result) -> (exists pfa_right_factor_coprime_result. (p) = pfa_divisor_coprime_result * pfa_right_factor_coprime_result) -> pfa_divisor_coprime_result = 1)

Constructive proof overview

Generated structural guide

Every nonzero canonical element is genuinely coprime to its prime modulus.

The unchanged tactic script uses 2 declared prerequisites and contains 22 exact native proof lines.

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

Proof neighborhood

Direct dependencies

FP001E prime_field_inverse_exists mod_inverse_implies_coprime Stable theorem; checked-use authorized

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

22 script commands · 4 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.

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–5

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

  1. L1
    intro p
  2. L2
    intro a
  3. L3
    intro hp
  4. L4
    intro ha
  5. L5
    intro hn
02Establish hiL6–12

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

  1. L6
    have hi : ∃ b. FpInv(p,a,b)Definitions: FpInv
  2. L7
    specialize prime_field_inverse_exists (p)
  3. L8
    specialize prime_field_inverse_exists (a)
  4. L9
    apply prime_field_inverse_exists
  5. L10
    exact hp
  6. L11
    exact ha
  7. L12
    exact hn
03Separate the logical casesL13–17

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

  1. L13
    cases hi
  2. L14
    cases hi_witness
  3. L15
    cases hi_witness_right
  4. L16
    cases hi_witness_right_right
  5. L17
    cases hi_witness_right_right_right
04Use earlier factsL18–22

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

  1. L18
    specialize mod_inverse_implies_coprime (a)
  2. L19
    specialize mod_inverse_implies_coprime (p)
  3. L20
    specialize mod_inverse_implies_coprime (x)
  4. L21
    apply mod_inverse_implies_coprime
  5. L22
    exact hi_witness_right_right_right_right

Library-wide reading audit

Original exact command ledger · 22 lines
  1. 0001intro p
  2. 0002intro a
  3. 0003intro hp
  4. 0004intro ha
  5. 0005intro hn
  6. 0006have hi : exists b. (((~((a) = 0)) /\ ((((exists pfa_gap_coprime_inversemultiplicationleft. pfa_gap_coprime_inversemultiplicationleft + S (a) = (p)) /\ (((exists pfa_gap_coprime_inversemultiplicationright. pfa_gap_coprime_inversemultiplicationright + S (b) = (p)) /\ ((((exists pfa_gap_coprime_inversemultiplicationresultbound. pfa_gap_coprime_inversemultiplicationresultbound + S (1) = (p)) /\ ((exists pfa_offset_left_coprime_inversemultiplicationresultcongruence pfa_offset_right_coprime_inversemultiplicationresultcongruence. ((a) * (b)) + (p) * pfa_offset_left_coprime_inversemultiplicationresultcongruence = (1) + (p) * pfa_offset_right_coprime_inversemultiplicationresultcongruence))))))))))))
  7. 0007specialize prime_field_inverse_exists (p)
  8. 0008specialize prime_field_inverse_exists (a)
  9. 0009apply prime_field_inverse_exists
  10. 0010exact hp
  11. 0011exact ha
  12. 0012exact hn
  13. 0013cases hi
  14. 0014cases hi_witness
  15. 0015cases hi_witness_right
  16. 0016cases hi_witness_right_right
  17. 0017cases hi_witness_right_right_right
  18. 0018specialize mod_inverse_implies_coprime (a)
  19. 0019specialize mod_inverse_implies_coprime (p)
  20. 0020specialize mod_inverse_implies_coprime (x)
  21. 0021apply mod_inverse_implies_coprime
  22. 0022exact hi_witness_right_right_right_right