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 first-order arithmetic statement
forall p n q m s. (((p) + (m)) = ((q) + (n))) -> (((((p) * (p))) + (((n) * (n)))) = ((s) + (((((p) * (n))) + (((n) * (p))))))) -> (((((q) * (q))) + (((m) * (m)))) = ((s) + (((((q) * (m))) + (((m) * (q)))))))Constructive proof overview
Generated structural guide
Squaring respects equality of represented integers, not equality of positive and negative components.
The unchanged tactic script uses 5 declared prerequisites and contains 28 exact native proof lines.
Alpha v34 checked-use · first admitted v28 · independently kernel and Lean verified; not Stable
Proof neighborhood
Direct dependencies
matrix_integer_pair_product_balance Alpha theorem; checked-use authorized add_right_cancel Stable theorem; checked-use authorized add_assoc Stable theorem; checked-use authorized add_comm Stable theorem; checked-use authorized four_square_add_swap_right_tail Alpha theorem; checked-use authorizedDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. This exact body belongs to a complete independently kernel-checked constructive proof bundle and has Alpha checked-use authority; it does not imply Stable membership.
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.
01Fix variables and assumptionsL1–7
02Establish hproductL8–17
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply matrix integer pair product balance.
- L8
have hproduct : ((((((p) * (p))) + (((n) * (n))))) + (((((q) * (m))) + (((m) * (q)))))) = ((((((q) * (q))) + (((m) * (m))))) + (((((p) * (n))) + (((n) * (p)))))) - L9
specialize matrix_integer_pair_product_balance p - L10
specialize matrix_integer_pair_product_balance n - L11
specialize matrix_integer_pair_product_balance q - L12
specialize matrix_integer_pair_product_balance m - L13
specialize matrix_integer_pair_product_balance p - L14
specialize matrix_integer_pair_product_balance n - L15
specialize matrix_integer_pair_product_balance q - L16
specialize matrix_integer_pair_product_balance m - L17
apply matrix_integer_pair_product_balance
03Use earlier factsL18–23
Instantiate or apply named facts and discharge the corresponding proof obligations.
04Calculate and transport equalitiesL24–25
05Use earlier factsL26–26
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L26
exact hproduct
Original exact command ledger · 28 lines
- 0001
intro p - 0002
intro n - 0003
intro q - 0004
intro m - 0005
intro s - 0006
intro hequal - 0007
intro hsquare - 0008
have hproduct : ((((((p) * (p))) + (((n) * (n))))) + (((((q) * (m))) + (((m) * (q)))))) = ((((((q) * (q))) + (((m) * (m))))) + (((((p) * (n))) + (((n) * (p)))))) - 0009
specialize matrix_integer_pair_product_balance p - 0010
specialize matrix_integer_pair_product_balance n - 0011
specialize matrix_integer_pair_product_balance q - 0012
specialize matrix_integer_pair_product_balance m - 0013
specialize matrix_integer_pair_product_balance p - 0014
specialize matrix_integer_pair_product_balance n - 0015
specialize matrix_integer_pair_product_balance q - 0016
specialize matrix_integer_pair_product_balance m - 0017
apply matrix_integer_pair_product_balance - 0018
exact hequal - 0019
exact hequal - 0020
specialize add_right_cancel ((((q) * (q))) + (((m) * (m)))) - 0021
specialize add_right_cancel ((s) + (((((q) * (m))) + (((m) * (q)))))) - 0022
specialize add_right_cancel ((((p) * (n))) + (((n) * (p)))) - 0023
apply add_right_cancel - 0024
trans ((((((p) * (p))) + (((n) * (n))))) + (((((q) * (m))) + (((m) * (q)))))) - 0025
symm - 0026
exact hproduct - 0027
rewrite hsquare - 0028
simp [add_assoc, add_comm, four_square_add_swap_right_tail]