SS0014

divisor_signed_sum_extensional

Public research checkpoint, not admitted to Alpha or Stable. Alpha v30 remains 3222 checked-use theorems; Stable remains 432. The on-demand Alpha Lean service does not yet expose these checkpoint theorems; their independently checked literal bundles and unchanged sources are available below.

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

Signed prefix sums are independent of all pointwise balanced positive/negative representatives, by the checked natural cross-sum theorem.

Exact expanded first-order arithmetic statement

forall F G l a b. (forall dst_index_sum_ext_entries dst_first_sum_ext_entries dst_second_sum_ext_entries. (exists pvs_gap_sum_ext_entriesbound. pvs_gap_sum_ext_entriesbound + S (dst_index_sum_ext_entries) = (l)) -> (exists dst_positive_code_sum_ext_entriesfirst dst_positive_scale_sum_ext_entriesfirst dst_negative_code_sum_ext_entriesfirst dst_negative_scale_sum_ext_entriesfirst dst_positive_sum_ext_entriesfirst dst_negative_sum_ext_entriesfirst. (((F) = (((((dst_positive_code_sum_ext_entriesfirst) + (dst_positive_scale_sum_ext_entriesfirst)) * S ((dst_positive_code_sum_ext_entriesfirst) + (dst_positive_scale_sum_ext_entriesfirst)) + ((dst_positive_scale_sum_ext_entriesfirst) + (dst_positive_scale_sum_ext_entriesfirst))) + (((dst_negative_code_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)) * S ((dst_negative_code_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)) + ((dst_negative_scale_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)))) * S ((((dst_positive_code_sum_ext_entriesfirst) + (dst_positive_scale_sum_ext_entriesfirst)) * S ((dst_positive_code_sum_ext_entriesfirst) + (dst_positive_scale_sum_ext_entriesfirst)) + ((dst_positive_scale_sum_ext_entriesfirst) + (dst_positive_scale_sum_ext_entriesfirst))) + (((dst_negative_code_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)) * S ((dst_negative_code_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)) + ((dst_negative_scale_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)))) + ((((dst_negative_code_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)) * S ((dst_negative_code_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)) + ((dst_negative_scale_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst))) + (((dst_negative_code_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)) * S ((dst_negative_code_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)) + ((dst_negative_scale_sum_ext_entriesfirst) + (dst_negative_scale_sum_ext_entriesfirst)))))) /\ (((((exists ff_h_pvs_sum_ext_entriesfirstpositive. ff_h_pvs_sum_ext_entriesfirstpositive + S (dst_positive_sum_ext_entriesfirst) = S ((S (dst_index_sum_ext_entries)) * dst_positive_scale_sum_ext_entriesfirst)) /\ exists ff_q_pvs_sum_ext_entriesfirstpositive. dst_positive_code_sum_ext_entriesfirst = ff_q_pvs_sum_ext_entriesfirstpositive * S ((S (dst_index_sum_ext_entries)) * dst_positive_scale_sum_ext_entriesfirst) + (dst_positive_sum_ext_entriesfirst))) /\ (((((exists ff_h_pvs_sum_ext_entriesfirstnegative. ff_h_pvs_sum_ext_entriesfirstnegative + S (dst_negative_sum_ext_entriesfirst) = S ((S (dst_index_sum_ext_entries)) * dst_negative_scale_sum_ext_entriesfirst)) /\ exists ff_q_pvs_sum_ext_entriesfirstnegative. dst_negative_code_sum_ext_entriesfirst = ff_q_pvs_sum_ext_entriesfirstnegative * S ((S (dst_index_sum_ext_entries)) * dst_negative_scale_sum_ext_entriesfirst) + (dst_negative_sum_ext_entriesfirst))) /\ (exists ge_balance_positive_sum_ext_entriesfirstvalue ge_balance_negative_sum_ext_entriesfirstvalue. (((((dst_first_sum_ext_entries) = 2 * (ge_balance_positive_sum_ext_entriesfirstvalue) /\ (ge_balance_negative_sum_ext_entriesfirstvalue) = 0) \/ exists ge_signed_half_sum_ext_entriesfirstvaluedecode. (((dst_first_sum_ext_entries) = 2 * ge_signed_half_sum_ext_entriesfirstvaluedecode + 1 /\ (ge_balance_positive_sum_ext_entriesfirstvalue) = 0) /\ (ge_balance_negative_sum_ext_entriesfirstvalue) = S ge_signed_half_sum_ext_entriesfirstvaluedecode))) /\ ((dst_positive_sum_ext_entriesfirst) + ge_balance_negative_sum_ext_entriesfirstvalue = (dst_negative_sum_ext_entriesfirst) + ge_balance_positive_sum_ext_entriesfirstvalue))))))))) -> (exists dst_positive_code_sum_ext_entriessecond dst_positive_scale_sum_ext_entriessecond dst_negative_code_sum_ext_entriessecond dst_negative_scale_sum_ext_entriessecond dst_positive_sum_ext_entriessecond dst_negative_sum_ext_entriessecond. (((G) = (((((dst_positive_code_sum_ext_entriessecond) + (dst_positive_scale_sum_ext_entriessecond)) * S ((dst_positive_code_sum_ext_entriessecond) + (dst_positive_scale_sum_ext_entriessecond)) + ((dst_positive_scale_sum_ext_entriessecond) + (dst_positive_scale_sum_ext_entriessecond))) + (((dst_negative_code_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)) * S ((dst_negative_code_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)) + ((dst_negative_scale_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)))) * S ((((dst_positive_code_sum_ext_entriessecond) + (dst_positive_scale_sum_ext_entriessecond)) * S ((dst_positive_code_sum_ext_entriessecond) + (dst_positive_scale_sum_ext_entriessecond)) + ((dst_positive_scale_sum_ext_entriessecond) + (dst_positive_scale_sum_ext_entriessecond))) + (((dst_negative_code_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)) * S ((dst_negative_code_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)) + ((dst_negative_scale_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)))) + ((((dst_negative_code_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)) * S ((dst_negative_code_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)) + ((dst_negative_scale_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond))) + (((dst_negative_code_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)) * S ((dst_negative_code_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)) + ((dst_negative_scale_sum_ext_entriessecond) + (dst_negative_scale_sum_ext_entriessecond)))))) /\ (((((exists ff_h_pvs_sum_ext_entriessecondpositive. ff_h_pvs_sum_ext_entriessecondpositive + S (dst_positive_sum_ext_entriessecond) = S ((S (dst_index_sum_ext_entries)) * dst_positive_scale_sum_ext_entriessecond)) /\ exists ff_q_pvs_sum_ext_entriessecondpositive. dst_positive_code_sum_ext_entriessecond = ff_q_pvs_sum_ext_entriessecondpositive * S ((S (dst_index_sum_ext_entries)) * dst_positive_scale_sum_ext_entriessecond) + (dst_positive_sum_ext_entriessecond))) /\ (((((exists ff_h_pvs_sum_ext_entriessecondnegative. ff_h_pvs_sum_ext_entriessecondnegative + S (dst_negative_sum_ext_entriessecond) = S ((S (dst_index_sum_ext_entries)) * dst_negative_scale_sum_ext_entriessecond)) /\ exists ff_q_pvs_sum_ext_entriessecondnegative. dst_negative_code_sum_ext_entriessecond = ff_q_pvs_sum_ext_entriessecondnegative * S ((S (dst_index_sum_ext_entries)) * dst_negative_scale_sum_ext_entriessecond) + (dst_negative_sum_ext_entriessecond))) /\ (exists ge_balance_positive_sum_ext_entriessecondvalue ge_balance_negative_sum_ext_entriessecondvalue. (((((dst_second_sum_ext_entries) = 2 * (ge_balance_positive_sum_ext_entriessecondvalue) /\ (ge_balance_negative_sum_ext_entriessecondvalue) = 0) \/ exists ge_signed_half_sum_ext_entriessecondvaluedecode. (((dst_second_sum_ext_entries) = 2 * ge_signed_half_sum_ext_entriessecondvaluedecode + 1 /\ (ge_balance_positive_sum_ext_entriessecondvalue) = 0) /\ (ge_balance_negative_sum_ext_entriessecondvalue) = S ge_signed_half_sum_ext_entriessecondvaluedecode))) /\ ((dst_positive_sum_ext_entriessecond) + ge_balance_negative_sum_ext_entriessecondvalue = (dst_negative_sum_ext_entriessecond) + ge_balance_positive_sum_ext_entriessecondvalue))))))))) -> dst_first_sum_ext_entries = dst_second_sum_ext_entries) -> (exists dst_positive_code_sum_ext_first dst_positive_scale_sum_ext_first dst_negative_code_sum_ext_first dst_negative_scale_sum_ext_first dst_positive_sum_sum_ext_first dst_negative_sum_sum_ext_first. (((F) = (((((dst_positive_code_sum_ext_first) + (dst_positive_scale_sum_ext_first)) * S ((dst_positive_code_sum_ext_first) + (dst_positive_scale_sum_ext_first)) + ((dst_positive_scale_sum_ext_first) + (dst_positive_scale_sum_ext_first))) + (((dst_negative_code_sum_ext_first) + (dst_negative_scale_sum_ext_first)) * S ((dst_negative_code_sum_ext_first) + (dst_negative_scale_sum_ext_first)) + ((dst_negative_scale_sum_ext_first) + (dst_negative_scale_sum_ext_first)))) * S ((((dst_positive_code_sum_ext_first) + (dst_positive_scale_sum_ext_first)) * S ((dst_positive_code_sum_ext_first) + (dst_positive_scale_sum_ext_first)) + ((dst_positive_scale_sum_ext_first) + (dst_positive_scale_sum_ext_first))) + (((dst_negative_code_sum_ext_first) + (dst_negative_scale_sum_ext_first)) * S ((dst_negative_code_sum_ext_first) + (dst_negative_scale_sum_ext_first)) + ((dst_negative_scale_sum_ext_first) + (dst_negative_scale_sum_ext_first)))) + ((((dst_negative_code_sum_ext_first) + (dst_negative_scale_sum_ext_first)) * S ((dst_negative_code_sum_ext_first) + (dst_negative_scale_sum_ext_first)) + ((dst_negative_scale_sum_ext_first) + (dst_negative_scale_sum_ext_first))) + (((dst_negative_code_sum_ext_first) + (dst_negative_scale_sum_ext_first)) * S ((dst_negative_code_sum_ext_first) + (dst_negative_scale_sum_ext_first)) + ((dst_negative_scale_sum_ext_first) + (dst_negative_scale_sum_ext_first)))))) /\ (((exists fs_u_dst_sum_ext_firstpositive fs_v_dst_sum_ext_firstpositive. ((((exists fs_h_dst_sum_ext_firstpositive_body_start. fs_h_dst_sum_ext_firstpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_ext_firstpositive)) /\ exists fs_q_dst_sum_ext_firstpositive_body_start. fs_u_dst_sum_ext_firstpositive = fs_q_dst_sum_ext_firstpositive_body_start * S ((S (0)) * fs_v_dst_sum_ext_firstpositive) + (0))) /\ ((((exists fs_h_dst_sum_ext_firstpositive_body_terminal. fs_h_dst_sum_ext_firstpositive_body_terminal + S (dst_positive_sum_sum_ext_first) = S ((S (l)) * fs_v_dst_sum_ext_firstpositive)) /\ exists fs_q_dst_sum_ext_firstpositive_body_terminal. fs_u_dst_sum_ext_firstpositive = fs_q_dst_sum_ext_firstpositive_body_terminal * S ((S (l)) * fs_v_dst_sum_ext_firstpositive) + (dst_positive_sum_sum_ext_first))) /\ forall fs_i_dst_sum_ext_firstpositive_body_steps. (exists fs_lt_dst_sum_ext_firstpositive_body_steps_bound. fs_lt_dst_sum_ext_firstpositive_body_steps_bound + S fs_i_dst_sum_ext_firstpositive_body_steps = l) -> exists fs_a_dst_sum_ext_firstpositive_body_steps fs_r_dst_sum_ext_firstpositive_body_steps fs_s_dst_sum_ext_firstpositive_body_steps. ((((exists fs_h_dst_sum_ext_firstpositive_body_steps_summand. fs_h_dst_sum_ext_firstpositive_body_steps_summand + S (fs_a_dst_sum_ext_firstpositive_body_steps) = S ((S (fs_i_dst_sum_ext_firstpositive_body_steps)) * dst_positive_scale_sum_ext_first)) /\ exists fs_q_dst_sum_ext_firstpositive_body_steps_summand. dst_positive_code_sum_ext_first = fs_q_dst_sum_ext_firstpositive_body_steps_summand * S ((S (fs_i_dst_sum_ext_firstpositive_body_steps)) * dst_positive_scale_sum_ext_first) + (fs_a_dst_sum_ext_firstpositive_body_steps))) /\ ((((exists fs_h_dst_sum_ext_firstpositive_body_steps_partial. fs_h_dst_sum_ext_firstpositive_body_steps_partial + S (fs_r_dst_sum_ext_firstpositive_body_steps) = S ((S (fs_i_dst_sum_ext_firstpositive_body_steps)) * fs_v_dst_sum_ext_firstpositive)) /\ exists fs_q_dst_sum_ext_firstpositive_body_steps_partial. fs_u_dst_sum_ext_firstpositive = fs_q_dst_sum_ext_firstpositive_body_steps_partial * S ((S (fs_i_dst_sum_ext_firstpositive_body_steps)) * fs_v_dst_sum_ext_firstpositive) + (fs_r_dst_sum_ext_firstpositive_body_steps))) /\ ((((exists fs_h_dst_sum_ext_firstpositive_body_steps_successor. fs_h_dst_sum_ext_firstpositive_body_steps_successor + S (fs_s_dst_sum_ext_firstpositive_body_steps) = S ((S (S fs_i_dst_sum_ext_firstpositive_body_steps)) * fs_v_dst_sum_ext_firstpositive)) /\ exists fs_q_dst_sum_ext_firstpositive_body_steps_successor. fs_u_dst_sum_ext_firstpositive = fs_q_dst_sum_ext_firstpositive_body_steps_successor * S ((S (S fs_i_dst_sum_ext_firstpositive_body_steps)) * fs_v_dst_sum_ext_firstpositive) + (fs_s_dst_sum_ext_firstpositive_body_steps))) /\ fs_s_dst_sum_ext_firstpositive_body_steps = fs_r_dst_sum_ext_firstpositive_body_steps + fs_a_dst_sum_ext_firstpositive_body_steps)))))) /\ (((exists fs_u_dst_sum_ext_firstnegative fs_v_dst_sum_ext_firstnegative. ((((exists fs_h_dst_sum_ext_firstnegative_body_start. fs_h_dst_sum_ext_firstnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_ext_firstnegative)) /\ exists fs_q_dst_sum_ext_firstnegative_body_start. fs_u_dst_sum_ext_firstnegative = fs_q_dst_sum_ext_firstnegative_body_start * S ((S (0)) * fs_v_dst_sum_ext_firstnegative) + (0))) /\ ((((exists fs_h_dst_sum_ext_firstnegative_body_terminal. fs_h_dst_sum_ext_firstnegative_body_terminal + S (dst_negative_sum_sum_ext_first) = S ((S (l)) * fs_v_dst_sum_ext_firstnegative)) /\ exists fs_q_dst_sum_ext_firstnegative_body_terminal. fs_u_dst_sum_ext_firstnegative = fs_q_dst_sum_ext_firstnegative_body_terminal * S ((S (l)) * fs_v_dst_sum_ext_firstnegative) + (dst_negative_sum_sum_ext_first))) /\ forall fs_i_dst_sum_ext_firstnegative_body_steps. (exists fs_lt_dst_sum_ext_firstnegative_body_steps_bound. fs_lt_dst_sum_ext_firstnegative_body_steps_bound + S fs_i_dst_sum_ext_firstnegative_body_steps = l) -> exists fs_a_dst_sum_ext_firstnegative_body_steps fs_r_dst_sum_ext_firstnegative_body_steps fs_s_dst_sum_ext_firstnegative_body_steps. ((((exists fs_h_dst_sum_ext_firstnegative_body_steps_summand. fs_h_dst_sum_ext_firstnegative_body_steps_summand + S (fs_a_dst_sum_ext_firstnegative_body_steps) = S ((S (fs_i_dst_sum_ext_firstnegative_body_steps)) * dst_negative_scale_sum_ext_first)) /\ exists fs_q_dst_sum_ext_firstnegative_body_steps_summand. dst_negative_code_sum_ext_first = fs_q_dst_sum_ext_firstnegative_body_steps_summand * S ((S (fs_i_dst_sum_ext_firstnegative_body_steps)) * dst_negative_scale_sum_ext_first) + (fs_a_dst_sum_ext_firstnegative_body_steps))) /\ ((((exists fs_h_dst_sum_ext_firstnegative_body_steps_partial. fs_h_dst_sum_ext_firstnegative_body_steps_partial + S (fs_r_dst_sum_ext_firstnegative_body_steps) = S ((S (fs_i_dst_sum_ext_firstnegative_body_steps)) * fs_v_dst_sum_ext_firstnegative)) /\ exists fs_q_dst_sum_ext_firstnegative_body_steps_partial. fs_u_dst_sum_ext_firstnegative = fs_q_dst_sum_ext_firstnegative_body_steps_partial * S ((S (fs_i_dst_sum_ext_firstnegative_body_steps)) * fs_v_dst_sum_ext_firstnegative) + (fs_r_dst_sum_ext_firstnegative_body_steps))) /\ ((((exists fs_h_dst_sum_ext_firstnegative_body_steps_successor. fs_h_dst_sum_ext_firstnegative_body_steps_successor + S (fs_s_dst_sum_ext_firstnegative_body_steps) = S ((S (S fs_i_dst_sum_ext_firstnegative_body_steps)) * fs_v_dst_sum_ext_firstnegative)) /\ exists fs_q_dst_sum_ext_firstnegative_body_steps_successor. fs_u_dst_sum_ext_firstnegative = fs_q_dst_sum_ext_firstnegative_body_steps_successor * S ((S (S fs_i_dst_sum_ext_firstnegative_body_steps)) * fs_v_dst_sum_ext_firstnegative) + (fs_s_dst_sum_ext_firstnegative_body_steps))) /\ fs_s_dst_sum_ext_firstnegative_body_steps = fs_r_dst_sum_ext_firstnegative_body_steps + fs_a_dst_sum_ext_firstnegative_body_steps)))))) /\ (exists ge_balance_positive_sum_ext_firstresult ge_balance_negative_sum_ext_firstresult. (((((a) = 2 * (ge_balance_positive_sum_ext_firstresult) /\ (ge_balance_negative_sum_ext_firstresult) = 0) \/ exists ge_signed_half_sum_ext_firstresultdecode. (((a) = 2 * ge_signed_half_sum_ext_firstresultdecode + 1 /\ (ge_balance_positive_sum_ext_firstresult) = 0) /\ (ge_balance_negative_sum_ext_firstresult) = S ge_signed_half_sum_ext_firstresultdecode))) /\ ((dst_positive_sum_sum_ext_first) + ge_balance_negative_sum_ext_firstresult = (dst_negative_sum_sum_ext_first) + ge_balance_positive_sum_ext_firstresult))))))))) -> (exists dst_positive_code_sum_ext_second dst_positive_scale_sum_ext_second dst_negative_code_sum_ext_second dst_negative_scale_sum_ext_second dst_positive_sum_sum_ext_second dst_negative_sum_sum_ext_second. (((G) = (((((dst_positive_code_sum_ext_second) + (dst_positive_scale_sum_ext_second)) * S ((dst_positive_code_sum_ext_second) + (dst_positive_scale_sum_ext_second)) + ((dst_positive_scale_sum_ext_second) + (dst_positive_scale_sum_ext_second))) + (((dst_negative_code_sum_ext_second) + (dst_negative_scale_sum_ext_second)) * S ((dst_negative_code_sum_ext_second) + (dst_negative_scale_sum_ext_second)) + ((dst_negative_scale_sum_ext_second) + (dst_negative_scale_sum_ext_second)))) * S ((((dst_positive_code_sum_ext_second) + (dst_positive_scale_sum_ext_second)) * S ((dst_positive_code_sum_ext_second) + (dst_positive_scale_sum_ext_second)) + ((dst_positive_scale_sum_ext_second) + (dst_positive_scale_sum_ext_second))) + (((dst_negative_code_sum_ext_second) + (dst_negative_scale_sum_ext_second)) * S ((dst_negative_code_sum_ext_second) + (dst_negative_scale_sum_ext_second)) + ((dst_negative_scale_sum_ext_second) + (dst_negative_scale_sum_ext_second)))) + ((((dst_negative_code_sum_ext_second) + (dst_negative_scale_sum_ext_second)) * S ((dst_negative_code_sum_ext_second) + (dst_negative_scale_sum_ext_second)) + ((dst_negative_scale_sum_ext_second) + (dst_negative_scale_sum_ext_second))) + (((dst_negative_code_sum_ext_second) + (dst_negative_scale_sum_ext_second)) * S ((dst_negative_code_sum_ext_second) + (dst_negative_scale_sum_ext_second)) + ((dst_negative_scale_sum_ext_second) + (dst_negative_scale_sum_ext_second)))))) /\ (((exists fs_u_dst_sum_ext_secondpositive fs_v_dst_sum_ext_secondpositive. ((((exists fs_h_dst_sum_ext_secondpositive_body_start. fs_h_dst_sum_ext_secondpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_ext_secondpositive)) /\ exists fs_q_dst_sum_ext_secondpositive_body_start. fs_u_dst_sum_ext_secondpositive = fs_q_dst_sum_ext_secondpositive_body_start * S ((S (0)) * fs_v_dst_sum_ext_secondpositive) + (0))) /\ ((((exists fs_h_dst_sum_ext_secondpositive_body_terminal. fs_h_dst_sum_ext_secondpositive_body_terminal + S (dst_positive_sum_sum_ext_second) = S ((S (l)) * fs_v_dst_sum_ext_secondpositive)) /\ exists fs_q_dst_sum_ext_secondpositive_body_terminal. fs_u_dst_sum_ext_secondpositive = fs_q_dst_sum_ext_secondpositive_body_terminal * S ((S (l)) * fs_v_dst_sum_ext_secondpositive) + (dst_positive_sum_sum_ext_second))) /\ forall fs_i_dst_sum_ext_secondpositive_body_steps. (exists fs_lt_dst_sum_ext_secondpositive_body_steps_bound. fs_lt_dst_sum_ext_secondpositive_body_steps_bound + S fs_i_dst_sum_ext_secondpositive_body_steps = l) -> exists fs_a_dst_sum_ext_secondpositive_body_steps fs_r_dst_sum_ext_secondpositive_body_steps fs_s_dst_sum_ext_secondpositive_body_steps. ((((exists fs_h_dst_sum_ext_secondpositive_body_steps_summand. fs_h_dst_sum_ext_secondpositive_body_steps_summand + S (fs_a_dst_sum_ext_secondpositive_body_steps) = S ((S (fs_i_dst_sum_ext_secondpositive_body_steps)) * dst_positive_scale_sum_ext_second)) /\ exists fs_q_dst_sum_ext_secondpositive_body_steps_summand. dst_positive_code_sum_ext_second = fs_q_dst_sum_ext_secondpositive_body_steps_summand * S ((S (fs_i_dst_sum_ext_secondpositive_body_steps)) * dst_positive_scale_sum_ext_second) + (fs_a_dst_sum_ext_secondpositive_body_steps))) /\ ((((exists fs_h_dst_sum_ext_secondpositive_body_steps_partial. fs_h_dst_sum_ext_secondpositive_body_steps_partial + S (fs_r_dst_sum_ext_secondpositive_body_steps) = S ((S (fs_i_dst_sum_ext_secondpositive_body_steps)) * fs_v_dst_sum_ext_secondpositive)) /\ exists fs_q_dst_sum_ext_secondpositive_body_steps_partial. fs_u_dst_sum_ext_secondpositive = fs_q_dst_sum_ext_secondpositive_body_steps_partial * S ((S (fs_i_dst_sum_ext_secondpositive_body_steps)) * fs_v_dst_sum_ext_secondpositive) + (fs_r_dst_sum_ext_secondpositive_body_steps))) /\ ((((exists fs_h_dst_sum_ext_secondpositive_body_steps_successor. fs_h_dst_sum_ext_secondpositive_body_steps_successor + S (fs_s_dst_sum_ext_secondpositive_body_steps) = S ((S (S fs_i_dst_sum_ext_secondpositive_body_steps)) * fs_v_dst_sum_ext_secondpositive)) /\ exists fs_q_dst_sum_ext_secondpositive_body_steps_successor. fs_u_dst_sum_ext_secondpositive = fs_q_dst_sum_ext_secondpositive_body_steps_successor * S ((S (S fs_i_dst_sum_ext_secondpositive_body_steps)) * fs_v_dst_sum_ext_secondpositive) + (fs_s_dst_sum_ext_secondpositive_body_steps))) /\ fs_s_dst_sum_ext_secondpositive_body_steps = fs_r_dst_sum_ext_secondpositive_body_steps + fs_a_dst_sum_ext_secondpositive_body_steps)))))) /\ (((exists fs_u_dst_sum_ext_secondnegative fs_v_dst_sum_ext_secondnegative. ((((exists fs_h_dst_sum_ext_secondnegative_body_start. fs_h_dst_sum_ext_secondnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_ext_secondnegative)) /\ exists fs_q_dst_sum_ext_secondnegative_body_start. fs_u_dst_sum_ext_secondnegative = fs_q_dst_sum_ext_secondnegative_body_start * S ((S (0)) * fs_v_dst_sum_ext_secondnegative) + (0))) /\ ((((exists fs_h_dst_sum_ext_secondnegative_body_terminal. fs_h_dst_sum_ext_secondnegative_body_terminal + S (dst_negative_sum_sum_ext_second) = S ((S (l)) * fs_v_dst_sum_ext_secondnegative)) /\ exists fs_q_dst_sum_ext_secondnegative_body_terminal. fs_u_dst_sum_ext_secondnegative = fs_q_dst_sum_ext_secondnegative_body_terminal * S ((S (l)) * fs_v_dst_sum_ext_secondnegative) + (dst_negative_sum_sum_ext_second))) /\ forall fs_i_dst_sum_ext_secondnegative_body_steps. (exists fs_lt_dst_sum_ext_secondnegative_body_steps_bound. fs_lt_dst_sum_ext_secondnegative_body_steps_bound + S fs_i_dst_sum_ext_secondnegative_body_steps = l) -> exists fs_a_dst_sum_ext_secondnegative_body_steps fs_r_dst_sum_ext_secondnegative_body_steps fs_s_dst_sum_ext_secondnegative_body_steps. ((((exists fs_h_dst_sum_ext_secondnegative_body_steps_summand. fs_h_dst_sum_ext_secondnegative_body_steps_summand + S (fs_a_dst_sum_ext_secondnegative_body_steps) = S ((S (fs_i_dst_sum_ext_secondnegative_body_steps)) * dst_negative_scale_sum_ext_second)) /\ exists fs_q_dst_sum_ext_secondnegative_body_steps_summand. dst_negative_code_sum_ext_second = fs_q_dst_sum_ext_secondnegative_body_steps_summand * S ((S (fs_i_dst_sum_ext_secondnegative_body_steps)) * dst_negative_scale_sum_ext_second) + (fs_a_dst_sum_ext_secondnegative_body_steps))) /\ ((((exists fs_h_dst_sum_ext_secondnegative_body_steps_partial. fs_h_dst_sum_ext_secondnegative_body_steps_partial + S (fs_r_dst_sum_ext_secondnegative_body_steps) = S ((S (fs_i_dst_sum_ext_secondnegative_body_steps)) * fs_v_dst_sum_ext_secondnegative)) /\ exists fs_q_dst_sum_ext_secondnegative_body_steps_partial. fs_u_dst_sum_ext_secondnegative = fs_q_dst_sum_ext_secondnegative_body_steps_partial * S ((S (fs_i_dst_sum_ext_secondnegative_body_steps)) * fs_v_dst_sum_ext_secondnegative) + (fs_r_dst_sum_ext_secondnegative_body_steps))) /\ ((((exists fs_h_dst_sum_ext_secondnegative_body_steps_successor. fs_h_dst_sum_ext_secondnegative_body_steps_successor + S (fs_s_dst_sum_ext_secondnegative_body_steps) = S ((S (S fs_i_dst_sum_ext_secondnegative_body_steps)) * fs_v_dst_sum_ext_secondnegative)) /\ exists fs_q_dst_sum_ext_secondnegative_body_steps_successor. fs_u_dst_sum_ext_secondnegative = fs_q_dst_sum_ext_secondnegative_body_steps_successor * S ((S (S fs_i_dst_sum_ext_secondnegative_body_steps)) * fs_v_dst_sum_ext_secondnegative) + (fs_s_dst_sum_ext_secondnegative_body_steps))) /\ fs_s_dst_sum_ext_secondnegative_body_steps = fs_r_dst_sum_ext_secondnegative_body_steps + fs_a_dst_sum_ext_secondnegative_body_steps)))))) /\ (exists ge_balance_positive_sum_ext_secondresult ge_balance_negative_sum_ext_secondresult. (((((b) = 2 * (ge_balance_positive_sum_ext_secondresult) /\ (ge_balance_negative_sum_ext_secondresult) = 0) \/ exists ge_signed_half_sum_ext_secondresultdecode. (((b) = 2 * ge_signed_half_sum_ext_secondresultdecode + 1 /\ (ge_balance_positive_sum_ext_secondresult) = 0) /\ (ge_balance_negative_sum_ext_secondresult) = S ge_signed_half_sum_ext_secondresultdecode))) /\ ((dst_positive_sum_sum_ext_second) + ge_balance_negative_sum_ext_secondresult = (dst_negative_sum_sum_ext_second) + ge_balance_positive_sum_ext_secondresult))))))))) -> a = b

