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 = 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_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) -> (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)))Structural proof guide
Generated structural guide
Every square witness has an equivalent canonical bounded root.
Use the direct prerequisites division_remainder_exists, square_residue_witness, remainder_decomposition_to_mod_eq, mod_eq_symm, mod_eq_trans, mul_comm, zero_add as previously established PA formulas.
The proof proceeds by case analysis (7), intermediate claims (6), certified simplification (1).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA001D division_remainder_exists PA005Q square_residue_witness PA003C remainder_decomposition_to_mod_eq PA003L mod_eq_symm PA0024 mod_eq_trans PA000H mul_comm PA0001 zero_addDirect 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 (7)
01Fix variables and assumptionsL1–3
02Separate the logical casesL4–4
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L4
split
03Fix variables and assumptionsL5–5
Work with arbitrary variables or the premises of the current implication.
- L5
intro hunbounded
04Separate the logical casesL6–6
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L6
cases hunbounded
05Establish hdivisionL7–11
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply division remainder exists.
06Separate the logical casesL12–14
07Establish hsquareL15–24
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply square residue witness.
- L15
have hsquare : exists w. x * x = p * w + x2 * x2 - L16
specialize square_residue_witness p - L17
specialize square_residue_witness x - L18
specialize square_residue_witness x1 - L19
specialize square_residue_witness x2 - L20
specialize square_residue_witness 0 - L21
specialize square_residue_witness (x2 * x2) - L22
apply square_residue_witness - L23
exact hdivision_witness_witness_left - L24
simp
08Use earlier factsL25–25
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L25
specialize zero_add (x2 * x2)
09Calculate and transport equalitiesL26–26
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L26
symm
10Use earlier factsL27–27
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L27
exact zero_add
11Separate the logical casesL28–28
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L28
cases hsquare
12Establish hdecompL29–34
13Establish hxrL35–41
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply remainder decomposition to mod eq.
- L35
have hxr : exists u v. x * x + p * u = x2 * x2 + p * v - L36
specialize remainder_decomposition_to_mod_eq p - L37
specialize remainder_decomposition_to_mod_eq (x * x) - L38
specialize remainder_decomposition_to_mod_eq x3 - L39
specialize remainder_decomposition_to_mod_eq (x2 * x2) - L40
apply remainder_decomposition_to_mod_eq - L41
exact hdecomp
14Establish hrxL42–47
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq symm.
15Establish hraL48–55
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod eq trans.
16Construct an explicit witnessL56–56
Supply the displayed value, then prove that it has the required property.
- L56
exists x2
17Separate the logical casesL57–57
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L57
split
18Use earlier factsL58–59
19Fix variables and assumptionsL60–60
Work with arbitrary variables or the premises of the current implication.
- L60
intro hbounded
20Separate the logical casesL61–62
21Construct an explicit witnessL63–63
Supply the displayed value, then prove that it has the required property.
- L63
exists x
22Use earlier factsL64–64
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L64
exact hbounded_witness_right
Original exact command ledger · 64 lines
- 0001
intro p - 0002
intro a - 0003
intro hp - 0004
split - 0005
intro hunbounded - 0006
cases hunbounded - 0007
have hdivision : exists q r. x = p * q + r /\ exists h. h + S r = p - 0008
specialize division_remainder_exists p - 0009
specialize division_remainder_exists x - 0010
apply division_remainder_exists - 0011
exact hp - 0012
cases hdivision - 0013
cases hdivision_witness - 0014
cases hdivision_witness_witness - 0015
have hsquare : exists w. x * x = p * w + x2 * x2 - 0016
specialize square_residue_witness p - 0017
specialize square_residue_witness x - 0018
specialize square_residue_witness x1 - 0019
specialize square_residue_witness x2 - 0020
specialize square_residue_witness 0 - 0021
specialize square_residue_witness (x2 * x2) - 0022
apply square_residue_witness - 0023
exact hdivision_witness_witness_left - 0024
simp - 0025
specialize zero_add (x2 * x2) - 0026
symm - 0027
exact zero_add - 0028
cases hsquare - 0029
have hdecomp : x * x = x3 * p + x2 * x2 - 0030
trans p * x3 + x2 * x2 - 0031
exact hsquare_witness - 0032
congr - 0033
apply mul_comm - 0034
refl - 0035
have hxr : exists u v. x * x + p * u = x2 * x2 + p * v - 0036
specialize remainder_decomposition_to_mod_eq p - 0037
specialize remainder_decomposition_to_mod_eq (x * x) - 0038
specialize remainder_decomposition_to_mod_eq x3 - 0039
specialize remainder_decomposition_to_mod_eq (x2 * x2) - 0040
apply remainder_decomposition_to_mod_eq - 0041
exact hdecomp - 0042
have hrx : exists u v. x2 * x2 + p * u = x * x + p * v - 0043
specialize mod_eq_symm p - 0044
specialize mod_eq_symm (x * x) - 0045
specialize mod_eq_symm (x2 * x2) - 0046
apply mod_eq_symm - 0047
exact hxr - 0048
have hra : exists u v. x2 * x2 + p * u = a + p * v - 0049
specialize mod_eq_trans p - 0050
specialize mod_eq_trans (x2 * x2) - 0051
specialize mod_eq_trans (x * x) - 0052
specialize mod_eq_trans a - 0053
apply mod_eq_trans - 0054
exact hrx - 0055
exact hunbounded_witness - 0056
exists x2 - 0057
split - 0058
exact hdivision_witness_witness_right - 0059
exact hra - 0060
intro hbounded - 0061
cases hbounded - 0062
cases hbounded_witness - 0063
exists x - 0064
exact hbounded_witness_right