MX0033

signed_prefix_sum_single_spike_value

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

An actual signed sum with one arbitrary-position entry and proved zero windows has exactly that entry value.

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 F l p a z. (exists dst_positive_code_spike_table dst_positive_scale_spike_table dst_negative_code_spike_table dst_negative_scale_spike_table. (((F) = (((((dst_positive_code_spike_table) + (dst_positive_scale_spike_table)) * S ((dst_positive_code_spike_table) + (dst_positive_scale_spike_table)) + ((dst_positive_scale_spike_table) + (dst_positive_scale_spike_table))) + (((dst_negative_code_spike_table) + (dst_negative_scale_spike_table)) * S ((dst_negative_code_spike_table) + (dst_negative_scale_spike_table)) + ((dst_negative_scale_spike_table) + (dst_negative_scale_spike_table)))) * S ((((dst_positive_code_spike_table) + (dst_positive_scale_spike_table)) * S ((dst_positive_code_spike_table) + (dst_positive_scale_spike_table)) + ((dst_positive_scale_spike_table) + (dst_positive_scale_spike_table))) + (((dst_negative_code_spike_table) + (dst_negative_scale_spike_table)) * S ((dst_negative_code_spike_table) + (dst_negative_scale_spike_table)) + ((dst_negative_scale_spike_table) + (dst_negative_scale_spike_table)))) + ((((dst_negative_code_spike_table) + (dst_negative_scale_spike_table)) * S ((dst_negative_code_spike_table) + (dst_negative_scale_spike_table)) + ((dst_negative_scale_spike_table) + (dst_negative_scale_spike_table))) + (((dst_negative_code_spike_table) + (dst_negative_scale_spike_table)) * S ((dst_negative_code_spike_table) + (dst_negative_scale_spike_table)) + ((dst_negative_scale_spike_table) + (dst_negative_scale_spike_table)))))) /\ (forall dst_index_spike_table. (exists pvs_le_gap_spike_tabledomain. pvs_le_gap_spike_tabledomain + (dst_index_spike_table) = (0)) -> exists dst_positive_spike_table dst_negative_spike_table dst_value_spike_table. ((((exists ff_h_pvs_spike_tableentrypositive. ff_h_pvs_spike_tableentrypositive + S (dst_positive_spike_table) = S ((S (dst_index_spike_table)) * dst_positive_scale_spike_table)) /\ exists ff_q_pvs_spike_tableentrypositive. dst_positive_code_spike_table = ff_q_pvs_spike_tableentrypositive * S ((S (dst_index_spike_table)) * dst_positive_scale_spike_table) + (dst_positive_spike_table))) /\ (((((exists ff_h_pvs_spike_tableentrynegative. ff_h_pvs_spike_tableentrynegative + S (dst_negative_spike_table) = S ((S (dst_index_spike_table)) * dst_negative_scale_spike_table)) /\ exists ff_q_pvs_spike_tableentrynegative. dst_negative_code_spike_table = ff_q_pvs_spike_tableentrynegative * S ((S (dst_index_spike_table)) * dst_negative_scale_spike_table) + (dst_negative_spike_table))) /\ (exists ge_balance_positive_spike_tableentryvalue ge_balance_negative_spike_tableentryvalue. (((((dst_value_spike_table) = 2 * (ge_balance_positive_spike_tableentryvalue) /\ (ge_balance_negative_spike_tableentryvalue) = 0) \/ exists ge_signed_half_spike_tableentryvaluedecode. (((dst_value_spike_table) = 2 * ge_signed_half_spike_tableentryvaluedecode + 1 /\ (ge_balance_positive_spike_tableentryvalue) = 0) /\ (ge_balance_negative_spike_tableentryvalue) = S ge_signed_half_spike_tableentryvaluedecode))) /\ ((dst_positive_spike_table) + ge_balance_negative_spike_tableentryvalue = (dst_negative_spike_table) + ge_balance_positive_spike_tableentryvalue))))))))) -> (exists pvs_gap_spike_bound. pvs_gap_spike_bound + S (p) = (l)) -> (forall sfs_index_spike_before sfs_value_spike_before. (exists pvs_le_gap_spike_beforelower. pvs_le_gap_spike_beforelower + (0) = (sfs_index_spike_before)) -> (exists pvs_gap_spike_beforeupper. pvs_gap_spike_beforeupper + S (sfs_index_spike_before) = (p)) -> (exists dst_positive_code_spike_beforeentry dst_positive_scale_spike_beforeentry dst_negative_code_spike_beforeentry dst_negative_scale_spike_beforeentry dst_positive_spike_beforeentry dst_negative_spike_beforeentry. (((F) = (((((dst_positive_code_spike_beforeentry) + (dst_positive_scale_spike_beforeentry)) * S ((dst_positive_code_spike_beforeentry) + (dst_positive_scale_spike_beforeentry)) + ((dst_positive_scale_spike_beforeentry) + (dst_positive_scale_spike_beforeentry))) + (((dst_negative_code_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)) * S ((dst_negative_code_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)) + ((dst_negative_scale_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)))) * S ((((dst_positive_code_spike_beforeentry) + (dst_positive_scale_spike_beforeentry)) * S ((dst_positive_code_spike_beforeentry) + (dst_positive_scale_spike_beforeentry)) + ((dst_positive_scale_spike_beforeentry) + (dst_positive_scale_spike_beforeentry))) + (((dst_negative_code_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)) * S ((dst_negative_code_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)) + ((dst_negative_scale_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)))) + ((((dst_negative_code_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)) * S ((dst_negative_code_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)) + ((dst_negative_scale_spike_beforeentry) + (dst_negative_scale_spike_beforeentry))) + (((dst_negative_code_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)) * S ((dst_negative_code_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)) + ((dst_negative_scale_spike_beforeentry) + (dst_negative_scale_spike_beforeentry)))))) /\ (((((exists ff_h_pvs_spike_beforeentrypositive. ff_h_pvs_spike_beforeentrypositive + S (dst_positive_spike_beforeentry) = S ((S (sfs_index_spike_before)) * dst_positive_scale_spike_beforeentry)) /\ exists ff_q_pvs_spike_beforeentrypositive. dst_positive_code_spike_beforeentry = ff_q_pvs_spike_beforeentrypositive * S ((S (sfs_index_spike_before)) * dst_positive_scale_spike_beforeentry) + (dst_positive_spike_beforeentry))) /\ (((((exists ff_h_pvs_spike_beforeentrynegative. ff_h_pvs_spike_beforeentrynegative + S (dst_negative_spike_beforeentry) = S ((S (sfs_index_spike_before)) * dst_negative_scale_spike_beforeentry)) /\ exists ff_q_pvs_spike_beforeentrynegative. dst_negative_code_spike_beforeentry = ff_q_pvs_spike_beforeentrynegative * S ((S (sfs_index_spike_before)) * dst_negative_scale_spike_beforeentry) + (dst_negative_spike_beforeentry))) /\ (exists ge_balance_positive_spike_beforeentryvalue ge_balance_negative_spike_beforeentryvalue. (((((sfs_value_spike_before) = 2 * (ge_balance_positive_spike_beforeentryvalue) /\ (ge_balance_negative_spike_beforeentryvalue) = 0) \/ exists ge_signed_half_spike_beforeentryvaluedecode. (((sfs_value_spike_before) = 2 * ge_signed_half_spike_beforeentryvaluedecode + 1 /\ (ge_balance_positive_spike_beforeentryvalue) = 0) /\ (ge_balance_negative_spike_beforeentryvalue) = S ge_signed_half_spike_beforeentryvaluedecode))) /\ ((dst_positive_spike_beforeentry) + ge_balance_negative_spike_beforeentryvalue = (dst_negative_spike_beforeentry) + ge_balance_positive_spike_beforeentryvalue))))))))) -> sfs_value_spike_before=0) -> (exists dst_positive_code_spike_value dst_positive_scale_spike_value dst_negative_code_spike_value dst_negative_scale_spike_value dst_positive_spike_value dst_negative_spike_value. (((F) = (((((dst_positive_code_spike_value) + (dst_positive_scale_spike_value)) * S ((dst_positive_code_spike_value) + (dst_positive_scale_spike_value)) + ((dst_positive_scale_spike_value) + (dst_positive_scale_spike_value))) + (((dst_negative_code_spike_value) + (dst_negative_scale_spike_value)) * S ((dst_negative_code_spike_value) + (dst_negative_scale_spike_value)) + ((dst_negative_scale_spike_value) + (dst_negative_scale_spike_value)))) * S ((((dst_positive_code_spike_value) + (dst_positive_scale_spike_value)) * S ((dst_positive_code_spike_value) + (dst_positive_scale_spike_value)) + ((dst_positive_scale_spike_value) + (dst_positive_scale_spike_value))) + (((dst_negative_code_spike_value) + (dst_negative_scale_spike_value)) * S ((dst_negative_code_spike_value) + (dst_negative_scale_spike_value)) + ((dst_negative_scale_spike_value) + (dst_negative_scale_spike_value)))) + ((((dst_negative_code_spike_value) + (dst_negative_scale_spike_value)) * S ((dst_negative_code_spike_value) + (dst_negative_scale_spike_value)) + ((dst_negative_scale_spike_value) + (dst_negative_scale_spike_value))) + (((dst_negative_code_spike_value) + (dst_negative_scale_spike_value)) * S ((dst_negative_code_spike_value) + (dst_negative_scale_spike_value)) + ((dst_negative_scale_spike_value) + (dst_negative_scale_spike_value)))))) /\ (((((exists ff_h_pvs_spike_valuepositive. ff_h_pvs_spike_valuepositive + S (dst_positive_spike_value) = S ((S (p)) * dst_positive_scale_spike_value)) /\ exists ff_q_pvs_spike_valuepositive. dst_positive_code_spike_value = ff_q_pvs_spike_valuepositive * S ((S (p)) * dst_positive_scale_spike_value) + (dst_positive_spike_value))) /\ (((((exists ff_h_pvs_spike_valuenegative. ff_h_pvs_spike_valuenegative + S (dst_negative_spike_value) = S ((S (p)) * dst_negative_scale_spike_value)) /\ exists ff_q_pvs_spike_valuenegative. dst_negative_code_spike_value = ff_q_pvs_spike_valuenegative * S ((S (p)) * dst_negative_scale_spike_value) + (dst_negative_spike_value))) /\ (exists ge_balance_positive_spike_valuevalue ge_balance_negative_spike_valuevalue. (((((a) = 2 * (ge_balance_positive_spike_valuevalue) /\ (ge_balance_negative_spike_valuevalue) = 0) \/ exists ge_signed_half_spike_valuevaluedecode. (((a) = 2 * ge_signed_half_spike_valuevaluedecode + 1 /\ (ge_balance_positive_spike_valuevalue) = 0) /\ (ge_balance_negative_spike_valuevalue) = S ge_signed_half_spike_valuevaluedecode))) /\ ((dst_positive_spike_value) + ge_balance_negative_spike_valuevalue = (dst_negative_spike_value) + ge_balance_positive_spike_valuevalue))))))))) -> (forall sfs_index_spike_after sfs_value_spike_after. (exists pvs_le_gap_spike_afterlower. pvs_le_gap_spike_afterlower + (S p) = (sfs_index_spike_after)) -> (exists pvs_gap_spike_afterupper. pvs_gap_spike_afterupper + S (sfs_index_spike_after) = (l)) -> (exists dst_positive_code_spike_afterentry dst_positive_scale_spike_afterentry dst_negative_code_spike_afterentry dst_negative_scale_spike_afterentry dst_positive_spike_afterentry dst_negative_spike_afterentry. (((F) = (((((dst_positive_code_spike_afterentry) + (dst_positive_scale_spike_afterentry)) * S ((dst_positive_code_spike_afterentry) + (dst_positive_scale_spike_afterentry)) + ((dst_positive_scale_spike_afterentry) + (dst_positive_scale_spike_afterentry))) + (((dst_negative_code_spike_afterentry) + (dst_negative_scale_spike_afterentry)) * S ((dst_negative_code_spike_afterentry) + (dst_negative_scale_spike_afterentry)) + ((dst_negative_scale_spike_afterentry) + (dst_negative_scale_spike_afterentry)))) * S ((((dst_positive_code_spike_afterentry) + (dst_positive_scale_spike_afterentry)) * S ((dst_positive_code_spike_afterentry) + (dst_positive_scale_spike_afterentry)) + ((dst_positive_scale_spike_afterentry) + (dst_positive_scale_spike_afterentry))) + (((dst_negative_code_spike_afterentry) + (dst_negative_scale_spike_afterentry)) * S ((dst_negative_code_spike_afterentry) + (dst_negative_scale_spike_afterentry)) + ((dst_negative_scale_spike_afterentry) + (dst_negative_scale_spike_afterentry)))) + ((((dst_negative_code_spike_afterentry) + (dst_negative_scale_spike_afterentry)) * S ((dst_negative_code_spike_afterentry) + (dst_negative_scale_spike_afterentry)) + ((dst_negative_scale_spike_afterentry) + (dst_negative_scale_spike_afterentry))) + (((dst_negative_code_spike_afterentry) + (dst_negative_scale_spike_afterentry)) * S ((dst_negative_code_spike_afterentry) + (dst_negative_scale_spike_afterentry)) + ((dst_negative_scale_spike_afterentry) + (dst_negative_scale_spike_afterentry)))))) /\ (((((exists ff_h_pvs_spike_afterentrypositive. ff_h_pvs_spike_afterentrypositive + S (dst_positive_spike_afterentry) = S ((S (sfs_index_spike_after)) * dst_positive_scale_spike_afterentry)) /\ exists ff_q_pvs_spike_afterentrypositive. dst_positive_code_spike_afterentry = ff_q_pvs_spike_afterentrypositive * S ((S (sfs_index_spike_after)) * dst_positive_scale_spike_afterentry) + (dst_positive_spike_afterentry))) /\ (((((exists ff_h_pvs_spike_afterentrynegative. ff_h_pvs_spike_afterentrynegative + S (dst_negative_spike_afterentry) = S ((S (sfs_index_spike_after)) * dst_negative_scale_spike_afterentry)) /\ exists ff_q_pvs_spike_afterentrynegative. dst_negative_code_spike_afterentry = ff_q_pvs_spike_afterentrynegative * S ((S (sfs_index_spike_after)) * dst_negative_scale_spike_afterentry) + (dst_negative_spike_afterentry))) /\ (exists ge_balance_positive_spike_afterentryvalue ge_balance_negative_spike_afterentryvalue. (((((sfs_value_spike_after) = 2 * (ge_balance_positive_spike_afterentryvalue) /\ (ge_balance_negative_spike_afterentryvalue) = 0) \/ exists ge_signed_half_spike_afterentryvaluedecode. (((sfs_value_spike_after) = 2 * ge_signed_half_spike_afterentryvaluedecode + 1 /\ (ge_balance_positive_spike_afterentryvalue) = 0) /\ (ge_balance_negative_spike_afterentryvalue) = S ge_signed_half_spike_afterentryvaluedecode))) /\ ((dst_positive_spike_afterentry) + ge_balance_negative_spike_afterentryvalue = (dst_negative_spike_afterentry) + ge_balance_positive_spike_afterentryvalue))))))))) -> sfs_value_spike_after=0) -> (exists dst_positive_code_spike_sum dst_positive_scale_spike_sum dst_negative_code_spike_sum dst_negative_scale_spike_sum dst_positive_sum_spike_sum dst_negative_sum_spike_sum. (((F) = (((((dst_positive_code_spike_sum) + (dst_positive_scale_spike_sum)) * S ((dst_positive_code_spike_sum) + (dst_positive_scale_spike_sum)) + ((dst_positive_scale_spike_sum) + (dst_positive_scale_spike_sum))) + (((dst_negative_code_spike_sum) + (dst_negative_scale_spike_sum)) * S ((dst_negative_code_spike_sum) + (dst_negative_scale_spike_sum)) + ((dst_negative_scale_spike_sum) + (dst_negative_scale_spike_sum)))) * S ((((dst_positive_code_spike_sum) + (dst_positive_scale_spike_sum)) * S ((dst_positive_code_spike_sum) + (dst_positive_scale_spike_sum)) + ((dst_positive_scale_spike_sum) + (dst_positive_scale_spike_sum))) + (((dst_negative_code_spike_sum) + (dst_negative_scale_spike_sum)) * S ((dst_negative_code_spike_sum) + (dst_negative_scale_spike_sum)) + ((dst_negative_scale_spike_sum) + (dst_negative_scale_spike_sum)))) + ((((dst_negative_code_spike_sum) + (dst_negative_scale_spike_sum)) * S ((dst_negative_code_spike_sum) + (dst_negative_scale_spike_sum)) + ((dst_negative_scale_spike_sum) + (dst_negative_scale_spike_sum))) + (((dst_negative_code_spike_sum) + (dst_negative_scale_spike_sum)) * S ((dst_negative_code_spike_sum) + (dst_negative_scale_spike_sum)) + ((dst_negative_scale_spike_sum) + (dst_negative_scale_spike_sum)))))) /\ (((exists fs_u_dst_spike_sumpositive fs_v_dst_spike_sumpositive. ((((exists fs_h_dst_spike_sumpositive_body_start. fs_h_dst_spike_sumpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_spike_sumpositive)) /\ exists fs_q_dst_spike_sumpositive_body_start. fs_u_dst_spike_sumpositive = fs_q_dst_spike_sumpositive_body_start * S ((S (0)) * fs_v_dst_spike_sumpositive) + (0))) /\ ((((exists fs_h_dst_spike_sumpositive_body_terminal. fs_h_dst_spike_sumpositive_body_terminal + S (dst_positive_sum_spike_sum) = S ((S (l)) * fs_v_dst_spike_sumpositive)) /\ exists fs_q_dst_spike_sumpositive_body_terminal. fs_u_dst_spike_sumpositive = fs_q_dst_spike_sumpositive_body_terminal * S ((S (l)) * fs_v_dst_spike_sumpositive) + (dst_positive_sum_spike_sum))) /\ forall fs_i_dst_spike_sumpositive_body_steps. (exists fs_lt_dst_spike_sumpositive_body_steps_bound. fs_lt_dst_spike_sumpositive_body_steps_bound + S fs_i_dst_spike_sumpositive_body_steps = l) -> exists fs_a_dst_spike_sumpositive_body_steps fs_r_dst_spike_sumpositive_body_steps fs_s_dst_spike_sumpositive_body_steps. ((((exists fs_h_dst_spike_sumpositive_body_steps_summand. fs_h_dst_spike_sumpositive_body_steps_summand + S (fs_a_dst_spike_sumpositive_body_steps) = S ((S (fs_i_dst_spike_sumpositive_body_steps)) * dst_positive_scale_spike_sum)) /\ exists fs_q_dst_spike_sumpositive_body_steps_summand. dst_positive_code_spike_sum = fs_q_dst_spike_sumpositive_body_steps_summand * S ((S (fs_i_dst_spike_sumpositive_body_steps)) * dst_positive_scale_spike_sum) + (fs_a_dst_spike_sumpositive_body_steps))) /\ ((((exists fs_h_dst_spike_sumpositive_body_steps_partial. fs_h_dst_spike_sumpositive_body_steps_partial + S (fs_r_dst_spike_sumpositive_body_steps) = S ((S (fs_i_dst_spike_sumpositive_body_steps)) * fs_v_dst_spike_sumpositive)) /\ exists fs_q_dst_spike_sumpositive_body_steps_partial. fs_u_dst_spike_sumpositive = fs_q_dst_spike_sumpositive_body_steps_partial * S ((S (fs_i_dst_spike_sumpositive_body_steps)) * fs_v_dst_spike_sumpositive) + (fs_r_dst_spike_sumpositive_body_steps))) /\ ((((exists fs_h_dst_spike_sumpositive_body_steps_successor. fs_h_dst_spike_sumpositive_body_steps_successor + S (fs_s_dst_spike_sumpositive_body_steps) = S ((S (S fs_i_dst_spike_sumpositive_body_steps)) * fs_v_dst_spike_sumpositive)) /\ exists fs_q_dst_spike_sumpositive_body_steps_successor. fs_u_dst_spike_sumpositive = fs_q_dst_spike_sumpositive_body_steps_successor * S ((S (S fs_i_dst_spike_sumpositive_body_steps)) * fs_v_dst_spike_sumpositive) + (fs_s_dst_spike_sumpositive_body_steps))) /\ fs_s_dst_spike_sumpositive_body_steps = fs_r_dst_spike_sumpositive_body_steps + fs_a_dst_spike_sumpositive_body_steps)))))) /\ (((exists fs_u_dst_spike_sumnegative fs_v_dst_spike_sumnegative. ((((exists fs_h_dst_spike_sumnegative_body_start. fs_h_dst_spike_sumnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_spike_sumnegative)) /\ exists fs_q_dst_spike_sumnegative_body_start. fs_u_dst_spike_sumnegative = fs_q_dst_spike_sumnegative_body_start * S ((S (0)) * fs_v_dst_spike_sumnegative) + (0))) /\ ((((exists fs_h_dst_spike_sumnegative_body_terminal. fs_h_dst_spike_sumnegative_body_terminal + S (dst_negative_sum_spike_sum) = S ((S (l)) * fs_v_dst_spike_sumnegative)) /\ exists fs_q_dst_spike_sumnegative_body_terminal. fs_u_dst_spike_sumnegative = fs_q_dst_spike_sumnegative_body_terminal * S ((S (l)) * fs_v_dst_spike_sumnegative) + (dst_negative_sum_spike_sum))) /\ forall fs_i_dst_spike_sumnegative_body_steps. (exists fs_lt_dst_spike_sumnegative_body_steps_bound. fs_lt_dst_spike_sumnegative_body_steps_bound + S fs_i_dst_spike_sumnegative_body_steps = l) -> exists fs_a_dst_spike_sumnegative_body_steps fs_r_dst_spike_sumnegative_body_steps fs_s_dst_spike_sumnegative_body_steps. ((((exists fs_h_dst_spike_sumnegative_body_steps_summand. fs_h_dst_spike_sumnegative_body_steps_summand + S (fs_a_dst_spike_sumnegative_body_steps) = S ((S (fs_i_dst_spike_sumnegative_body_steps)) * dst_negative_scale_spike_sum)) /\ exists fs_q_dst_spike_sumnegative_body_steps_summand. dst_negative_code_spike_sum = fs_q_dst_spike_sumnegative_body_steps_summand * S ((S (fs_i_dst_spike_sumnegative_body_steps)) * dst_negative_scale_spike_sum) + (fs_a_dst_spike_sumnegative_body_steps))) /\ ((((exists fs_h_dst_spike_sumnegative_body_steps_partial. fs_h_dst_spike_sumnegative_body_steps_partial + S (fs_r_dst_spike_sumnegative_body_steps) = S ((S (fs_i_dst_spike_sumnegative_body_steps)) * fs_v_dst_spike_sumnegative)) /\ exists fs_q_dst_spike_sumnegative_body_steps_partial. fs_u_dst_spike_sumnegative = fs_q_dst_spike_sumnegative_body_steps_partial * S ((S (fs_i_dst_spike_sumnegative_body_steps)) * fs_v_dst_spike_sumnegative) + (fs_r_dst_spike_sumnegative_body_steps))) /\ ((((exists fs_h_dst_spike_sumnegative_body_steps_successor. fs_h_dst_spike_sumnegative_body_steps_successor + S (fs_s_dst_spike_sumnegative_body_steps) = S ((S (S fs_i_dst_spike_sumnegative_body_steps)) * fs_v_dst_spike_sumnegative)) /\ exists fs_q_dst_spike_sumnegative_body_steps_successor. fs_u_dst_spike_sumnegative = fs_q_dst_spike_sumnegative_body_steps_successor * S ((S (S fs_i_dst_spike_sumnegative_body_steps)) * fs_v_dst_spike_sumnegative) + (fs_s_dst_spike_sumnegative_body_steps))) /\ fs_s_dst_spike_sumnegative_body_steps = fs_r_dst_spike_sumnegative_body_steps + fs_a_dst_spike_sumnegative_body_steps)))))) /\ (exists ge_balance_positive_spike_sumresult ge_balance_negative_spike_sumresult. (((((z) = 2 * (ge_balance_positive_spike_sumresult) /\ (ge_balance_negative_spike_sumresult) = 0) \/ exists ge_signed_half_spike_sumresultdecode. (((z) = 2 * ge_signed_half_spike_sumresultdecode + 1 /\ (ge_balance_positive_spike_sumresult) = 0) /\ (ge_balance_negative_spike_sumresult) = S ge_signed_half_spike_sumresultdecode))) /\ ((dst_positive_sum_spike_sum) + ge_balance_negative_spike_sumresult = (dst_negative_sum_spike_sum) + ge_balance_positive_spike_sumresult))))))))) -> z=a

