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 x. ((~(p = 1) /\ forall esi_prime_left_exists_prime esi_prime_right_exists_prime. p = esi_prime_left_exists_prime * esi_prime_right_exists_prime -> esi_prime_left_exists_prime = 1 \/ esi_prime_right_exists_prime = 1)) -> ~(a = 0) -> (exists esi_strict_gap_exists_target_bound. esi_strict_gap_exists_target_bound + S a = p) -> ~(x = 0) -> (exists esi_strict_gap_exists_input_bound. esi_strict_gap_exists_input_bound + S x = p) -> exists y. ((((~(x = 0) /\ (exists esi_strict_gap_exists_result_left_bound. esi_strict_gap_exists_result_left_bound + S x = p))) /\ (((~(y = 0) /\ (exists esi_strict_gap_exists_result_right_bound. esi_strict_gap_exists_result_right_bound + S y = p))) /\ (exists esi_mod_left_exists_result_mod esi_mod_right_exists_result_mod. (x * y) + p * esi_mod_left_exists_result_mod = (a) + p * esi_mod_right_exists_result_mod))))Structural proof guide
Generated structural guide
Every bounded nonzero prime residue has a bounded scaled inverse.
Use the direct prerequisites prime_bounded_nonzero_mod_inverse, scaled_inverse_from_unit_inverse, prime_nonzero, division_remainder_exists, mul_comm, remainder_decomposition_to_mod_eq, scaled_inverse_transport_right, prime_scaled_inverse_target_nonzero as previously established PA formulas.
The proof proceeds by case analysis (6), intermediate claims (8).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA0063 prime_bounded_nonzero_mod_inverse PA008N scaled_inverse_from_unit_inverse PA0031 prime_nonzero PA001D division_remainder_exists PA000H mul_comm PA003C remainder_decomposition_to_mod_eq PA008O scaled_inverse_transport_right PA008P prime_scaled_inverse_target_nonzeroDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Linked names are exact direct references. This Alpha-v25 checked-use theorem is independently kernel-checked when replayed; it is not a Stable theorem.
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–8
02Establish hinvL9–15
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime bounded nonzero mod inverse.
- L9
have hinv : exists x1. (~(x1 = 0) /\ ((exists esi_strict_gap_exists_inverse_bound. esi_strict_gap_exists_inverse_bound + S x1 = p) /\ (exists esi_mod_left_exists_inverse_mod esi_mod_right_exists_inverse_mod. (x * x1) + p * esi_mod_left_exists_inverse_mod = (1) + p * esi_mod_right_exists_inverse_mod))) - L10
specialize prime_bounded_nonzero_mod_inverse p - L11
specialize prime_bounded_nonzero_mod_inverse x - L12
apply prime_bounded_nonzero_mod_inverse - L13
exact hp - L14
exact hx0 - L15
exact hxp
03Separate the logical casesL16–18
04Establish hrawL19–25
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply scaled inverse from unit inverse.
- L19
have hraw : exists esi_mod_left_exists_raw esi_mod_right_exists_raw. (x * (a * x1)) + p * esi_mod_left_exists_raw = (a) + p * esi_mod_right_exists_raw - L20
specialize scaled_inverse_from_unit_inverse p - L21
specialize scaled_inverse_from_unit_inverse a - L22
specialize scaled_inverse_from_unit_inverse x - L23
specialize scaled_inverse_from_unit_inverse x1 - L24
apply scaled_inverse_from_unit_inverse - L25
exact hinv_witness_right_right
05Establish hp0L26–31
06Establish hdivL32–36
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder exists.
07Separate the logical casesL37–39
08Establish hdecompL40–45
09Establish hreducedL46–52
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply remainder decomposition to mod eq.
- L46
have hreduced : exists esi_mod_left_exists_reduced esi_mod_right_exists_reduced. (a * x1) + p * esi_mod_left_exists_reduced = (x3) + p * esi_mod_right_exists_reduced - L47
specialize remainder_decomposition_to_mod_eq p - L48
specialize remainder_decomposition_to_mod_eq (a * x1) - L49
specialize remainder_decomposition_to_mod_eq x2 - L50
specialize remainder_decomposition_to_mod_eq x3 - L51
apply remainder_decomposition_to_mod_eq - L52
exact hdecomp
10Establish hfinalL53–61
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply scaled inverse transport right.
- L53
have hfinal : exists esi_mod_left_exists_final esi_mod_right_exists_final. (x * x3) + p * esi_mod_left_exists_final = (a) + p * esi_mod_right_exists_final - L54
specialize scaled_inverse_transport_right p - L55
specialize scaled_inverse_transport_right a - L56
specialize scaled_inverse_transport_right x - L57
specialize scaled_inverse_transport_right (a * x1) - L58
specialize scaled_inverse_transport_right x3 - L59
apply scaled_inverse_transport_right - L60
exact hraw - L61
exact hreduced
11Establish hy0L62–71
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime scaled inverse target nonzero.
- L62
have hy0 : ~(x3 = 0) - L63
specialize prime_scaled_inverse_target_nonzero p - L64
specialize prime_scaled_inverse_target_nonzero a - L65
specialize prime_scaled_inverse_target_nonzero x - L66
specialize prime_scaled_inverse_target_nonzero x3 - L67
intro hx3zero - L68
apply prime_scaled_inverse_target_nonzero - L69
exact hp - L70
exact ha0 - L71
exact hap
12Use earlier factsL72–73
13Construct an explicit witnessL74–74
Supply the displayed value, then prove that it has the required property.
- L74
exists x3
14Separate the logical casesL75–76
15Use earlier factsL77–78
16Separate the logical casesL79–80
Original exact command ledger · 83 lines
- 0001
intro p - 0002
intro a - 0003
intro x - 0004
intro hp - 0005
intro ha0 - 0006
intro hap - 0007
intro hx0 - 0008
intro hxp - 0009
have hinv : exists x1. (~(x1 = 0) /\ ((exists esi_strict_gap_exists_inverse_bound. esi_strict_gap_exists_inverse_bound + S x1 = p) /\ (exists esi_mod_left_exists_inverse_mod esi_mod_right_exists_inverse_mod. (x * x1) + p * esi_mod_left_exists_inverse_mod = (1) + p * esi_mod_right_exists_inverse_mod))) - 0010
specialize prime_bounded_nonzero_mod_inverse p - 0011
specialize prime_bounded_nonzero_mod_inverse x - 0012
apply prime_bounded_nonzero_mod_inverse - 0013
exact hp - 0014
exact hx0 - 0015
exact hxp - 0016
cases hinv - 0017
cases hinv_witness - 0018
cases hinv_witness_right - 0019
have hraw : exists esi_mod_left_exists_raw esi_mod_right_exists_raw. (x * (a * x1)) + p * esi_mod_left_exists_raw = (a) + p * esi_mod_right_exists_raw - 0020
specialize scaled_inverse_from_unit_inverse p - 0021
specialize scaled_inverse_from_unit_inverse a - 0022
specialize scaled_inverse_from_unit_inverse x - 0023
specialize scaled_inverse_from_unit_inverse x1 - 0024
apply scaled_inverse_from_unit_inverse - 0025
exact hinv_witness_right_right - 0026
have hp0 : ~(p = 0) - 0027
intro hpzero - 0028
specialize prime_nonzero p - 0029
apply prime_nonzero - 0030
exact hp - 0031
exact hpzero - 0032
have hdiv : exists q r. a * x1 = p * q + r /\ exists h. h + S r = p - 0033
specialize division_remainder_exists p - 0034
specialize division_remainder_exists (a * x1) - 0035
apply division_remainder_exists - 0036
exact hp0 - 0037
cases hdiv - 0038
cases hdiv_witness - 0039
cases hdiv_witness_witness - 0040
have hdecomp : a * x1 = x2 * p + x3 - 0041
trans p * x2 + x3 - 0042
exact hdiv_witness_witness_left - 0043
congr - 0044
apply mul_comm - 0045
refl - 0046
have hreduced : exists esi_mod_left_exists_reduced esi_mod_right_exists_reduced. (a * x1) + p * esi_mod_left_exists_reduced = (x3) + p * esi_mod_right_exists_reduced - 0047
specialize remainder_decomposition_to_mod_eq p - 0048
specialize remainder_decomposition_to_mod_eq (a * x1) - 0049
specialize remainder_decomposition_to_mod_eq x2 - 0050
specialize remainder_decomposition_to_mod_eq x3 - 0051
apply remainder_decomposition_to_mod_eq - 0052
exact hdecomp - 0053
have hfinal : exists esi_mod_left_exists_final esi_mod_right_exists_final. (x * x3) + p * esi_mod_left_exists_final = (a) + p * esi_mod_right_exists_final - 0054
specialize scaled_inverse_transport_right p - 0055
specialize scaled_inverse_transport_right a - 0056
specialize scaled_inverse_transport_right x - 0057
specialize scaled_inverse_transport_right (a * x1) - 0058
specialize scaled_inverse_transport_right x3 - 0059
apply scaled_inverse_transport_right - 0060
exact hraw - 0061
exact hreduced - 0062
have hy0 : ~(x3 = 0) - 0063
specialize prime_scaled_inverse_target_nonzero p - 0064
specialize prime_scaled_inverse_target_nonzero a - 0065
specialize prime_scaled_inverse_target_nonzero x - 0066
specialize prime_scaled_inverse_target_nonzero x3 - 0067
intro hx3zero - 0068
apply prime_scaled_inverse_target_nonzero - 0069
exact hp - 0070
exact ha0 - 0071
exact hap - 0072
exact hfinal - 0073
exact hx3zero - 0074
exists x3 - 0075
split - 0076
split - 0077
exact hx0 - 0078
exact hxp - 0079
split - 0080
split - 0081
exact hy0 - 0082
exact hdiv_witness_witness_right - 0083
exact hfinal