DV0006

arithmetic_signed_sum_exists

Alpha v34 independently verified · alpha_closed; checked-use authorized; not Stable

A genuinely packed signed table has actual finite positive and negative sum traces at every requested prefix length.

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 expanded first-order arithmetic statement

forall N F l. (exists dst_positive_code_sum_exists_input dst_positive_scale_sum_exists_input dst_negative_code_sum_exists_input dst_negative_scale_sum_exists_input. (((F) = (((((dst_positive_code_sum_exists_input) + (dst_positive_scale_sum_exists_input)) * S ((dst_positive_code_sum_exists_input) + (dst_positive_scale_sum_exists_input)) + ((dst_positive_scale_sum_exists_input) + (dst_positive_scale_sum_exists_input))) + (((dst_negative_code_sum_exists_input) + (dst_negative_scale_sum_exists_input)) * S ((dst_negative_code_sum_exists_input) + (dst_negative_scale_sum_exists_input)) + ((dst_negative_scale_sum_exists_input) + (dst_negative_scale_sum_exists_input)))) * S ((((dst_positive_code_sum_exists_input) + (dst_positive_scale_sum_exists_input)) * S ((dst_positive_code_sum_exists_input) + (dst_positive_scale_sum_exists_input)) + ((dst_positive_scale_sum_exists_input) + (dst_positive_scale_sum_exists_input))) + (((dst_negative_code_sum_exists_input) + (dst_negative_scale_sum_exists_input)) * S ((dst_negative_code_sum_exists_input) + (dst_negative_scale_sum_exists_input)) + ((dst_negative_scale_sum_exists_input) + (dst_negative_scale_sum_exists_input)))) + ((((dst_negative_code_sum_exists_input) + (dst_negative_scale_sum_exists_input)) * S ((dst_negative_code_sum_exists_input) + (dst_negative_scale_sum_exists_input)) + ((dst_negative_scale_sum_exists_input) + (dst_negative_scale_sum_exists_input))) + (((dst_negative_code_sum_exists_input) + (dst_negative_scale_sum_exists_input)) * S ((dst_negative_code_sum_exists_input) + (dst_negative_scale_sum_exists_input)) + ((dst_negative_scale_sum_exists_input) + (dst_negative_scale_sum_exists_input)))))) /\ (forall dst_index_sum_exists_input. (exists pvs_le_gap_sum_exists_inputdomain. pvs_le_gap_sum_exists_inputdomain + (dst_index_sum_exists_input) = (N)) -> exists dst_positive_sum_exists_input dst_negative_sum_exists_input dst_value_sum_exists_input. ((((exists ff_h_pvs_sum_exists_inputentrypositive. ff_h_pvs_sum_exists_inputentrypositive + S (dst_positive_sum_exists_input) = S ((S (dst_index_sum_exists_input)) * dst_positive_scale_sum_exists_input)) /\ exists ff_q_pvs_sum_exists_inputentrypositive. dst_positive_code_sum_exists_input = ff_q_pvs_sum_exists_inputentrypositive * S ((S (dst_index_sum_exists_input)) * dst_positive_scale_sum_exists_input) + (dst_positive_sum_exists_input))) /\ (((((exists ff_h_pvs_sum_exists_inputentrynegative. ff_h_pvs_sum_exists_inputentrynegative + S (dst_negative_sum_exists_input) = S ((S (dst_index_sum_exists_input)) * dst_negative_scale_sum_exists_input)) /\ exists ff_q_pvs_sum_exists_inputentrynegative. dst_negative_code_sum_exists_input = ff_q_pvs_sum_exists_inputentrynegative * S ((S (dst_index_sum_exists_input)) * dst_negative_scale_sum_exists_input) + (dst_negative_sum_exists_input))) /\ (exists ge_balance_positive_sum_exists_inputentryvalue ge_balance_negative_sum_exists_inputentryvalue. (((((dst_value_sum_exists_input) = 2 * (ge_balance_positive_sum_exists_inputentryvalue) /\ (ge_balance_negative_sum_exists_inputentryvalue) = 0) \/ exists ge_signed_half_sum_exists_inputentryvaluedecode. (((dst_value_sum_exists_input) = 2 * ge_signed_half_sum_exists_inputentryvaluedecode + 1 /\ (ge_balance_positive_sum_exists_inputentryvalue) = 0) /\ (ge_balance_negative_sum_exists_inputentryvalue) = S ge_signed_half_sum_exists_inputentryvaluedecode))) /\ ((dst_positive_sum_exists_input) + ge_balance_negative_sum_exists_inputentryvalue = (dst_negative_sum_exists_input) + ge_balance_positive_sum_exists_inputentryvalue))))))))) -> exists z. (exists dst_positive_code_sum_exists_output dst_positive_scale_sum_exists_output dst_negative_code_sum_exists_output dst_negative_scale_sum_exists_output dst_positive_sum_sum_exists_output dst_negative_sum_sum_exists_output. (((F) = (((((dst_positive_code_sum_exists_output) + (dst_positive_scale_sum_exists_output)) * S ((dst_positive_code_sum_exists_output) + (dst_positive_scale_sum_exists_output)) + ((dst_positive_scale_sum_exists_output) + (dst_positive_scale_sum_exists_output))) + (((dst_negative_code_sum_exists_output) + (dst_negative_scale_sum_exists_output)) * S ((dst_negative_code_sum_exists_output) + (dst_negative_scale_sum_exists_output)) + ((dst_negative_scale_sum_exists_output) + (dst_negative_scale_sum_exists_output)))) * S ((((dst_positive_code_sum_exists_output) + (dst_positive_scale_sum_exists_output)) * S ((dst_positive_code_sum_exists_output) + (dst_positive_scale_sum_exists_output)) + ((dst_positive_scale_sum_exists_output) + (dst_positive_scale_sum_exists_output))) + (((dst_negative_code_sum_exists_output) + (dst_negative_scale_sum_exists_output)) * S ((dst_negative_code_sum_exists_output) + (dst_negative_scale_sum_exists_output)) + ((dst_negative_scale_sum_exists_output) + (dst_negative_scale_sum_exists_output)))) + ((((dst_negative_code_sum_exists_output) + (dst_negative_scale_sum_exists_output)) * S ((dst_negative_code_sum_exists_output) + (dst_negative_scale_sum_exists_output)) + ((dst_negative_scale_sum_exists_output) + (dst_negative_scale_sum_exists_output))) + (((dst_negative_code_sum_exists_output) + (dst_negative_scale_sum_exists_output)) * S ((dst_negative_code_sum_exists_output) + (dst_negative_scale_sum_exists_output)) + ((dst_negative_scale_sum_exists_output) + (dst_negative_scale_sum_exists_output)))))) /\ (((exists fs_u_dst_sum_exists_outputpositive fs_v_dst_sum_exists_outputpositive. ((((exists fs_h_dst_sum_exists_outputpositive_body_start. fs_h_dst_sum_exists_outputpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_exists_outputpositive)) /\ exists fs_q_dst_sum_exists_outputpositive_body_start. fs_u_dst_sum_exists_outputpositive = fs_q_dst_sum_exists_outputpositive_body_start * S ((S (0)) * fs_v_dst_sum_exists_outputpositive) + (0))) /\ ((((exists fs_h_dst_sum_exists_outputpositive_body_terminal. fs_h_dst_sum_exists_outputpositive_body_terminal + S (dst_positive_sum_sum_exists_output) = S ((S (l)) * fs_v_dst_sum_exists_outputpositive)) /\ exists fs_q_dst_sum_exists_outputpositive_body_terminal. fs_u_dst_sum_exists_outputpositive = fs_q_dst_sum_exists_outputpositive_body_terminal * S ((S (l)) * fs_v_dst_sum_exists_outputpositive) + (dst_positive_sum_sum_exists_output))) /\ forall fs_i_dst_sum_exists_outputpositive_body_steps. (exists fs_lt_dst_sum_exists_outputpositive_body_steps_bound. fs_lt_dst_sum_exists_outputpositive_body_steps_bound + S fs_i_dst_sum_exists_outputpositive_body_steps = l) -> exists fs_a_dst_sum_exists_outputpositive_body_steps fs_r_dst_sum_exists_outputpositive_body_steps fs_s_dst_sum_exists_outputpositive_body_steps. ((((exists fs_h_dst_sum_exists_outputpositive_body_steps_summand. fs_h_dst_sum_exists_outputpositive_body_steps_summand + S (fs_a_dst_sum_exists_outputpositive_body_steps) = S ((S (fs_i_dst_sum_exists_outputpositive_body_steps)) * dst_positive_scale_sum_exists_output)) /\ exists fs_q_dst_sum_exists_outputpositive_body_steps_summand. dst_positive_code_sum_exists_output = fs_q_dst_sum_exists_outputpositive_body_steps_summand * S ((S (fs_i_dst_sum_exists_outputpositive_body_steps)) * dst_positive_scale_sum_exists_output) + (fs_a_dst_sum_exists_outputpositive_body_steps))) /\ ((((exists fs_h_dst_sum_exists_outputpositive_body_steps_partial. fs_h_dst_sum_exists_outputpositive_body_steps_partial + S (fs_r_dst_sum_exists_outputpositive_body_steps) = S ((S (fs_i_dst_sum_exists_outputpositive_body_steps)) * fs_v_dst_sum_exists_outputpositive)) /\ exists fs_q_dst_sum_exists_outputpositive_body_steps_partial. fs_u_dst_sum_exists_outputpositive = fs_q_dst_sum_exists_outputpositive_body_steps_partial * S ((S (fs_i_dst_sum_exists_outputpositive_body_steps)) * fs_v_dst_sum_exists_outputpositive) + (fs_r_dst_sum_exists_outputpositive_body_steps))) /\ ((((exists fs_h_dst_sum_exists_outputpositive_body_steps_successor. fs_h_dst_sum_exists_outputpositive_body_steps_successor + S (fs_s_dst_sum_exists_outputpositive_body_steps) = S ((S (S fs_i_dst_sum_exists_outputpositive_body_steps)) * fs_v_dst_sum_exists_outputpositive)) /\ exists fs_q_dst_sum_exists_outputpositive_body_steps_successor. fs_u_dst_sum_exists_outputpositive = fs_q_dst_sum_exists_outputpositive_body_steps_successor * S ((S (S fs_i_dst_sum_exists_outputpositive_body_steps)) * fs_v_dst_sum_exists_outputpositive) + (fs_s_dst_sum_exists_outputpositive_body_steps))) /\ fs_s_dst_sum_exists_outputpositive_body_steps = fs_r_dst_sum_exists_outputpositive_body_steps + fs_a_dst_sum_exists_outputpositive_body_steps)))))) /\ (((exists fs_u_dst_sum_exists_outputnegative fs_v_dst_sum_exists_outputnegative. ((((exists fs_h_dst_sum_exists_outputnegative_body_start. fs_h_dst_sum_exists_outputnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_exists_outputnegative)) /\ exists fs_q_dst_sum_exists_outputnegative_body_start. fs_u_dst_sum_exists_outputnegative = fs_q_dst_sum_exists_outputnegative_body_start * S ((S (0)) * fs_v_dst_sum_exists_outputnegative) + (0))) /\ ((((exists fs_h_dst_sum_exists_outputnegative_body_terminal. fs_h_dst_sum_exists_outputnegative_body_terminal + S (dst_negative_sum_sum_exists_output) = S ((S (l)) * fs_v_dst_sum_exists_outputnegative)) /\ exists fs_q_dst_sum_exists_outputnegative_body_terminal. fs_u_dst_sum_exists_outputnegative = fs_q_dst_sum_exists_outputnegative_body_terminal * S ((S (l)) * fs_v_dst_sum_exists_outputnegative) + (dst_negative_sum_sum_exists_output))) /\ forall fs_i_dst_sum_exists_outputnegative_body_steps. (exists fs_lt_dst_sum_exists_outputnegative_body_steps_bound. fs_lt_dst_sum_exists_outputnegative_body_steps_bound + S fs_i_dst_sum_exists_outputnegative_body_steps = l) -> exists fs_a_dst_sum_exists_outputnegative_body_steps fs_r_dst_sum_exists_outputnegative_body_steps fs_s_dst_sum_exists_outputnegative_body_steps. ((((exists fs_h_dst_sum_exists_outputnegative_body_steps_summand. fs_h_dst_sum_exists_outputnegative_body_steps_summand + S (fs_a_dst_sum_exists_outputnegative_body_steps) = S ((S (fs_i_dst_sum_exists_outputnegative_body_steps)) * dst_negative_scale_sum_exists_output)) /\ exists fs_q_dst_sum_exists_outputnegative_body_steps_summand. dst_negative_code_sum_exists_output = fs_q_dst_sum_exists_outputnegative_body_steps_summand * S ((S (fs_i_dst_sum_exists_outputnegative_body_steps)) * dst_negative_scale_sum_exists_output) + (fs_a_dst_sum_exists_outputnegative_body_steps))) /\ ((((exists fs_h_dst_sum_exists_outputnegative_body_steps_partial. fs_h_dst_sum_exists_outputnegative_body_steps_partial + S (fs_r_dst_sum_exists_outputnegative_body_steps) = S ((S (fs_i_dst_sum_exists_outputnegative_body_steps)) * fs_v_dst_sum_exists_outputnegative)) /\ exists fs_q_dst_sum_exists_outputnegative_body_steps_partial. fs_u_dst_sum_exists_outputnegative = fs_q_dst_sum_exists_outputnegative_body_steps_partial * S ((S (fs_i_dst_sum_exists_outputnegative_body_steps)) * fs_v_dst_sum_exists_outputnegative) + (fs_r_dst_sum_exists_outputnegative_body_steps))) /\ ((((exists fs_h_dst_sum_exists_outputnegative_body_steps_successor. fs_h_dst_sum_exists_outputnegative_body_steps_successor + S (fs_s_dst_sum_exists_outputnegative_body_steps) = S ((S (S fs_i_dst_sum_exists_outputnegative_body_steps)) * fs_v_dst_sum_exists_outputnegative)) /\ exists fs_q_dst_sum_exists_outputnegative_body_steps_successor. fs_u_dst_sum_exists_outputnegative = fs_q_dst_sum_exists_outputnegative_body_steps_successor * S ((S (S fs_i_dst_sum_exists_outputnegative_body_steps)) * fs_v_dst_sum_exists_outputnegative) + (fs_s_dst_sum_exists_outputnegative_body_steps))) /\ fs_s_dst_sum_exists_outputnegative_body_steps = fs_r_dst_sum_exists_outputnegative_body_steps + fs_a_dst_sum_exists_outputnegative_body_steps)))))) /\ (exists ge_balance_positive_sum_exists_outputresult ge_balance_negative_sum_exists_outputresult. (((((z) = 2 * (ge_balance_positive_sum_exists_outputresult) /\ (ge_balance_negative_sum_exists_outputresult) = 0) \/ exists ge_signed_half_sum_exists_outputresultdecode. (((z) = 2 * ge_signed_half_sum_exists_outputresultdecode + 1 /\ (ge_balance_positive_sum_exists_outputresult) = 0) /\ (ge_balance_negative_sum_exists_outputresult) = S ge_signed_half_sum_exists_outputresultdecode))) /\ ((dst_positive_sum_sum_exists_output) + ge_balance_negative_sum_exists_outputresult = (dst_negative_sum_sum_exists_output) + ge_balance_positive_sum_exists_outputresult)))))))))

