SS001D

divisor_signed_sum_component_reindex

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

Original finite natural-sum permutation invariance preserves both actual component sums, hence their canonical signed result.

Exact expanded first-order arithmetic statement

forall F G pb pc nb nc qb qc mb mc r s l u v. ((F) = (((((pb) + (pc)) * S ((pb) + (pc)) + ((pc) + (pc))) + (((nb) + (nc)) * S ((nb) + (nc)) + ((nc) + (nc)))) * S ((((pb) + (pc)) * S ((pb) + (pc)) + ((pc) + (pc))) + (((nb) + (nc)) * S ((nb) + (nc)) + ((nc) + (nc)))) + ((((nb) + (nc)) * S ((nb) + (nc)) + ((nc) + (nc))) + (((nb) + (nc)) * S ((nb) + (nc)) + ((nc) + (nc)))))) -> ((G) = (((((qb) + (qc)) * S ((qb) + (qc)) + ((qc) + (qc))) + (((mb) + (mc)) * S ((mb) + (mc)) + ((mc) + (mc)))) * S ((((qb) + (qc)) * S ((qb) + (qc)) + ((qc) + (qc))) + (((mb) + (mc)) * S ((mb) + (mc)) + ((mc) + (mc)))) + ((((mb) + (mc)) * S ((mb) + (mc)) + ((mc) + (mc))) + (((mb) + (mc)) * S ((mb) + (mc)) + ((mc) + (mc)))))) -> (forall pfp_i_sum_map_bounded. (exists pfp_gap_sum_map_boundedindex. pfp_gap_sum_map_boundedindex + S (pfp_i_sum_map_bounded) = (l)) -> exists pfp_a_sum_map_bounded. (((exists ff_h_pfp_sum_map_boundedentry. ff_h_pfp_sum_map_boundedentry + S (pfp_a_sum_map_bounded) = S ((S (pfp_i_sum_map_bounded)) * s)) /\ exists ff_q_pfp_sum_map_boundedentry. r = ff_q_pfp_sum_map_boundedentry * S ((S (pfp_i_sum_map_bounded)) * s) + (pfp_a_sum_map_bounded))) /\ (exists pfp_gap_sum_map_boundedvalue. pfp_gap_sum_map_boundedvalue + S (pfp_a_sum_map_bounded) = (l))) -> (forall pfp_i_sum_map_injective pfp_j_sum_map_injective pfp_a_sum_map_injective. (exists pfp_gap_sum_map_injectivefirst. pfp_gap_sum_map_injectivefirst + S (pfp_i_sum_map_injective) = (l)) -> (exists pfp_gap_sum_map_injectivesecond. pfp_gap_sum_map_injectivesecond + S (pfp_j_sum_map_injective) = (l)) -> (((exists ff_h_pfp_sum_map_injectiveleft. ff_h_pfp_sum_map_injectiveleft + S (pfp_a_sum_map_injective) = S ((S (pfp_i_sum_map_injective)) * s)) /\ exists ff_q_pfp_sum_map_injectiveleft. r = ff_q_pfp_sum_map_injectiveleft * S ((S (pfp_i_sum_map_injective)) * s) + (pfp_a_sum_map_injective))) -> (((exists ff_h_pfp_sum_map_injectiveright. ff_h_pfp_sum_map_injectiveright + S (pfp_a_sum_map_injective) = S ((S (pfp_j_sum_map_injective)) * s)) /\ exists ff_q_pfp_sum_map_injectiveright. r = ff_q_pfp_sum_map_injectiveright * S ((S (pfp_j_sum_map_injective)) * s) + (pfp_a_sum_map_injective))) -> pfp_i_sum_map_injective = pfp_j_sum_map_injective) -> (((forall fms_i_sum_component_compositionpositive fms_j_sum_component_compositionpositive fms_v_sum_component_compositionpositive. (exists fms_gap_sum_component_compositionpositive. fms_gap_sum_component_compositionpositive + S (fms_i_sum_component_compositionpositive) = (l)) -> (((exists fs_h_fms_sum_component_compositionpositive_index. fs_h_fms_sum_component_compositionpositive_index + S (fms_j_sum_component_compositionpositive) = S ((S (fms_i_sum_component_compositionpositive)) * s)) /\ exists fs_q_fms_sum_component_compositionpositive_index. r = fs_q_fms_sum_component_compositionpositive_index * S ((S (fms_i_sum_component_compositionpositive)) * s) + (fms_j_sum_component_compositionpositive))) -> (((exists fs_h_fms_sum_component_compositionpositive_source. fs_h_fms_sum_component_compositionpositive_source + S (fms_v_sum_component_compositionpositive) = S ((S (fms_j_sum_component_compositionpositive)) * pc)) /\ exists fs_q_fms_sum_component_compositionpositive_source. pb = fs_q_fms_sum_component_compositionpositive_source * S ((S (fms_j_sum_component_compositionpositive)) * pc) + (fms_v_sum_component_compositionpositive))) -> (((exists fs_h_fms_sum_component_compositionpositive_target. fs_h_fms_sum_component_compositionpositive_target + S (fms_v_sum_component_compositionpositive) = S ((S (fms_i_sum_component_compositionpositive)) * qc)) /\ exists fs_q_fms_sum_component_compositionpositive_target. qb = fs_q_fms_sum_component_compositionpositive_target * S ((S (fms_i_sum_component_compositionpositive)) * qc) + (fms_v_sum_component_compositionpositive)))) /\ (forall fms_i_sum_component_compositionnegative fms_j_sum_component_compositionnegative fms_v_sum_component_compositionnegative. (exists fms_gap_sum_component_compositionnegative. fms_gap_sum_component_compositionnegative + S (fms_i_sum_component_compositionnegative) = (l)) -> (((exists fs_h_fms_sum_component_compositionnegative_index. fs_h_fms_sum_component_compositionnegative_index + S (fms_j_sum_component_compositionnegative) = S ((S (fms_i_sum_component_compositionnegative)) * s)) /\ exists fs_q_fms_sum_component_compositionnegative_index. r = fs_q_fms_sum_component_compositionnegative_index * S ((S (fms_i_sum_component_compositionnegative)) * s) + (fms_j_sum_component_compositionnegative))) -> (((exists fs_h_fms_sum_component_compositionnegative_source. fs_h_fms_sum_component_compositionnegative_source + S (fms_v_sum_component_compositionnegative) = S ((S (fms_j_sum_component_compositionnegative)) * nc)) /\ exists fs_q_fms_sum_component_compositionnegative_source. nb = fs_q_fms_sum_component_compositionnegative_source * S ((S (fms_j_sum_component_compositionnegative)) * nc) + (fms_v_sum_component_compositionnegative))) -> (((exists fs_h_fms_sum_component_compositionnegative_target. fs_h_fms_sum_component_compositionnegative_target + S (fms_v_sum_component_compositionnegative) = S ((S (fms_i_sum_component_compositionnegative)) * mc)) /\ exists fs_q_fms_sum_component_compositionnegative_target. mb = fs_q_fms_sum_component_compositionnegative_target * S ((S (fms_i_sum_component_compositionnegative)) * mc) + (fms_v_sum_component_compositionnegative)))))) -> (exists dst_positive_code_sum_source dst_positive_scale_sum_source dst_negative_code_sum_source dst_negative_scale_sum_source dst_positive_sum_sum_source dst_negative_sum_sum_source. (((F) = (((((dst_positive_code_sum_source) + (dst_positive_scale_sum_source)) * S ((dst_positive_code_sum_source) + (dst_positive_scale_sum_source)) + ((dst_positive_scale_sum_source) + (dst_positive_scale_sum_source))) + (((dst_negative_code_sum_source) + (dst_negative_scale_sum_source)) * S ((dst_negative_code_sum_source) + (dst_negative_scale_sum_source)) + ((dst_negative_scale_sum_source) + (dst_negative_scale_sum_source)))) * S ((((dst_positive_code_sum_source) + (dst_positive_scale_sum_source)) * S ((dst_positive_code_sum_source) + (dst_positive_scale_sum_source)) + ((dst_positive_scale_sum_source) + (dst_positive_scale_sum_source))) + (((dst_negative_code_sum_source) + (dst_negative_scale_sum_source)) * S ((dst_negative_code_sum_source) + (dst_negative_scale_sum_source)) + ((dst_negative_scale_sum_source) + (dst_negative_scale_sum_source)))) + ((((dst_negative_code_sum_source) + (dst_negative_scale_sum_source)) * S ((dst_negative_code_sum_source) + (dst_negative_scale_sum_source)) + ((dst_negative_scale_sum_source) + (dst_negative_scale_sum_source))) + (((dst_negative_code_sum_source) + (dst_negative_scale_sum_source)) * S ((dst_negative_code_sum_source) + (dst_negative_scale_sum_source)) + ((dst_negative_scale_sum_source) + (dst_negative_scale_sum_source)))))) /\ (((exists fs_u_dst_sum_sourcepositive fs_v_dst_sum_sourcepositive. ((((exists fs_h_dst_sum_sourcepositive_body_start. fs_h_dst_sum_sourcepositive_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_sourcepositive)) /\ exists fs_q_dst_sum_sourcepositive_body_start. fs_u_dst_sum_sourcepositive = fs_q_dst_sum_sourcepositive_body_start * S ((S (0)) * fs_v_dst_sum_sourcepositive) + (0))) /\ ((((exists fs_h_dst_sum_sourcepositive_body_terminal. fs_h_dst_sum_sourcepositive_body_terminal + S (dst_positive_sum_sum_source) = S ((S (l)) * fs_v_dst_sum_sourcepositive)) /\ exists fs_q_dst_sum_sourcepositive_body_terminal. fs_u_dst_sum_sourcepositive = fs_q_dst_sum_sourcepositive_body_terminal * S ((S (l)) * fs_v_dst_sum_sourcepositive) + (dst_positive_sum_sum_source))) /\ forall fs_i_dst_sum_sourcepositive_body_steps. (exists fs_lt_dst_sum_sourcepositive_body_steps_bound. fs_lt_dst_sum_sourcepositive_body_steps_bound + S fs_i_dst_sum_sourcepositive_body_steps = l) -> exists fs_a_dst_sum_sourcepositive_body_steps fs_r_dst_sum_sourcepositive_body_steps fs_s_dst_sum_sourcepositive_body_steps. ((((exists fs_h_dst_sum_sourcepositive_body_steps_summand. fs_h_dst_sum_sourcepositive_body_steps_summand + S (fs_a_dst_sum_sourcepositive_body_steps) = S ((S (fs_i_dst_sum_sourcepositive_body_steps)) * dst_positive_scale_sum_source)) /\ exists fs_q_dst_sum_sourcepositive_body_steps_summand. dst_positive_code_sum_source = fs_q_dst_sum_sourcepositive_body_steps_summand * S ((S (fs_i_dst_sum_sourcepositive_body_steps)) * dst_positive_scale_sum_source) + (fs_a_dst_sum_sourcepositive_body_steps))) /\ ((((exists fs_h_dst_sum_sourcepositive_body_steps_partial. fs_h_dst_sum_sourcepositive_body_steps_partial + S (fs_r_dst_sum_sourcepositive_body_steps) = S ((S (fs_i_dst_sum_sourcepositive_body_steps)) * fs_v_dst_sum_sourcepositive)) /\ exists fs_q_dst_sum_sourcepositive_body_steps_partial. fs_u_dst_sum_sourcepositive = fs_q_dst_sum_sourcepositive_body_steps_partial * S ((S (fs_i_dst_sum_sourcepositive_body_steps)) * fs_v_dst_sum_sourcepositive) + (fs_r_dst_sum_sourcepositive_body_steps))) /\ ((((exists fs_h_dst_sum_sourcepositive_body_steps_successor. fs_h_dst_sum_sourcepositive_body_steps_successor + S (fs_s_dst_sum_sourcepositive_body_steps) = S ((S (S fs_i_dst_sum_sourcepositive_body_steps)) * fs_v_dst_sum_sourcepositive)) /\ exists fs_q_dst_sum_sourcepositive_body_steps_successor. fs_u_dst_sum_sourcepositive = fs_q_dst_sum_sourcepositive_body_steps_successor * S ((S (S fs_i_dst_sum_sourcepositive_body_steps)) * fs_v_dst_sum_sourcepositive) + (fs_s_dst_sum_sourcepositive_body_steps))) /\ fs_s_dst_sum_sourcepositive_body_steps = fs_r_dst_sum_sourcepositive_body_steps + fs_a_dst_sum_sourcepositive_body_steps)))))) /\ (((exists fs_u_dst_sum_sourcenegative fs_v_dst_sum_sourcenegative. ((((exists fs_h_dst_sum_sourcenegative_body_start. fs_h_dst_sum_sourcenegative_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_sourcenegative)) /\ exists fs_q_dst_sum_sourcenegative_body_start. fs_u_dst_sum_sourcenegative = fs_q_dst_sum_sourcenegative_body_start * S ((S (0)) * fs_v_dst_sum_sourcenegative) + (0))) /\ ((((exists fs_h_dst_sum_sourcenegative_body_terminal. fs_h_dst_sum_sourcenegative_body_terminal + S (dst_negative_sum_sum_source) = S ((S (l)) * fs_v_dst_sum_sourcenegative)) /\ exists fs_q_dst_sum_sourcenegative_body_terminal. fs_u_dst_sum_sourcenegative = fs_q_dst_sum_sourcenegative_body_terminal * S ((S (l)) * fs_v_dst_sum_sourcenegative) + (dst_negative_sum_sum_source))) /\ forall fs_i_dst_sum_sourcenegative_body_steps. (exists fs_lt_dst_sum_sourcenegative_body_steps_bound. fs_lt_dst_sum_sourcenegative_body_steps_bound + S fs_i_dst_sum_sourcenegative_body_steps = l) -> exists fs_a_dst_sum_sourcenegative_body_steps fs_r_dst_sum_sourcenegative_body_steps fs_s_dst_sum_sourcenegative_body_steps. ((((exists fs_h_dst_sum_sourcenegative_body_steps_summand. fs_h_dst_sum_sourcenegative_body_steps_summand + S (fs_a_dst_sum_sourcenegative_body_steps) = S ((S (fs_i_dst_sum_sourcenegative_body_steps)) * dst_negative_scale_sum_source)) /\ exists fs_q_dst_sum_sourcenegative_body_steps_summand. dst_negative_code_sum_source = fs_q_dst_sum_sourcenegative_body_steps_summand * S ((S (fs_i_dst_sum_sourcenegative_body_steps)) * dst_negative_scale_sum_source) + (fs_a_dst_sum_sourcenegative_body_steps))) /\ ((((exists fs_h_dst_sum_sourcenegative_body_steps_partial. fs_h_dst_sum_sourcenegative_body_steps_partial + S (fs_r_dst_sum_sourcenegative_body_steps) = S ((S (fs_i_dst_sum_sourcenegative_body_steps)) * fs_v_dst_sum_sourcenegative)) /\ exists fs_q_dst_sum_sourcenegative_body_steps_partial. fs_u_dst_sum_sourcenegative = fs_q_dst_sum_sourcenegative_body_steps_partial * S ((S (fs_i_dst_sum_sourcenegative_body_steps)) * fs_v_dst_sum_sourcenegative) + (fs_r_dst_sum_sourcenegative_body_steps))) /\ ((((exists fs_h_dst_sum_sourcenegative_body_steps_successor. fs_h_dst_sum_sourcenegative_body_steps_successor + S (fs_s_dst_sum_sourcenegative_body_steps) = S ((S (S fs_i_dst_sum_sourcenegative_body_steps)) * fs_v_dst_sum_sourcenegative)) /\ exists fs_q_dst_sum_sourcenegative_body_steps_successor. fs_u_dst_sum_sourcenegative = fs_q_dst_sum_sourcenegative_body_steps_successor * S ((S (S fs_i_dst_sum_sourcenegative_body_steps)) * fs_v_dst_sum_sourcenegative) + (fs_s_dst_sum_sourcenegative_body_steps))) /\ fs_s_dst_sum_sourcenegative_body_steps = fs_r_dst_sum_sourcenegative_body_steps + fs_a_dst_sum_sourcenegative_body_steps)))))) /\ (exists ge_balance_positive_sum_sourceresult ge_balance_negative_sum_sourceresult. (((((u) = 2 * (ge_balance_positive_sum_sourceresult) /\ (ge_balance_negative_sum_sourceresult) = 0) \/ exists ge_signed_half_sum_sourceresultdecode. (((u) = 2 * ge_signed_half_sum_sourceresultdecode + 1 /\ (ge_balance_positive_sum_sourceresult) = 0) /\ (ge_balance_negative_sum_sourceresult) = S ge_signed_half_sum_sourceresultdecode))) /\ ((dst_positive_sum_sum_source) + ge_balance_negative_sum_sourceresult = (dst_negative_sum_sum_source) + ge_balance_positive_sum_sourceresult))))))))) -> (exists dst_positive_code_sum_target dst_positive_scale_sum_target dst_negative_code_sum_target dst_negative_scale_sum_target dst_positive_sum_sum_target dst_negative_sum_sum_target. (((G) = (((((dst_positive_code_sum_target) + (dst_positive_scale_sum_target)) * S ((dst_positive_code_sum_target) + (dst_positive_scale_sum_target)) + ((dst_positive_scale_sum_target) + (dst_positive_scale_sum_target))) + (((dst_negative_code_sum_target) + (dst_negative_scale_sum_target)) * S ((dst_negative_code_sum_target) + (dst_negative_scale_sum_target)) + ((dst_negative_scale_sum_target) + (dst_negative_scale_sum_target)))) * S ((((dst_positive_code_sum_target) + (dst_positive_scale_sum_target)) * S ((dst_positive_code_sum_target) + (dst_positive_scale_sum_target)) + ((dst_positive_scale_sum_target) + (dst_positive_scale_sum_target))) + (((dst_negative_code_sum_target) + (dst_negative_scale_sum_target)) * S ((dst_negative_code_sum_target) + (dst_negative_scale_sum_target)) + ((dst_negative_scale_sum_target) + (dst_negative_scale_sum_target)))) + ((((dst_negative_code_sum_target) + (dst_negative_scale_sum_target)) * S ((dst_negative_code_sum_target) + (dst_negative_scale_sum_target)) + ((dst_negative_scale_sum_target) + (dst_negative_scale_sum_target))) + (((dst_negative_code_sum_target) + (dst_negative_scale_sum_target)) * S ((dst_negative_code_sum_target) + (dst_negative_scale_sum_target)) + ((dst_negative_scale_sum_target) + (dst_negative_scale_sum_target)))))) /\ (((exists fs_u_dst_sum_targetpositive fs_v_dst_sum_targetpositive. ((((exists fs_h_dst_sum_targetpositive_body_start. fs_h_dst_sum_targetpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_targetpositive)) /\ exists fs_q_dst_sum_targetpositive_body_start. fs_u_dst_sum_targetpositive = fs_q_dst_sum_targetpositive_body_start * S ((S (0)) * fs_v_dst_sum_targetpositive) + (0))) /\ ((((exists fs_h_dst_sum_targetpositive_body_terminal. fs_h_dst_sum_targetpositive_body_terminal + S (dst_positive_sum_sum_target) = S ((S (l)) * fs_v_dst_sum_targetpositive)) /\ exists fs_q_dst_sum_targetpositive_body_terminal. fs_u_dst_sum_targetpositive = fs_q_dst_sum_targetpositive_body_terminal * S ((S (l)) * fs_v_dst_sum_targetpositive) + (dst_positive_sum_sum_target))) /\ forall fs_i_dst_sum_targetpositive_body_steps. (exists fs_lt_dst_sum_targetpositive_body_steps_bound. fs_lt_dst_sum_targetpositive_body_steps_bound + S fs_i_dst_sum_targetpositive_body_steps = l) -> exists fs_a_dst_sum_targetpositive_body_steps fs_r_dst_sum_targetpositive_body_steps fs_s_dst_sum_targetpositive_body_steps. ((((exists fs_h_dst_sum_targetpositive_body_steps_summand. fs_h_dst_sum_targetpositive_body_steps_summand + S (fs_a_dst_sum_targetpositive_body_steps) = S ((S (fs_i_dst_sum_targetpositive_body_steps)) * dst_positive_scale_sum_target)) /\ exists fs_q_dst_sum_targetpositive_body_steps_summand. dst_positive_code_sum_target = fs_q_dst_sum_targetpositive_body_steps_summand * S ((S (fs_i_dst_sum_targetpositive_body_steps)) * dst_positive_scale_sum_target) + (fs_a_dst_sum_targetpositive_body_steps))) /\ ((((exists fs_h_dst_sum_targetpositive_body_steps_partial. fs_h_dst_sum_targetpositive_body_steps_partial + S (fs_r_dst_sum_targetpositive_body_steps) = S ((S (fs_i_dst_sum_targetpositive_body_steps)) * fs_v_dst_sum_targetpositive)) /\ exists fs_q_dst_sum_targetpositive_body_steps_partial. fs_u_dst_sum_targetpositive = fs_q_dst_sum_targetpositive_body_steps_partial * S ((S (fs_i_dst_sum_targetpositive_body_steps)) * fs_v_dst_sum_targetpositive) + (fs_r_dst_sum_targetpositive_body_steps))) /\ ((((exists fs_h_dst_sum_targetpositive_body_steps_successor. fs_h_dst_sum_targetpositive_body_steps_successor + S (fs_s_dst_sum_targetpositive_body_steps) = S ((S (S fs_i_dst_sum_targetpositive_body_steps)) * fs_v_dst_sum_targetpositive)) /\ exists fs_q_dst_sum_targetpositive_body_steps_successor. fs_u_dst_sum_targetpositive = fs_q_dst_sum_targetpositive_body_steps_successor * S ((S (S fs_i_dst_sum_targetpositive_body_steps)) * fs_v_dst_sum_targetpositive) + (fs_s_dst_sum_targetpositive_body_steps))) /\ fs_s_dst_sum_targetpositive_body_steps = fs_r_dst_sum_targetpositive_body_steps + fs_a_dst_sum_targetpositive_body_steps)))))) /\ (((exists fs_u_dst_sum_targetnegative fs_v_dst_sum_targetnegative. ((((exists fs_h_dst_sum_targetnegative_body_start. fs_h_dst_sum_targetnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_targetnegative)) /\ exists fs_q_dst_sum_targetnegative_body_start. fs_u_dst_sum_targetnegative = fs_q_dst_sum_targetnegative_body_start * S ((S (0)) * fs_v_dst_sum_targetnegative) + (0))) /\ ((((exists fs_h_dst_sum_targetnegative_body_terminal. fs_h_dst_sum_targetnegative_body_terminal + S (dst_negative_sum_sum_target) = S ((S (l)) * fs_v_dst_sum_targetnegative)) /\ exists fs_q_dst_sum_targetnegative_body_terminal. fs_u_dst_sum_targetnegative = fs_q_dst_sum_targetnegative_body_terminal * S ((S (l)) * fs_v_dst_sum_targetnegative) + (dst_negative_sum_sum_target))) /\ forall fs_i_dst_sum_targetnegative_body_steps. (exists fs_lt_dst_sum_targetnegative_body_steps_bound. fs_lt_dst_sum_targetnegative_body_steps_bound + S fs_i_dst_sum_targetnegative_body_steps = l) -> exists fs_a_dst_sum_targetnegative_body_steps fs_r_dst_sum_targetnegative_body_steps fs_s_dst_sum_targetnegative_body_steps. ((((exists fs_h_dst_sum_targetnegative_body_steps_summand. fs_h_dst_sum_targetnegative_body_steps_summand + S (fs_a_dst_sum_targetnegative_body_steps) = S ((S (fs_i_dst_sum_targetnegative_body_steps)) * dst_negative_scale_sum_target)) /\ exists fs_q_dst_sum_targetnegative_body_steps_summand. dst_negative_code_sum_target = fs_q_dst_sum_targetnegative_body_steps_summand * S ((S (fs_i_dst_sum_targetnegative_body_steps)) * dst_negative_scale_sum_target) + (fs_a_dst_sum_targetnegative_body_steps))) /\ ((((exists fs_h_dst_sum_targetnegative_body_steps_partial. fs_h_dst_sum_targetnegative_body_steps_partial + S (fs_r_dst_sum_targetnegative_body_steps) = S ((S (fs_i_dst_sum_targetnegative_body_steps)) * fs_v_dst_sum_targetnegative)) /\ exists fs_q_dst_sum_targetnegative_body_steps_partial. fs_u_dst_sum_targetnegative = fs_q_dst_sum_targetnegative_body_steps_partial * S ((S (fs_i_dst_sum_targetnegative_body_steps)) * fs_v_dst_sum_targetnegative) + (fs_r_dst_sum_targetnegative_body_steps))) /\ ((((exists fs_h_dst_sum_targetnegative_body_steps_successor. fs_h_dst_sum_targetnegative_body_steps_successor + S (fs_s_dst_sum_targetnegative_body_steps) = S ((S (S fs_i_dst_sum_targetnegative_body_steps)) * fs_v_dst_sum_targetnegative)) /\ exists fs_q_dst_sum_targetnegative_body_steps_successor. fs_u_dst_sum_targetnegative = fs_q_dst_sum_targetnegative_body_steps_successor * S ((S (S fs_i_dst_sum_targetnegative_body_steps)) * fs_v_dst_sum_targetnegative) + (fs_s_dst_sum_targetnegative_body_steps))) /\ fs_s_dst_sum_targetnegative_body_steps = fs_r_dst_sum_targetnegative_body_steps + fs_a_dst_sum_targetnegative_body_steps)))))) /\ (exists ge_balance_positive_sum_targetresult ge_balance_negative_sum_targetresult. (((((v) = 2 * (ge_balance_positive_sum_targetresult) /\ (ge_balance_negative_sum_targetresult) = 0) \/ exists ge_signed_half_sum_targetresultdecode. (((v) = 2 * ge_signed_half_sum_targetresultdecode + 1 /\ (ge_balance_positive_sum_targetresult) = 0) /\ (ge_balance_negative_sum_targetresult) = S ge_signed_half_sum_targetresultdecode))) /\ ((dst_positive_sum_sum_target) + ge_balance_negative_sum_targetresult = (dst_negative_sum_sum_target) + ge_balance_positive_sum_targetresult))))))))) -> u = v

