GI003B

gaussian_signed_balance_integer_transport

The unchanged canonical signed code continues to represent every equal signed 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

∀ code. ∀ p. ∀ n. ∀ q. ∀ m. p + m = q + n → SignedBalance(code,p,n)SignedBalance(code,q,m)

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall code p n q m. (((p) + (m)) = ((q) + (n))) -> (exists ge_balance_positive_balance_source ge_balance_negative_balance_source. (((((code) = 2 * (ge_balance_positive_balance_source) /\ (ge_balance_negative_balance_source) = 0) \/ exists ge_signed_half_balance_sourcedecode. (((code) = 2 * ge_signed_half_balance_sourcedecode + 1 /\ (ge_balance_positive_balance_source) = 0) /\ (ge_balance_negative_balance_source) = S ge_signed_half_balance_sourcedecode))) /\ ((p) + ge_balance_negative_balance_source = (n) + ge_balance_positive_balance_source))) -> (exists ge_balance_positive_balance_target ge_balance_negative_balance_target. (((((code) = 2 * (ge_balance_positive_balance_target) /\ (ge_balance_negative_balance_target) = 0) \/ exists ge_signed_half_balance_targetdecode. (((code) = 2 * ge_signed_half_balance_targetdecode + 1 /\ (ge_balance_positive_balance_target) = 0) /\ (ge_balance_negative_balance_target) = S ge_signed_half_balance_targetdecode))) /\ ((q) + ge_balance_negative_balance_target = (m) + ge_balance_positive_balance_target)))

Complete tactic proof in conservative notation

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

30 script commands · 10 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.

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–7

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

  1. L1
    intro code
  2. L2
    intro p
  3. L3
    intro n
  4. L4
    intro q
  5. L5
    intro m
  6. L6
    intro hequal
  7. L7
    intro hbalance
02Separate the logical casesL8–10

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

  1. L8
    cases hbalance
  2. L9
    cases hbalance_witness
  3. L10
    cases hbalance_witness_witness
03Establish htransportL11–20

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply integer span pair equal transitive.

  1. L11
    have htransport : q + x1 = x + m
  2. L12
    specialize integer_span_pair_equal_transitive q
  3. L13
    specialize integer_span_pair_equal_transitive m
  4. L14
    specialize integer_span_pair_equal_transitive p
  5. L15
    specialize integer_span_pair_equal_transitive n
  6. L16
    specialize integer_span_pair_equal_transitive x
  7. L17
    specialize integer_span_pair_equal_transitive x1
  8. L18
    apply integer_span_pair_equal_transitive
  9. L19
    symm
  10. L20
    exact hequal
04Calculate and transport equalitiesL21–21

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

  1. L21
    trans n + x
05Use earlier factsL22–23

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

  1. L22
    exact hbalance_witness_witness_right
  2. L23
    apply add_comm
06Construct an explicit witnessL24–25

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

  1. L24
    exists x
  2. L25
    exists x1
07Separate the logical casesL26–26

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

  1. L26
    split
08Use earlier factsL27–27

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

  1. L27
    exact hbalance_witness_witness_left
09Calculate and transport equalitiesL28–28

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

  1. L28
    trans x + m
10Use earlier factsL29–30

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

  1. L29
    exact htransport
  2. L30
    apply add_comm

Library-wide reading audit

Original defined command ledger · 30 lines
  1. 0001intro code
  2. 0002intro p
  3. 0003intro n
  4. 0004intro q
  5. 0005intro m
  6. 0006intro hequal
  7. 0007intro hbalance
  8. 0008cases hbalance
  9. 0009cases hbalance_witness
  10. 0010cases hbalance_witness_witness
  11. 0011have htransport : q + x1 = x + m
  12. 0012specialize integer_span_pair_equal_transitive q
  13. 0013specialize integer_span_pair_equal_transitive m
  14. 0014specialize integer_span_pair_equal_transitive p
  15. 0015specialize integer_span_pair_equal_transitive n
  16. 0016specialize integer_span_pair_equal_transitive x
  17. 0017specialize integer_span_pair_equal_transitive x1
  18. 0018apply integer_span_pair_equal_transitive
  19. 0019symm
  20. 0020exact hequal
  21. 0021trans n + x
  22. 0022exact hbalance_witness_witness_right
  23. 0023apply add_comm
  24. 0024exists x
  25. 0025exists x1
  26. 0026split
  27. 0027exact hbalance_witness_witness_left
  28. 0028trans x + m
  29. 0029exact htransport
  30. 0030apply add_comm