MC0015

anti_invariant_signed_permutation_sum_zero

A genuine finite signed sum whose actual permutation pullback is pointwise its opposite is zero; ordinary characteristic-zero cancellation is proved, not assumed.

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 input n is positive. Signed code 2 denotes +1, so the actual sum is +1 at n=1 and zero for n>1. The positive-values result permits arbitrary F(0), which the divisor mask excludes. Prime-square multiples contribute zero. Full G007 inversion is established in its separate family.

Exact theorem in conservative defined notation

∀ F. ∀ G. ∀ r. ∀ s. ∀ l. ∀ a. ∀ b. BoundedPrefix(r,s,l)InjectivePrefix(r,s,l)ArithReindex(F,G,r,s,l)ArithNegate(F,G,l)SignedPrefixSum(F,l,a)SignedPrefixSum(G,l,b) → a = 0

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall F G r s l a b. (forall pfp_i_anti_bound. (exists pfp_gap_anti_boundindex. pfp_gap_anti_boundindex + S (pfp_i_anti_bound) = (l)) -> exists pfp_a_anti_bound. (((exists ff_h_pfp_anti_boundentry. ff_h_pfp_anti_boundentry + S (pfp_a_anti_bound) = S ((S (pfp_i_anti_bound)) * s)) /\ exists ff_q_pfp_anti_boundentry. r = ff_q_pfp_anti_boundentry * S ((S (pfp_i_anti_bound)) * s) + (pfp_a_anti_bound))) /\ (exists pfp_gap_anti_boundvalue. pfp_gap_anti_boundvalue + S (pfp_a_anti_bound) = (l))) -> (forall pfp_i_anti_injective pfp_j_anti_injective pfp_a_anti_injective. (exists pfp_gap_anti_injectivefirst. pfp_gap_anti_injectivefirst + S (pfp_i_anti_injective) = (l)) -> (exists pfp_gap_anti_injectivesecond. pfp_gap_anti_injectivesecond + S (pfp_j_anti_injective) = (l)) -> (((exists ff_h_pfp_anti_injectiveleft. ff_h_pfp_anti_injectiveleft + S (pfp_a_anti_injective) = S ((S (pfp_i_anti_injective)) * s)) /\ exists ff_q_pfp_anti_injectiveleft. r = ff_q_pfp_anti_injectiveleft * S ((S (pfp_i_anti_injective)) * s) + (pfp_a_anti_injective))) -> (((exists ff_h_pfp_anti_injectiveright. ff_h_pfp_anti_injectiveright + S (pfp_a_anti_injective) = S ((S (pfp_j_anti_injective)) * s)) /\ exists ff_q_pfp_anti_injectiveright. r = ff_q_pfp_anti_injectiveright * S ((S (pfp_j_anti_injective)) * s) + (pfp_a_anti_injective))) -> pfp_i_anti_injective = pfp_j_anti_injective) -> (forall dsr_index_anti_reindex dsr_image_anti_reindex dsr_value_anti_reindex. (exists pvs_gap_anti_reindexbound. pvs_gap_anti_reindexbound + S (dsr_index_anti_reindex) = (l)) -> (((exists ff_h_pvs_anti_reindexmap. ff_h_pvs_anti_reindexmap + S (dsr_image_anti_reindex) = S ((S (dsr_index_anti_reindex)) * s)) /\ exists ff_q_pvs_anti_reindexmap. r = ff_q_pvs_anti_reindexmap * S ((S (dsr_index_anti_reindex)) * s) + (dsr_image_anti_reindex))) -> (exists dst_positive_code_anti_reindexsource dst_positive_scale_anti_reindexsource dst_negative_code_anti_reindexsource dst_negative_scale_anti_reindexsource dst_positive_anti_reindexsource dst_negative_anti_reindexsource. (((F) = (((((dst_positive_code_anti_reindexsource) + (dst_positive_scale_anti_reindexsource)) * S ((dst_positive_code_anti_reindexsource) + (dst_positive_scale_anti_reindexsource)) + ((dst_positive_scale_anti_reindexsource) + (dst_positive_scale_anti_reindexsource))) + (((dst_negative_code_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)) * S ((dst_negative_code_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)) + ((dst_negative_scale_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)))) * S ((((dst_positive_code_anti_reindexsource) + (dst_positive_scale_anti_reindexsource)) * S ((dst_positive_code_anti_reindexsource) + (dst_positive_scale_anti_reindexsource)) + ((dst_positive_scale_anti_reindexsource) + (dst_positive_scale_anti_reindexsource))) + (((dst_negative_code_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)) * S ((dst_negative_code_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)) + ((dst_negative_scale_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)))) + ((((dst_negative_code_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)) * S ((dst_negative_code_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)) + ((dst_negative_scale_anti_reindexsource) + (dst_negative_scale_anti_reindexsource))) + (((dst_negative_code_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)) * S ((dst_negative_code_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)) + ((dst_negative_scale_anti_reindexsource) + (dst_negative_scale_anti_reindexsource)))))) /\ (((((exists ff_h_pvs_anti_reindexsourcepositive. ff_h_pvs_anti_reindexsourcepositive + S (dst_positive_anti_reindexsource) = S ((S (dsr_image_anti_reindex)) * dst_positive_scale_anti_reindexsource)) /\ exists ff_q_pvs_anti_reindexsourcepositive. dst_positive_code_anti_reindexsource = ff_q_pvs_anti_reindexsourcepositive * S ((S (dsr_image_anti_reindex)) * dst_positive_scale_anti_reindexsource) + (dst_positive_anti_reindexsource))) /\ (((((exists ff_h_pvs_anti_reindexsourcenegative. ff_h_pvs_anti_reindexsourcenegative + S (dst_negative_anti_reindexsource) = S ((S (dsr_image_anti_reindex)) * dst_negative_scale_anti_reindexsource)) /\ exists ff_q_pvs_anti_reindexsourcenegative. dst_negative_code_anti_reindexsource = ff_q_pvs_anti_reindexsourcenegative * S ((S (dsr_image_anti_reindex)) * dst_negative_scale_anti_reindexsource) + (dst_negative_anti_reindexsource))) /\ (exists ge_balance_positive_anti_reindexsourcevalue ge_balance_negative_anti_reindexsourcevalue. (((((dsr_value_anti_reindex) = 2 * (ge_balance_positive_anti_reindexsourcevalue) /\ (ge_balance_negative_anti_reindexsourcevalue) = 0) \/ exists ge_signed_half_anti_reindexsourcevaluedecode. (((dsr_value_anti_reindex) = 2 * ge_signed_half_anti_reindexsourcevaluedecode + 1 /\ (ge_balance_positive_anti_reindexsourcevalue) = 0) /\ (ge_balance_negative_anti_reindexsourcevalue) = S ge_signed_half_anti_reindexsourcevaluedecode))) /\ ((dst_positive_anti_reindexsource) + ge_balance_negative_anti_reindexsourcevalue = (dst_negative_anti_reindexsource) + ge_balance_positive_anti_reindexsourcevalue))))))))) -> (exists dst_positive_code_anti_reindextarget dst_positive_scale_anti_reindextarget dst_negative_code_anti_reindextarget dst_negative_scale_anti_reindextarget dst_positive_anti_reindextarget dst_negative_anti_reindextarget. (((G) = (((((dst_positive_code_anti_reindextarget) + (dst_positive_scale_anti_reindextarget)) * S ((dst_positive_code_anti_reindextarget) + (dst_positive_scale_anti_reindextarget)) + ((dst_positive_scale_anti_reindextarget) + (dst_positive_scale_anti_reindextarget))) + (((dst_negative_code_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)) * S ((dst_negative_code_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)) + ((dst_negative_scale_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)))) * S ((((dst_positive_code_anti_reindextarget) + (dst_positive_scale_anti_reindextarget)) * S ((dst_positive_code_anti_reindextarget) + (dst_positive_scale_anti_reindextarget)) + ((dst_positive_scale_anti_reindextarget) + (dst_positive_scale_anti_reindextarget))) + (((dst_negative_code_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)) * S ((dst_negative_code_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)) + ((dst_negative_scale_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)))) + ((((dst_negative_code_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)) * S ((dst_negative_code_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)) + ((dst_negative_scale_anti_reindextarget) + (dst_negative_scale_anti_reindextarget))) + (((dst_negative_code_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)) * S ((dst_negative_code_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)) + ((dst_negative_scale_anti_reindextarget) + (dst_negative_scale_anti_reindextarget)))))) /\ (((((exists ff_h_pvs_anti_reindextargetpositive. ff_h_pvs_anti_reindextargetpositive + S (dst_positive_anti_reindextarget) = S ((S (dsr_index_anti_reindex)) * dst_positive_scale_anti_reindextarget)) /\ exists ff_q_pvs_anti_reindextargetpositive. dst_positive_code_anti_reindextarget = ff_q_pvs_anti_reindextargetpositive * S ((S (dsr_index_anti_reindex)) * dst_positive_scale_anti_reindextarget) + (dst_positive_anti_reindextarget))) /\ (((((exists ff_h_pvs_anti_reindextargetnegative. ff_h_pvs_anti_reindextargetnegative + S (dst_negative_anti_reindextarget) = S ((S (dsr_index_anti_reindex)) * dst_negative_scale_anti_reindextarget)) /\ exists ff_q_pvs_anti_reindextargetnegative. dst_negative_code_anti_reindextarget = ff_q_pvs_anti_reindextargetnegative * S ((S (dsr_index_anti_reindex)) * dst_negative_scale_anti_reindextarget) + (dst_negative_anti_reindextarget))) /\ (exists ge_balance_positive_anti_reindextargetvalue ge_balance_negative_anti_reindextargetvalue. (((((dsr_value_anti_reindex) = 2 * (ge_balance_positive_anti_reindextargetvalue) /\ (ge_balance_negative_anti_reindextargetvalue) = 0) \/ exists ge_signed_half_anti_reindextargetvaluedecode. (((dsr_value_anti_reindex) = 2 * ge_signed_half_anti_reindextargetvaluedecode + 1 /\ (ge_balance_positive_anti_reindextargetvalue) = 0) /\ (ge_balance_negative_anti_reindextargetvalue) = S ge_signed_half_anti_reindextargetvaluedecode))) /\ ((dst_positive_anti_reindextarget) + ge_balance_negative_anti_reindextargetvalue = (dst_negative_anti_reindextarget) + ge_balance_positive_anti_reindextargetvalue)))))))))) -> (forall mdc_index_anti_opposite mdc_source_anti_opposite mdc_target_anti_opposite. (exists pvs_gap_anti_oppositebound. pvs_gap_anti_oppositebound + S (mdc_index_anti_opposite) = (l)) -> (exists dst_positive_code_anti_oppositefirst dst_positive_scale_anti_oppositefirst dst_negative_code_anti_oppositefirst dst_negative_scale_anti_oppositefirst dst_positive_anti_oppositefirst dst_negative_anti_oppositefirst. (((F) = (((((dst_positive_code_anti_oppositefirst) + (dst_positive_scale_anti_oppositefirst)) * S ((dst_positive_code_anti_oppositefirst) + (dst_positive_scale_anti_oppositefirst)) + ((dst_positive_scale_anti_oppositefirst) + (dst_positive_scale_anti_oppositefirst))) + (((dst_negative_code_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)) * S ((dst_negative_code_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)) + ((dst_negative_scale_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)))) * S ((((dst_positive_code_anti_oppositefirst) + (dst_positive_scale_anti_oppositefirst)) * S ((dst_positive_code_anti_oppositefirst) + (dst_positive_scale_anti_oppositefirst)) + ((dst_positive_scale_anti_oppositefirst) + (dst_positive_scale_anti_oppositefirst))) + (((dst_negative_code_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)) * S ((dst_negative_code_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)) + ((dst_negative_scale_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)))) + ((((dst_negative_code_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)) * S ((dst_negative_code_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)) + ((dst_negative_scale_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst))) + (((dst_negative_code_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)) * S ((dst_negative_code_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)) + ((dst_negative_scale_anti_oppositefirst) + (dst_negative_scale_anti_oppositefirst)))))) /\ (((((exists ff_h_pvs_anti_oppositefirstpositive. ff_h_pvs_anti_oppositefirstpositive + S (dst_positive_anti_oppositefirst) = S ((S (mdc_index_anti_opposite)) * dst_positive_scale_anti_oppositefirst)) /\ exists ff_q_pvs_anti_oppositefirstpositive. dst_positive_code_anti_oppositefirst = ff_q_pvs_anti_oppositefirstpositive * S ((S (mdc_index_anti_opposite)) * dst_positive_scale_anti_oppositefirst) + (dst_positive_anti_oppositefirst))) /\ (((((exists ff_h_pvs_anti_oppositefirstnegative. ff_h_pvs_anti_oppositefirstnegative + S (dst_negative_anti_oppositefirst) = S ((S (mdc_index_anti_opposite)) * dst_negative_scale_anti_oppositefirst)) /\ exists ff_q_pvs_anti_oppositefirstnegative. dst_negative_code_anti_oppositefirst = ff_q_pvs_anti_oppositefirstnegative * S ((S (mdc_index_anti_opposite)) * dst_negative_scale_anti_oppositefirst) + (dst_negative_anti_oppositefirst))) /\ (exists ge_balance_positive_anti_oppositefirstvalue ge_balance_negative_anti_oppositefirstvalue. (((((mdc_source_anti_opposite) = 2 * (ge_balance_positive_anti_oppositefirstvalue) /\ (ge_balance_negative_anti_oppositefirstvalue) = 0) \/ exists ge_signed_half_anti_oppositefirstvaluedecode. (((mdc_source_anti_opposite) = 2 * ge_signed_half_anti_oppositefirstvaluedecode + 1 /\ (ge_balance_positive_anti_oppositefirstvalue) = 0) /\ (ge_balance_negative_anti_oppositefirstvalue) = S ge_signed_half_anti_oppositefirstvaluedecode))) /\ ((dst_positive_anti_oppositefirst) + ge_balance_negative_anti_oppositefirstvalue = (dst_negative_anti_oppositefirst) + ge_balance_positive_anti_oppositefirstvalue))))))))) -> (exists dst_positive_code_anti_oppositesecond dst_positive_scale_anti_oppositesecond dst_negative_code_anti_oppositesecond dst_negative_scale_anti_oppositesecond dst_positive_anti_oppositesecond dst_negative_anti_oppositesecond. (((G) = (((((dst_positive_code_anti_oppositesecond) + (dst_positive_scale_anti_oppositesecond)) * S ((dst_positive_code_anti_oppositesecond) + (dst_positive_scale_anti_oppositesecond)) + ((dst_positive_scale_anti_oppositesecond) + (dst_positive_scale_anti_oppositesecond))) + (((dst_negative_code_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)) * S ((dst_negative_code_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)) + ((dst_negative_scale_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)))) * S ((((dst_positive_code_anti_oppositesecond) + (dst_positive_scale_anti_oppositesecond)) * S ((dst_positive_code_anti_oppositesecond) + (dst_positive_scale_anti_oppositesecond)) + ((dst_positive_scale_anti_oppositesecond) + (dst_positive_scale_anti_oppositesecond))) + (((dst_negative_code_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)) * S ((dst_negative_code_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)) + ((dst_negative_scale_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)))) + ((((dst_negative_code_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)) * S ((dst_negative_code_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)) + ((dst_negative_scale_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond))) + (((dst_negative_code_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)) * S ((dst_negative_code_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)) + ((dst_negative_scale_anti_oppositesecond) + (dst_negative_scale_anti_oppositesecond)))))) /\ (((((exists ff_h_pvs_anti_oppositesecondpositive. ff_h_pvs_anti_oppositesecondpositive + S (dst_positive_anti_oppositesecond) = S ((S (mdc_index_anti_opposite)) * dst_positive_scale_anti_oppositesecond)) /\ exists ff_q_pvs_anti_oppositesecondpositive. dst_positive_code_anti_oppositesecond = ff_q_pvs_anti_oppositesecondpositive * S ((S (mdc_index_anti_opposite)) * dst_positive_scale_anti_oppositesecond) + (dst_positive_anti_oppositesecond))) /\ (((((exists ff_h_pvs_anti_oppositesecondnegative. ff_h_pvs_anti_oppositesecondnegative + S (dst_negative_anti_oppositesecond) = S ((S (mdc_index_anti_opposite)) * dst_negative_scale_anti_oppositesecond)) /\ exists ff_q_pvs_anti_oppositesecondnegative. dst_negative_code_anti_oppositesecond = ff_q_pvs_anti_oppositesecondnegative * S ((S (mdc_index_anti_opposite)) * dst_negative_scale_anti_oppositesecond) + (dst_negative_anti_oppositesecond))) /\ (exists ge_balance_positive_anti_oppositesecondvalue ge_balance_negative_anti_oppositesecondvalue. (((((mdc_target_anti_opposite) = 2 * (ge_balance_positive_anti_oppositesecondvalue) /\ (ge_balance_negative_anti_oppositesecondvalue) = 0) \/ exists ge_signed_half_anti_oppositesecondvaluedecode. (((mdc_target_anti_opposite) = 2 * ge_signed_half_anti_oppositesecondvaluedecode + 1 /\ (ge_balance_positive_anti_oppositesecondvalue) = 0) /\ (ge_balance_negative_anti_oppositesecondvalue) = S ge_signed_half_anti_oppositesecondvaluedecode))) /\ ((dst_positive_anti_oppositesecond) + ge_balance_negative_anti_oppositesecondvalue = (dst_negative_anti_oppositesecond) + ge_balance_positive_anti_oppositesecondvalue))))))))) -> (exists mps_positive_anti_oppositenegation mps_negative_anti_oppositenegation. (((((mdc_source_anti_opposite) = 2 * (mps_positive_anti_oppositenegation) /\ (mps_negative_anti_oppositenegation) = 0) \/ exists ge_signed_half_anti_oppositenegationsource. (((mdc_source_anti_opposite) = 2 * ge_signed_half_anti_oppositenegationsource + 1 /\ (mps_positive_anti_oppositenegation) = 0) /\ (mps_negative_anti_oppositenegation) = S ge_signed_half_anti_oppositenegationsource))) /\ ((((mdc_target_anti_opposite) = 2 * (mps_negative_anti_oppositenegation) /\ (mps_positive_anti_oppositenegation) = 0) \/ exists ge_signed_half_anti_oppositenegationtarget. (((mdc_target_anti_opposite) = 2 * ge_signed_half_anti_oppositenegationtarget + 1 /\ (mps_negative_anti_oppositenegation) = 0) /\ (mps_positive_anti_oppositenegation) = S ge_signed_half_anti_oppositenegationtarget)))))) -> (exists dst_positive_code_anti_first_sum dst_positive_scale_anti_first_sum dst_negative_code_anti_first_sum dst_negative_scale_anti_first_sum dst_positive_sum_anti_first_sum dst_negative_sum_anti_first_sum. (((F) = (((((dst_positive_code_anti_first_sum) + (dst_positive_scale_anti_first_sum)) * S ((dst_positive_code_anti_first_sum) + (dst_positive_scale_anti_first_sum)) + ((dst_positive_scale_anti_first_sum) + (dst_positive_scale_anti_first_sum))) + (((dst_negative_code_anti_first_sum) + (dst_negative_scale_anti_first_sum)) * S ((dst_negative_code_anti_first_sum) + (dst_negative_scale_anti_first_sum)) + ((dst_negative_scale_anti_first_sum) + (dst_negative_scale_anti_first_sum)))) * S ((((dst_positive_code_anti_first_sum) + (dst_positive_scale_anti_first_sum)) * S ((dst_positive_code_anti_first_sum) + (dst_positive_scale_anti_first_sum)) + ((dst_positive_scale_anti_first_sum) + (dst_positive_scale_anti_first_sum))) + (((dst_negative_code_anti_first_sum) + (dst_negative_scale_anti_first_sum)) * S ((dst_negative_code_anti_first_sum) + (dst_negative_scale_anti_first_sum)) + ((dst_negative_scale_anti_first_sum) + (dst_negative_scale_anti_first_sum)))) + ((((dst_negative_code_anti_first_sum) + (dst_negative_scale_anti_first_sum)) * S ((dst_negative_code_anti_first_sum) + (dst_negative_scale_anti_first_sum)) + ((dst_negative_scale_anti_first_sum) + (dst_negative_scale_anti_first_sum))) + (((dst_negative_code_anti_first_sum) + (dst_negative_scale_anti_first_sum)) * S ((dst_negative_code_anti_first_sum) + (dst_negative_scale_anti_first_sum)) + ((dst_negative_scale_anti_first_sum) + (dst_negative_scale_anti_first_sum)))))) /\ (((exists fs_u_dst_anti_first_sumpositive fs_v_dst_anti_first_sumpositive. ((((exists fs_h_dst_anti_first_sumpositive_body_start. fs_h_dst_anti_first_sumpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_anti_first_sumpositive)) /\ exists fs_q_dst_anti_first_sumpositive_body_start. fs_u_dst_anti_first_sumpositive = fs_q_dst_anti_first_sumpositive_body_start * S ((S (0)) * fs_v_dst_anti_first_sumpositive) + (0))) /\ ((((exists fs_h_dst_anti_first_sumpositive_body_terminal. fs_h_dst_anti_first_sumpositive_body_terminal + S (dst_positive_sum_anti_first_sum) = S ((S (l)) * fs_v_dst_anti_first_sumpositive)) /\ exists fs_q_dst_anti_first_sumpositive_body_terminal. fs_u_dst_anti_first_sumpositive = fs_q_dst_anti_first_sumpositive_body_terminal * S ((S (l)) * fs_v_dst_anti_first_sumpositive) + (dst_positive_sum_anti_first_sum))) /\ forall fs_i_dst_anti_first_sumpositive_body_steps. (exists fs_lt_dst_anti_first_sumpositive_body_steps_bound. fs_lt_dst_anti_first_sumpositive_body_steps_bound + S fs_i_dst_anti_first_sumpositive_body_steps = l) -> exists fs_a_dst_anti_first_sumpositive_body_steps fs_r_dst_anti_first_sumpositive_body_steps fs_s_dst_anti_first_sumpositive_body_steps. ((((exists fs_h_dst_anti_first_sumpositive_body_steps_summand. fs_h_dst_anti_first_sumpositive_body_steps_summand + S (fs_a_dst_anti_first_sumpositive_body_steps) = S ((S (fs_i_dst_anti_first_sumpositive_body_steps)) * dst_positive_scale_anti_first_sum)) /\ exists fs_q_dst_anti_first_sumpositive_body_steps_summand. dst_positive_code_anti_first_sum = fs_q_dst_anti_first_sumpositive_body_steps_summand * S ((S (fs_i_dst_anti_first_sumpositive_body_steps)) * dst_positive_scale_anti_first_sum) + (fs_a_dst_anti_first_sumpositive_body_steps))) /\ ((((exists fs_h_dst_anti_first_sumpositive_body_steps_partial. fs_h_dst_anti_first_sumpositive_body_steps_partial + S (fs_r_dst_anti_first_sumpositive_body_steps) = S ((S (fs_i_dst_anti_first_sumpositive_body_steps)) * fs_v_dst_anti_first_sumpositive)) /\ exists fs_q_dst_anti_first_sumpositive_body_steps_partial. fs_u_dst_anti_first_sumpositive = fs_q_dst_anti_first_sumpositive_body_steps_partial * S ((S (fs_i_dst_anti_first_sumpositive_body_steps)) * fs_v_dst_anti_first_sumpositive) + (fs_r_dst_anti_first_sumpositive_body_steps))) /\ ((((exists fs_h_dst_anti_first_sumpositive_body_steps_successor. fs_h_dst_anti_first_sumpositive_body_steps_successor + S (fs_s_dst_anti_first_sumpositive_body_steps) = S ((S (S fs_i_dst_anti_first_sumpositive_body_steps)) * fs_v_dst_anti_first_sumpositive)) /\ exists fs_q_dst_anti_first_sumpositive_body_steps_successor. fs_u_dst_anti_first_sumpositive = fs_q_dst_anti_first_sumpositive_body_steps_successor * S ((S (S fs_i_dst_anti_first_sumpositive_body_steps)) * fs_v_dst_anti_first_sumpositive) + (fs_s_dst_anti_first_sumpositive_body_steps))) /\ fs_s_dst_anti_first_sumpositive_body_steps = fs_r_dst_anti_first_sumpositive_body_steps + fs_a_dst_anti_first_sumpositive_body_steps)))))) /\ (((exists fs_u_dst_anti_first_sumnegative fs_v_dst_anti_first_sumnegative. ((((exists fs_h_dst_anti_first_sumnegative_body_start. fs_h_dst_anti_first_sumnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_anti_first_sumnegative)) /\ exists fs_q_dst_anti_first_sumnegative_body_start. fs_u_dst_anti_first_sumnegative = fs_q_dst_anti_first_sumnegative_body_start * S ((S (0)) * fs_v_dst_anti_first_sumnegative) + (0))) /\ ((((exists fs_h_dst_anti_first_sumnegative_body_terminal. fs_h_dst_anti_first_sumnegative_body_terminal + S (dst_negative_sum_anti_first_sum) = S ((S (l)) * fs_v_dst_anti_first_sumnegative)) /\ exists fs_q_dst_anti_first_sumnegative_body_terminal. fs_u_dst_anti_first_sumnegative = fs_q_dst_anti_first_sumnegative_body_terminal * S ((S (l)) * fs_v_dst_anti_first_sumnegative) + (dst_negative_sum_anti_first_sum))) /\ forall fs_i_dst_anti_first_sumnegative_body_steps. (exists fs_lt_dst_anti_first_sumnegative_body_steps_bound. fs_lt_dst_anti_first_sumnegative_body_steps_bound + S fs_i_dst_anti_first_sumnegative_body_steps = l) -> exists fs_a_dst_anti_first_sumnegative_body_steps fs_r_dst_anti_first_sumnegative_body_steps fs_s_dst_anti_first_sumnegative_body_steps. ((((exists fs_h_dst_anti_first_sumnegative_body_steps_summand. fs_h_dst_anti_first_sumnegative_body_steps_summand + S (fs_a_dst_anti_first_sumnegative_body_steps) = S ((S (fs_i_dst_anti_first_sumnegative_body_steps)) * dst_negative_scale_anti_first_sum)) /\ exists fs_q_dst_anti_first_sumnegative_body_steps_summand. dst_negative_code_anti_first_sum = fs_q_dst_anti_first_sumnegative_body_steps_summand * S ((S (fs_i_dst_anti_first_sumnegative_body_steps)) * dst_negative_scale_anti_first_sum) + (fs_a_dst_anti_first_sumnegative_body_steps))) /\ ((((exists fs_h_dst_anti_first_sumnegative_body_steps_partial. fs_h_dst_anti_first_sumnegative_body_steps_partial + S (fs_r_dst_anti_first_sumnegative_body_steps) = S ((S (fs_i_dst_anti_first_sumnegative_body_steps)) * fs_v_dst_anti_first_sumnegative)) /\ exists fs_q_dst_anti_first_sumnegative_body_steps_partial. fs_u_dst_anti_first_sumnegative = fs_q_dst_anti_first_sumnegative_body_steps_partial * S ((S (fs_i_dst_anti_first_sumnegative_body_steps)) * fs_v_dst_anti_first_sumnegative) + (fs_r_dst_anti_first_sumnegative_body_steps))) /\ ((((exists fs_h_dst_anti_first_sumnegative_body_steps_successor. fs_h_dst_anti_first_sumnegative_body_steps_successor + S (fs_s_dst_anti_first_sumnegative_body_steps) = S ((S (S fs_i_dst_anti_first_sumnegative_body_steps)) * fs_v_dst_anti_first_sumnegative)) /\ exists fs_q_dst_anti_first_sumnegative_body_steps_successor. fs_u_dst_anti_first_sumnegative = fs_q_dst_anti_first_sumnegative_body_steps_successor * S ((S (S fs_i_dst_anti_first_sumnegative_body_steps)) * fs_v_dst_anti_first_sumnegative) + (fs_s_dst_anti_first_sumnegative_body_steps))) /\ fs_s_dst_anti_first_sumnegative_body_steps = fs_r_dst_anti_first_sumnegative_body_steps + fs_a_dst_anti_first_sumnegative_body_steps)))))) /\ (exists ge_balance_positive_anti_first_sumresult ge_balance_negative_anti_first_sumresult. (((((a) = 2 * (ge_balance_positive_anti_first_sumresult) /\ (ge_balance_negative_anti_first_sumresult) = 0) \/ exists ge_signed_half_anti_first_sumresultdecode. (((a) = 2 * ge_signed_half_anti_first_sumresultdecode + 1 /\ (ge_balance_positive_anti_first_sumresult) = 0) /\ (ge_balance_negative_anti_first_sumresult) = S ge_signed_half_anti_first_sumresultdecode))) /\ ((dst_positive_sum_anti_first_sum) + ge_balance_negative_anti_first_sumresult = (dst_negative_sum_anti_first_sum) + ge_balance_positive_anti_first_sumresult))))))))) -> (exists dst_positive_code_anti_second_sum dst_positive_scale_anti_second_sum dst_negative_code_anti_second_sum dst_negative_scale_anti_second_sum dst_positive_sum_anti_second_sum dst_negative_sum_anti_second_sum. (((G) = (((((dst_positive_code_anti_second_sum) + (dst_positive_scale_anti_second_sum)) * S ((dst_positive_code_anti_second_sum) + (dst_positive_scale_anti_second_sum)) + ((dst_positive_scale_anti_second_sum) + (dst_positive_scale_anti_second_sum))) + (((dst_negative_code_anti_second_sum) + (dst_negative_scale_anti_second_sum)) * S ((dst_negative_code_anti_second_sum) + (dst_negative_scale_anti_second_sum)) + ((dst_negative_scale_anti_second_sum) + (dst_negative_scale_anti_second_sum)))) * S ((((dst_positive_code_anti_second_sum) + (dst_positive_scale_anti_second_sum)) * S ((dst_positive_code_anti_second_sum) + (dst_positive_scale_anti_second_sum)) + ((dst_positive_scale_anti_second_sum) + (dst_positive_scale_anti_second_sum))) + (((dst_negative_code_anti_second_sum) + (dst_negative_scale_anti_second_sum)) * S ((dst_negative_code_anti_second_sum) + (dst_negative_scale_anti_second_sum)) + ((dst_negative_scale_anti_second_sum) + (dst_negative_scale_anti_second_sum)))) + ((((dst_negative_code_anti_second_sum) + (dst_negative_scale_anti_second_sum)) * S ((dst_negative_code_anti_second_sum) + (dst_negative_scale_anti_second_sum)) + ((dst_negative_scale_anti_second_sum) + (dst_negative_scale_anti_second_sum))) + (((dst_negative_code_anti_second_sum) + (dst_negative_scale_anti_second_sum)) * S ((dst_negative_code_anti_second_sum) + (dst_negative_scale_anti_second_sum)) + ((dst_negative_scale_anti_second_sum) + (dst_negative_scale_anti_second_sum)))))) /\ (((exists fs_u_dst_anti_second_sumpositive fs_v_dst_anti_second_sumpositive. ((((exists fs_h_dst_anti_second_sumpositive_body_start. fs_h_dst_anti_second_sumpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_anti_second_sumpositive)) /\ exists fs_q_dst_anti_second_sumpositive_body_start. fs_u_dst_anti_second_sumpositive = fs_q_dst_anti_second_sumpositive_body_start * S ((S (0)) * fs_v_dst_anti_second_sumpositive) + (0))) /\ ((((exists fs_h_dst_anti_second_sumpositive_body_terminal. fs_h_dst_anti_second_sumpositive_body_terminal + S (dst_positive_sum_anti_second_sum) = S ((S (l)) * fs_v_dst_anti_second_sumpositive)) /\ exists fs_q_dst_anti_second_sumpositive_body_terminal. fs_u_dst_anti_second_sumpositive = fs_q_dst_anti_second_sumpositive_body_terminal * S ((S (l)) * fs_v_dst_anti_second_sumpositive) + (dst_positive_sum_anti_second_sum))) /\ forall fs_i_dst_anti_second_sumpositive_body_steps. (exists fs_lt_dst_anti_second_sumpositive_body_steps_bound. fs_lt_dst_anti_second_sumpositive_body_steps_bound + S fs_i_dst_anti_second_sumpositive_body_steps = l) -> exists fs_a_dst_anti_second_sumpositive_body_steps fs_r_dst_anti_second_sumpositive_body_steps fs_s_dst_anti_second_sumpositive_body_steps. ((((exists fs_h_dst_anti_second_sumpositive_body_steps_summand. fs_h_dst_anti_second_sumpositive_body_steps_summand + S (fs_a_dst_anti_second_sumpositive_body_steps) = S ((S (fs_i_dst_anti_second_sumpositive_body_steps)) * dst_positive_scale_anti_second_sum)) /\ exists fs_q_dst_anti_second_sumpositive_body_steps_summand. dst_positive_code_anti_second_sum = fs_q_dst_anti_second_sumpositive_body_steps_summand * S ((S (fs_i_dst_anti_second_sumpositive_body_steps)) * dst_positive_scale_anti_second_sum) + (fs_a_dst_anti_second_sumpositive_body_steps))) /\ ((((exists fs_h_dst_anti_second_sumpositive_body_steps_partial. fs_h_dst_anti_second_sumpositive_body_steps_partial + S (fs_r_dst_anti_second_sumpositive_body_steps) = S ((S (fs_i_dst_anti_second_sumpositive_body_steps)) * fs_v_dst_anti_second_sumpositive)) /\ exists fs_q_dst_anti_second_sumpositive_body_steps_partial. fs_u_dst_anti_second_sumpositive = fs_q_dst_anti_second_sumpositive_body_steps_partial * S ((S (fs_i_dst_anti_second_sumpositive_body_steps)) * fs_v_dst_anti_second_sumpositive) + (fs_r_dst_anti_second_sumpositive_body_steps))) /\ ((((exists fs_h_dst_anti_second_sumpositive_body_steps_successor. fs_h_dst_anti_second_sumpositive_body_steps_successor + S (fs_s_dst_anti_second_sumpositive_body_steps) = S ((S (S fs_i_dst_anti_second_sumpositive_body_steps)) * fs_v_dst_anti_second_sumpositive)) /\ exists fs_q_dst_anti_second_sumpositive_body_steps_successor. fs_u_dst_anti_second_sumpositive = fs_q_dst_anti_second_sumpositive_body_steps_successor * S ((S (S fs_i_dst_anti_second_sumpositive_body_steps)) * fs_v_dst_anti_second_sumpositive) + (fs_s_dst_anti_second_sumpositive_body_steps))) /\ fs_s_dst_anti_second_sumpositive_body_steps = fs_r_dst_anti_second_sumpositive_body_steps + fs_a_dst_anti_second_sumpositive_body_steps)))))) /\ (((exists fs_u_dst_anti_second_sumnegative fs_v_dst_anti_second_sumnegative. ((((exists fs_h_dst_anti_second_sumnegative_body_start. fs_h_dst_anti_second_sumnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_anti_second_sumnegative)) /\ exists fs_q_dst_anti_second_sumnegative_body_start. fs_u_dst_anti_second_sumnegative = fs_q_dst_anti_second_sumnegative_body_start * S ((S (0)) * fs_v_dst_anti_second_sumnegative) + (0))) /\ ((((exists fs_h_dst_anti_second_sumnegative_body_terminal. fs_h_dst_anti_second_sumnegative_body_terminal + S (dst_negative_sum_anti_second_sum) = S ((S (l)) * fs_v_dst_anti_second_sumnegative)) /\ exists fs_q_dst_anti_second_sumnegative_body_terminal. fs_u_dst_anti_second_sumnegative = fs_q_dst_anti_second_sumnegative_body_terminal * S ((S (l)) * fs_v_dst_anti_second_sumnegative) + (dst_negative_sum_anti_second_sum))) /\ forall fs_i_dst_anti_second_sumnegative_body_steps. (exists fs_lt_dst_anti_second_sumnegative_body_steps_bound. fs_lt_dst_anti_second_sumnegative_body_steps_bound + S fs_i_dst_anti_second_sumnegative_body_steps = l) -> exists fs_a_dst_anti_second_sumnegative_body_steps fs_r_dst_anti_second_sumnegative_body_steps fs_s_dst_anti_second_sumnegative_body_steps. ((((exists fs_h_dst_anti_second_sumnegative_body_steps_summand. fs_h_dst_anti_second_sumnegative_body_steps_summand + S (fs_a_dst_anti_second_sumnegative_body_steps) = S ((S (fs_i_dst_anti_second_sumnegative_body_steps)) * dst_negative_scale_anti_second_sum)) /\ exists fs_q_dst_anti_second_sumnegative_body_steps_summand. dst_negative_code_anti_second_sum = fs_q_dst_anti_second_sumnegative_body_steps_summand * S ((S (fs_i_dst_anti_second_sumnegative_body_steps)) * dst_negative_scale_anti_second_sum) + (fs_a_dst_anti_second_sumnegative_body_steps))) /\ ((((exists fs_h_dst_anti_second_sumnegative_body_steps_partial. fs_h_dst_anti_second_sumnegative_body_steps_partial + S (fs_r_dst_anti_second_sumnegative_body_steps) = S ((S (fs_i_dst_anti_second_sumnegative_body_steps)) * fs_v_dst_anti_second_sumnegative)) /\ exists fs_q_dst_anti_second_sumnegative_body_steps_partial. fs_u_dst_anti_second_sumnegative = fs_q_dst_anti_second_sumnegative_body_steps_partial * S ((S (fs_i_dst_anti_second_sumnegative_body_steps)) * fs_v_dst_anti_second_sumnegative) + (fs_r_dst_anti_second_sumnegative_body_steps))) /\ ((((exists fs_h_dst_anti_second_sumnegative_body_steps_successor. fs_h_dst_anti_second_sumnegative_body_steps_successor + S (fs_s_dst_anti_second_sumnegative_body_steps) = S ((S (S fs_i_dst_anti_second_sumnegative_body_steps)) * fs_v_dst_anti_second_sumnegative)) /\ exists fs_q_dst_anti_second_sumnegative_body_steps_successor. fs_u_dst_anti_second_sumnegative = fs_q_dst_anti_second_sumnegative_body_steps_successor * S ((S (S fs_i_dst_anti_second_sumnegative_body_steps)) * fs_v_dst_anti_second_sumnegative) + (fs_s_dst_anti_second_sumnegative_body_steps))) /\ fs_s_dst_anti_second_sumnegative_body_steps = fs_r_dst_anti_second_sumnegative_body_steps + fs_a_dst_anti_second_sumnegative_body_steps)))))) /\ (exists ge_balance_positive_anti_second_sumresult ge_balance_negative_anti_second_sumresult. (((((b) = 2 * (ge_balance_positive_anti_second_sumresult) /\ (ge_balance_negative_anti_second_sumresult) = 0) \/ exists ge_signed_half_anti_second_sumresultdecode. (((b) = 2 * ge_signed_half_anti_second_sumresultdecode + 1 /\ (ge_balance_positive_anti_second_sumresult) = 0) /\ (ge_balance_negative_anti_second_sumresult) = S ge_signed_half_anti_second_sumresultdecode))) /\ ((dst_positive_sum_anti_second_sum) + ge_balance_negative_anti_second_sumresult = (dst_negative_sum_anti_second_sum) + ge_balance_positive_anti_second_sumresult))))))))) -> a=0

