ZU0004

dirichlet_signed_add_cancel_left

Cancellation of a common canonical signed summand follows by constructing its actual additive inverse.

Alpha v34 checked-use · first admitted v31 · 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.

Canonical signed +1 is code 2 and -1 is code 1. The two-case unit graph does not assume an inverse or cancellation law: its actual product characterization and affine existence and uniqueness are proved. These scalar lemmas support the separately checked finite inverse criterion; full G009 remains broader.

Exact theorem in conservative defined notation

∀ r. ∀ a. ∀ b. ∀ e. SignedAdd(r,a,e)SignedAdd(r,b,e) → a = b

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall r a b e. (exists dsa_ap_cancel_first dsa_an_cancel_first dsa_bp_cancel_first dsa_bn_cancel_first dsa_cp_cancel_first dsa_cn_cancel_first. (((((r) = 2 * (dsa_ap_cancel_first) /\ (dsa_an_cancel_first) = 0) \/ exists ge_signed_half_cancel_firstleft. (((r) = 2 * ge_signed_half_cancel_firstleft + 1 /\ (dsa_ap_cancel_first) = 0) /\ (dsa_an_cancel_first) = S ge_signed_half_cancel_firstleft))) /\ ((((((a) = 2 * (dsa_bp_cancel_first) /\ (dsa_bn_cancel_first) = 0) \/ exists ge_signed_half_cancel_firstright. (((a) = 2 * ge_signed_half_cancel_firstright + 1 /\ (dsa_bp_cancel_first) = 0) /\ (dsa_bn_cancel_first) = S ge_signed_half_cancel_firstright))) /\ ((((((e) = 2 * (dsa_cp_cancel_first) /\ (dsa_cn_cancel_first) = 0) \/ exists ge_signed_half_cancel_firstoutput. (((e) = 2 * ge_signed_half_cancel_firstoutput + 1 /\ (dsa_cp_cancel_first) = 0) /\ (dsa_cn_cancel_first) = S ge_signed_half_cancel_firstoutput))) /\ ((dsa_ap_cancel_first + dsa_bp_cancel_first) + dsa_cn_cancel_first = (dsa_an_cancel_first + dsa_bn_cancel_first) + dsa_cp_cancel_first))))))) -> (exists dsa_ap_cancel_second dsa_an_cancel_second dsa_bp_cancel_second dsa_bn_cancel_second dsa_cp_cancel_second dsa_cn_cancel_second. (((((r) = 2 * (dsa_ap_cancel_second) /\ (dsa_an_cancel_second) = 0) \/ exists ge_signed_half_cancel_secondleft. (((r) = 2 * ge_signed_half_cancel_secondleft + 1 /\ (dsa_ap_cancel_second) = 0) /\ (dsa_an_cancel_second) = S ge_signed_half_cancel_secondleft))) /\ ((((((b) = 2 * (dsa_bp_cancel_second) /\ (dsa_bn_cancel_second) = 0) \/ exists ge_signed_half_cancel_secondright. (((b) = 2 * ge_signed_half_cancel_secondright + 1 /\ (dsa_bp_cancel_second) = 0) /\ (dsa_bn_cancel_second) = S ge_signed_half_cancel_secondright))) /\ ((((((e) = 2 * (dsa_cp_cancel_second) /\ (dsa_cn_cancel_second) = 0) \/ exists ge_signed_half_cancel_secondoutput. (((e) = 2 * ge_signed_half_cancel_secondoutput + 1 /\ (dsa_cp_cancel_second) = 0) /\ (dsa_cn_cancel_second) = S ge_signed_half_cancel_secondoutput))) /\ ((dsa_ap_cancel_second + dsa_bp_cancel_second) + dsa_cn_cancel_second = (dsa_an_cancel_second + dsa_bn_cancel_second) + dsa_cp_cancel_second))))))) -> a=b

Complete tactic proof in conservative notation

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

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

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

  1. L1
    intro r
  2. L2
    intro a
  3. L3
    intro b
  4. L4
    intro e
  5. L5
    intro ha
  6. L6
    intro hb
