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.
Exact expanded PA statement
forall a m. ~(m = 0) -> (forall d. (exists x. a = d * x) -> (exists y. m = d * y) -> d = 1) -> exists z u v. a * z + m * u = 1 + m * vStructural proof guide
Generated structural guide
A nonzero modulus turns balanced Bezout data into a natural modular inverse.
Use the direct prerequisites nonzero_is_succ, coprime_balanced_mod_inverse, mod_eq_refl, mod_eq_add, mod_eq_predecessor_cancel, mod_eq_trans, mul_add, mul_assoc, mul_comm as previously established PA formulas.
The proof proceeds by case analysis (5), intermediate claims (8), equality transport (3).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA001V nonzero_is_succ PA003P coprime_balanced_mod_inverse PA0023 mod_eq_refl PA0022 mod_eq_add PA0025 mod_eq_predecessor_cancel PA0024 mod_eq_trans PA000A mul_add PA000B mul_assoc PA000H mul_commDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Linked names are exact direct references. This Stable checked-use theorem is independently kernel-checked when replayed.
Read the argument
Proof checkpoints
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 (9)
01Fix variables and assumptionsL1–4
02Establish hmsL5–8
03Establish hbalL9–13
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply coprime balanced mod inverse.
04Separate the logical casesL14–18
05Establish hselfL19–22
06Establish haddL23–29
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq add.
07Construct an explicit witnessL30–31
08Use earlier factsL32–33
09Establish hcancelL34–37
10Establish hkcancelL38–42
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq predecessor cancel.
11Establish hfinalL43–50
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq trans.
12Establish hnormL51–60
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mul add.
13Use earlier factsL61–61
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L61
apply mul_comm
14Calculate and transport equalitiesL62–62
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L62
refl
15Use earlier factsL63–63
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L63
apply mul_assoc
16Construct an explicit witnessL64–64
Supply the displayed value, then prove that it has the required property.
- L64
exists x1 + x * x2
17Calculate and transport equalitiesL65–65
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L65
rewrite hnorm
18Use earlier factsL66–66
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L66
exact hfinal
Original exact command ledger · 66 lines
- 0001
intro a - 0002
intro m - 0003
intro hm - 0004
intro hcop - 0005
have hms : exists k. m = S k - 0006
specialize nonzero_is_succ m - 0007
apply nonzero_is_succ - 0008
exact hm - 0009
have hbal : exists xp xn u v. a * xp + m * u = (1 + a * xn) + m * v - 0010
specialize coprime_balanced_mod_inverse a - 0011
specialize coprime_balanced_mod_inverse m - 0012
apply coprime_balanced_mod_inverse - 0013
exact hcop - 0014
cases hms - 0015
cases hbal - 0016
cases hbal_witness - 0017
cases hbal_witness_witness - 0018
cases hbal_witness_witness_witness - 0019
have hself : exists u v. (x * (a * x2)) + m * u = (x * (a * x2)) + m * v - 0020
specialize mod_eq_refl m - 0021
specialize mod_eq_refl (x * (a * x2)) - 0022
apply mod_eq_refl - 0023
have hadd : exists u v. ((a * x1) + x * (a * x2)) + m * u = ((1 + a * x2) + x * (a * x2)) + m * v - 0024
specialize mod_eq_add m - 0025
specialize mod_eq_add (a * x1) - 0026
specialize mod_eq_add (1 + a * x2) - 0027
specialize mod_eq_add (x * (a * x2)) - 0028
specialize mod_eq_add (x * (a * x2)) - 0029
apply mod_eq_add - 0030
exists x3 - 0031
exists x4 - 0032
exact hbal_witness_witness_witness_witness - 0033
exact hself - 0034
have hcancel : exists u v. ((1 + a * x2) + x * (a * x2)) + m * u = 1 + m * v - 0035
specialize mod_eq_predecessor_cancel x - 0036
specialize mod_eq_predecessor_cancel 1 - 0037
specialize mod_eq_predecessor_cancel (a * x2) - 0038
have hkcancel : exists u v. ((1 + a * x2) + x * (a * x2)) + S x * u = 1 + S x * v - 0039
apply mod_eq_predecessor_cancel - 0040
rewrite <- hms_witness at hkcancel - 0041
rewrite <- hms_witness at hkcancel - 0042
exact hkcancel - 0043
have hfinal : exists u v. ((a * x1) + x * (a * x2)) + m * u = 1 + m * v - 0044
specialize mod_eq_trans m - 0045
specialize mod_eq_trans ((a * x1) + x * (a * x2)) - 0046
specialize mod_eq_trans ((1 + a * x2) + x * (a * x2)) - 0047
specialize mod_eq_trans 1 - 0048
apply mod_eq_trans - 0049
exact hadd - 0050
exact hcancel - 0051
have hnorm : a * (x1 + x * x2) = (a * x1) + x * (a * x2) - 0052
trans a * x1 + a * (x * x2) - 0053
apply mul_add - 0054
congr - 0055
refl - 0056
trans (a * x) * x2 - 0057
symm - 0058
apply mul_assoc - 0059
trans (x * a) * x2 - 0060
congr - 0061
apply mul_comm - 0062
refl - 0063
apply mul_assoc - 0064
exists x1 + x * x2 - 0065
rewrite hnorm - 0066
exact hfinal