GI0056

gaussian_add_functional

Actual Gaussian add has one literal canonical natural output code, independent of all representative choices.

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

∀ ac. ∀ bc. ∀ cc. ∀ dd. ZPairAdd(ac,bc,cc)ZPairAdd(ac,bc,dd) → cc = dd

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall ac bc cc dd. (exists ge_first_rp_add_unique_first ge_first_rn_add_unique_first ge_first_ip_add_unique_first ge_first_in_add_unique_first ge_second_rp_add_unique_first ge_second_rn_add_unique_first ge_second_ip_add_unique_first ge_second_in_add_unique_first. ((exists ge_representation_real_code_add_unique_firstfirst ge_representation_imaginary_code_add_unique_firstfirst. (((ac) = ((ge_representation_real_code_add_unique_firstfirst) + (ge_representation_imaginary_code_add_unique_firstfirst)) * S ((ge_representation_real_code_add_unique_firstfirst) + (ge_representation_imaginary_code_add_unique_firstfirst)) + ((ge_representation_imaginary_code_add_unique_firstfirst) + (ge_representation_imaginary_code_add_unique_firstfirst))) /\ ((exists ge_balance_positive_add_unique_firstfirstreal ge_balance_negative_add_unique_firstfirstreal. (((((ge_representation_real_code_add_unique_firstfirst) = 2 * (ge_balance_positive_add_unique_firstfirstreal) /\ (ge_balance_negative_add_unique_firstfirstreal) = 0) \/ exists ge_signed_half_add_unique_firstfirstrealdecode. (((ge_representation_real_code_add_unique_firstfirst) = 2 * ge_signed_half_add_unique_firstfirstrealdecode + 1 /\ (ge_balance_positive_add_unique_firstfirstreal) = 0) /\ (ge_balance_negative_add_unique_firstfirstreal) = S ge_signed_half_add_unique_firstfirstrealdecode))) /\ ((ge_first_rp_add_unique_first) + ge_balance_negative_add_unique_firstfirstreal = (ge_first_rn_add_unique_first) + ge_balance_positive_add_unique_firstfirstreal))) /\ (exists ge_balance_positive_add_unique_firstfirstimaginary ge_balance_negative_add_unique_firstfirstimaginary. (((((ge_representation_imaginary_code_add_unique_firstfirst) = 2 * (ge_balance_positive_add_unique_firstfirstimaginary) /\ (ge_balance_negative_add_unique_firstfirstimaginary) = 0) \/ exists ge_signed_half_add_unique_firstfirstimaginarydecode. (((ge_representation_imaginary_code_add_unique_firstfirst) = 2 * ge_signed_half_add_unique_firstfirstimaginarydecode + 1 /\ (ge_balance_positive_add_unique_firstfirstimaginary) = 0) /\ (ge_balance_negative_add_unique_firstfirstimaginary) = S ge_signed_half_add_unique_firstfirstimaginarydecode))) /\ ((ge_first_ip_add_unique_first) + ge_balance_negative_add_unique_firstfirstimaginary = (ge_first_in_add_unique_first) + ge_balance_positive_add_unique_firstfirstimaginary)))))) /\ ((exists ge_representation_real_code_add_unique_firstsecond ge_representation_imaginary_code_add_unique_firstsecond. (((bc) = ((ge_representation_real_code_add_unique_firstsecond) + (ge_representation_imaginary_code_add_unique_firstsecond)) * S ((ge_representation_real_code_add_unique_firstsecond) + (ge_representation_imaginary_code_add_unique_firstsecond)) + ((ge_representation_imaginary_code_add_unique_firstsecond) + (ge_representation_imaginary_code_add_unique_firstsecond))) /\ ((exists ge_balance_positive_add_unique_firstsecondreal ge_balance_negative_add_unique_firstsecondreal. (((((ge_representation_real_code_add_unique_firstsecond) = 2 * (ge_balance_positive_add_unique_firstsecondreal) /\ (ge_balance_negative_add_unique_firstsecondreal) = 0) \/ exists ge_signed_half_add_unique_firstsecondrealdecode. (((ge_representation_real_code_add_unique_firstsecond) = 2 * ge_signed_half_add_unique_firstsecondrealdecode + 1 /\ (ge_balance_positive_add_unique_firstsecondreal) = 0) /\ (ge_balance_negative_add_unique_firstsecondreal) = S ge_signed_half_add_unique_firstsecondrealdecode))) /\ ((ge_second_rp_add_unique_first) + ge_balance_negative_add_unique_firstsecondreal = (ge_second_rn_add_unique_first) + ge_balance_positive_add_unique_firstsecondreal))) /\ (exists ge_balance_positive_add_unique_firstsecondimaginary ge_balance_negative_add_unique_firstsecondimaginary. (((((ge_representation_imaginary_code_add_unique_firstsecond) = 2 * (ge_balance_positive_add_unique_firstsecondimaginary) /\ (ge_balance_negative_add_unique_firstsecondimaginary) = 0) \/ exists ge_signed_half_add_unique_firstsecondimaginarydecode. (((ge_representation_imaginary_code_add_unique_firstsecond) = 2 * ge_signed_half_add_unique_firstsecondimaginarydecode + 1 /\ (ge_balance_positive_add_unique_firstsecondimaginary) = 0) /\ (ge_balance_negative_add_unique_firstsecondimaginary) = S ge_signed_half_add_unique_firstsecondimaginarydecode))) /\ ((ge_second_ip_add_unique_first) + ge_balance_negative_add_unique_firstsecondimaginary = (ge_second_in_add_unique_first) + ge_balance_positive_add_unique_firstsecondimaginary)))))) /\ (exists ge_representation_real_code_add_unique_firstoutput ge_representation_imaginary_code_add_unique_firstoutput. (((cc) = ((ge_representation_real_code_add_unique_firstoutput) + (ge_representation_imaginary_code_add_unique_firstoutput)) * S ((ge_representation_real_code_add_unique_firstoutput) + (ge_representation_imaginary_code_add_unique_firstoutput)) + ((ge_representation_imaginary_code_add_unique_firstoutput) + (ge_representation_imaginary_code_add_unique_firstoutput))) /\ ((exists ge_balance_positive_add_unique_firstoutputreal ge_balance_negative_add_unique_firstoutputreal. (((((ge_representation_real_code_add_unique_firstoutput) = 2 * (ge_balance_positive_add_unique_firstoutputreal) /\ (ge_balance_negative_add_unique_firstoutputreal) = 0) \/ exists ge_signed_half_add_unique_firstoutputrealdecode. (((ge_representation_real_code_add_unique_firstoutput) = 2 * ge_signed_half_add_unique_firstoutputrealdecode + 1 /\ (ge_balance_positive_add_unique_firstoutputreal) = 0) /\ (ge_balance_negative_add_unique_firstoutputreal) = S ge_signed_half_add_unique_firstoutputrealdecode))) /\ ((((ge_first_rp_add_unique_first) + (ge_second_rp_add_unique_first))) + ge_balance_negative_add_unique_firstoutputreal = (((ge_first_rn_add_unique_first) + (ge_second_rn_add_unique_first))) + ge_balance_positive_add_unique_firstoutputreal))) /\ (exists ge_balance_positive_add_unique_firstoutputimaginary ge_balance_negative_add_unique_firstoutputimaginary. (((((ge_representation_imaginary_code_add_unique_firstoutput) = 2 * (ge_balance_positive_add_unique_firstoutputimaginary) /\ (ge_balance_negative_add_unique_firstoutputimaginary) = 0) \/ exists ge_signed_half_add_unique_firstoutputimaginarydecode. (((ge_representation_imaginary_code_add_unique_firstoutput) = 2 * ge_signed_half_add_unique_firstoutputimaginarydecode + 1 /\ (ge_balance_positive_add_unique_firstoutputimaginary) = 0) /\ (ge_balance_negative_add_unique_firstoutputimaginary) = S ge_signed_half_add_unique_firstoutputimaginarydecode))) /\ ((((ge_first_ip_add_unique_first) + (ge_second_ip_add_unique_first))) + ge_balance_negative_add_unique_firstoutputimaginary = (((ge_first_in_add_unique_first) + (ge_second_in_add_unique_first))) + ge_balance_positive_add_unique_firstoutputimaginary))))))))) -> (exists ge_first_rp_add_unique_second ge_first_rn_add_unique_second ge_first_ip_add_unique_second ge_first_in_add_unique_second ge_second_rp_add_unique_second ge_second_rn_add_unique_second ge_second_ip_add_unique_second ge_second_in_add_unique_second. ((exists ge_representation_real_code_add_unique_secondfirst ge_representation_imaginary_code_add_unique_secondfirst. (((ac) = ((ge_representation_real_code_add_unique_secondfirst) + (ge_representation_imaginary_code_add_unique_secondfirst)) * S ((ge_representation_real_code_add_unique_secondfirst) + (ge_representation_imaginary_code_add_unique_secondfirst)) + ((ge_representation_imaginary_code_add_unique_secondfirst) + (ge_representation_imaginary_code_add_unique_secondfirst))) /\ ((exists ge_balance_positive_add_unique_secondfirstreal ge_balance_negative_add_unique_secondfirstreal. (((((ge_representation_real_code_add_unique_secondfirst) = 2 * (ge_balance_positive_add_unique_secondfirstreal) /\ (ge_balance_negative_add_unique_secondfirstreal) = 0) \/ exists ge_signed_half_add_unique_secondfirstrealdecode. (((ge_representation_real_code_add_unique_secondfirst) = 2 * ge_signed_half_add_unique_secondfirstrealdecode + 1 /\ (ge_balance_positive_add_unique_secondfirstreal) = 0) /\ (ge_balance_negative_add_unique_secondfirstreal) = S ge_signed_half_add_unique_secondfirstrealdecode))) /\ ((ge_first_rp_add_unique_second) + ge_balance_negative_add_unique_secondfirstreal = (ge_first_rn_add_unique_second) + ge_balance_positive_add_unique_secondfirstreal))) /\ (exists ge_balance_positive_add_unique_secondfirstimaginary ge_balance_negative_add_unique_secondfirstimaginary. (((((ge_representation_imaginary_code_add_unique_secondfirst) = 2 * (ge_balance_positive_add_unique_secondfirstimaginary) /\ (ge_balance_negative_add_unique_secondfirstimaginary) = 0) \/ exists ge_signed_half_add_unique_secondfirstimaginarydecode. (((ge_representation_imaginary_code_add_unique_secondfirst) = 2 * ge_signed_half_add_unique_secondfirstimaginarydecode + 1 /\ (ge_balance_positive_add_unique_secondfirstimaginary) = 0) /\ (ge_balance_negative_add_unique_secondfirstimaginary) = S ge_signed_half_add_unique_secondfirstimaginarydecode))) /\ ((ge_first_ip_add_unique_second) + ge_balance_negative_add_unique_secondfirstimaginary = (ge_first_in_add_unique_second) + ge_balance_positive_add_unique_secondfirstimaginary)))))) /\ ((exists ge_representation_real_code_add_unique_secondsecond ge_representation_imaginary_code_add_unique_secondsecond. (((bc) = ((ge_representation_real_code_add_unique_secondsecond) + (ge_representation_imaginary_code_add_unique_secondsecond)) * S ((ge_representation_real_code_add_unique_secondsecond) + (ge_representation_imaginary_code_add_unique_secondsecond)) + ((ge_representation_imaginary_code_add_unique_secondsecond) + (ge_representation_imaginary_code_add_unique_secondsecond))) /\ ((exists ge_balance_positive_add_unique_secondsecondreal ge_balance_negative_add_unique_secondsecondreal. (((((ge_representation_real_code_add_unique_secondsecond) = 2 * (ge_balance_positive_add_unique_secondsecondreal) /\ (ge_balance_negative_add_unique_secondsecondreal) = 0) \/ exists ge_signed_half_add_unique_secondsecondrealdecode. (((ge_representation_real_code_add_unique_secondsecond) = 2 * ge_signed_half_add_unique_secondsecondrealdecode + 1 /\ (ge_balance_positive_add_unique_secondsecondreal) = 0) /\ (ge_balance_negative_add_unique_secondsecondreal) = S ge_signed_half_add_unique_secondsecondrealdecode))) /\ ((ge_second_rp_add_unique_second) + ge_balance_negative_add_unique_secondsecondreal = (ge_second_rn_add_unique_second) + ge_balance_positive_add_unique_secondsecondreal))) /\ (exists ge_balance_positive_add_unique_secondsecondimaginary ge_balance_negative_add_unique_secondsecondimaginary. (((((ge_representation_imaginary_code_add_unique_secondsecond) = 2 * (ge_balance_positive_add_unique_secondsecondimaginary) /\ (ge_balance_negative_add_unique_secondsecondimaginary) = 0) \/ exists ge_signed_half_add_unique_secondsecondimaginarydecode. (((ge_representation_imaginary_code_add_unique_secondsecond) = 2 * ge_signed_half_add_unique_secondsecondimaginarydecode + 1 /\ (ge_balance_positive_add_unique_secondsecondimaginary) = 0) /\ (ge_balance_negative_add_unique_secondsecondimaginary) = S ge_signed_half_add_unique_secondsecondimaginarydecode))) /\ ((ge_second_ip_add_unique_second) + ge_balance_negative_add_unique_secondsecondimaginary = (ge_second_in_add_unique_second) + ge_balance_positive_add_unique_secondsecondimaginary)))))) /\ (exists ge_representation_real_code_add_unique_secondoutput ge_representation_imaginary_code_add_unique_secondoutput. (((dd) = ((ge_representation_real_code_add_unique_secondoutput) + (ge_representation_imaginary_code_add_unique_secondoutput)) * S ((ge_representation_real_code_add_unique_secondoutput) + (ge_representation_imaginary_code_add_unique_secondoutput)) + ((ge_representation_imaginary_code_add_unique_secondoutput) + (ge_representation_imaginary_code_add_unique_secondoutput))) /\ ((exists ge_balance_positive_add_unique_secondoutputreal ge_balance_negative_add_unique_secondoutputreal. (((((ge_representation_real_code_add_unique_secondoutput) = 2 * (ge_balance_positive_add_unique_secondoutputreal) /\ (ge_balance_negative_add_unique_secondoutputreal) = 0) \/ exists ge_signed_half_add_unique_secondoutputrealdecode. (((ge_representation_real_code_add_unique_secondoutput) = 2 * ge_signed_half_add_unique_secondoutputrealdecode + 1 /\ (ge_balance_positive_add_unique_secondoutputreal) = 0) /\ (ge_balance_negative_add_unique_secondoutputreal) = S ge_signed_half_add_unique_secondoutputrealdecode))) /\ ((((ge_first_rp_add_unique_second) + (ge_second_rp_add_unique_second))) + ge_balance_negative_add_unique_secondoutputreal = (((ge_first_rn_add_unique_second) + (ge_second_rn_add_unique_second))) + ge_balance_positive_add_unique_secondoutputreal))) /\ (exists ge_balance_positive_add_unique_secondoutputimaginary ge_balance_negative_add_unique_secondoutputimaginary. (((((ge_representation_imaginary_code_add_unique_secondoutput) = 2 * (ge_balance_positive_add_unique_secondoutputimaginary) /\ (ge_balance_negative_add_unique_secondoutputimaginary) = 0) \/ exists ge_signed_half_add_unique_secondoutputimaginarydecode. (((ge_representation_imaginary_code_add_unique_secondoutput) = 2 * ge_signed_half_add_unique_secondoutputimaginarydecode + 1 /\ (ge_balance_positive_add_unique_secondoutputimaginary) = 0) /\ (ge_balance_negative_add_unique_secondoutputimaginary) = S ge_signed_half_add_unique_secondoutputimaginarydecode))) /\ ((((ge_first_ip_add_unique_second) + (ge_second_ip_add_unique_second))) + ge_balance_negative_add_unique_secondoutputimaginary = (((ge_first_in_add_unique_second) + (ge_second_in_add_unique_second))) + ge_balance_positive_add_unique_secondoutputimaginary))))))))) -> cc = dd

