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 p a. ((~(p = 1) /\ forall qrbu_factor_left_prime_p qrbu_factor_right_prime_p. p = qrbu_factor_left_prime_p * qrbu_factor_right_prime_p -> qrbu_factor_left_prime_p = 1 \/ qrbu_factor_right_prime_p = 1)) -> ~(a = 0) -> (exists qrbu_gap_a_lt_p. qrbu_gap_a_lt_p + S a = p) -> (exists qrbu_inverse_bounded_inverse. (~(qrbu_inverse_bounded_inverse = 0) /\ ((exists qrbu_gap_bounded_inverse_bound. qrbu_gap_bounded_inverse_bound + S qrbu_inverse_bounded_inverse = p) /\ (exists qrbu_mod_left_bounded_inverse_mod qrbu_mod_right_bounded_inverse_mod. a * qrbu_inverse_bounded_inverse + p * qrbu_mod_left_bounded_inverse_mod = 1 + p * qrbu_mod_right_bounded_inverse_mod))))Structural proof guide
Generated structural guide
A nonzero residue below a prime has a nonzero bounded inverse.
Use the direct prerequisites prime_is_succ_succ, prime_nonzero, divisor_le_nonzero, lt_not_le, prime_mod_inverse, division_remainder_exists, mul_comm, remainder_decomposition_to_mod_eq, mod_eq_mul_left, mod_eq_symm, mod_eq_trans, mod_eq_bounded_unique, succ_ne_zero as previously established PA formulas.
The proof proceeds by case analysis (9), intermediate claims (16), equality transport (2), certified simplification (2).
Referenced ingredients
PA0061 prime_is_succ_succ PA0031 prime_nonzero PA0039 divisor_le_nonzero PA003A lt_not_le PA0062 prime_mod_inverse PA001D division_remainder_exists PA000H mul_comm PA003C remainder_decomposition_to_mod_eq PA0020 mod_eq_mul_left PA003L mod_eq_symm PA0024 mod_eq_trans PA002U mod_eq_bounded_unique PA0005 succ_ne_zeroProof neighborhood
Direct dependencies
PA0061 prime_is_succ_succ PA0031 prime_nonzero PA0039 divisor_le_nonzero PA003A lt_not_le PA0062 prime_mod_inverse PA001D division_remainder_exists PA000H mul_comm PA003C remainder_decomposition_to_mod_eq PA0020 mod_eq_mul_left PA003L mod_eq_symm PA0024 mod_eq_trans PA002U mod_eq_bounded_unique PA0005 succ_ne_zeroDirect 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 (13)
01Fix variables and assumptionsL1–5
02Establish hp0L6–11
03Establish hnotdivL12–13
04Establish hpaL14–23
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply divisor le nonzero.
05Use earlier factsL24–24
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L24
exact hpa
06Establish hinvL25–30
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime mod inverse.
07Separate the logical casesL31–33
08Establish hdivzL34–38
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder exists.
09Separate the logical casesL39–41
10Establish hzdecompL42–47
11Establish hzrL48–54
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply remainder decomposition to mod eq.
- L48
have hzr : exists u v. x + p * u = x4 + p * v - L49
specialize remainder_decomposition_to_mod_eq p - L50
specialize remainder_decomposition_to_mod_eq x - L51
specialize remainder_decomposition_to_mod_eq x3 - L52
specialize remainder_decomposition_to_mod_eq x4 - L53
apply remainder_decomposition_to_mod_eq - L54
exact hzdecomp
12Establish hscaledL55–61
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq mul left.
13Establish hrzL62–67
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq symm.
14Establish hfinalL68–74
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq trans.
15Construct an explicit witnessL75–76
16Use earlier factsL77–77
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L77
exact hinv_witness_witness_witness
17Establish hp2L78–81
18Separate the logical casesL82–82
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L82
cases hp2
19Establish h0boundL83–83
Establish this local claim before using it. It is not an additional assumption.
- L83
have h0bound : exists h. h + S 0 = p
20Construct an explicit witnessL84–84
Supply the displayed value, then prove that it has the required property.
- L84
exists S x5
21Calculate and transport equalitiesL85–86
22Establish h1boundL87–87
Establish this local claim before using it. It is not an additional assumption.
- L87
have h1bound : exists h. h + S 1 = p
23Construct an explicit witnessL88–88
Supply the displayed value, then prove that it has the required property.
- L88
exists x5
24Calculate and transport equalitiesL89–90
25Establish hr0L91–92
26Establish hzerooneL93–93
Establish this local claim before using it. It is not an additional assumption.
- L93
have hzeroone : exists u v. 0 + p * u = 1 + p * v
27Separate the logical casesL94–95
28Construct an explicit witnessL96–97
29Calculate and transport equalitiesL98–103
30Use earlier factsL104–105
31Calculate and transport equalitiesL106–106
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L106
refl
32Use earlier factsL107–107
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L107
exact hfinal_witness_witness
33Establish hzeroeqoneL108–117
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq bounded unique.
34Calculate and transport equalitiesL118–118
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L118
symm
35Use earlier factsL119–119
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L119
exact hzeroeqone
36Construct an explicit witnessL120–120
Supply the displayed value, then prove that it has the required property.
- L120
exists x4
37Separate the logical casesL121–121
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L121
split
38Use earlier factsL122–122
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L122
exact hr0
39Separate the logical casesL123–123
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L123
split
Original exact command ledger · 125 lines
- 0001
intro p - 0002
intro a - 0003
intro hp - 0004
intro ha0 - 0005
intro hap - 0006
have hp0 : ~(p = 0) - 0007
intro hpzero - 0008
specialize prime_nonzero p - 0009
apply prime_nonzero - 0010
exact hp - 0011
exact hpzero - 0012
have hnotdiv : ~(exists k. a = p * k) - 0013
intro hdiv - 0014
have hpa : exists t. t + p = a - 0015
specialize divisor_le_nonzero p - 0016
specialize divisor_le_nonzero a - 0017
apply divisor_le_nonzero - 0018
exact ha0 - 0019
exact hdiv - 0020
specialize lt_not_le a - 0021
specialize lt_not_le p - 0022
apply lt_not_le - 0023
exact hap - 0024
exact hpa - 0025
have hinv : exists z u v. a * z + p * u = 1 + p * v - 0026
specialize prime_mod_inverse p - 0027
specialize prime_mod_inverse a - 0028
apply prime_mod_inverse - 0029
exact hp - 0030
exact hnotdiv - 0031
cases hinv - 0032
cases hinv_witness - 0033
cases hinv_witness_witness - 0034
have hdivz : exists q r. x = p * q + r /\ exists h. h + S r = p - 0035
specialize division_remainder_exists p - 0036
specialize division_remainder_exists x - 0037
apply division_remainder_exists - 0038
exact hp0 - 0039
cases hdivz - 0040
cases hdivz_witness - 0041
cases hdivz_witness_witness - 0042
have hzdecomp : x = x3 * p + x4 - 0043
trans p * x3 + x4 - 0044
exact hdivz_witness_witness_left - 0045
congr - 0046
apply mul_comm - 0047
refl - 0048
have hzr : exists u v. x + p * u = x4 + p * v - 0049
specialize remainder_decomposition_to_mod_eq p - 0050
specialize remainder_decomposition_to_mod_eq x - 0051
specialize remainder_decomposition_to_mod_eq x3 - 0052
specialize remainder_decomposition_to_mod_eq x4 - 0053
apply remainder_decomposition_to_mod_eq - 0054
exact hzdecomp - 0055
have hscaled : exists u v. (a * x) + p * u = (a * x4) + p * v - 0056
specialize mod_eq_mul_left p - 0057
specialize mod_eq_mul_left x - 0058
specialize mod_eq_mul_left x4 - 0059
specialize mod_eq_mul_left a - 0060
apply mod_eq_mul_left - 0061
exact hzr - 0062
have hrz : exists u v. (a * x4) + p * u = (a * x) + p * v - 0063
specialize mod_eq_symm p - 0064
specialize mod_eq_symm (a * x) - 0065
specialize mod_eq_symm (a * x4) - 0066
apply mod_eq_symm - 0067
exact hscaled - 0068
have hfinal : exists u v. (a * x4) + p * u = 1 + p * v - 0069
specialize mod_eq_trans p - 0070
specialize mod_eq_trans (a * x4) - 0071
specialize mod_eq_trans (a * x) - 0072
specialize mod_eq_trans 1 - 0073
apply mod_eq_trans - 0074
exact hrz - 0075
exists x1 - 0076
exists x2 - 0077
exact hinv_witness_witness_witness - 0078
have hp2 : exists k. p = S (S k) - 0079
specialize prime_is_succ_succ p - 0080
apply prime_is_succ_succ - 0081
exact hp - 0082
cases hp2 - 0083
have h0bound : exists h. h + S 0 = p - 0084
exists S x5 - 0085
rewrite hp2_witness - 0086
simp - 0087
have h1bound : exists h. h + S 1 = p - 0088
exists x5 - 0089
rewrite hp2_witness - 0090
simp - 0091
have hr0 : ~(x4 = 0) - 0092
intro hrzero - 0093
have hzeroone : exists u v. 0 + p * u = 1 + p * v - 0094
cases hfinal - 0095
cases hfinal_witness - 0096
exists x6 - 0097
exists x7 - 0098
trans (a * x4) + p * x6 - 0099
congr - 0100
symm - 0101
trans a * 0 - 0102
congr - 0103
refl - 0104
exact hrzero - 0105
apply PA5 - 0106
refl - 0107
exact hfinal_witness_witness - 0108
have hzeroeqone : 0 = 1 - 0109
specialize mod_eq_bounded_unique p - 0110
specialize mod_eq_bounded_unique 0 - 0111
specialize mod_eq_bounded_unique 1 - 0112
apply mod_eq_bounded_unique - 0113
exact h0bound - 0114
exact h1bound - 0115
exact hzeroone - 0116
specialize succ_ne_zero 0 - 0117
apply succ_ne_zero - 0118
symm - 0119
exact hzeroeqone - 0120
exists x4 - 0121
split - 0122
exact hr0 - 0123
split - 0124
exact hdivz_witness_witness_right - 0125
exact hfinal