SS0009

divisor_signed_sum_from_components

Public research checkpoint, not admitted to Alpha or Stable. Alpha v30 remains 3222 checked-use theorems; Stable remains 432. The on-demand Alpha Lean service does not yet expose these checkpoint theorems; their independently checked literal bundles and unchanged sources are available below.

Two genuine natural finite sums and their canonical signed balance construct the signed prefix sum.

Public research checkpoint: original HA and independently compiled Lean verified; not Alpha-enrolled, no Alpha checked-use authority; not Stable

These are genuine signed-table and finite-sum foundations, not full divisor-sum cancellation or Möbius inversion. G007 remains open. The historical MatrixMinorFourCode definition is reused solely as generic nested pairing of four beta parameters; no matrix-specific hypothesis is imported. Equality is equality of represented signed values, not equality of arbitrary component codes.

Exact theorem in conservative defined notation

∀ F. ∀ pb. ∀ pc. ∀ nb. ∀ nc. ∀ l. ∀ p. ∀ n. ∀ z. MatrixMinorFourCode(F,pb,pc,nb,nc)Sum(pb,pc,l,p)Sum(nb,nc,l,n)SignedBalance(z,p,n)SignedPrefixSum(F,l,z)

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

Definition DAG

Actual proof prerequisites

none
Original expanded first-order statement
forall F pb pc nb nc l p n z. ((F) = (((((pb) + (pc)) * S ((pb) + (pc)) + ((pc) + (pc))) + (((nb) + (nc)) * S ((nb) + (nc)) + ((nc) + (nc)))) * S ((((pb) + (pc)) * S ((pb) + (pc)) + ((pc) + (pc))) + (((nb) + (nc)) * S ((nb) + (nc)) + ((nc) + (nc)))) + ((((nb) + (nc)) * S ((nb) + (nc)) + ((nc) + (nc))) + (((nb) + (nc)) * S ((nb) + (nc)) + ((nc) + (nc)))))) -> (exists fs_u_dst_sum_constructor_positive fs_v_dst_sum_constructor_positive. ((((exists fs_h_dst_sum_constructor_positive_body_start. fs_h_dst_sum_constructor_positive_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_constructor_positive)) /\ exists fs_q_dst_sum_constructor_positive_body_start. fs_u_dst_sum_constructor_positive = fs_q_dst_sum_constructor_positive_body_start * S ((S (0)) * fs_v_dst_sum_constructor_positive) + (0))) /\ ((((exists fs_h_dst_sum_constructor_positive_body_terminal. fs_h_dst_sum_constructor_positive_body_terminal + S (p) = S ((S (l)) * fs_v_dst_sum_constructor_positive)) /\ exists fs_q_dst_sum_constructor_positive_body_terminal. fs_u_dst_sum_constructor_positive = fs_q_dst_sum_constructor_positive_body_terminal * S ((S (l)) * fs_v_dst_sum_constructor_positive) + (p))) /\ forall fs_i_dst_sum_constructor_positive_body_steps. (exists fs_lt_dst_sum_constructor_positive_body_steps_bound. fs_lt_dst_sum_constructor_positive_body_steps_bound + S fs_i_dst_sum_constructor_positive_body_steps = l) -> exists fs_a_dst_sum_constructor_positive_body_steps fs_r_dst_sum_constructor_positive_body_steps fs_s_dst_sum_constructor_positive_body_steps. ((((exists fs_h_dst_sum_constructor_positive_body_steps_summand. fs_h_dst_sum_constructor_positive_body_steps_summand + S (fs_a_dst_sum_constructor_positive_body_steps) = S ((S (fs_i_dst_sum_constructor_positive_body_steps)) * pc)) /\ exists fs_q_dst_sum_constructor_positive_body_steps_summand. pb = fs_q_dst_sum_constructor_positive_body_steps_summand * S ((S (fs_i_dst_sum_constructor_positive_body_steps)) * pc) + (fs_a_dst_sum_constructor_positive_body_steps))) /\ ((((exists fs_h_dst_sum_constructor_positive_body_steps_partial. fs_h_dst_sum_constructor_positive_body_steps_partial + S (fs_r_dst_sum_constructor_positive_body_steps) = S ((S (fs_i_dst_sum_constructor_positive_body_steps)) * fs_v_dst_sum_constructor_positive)) /\ exists fs_q_dst_sum_constructor_positive_body_steps_partial. fs_u_dst_sum_constructor_positive = fs_q_dst_sum_constructor_positive_body_steps_partial * S ((S (fs_i_dst_sum_constructor_positive_body_steps)) * fs_v_dst_sum_constructor_positive) + (fs_r_dst_sum_constructor_positive_body_steps))) /\ ((((exists fs_h_dst_sum_constructor_positive_body_steps_successor. fs_h_dst_sum_constructor_positive_body_steps_successor + S (fs_s_dst_sum_constructor_positive_body_steps) = S ((S (S fs_i_dst_sum_constructor_positive_body_steps)) * fs_v_dst_sum_constructor_positive)) /\ exists fs_q_dst_sum_constructor_positive_body_steps_successor. fs_u_dst_sum_constructor_positive = fs_q_dst_sum_constructor_positive_body_steps_successor * S ((S (S fs_i_dst_sum_constructor_positive_body_steps)) * fs_v_dst_sum_constructor_positive) + (fs_s_dst_sum_constructor_positive_body_steps))) /\ fs_s_dst_sum_constructor_positive_body_steps = fs_r_dst_sum_constructor_positive_body_steps + fs_a_dst_sum_constructor_positive_body_steps)))))) -> (exists fs_u_dst_sum_constructor_negative fs_v_dst_sum_constructor_negative. ((((exists fs_h_dst_sum_constructor_negative_body_start. fs_h_dst_sum_constructor_negative_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_constructor_negative)) /\ exists fs_q_dst_sum_constructor_negative_body_start. fs_u_dst_sum_constructor_negative = fs_q_dst_sum_constructor_negative_body_start * S ((S (0)) * fs_v_dst_sum_constructor_negative) + (0))) /\ ((((exists fs_h_dst_sum_constructor_negative_body_terminal. fs_h_dst_sum_constructor_negative_body_terminal + S (n) = S ((S (l)) * fs_v_dst_sum_constructor_negative)) /\ exists fs_q_dst_sum_constructor_negative_body_terminal. fs_u_dst_sum_constructor_negative = fs_q_dst_sum_constructor_negative_body_terminal * S ((S (l)) * fs_v_dst_sum_constructor_negative) + (n))) /\ forall fs_i_dst_sum_constructor_negative_body_steps. (exists fs_lt_dst_sum_constructor_negative_body_steps_bound. fs_lt_dst_sum_constructor_negative_body_steps_bound + S fs_i_dst_sum_constructor_negative_body_steps = l) -> exists fs_a_dst_sum_constructor_negative_body_steps fs_r_dst_sum_constructor_negative_body_steps fs_s_dst_sum_constructor_negative_body_steps. ((((exists fs_h_dst_sum_constructor_negative_body_steps_summand. fs_h_dst_sum_constructor_negative_body_steps_summand + S (fs_a_dst_sum_constructor_negative_body_steps) = S ((S (fs_i_dst_sum_constructor_negative_body_steps)) * nc)) /\ exists fs_q_dst_sum_constructor_negative_body_steps_summand. nb = fs_q_dst_sum_constructor_negative_body_steps_summand * S ((S (fs_i_dst_sum_constructor_negative_body_steps)) * nc) + (fs_a_dst_sum_constructor_negative_body_steps))) /\ ((((exists fs_h_dst_sum_constructor_negative_body_steps_partial. fs_h_dst_sum_constructor_negative_body_steps_partial + S (fs_r_dst_sum_constructor_negative_body_steps) = S ((S (fs_i_dst_sum_constructor_negative_body_steps)) * fs_v_dst_sum_constructor_negative)) /\ exists fs_q_dst_sum_constructor_negative_body_steps_partial. fs_u_dst_sum_constructor_negative = fs_q_dst_sum_constructor_negative_body_steps_partial * S ((S (fs_i_dst_sum_constructor_negative_body_steps)) * fs_v_dst_sum_constructor_negative) + (fs_r_dst_sum_constructor_negative_body_steps))) /\ ((((exists fs_h_dst_sum_constructor_negative_body_steps_successor. fs_h_dst_sum_constructor_negative_body_steps_successor + S (fs_s_dst_sum_constructor_negative_body_steps) = S ((S (S fs_i_dst_sum_constructor_negative_body_steps)) * fs_v_dst_sum_constructor_negative)) /\ exists fs_q_dst_sum_constructor_negative_body_steps_successor. fs_u_dst_sum_constructor_negative = fs_q_dst_sum_constructor_negative_body_steps_successor * S ((S (S fs_i_dst_sum_constructor_negative_body_steps)) * fs_v_dst_sum_constructor_negative) + (fs_s_dst_sum_constructor_negative_body_steps))) /\ fs_s_dst_sum_constructor_negative_body_steps = fs_r_dst_sum_constructor_negative_body_steps + fs_a_dst_sum_constructor_negative_body_steps)))))) -> (exists ge_balance_positive_sum_constructor_balance ge_balance_negative_sum_constructor_balance. (((((z) = 2 * (ge_balance_positive_sum_constructor_balance) /\ (ge_balance_negative_sum_constructor_balance) = 0) \/ exists ge_signed_half_sum_constructor_balancedecode. (((z) = 2 * ge_signed_half_sum_constructor_balancedecode + 1 /\ (ge_balance_positive_sum_constructor_balance) = 0) /\ (ge_balance_negative_sum_constructor_balance) = S ge_signed_half_sum_constructor_balancedecode))) /\ ((p) + ge_balance_negative_sum_constructor_balance = (n) + ge_balance_positive_sum_constructor_balance))) -> (exists dst_positive_code_sum_constructor_result dst_positive_scale_sum_constructor_result dst_negative_code_sum_constructor_result dst_negative_scale_sum_constructor_result dst_positive_sum_sum_constructor_result dst_negative_sum_sum_constructor_result. (((F) = (((((dst_positive_code_sum_constructor_result) + (dst_positive_scale_sum_constructor_result)) * S ((dst_positive_code_sum_constructor_result) + (dst_positive_scale_sum_constructor_result)) + ((dst_positive_scale_sum_constructor_result) + (dst_positive_scale_sum_constructor_result))) + (((dst_negative_code_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)) * S ((dst_negative_code_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)) + ((dst_negative_scale_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)))) * S ((((dst_positive_code_sum_constructor_result) + (dst_positive_scale_sum_constructor_result)) * S ((dst_positive_code_sum_constructor_result) + (dst_positive_scale_sum_constructor_result)) + ((dst_positive_scale_sum_constructor_result) + (dst_positive_scale_sum_constructor_result))) + (((dst_negative_code_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)) * S ((dst_negative_code_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)) + ((dst_negative_scale_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)))) + ((((dst_negative_code_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)) * S ((dst_negative_code_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)) + ((dst_negative_scale_sum_constructor_result) + (dst_negative_scale_sum_constructor_result))) + (((dst_negative_code_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)) * S ((dst_negative_code_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)) + ((dst_negative_scale_sum_constructor_result) + (dst_negative_scale_sum_constructor_result)))))) /\ (((exists fs_u_dst_sum_constructor_resultpositive fs_v_dst_sum_constructor_resultpositive. ((((exists fs_h_dst_sum_constructor_resultpositive_body_start. fs_h_dst_sum_constructor_resultpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_constructor_resultpositive)) /\ exists fs_q_dst_sum_constructor_resultpositive_body_start. fs_u_dst_sum_constructor_resultpositive = fs_q_dst_sum_constructor_resultpositive_body_start * S ((S (0)) * fs_v_dst_sum_constructor_resultpositive) + (0))) /\ ((((exists fs_h_dst_sum_constructor_resultpositive_body_terminal. fs_h_dst_sum_constructor_resultpositive_body_terminal + S (dst_positive_sum_sum_constructor_result) = S ((S (l)) * fs_v_dst_sum_constructor_resultpositive)) /\ exists fs_q_dst_sum_constructor_resultpositive_body_terminal. fs_u_dst_sum_constructor_resultpositive = fs_q_dst_sum_constructor_resultpositive_body_terminal * S ((S (l)) * fs_v_dst_sum_constructor_resultpositive) + (dst_positive_sum_sum_constructor_result))) /\ forall fs_i_dst_sum_constructor_resultpositive_body_steps. (exists fs_lt_dst_sum_constructor_resultpositive_body_steps_bound. fs_lt_dst_sum_constructor_resultpositive_body_steps_bound + S fs_i_dst_sum_constructor_resultpositive_body_steps = l) -> exists fs_a_dst_sum_constructor_resultpositive_body_steps fs_r_dst_sum_constructor_resultpositive_body_steps fs_s_dst_sum_constructor_resultpositive_body_steps. ((((exists fs_h_dst_sum_constructor_resultpositive_body_steps_summand. fs_h_dst_sum_constructor_resultpositive_body_steps_summand + S (fs_a_dst_sum_constructor_resultpositive_body_steps) = S ((S (fs_i_dst_sum_constructor_resultpositive_body_steps)) * dst_positive_scale_sum_constructor_result)) /\ exists fs_q_dst_sum_constructor_resultpositive_body_steps_summand. dst_positive_code_sum_constructor_result = fs_q_dst_sum_constructor_resultpositive_body_steps_summand * S ((S (fs_i_dst_sum_constructor_resultpositive_body_steps)) * dst_positive_scale_sum_constructor_result) + (fs_a_dst_sum_constructor_resultpositive_body_steps))) /\ ((((exists fs_h_dst_sum_constructor_resultpositive_body_steps_partial. fs_h_dst_sum_constructor_resultpositive_body_steps_partial + S (fs_r_dst_sum_constructor_resultpositive_body_steps) = S ((S (fs_i_dst_sum_constructor_resultpositive_body_steps)) * fs_v_dst_sum_constructor_resultpositive)) /\ exists fs_q_dst_sum_constructor_resultpositive_body_steps_partial. fs_u_dst_sum_constructor_resultpositive = fs_q_dst_sum_constructor_resultpositive_body_steps_partial * S ((S (fs_i_dst_sum_constructor_resultpositive_body_steps)) * fs_v_dst_sum_constructor_resultpositive) + (fs_r_dst_sum_constructor_resultpositive_body_steps))) /\ ((((exists fs_h_dst_sum_constructor_resultpositive_body_steps_successor. fs_h_dst_sum_constructor_resultpositive_body_steps_successor + S (fs_s_dst_sum_constructor_resultpositive_body_steps) = S ((S (S fs_i_dst_sum_constructor_resultpositive_body_steps)) * fs_v_dst_sum_constructor_resultpositive)) /\ exists fs_q_dst_sum_constructor_resultpositive_body_steps_successor. fs_u_dst_sum_constructor_resultpositive = fs_q_dst_sum_constructor_resultpositive_body_steps_successor * S ((S (S fs_i_dst_sum_constructor_resultpositive_body_steps)) * fs_v_dst_sum_constructor_resultpositive) + (fs_s_dst_sum_constructor_resultpositive_body_steps))) /\ fs_s_dst_sum_constructor_resultpositive_body_steps = fs_r_dst_sum_constructor_resultpositive_body_steps + fs_a_dst_sum_constructor_resultpositive_body_steps)))))) /\ (((exists fs_u_dst_sum_constructor_resultnegative fs_v_dst_sum_constructor_resultnegative. ((((exists fs_h_dst_sum_constructor_resultnegative_body_start. fs_h_dst_sum_constructor_resultnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_constructor_resultnegative)) /\ exists fs_q_dst_sum_constructor_resultnegative_body_start. fs_u_dst_sum_constructor_resultnegative = fs_q_dst_sum_constructor_resultnegative_body_start * S ((S (0)) * fs_v_dst_sum_constructor_resultnegative) + (0))) /\ ((((exists fs_h_dst_sum_constructor_resultnegative_body_terminal. fs_h_dst_sum_constructor_resultnegative_body_terminal + S (dst_negative_sum_sum_constructor_result) = S ((S (l)) * fs_v_dst_sum_constructor_resultnegative)) /\ exists fs_q_dst_sum_constructor_resultnegative_body_terminal. fs_u_dst_sum_constructor_resultnegative = fs_q_dst_sum_constructor_resultnegative_body_terminal * S ((S (l)) * fs_v_dst_sum_constructor_resultnegative) + (dst_negative_sum_sum_constructor_result))) /\ forall fs_i_dst_sum_constructor_resultnegative_body_steps. (exists fs_lt_dst_sum_constructor_resultnegative_body_steps_bound. fs_lt_dst_sum_constructor_resultnegative_body_steps_bound + S fs_i_dst_sum_constructor_resultnegative_body_steps = l) -> exists fs_a_dst_sum_constructor_resultnegative_body_steps fs_r_dst_sum_constructor_resultnegative_body_steps fs_s_dst_sum_constructor_resultnegative_body_steps. ((((exists fs_h_dst_sum_constructor_resultnegative_body_steps_summand. fs_h_dst_sum_constructor_resultnegative_body_steps_summand + S (fs_a_dst_sum_constructor_resultnegative_body_steps) = S ((S (fs_i_dst_sum_constructor_resultnegative_body_steps)) * dst_negative_scale_sum_constructor_result)) /\ exists fs_q_dst_sum_constructor_resultnegative_body_steps_summand. dst_negative_code_sum_constructor_result = fs_q_dst_sum_constructor_resultnegative_body_steps_summand * S ((S (fs_i_dst_sum_constructor_resultnegative_body_steps)) * dst_negative_scale_sum_constructor_result) + (fs_a_dst_sum_constructor_resultnegative_body_steps))) /\ ((((exists fs_h_dst_sum_constructor_resultnegative_body_steps_partial. fs_h_dst_sum_constructor_resultnegative_body_steps_partial + S (fs_r_dst_sum_constructor_resultnegative_body_steps) = S ((S (fs_i_dst_sum_constructor_resultnegative_body_steps)) * fs_v_dst_sum_constructor_resultnegative)) /\ exists fs_q_dst_sum_constructor_resultnegative_body_steps_partial. fs_u_dst_sum_constructor_resultnegative = fs_q_dst_sum_constructor_resultnegative_body_steps_partial * S ((S (fs_i_dst_sum_constructor_resultnegative_body_steps)) * fs_v_dst_sum_constructor_resultnegative) + (fs_r_dst_sum_constructor_resultnegative_body_steps))) /\ ((((exists fs_h_dst_sum_constructor_resultnegative_body_steps_successor. fs_h_dst_sum_constructor_resultnegative_body_steps_successor + S (fs_s_dst_sum_constructor_resultnegative_body_steps) = S ((S (S fs_i_dst_sum_constructor_resultnegative_body_steps)) * fs_v_dst_sum_constructor_resultnegative)) /\ exists fs_q_dst_sum_constructor_resultnegative_body_steps_successor. fs_u_dst_sum_constructor_resultnegative = fs_q_dst_sum_constructor_resultnegative_body_steps_successor * S ((S (S fs_i_dst_sum_constructor_resultnegative_body_steps)) * fs_v_dst_sum_constructor_resultnegative) + (fs_s_dst_sum_constructor_resultnegative_body_steps))) /\ fs_s_dst_sum_constructor_resultnegative_body_steps = fs_r_dst_sum_constructor_resultnegative_body_steps + fs_a_dst_sum_constructor_resultnegative_body_steps)))))) /\ (exists ge_balance_positive_sum_constructor_resultresult ge_balance_negative_sum_constructor_resultresult. (((((z) = 2 * (ge_balance_positive_sum_constructor_resultresult) /\ (ge_balance_negative_sum_constructor_resultresult) = 0) \/ exists ge_signed_half_sum_constructor_resultresultdecode. (((z) = 2 * ge_signed_half_sum_constructor_resultresultdecode + 1 /\ (ge_balance_positive_sum_constructor_resultresult) = 0) /\ (ge_balance_negative_sum_constructor_resultresult) = S ge_signed_half_sum_constructor_resultresultdecode))) /\ ((dst_positive_sum_sum_constructor_result) + ge_balance_negative_sum_constructor_resultresult = (dst_negative_sum_sum_constructor_result) + ge_balance_positive_sum_constructor_resultresult)))))))))