Constructive proof overview

Generated structural guide

An actual signed sum with one arbitrary-position entry and proved zero windows has exactly that entry value.

The unchanged tactic script uses 3 declared prerequisites and contains 42 exact native proof lines.

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

Proof neighborhood

Direct dependencies

arithmetic_signed_sum_exists Alpha theorem; checked-use authorized signed_prefix_sum_last_value Alpha theorem; checked-use authorized signed_prefix_sum_zero_tail 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

42 script commands · 9 reading checkpoints · 3 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.

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

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

  1. L1
    intro F
  2. L2
    intro l
  3. L3
    intro p
  4. L4
    intro a
  5. L5
    intro z
  6. L6
    intro hF
  7. L7
    intro hp
  8. L8
    intro hz0
  9. L9
    intro ha
  10. L10
    intro hz1
02Fix variables and assumptionsL11–11

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

  1. L11
    intro hs
03Establish hshortL12–17

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

  1. L12
    have hshort : ∃ u. SignedPrefixSum(F,S p,u)Definitions: SignedPrefixSum
  2. L13
    specialize arithmetic_signed_sum_exists (0)
  3. L14
    specialize arithmetic_signed_sum_exists (F)
  4. L15
    specialize arithmetic_signed_sum_exists (S p)
  5. L16
    apply arithmetic_signed_sum_exists
  6. L17
    exact hF