Constructive proof overview

Generated structural guide

Original finite natural-sum permutation invariance preserves both actual component sums, hence their canonical signed result.

The unchanged tactic script uses 3 declared prerequisites and contains 96 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

96 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.

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

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

  1. L1
    intro F
  2. L2
    intro G
  3. L3
    intro pb
  4. L4
    intro pc
  5. L5
    intro nb
  6. L6
    intro nc
  7. L7
    intro qb
  8. L8
    intro qc
  9. L9
    intro mb
  10. L10
    intro mc
02Fix variables and assumptionsL11–20

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

  1. L11
    intro r
  2. L12
    intro s
  3. L13
    intro l
  4. L14
    intro u
  5. L15
    intro v
  6. L16
    intro hF
  7. L17
    intro hG
  8. L18
    intro hbound
  9. L19
    intro hinj
  10. L20
    intro hcomp
03Fix variables and assumptionsL21–22

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

  1. L21
    intro hu
  2. L22
    intro hv
04Separate the logical casesL23–23

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

  1. L23
    cases hcomp
05Establish hfirstL24–33

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

  1. L24
    have hfirst : ∃ p. ∃ n. Sum(pb,pc,l,p) ∧ (Sum(nb,nc,l,n) ∧ SignedBalance(u,p,n))Definitions: SignedBalanceSum
  2. L25
    specialize divisor_signed_sum_to_components (F)
  3. L26
    specialize divisor_signed_sum_to_components (pb)
  4. L27
    specialize divisor_signed_sum_to_components (pc)
  5. L28
    specialize divisor_signed_sum_to_components (nb)
  6. L29
    specialize divisor_signed_sum_to_components (nc)
  7. L30
    specialize divisor_signed_sum_to_components (l)
  8. L31
    specialize divisor_signed_sum_to_components (u)
  9. L32
    apply divisor_signed_sum_to_components
  10. L33
    exact hF