Complete tactic proof in conservative notation

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

26 script commands · 9 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–10

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

  1. L1
    intro F
  2. L2
    intro pb
  3. L3
    intro pc
  4. L4
    intro nb
  5. L5
    intro nc
  6. L6
    intro l
  7. L7
    intro p
  8. L8
    intro n
  9. L9
    intro z
  10. L10
    intro hrep
02Fix variables and assumptionsL11–13

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

  1. L11
    intro hp
  2. L12
    intro hn
  3. L13
    intro hz
03Construct an explicit witnessL14–19

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

  1. L14
    exists pb
  2. L15
    exists pc
  3. L16
    exists nb
  4. L17
    exists nc
  5. L18
    exists p
  6. L19
    exists n
04Separate the logical casesL20–20

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

  1. L20
    split
05Use earlier factsL21–21

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

  1. L21
    exact hrep
06Separate the logical casesL22–22

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

  1. L22
    split
07Use earlier factsL23–23

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

  1. L23
    exact hp
08Separate the logical casesL24–24

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

  1. L24
    split
09Use earlier factsL25–26

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

  1. L25
    exact hn
  2. L26
    exact hz

Library-wide reading audit

Original defined command ledger · 26 lines
  1. 0001intro F
  2. 0002intro pb
  3. 0003intro pc
  4. 0004intro nb
  5. 0005intro nc
  6. 0006intro l
  7. 0007intro p
  8. 0008intro n
  9. 0009intro z
  10. 0010intro hrep
  11. 0011intro hp
  12. 0012intro hn
  13. 0013intro hz
  14. 0014exists pb
  15. 0015exists pc
  16. 0016exists nb
  17. 0017exists nc
  18. 0018exists p
  19. 0019exists n
  20. 0020split
  21. 0021exact hrep
  22. 0022split
  23. 0023exact hp
  24. 0024split
  25. 0025exact hn
  26. 0026exact hz