04Separate the logical casesL18–18

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

  1. L18
    cases hshort
05Establish hvalueL19–27

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

  1. L19
    have hvalue : x=a
  2. L20
    specialize signed_prefix_sum_last_value (F)
  3. L21
    specialize signed_prefix_sum_last_value (p)
  4. L22
    specialize signed_prefix_sum_last_value (a)
  5. L23
    specialize signed_prefix_sum_last_value (x)
  6. L24
    apply signed_prefix_sum_last_value
  7. L25
    exact hz0
  8. L26
    exact ha
  9. L27
    exact hshort_witness
06Establish hequalL28–37

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply signed prefix sum zero tail.

  1. L28
    have hequal : x=z
  2. L29
    specialize signed_prefix_sum_zero_tail (F)
  3. L30
    specialize signed_prefix_sum_zero_tail (S p)
  4. L31
    specialize signed_prefix_sum_zero_tail (l)
  5. L32
    specialize signed_prefix_sum_zero_tail (x)
  6. L33
    specialize signed_prefix_sum_zero_tail (z)
  7. L34
    apply signed_prefix_sum_zero_tail
  8. L35
    exact hp
  9. L36
    exact hz1
  10. L37
    exact hshort_witness
07Use earlier factsL38–38

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

  1. L38
    exact hs
