SS000E

divisor_signed_sum_empty_exists

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.

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

The empty sum is constructed as an actual two-trace signed fold and only then identified with zero.

Exact expanded first-order arithmetic statement

forall F pb pc nb nc. ((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 dst_positive_code_empty_result dst_positive_scale_empty_result dst_negative_code_empty_result dst_negative_scale_empty_result dst_positive_sum_empty_result dst_negative_sum_empty_result. (((F) = (((((dst_positive_code_empty_result) + (dst_positive_scale_empty_result)) * S ((dst_positive_code_empty_result) + (dst_positive_scale_empty_result)) + ((dst_positive_scale_empty_result) + (dst_positive_scale_empty_result))) + (((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) * S ((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) + ((dst_negative_scale_empty_result) + (dst_negative_scale_empty_result)))) * S ((((dst_positive_code_empty_result) + (dst_positive_scale_empty_result)) * S ((dst_positive_code_empty_result) + (dst_positive_scale_empty_result)) + ((dst_positive_scale_empty_result) + (dst_positive_scale_empty_result))) + (((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) * S ((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) + ((dst_negative_scale_empty_result) + (dst_negative_scale_empty_result)))) + ((((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) * S ((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) + ((dst_negative_scale_empty_result) + (dst_negative_scale_empty_result))) + (((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) * S ((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) + ((dst_negative_scale_empty_result) + (dst_negative_scale_empty_result)))))) /\ (((exists fs_u_dst_empty_resultpositive fs_v_dst_empty_resultpositive. ((((exists fs_h_dst_empty_resultpositive_body_start. fs_h_dst_empty_resultpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_empty_resultpositive)) /\ exists fs_q_dst_empty_resultpositive_body_start. fs_u_dst_empty_resultpositive = fs_q_dst_empty_resultpositive_body_start * S ((S (0)) * fs_v_dst_empty_resultpositive) + (0))) /\ ((((exists fs_h_dst_empty_resultpositive_body_terminal. fs_h_dst_empty_resultpositive_body_terminal + S (dst_positive_sum_empty_result) = S ((S (0)) * fs_v_dst_empty_resultpositive)) /\ exists fs_q_dst_empty_resultpositive_body_terminal. fs_u_dst_empty_resultpositive = fs_q_dst_empty_resultpositive_body_terminal * S ((S (0)) * fs_v_dst_empty_resultpositive) + (dst_positive_sum_empty_result))) /\ forall fs_i_dst_empty_resultpositive_body_steps. (exists fs_lt_dst_empty_resultpositive_body_steps_bound. fs_lt_dst_empty_resultpositive_body_steps_bound + S fs_i_dst_empty_resultpositive_body_steps = 0) -> exists fs_a_dst_empty_resultpositive_body_steps fs_r_dst_empty_resultpositive_body_steps fs_s_dst_empty_resultpositive_body_steps. ((((exists fs_h_dst_empty_resultpositive_body_steps_summand. fs_h_dst_empty_resultpositive_body_steps_summand + S (fs_a_dst_empty_resultpositive_body_steps) = S ((S (fs_i_dst_empty_resultpositive_body_steps)) * dst_positive_scale_empty_result)) /\ exists fs_q_dst_empty_resultpositive_body_steps_summand. dst_positive_code_empty_result = fs_q_dst_empty_resultpositive_body_steps_summand * S ((S (fs_i_dst_empty_resultpositive_body_steps)) * dst_positive_scale_empty_result) + (fs_a_dst_empty_resultpositive_body_steps))) /\ ((((exists fs_h_dst_empty_resultpositive_body_steps_partial. fs_h_dst_empty_resultpositive_body_steps_partial + S (fs_r_dst_empty_resultpositive_body_steps) = S ((S (fs_i_dst_empty_resultpositive_body_steps)) * fs_v_dst_empty_resultpositive)) /\ exists fs_q_dst_empty_resultpositive_body_steps_partial. fs_u_dst_empty_resultpositive = fs_q_dst_empty_resultpositive_body_steps_partial * S ((S (fs_i_dst_empty_resultpositive_body_steps)) * fs_v_dst_empty_resultpositive) + (fs_r_dst_empty_resultpositive_body_steps))) /\ ((((exists fs_h_dst_empty_resultpositive_body_steps_successor. fs_h_dst_empty_resultpositive_body_steps_successor + S (fs_s_dst_empty_resultpositive_body_steps) = S ((S (S fs_i_dst_empty_resultpositive_body_steps)) * fs_v_dst_empty_resultpositive)) /\ exists fs_q_dst_empty_resultpositive_body_steps_successor. fs_u_dst_empty_resultpositive = fs_q_dst_empty_resultpositive_body_steps_successor * S ((S (S fs_i_dst_empty_resultpositive_body_steps)) * fs_v_dst_empty_resultpositive) + (fs_s_dst_empty_resultpositive_body_steps))) /\ fs_s_dst_empty_resultpositive_body_steps = fs_r_dst_empty_resultpositive_body_steps + fs_a_dst_empty_resultpositive_body_steps)))))) /\ (((exists fs_u_dst_empty_resultnegative fs_v_dst_empty_resultnegative. ((((exists fs_h_dst_empty_resultnegative_body_start. fs_h_dst_empty_resultnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_empty_resultnegative)) /\ exists fs_q_dst_empty_resultnegative_body_start. fs_u_dst_empty_resultnegative = fs_q_dst_empty_resultnegative_body_start * S ((S (0)) * fs_v_dst_empty_resultnegative) + (0))) /\ ((((exists fs_h_dst_empty_resultnegative_body_terminal. fs_h_dst_empty_resultnegative_body_terminal + S (dst_negative_sum_empty_result) = S ((S (0)) * fs_v_dst_empty_resultnegative)) /\ exists fs_q_dst_empty_resultnegative_body_terminal. fs_u_dst_empty_resultnegative = fs_q_dst_empty_resultnegative_body_terminal * S ((S (0)) * fs_v_dst_empty_resultnegative) + (dst_negative_sum_empty_result))) /\ forall fs_i_dst_empty_resultnegative_body_steps. (exists fs_lt_dst_empty_resultnegative_body_steps_bound. fs_lt_dst_empty_resultnegative_body_steps_bound + S fs_i_dst_empty_resultnegative_body_steps = 0) -> exists fs_a_dst_empty_resultnegative_body_steps fs_r_dst_empty_resultnegative_body_steps fs_s_dst_empty_resultnegative_body_steps. ((((exists fs_h_dst_empty_resultnegative_body_steps_summand. fs_h_dst_empty_resultnegative_body_steps_summand + S (fs_a_dst_empty_resultnegative_body_steps) = S ((S (fs_i_dst_empty_resultnegative_body_steps)) * dst_negative_scale_empty_result)) /\ exists fs_q_dst_empty_resultnegative_body_steps_summand. dst_negative_code_empty_result = fs_q_dst_empty_resultnegative_body_steps_summand * S ((S (fs_i_dst_empty_resultnegative_body_steps)) * dst_negative_scale_empty_result) + (fs_a_dst_empty_resultnegative_body_steps))) /\ ((((exists fs_h_dst_empty_resultnegative_body_steps_partial. fs_h_dst_empty_resultnegative_body_steps_partial + S (fs_r_dst_empty_resultnegative_body_steps) = S ((S (fs_i_dst_empty_resultnegative_body_steps)) * fs_v_dst_empty_resultnegative)) /\ exists fs_q_dst_empty_resultnegative_body_steps_partial. fs_u_dst_empty_resultnegative = fs_q_dst_empty_resultnegative_body_steps_partial * S ((S (fs_i_dst_empty_resultnegative_body_steps)) * fs_v_dst_empty_resultnegative) + (fs_r_dst_empty_resultnegative_body_steps))) /\ ((((exists fs_h_dst_empty_resultnegative_body_steps_successor. fs_h_dst_empty_resultnegative_body_steps_successor + S (fs_s_dst_empty_resultnegative_body_steps) = S ((S (S fs_i_dst_empty_resultnegative_body_steps)) * fs_v_dst_empty_resultnegative)) /\ exists fs_q_dst_empty_resultnegative_body_steps_successor. fs_u_dst_empty_resultnegative = fs_q_dst_empty_resultnegative_body_steps_successor * S ((S (S fs_i_dst_empty_resultnegative_body_steps)) * fs_v_dst_empty_resultnegative) + (fs_s_dst_empty_resultnegative_body_steps))) /\ fs_s_dst_empty_resultnegative_body_steps = fs_r_dst_empty_resultnegative_body_steps + fs_a_dst_empty_resultnegative_body_steps)))))) /\ (exists ge_balance_positive_empty_resultresult ge_balance_negative_empty_resultresult. (((((0) = 2 * (ge_balance_positive_empty_resultresult) /\ (ge_balance_negative_empty_resultresult) = 0) \/ exists ge_signed_half_empty_resultresultdecode. (((0) = 2 * ge_signed_half_empty_resultresultdecode + 1 /\ (ge_balance_positive_empty_resultresult) = 0) /\ (ge_balance_negative_empty_resultresult) = S ge_signed_half_empty_resultresultdecode))) /\ ((dst_positive_sum_empty_result) + ge_balance_negative_empty_resultresult = (dst_negative_sum_empty_result) + ge_balance_positive_empty_resultresult)))))))))

Constructive proof overview

Generated structural guide

The empty sum is constructed as an actual two-trace signed fold and only then identified with zero.

The unchanged tactic script uses 2 declared prerequisites and contains 24 exact native proof lines.

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

Proof neighborhood

Direct dependencies

Direct dependents

none

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. The literal dependency-closed bundle is checked by original HA and the independently compiled Lean verifier. Public delivery grants no Alpha checked-use authority or Stable membership.

Read the argument

Proof checkpoints

24 script commands · 4 reading checkpoints · 2 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.

Named ingredients (2)

Long local formulas use this family’s existing definitions. Each new abbreviation was expanded back to the identical native formula, including its free-variable context. The original edition is preserved below.

01Fix variables and assumptionsL1–6

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 hrep
02Establish hzL7–15

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply divisor signed sum exists from components.

  1. L7
    have hz : ∃ z. SignedPrefixSum(F,0,z)Definitions: SignedPrefixSum
  2. L8
    specialize divisor_signed_sum_exists_from_components (F)
  3. L9
    specialize divisor_signed_sum_exists_from_components (pb)
  4. L10
    specialize divisor_signed_sum_exists_from_components (pc)
  5. L11
    specialize divisor_signed_sum_exists_from_components (nb)
  6. L12
    specialize divisor_signed_sum_exists_from_components (nc)
  7. L13
    specialize divisor_signed_sum_exists_from_components (0)
  8. L14
    apply divisor_signed_sum_exists_from_components
  9. L15
    exact hrep
03Separate the logical casesL16–16

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

  1. L16
    cases hz
04Establish heqL17–24

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply divisor signed sum empty value.

  1. L17
    have heq : x = 0
  2. L18
    specialize divisor_signed_sum_empty_value (F)
  3. L19
    specialize divisor_signed_sum_empty_value (x)
  4. L20
    apply divisor_signed_sum_empty_value
  5. L21
    exact hz_witness
  6. L22
    rewrite heq at hz_witness
  7. L23
    rewrite heq at hz_witness
  8. L24
    exact hz_witness

Library-wide reading audit

Original exact command ledger · 24 lines
  1. 0001intro F
  2. 0002intro pb
  3. 0003intro pc
  4. 0004intro nb
  5. 0005intro nc
  6. 0006intro hrep
  7. 0007have hz : exists z. (exists dst_positive_code_empty_constructed dst_positive_scale_empty_constructed dst_negative_code_empty_constructed dst_negative_scale_empty_constructed dst_positive_sum_empty_constructed dst_negative_sum_empty_constructed. (((F) = (((((dst_positive_code_empty_constructed) + (dst_positive_scale_empty_constructed)) * S ((dst_positive_code_empty_constructed) + (dst_positive_scale_empty_constructed)) + ((dst_positive_scale_empty_constructed) + (dst_positive_scale_empty_constructed))) + (((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) * S ((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) + ((dst_negative_scale_empty_constructed) + (dst_negative_scale_empty_constructed)))) * S ((((dst_positive_code_empty_constructed) + (dst_positive_scale_empty_constructed)) * S ((dst_positive_code_empty_constructed) + (dst_positive_scale_empty_constructed)) + ((dst_positive_scale_empty_constructed) + (dst_positive_scale_empty_constructed))) + (((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) * S ((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) + ((dst_negative_scale_empty_constructed) + (dst_negative_scale_empty_constructed)))) + ((((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) * S ((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) + ((dst_negative_scale_empty_constructed) + (dst_negative_scale_empty_constructed))) + (((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) * S ((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) + ((dst_negative_scale_empty_constructed) + (dst_negative_scale_empty_constructed)))))) /\ (((exists fs_u_dst_empty_constructedpositive fs_v_dst_empty_constructedpositive. ((((exists fs_h_dst_empty_constructedpositive_body_start. fs_h_dst_empty_constructedpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_empty_constructedpositive)) /\ exists fs_q_dst_empty_constructedpositive_body_start. fs_u_dst_empty_constructedpositive = fs_q_dst_empty_constructedpositive_body_start * S ((S (0)) * fs_v_dst_empty_constructedpositive) + (0))) /\ ((((exists fs_h_dst_empty_constructedpositive_body_terminal. fs_h_dst_empty_constructedpositive_body_terminal + S (dst_positive_sum_empty_constructed) = S ((S (0)) * fs_v_dst_empty_constructedpositive)) /\ exists fs_q_dst_empty_constructedpositive_body_terminal. fs_u_dst_empty_constructedpositive = fs_q_dst_empty_constructedpositive_body_terminal * S ((S (0)) * fs_v_dst_empty_constructedpositive) + (dst_positive_sum_empty_constructed))) /\ forall fs_i_dst_empty_constructedpositive_body_steps. (exists fs_lt_dst_empty_constructedpositive_body_steps_bound. fs_lt_dst_empty_constructedpositive_body_steps_bound + S fs_i_dst_empty_constructedpositive_body_steps = 0) -> exists fs_a_dst_empty_constructedpositive_body_steps fs_r_dst_empty_constructedpositive_body_steps fs_s_dst_empty_constructedpositive_body_steps. ((((exists fs_h_dst_empty_constructedpositive_body_steps_summand. fs_h_dst_empty_constructedpositive_body_steps_summand + S (fs_a_dst_empty_constructedpositive_body_steps) = S ((S (fs_i_dst_empty_constructedpositive_body_steps)) * dst_positive_scale_empty_constructed)) /\ exists fs_q_dst_empty_constructedpositive_body_steps_summand. dst_positive_code_empty_constructed = fs_q_dst_empty_constructedpositive_body_steps_summand * S ((S (fs_i_dst_empty_constructedpositive_body_steps)) * dst_positive_scale_empty_constructed) + (fs_a_dst_empty_constructedpositive_body_steps))) /\ ((((exists fs_h_dst_empty_constructedpositive_body_steps_partial. fs_h_dst_empty_constructedpositive_body_steps_partial + S (fs_r_dst_empty_constructedpositive_body_steps) = S ((S (fs_i_dst_empty_constructedpositive_body_steps)) * fs_v_dst_empty_constructedpositive)) /\ exists fs_q_dst_empty_constructedpositive_body_steps_partial. fs_u_dst_empty_constructedpositive = fs_q_dst_empty_constructedpositive_body_steps_partial * S ((S (fs_i_dst_empty_constructedpositive_body_steps)) * fs_v_dst_empty_constructedpositive) + (fs_r_dst_empty_constructedpositive_body_steps))) /\ ((((exists fs_h_dst_empty_constructedpositive_body_steps_successor. fs_h_dst_empty_constructedpositive_body_steps_successor + S (fs_s_dst_empty_constructedpositive_body_steps) = S ((S (S fs_i_dst_empty_constructedpositive_body_steps)) * fs_v_dst_empty_constructedpositive)) /\ exists fs_q_dst_empty_constructedpositive_body_steps_successor. fs_u_dst_empty_constructedpositive = fs_q_dst_empty_constructedpositive_body_steps_successor * S ((S (S fs_i_dst_empty_constructedpositive_body_steps)) * fs_v_dst_empty_constructedpositive) + (fs_s_dst_empty_constructedpositive_body_steps))) /\ fs_s_dst_empty_constructedpositive_body_steps = fs_r_dst_empty_constructedpositive_body_steps + fs_a_dst_empty_constructedpositive_body_steps)))))) /\ (((exists fs_u_dst_empty_constructednegative fs_v_dst_empty_constructednegative. ((((exists fs_h_dst_empty_constructednegative_body_start. fs_h_dst_empty_constructednegative_body_start + S (0) = S ((S (0)) * fs_v_dst_empty_constructednegative)) /\ exists fs_q_dst_empty_constructednegative_body_start. fs_u_dst_empty_constructednegative = fs_q_dst_empty_constructednegative_body_start * S ((S (0)) * fs_v_dst_empty_constructednegative) + (0))) /\ ((((exists fs_h_dst_empty_constructednegative_body_terminal. fs_h_dst_empty_constructednegative_body_terminal + S (dst_negative_sum_empty_constructed) = S ((S (0)) * fs_v_dst_empty_constructednegative)) /\ exists fs_q_dst_empty_constructednegative_body_terminal. fs_u_dst_empty_constructednegative = fs_q_dst_empty_constructednegative_body_terminal * S ((S (0)) * fs_v_dst_empty_constructednegative) + (dst_negative_sum_empty_constructed))) /\ forall fs_i_dst_empty_constructednegative_body_steps. (exists fs_lt_dst_empty_constructednegative_body_steps_bound. fs_lt_dst_empty_constructednegative_body_steps_bound + S fs_i_dst_empty_constructednegative_body_steps = 0) -> exists fs_a_dst_empty_constructednegative_body_steps fs_r_dst_empty_constructednegative_body_steps fs_s_dst_empty_constructednegative_body_steps. ((((exists fs_h_dst_empty_constructednegative_body_steps_summand. fs_h_dst_empty_constructednegative_body_steps_summand + S (fs_a_dst_empty_constructednegative_body_steps) = S ((S (fs_i_dst_empty_constructednegative_body_steps)) * dst_negative_scale_empty_constructed)) /\ exists fs_q_dst_empty_constructednegative_body_steps_summand. dst_negative_code_empty_constructed = fs_q_dst_empty_constructednegative_body_steps_summand * S ((S (fs_i_dst_empty_constructednegative_body_steps)) * dst_negative_scale_empty_constructed) + (fs_a_dst_empty_constructednegative_body_steps))) /\ ((((exists fs_h_dst_empty_constructednegative_body_steps_partial. fs_h_dst_empty_constructednegative_body_steps_partial + S (fs_r_dst_empty_constructednegative_body_steps) = S ((S (fs_i_dst_empty_constructednegative_body_steps)) * fs_v_dst_empty_constructednegative)) /\ exists fs_q_dst_empty_constructednegative_body_steps_partial. fs_u_dst_empty_constructednegative = fs_q_dst_empty_constructednegative_body_steps_partial * S ((S (fs_i_dst_empty_constructednegative_body_steps)) * fs_v_dst_empty_constructednegative) + (fs_r_dst_empty_constructednegative_body_steps))) /\ ((((exists fs_h_dst_empty_constructednegative_body_steps_successor. fs_h_dst_empty_constructednegative_body_steps_successor + S (fs_s_dst_empty_constructednegative_body_steps) = S ((S (S fs_i_dst_empty_constructednegative_body_steps)) * fs_v_dst_empty_constructednegative)) /\ exists fs_q_dst_empty_constructednegative_body_steps_successor. fs_u_dst_empty_constructednegative = fs_q_dst_empty_constructednegative_body_steps_successor * S ((S (S fs_i_dst_empty_constructednegative_body_steps)) * fs_v_dst_empty_constructednegative) + (fs_s_dst_empty_constructednegative_body_steps))) /\ fs_s_dst_empty_constructednegative_body_steps = fs_r_dst_empty_constructednegative_body_steps + fs_a_dst_empty_constructednegative_body_steps)))))) /\ (exists ge_balance_positive_empty_constructedresult ge_balance_negative_empty_constructedresult. (((((z) = 2 * (ge_balance_positive_empty_constructedresult) /\ (ge_balance_negative_empty_constructedresult) = 0) \/ exists ge_signed_half_empty_constructedresultdecode. (((z) = 2 * ge_signed_half_empty_constructedresultdecode + 1 /\ (ge_balance_positive_empty_constructedresult) = 0) /\ (ge_balance_negative_empty_constructedresult) = S ge_signed_half_empty_constructedresultdecode))) /\ ((dst_positive_sum_empty_constructed) + ge_balance_negative_empty_constructedresult = (dst_negative_sum_empty_constructed) + ge_balance_positive_empty_constructedresult)))))))))
  8. 0008specialize divisor_signed_sum_exists_from_components (F)
  9. 0009specialize divisor_signed_sum_exists_from_components (pb)
  10. 0010specialize divisor_signed_sum_exists_from_components (pc)
  11. 0011specialize divisor_signed_sum_exists_from_components (nb)
  12. 0012specialize divisor_signed_sum_exists_from_components (nc)
  13. 0013specialize divisor_signed_sum_exists_from_components (0)
  14. 0014apply divisor_signed_sum_exists_from_components
  15. 0015exact hrep
  16. 0016cases hz
  17. 0017have heq : x = 0
  18. 0018specialize divisor_signed_sum_empty_value (F)
  19. 0019specialize divisor_signed_sum_empty_value (x)
  20. 0020apply divisor_signed_sum_empty_value
  21. 0021exact hz_witness
  22. 0022rewrite heq at hz_witness
  23. 0023rewrite heq at hz_witness
  24. 0024exact hz_witness