Constructive proof overview

Generated structural guide

Signed prefix sums are independent of all pointwise balanced positive/negative representatives, by the checked natural cross-sum theorem.

The unchanged tactic script uses 4 declared prerequisites and contains 72 exact native proof lines.

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

Proof neighborhood

Direct dependencies

Direct dependents

Formal native tactic body

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

Read the argument

Proof checkpoints

72 script commands · 10 reading checkpoints · 1 local claims

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

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

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

  1. L1
    intro F
  2. L2
    intro G
  3. L3
    intro l
  4. L4
    intro a
  5. L5
    intro b
  6. L6
    intro hequal
  7. L7
    intro ha
  8. L8
    intro hb
02Separate the logical casesL9–18

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

  1. L9
    cases ha
  2. L10
    cases ha_witness
  3. L11
    cases ha_witness_witness
  4. L12
    cases ha_witness_witness_witness
  5. L13
    cases ha_witness_witness_witness_witness
  6. L14
    cases ha_witness_witness_witness_witness_witness
  7. L15
    cases ha_witness_witness_witness_witness_witness_witness
  8. L16
    cases ha_witness_witness_witness_witness_witness_witness_right
  9. L17
    cases ha_witness_witness_witness_witness_witness_witness_right_right
  10. L18
    cases hb
