DV0007

arithmetic_signed_sum_append_transport

A recoded prefix has the same actual signed sum; adding its prescribed next entry constructs the extended fold.

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.

A genuine divisor mask has S n entries, indexed zero through n, and forces its zeroth entry to zero regardless of F(0). Möbius values remain positive-domain only. This family constructs divisor sums and Möbius tables; cancellation and the full G007 endpoint are separately proved later in the same release.

Exact theorem in conservative defined notation

∀ F. ∀ G. ∀ l. ∀ a. ∀ b. ∀ c. ArithTable(l,G)ArithTableEqual(F,G,l)SignedPrefixSum(F,l,a)ArithAt(G,l,b) → (∃ x. ∃ y. ∃ z. ∃ n. ∃ m. ∃ k. SignedDecode(a,x,y) ∧ (SignedDecode(b,z,n) ∧ (SignedDecode(c,m,k) ∧ x + z + k = y + n + m))) → SignedPrefixSum(G,S l,c)

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

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall F G l a b c. (exists dst_positive_code_append_sum_valid dst_positive_scale_append_sum_valid dst_negative_code_append_sum_valid dst_negative_scale_append_sum_valid. (((G) = (((((dst_positive_code_append_sum_valid) + (dst_positive_scale_append_sum_valid)) * S ((dst_positive_code_append_sum_valid) + (dst_positive_scale_append_sum_valid)) + ((dst_positive_scale_append_sum_valid) + (dst_positive_scale_append_sum_valid))) + (((dst_negative_code_append_sum_valid) + (dst_negative_scale_append_sum_valid)) * S ((dst_negative_code_append_sum_valid) + (dst_negative_scale_append_sum_valid)) + ((dst_negative_scale_append_sum_valid) + (dst_negative_scale_append_sum_valid)))) * S ((((dst_positive_code_append_sum_valid) + (dst_positive_scale_append_sum_valid)) * S ((dst_positive_code_append_sum_valid) + (dst_positive_scale_append_sum_valid)) + ((dst_positive_scale_append_sum_valid) + (dst_positive_scale_append_sum_valid))) + (((dst_negative_code_append_sum_valid) + (dst_negative_scale_append_sum_valid)) * S ((dst_negative_code_append_sum_valid) + (dst_negative_scale_append_sum_valid)) + ((dst_negative_scale_append_sum_valid) + (dst_negative_scale_append_sum_valid)))) + ((((dst_negative_code_append_sum_valid) + (dst_negative_scale_append_sum_valid)) * S ((dst_negative_code_append_sum_valid) + (dst_negative_scale_append_sum_valid)) + ((dst_negative_scale_append_sum_valid) + (dst_negative_scale_append_sum_valid))) + (((dst_negative_code_append_sum_valid) + (dst_negative_scale_append_sum_valid)) * S ((dst_negative_code_append_sum_valid) + (dst_negative_scale_append_sum_valid)) + ((dst_negative_scale_append_sum_valid) + (dst_negative_scale_append_sum_valid)))))) /\ (forall dst_index_append_sum_valid. (exists pvs_le_gap_append_sum_validdomain. pvs_le_gap_append_sum_validdomain + (dst_index_append_sum_valid) = (l)) -> exists dst_positive_append_sum_valid dst_negative_append_sum_valid dst_value_append_sum_valid. ((((exists ff_h_pvs_append_sum_validentrypositive. ff_h_pvs_append_sum_validentrypositive + S (dst_positive_append_sum_valid) = S ((S (dst_index_append_sum_valid)) * dst_positive_scale_append_sum_valid)) /\ exists ff_q_pvs_append_sum_validentrypositive. dst_positive_code_append_sum_valid = ff_q_pvs_append_sum_validentrypositive * S ((S (dst_index_append_sum_valid)) * dst_positive_scale_append_sum_valid) + (dst_positive_append_sum_valid))) /\ (((((exists ff_h_pvs_append_sum_validentrynegative. ff_h_pvs_append_sum_validentrynegative + S (dst_negative_append_sum_valid) = S ((S (dst_index_append_sum_valid)) * dst_negative_scale_append_sum_valid)) /\ exists ff_q_pvs_append_sum_validentrynegative. dst_negative_code_append_sum_valid = ff_q_pvs_append_sum_validentrynegative * S ((S (dst_index_append_sum_valid)) * dst_negative_scale_append_sum_valid) + (dst_negative_append_sum_valid))) /\ (exists ge_balance_positive_append_sum_validentryvalue ge_balance_negative_append_sum_validentryvalue. (((((dst_value_append_sum_valid) = 2 * (ge_balance_positive_append_sum_validentryvalue) /\ (ge_balance_negative_append_sum_validentryvalue) = 0) \/ exists ge_signed_half_append_sum_validentryvaluedecode. (((dst_value_append_sum_valid) = 2 * ge_signed_half_append_sum_validentryvaluedecode + 1 /\ (ge_balance_positive_append_sum_validentryvalue) = 0) /\ (ge_balance_negative_append_sum_validentryvalue) = S ge_signed_half_append_sum_validentryvaluedecode))) /\ ((dst_positive_append_sum_valid) + ge_balance_negative_append_sum_validentryvalue = (dst_negative_append_sum_valid) + ge_balance_positive_append_sum_validentryvalue))))))))) -> (forall dst_index_append_sum_prefix dst_first_append_sum_prefix dst_second_append_sum_prefix. (exists pvs_gap_append_sum_prefixbound. pvs_gap_append_sum_prefixbound + S (dst_index_append_sum_prefix) = (l)) -> (exists dst_positive_code_append_sum_prefixfirst dst_positive_scale_append_sum_prefixfirst dst_negative_code_append_sum_prefixfirst dst_negative_scale_append_sum_prefixfirst dst_positive_append_sum_prefixfirst dst_negative_append_sum_prefixfirst. (((F) = (((((dst_positive_code_append_sum_prefixfirst) + (dst_positive_scale_append_sum_prefixfirst)) * S ((dst_positive_code_append_sum_prefixfirst) + (dst_positive_scale_append_sum_prefixfirst)) + ((dst_positive_scale_append_sum_prefixfirst) + (dst_positive_scale_append_sum_prefixfirst))) + (((dst_negative_code_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)) * S ((dst_negative_code_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)) + ((dst_negative_scale_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)))) * S ((((dst_positive_code_append_sum_prefixfirst) + (dst_positive_scale_append_sum_prefixfirst)) * S ((dst_positive_code_append_sum_prefixfirst) + (dst_positive_scale_append_sum_prefixfirst)) + ((dst_positive_scale_append_sum_prefixfirst) + (dst_positive_scale_append_sum_prefixfirst))) + (((dst_negative_code_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)) * S ((dst_negative_code_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)) + ((dst_negative_scale_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)))) + ((((dst_negative_code_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)) * S ((dst_negative_code_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)) + ((dst_negative_scale_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst))) + (((dst_negative_code_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)) * S ((dst_negative_code_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)) + ((dst_negative_scale_append_sum_prefixfirst) + (dst_negative_scale_append_sum_prefixfirst)))))) /\ (((((exists ff_h_pvs_append_sum_prefixfirstpositive. ff_h_pvs_append_sum_prefixfirstpositive + S (dst_positive_append_sum_prefixfirst) = S ((S (dst_index_append_sum_prefix)) * dst_positive_scale_append_sum_prefixfirst)) /\ exists ff_q_pvs_append_sum_prefixfirstpositive. dst_positive_code_append_sum_prefixfirst = ff_q_pvs_append_sum_prefixfirstpositive * S ((S (dst_index_append_sum_prefix)) * dst_positive_scale_append_sum_prefixfirst) + (dst_positive_append_sum_prefixfirst))) /\ (((((exists ff_h_pvs_append_sum_prefixfirstnegative. ff_h_pvs_append_sum_prefixfirstnegative + S (dst_negative_append_sum_prefixfirst) = S ((S (dst_index_append_sum_prefix)) * dst_negative_scale_append_sum_prefixfirst)) /\ exists ff_q_pvs_append_sum_prefixfirstnegative. dst_negative_code_append_sum_prefixfirst = ff_q_pvs_append_sum_prefixfirstnegative * S ((S (dst_index_append_sum_prefix)) * dst_negative_scale_append_sum_prefixfirst) + (dst_negative_append_sum_prefixfirst))) /\ (exists ge_balance_positive_append_sum_prefixfirstvalue ge_balance_negative_append_sum_prefixfirstvalue. (((((dst_first_append_sum_prefix) = 2 * (ge_balance_positive_append_sum_prefixfirstvalue) /\ (ge_balance_negative_append_sum_prefixfirstvalue) = 0) \/ exists ge_signed_half_append_sum_prefixfirstvaluedecode. (((dst_first_append_sum_prefix) = 2 * ge_signed_half_append_sum_prefixfirstvaluedecode + 1 /\ (ge_balance_positive_append_sum_prefixfirstvalue) = 0) /\ (ge_balance_negative_append_sum_prefixfirstvalue) = S ge_signed_half_append_sum_prefixfirstvaluedecode))) /\ ((dst_positive_append_sum_prefixfirst) + ge_balance_negative_append_sum_prefixfirstvalue = (dst_negative_append_sum_prefixfirst) + ge_balance_positive_append_sum_prefixfirstvalue))))))))) -> (exists dst_positive_code_append_sum_prefixsecond dst_positive_scale_append_sum_prefixsecond dst_negative_code_append_sum_prefixsecond dst_negative_scale_append_sum_prefixsecond dst_positive_append_sum_prefixsecond dst_negative_append_sum_prefixsecond. (((G) = (((((dst_positive_code_append_sum_prefixsecond) + (dst_positive_scale_append_sum_prefixsecond)) * S ((dst_positive_code_append_sum_prefixsecond) + (dst_positive_scale_append_sum_prefixsecond)) + ((dst_positive_scale_append_sum_prefixsecond) + (dst_positive_scale_append_sum_prefixsecond))) + (((dst_negative_code_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)) * S ((dst_negative_code_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)) + ((dst_negative_scale_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)))) * S ((((dst_positive_code_append_sum_prefixsecond) + (dst_positive_scale_append_sum_prefixsecond)) * S ((dst_positive_code_append_sum_prefixsecond) + (dst_positive_scale_append_sum_prefixsecond)) + ((dst_positive_scale_append_sum_prefixsecond) + (dst_positive_scale_append_sum_prefixsecond))) + (((dst_negative_code_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)) * S ((dst_negative_code_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)) + ((dst_negative_scale_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)))) + ((((dst_negative_code_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)) * S ((dst_negative_code_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)) + ((dst_negative_scale_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond))) + (((dst_negative_code_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)) * S ((dst_negative_code_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)) + ((dst_negative_scale_append_sum_prefixsecond) + (dst_negative_scale_append_sum_prefixsecond)))))) /\ (((((exists ff_h_pvs_append_sum_prefixsecondpositive. ff_h_pvs_append_sum_prefixsecondpositive + S (dst_positive_append_sum_prefixsecond) = S ((S (dst_index_append_sum_prefix)) * dst_positive_scale_append_sum_prefixsecond)) /\ exists ff_q_pvs_append_sum_prefixsecondpositive. dst_positive_code_append_sum_prefixsecond = ff_q_pvs_append_sum_prefixsecondpositive * S ((S (dst_index_append_sum_prefix)) * dst_positive_scale_append_sum_prefixsecond) + (dst_positive_append_sum_prefixsecond))) /\ (((((exists ff_h_pvs_append_sum_prefixsecondnegative. ff_h_pvs_append_sum_prefixsecondnegative + S (dst_negative_append_sum_prefixsecond) = S ((S (dst_index_append_sum_prefix)) * dst_negative_scale_append_sum_prefixsecond)) /\ exists ff_q_pvs_append_sum_prefixsecondnegative. dst_negative_code_append_sum_prefixsecond = ff_q_pvs_append_sum_prefixsecondnegative * S ((S (dst_index_append_sum_prefix)) * dst_negative_scale_append_sum_prefixsecond) + (dst_negative_append_sum_prefixsecond))) /\ (exists ge_balance_positive_append_sum_prefixsecondvalue ge_balance_negative_append_sum_prefixsecondvalue. (((((dst_second_append_sum_prefix) = 2 * (ge_balance_positive_append_sum_prefixsecondvalue) /\ (ge_balance_negative_append_sum_prefixsecondvalue) = 0) \/ exists ge_signed_half_append_sum_prefixsecondvaluedecode. (((dst_second_append_sum_prefix) = 2 * ge_signed_half_append_sum_prefixsecondvaluedecode + 1 /\ (ge_balance_positive_append_sum_prefixsecondvalue) = 0) /\ (ge_balance_negative_append_sum_prefixsecondvalue) = S ge_signed_half_append_sum_prefixsecondvaluedecode))) /\ ((dst_positive_append_sum_prefixsecond) + ge_balance_negative_append_sum_prefixsecondvalue = (dst_negative_append_sum_prefixsecond) + ge_balance_positive_append_sum_prefixsecondvalue))))))))) -> dst_first_append_sum_prefix = dst_second_append_sum_prefix) -> (exists dst_positive_code_append_sum_before dst_positive_scale_append_sum_before dst_negative_code_append_sum_before dst_negative_scale_append_sum_before dst_positive_sum_append_sum_before dst_negative_sum_append_sum_before. (((F) = (((((dst_positive_code_append_sum_before) + (dst_positive_scale_append_sum_before)) * S ((dst_positive_code_append_sum_before) + (dst_positive_scale_append_sum_before)) + ((dst_positive_scale_append_sum_before) + (dst_positive_scale_append_sum_before))) + (((dst_negative_code_append_sum_before) + (dst_negative_scale_append_sum_before)) * S ((dst_negative_code_append_sum_before) + (dst_negative_scale_append_sum_before)) + ((dst_negative_scale_append_sum_before) + (dst_negative_scale_append_sum_before)))) * S ((((dst_positive_code_append_sum_before) + (dst_positive_scale_append_sum_before)) * S ((dst_positive_code_append_sum_before) + (dst_positive_scale_append_sum_before)) + ((dst_positive_scale_append_sum_before) + (dst_positive_scale_append_sum_before))) + (((dst_negative_code_append_sum_before) + (dst_negative_scale_append_sum_before)) * S ((dst_negative_code_append_sum_before) + (dst_negative_scale_append_sum_before)) + ((dst_negative_scale_append_sum_before) + (dst_negative_scale_append_sum_before)))) + ((((dst_negative_code_append_sum_before) + (dst_negative_scale_append_sum_before)) * S ((dst_negative_code_append_sum_before) + (dst_negative_scale_append_sum_before)) + ((dst_negative_scale_append_sum_before) + (dst_negative_scale_append_sum_before))) + (((dst_negative_code_append_sum_before) + (dst_negative_scale_append_sum_before)) * S ((dst_negative_code_append_sum_before) + (dst_negative_scale_append_sum_before)) + ((dst_negative_scale_append_sum_before) + (dst_negative_scale_append_sum_before)))))) /\ (((exists fs_u_dst_append_sum_beforepositive fs_v_dst_append_sum_beforepositive. ((((exists fs_h_dst_append_sum_beforepositive_body_start. fs_h_dst_append_sum_beforepositive_body_start + S (0) = S ((S (0)) * fs_v_dst_append_sum_beforepositive)) /\ exists fs_q_dst_append_sum_beforepositive_body_start. fs_u_dst_append_sum_beforepositive = fs_q_dst_append_sum_beforepositive_body_start * S ((S (0)) * fs_v_dst_append_sum_beforepositive) + (0))) /\ ((((exists fs_h_dst_append_sum_beforepositive_body_terminal. fs_h_dst_append_sum_beforepositive_body_terminal + S (dst_positive_sum_append_sum_before) = S ((S (l)) * fs_v_dst_append_sum_beforepositive)) /\ exists fs_q_dst_append_sum_beforepositive_body_terminal. fs_u_dst_append_sum_beforepositive = fs_q_dst_append_sum_beforepositive_body_terminal * S ((S (l)) * fs_v_dst_append_sum_beforepositive) + (dst_positive_sum_append_sum_before))) /\ forall fs_i_dst_append_sum_beforepositive_body_steps. (exists fs_lt_dst_append_sum_beforepositive_body_steps_bound. fs_lt_dst_append_sum_beforepositive_body_steps_bound + S fs_i_dst_append_sum_beforepositive_body_steps = l) -> exists fs_a_dst_append_sum_beforepositive_body_steps fs_r_dst_append_sum_beforepositive_body_steps fs_s_dst_append_sum_beforepositive_body_steps. ((((exists fs_h_dst_append_sum_beforepositive_body_steps_summand. fs_h_dst_append_sum_beforepositive_body_steps_summand + S (fs_a_dst_append_sum_beforepositive_body_steps) = S ((S (fs_i_dst_append_sum_beforepositive_body_steps)) * dst_positive_scale_append_sum_before)) /\ exists fs_q_dst_append_sum_beforepositive_body_steps_summand. dst_positive_code_append_sum_before = fs_q_dst_append_sum_beforepositive_body_steps_summand * S ((S (fs_i_dst_append_sum_beforepositive_body_steps)) * dst_positive_scale_append_sum_before) + (fs_a_dst_append_sum_beforepositive_body_steps))) /\ ((((exists fs_h_dst_append_sum_beforepositive_body_steps_partial. fs_h_dst_append_sum_beforepositive_body_steps_partial + S (fs_r_dst_append_sum_beforepositive_body_steps) = S ((S (fs_i_dst_append_sum_beforepositive_body_steps)) * fs_v_dst_append_sum_beforepositive)) /\ exists fs_q_dst_append_sum_beforepositive_body_steps_partial. fs_u_dst_append_sum_beforepositive = fs_q_dst_append_sum_beforepositive_body_steps_partial * S ((S (fs_i_dst_append_sum_beforepositive_body_steps)) * fs_v_dst_append_sum_beforepositive) + (fs_r_dst_append_sum_beforepositive_body_steps))) /\ ((((exists fs_h_dst_append_sum_beforepositive_body_steps_successor. fs_h_dst_append_sum_beforepositive_body_steps_successor + S (fs_s_dst_append_sum_beforepositive_body_steps) = S ((S (S fs_i_dst_append_sum_beforepositive_body_steps)) * fs_v_dst_append_sum_beforepositive)) /\ exists fs_q_dst_append_sum_beforepositive_body_steps_successor. fs_u_dst_append_sum_beforepositive = fs_q_dst_append_sum_beforepositive_body_steps_successor * S ((S (S fs_i_dst_append_sum_beforepositive_body_steps)) * fs_v_dst_append_sum_beforepositive) + (fs_s_dst_append_sum_beforepositive_body_steps))) /\ fs_s_dst_append_sum_beforepositive_body_steps = fs_r_dst_append_sum_beforepositive_body_steps + fs_a_dst_append_sum_beforepositive_body_steps)))))) /\ (((exists fs_u_dst_append_sum_beforenegative fs_v_dst_append_sum_beforenegative. ((((exists fs_h_dst_append_sum_beforenegative_body_start. fs_h_dst_append_sum_beforenegative_body_start + S (0) = S ((S (0)) * fs_v_dst_append_sum_beforenegative)) /\ exists fs_q_dst_append_sum_beforenegative_body_start. fs_u_dst_append_sum_beforenegative = fs_q_dst_append_sum_beforenegative_body_start * S ((S (0)) * fs_v_dst_append_sum_beforenegative) + (0))) /\ ((((exists fs_h_dst_append_sum_beforenegative_body_terminal. fs_h_dst_append_sum_beforenegative_body_terminal + S (dst_negative_sum_append_sum_before) = S ((S (l)) * fs_v_dst_append_sum_beforenegative)) /\ exists fs_q_dst_append_sum_beforenegative_body_terminal. fs_u_dst_append_sum_beforenegative = fs_q_dst_append_sum_beforenegative_body_terminal * S ((S (l)) * fs_v_dst_append_sum_beforenegative) + (dst_negative_sum_append_sum_before))) /\ forall fs_i_dst_append_sum_beforenegative_body_steps. (exists fs_lt_dst_append_sum_beforenegative_body_steps_bound. fs_lt_dst_append_sum_beforenegative_body_steps_bound + S fs_i_dst_append_sum_beforenegative_body_steps = l) -> exists fs_a_dst_append_sum_beforenegative_body_steps fs_r_dst_append_sum_beforenegative_body_steps fs_s_dst_append_sum_beforenegative_body_steps. ((((exists fs_h_dst_append_sum_beforenegative_body_steps_summand. fs_h_dst_append_sum_beforenegative_body_steps_summand + S (fs_a_dst_append_sum_beforenegative_body_steps) = S ((S (fs_i_dst_append_sum_beforenegative_body_steps)) * dst_negative_scale_append_sum_before)) /\ exists fs_q_dst_append_sum_beforenegative_body_steps_summand. dst_negative_code_append_sum_before = fs_q_dst_append_sum_beforenegative_body_steps_summand * S ((S (fs_i_dst_append_sum_beforenegative_body_steps)) * dst_negative_scale_append_sum_before) + (fs_a_dst_append_sum_beforenegative_body_steps))) /\ ((((exists fs_h_dst_append_sum_beforenegative_body_steps_partial. fs_h_dst_append_sum_beforenegative_body_steps_partial + S (fs_r_dst_append_sum_beforenegative_body_steps) = S ((S (fs_i_dst_append_sum_beforenegative_body_steps)) * fs_v_dst_append_sum_beforenegative)) /\ exists fs_q_dst_append_sum_beforenegative_body_steps_partial. fs_u_dst_append_sum_beforenegative = fs_q_dst_append_sum_beforenegative_body_steps_partial * S ((S (fs_i_dst_append_sum_beforenegative_body_steps)) * fs_v_dst_append_sum_beforenegative) + (fs_r_dst_append_sum_beforenegative_body_steps))) /\ ((((exists fs_h_dst_append_sum_beforenegative_body_steps_successor. fs_h_dst_append_sum_beforenegative_body_steps_successor + S (fs_s_dst_append_sum_beforenegative_body_steps) = S ((S (S fs_i_dst_append_sum_beforenegative_body_steps)) * fs_v_dst_append_sum_beforenegative)) /\ exists fs_q_dst_append_sum_beforenegative_body_steps_successor. fs_u_dst_append_sum_beforenegative = fs_q_dst_append_sum_beforenegative_body_steps_successor * S ((S (S fs_i_dst_append_sum_beforenegative_body_steps)) * fs_v_dst_append_sum_beforenegative) + (fs_s_dst_append_sum_beforenegative_body_steps))) /\ fs_s_dst_append_sum_beforenegative_body_steps = fs_r_dst_append_sum_beforenegative_body_steps + fs_a_dst_append_sum_beforenegative_body_steps)))))) /\ (exists ge_balance_positive_append_sum_beforeresult ge_balance_negative_append_sum_beforeresult. (((((a) = 2 * (ge_balance_positive_append_sum_beforeresult) /\ (ge_balance_negative_append_sum_beforeresult) = 0) \/ exists ge_signed_half_append_sum_beforeresultdecode. (((a) = 2 * ge_signed_half_append_sum_beforeresultdecode + 1 /\ (ge_balance_positive_append_sum_beforeresult) = 0) /\ (ge_balance_negative_append_sum_beforeresult) = S ge_signed_half_append_sum_beforeresultdecode))) /\ ((dst_positive_sum_append_sum_before) + ge_balance_negative_append_sum_beforeresult = (dst_negative_sum_append_sum_before) + ge_balance_positive_append_sum_beforeresult))))))))) -> (exists dst_positive_code_append_sum_entry dst_positive_scale_append_sum_entry dst_negative_code_append_sum_entry dst_negative_scale_append_sum_entry dst_positive_append_sum_entry dst_negative_append_sum_entry. (((G) = (((((dst_positive_code_append_sum_entry) + (dst_positive_scale_append_sum_entry)) * S ((dst_positive_code_append_sum_entry) + (dst_positive_scale_append_sum_entry)) + ((dst_positive_scale_append_sum_entry) + (dst_positive_scale_append_sum_entry))) + (((dst_negative_code_append_sum_entry) + (dst_negative_scale_append_sum_entry)) * S ((dst_negative_code_append_sum_entry) + (dst_negative_scale_append_sum_entry)) + ((dst_negative_scale_append_sum_entry) + (dst_negative_scale_append_sum_entry)))) * S ((((dst_positive_code_append_sum_entry) + (dst_positive_scale_append_sum_entry)) * S ((dst_positive_code_append_sum_entry) + (dst_positive_scale_append_sum_entry)) + ((dst_positive_scale_append_sum_entry) + (dst_positive_scale_append_sum_entry))) + (((dst_negative_code_append_sum_entry) + (dst_negative_scale_append_sum_entry)) * S ((dst_negative_code_append_sum_entry) + (dst_negative_scale_append_sum_entry)) + ((dst_negative_scale_append_sum_entry) + (dst_negative_scale_append_sum_entry)))) + ((((dst_negative_code_append_sum_entry) + (dst_negative_scale_append_sum_entry)) * S ((dst_negative_code_append_sum_entry) + (dst_negative_scale_append_sum_entry)) + ((dst_negative_scale_append_sum_entry) + (dst_negative_scale_append_sum_entry))) + (((dst_negative_code_append_sum_entry) + (dst_negative_scale_append_sum_entry)) * S ((dst_negative_code_append_sum_entry) + (dst_negative_scale_append_sum_entry)) + ((dst_negative_scale_append_sum_entry) + (dst_negative_scale_append_sum_entry)))))) /\ (((((exists ff_h_pvs_append_sum_entrypositive. ff_h_pvs_append_sum_entrypositive + S (dst_positive_append_sum_entry) = S ((S (l)) * dst_positive_scale_append_sum_entry)) /\ exists ff_q_pvs_append_sum_entrypositive. dst_positive_code_append_sum_entry = ff_q_pvs_append_sum_entrypositive * S ((S (l)) * dst_positive_scale_append_sum_entry) + (dst_positive_append_sum_entry))) /\ (((((exists ff_h_pvs_append_sum_entrynegative. ff_h_pvs_append_sum_entrynegative + S (dst_negative_append_sum_entry) = S ((S (l)) * dst_negative_scale_append_sum_entry)) /\ exists ff_q_pvs_append_sum_entrynegative. dst_negative_code_append_sum_entry = ff_q_pvs_append_sum_entrynegative * S ((S (l)) * dst_negative_scale_append_sum_entry) + (dst_negative_append_sum_entry))) /\ (exists ge_balance_positive_append_sum_entryvalue ge_balance_negative_append_sum_entryvalue. (((((b) = 2 * (ge_balance_positive_append_sum_entryvalue) /\ (ge_balance_negative_append_sum_entryvalue) = 0) \/ exists ge_signed_half_append_sum_entryvaluedecode. (((b) = 2 * ge_signed_half_append_sum_entryvaluedecode + 1 /\ (ge_balance_positive_append_sum_entryvalue) = 0) /\ (ge_balance_negative_append_sum_entryvalue) = S ge_signed_half_append_sum_entryvaluedecode))) /\ ((dst_positive_append_sum_entry) + ge_balance_negative_append_sum_entryvalue = (dst_negative_append_sum_entry) + ge_balance_positive_append_sum_entryvalue))))))))) -> (exists dsa_ap_append_sum_add dsa_an_append_sum_add dsa_bp_append_sum_add dsa_bn_append_sum_add dsa_cp_append_sum_add dsa_cn_append_sum_add. (((((a) = 2 * (dsa_ap_append_sum_add) /\ (dsa_an_append_sum_add) = 0) \/ exists ge_signed_half_append_sum_addleft. (((a) = 2 * ge_signed_half_append_sum_addleft + 1 /\ (dsa_ap_append_sum_add) = 0) /\ (dsa_an_append_sum_add) = S ge_signed_half_append_sum_addleft))) /\ ((((((b) = 2 * (dsa_bp_append_sum_add) /\ (dsa_bn_append_sum_add) = 0) \/ exists ge_signed_half_append_sum_addright. (((b) = 2 * ge_signed_half_append_sum_addright + 1 /\ (dsa_bp_append_sum_add) = 0) /\ (dsa_bn_append_sum_add) = S ge_signed_half_append_sum_addright))) /\ ((((((c) = 2 * (dsa_cp_append_sum_add) /\ (dsa_cn_append_sum_add) = 0) \/ exists ge_signed_half_append_sum_addoutput. (((c) = 2 * ge_signed_half_append_sum_addoutput + 1 /\ (dsa_cp_append_sum_add) = 0) /\ (dsa_cn_append_sum_add) = S ge_signed_half_append_sum_addoutput))) /\ ((dsa_ap_append_sum_add + dsa_bp_append_sum_add) + dsa_cn_append_sum_add = (dsa_an_append_sum_add + dsa_bn_append_sum_add) + dsa_cp_append_sum_add))))))) -> (exists dst_positive_code_append_sum_result dst_positive_scale_append_sum_result dst_negative_code_append_sum_result dst_negative_scale_append_sum_result dst_positive_sum_append_sum_result dst_negative_sum_append_sum_result. (((G) = (((((dst_positive_code_append_sum_result) + (dst_positive_scale_append_sum_result)) * S ((dst_positive_code_append_sum_result) + (dst_positive_scale_append_sum_result)) + ((dst_positive_scale_append_sum_result) + (dst_positive_scale_append_sum_result))) + (((dst_negative_code_append_sum_result) + (dst_negative_scale_append_sum_result)) * S ((dst_negative_code_append_sum_result) + (dst_negative_scale_append_sum_result)) + ((dst_negative_scale_append_sum_result) + (dst_negative_scale_append_sum_result)))) * S ((((dst_positive_code_append_sum_result) + (dst_positive_scale_append_sum_result)) * S ((dst_positive_code_append_sum_result) + (dst_positive_scale_append_sum_result)) + ((dst_positive_scale_append_sum_result) + (dst_positive_scale_append_sum_result))) + (((dst_negative_code_append_sum_result) + (dst_negative_scale_append_sum_result)) * S ((dst_negative_code_append_sum_result) + (dst_negative_scale_append_sum_result)) + ((dst_negative_scale_append_sum_result) + (dst_negative_scale_append_sum_result)))) + ((((dst_negative_code_append_sum_result) + (dst_negative_scale_append_sum_result)) * S ((dst_negative_code_append_sum_result) + (dst_negative_scale_append_sum_result)) + ((dst_negative_scale_append_sum_result) + (dst_negative_scale_append_sum_result))) + (((dst_negative_code_append_sum_result) + (dst_negative_scale_append_sum_result)) * S ((dst_negative_code_append_sum_result) + (dst_negative_scale_append_sum_result)) + ((dst_negative_scale_append_sum_result) + (dst_negative_scale_append_sum_result)))))) /\ (((exists fs_u_dst_append_sum_resultpositive fs_v_dst_append_sum_resultpositive. ((((exists fs_h_dst_append_sum_resultpositive_body_start. fs_h_dst_append_sum_resultpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_append_sum_resultpositive)) /\ exists fs_q_dst_append_sum_resultpositive_body_start. fs_u_dst_append_sum_resultpositive = fs_q_dst_append_sum_resultpositive_body_start * S ((S (0)) * fs_v_dst_append_sum_resultpositive) + (0))) /\ ((((exists fs_h_dst_append_sum_resultpositive_body_terminal. fs_h_dst_append_sum_resultpositive_body_terminal + S (dst_positive_sum_append_sum_result) = S ((S (S l)) * fs_v_dst_append_sum_resultpositive)) /\ exists fs_q_dst_append_sum_resultpositive_body_terminal. fs_u_dst_append_sum_resultpositive = fs_q_dst_append_sum_resultpositive_body_terminal * S ((S (S l)) * fs_v_dst_append_sum_resultpositive) + (dst_positive_sum_append_sum_result))) /\ forall fs_i_dst_append_sum_resultpositive_body_steps. (exists fs_lt_dst_append_sum_resultpositive_body_steps_bound. fs_lt_dst_append_sum_resultpositive_body_steps_bound + S fs_i_dst_append_sum_resultpositive_body_steps = S l) -> exists fs_a_dst_append_sum_resultpositive_body_steps fs_r_dst_append_sum_resultpositive_body_steps fs_s_dst_append_sum_resultpositive_body_steps. ((((exists fs_h_dst_append_sum_resultpositive_body_steps_summand. fs_h_dst_append_sum_resultpositive_body_steps_summand + S (fs_a_dst_append_sum_resultpositive_body_steps) = S ((S (fs_i_dst_append_sum_resultpositive_body_steps)) * dst_positive_scale_append_sum_result)) /\ exists fs_q_dst_append_sum_resultpositive_body_steps_summand. dst_positive_code_append_sum_result = fs_q_dst_append_sum_resultpositive_body_steps_summand * S ((S (fs_i_dst_append_sum_resultpositive_body_steps)) * dst_positive_scale_append_sum_result) + (fs_a_dst_append_sum_resultpositive_body_steps))) /\ ((((exists fs_h_dst_append_sum_resultpositive_body_steps_partial. fs_h_dst_append_sum_resultpositive_body_steps_partial + S (fs_r_dst_append_sum_resultpositive_body_steps) = S ((S (fs_i_dst_append_sum_resultpositive_body_steps)) * fs_v_dst_append_sum_resultpositive)) /\ exists fs_q_dst_append_sum_resultpositive_body_steps_partial. fs_u_dst_append_sum_resultpositive = fs_q_dst_append_sum_resultpositive_body_steps_partial * S ((S (fs_i_dst_append_sum_resultpositive_body_steps)) * fs_v_dst_append_sum_resultpositive) + (fs_r_dst_append_sum_resultpositive_body_steps))) /\ ((((exists fs_h_dst_append_sum_resultpositive_body_steps_successor. fs_h_dst_append_sum_resultpositive_body_steps_successor + S (fs_s_dst_append_sum_resultpositive_body_steps) = S ((S (S fs_i_dst_append_sum_resultpositive_body_steps)) * fs_v_dst_append_sum_resultpositive)) /\ exists fs_q_dst_append_sum_resultpositive_body_steps_successor. fs_u_dst_append_sum_resultpositive = fs_q_dst_append_sum_resultpositive_body_steps_successor * S ((S (S fs_i_dst_append_sum_resultpositive_body_steps)) * fs_v_dst_append_sum_resultpositive) + (fs_s_dst_append_sum_resultpositive_body_steps))) /\ fs_s_dst_append_sum_resultpositive_body_steps = fs_r_dst_append_sum_resultpositive_body_steps + fs_a_dst_append_sum_resultpositive_body_steps)))))) /\ (((exists fs_u_dst_append_sum_resultnegative fs_v_dst_append_sum_resultnegative. ((((exists fs_h_dst_append_sum_resultnegative_body_start. fs_h_dst_append_sum_resultnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_append_sum_resultnegative)) /\ exists fs_q_dst_append_sum_resultnegative_body_start. fs_u_dst_append_sum_resultnegative = fs_q_dst_append_sum_resultnegative_body_start * S ((S (0)) * fs_v_dst_append_sum_resultnegative) + (0))) /\ ((((exists fs_h_dst_append_sum_resultnegative_body_terminal. fs_h_dst_append_sum_resultnegative_body_terminal + S (dst_negative_sum_append_sum_result) = S ((S (S l)) * fs_v_dst_append_sum_resultnegative)) /\ exists fs_q_dst_append_sum_resultnegative_body_terminal. fs_u_dst_append_sum_resultnegative = fs_q_dst_append_sum_resultnegative_body_terminal * S ((S (S l)) * fs_v_dst_append_sum_resultnegative) + (dst_negative_sum_append_sum_result))) /\ forall fs_i_dst_append_sum_resultnegative_body_steps. (exists fs_lt_dst_append_sum_resultnegative_body_steps_bound. fs_lt_dst_append_sum_resultnegative_body_steps_bound + S fs_i_dst_append_sum_resultnegative_body_steps = S l) -> exists fs_a_dst_append_sum_resultnegative_body_steps fs_r_dst_append_sum_resultnegative_body_steps fs_s_dst_append_sum_resultnegative_body_steps. ((((exists fs_h_dst_append_sum_resultnegative_body_steps_summand. fs_h_dst_append_sum_resultnegative_body_steps_summand + S (fs_a_dst_append_sum_resultnegative_body_steps) = S ((S (fs_i_dst_append_sum_resultnegative_body_steps)) * dst_negative_scale_append_sum_result)) /\ exists fs_q_dst_append_sum_resultnegative_body_steps_summand. dst_negative_code_append_sum_result = fs_q_dst_append_sum_resultnegative_body_steps_summand * S ((S (fs_i_dst_append_sum_resultnegative_body_steps)) * dst_negative_scale_append_sum_result) + (fs_a_dst_append_sum_resultnegative_body_steps))) /\ ((((exists fs_h_dst_append_sum_resultnegative_body_steps_partial. fs_h_dst_append_sum_resultnegative_body_steps_partial + S (fs_r_dst_append_sum_resultnegative_body_steps) = S ((S (fs_i_dst_append_sum_resultnegative_body_steps)) * fs_v_dst_append_sum_resultnegative)) /\ exists fs_q_dst_append_sum_resultnegative_body_steps_partial. fs_u_dst_append_sum_resultnegative = fs_q_dst_append_sum_resultnegative_body_steps_partial * S ((S (fs_i_dst_append_sum_resultnegative_body_steps)) * fs_v_dst_append_sum_resultnegative) + (fs_r_dst_append_sum_resultnegative_body_steps))) /\ ((((exists fs_h_dst_append_sum_resultnegative_body_steps_successor. fs_h_dst_append_sum_resultnegative_body_steps_successor + S (fs_s_dst_append_sum_resultnegative_body_steps) = S ((S (S fs_i_dst_append_sum_resultnegative_body_steps)) * fs_v_dst_append_sum_resultnegative)) /\ exists fs_q_dst_append_sum_resultnegative_body_steps_successor. fs_u_dst_append_sum_resultnegative = fs_q_dst_append_sum_resultnegative_body_steps_successor * S ((S (S fs_i_dst_append_sum_resultnegative_body_steps)) * fs_v_dst_append_sum_resultnegative) + (fs_s_dst_append_sum_resultnegative_body_steps))) /\ fs_s_dst_append_sum_resultnegative_body_steps = fs_r_dst_append_sum_resultnegative_body_steps + fs_a_dst_append_sum_resultnegative_body_steps)))))) /\ (exists ge_balance_positive_append_sum_resultresult ge_balance_negative_append_sum_resultresult. (((((c) = 2 * (ge_balance_positive_append_sum_resultresult) /\ (ge_balance_negative_append_sum_resultresult) = 0) \/ exists ge_signed_half_append_sum_resultresultdecode. (((c) = 2 * ge_signed_half_append_sum_resultresultdecode + 1 /\ (ge_balance_positive_append_sum_resultresult) = 0) /\ (ge_balance_negative_append_sum_resultresult) = S ge_signed_half_append_sum_resultresultdecode))) /\ ((dst_positive_sum_append_sum_result) + ge_balance_negative_append_sum_resultresult = (dst_negative_sum_append_sum_result) + ge_balance_positive_append_sum_resultresult)))))))))