06Use earlier factsL34–34

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

  1. L34
    exact hu
07Separate the logical casesL35–38

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

  1. L35
    cases hfirst
  2. L36
    cases hfirst_witness
  3. L37
    cases hfirst_witness_witness
  4. L38
    cases hfirst_witness_witness_right
08Establish hsecondL39–48

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

  1. L39
    have hsecond : ∃ p. ∃ n. Sum(qb,qc,l,p) ∧ (Sum(mb,mc,l,n) ∧ SignedBalance(v,p,n))Definitions: SignedBalanceSum
  2. L40
    specialize divisor_signed_sum_to_components (G)
  3. L41
    specialize divisor_signed_sum_to_components (qb)
  4. L42
    specialize divisor_signed_sum_to_components (qc)
  5. L43
    specialize divisor_signed_sum_to_components (mb)
  6. L44
    specialize divisor_signed_sum_to_components (mc)
  7. L45
    specialize divisor_signed_sum_to_components (l)
  8. L46
    specialize divisor_signed_sum_to_components (v)
  9. L47
    apply divisor_signed_sum_to_components
  10. L48
    exact hG
09Use earlier factsL49–49

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

  1. L49
    exact hv
10Separate the logical casesL50–53

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

  1. L50
    cases hsecond
  2. L51
    cases hsecond_witness
  3. L52
    cases hsecond_witness_witness
  4. L53
    cases hsecond_witness_witness_right
