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
forall x y z w. (x + y + z + w) * (x + y + z + w) = ((x * x + y * y + z * z) + w * w) + (((x * y + y * x) + (x * z + z * x) + (y * z + z * y)) + ((w * x + x * w) + (w * y + y * w) + (w * z + z * w)))Every purple notation token opens its conservative definition. This reading surface never changes the unchanged intuitionistic kernel or confers checked-use authority.
Definitions used by this theorem
In the theorem statement
In local proof propositions
Exact expanded first-order statement
forall x y z w. (x + y + z + w) * (x + y + z + w) = ((x * x + y * y + z * z) + w * w) + (((x * y + y * x) + (x * z + z * x) + (y * z + z * y)) + ((w * x + x * w) + (w * y + y * w) + (w * z + z * w)))Proof neighborhood
Direct theorem prerequisites
FS005F four_square_signed_sum_two_decomposition FS002O four_square_euler_three_square_expansion FS002P four_square_euler_cross_triple_expansion add_comm · Stable closed add_shuffle_middle · Alpha closed add_assoc · Stable closed FS0006 four_square_add_swap_right_tailDirect theorem dependents
Definition-aware tactic body
Only propositions whose conservative expansion has been checked for exact first-order equivalence are compacted. Every changed line retains its immutable exact replay 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 (4)
01Fix variables and assumptionsL1–4
02Establish htwoL5–9
Establish this local claim before using it. It is not an additional assumption.
- L5
have htwo : ((x + y + z) + w) * ((x + y + z) + w) = ((x + y + z) * (x + y + z) + w * w) + ((x + y + z) * w + w * (x + y + z)) - L6
specialize four_square_signed_sum_two_decomposition (x + y + z) - L7
specialize four_square_signed_sum_two_decomposition w - L8
exact four_square_signed_sum_two_decomposition - L9
rewrite htwo
03Establish hthreeL10–15
Establish this local claim before using it. It is not an additional assumption.
- L10
have hthree : (x + y + z) * (x + y + z) = (x * x + y * y + z * z) + ((x * y + y * x) + (x * z + z * x) + (y * z + z * y)) - L11
specialize four_square_euler_three_square_expansion x - L12
specialize four_square_euler_three_square_expansion y - L13
specialize four_square_euler_three_square_expansion z - L14
exact four_square_euler_three_square_expansion - L15
rewrite hthree
04Establish hcrossL16–25
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply add comm.
- L16
have hcross : (x + y + z) * w + w * (x + y + z) = (w * x + x * w) + (w * y + y * w) + (w * z + z * w) - L17
trans w * (x + y + z) + (x + y + z) * w - L18
apply add_comm - L19
specialize four_square_euler_cross_triple_expansion w - L20
specialize four_square_euler_cross_triple_expansion x - L21
specialize four_square_euler_cross_triple_expansion y - L22
specialize four_square_euler_cross_triple_expansion z - L23
exact four_square_euler_cross_triple_expansion - L24
rewrite hcross - L25
trans ((x * x + y * y + z * z) + (((x * y + y * x) + (x * z + z * x) + (y * z + z * y)) + ((w * w) + ((w * x + x * w) + (w * y + y * w) + (w * z + z * w)))))
05Calculate and transport equalitiesL26–30
Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.
- L26
simp [add_assoc] - L27
trans ((x * x + y * y + z * z) + ((w * w) + (((x * y + y * x) + (x * z + z * x) + (y * z + z * y)) + ((w * x + x * w) + (w * y + y * w) + (w * z + z * w))))) - L28
congr - L29
refl - L30
trans ((w * w) + (((x * y + y * x) + (x * z + z * x) + (y * z + z * y)) + ((w * x + x * w) + (w * y + y * w) + (w * z + z * w))))
06Use earlier factsL31–31
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L31
apply four_square_add_swap_right_tail
Original defined command ledger · 36 lines
- 0001
intro x - 0002
intro y - 0003
intro z - 0004
intro w - 0005
have htwo : ((x + y + z) + w) * ((x + y + z) + w) = ((x + y + z) * (x + y + z) + w * w) + ((x + y + z) * w + w * (x + y + z)) - 0006
specialize four_square_signed_sum_two_decomposition (x + y + z) - 0007
specialize four_square_signed_sum_two_decomposition w - 0008
exact four_square_signed_sum_two_decomposition - 0009
rewrite htwo - 0010
have hthree : (x + y + z) * (x + y + z) = (x * x + y * y + z * z) + ((x * y + y * x) + (x * z + z * x) + (y * z + z * y)) - 0011
specialize four_square_euler_three_square_expansion x - 0012
specialize four_square_euler_three_square_expansion y - 0013
specialize four_square_euler_three_square_expansion z - 0014
exact four_square_euler_three_square_expansion - 0015
rewrite hthree - 0016
have hcross : (x + y + z) * w + w * (x + y + z) = (w * x + x * w) + (w * y + y * w) + (w * z + z * w) - 0017
trans w * (x + y + z) + (x + y + z) * w - 0018
apply add_comm - 0019
specialize four_square_euler_cross_triple_expansion w - 0020
specialize four_square_euler_cross_triple_expansion x - 0021
specialize four_square_euler_cross_triple_expansion y - 0022
specialize four_square_euler_cross_triple_expansion z - 0023
exact four_square_euler_cross_triple_expansion - 0024
rewrite hcross - 0025
trans ((x * x + y * y + z * z) + (((x * y + y * x) + (x * z + z * x) + (y * z + z * y)) + ((w * w) + ((w * x + x * w) + (w * y + y * w) + (w * z + z * w))))) - 0026
simp [add_assoc] - 0027
trans ((x * x + y * y + z * z) + ((w * w) + (((x * y + y * x) + (x * z + z * x) + (y * z + z * y)) + ((w * x + x * w) + (w * y + y * w) + (w * z + z * w))))) - 0028
congr - 0029
refl - 0030
trans ((w * w) + (((x * y + y * x) + (x * z + z * x) + (y * z + z * y)) + ((w * x + x * w) + (w * y + y * w) + (w * z + z * w)))) - 0031
apply four_square_add_swap_right_tail - 0032
congr - 0033
refl - 0034
refl - 0035
symm - 0036
simp [add_assoc]