GI0011

gaussian_signed_square_difference_compensation

Exact signed cross-term compensation for a squared difference; sign reversal preserves the same actual square.

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

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 + m,n + q,z) → z + (p · q + n · m + (p · q + n · m)) = s + t + (p · m + n · q + (p · m + n · q))

Every linked abbreviation expands hygienically to the identical original native formula.

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall p n q m s t z. (((((p) * (p))) + (((n) * (n)))) = ((s) + (((((p) * (n))) + (((n) * (p))))))) -> (((((q) * (q))) + (((m) * (m)))) = ((t) + (((((q) * (m))) + (((m) * (q))))))) -> (((((((p) + (m))) * (((p) + (m))))) + (((((n) + (q))) * (((n) + (q)))))) = ((z) + (((((((p) + (m))) * (((n) + (q))))) + (((((n) + (q))) * (((p) + (m))))))))) -> ((z) + (((((((p) * (q))) + (((n) * (m))))) + (((((p) * (q))) + (((n) * (m)))))))) = ((s + t) + (((((((p) * (m))) + (((n) * (q))))) + (((((p) * (m))) + (((n) * (q))))))))

Complete tactic proof in conservative notation

All 25 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

25 script commands · 3 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 (2)
01Fix variables and assumptionsL1–10

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

  1. L1
    intro p
  2. L2
    intro n
  3. L3
    intro q
  4. L4
    intro m
  5. L5
    intro s
  6. L6
    intro t
  7. L7
    intro z
  8. L8
    intro hfirst
  9. L9
    intro hsecond
  10. L10
    intro hdifference
02Use earlier factsL11–20

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

  1. L11
    specialize gaussian_signed_square_sum_compensation p
  2. L12
    specialize gaussian_signed_square_sum_compensation n
  3. L13
    specialize gaussian_signed_square_sum_compensation m
  4. L14
    specialize gaussian_signed_square_sum_compensation q
  5. L15
    specialize gaussian_signed_square_sum_compensation s
  6. L16
    specialize gaussian_signed_square_sum_compensation t
  7. L17
    specialize gaussian_signed_square_sum_compensation z
  8. L18
    apply gaussian_signed_square_sum_compensation
  9. L19
    exact hfirst
  10. L20
    specialize gaussian_signed_square_negated q
03Use earlier factsL21–25

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

  1. L21
    specialize gaussian_signed_square_negated m
  2. L22
    specialize gaussian_signed_square_negated t
  3. L23
    apply gaussian_signed_square_negated
  4. L24
    exact hsecond
  5. L25
    exact hdifference

Library-wide reading audit

Original defined command ledger · 25 lines
  1. 0001intro p
  2. 0002intro n
  3. 0003intro q
  4. 0004intro m
  5. 0005intro s
  6. 0006intro t
  7. 0007intro z
  8. 0008intro hfirst
  9. 0009intro hsecond
  10. 0010intro hdifference
  11. 0011specialize gaussian_signed_square_sum_compensation p
  12. 0012specialize gaussian_signed_square_sum_compensation n
  13. 0013specialize gaussian_signed_square_sum_compensation m
  14. 0014specialize gaussian_signed_square_sum_compensation q
  15. 0015specialize gaussian_signed_square_sum_compensation s
  16. 0016specialize gaussian_signed_square_sum_compensation t
  17. 0017specialize gaussian_signed_square_sum_compensation z
  18. 0018apply gaussian_signed_square_sum_compensation
  19. 0019exact hfirst
  20. 0020specialize gaussian_signed_square_negated q
  21. 0021specialize gaussian_signed_square_negated m
  22. 0022specialize gaussian_signed_square_negated t
  23. 0023apply gaussian_signed_square_negated
  24. 0024exact hsecond
  25. 0025exact hdifference