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
∀ m. ∀ a. ∀ x. ∀ y. ¬m = 0 → Coprime(a,m) → ModEq(m,a · x,a · y) → ModEq(m,x,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
3 occurrences
In local proof propositions
8 occurrences
Exact expanded native-PA statement
forall m a x y. ~(m = 0) -> (forall d. (exists x. a = d * x) -> (exists y. m = d * y) -> d = 1) -> (exists u v. (a * x) + m * u = (a * y) + m * v) -> exists r s. x + m * r = y + m * sProof neighborhood
Direct theorem prerequisites
PA003Q coprime_mod_inverse PA001Y mod_eq_mul_right PA0020 mod_eq_mul_left PA003L mod_eq_symm PA0024 mod_eq_trans PA000B mul_assoc PA000H mul_comm PA0002 mul_oneDirect 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 (8)
01Fix variables and assumptionsL1–7
02Establish hinvL8–13
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply coprime mod inverse.
- L8
have hinv : ∃ z. BalancedInverse(m,a,z)Definitions: BalancedInverse(m,a,z)Original native command in the exact edition - L9
specialize coprime_mod_inverse a - L10
specialize coprime_mod_inverse m - L11
apply coprime_mod_inverse - L12
exact hm - L13
exact hcop
03Separate the logical casesL14–16
04Establish hzxL17–22
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq mul left.
- L17
have hzx : ModEq(m,x · (a · x1),x · 1)Definitions: ModEq(m,x · (a · x1),x · 1)Original native command in the exact edition - L18
specialize mod_eq_mul_left m - L19
specialize mod_eq_mul_left (a * x1) - L20
specialize mod_eq_mul_left 1 - L21
specialize mod_eq_mul_left x - L22
apply mod_eq_mul_left
05Construct an explicit witnessL23–24
06Use earlier factsL25–25
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L25
exact hinv_witness_witness_witness
07Establish hnormxL26–34
08Establish honexL35–36
09Establish hxprodL37–37
Establish this local claim before using it. It is not an additional assumption.
- L37
have hxprod : ModEq(m,a · x · x1,x)Definitions: ModEq(m,a · x · x1,x)Original native command in the exact edition
10Separate the logical casesL38–39
11Construct an explicit witnessL40–41
12Calculate and transport equalitiesL42–44
13Use earlier factsL45–45
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L45
exact hnormx
14Calculate and transport equalitiesL46–47
15Use earlier factsL48–48
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L48
exact hzx_witness_witness
16Calculate and transport equalitiesL49–49
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L49
congr
17Use earlier factsL50–50
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L50
exact honex
18Calculate and transport equalitiesL51–51
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L51
refl
19Establish hxhprodL52–57
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq symm.
- L52
have hxhprod : ModEq(m,x,a · x · x1)Definitions: ModEq(m,x,a · x · x1)Original native command in the exact edition - L53
specialize mod_eq_symm m - L54
specialize mod_eq_symm ((a * x) * x1) - L55
specialize mod_eq_symm x - L56
apply mod_eq_symm - L57
exact hxprod
20Establish hscaledL58–64
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq mul right.
- L58
have hscaled : ModEq(m,a · x · x1,a · y · x1)Definitions: ModEq(m,a · x · x1,a · y · x1)Original native command in the exact edition - L59
specialize mod_eq_mul_right m - L60
specialize mod_eq_mul_right (a * x) - L61
specialize mod_eq_mul_right (a * y) - L62
specialize mod_eq_mul_right x1 - L63
apply mod_eq_mul_right - L64
exact hxy
21Establish hzyL65–70
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq mul left.
- L65
have hzy : ModEq(m,y · (a · x1),y · 1)Definitions: ModEq(m,y · (a · x1),y · 1)Original native command in the exact edition - L66
specialize mod_eq_mul_left m - L67
specialize mod_eq_mul_left (a * x1) - L68
specialize mod_eq_mul_left 1 - L69
specialize mod_eq_mul_left y - L70
apply mod_eq_mul_left
22Construct an explicit witnessL71–72
23Use earlier factsL73–73
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L73
exact hinv_witness_witness_witness
24Establish hnormyL74–82
25Establish honeyL83–84
26Establish hyprodL85–85
Establish this local claim before using it. It is not an additional assumption.
- L85
have hyprod : ModEq(m,a · y · x1,y)Definitions: ModEq(m,a · y · x1,y)Original native command in the exact edition
27Separate the logical casesL86–87
28Construct an explicit witnessL88–89
29Calculate and transport equalitiesL90–92
30Use earlier factsL93–93
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L93
exact hnormy
31Calculate and transport equalitiesL94–95
32Use earlier factsL96–96
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L96
exact hzy_witness_witness
33Calculate and transport equalitiesL97–97
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L97
congr
34Use earlier factsL98–98
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L98
exact honey
35Calculate and transport equalitiesL99–99
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L99
refl
36Establish hmidL100–109
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq trans.
- L100
have hmid : ModEq(m,x,a · y · x1)Definitions: ModEq(m,x,a · y · x1)Original native command in the exact edition - L101
specialize mod_eq_trans m - L102
specialize mod_eq_trans x - L103
specialize mod_eq_trans ((a * x) * x1) - L104
specialize mod_eq_trans ((a * y) * x1) - L105
apply mod_eq_trans - L106
exact hxhprod - L107
exact hscaled - L108
specialize mod_eq_trans m - L109
specialize mod_eq_trans x
Original defined command ledger · 114 lines
- 0001
intro m - 0002
intro a - 0003
intro x - 0004
intro y - 0005
intro hm - 0006
intro hcop - 0007
intro hxy - 0008
have hinv : ∃ z. BalancedInverse(m,a,z)Exact native replay line
have hinv : exists z u v. a * z + m * u = 1 + m * v - 0009
specialize coprime_mod_inverse a - 0010
specialize coprime_mod_inverse m - 0011
apply coprime_mod_inverse - 0012
exact hm - 0013
exact hcop - 0014
cases hinv - 0015
cases hinv_witness - 0016
cases hinv_witness_witness - 0017
have hzx : ModEq(m,x · (a · x1),x · 1)Exact native replay line
have hzx : exists u v. (x * (a * x1)) + m * u = (x * 1) + m * v - 0018
specialize mod_eq_mul_left m - 0019
specialize mod_eq_mul_left (a * x1) - 0020
specialize mod_eq_mul_left 1 - 0021
specialize mod_eq_mul_left x - 0022
apply mod_eq_mul_left - 0023
exists x2 - 0024
exists x3 - 0025
exact hinv_witness_witness_witness - 0026
have hnormx : x * (a * x1) = (a * x) * x1 - 0027
trans (x * a) * x1 - 0028
symm - 0029
apply mul_assoc - 0030
trans (a * x) * x1 - 0031
congr - 0032
apply mul_comm - 0033
refl - 0034
refl - 0035
have honex : x * 1 = x - 0036
apply mul_one - 0037
have hxprod : ModEq(m,a · x · x1,x)Exact native replay line
have hxprod : exists u v. ((a * x) * x1) + m * u = x + m * v - 0038
cases hzx - 0039
cases hzx_witness - 0040
exists x4 - 0041
exists x5 - 0042
trans (x * (a * x1)) + m * x4 - 0043
congr - 0044
symm - 0045
exact hnormx - 0046
refl - 0047
trans (x * 1) + m * x5 - 0048
exact hzx_witness_witness - 0049
congr - 0050
exact honex - 0051
refl - 0052
have hxhprod : ModEq(m,x,a · x · x1)Exact native replay line
have hxhprod : exists u v. x + m * u = ((a * x) * x1) + m * v - 0053
specialize mod_eq_symm m - 0054
specialize mod_eq_symm ((a * x) * x1) - 0055
specialize mod_eq_symm x - 0056
apply mod_eq_symm - 0057
exact hxprod - 0058
have hscaled : ModEq(m,a · x · x1,a · y · x1)Exact native replay line
have hscaled : exists u v. ((a * x) * x1) + m * u = ((a * y) * x1) + m * v - 0059
specialize mod_eq_mul_right m - 0060
specialize mod_eq_mul_right (a * x) - 0061
specialize mod_eq_mul_right (a * y) - 0062
specialize mod_eq_mul_right x1 - 0063
apply mod_eq_mul_right - 0064
exact hxy - 0065
have hzy : ModEq(m,y · (a · x1),y · 1)Exact native replay line
have hzy : exists u v. (y * (a * x1)) + m * u = (y * 1) + m * v - 0066
specialize mod_eq_mul_left m - 0067
specialize mod_eq_mul_left (a * x1) - 0068
specialize mod_eq_mul_left 1 - 0069
specialize mod_eq_mul_left y - 0070
apply mod_eq_mul_left - 0071
exists x2 - 0072
exists x3 - 0073
exact hinv_witness_witness_witness - 0074
have hnormy : y * (a * x1) = (a * y) * x1 - 0075
trans (y * a) * x1 - 0076
symm - 0077
apply mul_assoc - 0078
trans (a * y) * x1 - 0079
congr - 0080
apply mul_comm - 0081
refl - 0082
refl - 0083
have honey : y * 1 = y - 0084
apply mul_one - 0085
have hyprod : ModEq(m,a · y · x1,y)Exact native replay line
have hyprod : exists u v. ((a * y) * x1) + m * u = y + m * v - 0086
cases hzy - 0087
cases hzy_witness - 0088
exists x4 - 0089
exists x5 - 0090
trans (y * (a * x1)) + m * x4 - 0091
congr - 0092
symm - 0093
exact hnormy - 0094
refl - 0095
trans (y * 1) + m * x5 - 0096
exact hzy_witness_witness - 0097
congr - 0098
exact honey - 0099
refl - 0100
have hmid : ModEq(m,x,a · y · x1)Exact native replay line
have hmid : exists u v. x + m * u = ((a * y) * x1) + m * v - 0101
specialize mod_eq_trans m - 0102
specialize mod_eq_trans x - 0103
specialize mod_eq_trans ((a * x) * x1) - 0104
specialize mod_eq_trans ((a * y) * x1) - 0105
apply mod_eq_trans - 0106
exact hxhprod - 0107
exact hscaled - 0108
specialize mod_eq_trans m - 0109
specialize mod_eq_trans x - 0110
specialize mod_eq_trans ((a * y) * x1) - 0111
specialize mod_eq_trans y - 0112
apply mod_eq_trans - 0113
exact hmid - 0114
exact hyprod