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. ¬m = 0 → Coprime(a,m) → ∃ x. BalancedInverse(m,a,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
2 occurrences
In local proof propositions
6 occurrences
Exact expanded native-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 * vProof neighborhood
Direct theorem prerequisites
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 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
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.
- L9
have hbal : ∃ xp. ∃ xn. ModEq(m,a · xp,1 + a · xn)Definitions: ModEq(m,a · xp,1 + a · xn)Original native command in the exact edition - L10
specialize coprime_balanced_mod_inverse a - L11
specialize coprime_balanced_mod_inverse m - L12
apply coprime_balanced_mod_inverse - L13
exact hcop
04Separate the logical casesL14–18
05Establish hselfL19–22
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq refl.
- L19
have hself : ModEq(m,x · (a · x2),x · (a · x2))Definitions: ModEq(m,x · (a · x2),x · (a · x2))Original native command in the exact edition - L20
specialize mod_eq_refl m - L21
specialize mod_eq_refl (x * (a * x2)) - L22
apply mod_eq_refl
06Establish haddL23–29
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq add.
- L23
have hadd : ModEq(m,a · x1 + x · (a · x2),1 + a · x2 + x · (a · x2))Definitions: ModEq(m,a · x1 + x · (a · x2),1 + a · x2 + x · (a · x2))Original native command in the exact edition - L24
specialize mod_eq_add m - L25
specialize mod_eq_add (a * x1) - L26
specialize mod_eq_add (1 + a * x2) - L27
specialize mod_eq_add (x * (a * x2)) - L28
specialize mod_eq_add (x * (a * x2)) - L29
apply mod_eq_add
07Construct an explicit witnessL30–31
08Use earlier factsL32–33
09Establish hcancelL34–37
Establish this local claim before using it. It is not an additional assumption.
- L34
have hcancel : ModEq(m,1 + a · x2 + x · (a · x2),1)Definitions: ModEq(m,1 + a · x2 + x · (a · x2),1)Original native command in the exact edition - L35
specialize mod_eq_predecessor_cancel x - L36
specialize mod_eq_predecessor_cancel 1 - L37
specialize mod_eq_predecessor_cancel (a * x2)
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.
- L38
have hkcancel : ModEq(S x,1 + a · x2 + x · (a · x2),1)Definitions: ModEq(S x,1 + a · x2 + x · (a · x2),1)Original native command in the exact edition - L39
apply mod_eq_predecessor_cancel - L40
rewrite <- hms_witness at hkcancel - L41
rewrite <- hms_witness at hkcancel - L42
exact hkcancel
11Establish hfinalL43–50
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq trans.
- L43
have hfinal : ModEq(m,a · x1 + x · (a · x2),1)Definitions: ModEq(m,a · x1 + x · (a · x2),1)Original native command in the exact edition - L44
specialize mod_eq_trans m - L45
specialize mod_eq_trans ((a * x1) + x * (a * x2)) - L46
specialize mod_eq_trans ((1 + a * x2) + x * (a * x2)) - L47
specialize mod_eq_trans 1 - L48
apply mod_eq_trans - L49
exact hadd - L50
exact hcancel
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 defined 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 : ∃ xp. ∃ xn. ModEq(m,a · xp,1 + a · xn)Exact native replay line
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 : ModEq(m,x · (a · x2),x · (a · x2))Exact native replay line
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 : ModEq(m,a · x1 + x · (a · x2),1 + a · x2 + x · (a · x2))Exact native replay line
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 : ModEq(m,1 + a · x2 + x · (a · x2),1)Exact native replay line
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 : ModEq(S x,1 + a · x2 + x · (a · x2),1)Exact native replay line
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 : ModEq(m,a · x1 + x · (a · x2),1)Exact native replay line
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