PA003P · theorem

coprime_balanced_mod_inverse

Stable checked-use theorem · independently closed

Balanced Bezout coefficients give a subtraction-free modular inverse.

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

∀ a. ∀ m. Coprime(a,m) → ∃ x. ∃ y. ModEq(m,a · x,1 + a · y)

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

2 occurrences

In local proof propositions

none

0 occurrences

Exact expanded native-PA statement
forall a m. (forall d. (exists x. a = d * x) -> (exists y. m = d * y) -> d = 1) -> exists xp xn u v. a * xp + m * u = (1 + a * xn) + m * v

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

20 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.

Named ingredients (2)
01Fix variables and assumptionsL1–3

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

  1. L1
    intro a
  2. L2
    intro m
  3. L3
    intro hcop
02Establish hbezL4–8

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

  1. L4
    have hbez : exists xp yp xn yn. a * xp + m * yp = 1 + (a * xn + m * yn)
  2. L5
    specialize coprime_balanced_bezout a
  3. L6
    specialize coprime_balanced_bezout m
  4. L7
    apply coprime_balanced_bezout
  5. L8
    exact hcop
03Separate the logical casesL9–12

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

  1. L9
    cases hbez
  2. L10
    cases hbez_witness
  3. L11
    cases hbez_witness_witness
  4. L12
    cases hbez_witness_witness_witness
04Construct an explicit witnessL13–16

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

  1. L13
    exists x
  2. L14
    exists x2
  3. L15
    exists x1
  4. L16
    exists x3
05Calculate and transport equalitiesL17–17

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

  1. L17
    trans 1 + (a * x2 + m * x3)
06Use earlier factsL18–18

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

  1. L18
    exact hbez_witness_witness_witness_witness
07Calculate and transport equalitiesL19–19

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

  1. L19
    symm
08Use earlier factsL20–20

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

  1. L20
    apply add_assoc

Library-wide reading audit

Original defined command ledger · 20 lines
  1. 0001intro a
  2. 0002intro m
  3. 0003intro hcop
  4. 0004have hbez : exists xp yp xn yn. a * xp + m * yp = 1 + (a * xn + m * yn)
  5. 0005specialize coprime_balanced_bezout a
  6. 0006specialize coprime_balanced_bezout m
  7. 0007apply coprime_balanced_bezout
  8. 0008exact hcop
  9. 0009cases hbez
  10. 0010cases hbez_witness
  11. 0011cases hbez_witness_witness
  12. 0012cases hbez_witness_witness_witness
  13. 0013exists x
  14. 0014exists x2
  15. 0015exists x1
  16. 0016exists x3
  17. 0017trans 1 + (a * x2 + m * x3)
  18. 0018exact hbez_witness_witness_witness_witness
  19. 0019symm
  20. 0020apply add_assoc