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.
The natural-code carrier consists of genuine pairs of the existing signed integers; no new primitive arithmetic is trusted. The theorem constructs quotient, remainder, and actual norm witnesses. Gaussian gcd, unique factorization, and prime classification are separate targets.
Exact theorem in conservative defined notation
∀ p. ∀ n. ∀ q. ∀ m. ∀ s. ∀ t. ∀ z. SignedDifferenceSquare(p,n,s) → SignedDifferenceSquare(q,m,t) → SignedDifferenceSquare(p + q,n + m,z) → z + (p · m + n · q + (p · m + n · q)) = s + t + (p · q + n · m + (p · q + n · m))
Every linked abbreviation expands hygienically to the identical original native formula.
Definition DAG
Actual proof prerequisites
Complete tactic proof in conservative notation
All 29 original proof lines are preserved. Only local proposition formulas are abbreviated; every abbreviation has an exact binder-safe expansion check. The linked exact edition contains the unchanged replay script.
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–10
02Use earlier factsL11–14
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L11
specialize add_right_cancel ((z) + (((((((p) * (m))) + (((n) * (q))))) + (((((p) * (m))) + (((n) * (q)))))))) - L12
specialize add_right_cancel ((s + t) + (((((((p) * (q))) + (((n) * (m))))) + (((((p) * (q))) + (((n) * (m)))))))) - L13
specialize add_right_cancel ((((((p) * (n))) + (((n) * (p))))) + (((((q) * (m))) + (((m) * (q)))))) - L14
apply add_right_cancel
03Calculate and transport equalitiesL15–20
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L15
trans ((z) + (((((((((p) * (n))) + (((n) * (p))))) + (((((q) * (m))) + (((m) * (q))))))) + (((((((p) * (m))) + (((n) * (q))))) + (((((p) * (m))) + (((n) * (q)))))))))) - L16
simp [add_assoc, add_comm, four_square_add_swap_right_tail] - L17
trans ((z) + (((((((p) + (q))) * (((n) + (m))))) + (((((n) + (m))) * (((p) + (q)))))))) - L18
congr - L19
refl - L20
symm
04Use earlier factsL21–21
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L21
apply gaussian_signed_sum_square_negative
05Calculate and transport equalitiesL22–23
06Use earlier factsL24–24
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L24
exact hsum
07Calculate and transport equalitiesL25–25
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L25
trans ((((((((p) * (p))) + (((n) * (n))))) + (((((q) * (q))) + (((m) * (m))))))) + (((((((p) * (q))) + (((n) * (m))))) + (((((p) * (q))) + (((n) * (m))))))))
08Use earlier factsL26–26
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L26
apply gaussian_signed_sum_square_positive
Original defined command ledger · 29 lines
- 0001
intro p - 0002
intro n - 0003
intro q - 0004
intro m - 0005
intro s - 0006
intro t - 0007
intro z - 0008
intro hfirst - 0009
intro hsecond - 0010
intro hsum - 0011
specialize add_right_cancel ((z) + (((((((p) * (m))) + (((n) * (q))))) + (((((p) * (m))) + (((n) * (q)))))))) - 0012
specialize add_right_cancel ((s + t) + (((((((p) * (q))) + (((n) * (m))))) + (((((p) * (q))) + (((n) * (m)))))))) - 0013
specialize add_right_cancel ((((((p) * (n))) + (((n) * (p))))) + (((((q) * (m))) + (((m) * (q)))))) - 0014
apply add_right_cancel - 0015
trans ((z) + (((((((((p) * (n))) + (((n) * (p))))) + (((((q) * (m))) + (((m) * (q))))))) + (((((((p) * (m))) + (((n) * (q))))) + (((((p) * (m))) + (((n) * (q)))))))))) - 0016
simp [add_assoc, add_comm, four_square_add_swap_right_tail] - 0017
trans ((z) + (((((((p) + (q))) * (((n) + (m))))) + (((((n) + (m))) * (((p) + (q)))))))) - 0018
congr - 0019
refl - 0020
symm - 0021
apply gaussian_signed_sum_square_negative - 0022
trans ((((((p) + (q))) * (((p) + (q))))) + (((((n) + (m))) * (((n) + (m)))))) - 0023
symm - 0024
exact hsum - 0025
trans ((((((((p) * (p))) + (((n) * (n))))) + (((((q) * (q))) + (((m) * (m))))))) + (((((((p) * (q))) + (((n) * (m))))) + (((((p) * (q))) + (((n) * (m)))))))) - 0026
apply gaussian_signed_sum_square_positive - 0027
rewrite hfirst - 0028
rewrite hsecond - 0029
simp [add_assoc, add_comm, four_square_add_swap_right_tail]