11Establish hpL54–63

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

  1. L54
    have hp : x2 = x
  2. L55
    symm
  3. L56
    specialize beta_sum_permutation_invariant (l)
  4. L57
    specialize beta_sum_permutation_invariant (r)
  5. L58
    specialize beta_sum_permutation_invariant (s)
  6. L59
    specialize beta_sum_permutation_invariant (pb)
  7. L60
    specialize beta_sum_permutation_invariant (pc)
  8. L61
    specialize beta_sum_permutation_invariant (qb)
  9. L62
    specialize beta_sum_permutation_invariant (qc)
  10. L63
    specialize beta_sum_permutation_invariant (x)
12Use earlier factsL64–70

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

  1. L64
    specialize beta_sum_permutation_invariant (x2)
  2. L65
    apply beta_sum_permutation_invariant
  3. L66
    exact hbound
  4. L67
    exact hinj
  5. L68
    exact hcomp_left
  6. L69
    exact hfirst_witness_witness_left
  7. L70
    exact hsecond_witness_witness_left
13Establish hnL71–80

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

  1. L71
    have hn : x3 = x1
  2. L72
    symm
  3. L73
    specialize beta_sum_permutation_invariant (l)
  4. L74
    specialize beta_sum_permutation_invariant (r)
  5. L75
    specialize beta_sum_permutation_invariant (s)
  6. L76
    specialize beta_sum_permutation_invariant (nb)
  7. L77
    specialize beta_sum_permutation_invariant (nc)
  8. L78
    specialize beta_sum_permutation_invariant (mb)
  9. L79
    specialize beta_sum_permutation_invariant (mc)
  10. L80
    specialize beta_sum_permutation_invariant (x1)
