TS001R · theorem body

two_square_absolute_difference_square_balance

Alpha v34 checked-use · independently kernel and Lean verified; not Stable

A witnessed natural absolute difference satisfies the exact subtraction-free square balance.

historical independently replay-verified empty-context experiment; the experiment itself persisted no certificate and granted no release authority; current checked use follows separately sealed proof bundles; no Stable promotion.

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 u v m. (u = v + m \/ v = u + m) -> m * m + (u * v + u * v) = u * u + v * v

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

none

In local proof propositions

none
Exact expanded first-order statement
forall u v m. (u = v + m \/ v = u + m) -> m * m + (u * v + u * v) = u * u + v * v

Proof neighborhood

Direct theorem prerequisites

mul_add · Stable closed add_mul · Stable closed mul_assoc · Stable closed mul_comm · Stable closed add_assoc · Stable closed add_comm · Stable closed TS001P two_square_add_swap_nested

Direct 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

37 script commands · 14 reading checkpoints · 0 local claims

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.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

Named ingredients (1)
01Fix variables and assumptionsL1–4

Work with arbitrary variables or the premises of the current implication.

  1. L1
    intro u
  2. L2
    intro v
  3. L3
    intro m
  4. L4
    intro hdifference
02Separate the logical casesL5–5

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L5
    cases hdifference
03Calculate and transport equalitiesL6–11

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L6
    rewrite hdifference_left
  2. L7
    rewrite hdifference_left
  3. L8
    rewrite hdifference_left
  4. L9
    rewrite hdifference_left
  5. L10
    simp [mul_add, add_mul, mul_assoc, mul_comm, add_assoc, add_comm]
  6. L11
    trans v * v + (m * m + (m * v + (m * v + v * v)))
04Use earlier factsL12–12

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L12
    apply two_square_add_swap_nested
05Calculate and transport equalitiesL13–15

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L13
    trans v * v + (m * v + (m * m + (m * v + v * v)))
  2. L14
    congr
  3. L15
    refl
06Use earlier factsL16–16

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L16
    apply two_square_add_swap_nested
07Calculate and transport equalitiesL17–20

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L17
    congr
  2. L18
    refl
  3. L19
    congr
  4. L20
    refl
08Use earlier factsL21–21

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L21
    apply two_square_add_swap_nested
09Calculate and transport equalitiesL22–27

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L22
    rewrite hdifference_right
  2. L23
    rewrite hdifference_right
  3. L24
    rewrite hdifference_right
  4. L25
    rewrite hdifference_right
  5. L26
    simp [mul_add, add_mul, mul_assoc, mul_comm, add_assoc, add_comm]
  6. L27
    trans u * u + (m * m + (m * u + (m * u + u * u)))
10Use earlier factsL28–28

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L28
    apply two_square_add_swap_nested
11Calculate and transport equalitiesL29–31

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L29
    trans u * u + (m * u + (m * m + (m * u + u * u)))
  2. L30
    congr
  3. L31
    refl
12Use earlier factsL32–32

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L32
    apply two_square_add_swap_nested
13Calculate and transport equalitiesL33–36

Carry out the recorded arithmetic or equality steps; inspect the exact commands for their direction and premises.

  1. L33
    congr
  2. L34
    refl
  3. L35
    congr
  4. L36
    refl
14Use earlier factsL37–37

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L37
    apply two_square_add_swap_nested

Library-wide reading audit

Original defined command ledger · 37 lines
  1. 0001intro u
  2. 0002intro v
  3. 0003intro m
  4. 0004intro hdifference
  5. 0005cases hdifference
  6. 0006rewrite hdifference_left
  7. 0007rewrite hdifference_left
  8. 0008rewrite hdifference_left
  9. 0009rewrite hdifference_left
  10. 0010simp [mul_add, add_mul, mul_assoc, mul_comm, add_assoc, add_comm]
  11. 0011trans v * v + (m * m + (m * v + (m * v + v * v)))
  12. 0012apply two_square_add_swap_nested
  13. 0013trans v * v + (m * v + (m * m + (m * v + v * v)))
  14. 0014congr
  15. 0015refl
  16. 0016apply two_square_add_swap_nested
  17. 0017congr
  18. 0018refl
  19. 0019congr
  20. 0020refl
  21. 0021apply two_square_add_swap_nested
  22. 0022rewrite hdifference_right
  23. 0023rewrite hdifference_right
  24. 0024rewrite hdifference_right
  25. 0025rewrite hdifference_right
  26. 0026simp [mul_add, add_mul, mul_assoc, mul_comm, add_assoc, add_comm]
  27. 0027trans u * u + (m * m + (m * u + (m * u + u * u)))
  28. 0028apply two_square_add_swap_nested
  29. 0029trans u * u + (m * u + (m * m + (m * u + u * u)))
  30. 0030congr
  31. 0031refl
  32. 0032apply two_square_add_swap_nested
  33. 0033congr
  34. 0034refl
  35. 0035congr
  36. 0036refl
  37. 0037apply two_square_add_swap_nested