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
∀ p. ∀ n. ∀ a. ∀ b. p = S n → Prime(p) → Dvd(p,a · a + b · b) → ¬Dvd(p,b) → QRes(p,n)Every purple notation token opens its conservative definition. This reading surface never changes the unchanged intuitionistic kernel or confers checked-use authority.
Definitions used by this theorem
In the theorem statement
In local proof propositions
Exact expanded first-order statement
forall p n a b. p = S n -> ((~(p = 1) /\ forall frm_prime_left_ftsc_prime frm_prime_right_ftsc_prime. p = frm_prime_left_ftsc_prime * frm_prime_right_ftsc_prime -> frm_prime_left_ftsc_prime = 1 \/ frm_prime_right_ftsc_prime = 1)) -> (exists ftcn_factor_ftsc_norm. (a * a + b * b) = (p) * ftcn_factor_ftsc_norm) -> ~(exists ftcn_factor_ftsc_unit_coordinate. (b) = (p) * ftcn_factor_ftsc_unit_coordinate) -> (exists qr_x_ftsc_predecessor. exists qr_u_ftsc_predecessor qr_v_ftsc_predecessor. qr_x_ftsc_predecessor * qr_x_ftsc_predecessor + p * qr_u_ftsc_predecessor = n + p * qr_v_ftsc_predecessor)Proof neighborhood
Direct theorem prerequisites
TS0012 multiple_implies_balanced_zero_congruence mod_eq_mul · Stable closed one_mul · Stable closed mod_eq_mul_right · Stable closed TS0022 two_square_scaled_norm_identity mul_zero_left · Stable closed mod_eq_refl · Stable closed mod_eq_add · Stable closed mod_eq_symm · Stable closed mod_eq_trans · Stable closed TS0011 balanced_zero_congruence_implies_multiple TS0023 negative_one_norm_multiple_yields_predecessor_residueDirect theorem dependents
Definition-aware tactic body
Only propositions whose conservative expansion has been checked for exact first-order equivalence are compacted. Every changed line retains its immutable exact replay 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 (4)
01Fix variables and assumptionsL1–8
02Establish hinverseL9–14
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply prime mod inverse.
- L9
have hinverse : ∃ z. BalancedInverse(p,b,z)Definitions: BalancedInverse(p,b,z)Original native command in the exact edition - L10
specialize prime_mod_inverse p - L11
specialize prime_mod_inverse b - L12
apply prime_mod_inverse - L13
exact hprime - L14
exact hunit
03Separate the logical casesL15–17
04Establish hinverse_modL18–18
Establish this local claim before using it. It is not an additional assumption.
- L18
have hinverse_mod : BalancedInverse(p,b,x)Definitions: BalancedInverse(p,b,x)Original native command in the exact edition
05Construct an explicit witnessL19–20
06Use earlier factsL21–21
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L21
exact hinverse_witness_witness_witness
07Establish hinverse_square_rawL22–31
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq mul.
- L22
have hinverse_square_raw : ModEq(p,b · x · (b · x),1 · 1)Definitions: ModEq(p,b · x · (b · x),1 · 1)Original native command in the exact edition - L23
specialize mod_eq_mul p - L24
specialize mod_eq_mul (b * x) - L25
specialize mod_eq_mul 1 - L26
specialize mod_eq_mul (b * x) - L27
specialize mod_eq_mul 1 - L28
apply mod_eq_mul - L29
exact hinverse_mod - L30
exact hinverse_mod - L31
specialize one_mul 1
08Calculate and transport equalitiesL32–32
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L32
rewrite one_mul at hinverse_square_raw
09Establish hnorm_modL33–37
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply multiple implies balanced zero congruence.
- L33
have hnorm_mod : ModEq(p,a · a + b · b,0)Definitions: ModEq(p,a · a + b · b,0)Original native command in the exact edition - L34
specialize multiple_implies_balanced_zero_congruence p - L35
specialize multiple_implies_balanced_zero_congruence (a * a + b * b) - L36
apply multiple_implies_balanced_zero_congruence - L37
exact hnorm
10Establish hscaledL38–47
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq mul right.
- L38
have hscaled : ModEq(p,(a · a + b · b) · (x · x),0 · (x · x))Definitions: ModEq(p,(a · a + b · b) · (x · x),0 · (x · x))Original native command in the exact edition - L39
specialize mod_eq_mul_right p - L40
specialize mod_eq_mul_right (a * a + b * b) - L41
specialize mod_eq_mul_right 0 - L42
specialize mod_eq_mul_right (x * x) - L43
apply mod_eq_mul_right - L44
exact hnorm_mod - L45
specialize two_square_scaled_norm_identity a - L46
specialize two_square_scaled_norm_identity b - L47
specialize two_square_scaled_norm_identity x
11Calculate and transport equalitiesL48–48
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L48
rewrite two_square_scaled_norm_identity at hscaled
12Use earlier factsL49–49
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L49
specialize mul_zero_left (x * x)
13Calculate and transport equalitiesL50–50
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L50
rewrite mul_zero_left at hscaled
14Establish hselfL51–54
Establish this local claim before using it. It is not an additional assumption.
- L51
have hself : ModEq(p,a · x · (a · x),a · x · (a · x))Definitions: ModEq(p,a · x · (a · x),a · x · (a · x))Original native command in the exact edition - L52
specialize mod_eq_refl p - L53
specialize mod_eq_refl ((a * x) * (a * x)) - L54
exact mod_eq_refl
15Establish hreplaceL55–63
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq add.
- L55
have hreplace : ModEq(p,a · x · (a · x) + b · x · (b · x),a · x · (a · x) + 1)Definitions: ModEq(p,a · x · (a · x) + b · x · (b · x),a · x · (a · x) + 1)Original native command in the exact edition - L56
specialize mod_eq_add p - L57
specialize mod_eq_add ((a * x) * (a * x)) - L58
specialize mod_eq_add ((a * x) * (a * x)) - L59
specialize mod_eq_add ((b * x) * (b * x)) - L60
specialize mod_eq_add 1 - L61
apply mod_eq_add - L62
exact hself - L63
exact hinverse_square_raw
16Establish hreverseL64–69
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq symm.
- L64
have hreverse : ModEq(p,a · x · (a · x) + 1,a · x · (a · x) + b · x · (b · x))Definitions: ModEq(p,a · x · (a · x) + 1,a · x · (a · x) + b · x · (b · x))Original native command in the exact edition - L65
specialize mod_eq_symm p - L66
specialize mod_eq_symm ((a * x) * (a * x) + (b * x) * (b * x)) - L67
specialize mod_eq_symm ((a * x) * (a * x) + 1) - L68
apply mod_eq_symm - L69
exact hreplace
17Establish hroot_modL70–77
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq trans.
- L70
have hroot_mod : ModEq(p,a · x · (a · x) + 1,0)Definitions: ModEq(p,a · x · (a · x) + 1,0)Original native command in the exact edition - L71
specialize mod_eq_trans p - L72
specialize mod_eq_trans ((a * x) * (a * x) + 1) - L73
specialize mod_eq_trans ((a * x) * (a * x) + (b * x) * (b * x)) - L74
specialize mod_eq_trans 0 - L75
apply mod_eq_trans - L76
exact hreverse - L77
exact hscaled
18Establish hroot_multipleL78–87
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply balanced zero congruence implies multiple.
- L78
have hroot_multiple : Dvd(p,a · x · (a · x) + 1)Definitions: Dvd(p,a · x · (a · x) + 1)Original native command in the exact edition - L79
specialize balanced_zero_congruence_implies_multiple p - L80
specialize balanced_zero_congruence_implies_multiple ((a * x) * (a * x) + 1) - L81
apply balanced_zero_congruence_implies_multiple - L82
exact hroot_mod - L83
specialize negative_one_norm_multiple_yields_predecessor_residue p - L84
specialize negative_one_norm_multiple_yields_predecessor_residue n - L85
specialize negative_one_norm_multiple_yields_predecessor_residue (a * x) - L86
apply negative_one_norm_multiple_yields_predecessor_residue - L87
exact hpredecessor
19Use earlier factsL88–88
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L88
exact hroot_multiple
Original defined command ledger · 88 lines
- 0001
intro p - 0002
intro n - 0003
intro a - 0004
intro b - 0005
intro hpredecessor - 0006
intro hprime - 0007
intro hnorm - 0008
intro hunit - 0009
have hinverse : ∃ z. BalancedInverse(p,b,z)Exact native replay line
have hinverse : exists z u v. b * z + p * u = 1 + p * v - 0010
specialize prime_mod_inverse p - 0011
specialize prime_mod_inverse b - 0012
apply prime_mod_inverse - 0013
exact hprime - 0014
exact hunit - 0015
cases hinverse - 0016
cases hinverse_witness - 0017
cases hinverse_witness_witness - 0018
have hinverse_mod : BalancedInverse(p,b,x)Exact native replay line
have hinverse_mod : exists ftcn_left_ftsc_inverse ftcn_right_ftsc_inverse. (b * x) + (p) * ftcn_left_ftsc_inverse = (1) + (p) * ftcn_right_ftsc_inverse - 0019
exists x1 - 0020
exists x2 - 0021
exact hinverse_witness_witness_witness - 0022
have hinverse_square_raw : ModEq(p,b · x · (b · x),1 · 1)Exact native replay line
have hinverse_square_raw : exists ftcn_left_ftsc_inverse_square_raw ftcn_right_ftsc_inverse_square_raw. ((b * x) * (b * x)) + (p) * ftcn_left_ftsc_inverse_square_raw = (1 * 1) + (p) * ftcn_right_ftsc_inverse_square_raw - 0023
specialize mod_eq_mul p - 0024
specialize mod_eq_mul (b * x) - 0025
specialize mod_eq_mul 1 - 0026
specialize mod_eq_mul (b * x) - 0027
specialize mod_eq_mul 1 - 0028
apply mod_eq_mul - 0029
exact hinverse_mod - 0030
exact hinverse_mod - 0031
specialize one_mul 1 - 0032
rewrite one_mul at hinverse_square_raw - 0033
have hnorm_mod : ModEq(p,a · a + b · b,0)Exact native replay line
have hnorm_mod : exists ftcn_left_ftsc_norm_zero ftcn_right_ftsc_norm_zero. (a * a + b * b) + (p) * ftcn_left_ftsc_norm_zero = (0) + (p) * ftcn_right_ftsc_norm_zero - 0034
specialize multiple_implies_balanced_zero_congruence p - 0035
specialize multiple_implies_balanced_zero_congruence (a * a + b * b) - 0036
apply multiple_implies_balanced_zero_congruence - 0037
exact hnorm - 0038
have hscaled : ModEq(p,(a · a + b · b) · (x · x),0 · (x · x))Exact native replay line
have hscaled : exists ftcn_left_ftsc_scaled_zero ftcn_right_ftsc_scaled_zero. ((a * a + b * b) * (x * x)) + (p) * ftcn_left_ftsc_scaled_zero = (0 * (x * x)) + (p) * ftcn_right_ftsc_scaled_zero - 0039
specialize mod_eq_mul_right p - 0040
specialize mod_eq_mul_right (a * a + b * b) - 0041
specialize mod_eq_mul_right 0 - 0042
specialize mod_eq_mul_right (x * x) - 0043
apply mod_eq_mul_right - 0044
exact hnorm_mod - 0045
specialize two_square_scaled_norm_identity a - 0046
specialize two_square_scaled_norm_identity b - 0047
specialize two_square_scaled_norm_identity x - 0048
rewrite two_square_scaled_norm_identity at hscaled - 0049
specialize mul_zero_left (x * x) - 0050
rewrite mul_zero_left at hscaled - 0051
have hself : ModEq(p,a · x · (a · x),a · x · (a · x))Exact native replay line
have hself : exists ftcn_left_ftsc_self ftcn_right_ftsc_self. ((a * x) * (a * x)) + (p) * ftcn_left_ftsc_self = ((a * x) * (a * x)) + (p) * ftcn_right_ftsc_self - 0052
specialize mod_eq_refl p - 0053
specialize mod_eq_refl ((a * x) * (a * x)) - 0054
exact mod_eq_refl - 0055
have hreplace : ModEq(p,a · x · (a · x) + b · x · (b · x),a · x · (a · x) + 1)Exact native replay line
have hreplace : exists ftcn_left_ftsc_replace ftcn_right_ftsc_replace. ((a * x) * (a * x) + (b * x) * (b * x)) + (p) * ftcn_left_ftsc_replace = ((a * x) * (a * x) + 1) + (p) * ftcn_right_ftsc_replace - 0056
specialize mod_eq_add p - 0057
specialize mod_eq_add ((a * x) * (a * x)) - 0058
specialize mod_eq_add ((a * x) * (a * x)) - 0059
specialize mod_eq_add ((b * x) * (b * x)) - 0060
specialize mod_eq_add 1 - 0061
apply mod_eq_add - 0062
exact hself - 0063
exact hinverse_square_raw - 0064
have hreverse : ModEq(p,a · x · (a · x) + 1,a · x · (a · x) + b · x · (b · x))Exact native replay line
have hreverse : exists ftcn_left_ftsc_reverse ftcn_right_ftsc_reverse. ((a * x) * (a * x) + 1) + (p) * ftcn_left_ftsc_reverse = ((a * x) * (a * x) + (b * x) * (b * x)) + (p) * ftcn_right_ftsc_reverse - 0065
specialize mod_eq_symm p - 0066
specialize mod_eq_symm ((a * x) * (a * x) + (b * x) * (b * x)) - 0067
specialize mod_eq_symm ((a * x) * (a * x) + 1) - 0068
apply mod_eq_symm - 0069
exact hreplace - 0070
have hroot_mod : ModEq(p,a · x · (a · x) + 1,0)Exact native replay line
have hroot_mod : exists ftcn_left_ftsc_root_mod ftcn_right_ftsc_root_mod. ((a * x) * (a * x) + 1) + (p) * ftcn_left_ftsc_root_mod = (0) + (p) * ftcn_right_ftsc_root_mod - 0071
specialize mod_eq_trans p - 0072
specialize mod_eq_trans ((a * x) * (a * x) + 1) - 0073
specialize mod_eq_trans ((a * x) * (a * x) + (b * x) * (b * x)) - 0074
specialize mod_eq_trans 0 - 0075
apply mod_eq_trans - 0076
exact hreverse - 0077
exact hscaled - 0078
have hroot_multiple : Dvd(p,a · x · (a · x) + 1)Exact native replay line
have hroot_multiple : exists ftcn_factor_ftsc_root_multiple. ((a * x) * (a * x) + 1) = (p) * ftcn_factor_ftsc_root_multiple - 0079
specialize balanced_zero_congruence_implies_multiple p - 0080
specialize balanced_zero_congruence_implies_multiple ((a * x) * (a * x) + 1) - 0081
apply balanced_zero_congruence_implies_multiple - 0082
exact hroot_mod - 0083
specialize negative_one_norm_multiple_yields_predecessor_residue p - 0084
specialize negative_one_norm_multiple_yields_predecessor_residue n - 0085
specialize negative_one_norm_multiple_yields_predecessor_residue (a * x) - 0086
apply negative_one_norm_multiple_yields_predecessor_residue - 0087
exact hpredecessor - 0088
exact hroot_multiple