Complete tactic proof in conservative notation

All 43 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

43 script commands · 7 reading checkpoints · 2 local claims

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

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

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

  1. L1
    intro F
  2. L2
    intro G
  3. L3
    intro r
  4. L4
    intro s
  5. L5
    intro l
  6. L6
    intro a
  7. L7
    intro b
  8. L8
    intro hbound
  9. L9
    intro hinj
  10. L10
    intro hreindex
02Fix variables and assumptionsL11–13

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

  1. L11
    intro hnegate
  2. L12
    intro hF
  3. L13
    intro hG
03Establish heqL14–23

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

  1. L14
    have heq : b=a
  2. L15
    symm
  3. L16
    specialize divisor_signed_sum_permutation_invariant (F)
  4. L17
    specialize divisor_signed_sum_permutation_invariant (G)
  5. L18
    specialize divisor_signed_sum_permutation_invariant (r)
  6. L19
    specialize divisor_signed_sum_permutation_invariant (s)
  7. L20
    specialize divisor_signed_sum_permutation_invariant (l)
  8. L21
    specialize divisor_signed_sum_permutation_invariant (a)
  9. L22
    specialize divisor_signed_sum_permutation_invariant (b)
  10. L23
    apply divisor_signed_sum_permutation_invariant
04Use earlier factsL24–28

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

  1. L24
    exact hbound
  2. L25
    exact hinj
  3. L26
    exact hreindex
  4. L27
    exact hF
  5. L28
    exact hG
