ZS0008

signed_prefix_sum_zero_padding_iff

Actually construct either fold from the other across a proved zero tail; both implications retain real finite-sum witnesses.

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

Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved.

The zero window is half-open and its order hypothesis is essential. All folds retain actual beta-coded traces. These are support lemmas for the separately verified full inversion endpoint.

Exact theorem in conservative defined notation

∀ F. ∀ k. ∀ l. ∀ z. ArithTable(0,F)Le(k,l)SignedZeroWindow(F,k,l) → (SignedPrefixSum(F,k,z)SignedPrefixSum(F,l,z)) ∧ (SignedPrefixSum(F,l,z)SignedPrefixSum(F,k,z))

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall F k l z. (exists dst_positive_code_pad_table dst_positive_scale_pad_table dst_negative_code_pad_table dst_negative_scale_pad_table. (((F) = (((((dst_positive_code_pad_table) + (dst_positive_scale_pad_table)) * S ((dst_positive_code_pad_table) + (dst_positive_scale_pad_table)) + ((dst_positive_scale_pad_table) + (dst_positive_scale_pad_table))) + (((dst_negative_code_pad_table) + (dst_negative_scale_pad_table)) * S ((dst_negative_code_pad_table) + (dst_negative_scale_pad_table)) + ((dst_negative_scale_pad_table) + (dst_negative_scale_pad_table)))) * S ((((dst_positive_code_pad_table) + (dst_positive_scale_pad_table)) * S ((dst_positive_code_pad_table) + (dst_positive_scale_pad_table)) + ((dst_positive_scale_pad_table) + (dst_positive_scale_pad_table))) + (((dst_negative_code_pad_table) + (dst_negative_scale_pad_table)) * S ((dst_negative_code_pad_table) + (dst_negative_scale_pad_table)) + ((dst_negative_scale_pad_table) + (dst_negative_scale_pad_table)))) + ((((dst_negative_code_pad_table) + (dst_negative_scale_pad_table)) * S ((dst_negative_code_pad_table) + (dst_negative_scale_pad_table)) + ((dst_negative_scale_pad_table) + (dst_negative_scale_pad_table))) + (((dst_negative_code_pad_table) + (dst_negative_scale_pad_table)) * S ((dst_negative_code_pad_table) + (dst_negative_scale_pad_table)) + ((dst_negative_scale_pad_table) + (dst_negative_scale_pad_table)))))) /\ (forall dst_index_pad_table. (exists pvs_le_gap_pad_tabledomain. pvs_le_gap_pad_tabledomain + (dst_index_pad_table) = (0)) -> exists dst_positive_pad_table dst_negative_pad_table dst_value_pad_table. ((((exists ff_h_pvs_pad_tableentrypositive. ff_h_pvs_pad_tableentrypositive + S (dst_positive_pad_table) = S ((S (dst_index_pad_table)) * dst_positive_scale_pad_table)) /\ exists ff_q_pvs_pad_tableentrypositive. dst_positive_code_pad_table = ff_q_pvs_pad_tableentrypositive * S ((S (dst_index_pad_table)) * dst_positive_scale_pad_table) + (dst_positive_pad_table))) /\ (((((exists ff_h_pvs_pad_tableentrynegative. ff_h_pvs_pad_tableentrynegative + S (dst_negative_pad_table) = S ((S (dst_index_pad_table)) * dst_negative_scale_pad_table)) /\ exists ff_q_pvs_pad_tableentrynegative. dst_negative_code_pad_table = ff_q_pvs_pad_tableentrynegative * S ((S (dst_index_pad_table)) * dst_negative_scale_pad_table) + (dst_negative_pad_table))) /\ (exists ge_balance_positive_pad_tableentryvalue ge_balance_negative_pad_tableentryvalue. (((((dst_value_pad_table) = 2 * (ge_balance_positive_pad_tableentryvalue) /\ (ge_balance_negative_pad_tableentryvalue) = 0) \/ exists ge_signed_half_pad_tableentryvaluedecode. (((dst_value_pad_table) = 2 * ge_signed_half_pad_tableentryvaluedecode + 1 /\ (ge_balance_positive_pad_tableentryvalue) = 0) /\ (ge_balance_negative_pad_tableentryvalue) = S ge_signed_half_pad_tableentryvaluedecode))) /\ ((dst_positive_pad_table) + ge_balance_negative_pad_tableentryvalue = (dst_negative_pad_table) + ge_balance_positive_pad_tableentryvalue))))))))) -> (exists pvs_le_gap_pad_bound. pvs_le_gap_pad_bound + (k) = (l)) -> (forall sfs_index_pad_zero_window sfs_value_pad_zero_window. (exists pvs_le_gap_pad_zero_windowlower. pvs_le_gap_pad_zero_windowlower + (k) = (sfs_index_pad_zero_window)) -> (exists pvs_gap_pad_zero_windowupper. pvs_gap_pad_zero_windowupper + S (sfs_index_pad_zero_window) = (l)) -> (exists dst_positive_code_pad_zero_windowentry dst_positive_scale_pad_zero_windowentry dst_negative_code_pad_zero_windowentry dst_negative_scale_pad_zero_windowentry dst_positive_pad_zero_windowentry dst_negative_pad_zero_windowentry. (((F) = (((((dst_positive_code_pad_zero_windowentry) + (dst_positive_scale_pad_zero_windowentry)) * S ((dst_positive_code_pad_zero_windowentry) + (dst_positive_scale_pad_zero_windowentry)) + ((dst_positive_scale_pad_zero_windowentry) + (dst_positive_scale_pad_zero_windowentry))) + (((dst_negative_code_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)) * S ((dst_negative_code_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)) + ((dst_negative_scale_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)))) * S ((((dst_positive_code_pad_zero_windowentry) + (dst_positive_scale_pad_zero_windowentry)) * S ((dst_positive_code_pad_zero_windowentry) + (dst_positive_scale_pad_zero_windowentry)) + ((dst_positive_scale_pad_zero_windowentry) + (dst_positive_scale_pad_zero_windowentry))) + (((dst_negative_code_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)) * S ((dst_negative_code_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)) + ((dst_negative_scale_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)))) + ((((dst_negative_code_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)) * S ((dst_negative_code_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)) + ((dst_negative_scale_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry))) + (((dst_negative_code_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)) * S ((dst_negative_code_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)) + ((dst_negative_scale_pad_zero_windowentry) + (dst_negative_scale_pad_zero_windowentry)))))) /\ (((((exists ff_h_pvs_pad_zero_windowentrypositive. ff_h_pvs_pad_zero_windowentrypositive + S (dst_positive_pad_zero_windowentry) = S ((S (sfs_index_pad_zero_window)) * dst_positive_scale_pad_zero_windowentry)) /\ exists ff_q_pvs_pad_zero_windowentrypositive. dst_positive_code_pad_zero_windowentry = ff_q_pvs_pad_zero_windowentrypositive * S ((S (sfs_index_pad_zero_window)) * dst_positive_scale_pad_zero_windowentry) + (dst_positive_pad_zero_windowentry))) /\ (((((exists ff_h_pvs_pad_zero_windowentrynegative. ff_h_pvs_pad_zero_windowentrynegative + S (dst_negative_pad_zero_windowentry) = S ((S (sfs_index_pad_zero_window)) * dst_negative_scale_pad_zero_windowentry)) /\ exists ff_q_pvs_pad_zero_windowentrynegative. dst_negative_code_pad_zero_windowentry = ff_q_pvs_pad_zero_windowentrynegative * S ((S (sfs_index_pad_zero_window)) * dst_negative_scale_pad_zero_windowentry) + (dst_negative_pad_zero_windowentry))) /\ (exists ge_balance_positive_pad_zero_windowentryvalue ge_balance_negative_pad_zero_windowentryvalue. (((((sfs_value_pad_zero_window) = 2 * (ge_balance_positive_pad_zero_windowentryvalue) /\ (ge_balance_negative_pad_zero_windowentryvalue) = 0) \/ exists ge_signed_half_pad_zero_windowentryvaluedecode. (((sfs_value_pad_zero_window) = 2 * ge_signed_half_pad_zero_windowentryvaluedecode + 1 /\ (ge_balance_positive_pad_zero_windowentryvalue) = 0) /\ (ge_balance_negative_pad_zero_windowentryvalue) = S ge_signed_half_pad_zero_windowentryvaluedecode))) /\ ((dst_positive_pad_zero_windowentry) + ge_balance_negative_pad_zero_windowentryvalue = (dst_negative_pad_zero_windowentry) + ge_balance_positive_pad_zero_windowentryvalue))))))))) -> sfs_value_pad_zero_window=0) -> (((exists dst_positive_code_pad_short dst_positive_scale_pad_short dst_negative_code_pad_short dst_negative_scale_pad_short dst_positive_sum_pad_short dst_negative_sum_pad_short. (((F) = (((((dst_positive_code_pad_short) + (dst_positive_scale_pad_short)) * S ((dst_positive_code_pad_short) + (dst_positive_scale_pad_short)) + ((dst_positive_scale_pad_short) + (dst_positive_scale_pad_short))) + (((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) * S ((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) + ((dst_negative_scale_pad_short) + (dst_negative_scale_pad_short)))) * S ((((dst_positive_code_pad_short) + (dst_positive_scale_pad_short)) * S ((dst_positive_code_pad_short) + (dst_positive_scale_pad_short)) + ((dst_positive_scale_pad_short) + (dst_positive_scale_pad_short))) + (((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) * S ((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) + ((dst_negative_scale_pad_short) + (dst_negative_scale_pad_short)))) + ((((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) * S ((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) + ((dst_negative_scale_pad_short) + (dst_negative_scale_pad_short))) + (((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) * S ((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) + ((dst_negative_scale_pad_short) + (dst_negative_scale_pad_short)))))) /\ (((exists fs_u_dst_pad_shortpositive fs_v_dst_pad_shortpositive. ((((exists fs_h_dst_pad_shortpositive_body_start. fs_h_dst_pad_shortpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_pad_shortpositive)) /\ exists fs_q_dst_pad_shortpositive_body_start. fs_u_dst_pad_shortpositive = fs_q_dst_pad_shortpositive_body_start * S ((S (0)) * fs_v_dst_pad_shortpositive) + (0))) /\ ((((exists fs_h_dst_pad_shortpositive_body_terminal. fs_h_dst_pad_shortpositive_body_terminal + S (dst_positive_sum_pad_short) = S ((S (k)) * fs_v_dst_pad_shortpositive)) /\ exists fs_q_dst_pad_shortpositive_body_terminal. fs_u_dst_pad_shortpositive = fs_q_dst_pad_shortpositive_body_terminal * S ((S (k)) * fs_v_dst_pad_shortpositive) + (dst_positive_sum_pad_short))) /\ forall fs_i_dst_pad_shortpositive_body_steps. (exists fs_lt_dst_pad_shortpositive_body_steps_bound. fs_lt_dst_pad_shortpositive_body_steps_bound + S fs_i_dst_pad_shortpositive_body_steps = k) -> exists fs_a_dst_pad_shortpositive_body_steps fs_r_dst_pad_shortpositive_body_steps fs_s_dst_pad_shortpositive_body_steps. ((((exists fs_h_dst_pad_shortpositive_body_steps_summand. fs_h_dst_pad_shortpositive_body_steps_summand + S (fs_a_dst_pad_shortpositive_body_steps) = S ((S (fs_i_dst_pad_shortpositive_body_steps)) * dst_positive_scale_pad_short)) /\ exists fs_q_dst_pad_shortpositive_body_steps_summand. dst_positive_code_pad_short = fs_q_dst_pad_shortpositive_body_steps_summand * S ((S (fs_i_dst_pad_shortpositive_body_steps)) * dst_positive_scale_pad_short) + (fs_a_dst_pad_shortpositive_body_steps))) /\ ((((exists fs_h_dst_pad_shortpositive_body_steps_partial. fs_h_dst_pad_shortpositive_body_steps_partial + S (fs_r_dst_pad_shortpositive_body_steps) = S ((S (fs_i_dst_pad_shortpositive_body_steps)) * fs_v_dst_pad_shortpositive)) /\ exists fs_q_dst_pad_shortpositive_body_steps_partial. fs_u_dst_pad_shortpositive = fs_q_dst_pad_shortpositive_body_steps_partial * S ((S (fs_i_dst_pad_shortpositive_body_steps)) * fs_v_dst_pad_shortpositive) + (fs_r_dst_pad_shortpositive_body_steps))) /\ ((((exists fs_h_dst_pad_shortpositive_body_steps_successor. fs_h_dst_pad_shortpositive_body_steps_successor + S (fs_s_dst_pad_shortpositive_body_steps) = S ((S (S fs_i_dst_pad_shortpositive_body_steps)) * fs_v_dst_pad_shortpositive)) /\ exists fs_q_dst_pad_shortpositive_body_steps_successor. fs_u_dst_pad_shortpositive = fs_q_dst_pad_shortpositive_body_steps_successor * S ((S (S fs_i_dst_pad_shortpositive_body_steps)) * fs_v_dst_pad_shortpositive) + (fs_s_dst_pad_shortpositive_body_steps))) /\ fs_s_dst_pad_shortpositive_body_steps = fs_r_dst_pad_shortpositive_body_steps + fs_a_dst_pad_shortpositive_body_steps)))))) /\ (((exists fs_u_dst_pad_shortnegative fs_v_dst_pad_shortnegative. ((((exists fs_h_dst_pad_shortnegative_body_start. fs_h_dst_pad_shortnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_pad_shortnegative)) /\ exists fs_q_dst_pad_shortnegative_body_start. fs_u_dst_pad_shortnegative = fs_q_dst_pad_shortnegative_body_start * S ((S (0)) * fs_v_dst_pad_shortnegative) + (0))) /\ ((((exists fs_h_dst_pad_shortnegative_body_terminal. fs_h_dst_pad_shortnegative_body_terminal + S (dst_negative_sum_pad_short) = S ((S (k)) * fs_v_dst_pad_shortnegative)) /\ exists fs_q_dst_pad_shortnegative_body_terminal. fs_u_dst_pad_shortnegative = fs_q_dst_pad_shortnegative_body_terminal * S ((S (k)) * fs_v_dst_pad_shortnegative) + (dst_negative_sum_pad_short))) /\ forall fs_i_dst_pad_shortnegative_body_steps. (exists fs_lt_dst_pad_shortnegative_body_steps_bound. fs_lt_dst_pad_shortnegative_body_steps_bound + S fs_i_dst_pad_shortnegative_body_steps = k) -> exists fs_a_dst_pad_shortnegative_body_steps fs_r_dst_pad_shortnegative_body_steps fs_s_dst_pad_shortnegative_body_steps. ((((exists fs_h_dst_pad_shortnegative_body_steps_summand. fs_h_dst_pad_shortnegative_body_steps_summand + S (fs_a_dst_pad_shortnegative_body_steps) = S ((S (fs_i_dst_pad_shortnegative_body_steps)) * dst_negative_scale_pad_short)) /\ exists fs_q_dst_pad_shortnegative_body_steps_summand. dst_negative_code_pad_short = fs_q_dst_pad_shortnegative_body_steps_summand * S ((S (fs_i_dst_pad_shortnegative_body_steps)) * dst_negative_scale_pad_short) + (fs_a_dst_pad_shortnegative_body_steps))) /\ ((((exists fs_h_dst_pad_shortnegative_body_steps_partial. fs_h_dst_pad_shortnegative_body_steps_partial + S (fs_r_dst_pad_shortnegative_body_steps) = S ((S (fs_i_dst_pad_shortnegative_body_steps)) * fs_v_dst_pad_shortnegative)) /\ exists fs_q_dst_pad_shortnegative_body_steps_partial. fs_u_dst_pad_shortnegative = fs_q_dst_pad_shortnegative_body_steps_partial * S ((S (fs_i_dst_pad_shortnegative_body_steps)) * fs_v_dst_pad_shortnegative) + (fs_r_dst_pad_shortnegative_body_steps))) /\ ((((exists fs_h_dst_pad_shortnegative_body_steps_successor. fs_h_dst_pad_shortnegative_body_steps_successor + S (fs_s_dst_pad_shortnegative_body_steps) = S ((S (S fs_i_dst_pad_shortnegative_body_steps)) * fs_v_dst_pad_shortnegative)) /\ exists fs_q_dst_pad_shortnegative_body_steps_successor. fs_u_dst_pad_shortnegative = fs_q_dst_pad_shortnegative_body_steps_successor * S ((S (S fs_i_dst_pad_shortnegative_body_steps)) * fs_v_dst_pad_shortnegative) + (fs_s_dst_pad_shortnegative_body_steps))) /\ fs_s_dst_pad_shortnegative_body_steps = fs_r_dst_pad_shortnegative_body_steps + fs_a_dst_pad_shortnegative_body_steps)))))) /\ (exists ge_balance_positive_pad_shortresult ge_balance_negative_pad_shortresult. (((((z) = 2 * (ge_balance_positive_pad_shortresult) /\ (ge_balance_negative_pad_shortresult) = 0) \/ exists ge_signed_half_pad_shortresultdecode. (((z) = 2 * ge_signed_half_pad_shortresultdecode + 1 /\ (ge_balance_positive_pad_shortresult) = 0) /\ (ge_balance_negative_pad_shortresult) = S ge_signed_half_pad_shortresultdecode))) /\ ((dst_positive_sum_pad_short) + ge_balance_negative_pad_shortresult = (dst_negative_sum_pad_short) + ge_balance_positive_pad_shortresult))))))))) -> (exists dst_positive_code_pad_long dst_positive_scale_pad_long dst_negative_code_pad_long dst_negative_scale_pad_long dst_positive_sum_pad_long dst_negative_sum_pad_long. (((F) = (((((dst_positive_code_pad_long) + (dst_positive_scale_pad_long)) * S ((dst_positive_code_pad_long) + (dst_positive_scale_pad_long)) + ((dst_positive_scale_pad_long) + (dst_positive_scale_pad_long))) + (((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) * S ((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) + ((dst_negative_scale_pad_long) + (dst_negative_scale_pad_long)))) * S ((((dst_positive_code_pad_long) + (dst_positive_scale_pad_long)) * S ((dst_positive_code_pad_long) + (dst_positive_scale_pad_long)) + ((dst_positive_scale_pad_long) + (dst_positive_scale_pad_long))) + (((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) * S ((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) + ((dst_negative_scale_pad_long) + (dst_negative_scale_pad_long)))) + ((((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) * S ((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) + ((dst_negative_scale_pad_long) + (dst_negative_scale_pad_long))) + (((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) * S ((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) + ((dst_negative_scale_pad_long) + (dst_negative_scale_pad_long)))))) /\ (((exists fs_u_dst_pad_longpositive fs_v_dst_pad_longpositive. ((((exists fs_h_dst_pad_longpositive_body_start. fs_h_dst_pad_longpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_pad_longpositive)) /\ exists fs_q_dst_pad_longpositive_body_start. fs_u_dst_pad_longpositive = fs_q_dst_pad_longpositive_body_start * S ((S (0)) * fs_v_dst_pad_longpositive) + (0))) /\ ((((exists fs_h_dst_pad_longpositive_body_terminal. fs_h_dst_pad_longpositive_body_terminal + S (dst_positive_sum_pad_long) = S ((S (l)) * fs_v_dst_pad_longpositive)) /\ exists fs_q_dst_pad_longpositive_body_terminal. fs_u_dst_pad_longpositive = fs_q_dst_pad_longpositive_body_terminal * S ((S (l)) * fs_v_dst_pad_longpositive) + (dst_positive_sum_pad_long))) /\ forall fs_i_dst_pad_longpositive_body_steps. (exists fs_lt_dst_pad_longpositive_body_steps_bound. fs_lt_dst_pad_longpositive_body_steps_bound + S fs_i_dst_pad_longpositive_body_steps = l) -> exists fs_a_dst_pad_longpositive_body_steps fs_r_dst_pad_longpositive_body_steps fs_s_dst_pad_longpositive_body_steps. ((((exists fs_h_dst_pad_longpositive_body_steps_summand. fs_h_dst_pad_longpositive_body_steps_summand + S (fs_a_dst_pad_longpositive_body_steps) = S ((S (fs_i_dst_pad_longpositive_body_steps)) * dst_positive_scale_pad_long)) /\ exists fs_q_dst_pad_longpositive_body_steps_summand. dst_positive_code_pad_long = fs_q_dst_pad_longpositive_body_steps_summand * S ((S (fs_i_dst_pad_longpositive_body_steps)) * dst_positive_scale_pad_long) + (fs_a_dst_pad_longpositive_body_steps))) /\ ((((exists fs_h_dst_pad_longpositive_body_steps_partial. fs_h_dst_pad_longpositive_body_steps_partial + S (fs_r_dst_pad_longpositive_body_steps) = S ((S (fs_i_dst_pad_longpositive_body_steps)) * fs_v_dst_pad_longpositive)) /\ exists fs_q_dst_pad_longpositive_body_steps_partial. fs_u_dst_pad_longpositive = fs_q_dst_pad_longpositive_body_steps_partial * S ((S (fs_i_dst_pad_longpositive_body_steps)) * fs_v_dst_pad_longpositive) + (fs_r_dst_pad_longpositive_body_steps))) /\ ((((exists fs_h_dst_pad_longpositive_body_steps_successor. fs_h_dst_pad_longpositive_body_steps_successor + S (fs_s_dst_pad_longpositive_body_steps) = S ((S (S fs_i_dst_pad_longpositive_body_steps)) * fs_v_dst_pad_longpositive)) /\ exists fs_q_dst_pad_longpositive_body_steps_successor. fs_u_dst_pad_longpositive = fs_q_dst_pad_longpositive_body_steps_successor * S ((S (S fs_i_dst_pad_longpositive_body_steps)) * fs_v_dst_pad_longpositive) + (fs_s_dst_pad_longpositive_body_steps))) /\ fs_s_dst_pad_longpositive_body_steps = fs_r_dst_pad_longpositive_body_steps + fs_a_dst_pad_longpositive_body_steps)))))) /\ (((exists fs_u_dst_pad_longnegative fs_v_dst_pad_longnegative. ((((exists fs_h_dst_pad_longnegative_body_start. fs_h_dst_pad_longnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_pad_longnegative)) /\ exists fs_q_dst_pad_longnegative_body_start. fs_u_dst_pad_longnegative = fs_q_dst_pad_longnegative_body_start * S ((S (0)) * fs_v_dst_pad_longnegative) + (0))) /\ ((((exists fs_h_dst_pad_longnegative_body_terminal. fs_h_dst_pad_longnegative_body_terminal + S (dst_negative_sum_pad_long) = S ((S (l)) * fs_v_dst_pad_longnegative)) /\ exists fs_q_dst_pad_longnegative_body_terminal. fs_u_dst_pad_longnegative = fs_q_dst_pad_longnegative_body_terminal * S ((S (l)) * fs_v_dst_pad_longnegative) + (dst_negative_sum_pad_long))) /\ forall fs_i_dst_pad_longnegative_body_steps. (exists fs_lt_dst_pad_longnegative_body_steps_bound. fs_lt_dst_pad_longnegative_body_steps_bound + S fs_i_dst_pad_longnegative_body_steps = l) -> exists fs_a_dst_pad_longnegative_body_steps fs_r_dst_pad_longnegative_body_steps fs_s_dst_pad_longnegative_body_steps. ((((exists fs_h_dst_pad_longnegative_body_steps_summand. fs_h_dst_pad_longnegative_body_steps_summand + S (fs_a_dst_pad_longnegative_body_steps) = S ((S (fs_i_dst_pad_longnegative_body_steps)) * dst_negative_scale_pad_long)) /\ exists fs_q_dst_pad_longnegative_body_steps_summand. dst_negative_code_pad_long = fs_q_dst_pad_longnegative_body_steps_summand * S ((S (fs_i_dst_pad_longnegative_body_steps)) * dst_negative_scale_pad_long) + (fs_a_dst_pad_longnegative_body_steps))) /\ ((((exists fs_h_dst_pad_longnegative_body_steps_partial. fs_h_dst_pad_longnegative_body_steps_partial + S (fs_r_dst_pad_longnegative_body_steps) = S ((S (fs_i_dst_pad_longnegative_body_steps)) * fs_v_dst_pad_longnegative)) /\ exists fs_q_dst_pad_longnegative_body_steps_partial. fs_u_dst_pad_longnegative = fs_q_dst_pad_longnegative_body_steps_partial * S ((S (fs_i_dst_pad_longnegative_body_steps)) * fs_v_dst_pad_longnegative) + (fs_r_dst_pad_longnegative_body_steps))) /\ ((((exists fs_h_dst_pad_longnegative_body_steps_successor. fs_h_dst_pad_longnegative_body_steps_successor + S (fs_s_dst_pad_longnegative_body_steps) = S ((S (S fs_i_dst_pad_longnegative_body_steps)) * fs_v_dst_pad_longnegative)) /\ exists fs_q_dst_pad_longnegative_body_steps_successor. fs_u_dst_pad_longnegative = fs_q_dst_pad_longnegative_body_steps_successor * S ((S (S fs_i_dst_pad_longnegative_body_steps)) * fs_v_dst_pad_longnegative) + (fs_s_dst_pad_longnegative_body_steps))) /\ fs_s_dst_pad_longnegative_body_steps = fs_r_dst_pad_longnegative_body_steps + fs_a_dst_pad_longnegative_body_steps)))))) /\ (exists ge_balance_positive_pad_longresult ge_balance_negative_pad_longresult. (((((z) = 2 * (ge_balance_positive_pad_longresult) /\ (ge_balance_negative_pad_longresult) = 0) \/ exists ge_signed_half_pad_longresultdecode. (((z) = 2 * ge_signed_half_pad_longresultdecode + 1 /\ (ge_balance_positive_pad_longresult) = 0) /\ (ge_balance_negative_pad_longresult) = S ge_signed_half_pad_longresultdecode))) /\ ((dst_positive_sum_pad_long) + ge_balance_negative_pad_longresult = (dst_negative_sum_pad_long) + ge_balance_positive_pad_longresult)))))))))) /\ ((exists dst_positive_code_pad_long dst_positive_scale_pad_long dst_negative_code_pad_long dst_negative_scale_pad_long dst_positive_sum_pad_long dst_negative_sum_pad_long. (((F) = (((((dst_positive_code_pad_long) + (dst_positive_scale_pad_long)) * S ((dst_positive_code_pad_long) + (dst_positive_scale_pad_long)) + ((dst_positive_scale_pad_long) + (dst_positive_scale_pad_long))) + (((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) * S ((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) + ((dst_negative_scale_pad_long) + (dst_negative_scale_pad_long)))) * S ((((dst_positive_code_pad_long) + (dst_positive_scale_pad_long)) * S ((dst_positive_code_pad_long) + (dst_positive_scale_pad_long)) + ((dst_positive_scale_pad_long) + (dst_positive_scale_pad_long))) + (((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) * S ((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) + ((dst_negative_scale_pad_long) + (dst_negative_scale_pad_long)))) + ((((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) * S ((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) + ((dst_negative_scale_pad_long) + (dst_negative_scale_pad_long))) + (((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) * S ((dst_negative_code_pad_long) + (dst_negative_scale_pad_long)) + ((dst_negative_scale_pad_long) + (dst_negative_scale_pad_long)))))) /\ (((exists fs_u_dst_pad_longpositive fs_v_dst_pad_longpositive. ((((exists fs_h_dst_pad_longpositive_body_start. fs_h_dst_pad_longpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_pad_longpositive)) /\ exists fs_q_dst_pad_longpositive_body_start. fs_u_dst_pad_longpositive = fs_q_dst_pad_longpositive_body_start * S ((S (0)) * fs_v_dst_pad_longpositive) + (0))) /\ ((((exists fs_h_dst_pad_longpositive_body_terminal. fs_h_dst_pad_longpositive_body_terminal + S (dst_positive_sum_pad_long) = S ((S (l)) * fs_v_dst_pad_longpositive)) /\ exists fs_q_dst_pad_longpositive_body_terminal. fs_u_dst_pad_longpositive = fs_q_dst_pad_longpositive_body_terminal * S ((S (l)) * fs_v_dst_pad_longpositive) + (dst_positive_sum_pad_long))) /\ forall fs_i_dst_pad_longpositive_body_steps. (exists fs_lt_dst_pad_longpositive_body_steps_bound. fs_lt_dst_pad_longpositive_body_steps_bound + S fs_i_dst_pad_longpositive_body_steps = l) -> exists fs_a_dst_pad_longpositive_body_steps fs_r_dst_pad_longpositive_body_steps fs_s_dst_pad_longpositive_body_steps. ((((exists fs_h_dst_pad_longpositive_body_steps_summand. fs_h_dst_pad_longpositive_body_steps_summand + S (fs_a_dst_pad_longpositive_body_steps) = S ((S (fs_i_dst_pad_longpositive_body_steps)) * dst_positive_scale_pad_long)) /\ exists fs_q_dst_pad_longpositive_body_steps_summand. dst_positive_code_pad_long = fs_q_dst_pad_longpositive_body_steps_summand * S ((S (fs_i_dst_pad_longpositive_body_steps)) * dst_positive_scale_pad_long) + (fs_a_dst_pad_longpositive_body_steps))) /\ ((((exists fs_h_dst_pad_longpositive_body_steps_partial. fs_h_dst_pad_longpositive_body_steps_partial + S (fs_r_dst_pad_longpositive_body_steps) = S ((S (fs_i_dst_pad_longpositive_body_steps)) * fs_v_dst_pad_longpositive)) /\ exists fs_q_dst_pad_longpositive_body_steps_partial. fs_u_dst_pad_longpositive = fs_q_dst_pad_longpositive_body_steps_partial * S ((S (fs_i_dst_pad_longpositive_body_steps)) * fs_v_dst_pad_longpositive) + (fs_r_dst_pad_longpositive_body_steps))) /\ ((((exists fs_h_dst_pad_longpositive_body_steps_successor. fs_h_dst_pad_longpositive_body_steps_successor + S (fs_s_dst_pad_longpositive_body_steps) = S ((S (S fs_i_dst_pad_longpositive_body_steps)) * fs_v_dst_pad_longpositive)) /\ exists fs_q_dst_pad_longpositive_body_steps_successor. fs_u_dst_pad_longpositive = fs_q_dst_pad_longpositive_body_steps_successor * S ((S (S fs_i_dst_pad_longpositive_body_steps)) * fs_v_dst_pad_longpositive) + (fs_s_dst_pad_longpositive_body_steps))) /\ fs_s_dst_pad_longpositive_body_steps = fs_r_dst_pad_longpositive_body_steps + fs_a_dst_pad_longpositive_body_steps)))))) /\ (((exists fs_u_dst_pad_longnegative fs_v_dst_pad_longnegative. ((((exists fs_h_dst_pad_longnegative_body_start. fs_h_dst_pad_longnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_pad_longnegative)) /\ exists fs_q_dst_pad_longnegative_body_start. fs_u_dst_pad_longnegative = fs_q_dst_pad_longnegative_body_start * S ((S (0)) * fs_v_dst_pad_longnegative) + (0))) /\ ((((exists fs_h_dst_pad_longnegative_body_terminal. fs_h_dst_pad_longnegative_body_terminal + S (dst_negative_sum_pad_long) = S ((S (l)) * fs_v_dst_pad_longnegative)) /\ exists fs_q_dst_pad_longnegative_body_terminal. fs_u_dst_pad_longnegative = fs_q_dst_pad_longnegative_body_terminal * S ((S (l)) * fs_v_dst_pad_longnegative) + (dst_negative_sum_pad_long))) /\ forall fs_i_dst_pad_longnegative_body_steps. (exists fs_lt_dst_pad_longnegative_body_steps_bound. fs_lt_dst_pad_longnegative_body_steps_bound + S fs_i_dst_pad_longnegative_body_steps = l) -> exists fs_a_dst_pad_longnegative_body_steps fs_r_dst_pad_longnegative_body_steps fs_s_dst_pad_longnegative_body_steps. ((((exists fs_h_dst_pad_longnegative_body_steps_summand. fs_h_dst_pad_longnegative_body_steps_summand + S (fs_a_dst_pad_longnegative_body_steps) = S ((S (fs_i_dst_pad_longnegative_body_steps)) * dst_negative_scale_pad_long)) /\ exists fs_q_dst_pad_longnegative_body_steps_summand. dst_negative_code_pad_long = fs_q_dst_pad_longnegative_body_steps_summand * S ((S (fs_i_dst_pad_longnegative_body_steps)) * dst_negative_scale_pad_long) + (fs_a_dst_pad_longnegative_body_steps))) /\ ((((exists fs_h_dst_pad_longnegative_body_steps_partial. fs_h_dst_pad_longnegative_body_steps_partial + S (fs_r_dst_pad_longnegative_body_steps) = S ((S (fs_i_dst_pad_longnegative_body_steps)) * fs_v_dst_pad_longnegative)) /\ exists fs_q_dst_pad_longnegative_body_steps_partial. fs_u_dst_pad_longnegative = fs_q_dst_pad_longnegative_body_steps_partial * S ((S (fs_i_dst_pad_longnegative_body_steps)) * fs_v_dst_pad_longnegative) + (fs_r_dst_pad_longnegative_body_steps))) /\ ((((exists fs_h_dst_pad_longnegative_body_steps_successor. fs_h_dst_pad_longnegative_body_steps_successor + S (fs_s_dst_pad_longnegative_body_steps) = S ((S (S fs_i_dst_pad_longnegative_body_steps)) * fs_v_dst_pad_longnegative)) /\ exists fs_q_dst_pad_longnegative_body_steps_successor. fs_u_dst_pad_longnegative = fs_q_dst_pad_longnegative_body_steps_successor * S ((S (S fs_i_dst_pad_longnegative_body_steps)) * fs_v_dst_pad_longnegative) + (fs_s_dst_pad_longnegative_body_steps))) /\ fs_s_dst_pad_longnegative_body_steps = fs_r_dst_pad_longnegative_body_steps + fs_a_dst_pad_longnegative_body_steps)))))) /\ (exists ge_balance_positive_pad_longresult ge_balance_negative_pad_longresult. (((((z) = 2 * (ge_balance_positive_pad_longresult) /\ (ge_balance_negative_pad_longresult) = 0) \/ exists ge_signed_half_pad_longresultdecode. (((z) = 2 * ge_signed_half_pad_longresultdecode + 1 /\ (ge_balance_positive_pad_longresult) = 0) /\ (ge_balance_negative_pad_longresult) = S ge_signed_half_pad_longresultdecode))) /\ ((dst_positive_sum_pad_long) + ge_balance_negative_pad_longresult = (dst_negative_sum_pad_long) + ge_balance_positive_pad_longresult))))))))) -> (exists dst_positive_code_pad_short dst_positive_scale_pad_short dst_negative_code_pad_short dst_negative_scale_pad_short dst_positive_sum_pad_short dst_negative_sum_pad_short. (((F) = (((((dst_positive_code_pad_short) + (dst_positive_scale_pad_short)) * S ((dst_positive_code_pad_short) + (dst_positive_scale_pad_short)) + ((dst_positive_scale_pad_short) + (dst_positive_scale_pad_short))) + (((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) * S ((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) + ((dst_negative_scale_pad_short) + (dst_negative_scale_pad_short)))) * S ((((dst_positive_code_pad_short) + (dst_positive_scale_pad_short)) * S ((dst_positive_code_pad_short) + (dst_positive_scale_pad_short)) + ((dst_positive_scale_pad_short) + (dst_positive_scale_pad_short))) + (((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) * S ((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) + ((dst_negative_scale_pad_short) + (dst_negative_scale_pad_short)))) + ((((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) * S ((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) + ((dst_negative_scale_pad_short) + (dst_negative_scale_pad_short))) + (((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) * S ((dst_negative_code_pad_short) + (dst_negative_scale_pad_short)) + ((dst_negative_scale_pad_short) + (dst_negative_scale_pad_short)))))) /\ (((exists fs_u_dst_pad_shortpositive fs_v_dst_pad_shortpositive. ((((exists fs_h_dst_pad_shortpositive_body_start. fs_h_dst_pad_shortpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_pad_shortpositive)) /\ exists fs_q_dst_pad_shortpositive_body_start. fs_u_dst_pad_shortpositive = fs_q_dst_pad_shortpositive_body_start * S ((S (0)) * fs_v_dst_pad_shortpositive) + (0))) /\ ((((exists fs_h_dst_pad_shortpositive_body_terminal. fs_h_dst_pad_shortpositive_body_terminal + S (dst_positive_sum_pad_short) = S ((S (k)) * fs_v_dst_pad_shortpositive)) /\ exists fs_q_dst_pad_shortpositive_body_terminal. fs_u_dst_pad_shortpositive = fs_q_dst_pad_shortpositive_body_terminal * S ((S (k)) * fs_v_dst_pad_shortpositive) + (dst_positive_sum_pad_short))) /\ forall fs_i_dst_pad_shortpositive_body_steps. (exists fs_lt_dst_pad_shortpositive_body_steps_bound. fs_lt_dst_pad_shortpositive_body_steps_bound + S fs_i_dst_pad_shortpositive_body_steps = k) -> exists fs_a_dst_pad_shortpositive_body_steps fs_r_dst_pad_shortpositive_body_steps fs_s_dst_pad_shortpositive_body_steps. ((((exists fs_h_dst_pad_shortpositive_body_steps_summand. fs_h_dst_pad_shortpositive_body_steps_summand + S (fs_a_dst_pad_shortpositive_body_steps) = S ((S (fs_i_dst_pad_shortpositive_body_steps)) * dst_positive_scale_pad_short)) /\ exists fs_q_dst_pad_shortpositive_body_steps_summand. dst_positive_code_pad_short = fs_q_dst_pad_shortpositive_body_steps_summand * S ((S (fs_i_dst_pad_shortpositive_body_steps)) * dst_positive_scale_pad_short) + (fs_a_dst_pad_shortpositive_body_steps))) /\ ((((exists fs_h_dst_pad_shortpositive_body_steps_partial. fs_h_dst_pad_shortpositive_body_steps_partial + S (fs_r_dst_pad_shortpositive_body_steps) = S ((S (fs_i_dst_pad_shortpositive_body_steps)) * fs_v_dst_pad_shortpositive)) /\ exists fs_q_dst_pad_shortpositive_body_steps_partial. fs_u_dst_pad_shortpositive = fs_q_dst_pad_shortpositive_body_steps_partial * S ((S (fs_i_dst_pad_shortpositive_body_steps)) * fs_v_dst_pad_shortpositive) + (fs_r_dst_pad_shortpositive_body_steps))) /\ ((((exists fs_h_dst_pad_shortpositive_body_steps_successor. fs_h_dst_pad_shortpositive_body_steps_successor + S (fs_s_dst_pad_shortpositive_body_steps) = S ((S (S fs_i_dst_pad_shortpositive_body_steps)) * fs_v_dst_pad_shortpositive)) /\ exists fs_q_dst_pad_shortpositive_body_steps_successor. fs_u_dst_pad_shortpositive = fs_q_dst_pad_shortpositive_body_steps_successor * S ((S (S fs_i_dst_pad_shortpositive_body_steps)) * fs_v_dst_pad_shortpositive) + (fs_s_dst_pad_shortpositive_body_steps))) /\ fs_s_dst_pad_shortpositive_body_steps = fs_r_dst_pad_shortpositive_body_steps + fs_a_dst_pad_shortpositive_body_steps)))))) /\ (((exists fs_u_dst_pad_shortnegative fs_v_dst_pad_shortnegative. ((((exists fs_h_dst_pad_shortnegative_body_start. fs_h_dst_pad_shortnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_pad_shortnegative)) /\ exists fs_q_dst_pad_shortnegative_body_start. fs_u_dst_pad_shortnegative = fs_q_dst_pad_shortnegative_body_start * S ((S (0)) * fs_v_dst_pad_shortnegative) + (0))) /\ ((((exists fs_h_dst_pad_shortnegative_body_terminal. fs_h_dst_pad_shortnegative_body_terminal + S (dst_negative_sum_pad_short) = S ((S (k)) * fs_v_dst_pad_shortnegative)) /\ exists fs_q_dst_pad_shortnegative_body_terminal. fs_u_dst_pad_shortnegative = fs_q_dst_pad_shortnegative_body_terminal * S ((S (k)) * fs_v_dst_pad_shortnegative) + (dst_negative_sum_pad_short))) /\ forall fs_i_dst_pad_shortnegative_body_steps. (exists fs_lt_dst_pad_shortnegative_body_steps_bound. fs_lt_dst_pad_shortnegative_body_steps_bound + S fs_i_dst_pad_shortnegative_body_steps = k) -> exists fs_a_dst_pad_shortnegative_body_steps fs_r_dst_pad_shortnegative_body_steps fs_s_dst_pad_shortnegative_body_steps. ((((exists fs_h_dst_pad_shortnegative_body_steps_summand. fs_h_dst_pad_shortnegative_body_steps_summand + S (fs_a_dst_pad_shortnegative_body_steps) = S ((S (fs_i_dst_pad_shortnegative_body_steps)) * dst_negative_scale_pad_short)) /\ exists fs_q_dst_pad_shortnegative_body_steps_summand. dst_negative_code_pad_short = fs_q_dst_pad_shortnegative_body_steps_summand * S ((S (fs_i_dst_pad_shortnegative_body_steps)) * dst_negative_scale_pad_short) + (fs_a_dst_pad_shortnegative_body_steps))) /\ ((((exists fs_h_dst_pad_shortnegative_body_steps_partial. fs_h_dst_pad_shortnegative_body_steps_partial + S (fs_r_dst_pad_shortnegative_body_steps) = S ((S (fs_i_dst_pad_shortnegative_body_steps)) * fs_v_dst_pad_shortnegative)) /\ exists fs_q_dst_pad_shortnegative_body_steps_partial. fs_u_dst_pad_shortnegative = fs_q_dst_pad_shortnegative_body_steps_partial * S ((S (fs_i_dst_pad_shortnegative_body_steps)) * fs_v_dst_pad_shortnegative) + (fs_r_dst_pad_shortnegative_body_steps))) /\ ((((exists fs_h_dst_pad_shortnegative_body_steps_successor. fs_h_dst_pad_shortnegative_body_steps_successor + S (fs_s_dst_pad_shortnegative_body_steps) = S ((S (S fs_i_dst_pad_shortnegative_body_steps)) * fs_v_dst_pad_shortnegative)) /\ exists fs_q_dst_pad_shortnegative_body_steps_successor. fs_u_dst_pad_shortnegative = fs_q_dst_pad_shortnegative_body_steps_successor * S ((S (S fs_i_dst_pad_shortnegative_body_steps)) * fs_v_dst_pad_shortnegative) + (fs_s_dst_pad_shortnegative_body_steps))) /\ fs_s_dst_pad_shortnegative_body_steps = fs_r_dst_pad_shortnegative_body_steps + fs_a_dst_pad_shortnegative_body_steps)))))) /\ (exists ge_balance_positive_pad_shortresult ge_balance_negative_pad_shortresult. (((((z) = 2 * (ge_balance_positive_pad_shortresult) /\ (ge_balance_negative_pad_shortresult) = 0) \/ exists ge_signed_half_pad_shortresultdecode. (((z) = 2 * ge_signed_half_pad_shortresultdecode + 1 /\ (ge_balance_positive_pad_shortresult) = 0) /\ (ge_balance_negative_pad_shortresult) = S ge_signed_half_pad_shortresultdecode))) /\ ((dst_positive_sum_pad_short) + ge_balance_negative_pad_shortresult = (dst_negative_sum_pad_short) + ge_balance_positive_pad_shortresult)))))))))))

Complete tactic proof in conservative notation

All 53 original proof lines are preserved. Only local proposition formulas are abbreviated; every abbreviation has an exact binder-safe expansion check. The linked exact edition contains the unchanged replay script.

Read the argument

Proof checkpoints

53 script commands · 16 reading checkpoints · 4 local claims

This is a reading aid, not a new proof or a proof-tree certificate. Checkpoint groups are consecutive commands, not inferred branch boundaries. Every step links to the preserved script.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

Named ingredients (1)
01Fix variables and assumptionsL1–7

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

  1. L1
    intro F
  2. L2
    intro k
  3. L3
    intro l
  4. L4
    intro z
  5. L5
    intro hF
  6. L6
    intro hkl
  7. L7
    intro hz
02Separate the logical casesL8–8

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

  1. L8
    split
03Fix variables and assumptionsL9–9

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

  1. L9
    intro hs
04Establish htL10–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 ht : ∃ a. SignedPrefixSum(F,l,a)Definitions: SignedPrefixSum(F,l,a)Original native command in the exact edition
  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
05Separate the logical casesL16–16

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

  1. L16
    cases ht
06Establish heL17–26

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

  1. L17
    have he : x=z
  2. L18
    symm
  3. L19
    specialize signed_prefix_sum_zero_tail (F)
  4. L20
    specialize signed_prefix_sum_zero_tail (k)
  5. L21
    specialize signed_prefix_sum_zero_tail (l)
  6. L22
    specialize signed_prefix_sum_zero_tail (z)
  7. L23
    specialize signed_prefix_sum_zero_tail (x)
  8. L24
    apply signed_prefix_sum_zero_tail
  9. L25
    exact hkl
  10. L26
    exact hz
07Use earlier factsL27–28

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

  1. L27
    exact hs
  2. L28
    exact ht_witness
08Calculate and transport equalitiesL29–30

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

  1. L29
    rewrite he at ht_witness
  2. L30
    rewrite he at ht_witness
09Use earlier factsL31–31

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

  1. L31
    exact ht_witness
10Fix variables and assumptionsL32–32

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

  1. L32
    intro hs
11Establish htL33–38

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

  1. L33
    have ht : ∃ a. SignedPrefixSum(F,k,a)Definitions: SignedPrefixSum(F,k,a)Original native command in the exact edition
  2. L34
    specialize arithmetic_signed_sum_exists (0)
  3. L35
    specialize arithmetic_signed_sum_exists (F)
  4. L36
    specialize arithmetic_signed_sum_exists (k)
  5. L37
    apply arithmetic_signed_sum_exists
  6. L38
    exact hF
12Separate the logical casesL39–39

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

  1. L39
    cases ht
13Establish heL40–49

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

  1. L40
    have he : x=z
  2. L41
    specialize signed_prefix_sum_zero_tail (F)
  3. L42
    specialize signed_prefix_sum_zero_tail (k)
  4. L43
    specialize signed_prefix_sum_zero_tail (l)
  5. L44
    specialize signed_prefix_sum_zero_tail (x)
  6. L45
    specialize signed_prefix_sum_zero_tail (z)
  7. L46
    apply signed_prefix_sum_zero_tail
  8. L47
    exact hkl
  9. L48
    exact hz
  10. L49
    exact ht_witness
14Use earlier factsL50–50

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

  1. L50
    exact hs
15Calculate and transport equalitiesL51–52

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

  1. L51
    rewrite he at ht_witness
  2. L52
    rewrite he at ht_witness
16Use earlier factsL53–53

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

  1. L53
    exact ht_witness

Library-wide reading audit

Original defined command ledger · 53 lines
  1. 0001intro F
  2. 0002intro k
  3. 0003intro l
  4. 0004intro z
  5. 0005intro hF
  6. 0006intro hkl
  7. 0007intro hz
  8. 0008split
  9. 0009intro hs
  10. 0010have ht : ∃ a. SignedPrefixSum(F,l,a)
  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 ht
  17. 0017have he : x=z
  18. 0018symm
  19. 0019specialize signed_prefix_sum_zero_tail (F)
  20. 0020specialize signed_prefix_sum_zero_tail (k)
  21. 0021specialize signed_prefix_sum_zero_tail (l)
  22. 0022specialize signed_prefix_sum_zero_tail (z)
  23. 0023specialize signed_prefix_sum_zero_tail (x)
  24. 0024apply signed_prefix_sum_zero_tail
  25. 0025exact hkl
  26. 0026exact hz
  27. 0027exact hs
  28. 0028exact ht_witness
  29. 0029rewrite he at ht_witness
  30. 0030rewrite he at ht_witness
  31. 0031exact ht_witness
  32. 0032intro hs
  33. 0033have ht : ∃ a. SignedPrefixSum(F,k,a)
  34. 0034specialize arithmetic_signed_sum_exists (0)
  35. 0035specialize arithmetic_signed_sum_exists (F)
  36. 0036specialize arithmetic_signed_sum_exists (k)
  37. 0037apply arithmetic_signed_sum_exists
  38. 0038exact hF
  39. 0039cases ht
  40. 0040have he : x=z
  41. 0041specialize signed_prefix_sum_zero_tail (F)
  42. 0042specialize signed_prefix_sum_zero_tail (k)
  43. 0043specialize signed_prefix_sum_zero_tail (l)
  44. 0044specialize signed_prefix_sum_zero_tail (x)
  45. 0045specialize signed_prefix_sum_zero_tail (z)
  46. 0046apply signed_prefix_sum_zero_tail
  47. 0047exact hkl
  48. 0048exact hz
  49. 0049exact ht_witness
  50. 0050exact hs
  51. 0051rewrite he at ht_witness
  52. 0052rewrite he at ht_witness
  53. 0053exact ht_witness