Complete tactic proof in conservative notation

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

40 script commands · 8 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 l
  4. L4
    intro a
  5. L5
    intro b
  6. L6
    intro c
  7. L7
    intro ht
  8. L8
    intro he
  9. L9
    intro hs
  10. L10
    intro hb
02Fix variables and assumptionsL11–11

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

  1. L11
    intro hadd
03Establish hxL12–17

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

  1. L12
    have hx : ∃ x. SignedPrefixSum(G,l,x)Definitions: SignedPrefixSum(G,l,x)Original native command in the exact edition
  2. L13
    specialize arithmetic_signed_sum_exists (l)
  3. L14
    specialize arithmetic_signed_sum_exists (G)
  4. L15
    specialize arithmetic_signed_sum_exists (l)
  5. L16
    apply arithmetic_signed_sum_exists
  6. L17
    exact ht
04Separate the logical casesL18–18

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

  1. L18
    cases hx
05Establish heqL19–28

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

  1. L19
    have heq : x = a
  2. L20
    symm
  3. L21
    specialize divisor_signed_sum_extensional (F)
  4. L22
    specialize divisor_signed_sum_extensional (G)
  5. L23
    specialize divisor_signed_sum_extensional (l)
  6. L24
    specialize divisor_signed_sum_extensional (a)
  7. L25
    specialize divisor_signed_sum_extensional (x)
  8. L26
    apply divisor_signed_sum_extensional
  9. L27
    exact he
  10. L28
    exact hs