05Establish hnL29–38

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

  1. L29
  2. L30
    specialize signed_prefix_sum_pointwise_negate (F)
  3. L31
    specialize signed_prefix_sum_pointwise_negate (G)
  4. L32
    specialize signed_prefix_sum_pointwise_negate (l)
  5. L33
    specialize signed_prefix_sum_pointwise_negate (a)
  6. L34
    specialize signed_prefix_sum_pointwise_negate (b)
  7. L35
    apply signed_prefix_sum_pointwise_negate
  8. L36
    exact hnegate
  9. L37
    exact hF
  10. L38
    exact hG
06Calculate and transport equalitiesL39–40

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

  1. L39
    rewrite heq at hn
  2. L40
    rewrite heq at hn
07Use earlier factsL41–43

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

  1. L41
    specialize divisor_signed_negate_fixed_zero (a)
  2. L42
    apply divisor_signed_negate_fixed_zero
  3. L43
    exact hn

Library-wide reading audit

Original defined command ledger · 43 lines
  1. 0001intro F
  2. 0002intro G
  3. 0003intro r
  4. 0004intro s
  5. 0005intro l
  6. 0006intro a
  7. 0007intro b
  8. 0008intro hbound
  9. 0009intro hinj
  10. 0010intro hreindex
  11. 0011intro hnegate
  12. 0012intro hF
  13. 0013intro hG
  14. 0014have heq : b=a
  15. 0015symm
  16. 0016specialize divisor_signed_sum_permutation_invariant (F)
  17. 0017specialize divisor_signed_sum_permutation_invariant (G)
  18. 0018specialize divisor_signed_sum_permutation_invariant (r)
  19. 0019specialize divisor_signed_sum_permutation_invariant (s)
  20. 0020specialize divisor_signed_sum_permutation_invariant (l)
  21. 0021specialize divisor_signed_sum_permutation_invariant (a)
  22. 0022specialize divisor_signed_sum_permutation_invariant (b)
  23. 0023apply divisor_signed_sum_permutation_invariant
  24. 0024exact hbound
  25. 0025exact hinj
  26. 0026exact hreindex
  27. 0027exact hF
  28. 0028exact hG
  29. 0029have hn : SignedNegate(a,b)
  30. 0030specialize signed_prefix_sum_pointwise_negate (F)
  31. 0031specialize signed_prefix_sum_pointwise_negate (G)
  32. 0032specialize signed_prefix_sum_pointwise_negate (l)
  33. 0033specialize signed_prefix_sum_pointwise_negate (a)
  34. 0034specialize signed_prefix_sum_pointwise_negate (b)
  35. 0035apply signed_prefix_sum_pointwise_negate
  36. 0036exact hnegate
  37. 0037exact hF
  38. 0038exact hG
  39. 0039rewrite heq at hn
  40. 0040rewrite heq at hn
  41. 0041specialize divisor_signed_negate_fixed_zero (a)
  42. 0042apply divisor_signed_negate_fixed_zero
  43. 0043exact hn