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. ∀ a. ¬p = 0 → BoundedQRes(p,a) ∨ ¬BoundedQRes(p,a)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
4 occurrences
Exact expanded native-PA statement
forall p a. ~(p = 0) -> (exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded) \/ ~(exists qr_x_bounded. (exists qr_h_bounded. qr_h_bounded + S qr_x_bounded = p) /\ exists qr_u_bounded qr_v_bounded. qr_x_bounded * qr_x_bounded + p * qr_u_bounded = a + p * qr_v_bounded)Proof neighborhood
Direct theorem prerequisites
Direct 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 (2)
01Fix variables and assumptionsL1–3
02Establish hsL4–7
03Separate the logical casesL8–8
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L8
cases hs
04Establish hsearchL9–14
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply quadratic residue search up to.
- L9
have hsearch : (∃ y. Le(y,x) ∧ ModEq(p,y · y,a)) ∨ (∀ y. Le(y,x) → ¬ModEq(p,y · y,a))Definitions: Le(y,x)ModEq(p,y · y,a)Original native command in the exact edition - L10
specialize quadratic_residue_search_up_to x - L11
specialize quadratic_residue_search_up_to p - L12
specialize quadratic_residue_search_up_to a - L13
apply quadratic_residue_search_up_to - L14
exact hp
05Separate the logical casesL15–18
06Construct an explicit witnessL19–19
Supply the displayed value, then prove that it has the required property.
- L19
exists x1
07Separate the logical casesL20–21
08Construct an explicit witnessL22–22
Supply the displayed value, then prove that it has the required property.
- L22
exists x2
09Calculate and transport equalitiesL23–23
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L23
trans S (x2 + x1)
10Use earlier factsL24–24
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L24
apply PA4
11Calculate and transport equalitiesL25–26
12Use earlier factsL27–27
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L27
exact hsearch_left_witness_left_witness
13Calculate and transport equalitiesL28–28
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L28
symm
14Use earlier factsL29–30
15Separate the logical casesL31–31
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L31
right
16Fix variables and assumptionsL32–32
Work with arbitrary variables or the premises of the current implication.
- L32
intro hbounded
17Separate the logical casesL33–34
18Use earlier factsL35–36
19Separate the logical casesL37–37
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L37
cases hbounded_witness_left
20Construct an explicit witnessL38–38
Supply the displayed value, then prove that it has the required property.
- L38
exists x2
21Use earlier factsL39–39
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L39
apply PA2
22Calculate and transport equalitiesL40–41
23Use earlier factsL42–42
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L42
apply PA4
24Calculate and transport equalitiesL43–43
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L43
trans p
Original defined command ledger · 46 lines
- 0001
intro p - 0002
intro a - 0003
intro hp - 0004
have hs : exists B. p = S B - 0005
specialize nonzero_is_succ p - 0006
apply nonzero_is_succ - 0007
exact hp - 0008
cases hs - 0009
have hsearch : (∃ y. Le(y,x) ∧ ModEq(p,y · y,a)) ∨ (∀ y. Le(y,x) → ¬ModEq(p,y · y,a))Exact native replay line
have hsearch : (exists r. (exists h. h + r = x) /\ exists u v. r * r + p * u = a + p * v) \/ (forall r. (exists h. h + r = x) -> ~(exists u v. r * r + p * u = a + p * v)) - 0010
specialize quadratic_residue_search_up_to x - 0011
specialize quadratic_residue_search_up_to p - 0012
specialize quadratic_residue_search_up_to a - 0013
apply quadratic_residue_search_up_to - 0014
exact hp - 0015
cases hsearch - 0016
left - 0017
cases hsearch_left - 0018
cases hsearch_left_witness - 0019
exists x1 - 0020
split - 0021
cases hsearch_left_witness_left - 0022
exists x2 - 0023
trans S (x2 + x1) - 0024
apply PA4 - 0025
trans S x - 0026
congr - 0027
exact hsearch_left_witness_left_witness - 0028
symm - 0029
exact hs_witness - 0030
exact hsearch_left_witness_right - 0031
right - 0032
intro hbounded - 0033
cases hbounded - 0034
cases hbounded_witness - 0035
specialize hsearch_right x1 - 0036
apply hsearch_right - 0037
cases hbounded_witness_left - 0038
exists x2 - 0039
apply PA2 - 0040
trans x2 + S x1 - 0041
symm - 0042
apply PA4 - 0043
trans p - 0044
exact hbounded_witness_left_witness - 0045
exact hs_witness - 0046
exact hbounded_witness_right