08Calculate and transport equalitiesL39–40

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

  1. L39
    trans x
  2. L40
    symm
09Use earlier factsL41–42

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

  1. L41
    exact hequal
  2. L42
    exact hvalue

Library-wide reading audit

Original exact command ledger · 42 lines
  1. 0001intro F
  2. 0002intro l
  3. 0003intro p
  4. 0004intro a
  5. 0005intro z
  6. 0006intro hF
  7. 0007intro hp
  8. 0008intro hz0
  9. 0009intro ha
  10. 0010intro hz1
  11. 0011intro hs
  12. 0012have hshort : exists u. (exists dst_positive_code_spike_short dst_positive_scale_spike_short dst_negative_code_spike_short dst_negative_scale_spike_short dst_positive_sum_spike_short dst_negative_sum_spike_short. (((F) = (((((dst_positive_code_spike_short) + (dst_positive_scale_spike_short)) * S ((dst_positive_code_spike_short) + (dst_positive_scale_spike_short)) + ((dst_positive_scale_spike_short) + (dst_positive_scale_spike_short))) + (((dst_negative_code_spike_short) + (dst_negative_scale_spike_short)) * S ((dst_negative_code_spike_short) + (dst_negative_scale_spike_short)) + ((dst_negative_scale_spike_short) + (dst_negative_scale_spike_short)))) * S ((((dst_positive_code_spike_short) + (dst_positive_scale_spike_short)) * S ((dst_positive_code_spike_short) + (dst_positive_scale_spike_short)) + ((dst_positive_scale_spike_short) + (dst_positive_scale_spike_short))) + (((dst_negative_code_spike_short) + (dst_negative_scale_spike_short)) * S ((dst_negative_code_spike_short) + (dst_negative_scale_spike_short)) + ((dst_negative_scale_spike_short) + (dst_negative_scale_spike_short)))) + ((((dst_negative_code_spike_short) + (dst_negative_scale_spike_short)) * S ((dst_negative_code_spike_short) + (dst_negative_scale_spike_short)) + ((dst_negative_scale_spike_short) + (dst_negative_scale_spike_short))) + (((dst_negative_code_spike_short) + (dst_negative_scale_spike_short)) * S ((dst_negative_code_spike_short) + (dst_negative_scale_spike_short)) + ((dst_negative_scale_spike_short) + (dst_negative_scale_spike_short)))))) /\ (((exists fs_u_dst_spike_shortpositive fs_v_dst_spike_shortpositive. ((((exists fs_h_dst_spike_shortpositive_body_start. fs_h_dst_spike_shortpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_spike_shortpositive)) /\ exists fs_q_dst_spike_shortpositive_body_start. fs_u_dst_spike_shortpositive = fs_q_dst_spike_shortpositive_body_start * S ((S (0)) * fs_v_dst_spike_shortpositive) + (0))) /\ ((((exists fs_h_dst_spike_shortpositive_body_terminal. fs_h_dst_spike_shortpositive_body_terminal + S (dst_positive_sum_spike_short) = S ((S (S p)) * fs_v_dst_spike_shortpositive)) /\ exists fs_q_dst_spike_shortpositive_body_terminal. fs_u_dst_spike_shortpositive = fs_q_dst_spike_shortpositive_body_terminal * S ((S (S p)) * fs_v_dst_spike_shortpositive) + (dst_positive_sum_spike_short))) /\ forall fs_i_dst_spike_shortpositive_body_steps. (exists fs_lt_dst_spike_shortpositive_body_steps_bound. fs_lt_dst_spike_shortpositive_body_steps_bound + S fs_i_dst_spike_shortpositive_body_steps = S p) -> exists fs_a_dst_spike_shortpositive_body_steps fs_r_dst_spike_shortpositive_body_steps fs_s_dst_spike_shortpositive_body_steps. ((((exists fs_h_dst_spike_shortpositive_body_steps_summand. fs_h_dst_spike_shortpositive_body_steps_summand + S (fs_a_dst_spike_shortpositive_body_steps) = S ((S (fs_i_dst_spike_shortpositive_body_steps)) * dst_positive_scale_spike_short)) /\ exists fs_q_dst_spike_shortpositive_body_steps_summand. dst_positive_code_spike_short = fs_q_dst_spike_shortpositive_body_steps_summand * S ((S (fs_i_dst_spike_shortpositive_body_steps)) * dst_positive_scale_spike_short) + (fs_a_dst_spike_shortpositive_body_steps))) /\ ((((exists fs_h_dst_spike_shortpositive_body_steps_partial. fs_h_dst_spike_shortpositive_body_steps_partial + S (fs_r_dst_spike_shortpositive_body_steps) = S ((S (fs_i_dst_spike_shortpositive_body_steps)) * fs_v_dst_spike_shortpositive)) /\ exists fs_q_dst_spike_shortpositive_body_steps_partial. fs_u_dst_spike_shortpositive = fs_q_dst_spike_shortpositive_body_steps_partial * S ((S (fs_i_dst_spike_shortpositive_body_steps)) * fs_v_dst_spike_shortpositive) + (fs_r_dst_spike_shortpositive_body_steps))) /\ ((((exists fs_h_dst_spike_shortpositive_body_steps_successor. fs_h_dst_spike_shortpositive_body_steps_successor + S (fs_s_dst_spike_shortpositive_body_steps) = S ((S (S fs_i_dst_spike_shortpositive_body_steps)) * fs_v_dst_spike_shortpositive)) /\ exists fs_q_dst_spike_shortpositive_body_steps_successor. fs_u_dst_spike_shortpositive = fs_q_dst_spike_shortpositive_body_steps_successor * S ((S (S fs_i_dst_spike_shortpositive_body_steps)) * fs_v_dst_spike_shortpositive) + (fs_s_dst_spike_shortpositive_body_steps))) /\ fs_s_dst_spike_shortpositive_body_steps = fs_r_dst_spike_shortpositive_body_steps + fs_a_dst_spike_shortpositive_body_steps)))))) /\ (((exists fs_u_dst_spike_shortnegative fs_v_dst_spike_shortnegative. ((((exists fs_h_dst_spike_shortnegative_body_start. fs_h_dst_spike_shortnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_spike_shortnegative)) /\ exists fs_q_dst_spike_shortnegative_body_start. fs_u_dst_spike_shortnegative = fs_q_dst_spike_shortnegative_body_start * S ((S (0)) * fs_v_dst_spike_shortnegative) + (0))) /\ ((((exists fs_h_dst_spike_shortnegative_body_terminal. fs_h_dst_spike_shortnegative_body_terminal + S (dst_negative_sum_spike_short) = S ((S (S p)) * fs_v_dst_spike_shortnegative)) /\ exists fs_q_dst_spike_shortnegative_body_terminal. fs_u_dst_spike_shortnegative = fs_q_dst_spike_shortnegative_body_terminal * S ((S (S p)) * fs_v_dst_spike_shortnegative) + (dst_negative_sum_spike_short))) /\ forall fs_i_dst_spike_shortnegative_body_steps. (exists fs_lt_dst_spike_shortnegative_body_steps_bound. fs_lt_dst_spike_shortnegative_body_steps_bound + S fs_i_dst_spike_shortnegative_body_steps = S p) -> exists fs_a_dst_spike_shortnegative_body_steps fs_r_dst_spike_shortnegative_body_steps fs_s_dst_spike_shortnegative_body_steps. ((((exists fs_h_dst_spike_shortnegative_body_steps_summand. fs_h_dst_spike_shortnegative_body_steps_summand + S (fs_a_dst_spike_shortnegative_body_steps) = S ((S (fs_i_dst_spike_shortnegative_body_steps)) * dst_negative_scale_spike_short)) /\ exists fs_q_dst_spike_shortnegative_body_steps_summand. dst_negative_code_spike_short = fs_q_dst_spike_shortnegative_body_steps_summand * S ((S (fs_i_dst_spike_shortnegative_body_steps)) * dst_negative_scale_spike_short) + (fs_a_dst_spike_shortnegative_body_steps))) /\ ((((exists fs_h_dst_spike_shortnegative_body_steps_partial. fs_h_dst_spike_shortnegative_body_steps_partial + S (fs_r_dst_spike_shortnegative_body_steps) = S ((S (fs_i_dst_spike_shortnegative_body_steps)) * fs_v_dst_spike_shortnegative)) /\ exists fs_q_dst_spike_shortnegative_body_steps_partial. fs_u_dst_spike_shortnegative = fs_q_dst_spike_shortnegative_body_steps_partial * S ((S (fs_i_dst_spike_shortnegative_body_steps)) * fs_v_dst_spike_shortnegative) + (fs_r_dst_spike_shortnegative_body_steps))) /\ ((((exists fs_h_dst_spike_shortnegative_body_steps_successor. fs_h_dst_spike_shortnegative_body_steps_successor + S (fs_s_dst_spike_shortnegative_body_steps) = S ((S (S fs_i_dst_spike_shortnegative_body_steps)) * fs_v_dst_spike_shortnegative)) /\ exists fs_q_dst_spike_shortnegative_body_steps_successor. fs_u_dst_spike_shortnegative = fs_q_dst_spike_shortnegative_body_steps_successor * S ((S (S fs_i_dst_spike_shortnegative_body_steps)) * fs_v_dst_spike_shortnegative) + (fs_s_dst_spike_shortnegative_body_steps))) /\ fs_s_dst_spike_shortnegative_body_steps = fs_r_dst_spike_shortnegative_body_steps + fs_a_dst_spike_shortnegative_body_steps)))))) /\ (exists ge_balance_positive_spike_shortresult ge_balance_negative_spike_shortresult. (((((u) = 2 * (ge_balance_positive_spike_shortresult) /\ (ge_balance_negative_spike_shortresult) = 0) \/ exists ge_signed_half_spike_shortresultdecode. (((u) = 2 * ge_signed_half_spike_shortresultdecode + 1 /\ (ge_balance_positive_spike_shortresult) = 0) /\ (ge_balance_negative_spike_shortresult) = S ge_signed_half_spike_shortresultdecode))) /\ ((dst_positive_sum_spike_short) + ge_balance_negative_spike_shortresult = (dst_negative_sum_spike_short) + ge_balance_positive_spike_shortresult)))))))))
  13. 0013specialize arithmetic_signed_sum_exists (0)
  14. 0014specialize arithmetic_signed_sum_exists (F)
  15. 0015specialize arithmetic_signed_sum_exists (S p)
  16. 0016apply arithmetic_signed_sum_exists
  17. 0017exact hF
  18. 0018cases hshort
  19. 0019have hvalue : x=a
  20. 0020specialize signed_prefix_sum_last_value (F)
  21. 0021specialize signed_prefix_sum_last_value (p)
  22. 0022specialize signed_prefix_sum_last_value (a)
  23. 0023specialize signed_prefix_sum_last_value (x)
  24. 0024apply signed_prefix_sum_last_value
  25. 0025exact hz0
  26. 0026exact ha
  27. 0027exact hshort_witness
  28. 0028have hequal : x=z
  29. 0029specialize signed_prefix_sum_zero_tail (F)
  30. 0030specialize signed_prefix_sum_zero_tail (S p)
  31. 0031specialize signed_prefix_sum_zero_tail (l)
  32. 0032specialize signed_prefix_sum_zero_tail (x)
  33. 0033specialize signed_prefix_sum_zero_tail (z)
  34. 0034apply signed_prefix_sum_zero_tail
  35. 0035exact hp
  36. 0036exact hz1
  37. 0037exact hshort_witness
  38. 0038exact hs
  39. 0039trans x
  40. 0040symm
  41. 0041exact hequal
  42. 0042exact hvalue