03Separate the logical casesL19–26

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

  1. L19
    cases hb_witness
  2. L20
    cases hb_witness_witness
  3. L21
    cases hb_witness_witness_witness
  4. L22
    cases hb_witness_witness_witness_witness
  5. L23
    cases hb_witness_witness_witness_witness_witness
  6. L24
    cases hb_witness_witness_witness_witness_witness_witness
  7. L25
    cases hb_witness_witness_witness_witness_witness_witness_right
  8. L26
    cases hb_witness_witness_witness_witness_witness_witness_right_right
04Establish hbalanceL27–36

Establish this local claim before using it. It is not an additional assumption.

  1. L27
    have hbalance : x4 + x11 = x10 + x5
  2. L28
    specialize matrix_integer_signed_sum_balance (x)
  3. L29
    specialize matrix_integer_signed_sum_balance (x1)
  4. L30
    specialize matrix_integer_signed_sum_balance (x2)
  5. L31
    specialize matrix_integer_signed_sum_balance (x3)
  6. L32
    specialize matrix_integer_signed_sum_balance (x6)
  7. L33
    specialize matrix_integer_signed_sum_balance (x7)
  8. L34
    specialize matrix_integer_signed_sum_balance (x8)
  9. L35
    specialize matrix_integer_signed_sum_balance (x9)
  10. L36
    specialize matrix_integer_signed_sum_balance (l)
