MX0034

signed_prefix_sum_single_spike_exists

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

Construct actual fold traces for an arbitrary-position signed spike, including zero and negative values.

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. (exists dst_positive_code_spike_exists_table dst_positive_scale_spike_exists_table dst_negative_code_spike_exists_table dst_negative_scale_spike_exists_table. (((F) = (((((dst_positive_code_spike_exists_table) + (dst_positive_scale_spike_exists_table)) * S ((dst_positive_code_spike_exists_table) + (dst_positive_scale_spike_exists_table)) + ((dst_positive_scale_spike_exists_table) + (dst_positive_scale_spike_exists_table))) + (((dst_negative_code_spike_exists_table) + (dst_negative_scale_spike_exists_table)) * S ((dst_negative_code_spike_exists_table) + (dst_negative_scale_spike_exists_table)) + ((dst_negative_scale_spike_exists_table) + (dst_negative_scale_spike_exists_table)))) * S ((((dst_positive_code_spike_exists_table) + (dst_positive_scale_spike_exists_table)) * S ((dst_positive_code_spike_exists_table) + (dst_positive_scale_spike_exists_table)) + ((dst_positive_scale_spike_exists_table) + (dst_positive_scale_spike_exists_table))) + (((dst_negative_code_spike_exists_table) + (dst_negative_scale_spike_exists_table)) * S ((dst_negative_code_spike_exists_table) + (dst_negative_scale_spike_exists_table)) + ((dst_negative_scale_spike_exists_table) + (dst_negative_scale_spike_exists_table)))) + ((((dst_negative_code_spike_exists_table) + (dst_negative_scale_spike_exists_table)) * S ((dst_negative_code_spike_exists_table) + (dst_negative_scale_spike_exists_table)) + ((dst_negative_scale_spike_exists_table) + (dst_negative_scale_spike_exists_table))) + (((dst_negative_code_spike_exists_table) + (dst_negative_scale_spike_exists_table)) * S ((dst_negative_code_spike_exists_table) + (dst_negative_scale_spike_exists_table)) + ((dst_negative_scale_spike_exists_table) + (dst_negative_scale_spike_exists_table)))))) /\ (forall dst_index_spike_exists_table. (exists pvs_le_gap_spike_exists_tabledomain. pvs_le_gap_spike_exists_tabledomain + (dst_index_spike_exists_table) = (0)) -> exists dst_positive_spike_exists_table dst_negative_spike_exists_table dst_value_spike_exists_table. ((((exists ff_h_pvs_spike_exists_tableentrypositive. ff_h_pvs_spike_exists_tableentrypositive + S (dst_positive_spike_exists_table) = S ((S (dst_index_spike_exists_table)) * dst_positive_scale_spike_exists_table)) /\ exists ff_q_pvs_spike_exists_tableentrypositive. dst_positive_code_spike_exists_table = ff_q_pvs_spike_exists_tableentrypositive * S ((S (dst_index_spike_exists_table)) * dst_positive_scale_spike_exists_table) + (dst_positive_spike_exists_table))) /\ (((((exists ff_h_pvs_spike_exists_tableentrynegative. ff_h_pvs_spike_exists_tableentrynegative + S (dst_negative_spike_exists_table) = S ((S (dst_index_spike_exists_table)) * dst_negative_scale_spike_exists_table)) /\ exists ff_q_pvs_spike_exists_tableentrynegative. dst_negative_code_spike_exists_table = ff_q_pvs_spike_exists_tableentrynegative * S ((S (dst_index_spike_exists_table)) * dst_negative_scale_spike_exists_table) + (dst_negative_spike_exists_table))) /\ (exists ge_balance_positive_spike_exists_tableentryvalue ge_balance_negative_spike_exists_tableentryvalue. (((((dst_value_spike_exists_table) = 2 * (ge_balance_positive_spike_exists_tableentryvalue) /\ (ge_balance_negative_spike_exists_tableentryvalue) = 0) \/ exists ge_signed_half_spike_exists_tableentryvaluedecode. (((dst_value_spike_exists_table) = 2 * ge_signed_half_spike_exists_tableentryvaluedecode + 1 /\ (ge_balance_positive_spike_exists_tableentryvalue) = 0) /\ (ge_balance_negative_spike_exists_tableentryvalue) = S ge_signed_half_spike_exists_tableentryvaluedecode))) /\ ((dst_positive_spike_exists_table) + ge_balance_negative_spike_exists_tableentryvalue = (dst_negative_spike_exists_table) + ge_balance_positive_spike_exists_tableentryvalue))))))))) -> (exists pvs_gap_spike_exists_bound. pvs_gap_spike_exists_bound + S (p) = (l)) -> (forall sfs_index_spike_exists_before sfs_value_spike_exists_before. (exists pvs_le_gap_spike_exists_beforelower. pvs_le_gap_spike_exists_beforelower + (0) = (sfs_index_spike_exists_before)) -> (exists pvs_gap_spike_exists_beforeupper. pvs_gap_spike_exists_beforeupper + S (sfs_index_spike_exists_before) = (p)) -> (exists dst_positive_code_spike_exists_beforeentry dst_positive_scale_spike_exists_beforeentry dst_negative_code_spike_exists_beforeentry dst_negative_scale_spike_exists_beforeentry dst_positive_spike_exists_beforeentry dst_negative_spike_exists_beforeentry. (((F) = (((((dst_positive_code_spike_exists_beforeentry) + (dst_positive_scale_spike_exists_beforeentry)) * S ((dst_positive_code_spike_exists_beforeentry) + (dst_positive_scale_spike_exists_beforeentry)) + ((dst_positive_scale_spike_exists_beforeentry) + (dst_positive_scale_spike_exists_beforeentry))) + (((dst_negative_code_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)) * S ((dst_negative_code_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)) + ((dst_negative_scale_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)))) * S ((((dst_positive_code_spike_exists_beforeentry) + (dst_positive_scale_spike_exists_beforeentry)) * S ((dst_positive_code_spike_exists_beforeentry) + (dst_positive_scale_spike_exists_beforeentry)) + ((dst_positive_scale_spike_exists_beforeentry) + (dst_positive_scale_spike_exists_beforeentry))) + (((dst_negative_code_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)) * S ((dst_negative_code_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)) + ((dst_negative_scale_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)))) + ((((dst_negative_code_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)) * S ((dst_negative_code_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)) + ((dst_negative_scale_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry))) + (((dst_negative_code_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)) * S ((dst_negative_code_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)) + ((dst_negative_scale_spike_exists_beforeentry) + (dst_negative_scale_spike_exists_beforeentry)))))) /\ (((((exists ff_h_pvs_spike_exists_beforeentrypositive. ff_h_pvs_spike_exists_beforeentrypositive + S (dst_positive_spike_exists_beforeentry) = S ((S (sfs_index_spike_exists_before)) * dst_positive_scale_spike_exists_beforeentry)) /\ exists ff_q_pvs_spike_exists_beforeentrypositive. dst_positive_code_spike_exists_beforeentry = ff_q_pvs_spike_exists_beforeentrypositive * S ((S (sfs_index_spike_exists_before)) * dst_positive_scale_spike_exists_beforeentry) + (dst_positive_spike_exists_beforeentry))) /\ (((((exists ff_h_pvs_spike_exists_beforeentrynegative. ff_h_pvs_spike_exists_beforeentrynegative + S (dst_negative_spike_exists_beforeentry) = S ((S (sfs_index_spike_exists_before)) * dst_negative_scale_spike_exists_beforeentry)) /\ exists ff_q_pvs_spike_exists_beforeentrynegative. dst_negative_code_spike_exists_beforeentry = ff_q_pvs_spike_exists_beforeentrynegative * S ((S (sfs_index_spike_exists_before)) * dst_negative_scale_spike_exists_beforeentry) + (dst_negative_spike_exists_beforeentry))) /\ (exists ge_balance_positive_spike_exists_beforeentryvalue ge_balance_negative_spike_exists_beforeentryvalue. (((((sfs_value_spike_exists_before) = 2 * (ge_balance_positive_spike_exists_beforeentryvalue) /\ (ge_balance_negative_spike_exists_beforeentryvalue) = 0) \/ exists ge_signed_half_spike_exists_beforeentryvaluedecode. (((sfs_value_spike_exists_before) = 2 * ge_signed_half_spike_exists_beforeentryvaluedecode + 1 /\ (ge_balance_positive_spike_exists_beforeentryvalue) = 0) /\ (ge_balance_negative_spike_exists_beforeentryvalue) = S ge_signed_half_spike_exists_beforeentryvaluedecode))) /\ ((dst_positive_spike_exists_beforeentry) + ge_balance_negative_spike_exists_beforeentryvalue = (dst_negative_spike_exists_beforeentry) + ge_balance_positive_spike_exists_beforeentryvalue))))))))) -> sfs_value_spike_exists_before=0) -> (exists dst_positive_code_spike_exists_value dst_positive_scale_spike_exists_value dst_negative_code_spike_exists_value dst_negative_scale_spike_exists_value dst_positive_spike_exists_value dst_negative_spike_exists_value. (((F) = (((((dst_positive_code_spike_exists_value) + (dst_positive_scale_spike_exists_value)) * S ((dst_positive_code_spike_exists_value) + (dst_positive_scale_spike_exists_value)) + ((dst_positive_scale_spike_exists_value) + (dst_positive_scale_spike_exists_value))) + (((dst_negative_code_spike_exists_value) + (dst_negative_scale_spike_exists_value)) * S ((dst_negative_code_spike_exists_value) + (dst_negative_scale_spike_exists_value)) + ((dst_negative_scale_spike_exists_value) + (dst_negative_scale_spike_exists_value)))) * S ((((dst_positive_code_spike_exists_value) + (dst_positive_scale_spike_exists_value)) * S ((dst_positive_code_spike_exists_value) + (dst_positive_scale_spike_exists_value)) + ((dst_positive_scale_spike_exists_value) + (dst_positive_scale_spike_exists_value))) + (((dst_negative_code_spike_exists_value) + (dst_negative_scale_spike_exists_value)) * S ((dst_negative_code_spike_exists_value) + (dst_negative_scale_spike_exists_value)) + ((dst_negative_scale_spike_exists_value) + (dst_negative_scale_spike_exists_value)))) + ((((dst_negative_code_spike_exists_value) + (dst_negative_scale_spike_exists_value)) * S ((dst_negative_code_spike_exists_value) + (dst_negative_scale_spike_exists_value)) + ((dst_negative_scale_spike_exists_value) + (dst_negative_scale_spike_exists_value))) + (((dst_negative_code_spike_exists_value) + (dst_negative_scale_spike_exists_value)) * S ((dst_negative_code_spike_exists_value) + (dst_negative_scale_spike_exists_value)) + ((dst_negative_scale_spike_exists_value) + (dst_negative_scale_spike_exists_value)))))) /\ (((((exists ff_h_pvs_spike_exists_valuepositive. ff_h_pvs_spike_exists_valuepositive + S (dst_positive_spike_exists_value) = S ((S (p)) * dst_positive_scale_spike_exists_value)) /\ exists ff_q_pvs_spike_exists_valuepositive. dst_positive_code_spike_exists_value = ff_q_pvs_spike_exists_valuepositive * S ((S (p)) * dst_positive_scale_spike_exists_value) + (dst_positive_spike_exists_value))) /\ (((((exists ff_h_pvs_spike_exists_valuenegative. ff_h_pvs_spike_exists_valuenegative + S (dst_negative_spike_exists_value) = S ((S (p)) * dst_negative_scale_spike_exists_value)) /\ exists ff_q_pvs_spike_exists_valuenegative. dst_negative_code_spike_exists_value = ff_q_pvs_spike_exists_valuenegative * S ((S (p)) * dst_negative_scale_spike_exists_value) + (dst_negative_spike_exists_value))) /\ (exists ge_balance_positive_spike_exists_valuevalue ge_balance_negative_spike_exists_valuevalue. (((((a) = 2 * (ge_balance_positive_spike_exists_valuevalue) /\ (ge_balance_negative_spike_exists_valuevalue) = 0) \/ exists ge_signed_half_spike_exists_valuevaluedecode. (((a) = 2 * ge_signed_half_spike_exists_valuevaluedecode + 1 /\ (ge_balance_positive_spike_exists_valuevalue) = 0) /\ (ge_balance_negative_spike_exists_valuevalue) = S ge_signed_half_spike_exists_valuevaluedecode))) /\ ((dst_positive_spike_exists_value) + ge_balance_negative_spike_exists_valuevalue = (dst_negative_spike_exists_value) + ge_balance_positive_spike_exists_valuevalue))))))))) -> (forall sfs_index_spike_exists_after sfs_value_spike_exists_after. (exists pvs_le_gap_spike_exists_afterlower. pvs_le_gap_spike_exists_afterlower + (S p) = (sfs_index_spike_exists_after)) -> (exists pvs_gap_spike_exists_afterupper. pvs_gap_spike_exists_afterupper + S (sfs_index_spike_exists_after) = (l)) -> (exists dst_positive_code_spike_exists_afterentry dst_positive_scale_spike_exists_afterentry dst_negative_code_spike_exists_afterentry dst_negative_scale_spike_exists_afterentry dst_positive_spike_exists_afterentry dst_negative_spike_exists_afterentry. (((F) = (((((dst_positive_code_spike_exists_afterentry) + (dst_positive_scale_spike_exists_afterentry)) * S ((dst_positive_code_spike_exists_afterentry) + (dst_positive_scale_spike_exists_afterentry)) + ((dst_positive_scale_spike_exists_afterentry) + (dst_positive_scale_spike_exists_afterentry))) + (((dst_negative_code_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)) * S ((dst_negative_code_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)) + ((dst_negative_scale_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)))) * S ((((dst_positive_code_spike_exists_afterentry) + (dst_positive_scale_spike_exists_afterentry)) * S ((dst_positive_code_spike_exists_afterentry) + (dst_positive_scale_spike_exists_afterentry)) + ((dst_positive_scale_spike_exists_afterentry) + (dst_positive_scale_spike_exists_afterentry))) + (((dst_negative_code_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)) * S ((dst_negative_code_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)) + ((dst_negative_scale_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)))) + ((((dst_negative_code_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)) * S ((dst_negative_code_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)) + ((dst_negative_scale_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry))) + (((dst_negative_code_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)) * S ((dst_negative_code_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)) + ((dst_negative_scale_spike_exists_afterentry) + (dst_negative_scale_spike_exists_afterentry)))))) /\ (((((exists ff_h_pvs_spike_exists_afterentrypositive. ff_h_pvs_spike_exists_afterentrypositive + S (dst_positive_spike_exists_afterentry) = S ((S (sfs_index_spike_exists_after)) * dst_positive_scale_spike_exists_afterentry)) /\ exists ff_q_pvs_spike_exists_afterentrypositive. dst_positive_code_spike_exists_afterentry = ff_q_pvs_spike_exists_afterentrypositive * S ((S (sfs_index_spike_exists_after)) * dst_positive_scale_spike_exists_afterentry) + (dst_positive_spike_exists_afterentry))) /\ (((((exists ff_h_pvs_spike_exists_afterentrynegative. ff_h_pvs_spike_exists_afterentrynegative + S (dst_negative_spike_exists_afterentry) = S ((S (sfs_index_spike_exists_after)) * dst_negative_scale_spike_exists_afterentry)) /\ exists ff_q_pvs_spike_exists_afterentrynegative. dst_negative_code_spike_exists_afterentry = ff_q_pvs_spike_exists_afterentrynegative * S ((S (sfs_index_spike_exists_after)) * dst_negative_scale_spike_exists_afterentry) + (dst_negative_spike_exists_afterentry))) /\ (exists ge_balance_positive_spike_exists_afterentryvalue ge_balance_negative_spike_exists_afterentryvalue. (((((sfs_value_spike_exists_after) = 2 * (ge_balance_positive_spike_exists_afterentryvalue) /\ (ge_balance_negative_spike_exists_afterentryvalue) = 0) \/ exists ge_signed_half_spike_exists_afterentryvaluedecode. (((sfs_value_spike_exists_after) = 2 * ge_signed_half_spike_exists_afterentryvaluedecode + 1 /\ (ge_balance_positive_spike_exists_afterentryvalue) = 0) /\ (ge_balance_negative_spike_exists_afterentryvalue) = S ge_signed_half_spike_exists_afterentryvaluedecode))) /\ ((dst_positive_spike_exists_afterentry) + ge_balance_negative_spike_exists_afterentryvalue = (dst_negative_spike_exists_afterentry) + ge_balance_positive_spike_exists_afterentryvalue))))))))) -> sfs_value_spike_exists_after=0) -> (exists dst_positive_code_spike_exists_sum dst_positive_scale_spike_exists_sum dst_negative_code_spike_exists_sum dst_negative_scale_spike_exists_sum dst_positive_sum_spike_exists_sum dst_negative_sum_spike_exists_sum. (((F) = (((((dst_positive_code_spike_exists_sum) + (dst_positive_scale_spike_exists_sum)) * S ((dst_positive_code_spike_exists_sum) + (dst_positive_scale_spike_exists_sum)) + ((dst_positive_scale_spike_exists_sum) + (dst_positive_scale_spike_exists_sum))) + (((dst_negative_code_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)) * S ((dst_negative_code_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)) + ((dst_negative_scale_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)))) * S ((((dst_positive_code_spike_exists_sum) + (dst_positive_scale_spike_exists_sum)) * S ((dst_positive_code_spike_exists_sum) + (dst_positive_scale_spike_exists_sum)) + ((dst_positive_scale_spike_exists_sum) + (dst_positive_scale_spike_exists_sum))) + (((dst_negative_code_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)) * S ((dst_negative_code_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)) + ((dst_negative_scale_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)))) + ((((dst_negative_code_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)) * S ((dst_negative_code_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)) + ((dst_negative_scale_spike_exists_sum) + (dst_negative_scale_spike_exists_sum))) + (((dst_negative_code_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)) * S ((dst_negative_code_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)) + ((dst_negative_scale_spike_exists_sum) + (dst_negative_scale_spike_exists_sum)))))) /\ (((exists fs_u_dst_spike_exists_sumpositive fs_v_dst_spike_exists_sumpositive. ((((exists fs_h_dst_spike_exists_sumpositive_body_start. fs_h_dst_spike_exists_sumpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_spike_exists_sumpositive)) /\ exists fs_q_dst_spike_exists_sumpositive_body_start. fs_u_dst_spike_exists_sumpositive = fs_q_dst_spike_exists_sumpositive_body_start * S ((S (0)) * fs_v_dst_spike_exists_sumpositive) + (0))) /\ ((((exists fs_h_dst_spike_exists_sumpositive_body_terminal. fs_h_dst_spike_exists_sumpositive_body_terminal + S (dst_positive_sum_spike_exists_sum) = S ((S (l)) * fs_v_dst_spike_exists_sumpositive)) /\ exists fs_q_dst_spike_exists_sumpositive_body_terminal. fs_u_dst_spike_exists_sumpositive = fs_q_dst_spike_exists_sumpositive_body_terminal * S ((S (l)) * fs_v_dst_spike_exists_sumpositive) + (dst_positive_sum_spike_exists_sum))) /\ forall fs_i_dst_spike_exists_sumpositive_body_steps. (exists fs_lt_dst_spike_exists_sumpositive_body_steps_bound. fs_lt_dst_spike_exists_sumpositive_body_steps_bound + S fs_i_dst_spike_exists_sumpositive_body_steps = l) -> exists fs_a_dst_spike_exists_sumpositive_body_steps fs_r_dst_spike_exists_sumpositive_body_steps fs_s_dst_spike_exists_sumpositive_body_steps. ((((exists fs_h_dst_spike_exists_sumpositive_body_steps_summand. fs_h_dst_spike_exists_sumpositive_body_steps_summand + S (fs_a_dst_spike_exists_sumpositive_body_steps) = S ((S (fs_i_dst_spike_exists_sumpositive_body_steps)) * dst_positive_scale_spike_exists_sum)) /\ exists fs_q_dst_spike_exists_sumpositive_body_steps_summand. dst_positive_code_spike_exists_sum = fs_q_dst_spike_exists_sumpositive_body_steps_summand * S ((S (fs_i_dst_spike_exists_sumpositive_body_steps)) * dst_positive_scale_spike_exists_sum) + (fs_a_dst_spike_exists_sumpositive_body_steps))) /\ ((((exists fs_h_dst_spike_exists_sumpositive_body_steps_partial. fs_h_dst_spike_exists_sumpositive_body_steps_partial + S (fs_r_dst_spike_exists_sumpositive_body_steps) = S ((S (fs_i_dst_spike_exists_sumpositive_body_steps)) * fs_v_dst_spike_exists_sumpositive)) /\ exists fs_q_dst_spike_exists_sumpositive_body_steps_partial. fs_u_dst_spike_exists_sumpositive = fs_q_dst_spike_exists_sumpositive_body_steps_partial * S ((S (fs_i_dst_spike_exists_sumpositive_body_steps)) * fs_v_dst_spike_exists_sumpositive) + (fs_r_dst_spike_exists_sumpositive_body_steps))) /\ ((((exists fs_h_dst_spike_exists_sumpositive_body_steps_successor. fs_h_dst_spike_exists_sumpositive_body_steps_successor + S (fs_s_dst_spike_exists_sumpositive_body_steps) = S ((S (S fs_i_dst_spike_exists_sumpositive_body_steps)) * fs_v_dst_spike_exists_sumpositive)) /\ exists fs_q_dst_spike_exists_sumpositive_body_steps_successor. fs_u_dst_spike_exists_sumpositive = fs_q_dst_spike_exists_sumpositive_body_steps_successor * S ((S (S fs_i_dst_spike_exists_sumpositive_body_steps)) * fs_v_dst_spike_exists_sumpositive) + (fs_s_dst_spike_exists_sumpositive_body_steps))) /\ fs_s_dst_spike_exists_sumpositive_body_steps = fs_r_dst_spike_exists_sumpositive_body_steps + fs_a_dst_spike_exists_sumpositive_body_steps)))))) /\ (((exists fs_u_dst_spike_exists_sumnegative fs_v_dst_spike_exists_sumnegative. ((((exists fs_h_dst_spike_exists_sumnegative_body_start. fs_h_dst_spike_exists_sumnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_spike_exists_sumnegative)) /\ exists fs_q_dst_spike_exists_sumnegative_body_start. fs_u_dst_spike_exists_sumnegative = fs_q_dst_spike_exists_sumnegative_body_start * S ((S (0)) * fs_v_dst_spike_exists_sumnegative) + (0))) /\ ((((exists fs_h_dst_spike_exists_sumnegative_body_terminal. fs_h_dst_spike_exists_sumnegative_body_terminal + S (dst_negative_sum_spike_exists_sum) = S ((S (l)) * fs_v_dst_spike_exists_sumnegative)) /\ exists fs_q_dst_spike_exists_sumnegative_body_terminal. fs_u_dst_spike_exists_sumnegative = fs_q_dst_spike_exists_sumnegative_body_terminal * S ((S (l)) * fs_v_dst_spike_exists_sumnegative) + (dst_negative_sum_spike_exists_sum))) /\ forall fs_i_dst_spike_exists_sumnegative_body_steps. (exists fs_lt_dst_spike_exists_sumnegative_body_steps_bound. fs_lt_dst_spike_exists_sumnegative_body_steps_bound + S fs_i_dst_spike_exists_sumnegative_body_steps = l) -> exists fs_a_dst_spike_exists_sumnegative_body_steps fs_r_dst_spike_exists_sumnegative_body_steps fs_s_dst_spike_exists_sumnegative_body_steps. ((((exists fs_h_dst_spike_exists_sumnegative_body_steps_summand. fs_h_dst_spike_exists_sumnegative_body_steps_summand + S (fs_a_dst_spike_exists_sumnegative_body_steps) = S ((S (fs_i_dst_spike_exists_sumnegative_body_steps)) * dst_negative_scale_spike_exists_sum)) /\ exists fs_q_dst_spike_exists_sumnegative_body_steps_summand. dst_negative_code_spike_exists_sum = fs_q_dst_spike_exists_sumnegative_body_steps_summand * S ((S (fs_i_dst_spike_exists_sumnegative_body_steps)) * dst_negative_scale_spike_exists_sum) + (fs_a_dst_spike_exists_sumnegative_body_steps))) /\ ((((exists fs_h_dst_spike_exists_sumnegative_body_steps_partial. fs_h_dst_spike_exists_sumnegative_body_steps_partial + S (fs_r_dst_spike_exists_sumnegative_body_steps) = S ((S (fs_i_dst_spike_exists_sumnegative_body_steps)) * fs_v_dst_spike_exists_sumnegative)) /\ exists fs_q_dst_spike_exists_sumnegative_body_steps_partial. fs_u_dst_spike_exists_sumnegative = fs_q_dst_spike_exists_sumnegative_body_steps_partial * S ((S (fs_i_dst_spike_exists_sumnegative_body_steps)) * fs_v_dst_spike_exists_sumnegative) + (fs_r_dst_spike_exists_sumnegative_body_steps))) /\ ((((exists fs_h_dst_spike_exists_sumnegative_body_steps_successor. fs_h_dst_spike_exists_sumnegative_body_steps_successor + S (fs_s_dst_spike_exists_sumnegative_body_steps) = S ((S (S fs_i_dst_spike_exists_sumnegative_body_steps)) * fs_v_dst_spike_exists_sumnegative)) /\ exists fs_q_dst_spike_exists_sumnegative_body_steps_successor. fs_u_dst_spike_exists_sumnegative = fs_q_dst_spike_exists_sumnegative_body_steps_successor * S ((S (S fs_i_dst_spike_exists_sumnegative_body_steps)) * fs_v_dst_spike_exists_sumnegative) + (fs_s_dst_spike_exists_sumnegative_body_steps))) /\ fs_s_dst_spike_exists_sumnegative_body_steps = fs_r_dst_spike_exists_sumnegative_body_steps + fs_a_dst_spike_exists_sumnegative_body_steps)))))) /\ (exists ge_balance_positive_spike_exists_sumresult ge_balance_negative_spike_exists_sumresult. (((((a) = 2 * (ge_balance_positive_spike_exists_sumresult) /\ (ge_balance_negative_spike_exists_sumresult) = 0) \/ exists ge_signed_half_spike_exists_sumresultdecode. (((a) = 2 * ge_signed_half_spike_exists_sumresultdecode + 1 /\ (ge_balance_positive_spike_exists_sumresult) = 0) /\ (ge_balance_negative_spike_exists_sumresult) = S ge_signed_half_spike_exists_sumresultdecode))) /\ ((dst_positive_sum_spike_exists_sum) + ge_balance_negative_spike_exists_sumresult = (dst_negative_sum_spike_exists_sum) + ge_balance_positive_spike_exists_sumresult)))))))))