Constructive proof overview

Generated structural guide

A genuinely packed signed table has actual finite positive and negative sum traces at every requested prefix length.

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

Alpha v34 checked-use · first admitted v31 · independently kernel and Lean verified; not Stable

Proof neighborhood

Direct dependencies

divisor_signed_table_components Alpha theorem; checked-use authorized divisor_signed_sum_exists_from_components Alpha theorem; checked-use authorized

Direct dependents

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. This exact body belongs to a complete independently kernel-checked constructive proof bundle and has Alpha checked-use authority; it does not imply Stable membership.

Read the argument

Proof checkpoints

21 script commands · 4 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.

01Fix variables and assumptionsL1–4

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

  1. L1
    intro N
  2. L2
    intro F
  3. L3
    intro l
  4. L4
    intro ht
02Establish hrepL5–9

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

  1. L5
    have hrep : exists 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))))))
  2. L6
    specialize divisor_signed_table_components (N)
  3. L7
    specialize divisor_signed_table_components (F)
  4. L8
    apply divisor_signed_table_components
  5. L9
    exact ht
03Separate the logical casesL10–13

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

  1. L10
    cases hrep
  2. L11
    cases hrep_witness
  3. L12
    cases hrep_witness_witness
  4. L13
    cases hrep_witness_witness_witness