Complete tactic proof in conservative notation

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

39 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.

Named ingredients (2)
01Fix variables and assumptionsL1–6

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

  1. L1
    intro ac
  2. L2
    intro bc
  3. L3
    intro cc
  4. L4
    intro dd
  5. L5
    intro hfirst
  6. L6
    intro hsecond
02Separate the logical casesL7–16

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

  1. L7
    cases hfirst
  2. L8
    cases hfirst_witness
  3. L9
    cases hfirst_witness_witness
  4. L10
    cases hfirst_witness_witness_witness
  5. L11
    cases hfirst_witness_witness_witness_witness
  6. L12
    cases hfirst_witness_witness_witness_witness_witness
  7. L13
    cases hfirst_witness_witness_witness_witness_witness_witness
  8. L14
    cases hfirst_witness_witness_witness_witness_witness_witness_witness
  9. L15
    cases hfirst_witness_witness_witness_witness_witness_witness_witness_witness
  10. L16
    cases hfirst_witness_witness_witness_witness_witness_witness_witness_witness_right
03Use earlier factsL17–26

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

  1. L17
    specialize gaussian_representation_functional cc
  2. L18
    specialize gaussian_representation_functional dd
  3. L19
    specialize gaussian_representation_functional ((x) + (x4))
  4. L20
    specialize gaussian_representation_functional ((x1) + (x5))
  5. L21
    specialize gaussian_representation_functional ((x2) + (x6))
  6. L22
    specialize gaussian_representation_functional ((x3) + (x7))
  7. L23
    apply gaussian_representation_functional
  8. L24
    exact hfirst_witness_witness_witness_witness_witness_witness_witness_witness_right_right
  9. L25
    specialize gaussian_add_for_representations ac
  10. L26
    specialize gaussian_add_for_representations bc
