GI0006

gaussian_signed_square_exists

Construct the actual natural square of every represented integer from its witnessed absolute difference.

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. ∃ s. SignedDifferenceSquare(p,n,s)

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

Definition DAG

Actual proof prerequisites

matrix_lattice_absolute_difference_exists · checked external prerequisitefour_square_absolute_square_balance · checked external prerequisite
Original expanded first-order statement
forall p n. exists s. (((((p) * (p))) + (((n) * (n)))) = ((s) + (((((p) * (n))) + (((n) * (p)))))))

Complete tactic proof in conservative notation

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

11 script commands · 5 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.

01Fix variables and assumptionsL1–2

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

  1. L1
    intro p
  2. L2
    intro n
02Use earlier factsL3–4

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

  1. L3
    specialize matrix_lattice_absolute_difference_exists p
  2. L4
    specialize matrix_lattice_absolute_difference_exists n
03Separate the logical casesL5–5

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

  1. L5
    cases matrix_lattice_absolute_difference_exists
04Construct an explicit witnessL6–6

Supply the displayed value, then prove that it has the required property.

  1. L6
    exists x * x
05Use earlier factsL7–11

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

  1. L7
    specialize four_square_absolute_square_balance p
  2. L8
    specialize four_square_absolute_square_balance n
  3. L9
    specialize four_square_absolute_square_balance x
  4. L10
    apply four_square_absolute_square_balance
  5. L11
    exact matrix_lattice_absolute_difference_exists_witness

Library-wide reading audit

Original defined command ledger · 11 lines
  1. 0001intro p
  2. 0002intro n
  3. 0003specialize matrix_lattice_absolute_difference_exists p
  4. 0004specialize matrix_lattice_absolute_difference_exists n
  5. 0005cases matrix_lattice_absolute_difference_exists
  6. 0006exists x * x
  7. 0007specialize four_square_absolute_square_balance p
  8. 0008specialize four_square_absolute_square_balance n
  9. 0009specialize four_square_absolute_square_balance x
  10. 0010apply four_square_absolute_square_balance
  11. 0011exact matrix_lattice_absolute_difference_exists_witness