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 → QRes(p,a) ∨ ¬QRes(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
6 occurrences
Exact expanded native-PA statement
forall p a. ~(p = 0) -> (exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded) \/ ~(exists qr_x_unbounded. exists qr_u_unbounded qr_v_unbounded. qr_x_unbounded * qr_x_unbounded + p * qr_u_unbounded = a + p * qr_v_unbounded)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 hequivL4–8
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply quadratic residue bounded equiv.
- L4
have hequiv : (QRes(p,a) → BoundedQRes(p,a)) ∧ (BoundedQRes(p,a) → QRes(p,a))Definitions: QRes(p,a)BoundedQRes(p,a)Original native command in the exact edition - L5
specialize quadratic_residue_bounded_equiv p - L6
specialize quadratic_residue_bounded_equiv a - L7
apply quadratic_residue_bounded_equiv - L8
exact hp
03Separate the logical casesL9–9
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L9
cases hequiv
04Establish hdecL10–14
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply quadratic residue bounded decidable nonzero.
- L10
have hdec : BoundedQRes(p,a) ∨ ¬BoundedQRes(p,a)Definitions: BoundedQRes(p,a)Original native command in the exact edition - L11
specialize quadratic_residue_bounded_decidable_nonzero p - L12
specialize quadratic_residue_bounded_decidable_nonzero a - L13
apply quadratic_residue_bounded_decidable_nonzero - L14
exact hp
05Separate the logical casesL15–16
06Use earlier factsL17–18
07Separate the logical casesL19–19
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L19
right
08Fix variables and assumptionsL20–20
Work with arbitrary variables or the premises of the current implication.
- L20
intro hunbounded
Original defined command ledger · 23 lines
- 0001
intro p - 0002
intro a - 0003
intro hp - 0004
have hequiv : (QRes(p,a) → BoundedQRes(p,a)) ∧ (BoundedQRes(p,a) → QRes(p,a))Exact native replay line
have hequiv : (((exists x. exists u v. x * x + p * u = a + p * v) -> (exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v)) /\ ((exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v) -> (exists x. exists u v. x * x + p * u = a + p * v))) - 0005
specialize quadratic_residue_bounded_equiv p - 0006
specialize quadratic_residue_bounded_equiv a - 0007
apply quadratic_residue_bounded_equiv - 0008
exact hp - 0009
cases hequiv - 0010
have hdec : BoundedQRes(p,a) ∨ ¬BoundedQRes(p,a)Exact native replay line
have hdec : (exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v) \/ ~(exists r. (exists h. h + S r = p) /\ exists u v. r * r + p * u = a + p * v) - 0011
specialize quadratic_residue_bounded_decidable_nonzero p - 0012
specialize quadratic_residue_bounded_decidable_nonzero a - 0013
apply quadratic_residue_bounded_decidable_nonzero - 0014
exact hp - 0015
cases hdec - 0016
left - 0017
apply hequiv_right - 0018
exact hdec_left - 0019
right - 0020
intro hunbounded - 0021
apply hdec_right - 0022
apply hequiv_left - 0023
exact hunbounded