PA00A4 · theorem

prime_inverse_index_exists

Alpha v34 checked-use theorem · independently closed; not Stable

Every nonzero prime residue index has a bounded inverse index.

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 original first-admission records.

Statement with defined notation

∀ p. ∀ n. ∀ i. p = S n → Prime(p)Lt(i,n) → ∃ x. InverseIndex(p,n,i,x)

Every purple notation token opens its conservative definition. This is a reading surface; the compiler expands the statement before the unchanged kernel checks it.

Definitions used by this theorem

In the theorem statement

3 occurrences

In local proof propositions

3 occurrences

Exact expanded native-PA statement
forall p n i. p = S n -> ((~(p = 1) /\ forall wip_prime_left_exists_prime wip_prime_right_exists_prime. p = wip_prime_left_exists_prime * wip_prime_right_exists_prime -> wip_prime_left_exists_prime = 1 \/ wip_prime_right_exists_prime = 1)) -> (exists wip_strict_gap_exists_index_bound. wip_strict_gap_exists_index_bound + S i = n) -> exists j. (((exists wip_strict_gap_exists_result_left_bound. wip_strict_gap_exists_result_left_bound + S i = n) /\ ((exists wip_strict_gap_exists_result_right_bound. wip_strict_gap_exists_result_right_bound + S j = n) /\ (exists wip_mod_left_exists_result_inverse wip_mod_right_exists_result_inverse. (S i) * S j + p * wip_mod_left_exists_result_inverse = 1 + p * wip_mod_right_exists_result_inverse))))

Proof neighborhood

Direct theorem prerequisites

Direct theorem dependents

Definition-aware tactic body

Only local propositions introduced by have or suffices are compacted. The untrusted compiler re-expands each one before the original tactic script is replayed; defined notation is never accepted by the kernel. Open the exact replay line beneath every changed command.

Read the argument

Proof checkpoints

44 script commands · 15 reading checkpoints · 5 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.

Named ingredients (5)
01Fix variables and assumptionsL1–6

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

  1. L1
    intro p
  2. L2
    intro n
  3. L3
    intro i
  4. L4
    intro hpn
  5. L5
    intro hp
  6. L6
    intro hi
02Establish hsi0L7–9

Establish this local claim before using it. It is not an additional assumption.

  1. L7
    have hsi0 : ~(S i = 0)
  2. L8
    specialize succ_ne_zero i
  3. L9
    exact succ_ne_zero
03Establish hsipL10–15

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

  1. L10
  2. L11
    rewrite hpn
  3. L12
    specialize succ_le_succ (S i)
  4. L13
    specialize succ_le_succ n
  5. L14
    apply succ_le_succ
  6. L15
    exact hi
04Establish hinvL16–22

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

  1. L16
    have hinv : BoundedNonzeroInverse(p,S i)Definitions: BoundedNonzeroInverse(p,S i)Original native command in the exact edition
  2. L17
    specialize prime_bounded_nonzero_mod_inverse p
  3. L18
    specialize prime_bounded_nonzero_mod_inverse (S i)
  4. L19
    apply prime_bounded_nonzero_mod_inverse
  5. L20
    exact hp
  6. L21
    exact hsi0
  7. L22
    exact hsip
05Separate the logical casesL23–25

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

  1. L23
    cases hinv
  2. L24
    cases hinv_witness
  3. L25
    cases hinv_witness_right
06Establish hpredL26–29

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

  1. L26
    have hpred : exists j. x = S j
  2. L27
    specialize nonzero_is_succ x
  3. L28
    apply nonzero_is_succ
  4. L29
    exact hinv_witness_left
07Separate the logical casesL30–30

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

  1. L30
    cases hpred
08Establish hjnL31–37

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

  1. L31
  2. L32
    specialize le_of_succ_le_succ (S x1)
  3. L33
    specialize le_of_succ_le_succ n
  4. L34
    apply le_of_succ_le_succ
  5. L35
    rewrite <- hpred_witness
  6. L36
    rewrite <- hpn
  7. L37
    exact hinv_witness_right_left
09Construct an explicit witnessL38–38

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

  1. L38
    exists x1
10Separate the logical casesL39–39

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

  1. L39
    split
11Use earlier factsL40–40

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

  1. L40
    exact hi
12Separate the logical casesL41–41

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

  1. L41
    split
13Use earlier factsL42–42

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

  1. L42
    exact hjn
14Calculate and transport equalitiesL43–43

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

  1. L43
    rewrite hpred_witness at hinv_witness_right_right
15Use earlier factsL44–44

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

  1. L44
    exact hinv_witness_right_right

Library-wide reading audit

Original defined command ledger · 44 lines
  1. 0001intro p
  2. 0002intro n
  3. 0003intro i
  4. 0004intro hpn
  5. 0005intro hp
  6. 0006intro hi
  7. 0007have hsi0 : ~(S i = 0)
  8. 0008specialize succ_ne_zero i
  9. 0009exact succ_ne_zero
  10. 0010have hsip : Lt(S i,p)
    Exact native replay linehave hsip : exists wip_successor_gap_exists_residue_bound. wip_successor_gap_exists_residue_bound + S (S i) = p
  11. 0011rewrite hpn
  12. 0012specialize succ_le_succ (S i)
  13. 0013specialize succ_le_succ n
  14. 0014apply succ_le_succ
  15. 0015exact hi
  16. 0016have hinv : BoundedNonzeroInverse(p,S i)
    Exact native replay linehave hinv : exists wip_inverse_exists_raw. (~(wip_inverse_exists_raw = 0) /\ ((exists wip_strict_gap_exists_raw_bound. wip_strict_gap_exists_raw_bound + S wip_inverse_exists_raw = p) /\ (exists wip_mod_left_exists_raw_congruence wip_mod_right_exists_raw_congruence. (S i) * wip_inverse_exists_raw + p * wip_mod_left_exists_raw_congruence = 1 + p * wip_mod_right_exists_raw_congruence)))
  17. 0017specialize prime_bounded_nonzero_mod_inverse p
  18. 0018specialize prime_bounded_nonzero_mod_inverse (S i)
  19. 0019apply prime_bounded_nonzero_mod_inverse
  20. 0020exact hp
  21. 0021exact hsi0
  22. 0022exact hsip
  23. 0023cases hinv
  24. 0024cases hinv_witness
  25. 0025cases hinv_witness_right
  26. 0026have hpred : exists j. x = S j
  27. 0027specialize nonzero_is_succ x
  28. 0028apply nonzero_is_succ
  29. 0029exact hinv_witness_left
  30. 0030cases hpred
  31. 0031have hjn : Lt(x1,n)
    Exact native replay linehave hjn : exists wip_strict_gap_exists_output_bound. wip_strict_gap_exists_output_bound + S x1 = n
  32. 0032specialize le_of_succ_le_succ (S x1)
  33. 0033specialize le_of_succ_le_succ n
  34. 0034apply le_of_succ_le_succ
  35. 0035rewrite <- hpred_witness
  36. 0036rewrite <- hpn
  37. 0037exact hinv_witness_right_left
  38. 0038exists x1
  39. 0039split
  40. 0040exact hi
  41. 0041split
  42. 0042exact hjn
  43. 0043rewrite hpred_witness at hinv_witness_right_right
  44. 0044exact hinv_witness_right_right