05Use earlier factsL37–46

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

  1. L37
    specialize matrix_integer_signed_sum_balance (x4)
  2. L38
    specialize matrix_integer_signed_sum_balance (x5)
  3. L39
    specialize matrix_integer_signed_sum_balance (x10)
  4. L40
    specialize matrix_integer_signed_sum_balance (x11)
  5. L41
    apply matrix_integer_signed_sum_balance
  6. L42
    specialize divisor_signed_table_equality_component_balance (F)
  7. L43
    specialize divisor_signed_table_equality_component_balance (G)
  8. L44
    specialize divisor_signed_table_equality_component_balance (x)
  9. L45
    specialize divisor_signed_table_equality_component_balance (x1)
  10. L46
    specialize divisor_signed_table_equality_component_balance (x2)
06Use earlier factsL47–56

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

  1. L47
    specialize divisor_signed_table_equality_component_balance (x3)
  2. L48
    specialize divisor_signed_table_equality_component_balance (x6)
  3. L49
    specialize divisor_signed_table_equality_component_balance (x7)
  4. L50
    specialize divisor_signed_table_equality_component_balance (x8)
  5. L51
    specialize divisor_signed_table_equality_component_balance (x9)
  6. L52
    specialize divisor_signed_table_equality_component_balance (l)
  7. L53
    apply divisor_signed_table_equality_component_balance
  8. L54
    exact ha_witness_witness_witness_witness_witness_witness_left
  9. L55
    exact hb_witness_witness_witness_witness_witness_witness_left
  10. L56
    exact hequal