04Use earlier factsL14–21

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

  1. L14
    specialize divisor_signed_sum_exists_from_components (F)
  2. L15
    specialize divisor_signed_sum_exists_from_components (x)
  3. L16
    specialize divisor_signed_sum_exists_from_components (x1)
  4. L17
    specialize divisor_signed_sum_exists_from_components (x2)
  5. L18
    specialize divisor_signed_sum_exists_from_components (x3)
  6. L19
    specialize divisor_signed_sum_exists_from_components (l)
  7. L20
    apply divisor_signed_sum_exists_from_components
  8. L21
    exact hrep_witness_witness_witness_witness

Library-wide reading audit

Original exact command ledger · 21 lines
  1. 0001intro N
  2. 0002intro F
  3. 0003intro l
  4. 0004intro ht
  5. 0005have hrep : exists 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))))))
  6. 0006specialize divisor_signed_table_components (N)
  7. 0007specialize divisor_signed_table_components (F)
  8. 0008apply divisor_signed_table_components
  9. 0009exact ht
  10. 0010cases hrep
  11. 0011cases hrep_witness
  12. 0012cases hrep_witness_witness
  13. 0013cases hrep_witness_witness_witness
  14. 0014specialize divisor_signed_sum_exists_from_components (F)
  15. 0015specialize divisor_signed_sum_exists_from_components (x)
  16. 0016specialize divisor_signed_sum_exists_from_components (x1)
  17. 0017specialize divisor_signed_sum_exists_from_components (x2)
  18. 0018specialize divisor_signed_sum_exists_from_components (x3)
  19. 0019specialize divisor_signed_sum_exists_from_components (l)
  20. 0020apply divisor_signed_sum_exists_from_components
  21. 0021exact hrep_witness_witness_witness_witness