Constructive proof overview

Generated structural guide

Construct actual fold traces for an arbitrary-position signed spike, including zero and negative values.

The unchanged tactic script uses 2 declared prerequisites and contains 32 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 MX0033 signed_prefix_sum_single_spike_value

Direct dependents

none

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

32 script commands · 7 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 (1)

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

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 hF
  6. L6
    intro hp
  7. L7
    intro hz0
  8. L8
    intro ha
  9. L9
    intro hz1
02Establish hsL10–15

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

  1. L10
    have hs : ∃ z. SignedPrefixSum(F,l,z)Definitions: SignedPrefixSum
  2. L11
    specialize arithmetic_signed_sum_exists (0)
  3. L12
    specialize arithmetic_signed_sum_exists (F)
  4. L13
    specialize arithmetic_signed_sum_exists (l)
  5. L14
    apply arithmetic_signed_sum_exists
  6. L15
    exact hF
03Separate the logical casesL16–16

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

  1. L16
    cases hs
04Establish heqL17–26

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

  1. L17
    have heq : x=a
  2. L18
    specialize signed_prefix_sum_single_spike_value (F)
  3. L19
    specialize signed_prefix_sum_single_spike_value (l)
  4. L20
    specialize signed_prefix_sum_single_spike_value (p)
  5. L21
    specialize signed_prefix_sum_single_spike_value (a)
  6. L22
    specialize signed_prefix_sum_single_spike_value (x)
  7. L23
    apply signed_prefix_sum_single_spike_value
  8. L24
    exact hF
  9. L25
    exact hp
  10. L26
    exact hz0