04Use earlier factsL27–36

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

  1. L27
    specialize gaussian_add_for_representations dd
  2. L28
    specialize gaussian_add_for_representations x
  3. L29
    specialize gaussian_add_for_representations x1
  4. L30
    specialize gaussian_add_for_representations x2
  5. L31
    specialize gaussian_add_for_representations x3
  6. L32
    specialize gaussian_add_for_representations x4
  7. L33
    specialize gaussian_add_for_representations x5
  8. L34
    specialize gaussian_add_for_representations x6
  9. L35
    specialize gaussian_add_for_representations x7
  10. L36
    apply gaussian_add_for_representations
05Use earlier factsL37–39

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

  1. L37
    exact hfirst_witness_witness_witness_witness_witness_witness_witness_witness_left
  2. L38
    exact hfirst_witness_witness_witness_witness_witness_witness_witness_witness_right_left
  3. L39
    exact hsecond

Library-wide reading audit

Original defined command ledger · 39 lines
  1. 0001intro ac
  2. 0002intro bc
  3. 0003intro cc
  4. 0004intro dd
  5. 0005intro hfirst
  6. 0006intro hsecond
  7. 0007cases hfirst
  8. 0008cases hfirst_witness
  9. 0009cases hfirst_witness_witness
  10. 0010cases hfirst_witness_witness_witness
  11. 0011cases hfirst_witness_witness_witness_witness
  12. 0012cases hfirst_witness_witness_witness_witness_witness
  13. 0013cases hfirst_witness_witness_witness_witness_witness_witness
  14. 0014cases hfirst_witness_witness_witness_witness_witness_witness_witness
  15. 0015cases hfirst_witness_witness_witness_witness_witness_witness_witness_witness
  16. 0016cases hfirst_witness_witness_witness_witness_witness_witness_witness_witness_right
  17. 0017specialize gaussian_representation_functional cc
  18. 0018specialize gaussian_representation_functional dd
  19. 0019specialize gaussian_representation_functional ((x) + (x4))
  20. 0020specialize gaussian_representation_functional ((x1) + (x5))
  21. 0021specialize gaussian_representation_functional ((x2) + (x6))
  22. 0022specialize gaussian_representation_functional ((x3) + (x7))
  23. 0023apply gaussian_representation_functional
  24. 0024exact hfirst_witness_witness_witness_witness_witness_witness_witness_witness_right_right
  25. 0025specialize gaussian_add_for_representations ac
  26. 0026specialize gaussian_add_for_representations bc
  27. 0027specialize gaussian_add_for_representations dd
  28. 0028specialize gaussian_add_for_representations x
  29. 0029specialize gaussian_add_for_representations x1
  30. 0030specialize gaussian_add_for_representations x2
  31. 0031specialize gaussian_add_for_representations x3
  32. 0032specialize gaussian_add_for_representations x4
  33. 0033specialize gaussian_add_for_representations x5
  34. 0034specialize gaussian_add_for_representations x6
  35. 0035specialize gaussian_add_for_representations x7
  36. 0036apply gaussian_add_for_representations
  37. 0037exact hfirst_witness_witness_witness_witness_witness_witness_witness_witness_left
  38. 0038exact hfirst_witness_witness_witness_witness_witness_witness_witness_witness_right_left
  39. 0039exact hsecond