07Use earlier factsL57–66

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

  1. L57
    exact ha_witness_witness_witness_witness_witness_witness_right_left
  2. L58
    exact ha_witness_witness_witness_witness_witness_witness_right_right_left
  3. L59
    exact hb_witness_witness_witness_witness_witness_witness_right_left
  4. L60
    exact hb_witness_witness_witness_witness_witness_witness_right_right_left
  5. L61
    specialize signed_balance_extensional (a)
  6. L62
    specialize signed_balance_extensional (b)
  7. L63
    specialize signed_balance_extensional (x4)
  8. L64
    specialize signed_balance_extensional (x5)
  9. L65
    specialize signed_balance_extensional (x10)
  10. L66
    specialize signed_balance_extensional (x11)
08Use earlier factsL67–69

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

  1. L67
    apply signed_balance_extensional
  2. L68
    exact ha_witness_witness_witness_witness_witness_witness_right_right_right
  3. L69
    exact hb_witness_witness_witness_witness_witness_witness_right_right_right
09Calculate and transport equalitiesL70–70

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

  1. L70
    trans x10 + x5
10Use earlier factsL71–72

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

  1. L71
    exact hbalance
  2. L72
    apply add_comm

Library-wide reading audit

Original exact command ledger · 72 lines
  1. 0001intro F
  2. 0002intro G
  3. 0003intro l
  4. 0004intro a
  5. 0005intro b
  6. 0006intro hequal
  7. 0007intro ha
  8. 0008intro hb
  9. 0009cases ha
  10. 0010cases ha_witness
  11. 0011cases ha_witness_witness
  12. 0012cases ha_witness_witness_witness
  13. 0013cases ha_witness_witness_witness_witness
  14. 0014cases ha_witness_witness_witness_witness_witness
  15. 0015cases ha_witness_witness_witness_witness_witness_witness
  16. 0016cases ha_witness_witness_witness_witness_witness_witness_right
  17. 0017cases ha_witness_witness_witness_witness_witness_witness_right_right
  18. 0018cases hb
  19. 0019cases hb_witness
  20. 0020cases hb_witness_witness
  21. 0021cases hb_witness_witness_witness
  22. 0022cases hb_witness_witness_witness_witness
  23. 0023cases hb_witness_witness_witness_witness_witness
  24. 0024cases hb_witness_witness_witness_witness_witness_witness
  25. 0025cases hb_witness_witness_witness_witness_witness_witness_right
  26. 0026cases hb_witness_witness_witness_witness_witness_witness_right_right
  27. 0027have hbalance : x4 + x11 = x10 + x5
  28. 0028specialize matrix_integer_signed_sum_balance (x)
  29. 0029specialize matrix_integer_signed_sum_balance (x1)
  30. 0030specialize matrix_integer_signed_sum_balance (x2)
  31. 0031specialize matrix_integer_signed_sum_balance (x3)
  32. 0032specialize matrix_integer_signed_sum_balance (x6)
  33. 0033specialize matrix_integer_signed_sum_balance (x7)
  34. 0034specialize matrix_integer_signed_sum_balance (x8)
  35. 0035specialize matrix_integer_signed_sum_balance (x9)
  36. 0036specialize matrix_integer_signed_sum_balance (l)
  37. 0037specialize matrix_integer_signed_sum_balance (x4)
  38. 0038specialize matrix_integer_signed_sum_balance (x5)
  39. 0039specialize matrix_integer_signed_sum_balance (x10)
  40. 0040specialize matrix_integer_signed_sum_balance (x11)
  41. 0041apply matrix_integer_signed_sum_balance
  42. 0042specialize divisor_signed_table_equality_component_balance (F)
  43. 0043specialize divisor_signed_table_equality_component_balance (G)
  44. 0044specialize divisor_signed_table_equality_component_balance (x)
  45. 0045specialize divisor_signed_table_equality_component_balance (x1)
  46. 0046specialize divisor_signed_table_equality_component_balance (x2)
  47. 0047specialize divisor_signed_table_equality_component_balance (x3)
  48. 0048specialize divisor_signed_table_equality_component_balance (x6)
  49. 0049specialize divisor_signed_table_equality_component_balance (x7)
  50. 0050specialize divisor_signed_table_equality_component_balance (x8)
  51. 0051specialize divisor_signed_table_equality_component_balance (x9)
  52. 0052specialize divisor_signed_table_equality_component_balance (l)
  53. 0053apply divisor_signed_table_equality_component_balance
  54. 0054exact ha_witness_witness_witness_witness_witness_witness_left
  55. 0055exact hb_witness_witness_witness_witness_witness_witness_left
  56. 0056exact hequal
  57. 0057exact ha_witness_witness_witness_witness_witness_witness_right_left
  58. 0058exact ha_witness_witness_witness_witness_witness_witness_right_right_left
  59. 0059exact hb_witness_witness_witness_witness_witness_witness_right_left
  60. 0060exact hb_witness_witness_witness_witness_witness_witness_right_right_left
  61. 0061specialize signed_balance_extensional (a)
  62. 0062specialize signed_balance_extensional (b)
  63. 0063specialize signed_balance_extensional (x4)
  64. 0064specialize signed_balance_extensional (x5)
  65. 0065specialize signed_balance_extensional (x10)
  66. 0066specialize signed_balance_extensional (x11)
  67. 0067apply signed_balance_extensional
  68. 0068exact ha_witness_witness_witness_witness_witness_witness_right_right_right
  69. 0069exact hb_witness_witness_witness_witness_witness_witness_right_right_right
  70. 0070trans x10 + x5
  71. 0071exact hbalance
  72. 0072apply add_comm