05Use earlier factsL27–29

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

  1. L27
    exact ha
  2. L28
    exact hz1
  3. L29
    exact hs_witness
06Calculate and transport equalitiesL30–31

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

  1. L30
    rewrite heq at hs_witness
  2. L31
    rewrite heq at hs_witness
07Use earlier factsL32–32

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

  1. L32
    exact hs_witness

Library-wide reading audit

Original exact command ledger · 32 lines
  1. 0001intro F
  2. 0002intro l
  3. 0003intro p
  4. 0004intro a
  5. 0005intro hF
  6. 0006intro hp
  7. 0007intro hz0
  8. 0008intro ha
  9. 0009intro hz1
  10. 0010have hs : exists z. (exists dst_positive_code_spike_actual_sum dst_positive_scale_spike_actual_sum dst_negative_code_spike_actual_sum dst_negative_scale_spike_actual_sum dst_positive_sum_spike_actual_sum dst_negative_sum_spike_actual_sum. (((F) = (((((dst_positive_code_spike_actual_sum) + (dst_positive_scale_spike_actual_sum)) * S ((dst_positive_code_spike_actual_sum) + (dst_positive_scale_spike_actual_sum)) + ((dst_positive_scale_spike_actual_sum) + (dst_positive_scale_spike_actual_sum))) + (((dst_negative_code_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)) * S ((dst_negative_code_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)) + ((dst_negative_scale_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)))) * S ((((dst_positive_code_spike_actual_sum) + (dst_positive_scale_spike_actual_sum)) * S ((dst_positive_code_spike_actual_sum) + (dst_positive_scale_spike_actual_sum)) + ((dst_positive_scale_spike_actual_sum) + (dst_positive_scale_spike_actual_sum))) + (((dst_negative_code_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)) * S ((dst_negative_code_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)) + ((dst_negative_scale_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)))) + ((((dst_negative_code_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)) * S ((dst_negative_code_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)) + ((dst_negative_scale_spike_actual_sum) + (dst_negative_scale_spike_actual_sum))) + (((dst_negative_code_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)) * S ((dst_negative_code_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)) + ((dst_negative_scale_spike_actual_sum) + (dst_negative_scale_spike_actual_sum)))))) /\ (((exists fs_u_dst_spike_actual_sumpositive fs_v_dst_spike_actual_sumpositive. ((((exists fs_h_dst_spike_actual_sumpositive_body_start. fs_h_dst_spike_actual_sumpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_spike_actual_sumpositive)) /\ exists fs_q_dst_spike_actual_sumpositive_body_start. fs_u_dst_spike_actual_sumpositive = fs_q_dst_spike_actual_sumpositive_body_start * S ((S (0)) * fs_v_dst_spike_actual_sumpositive) + (0))) /\ ((((exists fs_h_dst_spike_actual_sumpositive_body_terminal. fs_h_dst_spike_actual_sumpositive_body_terminal + S (dst_positive_sum_spike_actual_sum) = S ((S (l)) * fs_v_dst_spike_actual_sumpositive)) /\ exists fs_q_dst_spike_actual_sumpositive_body_terminal. fs_u_dst_spike_actual_sumpositive = fs_q_dst_spike_actual_sumpositive_body_terminal * S ((S (l)) * fs_v_dst_spike_actual_sumpositive) + (dst_positive_sum_spike_actual_sum))) /\ forall fs_i_dst_spike_actual_sumpositive_body_steps. (exists fs_lt_dst_spike_actual_sumpositive_body_steps_bound. fs_lt_dst_spike_actual_sumpositive_body_steps_bound + S fs_i_dst_spike_actual_sumpositive_body_steps = l) -> exists fs_a_dst_spike_actual_sumpositive_body_steps fs_r_dst_spike_actual_sumpositive_body_steps fs_s_dst_spike_actual_sumpositive_body_steps. ((((exists fs_h_dst_spike_actual_sumpositive_body_steps_summand. fs_h_dst_spike_actual_sumpositive_body_steps_summand + S (fs_a_dst_spike_actual_sumpositive_body_steps) = S ((S (fs_i_dst_spike_actual_sumpositive_body_steps)) * dst_positive_scale_spike_actual_sum)) /\ exists fs_q_dst_spike_actual_sumpositive_body_steps_summand. dst_positive_code_spike_actual_sum = fs_q_dst_spike_actual_sumpositive_body_steps_summand * S ((S (fs_i_dst_spike_actual_sumpositive_body_steps)) * dst_positive_scale_spike_actual_sum) + (fs_a_dst_spike_actual_sumpositive_body_steps))) /\ ((((exists fs_h_dst_spike_actual_sumpositive_body_steps_partial. fs_h_dst_spike_actual_sumpositive_body_steps_partial + S (fs_r_dst_spike_actual_sumpositive_body_steps) = S ((S (fs_i_dst_spike_actual_sumpositive_body_steps)) * fs_v_dst_spike_actual_sumpositive)) /\ exists fs_q_dst_spike_actual_sumpositive_body_steps_partial. fs_u_dst_spike_actual_sumpositive = fs_q_dst_spike_actual_sumpositive_body_steps_partial * S ((S (fs_i_dst_spike_actual_sumpositive_body_steps)) * fs_v_dst_spike_actual_sumpositive) + (fs_r_dst_spike_actual_sumpositive_body_steps))) /\ ((((exists fs_h_dst_spike_actual_sumpositive_body_steps_successor. fs_h_dst_spike_actual_sumpositive_body_steps_successor + S (fs_s_dst_spike_actual_sumpositive_body_steps) = S ((S (S fs_i_dst_spike_actual_sumpositive_body_steps)) * fs_v_dst_spike_actual_sumpositive)) /\ exists fs_q_dst_spike_actual_sumpositive_body_steps_successor. fs_u_dst_spike_actual_sumpositive = fs_q_dst_spike_actual_sumpositive_body_steps_successor * S ((S (S fs_i_dst_spike_actual_sumpositive_body_steps)) * fs_v_dst_spike_actual_sumpositive) + (fs_s_dst_spike_actual_sumpositive_body_steps))) /\ fs_s_dst_spike_actual_sumpositive_body_steps = fs_r_dst_spike_actual_sumpositive_body_steps + fs_a_dst_spike_actual_sumpositive_body_steps)))))) /\ (((exists fs_u_dst_spike_actual_sumnegative fs_v_dst_spike_actual_sumnegative. ((((exists fs_h_dst_spike_actual_sumnegative_body_start. fs_h_dst_spike_actual_sumnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_spike_actual_sumnegative)) /\ exists fs_q_dst_spike_actual_sumnegative_body_start. fs_u_dst_spike_actual_sumnegative = fs_q_dst_spike_actual_sumnegative_body_start * S ((S (0)) * fs_v_dst_spike_actual_sumnegative) + (0))) /\ ((((exists fs_h_dst_spike_actual_sumnegative_body_terminal. fs_h_dst_spike_actual_sumnegative_body_terminal + S (dst_negative_sum_spike_actual_sum) = S ((S (l)) * fs_v_dst_spike_actual_sumnegative)) /\ exists fs_q_dst_spike_actual_sumnegative_body_terminal. fs_u_dst_spike_actual_sumnegative = fs_q_dst_spike_actual_sumnegative_body_terminal * S ((S (l)) * fs_v_dst_spike_actual_sumnegative) + (dst_negative_sum_spike_actual_sum))) /\ forall fs_i_dst_spike_actual_sumnegative_body_steps. (exists fs_lt_dst_spike_actual_sumnegative_body_steps_bound. fs_lt_dst_spike_actual_sumnegative_body_steps_bound + S fs_i_dst_spike_actual_sumnegative_body_steps = l) -> exists fs_a_dst_spike_actual_sumnegative_body_steps fs_r_dst_spike_actual_sumnegative_body_steps fs_s_dst_spike_actual_sumnegative_body_steps. ((((exists fs_h_dst_spike_actual_sumnegative_body_steps_summand. fs_h_dst_spike_actual_sumnegative_body_steps_summand + S (fs_a_dst_spike_actual_sumnegative_body_steps) = S ((S (fs_i_dst_spike_actual_sumnegative_body_steps)) * dst_negative_scale_spike_actual_sum)) /\ exists fs_q_dst_spike_actual_sumnegative_body_steps_summand. dst_negative_code_spike_actual_sum = fs_q_dst_spike_actual_sumnegative_body_steps_summand * S ((S (fs_i_dst_spike_actual_sumnegative_body_steps)) * dst_negative_scale_spike_actual_sum) + (fs_a_dst_spike_actual_sumnegative_body_steps))) /\ ((((exists fs_h_dst_spike_actual_sumnegative_body_steps_partial. fs_h_dst_spike_actual_sumnegative_body_steps_partial + S (fs_r_dst_spike_actual_sumnegative_body_steps) = S ((S (fs_i_dst_spike_actual_sumnegative_body_steps)) * fs_v_dst_spike_actual_sumnegative)) /\ exists fs_q_dst_spike_actual_sumnegative_body_steps_partial. fs_u_dst_spike_actual_sumnegative = fs_q_dst_spike_actual_sumnegative_body_steps_partial * S ((S (fs_i_dst_spike_actual_sumnegative_body_steps)) * fs_v_dst_spike_actual_sumnegative) + (fs_r_dst_spike_actual_sumnegative_body_steps))) /\ ((((exists fs_h_dst_spike_actual_sumnegative_body_steps_successor. fs_h_dst_spike_actual_sumnegative_body_steps_successor + S (fs_s_dst_spike_actual_sumnegative_body_steps) = S ((S (S fs_i_dst_spike_actual_sumnegative_body_steps)) * fs_v_dst_spike_actual_sumnegative)) /\ exists fs_q_dst_spike_actual_sumnegative_body_steps_successor. fs_u_dst_spike_actual_sumnegative = fs_q_dst_spike_actual_sumnegative_body_steps_successor * S ((S (S fs_i_dst_spike_actual_sumnegative_body_steps)) * fs_v_dst_spike_actual_sumnegative) + (fs_s_dst_spike_actual_sumnegative_body_steps))) /\ fs_s_dst_spike_actual_sumnegative_body_steps = fs_r_dst_spike_actual_sumnegative_body_steps + fs_a_dst_spike_actual_sumnegative_body_steps)))))) /\ (exists ge_balance_positive_spike_actual_sumresult ge_balance_negative_spike_actual_sumresult. (((((z) = 2 * (ge_balance_positive_spike_actual_sumresult) /\ (ge_balance_negative_spike_actual_sumresult) = 0) \/ exists ge_signed_half_spike_actual_sumresultdecode. (((z) = 2 * ge_signed_half_spike_actual_sumresultdecode + 1 /\ (ge_balance_positive_spike_actual_sumresult) = 0) /\ (ge_balance_negative_spike_actual_sumresult) = S ge_signed_half_spike_actual_sumresultdecode))) /\ ((dst_positive_sum_spike_actual_sum) + ge_balance_negative_spike_actual_sumresult = (dst_negative_sum_spike_actual_sum) + ge_balance_positive_spike_actual_sumresult)))))))))
  11. 0011specialize arithmetic_signed_sum_exists (0)
  12. 0012specialize arithmetic_signed_sum_exists (F)
  13. 0013specialize arithmetic_signed_sum_exists (l)
  14. 0014apply arithmetic_signed_sum_exists
  15. 0015exact hF
  16. 0016cases hs
  17. 0017have heq : x=a
  18. 0018specialize signed_prefix_sum_single_spike_value (F)
  19. 0019specialize signed_prefix_sum_single_spike_value (l)
  20. 0020specialize signed_prefix_sum_single_spike_value (p)
  21. 0021specialize signed_prefix_sum_single_spike_value (a)
  22. 0022specialize signed_prefix_sum_single_spike_value (x)
  23. 0023apply signed_prefix_sum_single_spike_value
  24. 0024exact hF
  25. 0025exact hp
  26. 0026exact hz0
  27. 0027exact ha
  28. 0028exact hz1
  29. 0029exact hs_witness
  30. 0030rewrite heq at hs_witness
  31. 0031rewrite heq at hs_witness
  32. 0032exact hs_witness