14Use earlier factsL81–87

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

  1. L81
    specialize beta_sum_permutation_invariant (x3)
  2. L82
    apply beta_sum_permutation_invariant
  3. L83
    exact hbound
  4. L84
    exact hinj
  5. L85
    exact hcomp_right
  6. L86
    exact hfirst_witness_witness_right_left
  7. L87
    exact hsecond_witness_witness_right_left
15Calculate and transport equalitiesL88–89

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

  1. L88
    rewrite hp at hsecond_witness_witness_right_right
  2. L89
    rewrite hn at hsecond_witness_witness_right_right
16Use earlier factsL90–96

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

  1. L90
    specialize signed_balance_functional (x)
  2. L91
    specialize signed_balance_functional (x1)
  3. L92
    specialize signed_balance_functional (u)
  4. L93
    specialize signed_balance_functional (v)
  5. L94
    apply signed_balance_functional
  6. L95
    exact hfirst_witness_witness_right_right
  7. L96
    exact hsecond_witness_witness_right_right

Library-wide reading audit

Original exact command ledger · 96 lines
  1. 0001intro F
  2. 0002intro G
  3. 0003intro pb
  4. 0004intro pc
  5. 0005intro nb
  6. 0006intro nc
  7. 0007intro qb
  8. 0008intro qc
  9. 0009intro mb
  10. 0010intro mc
  11. 0011intro r
  12. 0012intro s
  13. 0013intro l
  14. 0014intro u
  15. 0015intro v
  16. 0016intro hF
  17. 0017intro hG
  18. 0018intro hbound
  19. 0019intro hinj
  20. 0020intro hcomp
  21. 0021intro hu
  22. 0022intro hv
  23. 0023cases hcomp
  24. 0024have hfirst : exists p n. ((exists fs_u_dst_sum_first_positive fs_v_dst_sum_first_positive. ((((exists fs_h_dst_sum_first_positive_body_start. fs_h_dst_sum_first_positive_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_first_positive)) /\ exists fs_q_dst_sum_first_positive_body_start. fs_u_dst_sum_first_positive = fs_q_dst_sum_first_positive_body_start * S ((S (0)) * fs_v_dst_sum_first_positive) + (0))) /\ ((((exists fs_h_dst_sum_first_positive_body_terminal. fs_h_dst_sum_first_positive_body_terminal + S (p) = S ((S (l)) * fs_v_dst_sum_first_positive)) /\ exists fs_q_dst_sum_first_positive_body_terminal. fs_u_dst_sum_first_positive = fs_q_dst_sum_first_positive_body_terminal * S ((S (l)) * fs_v_dst_sum_first_positive) + (p))) /\ forall fs_i_dst_sum_first_positive_body_steps. (exists fs_lt_dst_sum_first_positive_body_steps_bound. fs_lt_dst_sum_first_positive_body_steps_bound + S fs_i_dst_sum_first_positive_body_steps = l) -> exists fs_a_dst_sum_first_positive_body_steps fs_r_dst_sum_first_positive_body_steps fs_s_dst_sum_first_positive_body_steps. ((((exists fs_h_dst_sum_first_positive_body_steps_summand. fs_h_dst_sum_first_positive_body_steps_summand + S (fs_a_dst_sum_first_positive_body_steps) = S ((S (fs_i_dst_sum_first_positive_body_steps)) * pc)) /\ exists fs_q_dst_sum_first_positive_body_steps_summand. pb = fs_q_dst_sum_first_positive_body_steps_summand * S ((S (fs_i_dst_sum_first_positive_body_steps)) * pc) + (fs_a_dst_sum_first_positive_body_steps))) /\ ((((exists fs_h_dst_sum_first_positive_body_steps_partial. fs_h_dst_sum_first_positive_body_steps_partial + S (fs_r_dst_sum_first_positive_body_steps) = S ((S (fs_i_dst_sum_first_positive_body_steps)) * fs_v_dst_sum_first_positive)) /\ exists fs_q_dst_sum_first_positive_body_steps_partial. fs_u_dst_sum_first_positive = fs_q_dst_sum_first_positive_body_steps_partial * S ((S (fs_i_dst_sum_first_positive_body_steps)) * fs_v_dst_sum_first_positive) + (fs_r_dst_sum_first_positive_body_steps))) /\ ((((exists fs_h_dst_sum_first_positive_body_steps_successor. fs_h_dst_sum_first_positive_body_steps_successor + S (fs_s_dst_sum_first_positive_body_steps) = S ((S (S fs_i_dst_sum_first_positive_body_steps)) * fs_v_dst_sum_first_positive)) /\ exists fs_q_dst_sum_first_positive_body_steps_successor. fs_u_dst_sum_first_positive = fs_q_dst_sum_first_positive_body_steps_successor * S ((S (S fs_i_dst_sum_first_positive_body_steps)) * fs_v_dst_sum_first_positive) + (fs_s_dst_sum_first_positive_body_steps))) /\ fs_s_dst_sum_first_positive_body_steps = fs_r_dst_sum_first_positive_body_steps + fs_a_dst_sum_first_positive_body_steps)))))) /\ (((exists fs_u_dst_sum_first_negative fs_v_dst_sum_first_negative. ((((exists fs_h_dst_sum_first_negative_body_start. fs_h_dst_sum_first_negative_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_first_negative)) /\ exists fs_q_dst_sum_first_negative_body_start. fs_u_dst_sum_first_negative = fs_q_dst_sum_first_negative_body_start * S ((S (0)) * fs_v_dst_sum_first_negative) + (0))) /\ ((((exists fs_h_dst_sum_first_negative_body_terminal. fs_h_dst_sum_first_negative_body_terminal + S (n) = S ((S (l)) * fs_v_dst_sum_first_negative)) /\ exists fs_q_dst_sum_first_negative_body_terminal. fs_u_dst_sum_first_negative = fs_q_dst_sum_first_negative_body_terminal * S ((S (l)) * fs_v_dst_sum_first_negative) + (n))) /\ forall fs_i_dst_sum_first_negative_body_steps. (exists fs_lt_dst_sum_first_negative_body_steps_bound. fs_lt_dst_sum_first_negative_body_steps_bound + S fs_i_dst_sum_first_negative_body_steps = l) -> exists fs_a_dst_sum_first_negative_body_steps fs_r_dst_sum_first_negative_body_steps fs_s_dst_sum_first_negative_body_steps. ((((exists fs_h_dst_sum_first_negative_body_steps_summand. fs_h_dst_sum_first_negative_body_steps_summand + S (fs_a_dst_sum_first_negative_body_steps) = S ((S (fs_i_dst_sum_first_negative_body_steps)) * nc)) /\ exists fs_q_dst_sum_first_negative_body_steps_summand. nb = fs_q_dst_sum_first_negative_body_steps_summand * S ((S (fs_i_dst_sum_first_negative_body_steps)) * nc) + (fs_a_dst_sum_first_negative_body_steps))) /\ ((((exists fs_h_dst_sum_first_negative_body_steps_partial. fs_h_dst_sum_first_negative_body_steps_partial + S (fs_r_dst_sum_first_negative_body_steps) = S ((S (fs_i_dst_sum_first_negative_body_steps)) * fs_v_dst_sum_first_negative)) /\ exists fs_q_dst_sum_first_negative_body_steps_partial. fs_u_dst_sum_first_negative = fs_q_dst_sum_first_negative_body_steps_partial * S ((S (fs_i_dst_sum_first_negative_body_steps)) * fs_v_dst_sum_first_negative) + (fs_r_dst_sum_first_negative_body_steps))) /\ ((((exists fs_h_dst_sum_first_negative_body_steps_successor. fs_h_dst_sum_first_negative_body_steps_successor + S (fs_s_dst_sum_first_negative_body_steps) = S ((S (S fs_i_dst_sum_first_negative_body_steps)) * fs_v_dst_sum_first_negative)) /\ exists fs_q_dst_sum_first_negative_body_steps_successor. fs_u_dst_sum_first_negative = fs_q_dst_sum_first_negative_body_steps_successor * S ((S (S fs_i_dst_sum_first_negative_body_steps)) * fs_v_dst_sum_first_negative) + (fs_s_dst_sum_first_negative_body_steps))) /\ fs_s_dst_sum_first_negative_body_steps = fs_r_dst_sum_first_negative_body_steps + fs_a_dst_sum_first_negative_body_steps)))))) /\ (exists ge_balance_positive_sum_first_balance ge_balance_negative_sum_first_balance. (((((u) = 2 * (ge_balance_positive_sum_first_balance) /\ (ge_balance_negative_sum_first_balance) = 0) \/ exists ge_signed_half_sum_first_balancedecode. (((u) = 2 * ge_signed_half_sum_first_balancedecode + 1 /\ (ge_balance_positive_sum_first_balance) = 0) /\ (ge_balance_negative_sum_first_balance) = S ge_signed_half_sum_first_balancedecode))) /\ ((p) + ge_balance_negative_sum_first_balance = (n) + ge_balance_positive_sum_first_balance))))))
  25. 0025specialize divisor_signed_sum_to_components (F)
  26. 0026specialize divisor_signed_sum_to_components (pb)
  27. 0027specialize divisor_signed_sum_to_components (pc)
  28. 0028specialize divisor_signed_sum_to_components (nb)
  29. 0029specialize divisor_signed_sum_to_components (nc)
  30. 0030specialize divisor_signed_sum_to_components (l)
  31. 0031specialize divisor_signed_sum_to_components (u)
  32. 0032apply divisor_signed_sum_to_components
  33. 0033exact hF
  34. 0034exact hu
  35. 0035cases hfirst
  36. 0036cases hfirst_witness
  37. 0037cases hfirst_witness_witness
  38. 0038cases hfirst_witness_witness_right
  39. 0039have hsecond : exists p n. ((exists fs_u_dst_sum_second_positive fs_v_dst_sum_second_positive. ((((exists fs_h_dst_sum_second_positive_body_start. fs_h_dst_sum_second_positive_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_second_positive)) /\ exists fs_q_dst_sum_second_positive_body_start. fs_u_dst_sum_second_positive = fs_q_dst_sum_second_positive_body_start * S ((S (0)) * fs_v_dst_sum_second_positive) + (0))) /\ ((((exists fs_h_dst_sum_second_positive_body_terminal. fs_h_dst_sum_second_positive_body_terminal + S (p) = S ((S (l)) * fs_v_dst_sum_second_positive)) /\ exists fs_q_dst_sum_second_positive_body_terminal. fs_u_dst_sum_second_positive = fs_q_dst_sum_second_positive_body_terminal * S ((S (l)) * fs_v_dst_sum_second_positive) + (p))) /\ forall fs_i_dst_sum_second_positive_body_steps. (exists fs_lt_dst_sum_second_positive_body_steps_bound. fs_lt_dst_sum_second_positive_body_steps_bound + S fs_i_dst_sum_second_positive_body_steps = l) -> exists fs_a_dst_sum_second_positive_body_steps fs_r_dst_sum_second_positive_body_steps fs_s_dst_sum_second_positive_body_steps. ((((exists fs_h_dst_sum_second_positive_body_steps_summand. fs_h_dst_sum_second_positive_body_steps_summand + S (fs_a_dst_sum_second_positive_body_steps) = S ((S (fs_i_dst_sum_second_positive_body_steps)) * qc)) /\ exists fs_q_dst_sum_second_positive_body_steps_summand. qb = fs_q_dst_sum_second_positive_body_steps_summand * S ((S (fs_i_dst_sum_second_positive_body_steps)) * qc) + (fs_a_dst_sum_second_positive_body_steps))) /\ ((((exists fs_h_dst_sum_second_positive_body_steps_partial. fs_h_dst_sum_second_positive_body_steps_partial + S (fs_r_dst_sum_second_positive_body_steps) = S ((S (fs_i_dst_sum_second_positive_body_steps)) * fs_v_dst_sum_second_positive)) /\ exists fs_q_dst_sum_second_positive_body_steps_partial. fs_u_dst_sum_second_positive = fs_q_dst_sum_second_positive_body_steps_partial * S ((S (fs_i_dst_sum_second_positive_body_steps)) * fs_v_dst_sum_second_positive) + (fs_r_dst_sum_second_positive_body_steps))) /\ ((((exists fs_h_dst_sum_second_positive_body_steps_successor. fs_h_dst_sum_second_positive_body_steps_successor + S (fs_s_dst_sum_second_positive_body_steps) = S ((S (S fs_i_dst_sum_second_positive_body_steps)) * fs_v_dst_sum_second_positive)) /\ exists fs_q_dst_sum_second_positive_body_steps_successor. fs_u_dst_sum_second_positive = fs_q_dst_sum_second_positive_body_steps_successor * S ((S (S fs_i_dst_sum_second_positive_body_steps)) * fs_v_dst_sum_second_positive) + (fs_s_dst_sum_second_positive_body_steps))) /\ fs_s_dst_sum_second_positive_body_steps = fs_r_dst_sum_second_positive_body_steps + fs_a_dst_sum_second_positive_body_steps)))))) /\ (((exists fs_u_dst_sum_second_negative fs_v_dst_sum_second_negative. ((((exists fs_h_dst_sum_second_negative_body_start. fs_h_dst_sum_second_negative_body_start + S (0) = S ((S (0)) * fs_v_dst_sum_second_negative)) /\ exists fs_q_dst_sum_second_negative_body_start. fs_u_dst_sum_second_negative = fs_q_dst_sum_second_negative_body_start * S ((S (0)) * fs_v_dst_sum_second_negative) + (0))) /\ ((((exists fs_h_dst_sum_second_negative_body_terminal. fs_h_dst_sum_second_negative_body_terminal + S (n) = S ((S (l)) * fs_v_dst_sum_second_negative)) /\ exists fs_q_dst_sum_second_negative_body_terminal. fs_u_dst_sum_second_negative = fs_q_dst_sum_second_negative_body_terminal * S ((S (l)) * fs_v_dst_sum_second_negative) + (n))) /\ forall fs_i_dst_sum_second_negative_body_steps. (exists fs_lt_dst_sum_second_negative_body_steps_bound. fs_lt_dst_sum_second_negative_body_steps_bound + S fs_i_dst_sum_second_negative_body_steps = l) -> exists fs_a_dst_sum_second_negative_body_steps fs_r_dst_sum_second_negative_body_steps fs_s_dst_sum_second_negative_body_steps. ((((exists fs_h_dst_sum_second_negative_body_steps_summand. fs_h_dst_sum_second_negative_body_steps_summand + S (fs_a_dst_sum_second_negative_body_steps) = S ((S (fs_i_dst_sum_second_negative_body_steps)) * mc)) /\ exists fs_q_dst_sum_second_negative_body_steps_summand. mb = fs_q_dst_sum_second_negative_body_steps_summand * S ((S (fs_i_dst_sum_second_negative_body_steps)) * mc) + (fs_a_dst_sum_second_negative_body_steps))) /\ ((((exists fs_h_dst_sum_second_negative_body_steps_partial. fs_h_dst_sum_second_negative_body_steps_partial + S (fs_r_dst_sum_second_negative_body_steps) = S ((S (fs_i_dst_sum_second_negative_body_steps)) * fs_v_dst_sum_second_negative)) /\ exists fs_q_dst_sum_second_negative_body_steps_partial. fs_u_dst_sum_second_negative = fs_q_dst_sum_second_negative_body_steps_partial * S ((S (fs_i_dst_sum_second_negative_body_steps)) * fs_v_dst_sum_second_negative) + (fs_r_dst_sum_second_negative_body_steps))) /\ ((((exists fs_h_dst_sum_second_negative_body_steps_successor. fs_h_dst_sum_second_negative_body_steps_successor + S (fs_s_dst_sum_second_negative_body_steps) = S ((S (S fs_i_dst_sum_second_negative_body_steps)) * fs_v_dst_sum_second_negative)) /\ exists fs_q_dst_sum_second_negative_body_steps_successor. fs_u_dst_sum_second_negative = fs_q_dst_sum_second_negative_body_steps_successor * S ((S (S fs_i_dst_sum_second_negative_body_steps)) * fs_v_dst_sum_second_negative) + (fs_s_dst_sum_second_negative_body_steps))) /\ fs_s_dst_sum_second_negative_body_steps = fs_r_dst_sum_second_negative_body_steps + fs_a_dst_sum_second_negative_body_steps)))))) /\ (exists ge_balance_positive_sum_second_balance ge_balance_negative_sum_second_balance. (((((v) = 2 * (ge_balance_positive_sum_second_balance) /\ (ge_balance_negative_sum_second_balance) = 0) \/ exists ge_signed_half_sum_second_balancedecode. (((v) = 2 * ge_signed_half_sum_second_balancedecode + 1 /\ (ge_balance_positive_sum_second_balance) = 0) /\ (ge_balance_negative_sum_second_balance) = S ge_signed_half_sum_second_balancedecode))) /\ ((p) + ge_balance_negative_sum_second_balance = (n) + ge_balance_positive_sum_second_balance))))))
  40. 0040specialize divisor_signed_sum_to_components (G)
  41. 0041specialize divisor_signed_sum_to_components (qb)
  42. 0042specialize divisor_signed_sum_to_components (qc)
  43. 0043specialize divisor_signed_sum_to_components (mb)
  44. 0044specialize divisor_signed_sum_to_components (mc)
  45. 0045specialize divisor_signed_sum_to_components (l)
  46. 0046specialize divisor_signed_sum_to_components (v)
  47. 0047apply divisor_signed_sum_to_components
  48. 0048exact hG
  49. 0049exact hv
  50. 0050cases hsecond
  51. 0051cases hsecond_witness
  52. 0052cases hsecond_witness_witness
  53. 0053cases hsecond_witness_witness_right
  54. 0054have hp : x2 = x
  55. 0055symm
  56. 0056specialize beta_sum_permutation_invariant (l)
  57. 0057specialize beta_sum_permutation_invariant (r)
  58. 0058specialize beta_sum_permutation_invariant (s)
  59. 0059specialize beta_sum_permutation_invariant (pb)
  60. 0060specialize beta_sum_permutation_invariant (pc)
  61. 0061specialize beta_sum_permutation_invariant (qb)
  62. 0062specialize beta_sum_permutation_invariant (qc)
  63. 0063specialize beta_sum_permutation_invariant (x)
  64. 0064specialize beta_sum_permutation_invariant (x2)
  65. 0065apply beta_sum_permutation_invariant
  66. 0066exact hbound
  67. 0067exact hinj
  68. 0068exact hcomp_left
  69. 0069exact hfirst_witness_witness_left
  70. 0070exact hsecond_witness_witness_left
  71. 0071have hn : x3 = x1
  72. 0072symm
  73. 0073specialize beta_sum_permutation_invariant (l)
  74. 0074specialize beta_sum_permutation_invariant (r)
  75. 0075specialize beta_sum_permutation_invariant (s)
  76. 0076specialize beta_sum_permutation_invariant (nb)
  77. 0077specialize beta_sum_permutation_invariant (nc)
  78. 0078specialize beta_sum_permutation_invariant (mb)
  79. 0079specialize beta_sum_permutation_invariant (mc)
  80. 0080specialize beta_sum_permutation_invariant (x1)
  81. 0081specialize beta_sum_permutation_invariant (x3)
  82. 0082apply beta_sum_permutation_invariant
  83. 0083exact hbound
  84. 0084exact hinj
  85. 0085exact hcomp_right
  86. 0086exact hfirst_witness_witness_right_left
  87. 0087exact hsecond_witness_witness_right_left
  88. 0088rewrite hp at hsecond_witness_witness_right_right
  89. 0089rewrite hn at hsecond_witness_witness_right_right
  90. 0090specialize signed_balance_functional (x)
  91. 0091specialize signed_balance_functional (x1)
  92. 0092specialize signed_balance_functional (u)
  93. 0093specialize signed_balance_functional (v)
  94. 0094apply signed_balance_functional
  95. 0095exact hfirst_witness_witness_right_right
  96. 0096exact hsecond_witness_witness_right_right