GI0009

gaussian_signed_square_integer_transport

Alpha v34 independently verified · alpha_closed; checked-use authorized; not Stable

Squaring respects equality of represented integers, not equality of positive and negative components.

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 authorized

Direct 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

28 script commands · 6 reading checkpoints · 1 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.

01Fix variables and assumptionsL1–7

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 hequal
  7. L7
    intro hsquare
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.

  1. L8
    have hproduct : ((((((p) * (p))) + (((n) * (n))))) + (((((q) * (m))) + (((m) * (q)))))) = ((((((q) * (q))) + (((m) * (m))))) + (((((p) * (n))) + (((n) * (p))))))
  2. L9
    specialize matrix_integer_pair_product_balance p
  3. L10
    specialize matrix_integer_pair_product_balance n
  4. L11
    specialize matrix_integer_pair_product_balance q
  5. L12
    specialize matrix_integer_pair_product_balance m
  6. L13
    specialize matrix_integer_pair_product_balance p
  7. L14
    specialize matrix_integer_pair_product_balance n
  8. L15
    specialize matrix_integer_pair_product_balance q
  9. L16
    specialize matrix_integer_pair_product_balance m
  10. L17
    apply matrix_integer_pair_product_balance
03Use earlier factsL18–23

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

  1. L18
    exact hequal
  2. L19
    exact hequal
  3. L20
    specialize add_right_cancel ((((q) * (q))) + (((m) * (m))))
  4. L21
    specialize add_right_cancel ((s) + (((((q) * (m))) + (((m) * (q))))))
  5. L22
    specialize add_right_cancel ((((p) * (n))) + (((n) * (p))))
  6. L23
    apply add_right_cancel
04Calculate and transport equalitiesL24–25

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

  1. L24
    trans ((((((p) * (p))) + (((n) * (n))))) + (((((q) * (m))) + (((m) * (q))))))
  2. L25
    symm
05Use earlier factsL26–26

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

  1. L26
    exact hproduct
06Calculate and transport equalitiesL27–28

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

  1. L27
    rewrite hsquare
  2. L28
    simp [add_assoc, add_comm, four_square_add_swap_right_tail]

Library-wide reading audit

Original exact command ledger · 28 lines
  1. 0001intro p
  2. 0002intro n
  3. 0003intro q
  4. 0004intro m
  5. 0005intro s
  6. 0006intro hequal
  7. 0007intro hsquare
  8. 0008have hproduct : ((((((p) * (p))) + (((n) * (n))))) + (((((q) * (m))) + (((m) * (q)))))) = ((((((q) * (q))) + (((m) * (m))))) + (((((p) * (n))) + (((n) * (p))))))
  9. 0009specialize matrix_integer_pair_product_balance p
  10. 0010specialize matrix_integer_pair_product_balance n
  11. 0011specialize matrix_integer_pair_product_balance q
  12. 0012specialize matrix_integer_pair_product_balance m
  13. 0013specialize matrix_integer_pair_product_balance p
  14. 0014specialize matrix_integer_pair_product_balance n
  15. 0015specialize matrix_integer_pair_product_balance q
  16. 0016specialize matrix_integer_pair_product_balance m
  17. 0017apply matrix_integer_pair_product_balance
  18. 0018exact hequal
  19. 0019exact hequal
  20. 0020specialize add_right_cancel ((((q) * (q))) + (((m) * (m))))
  21. 0021specialize add_right_cancel ((s) + (((((q) * (m))) + (((m) * (q))))))
  22. 0022specialize add_right_cancel ((((p) * (n))) + (((n) * (p))))
  23. 0023apply add_right_cancel
  24. 0024trans ((((((p) * (p))) + (((n) * (n))))) + (((((q) * (m))) + (((m) * (q))))))
  25. 0025symm
  26. 0026exact hproduct
  27. 0027rewrite hsquare
  28. 0028simp [add_assoc, add_comm, four_square_add_swap_right_tail]