02Establish hnL7–9

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply signed negate total.

  1. L7
    have hn : ∃ n. ∃ x. ∃ y. SignedDecode(r,x,y) ∧ SignedDecode(n,y,x)Definitions: SignedDecode(r,x,y)SignedDecode(n,y,x)Original native command in the exact edition
  2. L8
    specialize signed_negate_total (r)
  3. L9
    apply signed_negate_total
03Separate the logical casesL10–10

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

  1. L10
    cases hn
04Use earlier factsL11–20

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

  1. L11
    specialize signed_add_functional (x)
  2. L12
    specialize signed_add_functional (e)
  3. L13
    specialize signed_add_functional (a)
  4. L14
    specialize signed_add_functional (b)
  5. L15
    apply signed_add_functional
  6. L16
    specialize signed_add_associative (x)
  7. L17
    specialize signed_add_associative (r)
  8. L18
    specialize signed_add_associative (a)
  9. L19
    specialize signed_add_associative (0)
  10. L20
    specialize signed_add_associative (e)
05Use earlier factsL21–30

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

  1. L21
    specialize signed_add_associative (a)
  2. L22
    apply signed_add_associative
  3. L23
    specialize signed_add_negate_left_zero (r)
  4. L24
    specialize signed_add_negate_left_zero (x)
  5. L25
    apply signed_add_negate_left_zero
  6. L26
    exact hn_witness
  7. L27
    specialize signed_add_zero_left (a)
  8. L28
    apply signed_add_zero_left
  9. L29
    exact ha
  10. L30
    specialize signed_add_associative (x)
06Use earlier factsL31–40

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

  1. L31
    specialize signed_add_associative (r)
  2. L32
    specialize signed_add_associative (b)
  3. L33
    specialize signed_add_associative (0)
  4. L34
    specialize signed_add_associative (e)
  5. L35
    specialize signed_add_associative (b)
  6. L36
    apply signed_add_associative
  7. L37
    specialize signed_add_negate_left_zero (r)
  8. L38
    specialize signed_add_negate_left_zero (x)
  9. L39
    apply signed_add_negate_left_zero
  10. L40
    exact hn_witness
07Use earlier factsL41–43

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

  1. L41
    specialize signed_add_zero_left (b)
  2. L42
    apply signed_add_zero_left
  3. L43
    exact hb

Library-wide reading audit

Original defined command ledger · 43 lines
  1. 0001intro r
  2. 0002intro a
  3. 0003intro b
  4. 0004intro e
  5. 0005intro ha
  6. 0006intro hb
  7. 0007have hn : ∃ n. ∃ x. ∃ y. SignedDecode(r,x,y)SignedDecode(n,y,x)
  8. 0008specialize signed_negate_total (r)
  9. 0009apply signed_negate_total
  10. 0010cases hn
  11. 0011specialize signed_add_functional (x)
  12. 0012specialize signed_add_functional (e)
  13. 0013specialize signed_add_functional (a)
  14. 0014specialize signed_add_functional (b)
  15. 0015apply signed_add_functional
  16. 0016specialize signed_add_associative (x)
  17. 0017specialize signed_add_associative (r)
  18. 0018specialize signed_add_associative (a)
  19. 0019specialize signed_add_associative (0)
  20. 0020specialize signed_add_associative (e)
  21. 0021specialize signed_add_associative (a)
  22. 0022apply signed_add_associative
  23. 0023specialize signed_add_negate_left_zero (r)
  24. 0024specialize signed_add_negate_left_zero (x)
  25. 0025apply signed_add_negate_left_zero
  26. 0026exact hn_witness
  27. 0027specialize signed_add_zero_left (a)
  28. 0028apply signed_add_zero_left
  29. 0029exact ha
  30. 0030specialize signed_add_associative (x)
  31. 0031specialize signed_add_associative (r)
  32. 0032specialize signed_add_associative (b)
  33. 0033specialize signed_add_associative (0)
  34. 0034specialize signed_add_associative (e)
  35. 0035specialize signed_add_associative (b)
  36. 0036apply signed_add_associative
  37. 0037specialize signed_add_negate_left_zero (r)
  38. 0038specialize signed_add_negate_left_zero (x)
  39. 0039apply signed_add_negate_left_zero
  40. 0040exact hn_witness
  41. 0041specialize signed_add_zero_left (b)
  42. 0042apply signed_add_zero_left
  43. 0043exact hb