06Use earlier factsL29–29

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

  1. L29
    exact hx_witness
07Calculate and transport equalitiesL30–31

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

  1. L30
    rewrite heq at hx_witness
  2. L31
    rewrite heq at hx_witness
08Use earlier factsL32–40

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

  1. L32
    specialize divisor_signed_sum_successor_intro (G)
  2. L33
    specialize divisor_signed_sum_successor_intro (l)
  3. L34
    specialize divisor_signed_sum_successor_intro (a)
  4. L35
    specialize divisor_signed_sum_successor_intro (b)
  5. L36
    specialize divisor_signed_sum_successor_intro (c)
  6. L37
    apply divisor_signed_sum_successor_intro
  7. L38
    exact hx_witness
  8. L39
    exact hb
  9. L40
    exact hadd

Library-wide reading audit

Original defined command ledger · 40 lines
  1. 0001intro F
  2. 0002intro G
  3. 0003intro l
  4. 0004intro a
  5. 0005intro b
  6. 0006intro c
  7. 0007intro ht
  8. 0008intro he
  9. 0009intro hs
  10. 0010intro hb
  11. 0011intro hadd
  12. 0012have hx : ∃ x. SignedPrefixSum(G,l,x)
  13. 0013specialize arithmetic_signed_sum_exists (l)
  14. 0014specialize arithmetic_signed_sum_exists (G)
  15. 0015specialize arithmetic_signed_sum_exists (l)
  16. 0016apply arithmetic_signed_sum_exists
  17. 0017exact ht
  18. 0018cases hx
  19. 0019have heq : x = a
  20. 0020symm
  21. 0021specialize divisor_signed_sum_extensional (F)
  22. 0022specialize divisor_signed_sum_extensional (G)
  23. 0023specialize divisor_signed_sum_extensional (l)
  24. 0024specialize divisor_signed_sum_extensional (a)
  25. 0025specialize divisor_signed_sum_extensional (x)
  26. 0026apply divisor_signed_sum_extensional
  27. 0027exact he
  28. 0028exact hs
  29. 0029exact hx_witness
  30. 0030rewrite heq at hx_witness
  31. 0031rewrite heq at hx_witness
  32. 0032specialize divisor_signed_sum_successor_intro (G)
  33. 0033specialize divisor_signed_sum_successor_intro (l)
  34. 0034specialize divisor_signed_sum_successor_intro (a)
  35. 0035specialize divisor_signed_sum_successor_intro (b)
  36. 0036specialize divisor_signed_sum_successor_intro (c)
  37. 0037apply divisor_signed_sum_successor_intro
  38. 0038exact hx_witness
  39. 0039exact hb
  40. 0040exact hadd