GI003D

gaussian_decode_from_signed_codes

Pair two actual normalized signed-integer codes into their genuine canonical natural Gaussian coordinate code.

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

∀ rc. ∀ ic. ∀ a. ∀ b. ∀ c. ∀ d. SignedDecode(rc,a,b)SignedDecode(ic,c,d) → ∃ x. ZPairDecode(x,a,b,c,d)

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

Definition DAG

Actual proof prerequisites

none
Original expanded first-order statement
forall rc ic a b c d. ((((rc) = 2 * (a) /\ (b) = 0) \/ exists ge_signed_half_from_signed_real. (((rc) = 2 * ge_signed_half_from_signed_real + 1 /\ (a) = 0) /\ (b) = S ge_signed_half_from_signed_real))) -> ((((ic) = 2 * (c) /\ (d) = 0) \/ exists ge_signed_half_from_signed_imaginary. (((ic) = 2 * ge_signed_half_from_signed_imaginary + 1 /\ (c) = 0) /\ (d) = S ge_signed_half_from_signed_imaginary))) -> exists z. (exists ge_real_code_from_signed_codes ge_imaginary_code_from_signed_codes. (((z) = ((ge_real_code_from_signed_codes) + (ge_imaginary_code_from_signed_codes)) * S ((ge_real_code_from_signed_codes) + (ge_imaginary_code_from_signed_codes)) + ((ge_imaginary_code_from_signed_codes) + (ge_imaginary_code_from_signed_codes))) /\ (((((ge_real_code_from_signed_codes) = 2 * (a) /\ (b) = 0) \/ exists ge_signed_half_ge_from_signed_codes_real. (((ge_real_code_from_signed_codes) = 2 * ge_signed_half_ge_from_signed_codes_real + 1 /\ (a) = 0) /\ (b) = S ge_signed_half_ge_from_signed_codes_real))) /\ ((((ge_imaginary_code_from_signed_codes) = 2 * (c) /\ (d) = 0) \/ exists ge_signed_half_ge_from_signed_codes_imaginary. (((ge_imaginary_code_from_signed_codes) = 2 * ge_signed_half_ge_from_signed_codes_imaginary + 1 /\ (c) = 0) /\ (d) = S ge_signed_half_ge_from_signed_codes_imaginary))))))

Complete tactic proof in conservative notation

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

16 script commands · 6 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–8

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

  1. L1
    intro rc
  2. L2
    intro ic
  3. L3
    intro a
  4. L4
    intro b
  5. L5
    intro c
  6. L6
    intro d
  7. L7
    intro hreal
  8. L8
    intro himaginary
02Construct an explicit witnessL9–11

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

  1. L9
    exists ((rc) + (ic)) * S ((rc) + (ic)) + ((ic) + (ic))
  2. L10
    exists rc
  3. L11
    exists ic
03Separate the logical casesL12–12

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

  1. L12
    split
04Calculate and transport equalitiesL13–13

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

  1. L13
    refl
05Separate the logical casesL14–14

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

  1. L14
    split
06Use earlier factsL15–16

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

  1. L15
    exact hreal
  2. L16
    exact himaginary

Library-wide reading audit

Original defined command ledger · 16 lines
  1. 0001intro rc
  2. 0002intro ic
  3. 0003intro a
  4. 0004intro b
  5. 0005intro c
  6. 0006intro d
  7. 0007intro hreal
  8. 0008intro himaginary
  9. 0009exists ((rc) + (ic)) * S ((rc) + (ic)) + ((ic) + (ic))
  10. 0010exists rc
  11. 0011exists ic
  12. 0012split
  13. 0013refl
  14. 0014split
  15. 0015exact hreal
  16. 0016exact himaginary