Exact expanded first-order arithmetic statement
forall F pb pc nb nc. ((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)))))) -> (exists dst_positive_code_empty_result dst_positive_scale_empty_result dst_negative_code_empty_result dst_negative_scale_empty_result dst_positive_sum_empty_result dst_negative_sum_empty_result. (((F) = (((((dst_positive_code_empty_result) + (dst_positive_scale_empty_result)) * S ((dst_positive_code_empty_result) + (dst_positive_scale_empty_result)) + ((dst_positive_scale_empty_result) + (dst_positive_scale_empty_result))) + (((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) * S ((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) + ((dst_negative_scale_empty_result) + (dst_negative_scale_empty_result)))) * S ((((dst_positive_code_empty_result) + (dst_positive_scale_empty_result)) * S ((dst_positive_code_empty_result) + (dst_positive_scale_empty_result)) + ((dst_positive_scale_empty_result) + (dst_positive_scale_empty_result))) + (((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) * S ((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) + ((dst_negative_scale_empty_result) + (dst_negative_scale_empty_result)))) + ((((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) * S ((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) + ((dst_negative_scale_empty_result) + (dst_negative_scale_empty_result))) + (((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) * S ((dst_negative_code_empty_result) + (dst_negative_scale_empty_result)) + ((dst_negative_scale_empty_result) + (dst_negative_scale_empty_result)))))) /\ (((exists fs_u_dst_empty_resultpositive fs_v_dst_empty_resultpositive. ((((exists fs_h_dst_empty_resultpositive_body_start. fs_h_dst_empty_resultpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_empty_resultpositive)) /\ exists fs_q_dst_empty_resultpositive_body_start. fs_u_dst_empty_resultpositive = fs_q_dst_empty_resultpositive_body_start * S ((S (0)) * fs_v_dst_empty_resultpositive) + (0))) /\ ((((exists fs_h_dst_empty_resultpositive_body_terminal. fs_h_dst_empty_resultpositive_body_terminal + S (dst_positive_sum_empty_result) = S ((S (0)) * fs_v_dst_empty_resultpositive)) /\ exists fs_q_dst_empty_resultpositive_body_terminal. fs_u_dst_empty_resultpositive = fs_q_dst_empty_resultpositive_body_terminal * S ((S (0)) * fs_v_dst_empty_resultpositive) + (dst_positive_sum_empty_result))) /\ forall fs_i_dst_empty_resultpositive_body_steps. (exists fs_lt_dst_empty_resultpositive_body_steps_bound. fs_lt_dst_empty_resultpositive_body_steps_bound + S fs_i_dst_empty_resultpositive_body_steps = 0) -> exists fs_a_dst_empty_resultpositive_body_steps fs_r_dst_empty_resultpositive_body_steps fs_s_dst_empty_resultpositive_body_steps. ((((exists fs_h_dst_empty_resultpositive_body_steps_summand. fs_h_dst_empty_resultpositive_body_steps_summand + S (fs_a_dst_empty_resultpositive_body_steps) = S ((S (fs_i_dst_empty_resultpositive_body_steps)) * dst_positive_scale_empty_result)) /\ exists fs_q_dst_empty_resultpositive_body_steps_summand. dst_positive_code_empty_result = fs_q_dst_empty_resultpositive_body_steps_summand * S ((S (fs_i_dst_empty_resultpositive_body_steps)) * dst_positive_scale_empty_result) + (fs_a_dst_empty_resultpositive_body_steps))) /\ ((((exists fs_h_dst_empty_resultpositive_body_steps_partial. fs_h_dst_empty_resultpositive_body_steps_partial + S (fs_r_dst_empty_resultpositive_body_steps) = S ((S (fs_i_dst_empty_resultpositive_body_steps)) * fs_v_dst_empty_resultpositive)) /\ exists fs_q_dst_empty_resultpositive_body_steps_partial. fs_u_dst_empty_resultpositive = fs_q_dst_empty_resultpositive_body_steps_partial * S ((S (fs_i_dst_empty_resultpositive_body_steps)) * fs_v_dst_empty_resultpositive) + (fs_r_dst_empty_resultpositive_body_steps))) /\ ((((exists fs_h_dst_empty_resultpositive_body_steps_successor. fs_h_dst_empty_resultpositive_body_steps_successor + S (fs_s_dst_empty_resultpositive_body_steps) = S ((S (S fs_i_dst_empty_resultpositive_body_steps)) * fs_v_dst_empty_resultpositive)) /\ exists fs_q_dst_empty_resultpositive_body_steps_successor. fs_u_dst_empty_resultpositive = fs_q_dst_empty_resultpositive_body_steps_successor * S ((S (S fs_i_dst_empty_resultpositive_body_steps)) * fs_v_dst_empty_resultpositive) + (fs_s_dst_empty_resultpositive_body_steps))) /\ fs_s_dst_empty_resultpositive_body_steps = fs_r_dst_empty_resultpositive_body_steps + fs_a_dst_empty_resultpositive_body_steps)))))) /\ (((exists fs_u_dst_empty_resultnegative fs_v_dst_empty_resultnegative. ((((exists fs_h_dst_empty_resultnegative_body_start. fs_h_dst_empty_resultnegative_body_start + S (0) = S ((S (0)) * fs_v_dst_empty_resultnegative)) /\ exists fs_q_dst_empty_resultnegative_body_start. fs_u_dst_empty_resultnegative = fs_q_dst_empty_resultnegative_body_start * S ((S (0)) * fs_v_dst_empty_resultnegative) + (0))) /\ ((((exists fs_h_dst_empty_resultnegative_body_terminal. fs_h_dst_empty_resultnegative_body_terminal + S (dst_negative_sum_empty_result) = S ((S (0)) * fs_v_dst_empty_resultnegative)) /\ exists fs_q_dst_empty_resultnegative_body_terminal. fs_u_dst_empty_resultnegative = fs_q_dst_empty_resultnegative_body_terminal * S ((S (0)) * fs_v_dst_empty_resultnegative) + (dst_negative_sum_empty_result))) /\ forall fs_i_dst_empty_resultnegative_body_steps. (exists fs_lt_dst_empty_resultnegative_body_steps_bound. fs_lt_dst_empty_resultnegative_body_steps_bound + S fs_i_dst_empty_resultnegative_body_steps = 0) -> exists fs_a_dst_empty_resultnegative_body_steps fs_r_dst_empty_resultnegative_body_steps fs_s_dst_empty_resultnegative_body_steps. ((((exists fs_h_dst_empty_resultnegative_body_steps_summand. fs_h_dst_empty_resultnegative_body_steps_summand + S (fs_a_dst_empty_resultnegative_body_steps) = S ((S (fs_i_dst_empty_resultnegative_body_steps)) * dst_negative_scale_empty_result)) /\ exists fs_q_dst_empty_resultnegative_body_steps_summand. dst_negative_code_empty_result = fs_q_dst_empty_resultnegative_body_steps_summand * S ((S (fs_i_dst_empty_resultnegative_body_steps)) * dst_negative_scale_empty_result) + (fs_a_dst_empty_resultnegative_body_steps))) /\ ((((exists fs_h_dst_empty_resultnegative_body_steps_partial. fs_h_dst_empty_resultnegative_body_steps_partial + S (fs_r_dst_empty_resultnegative_body_steps) = S ((S (fs_i_dst_empty_resultnegative_body_steps)) * fs_v_dst_empty_resultnegative)) /\ exists fs_q_dst_empty_resultnegative_body_steps_partial. fs_u_dst_empty_resultnegative = fs_q_dst_empty_resultnegative_body_steps_partial * S ((S (fs_i_dst_empty_resultnegative_body_steps)) * fs_v_dst_empty_resultnegative) + (fs_r_dst_empty_resultnegative_body_steps))) /\ ((((exists fs_h_dst_empty_resultnegative_body_steps_successor. fs_h_dst_empty_resultnegative_body_steps_successor + S (fs_s_dst_empty_resultnegative_body_steps) = S ((S (S fs_i_dst_empty_resultnegative_body_steps)) * fs_v_dst_empty_resultnegative)) /\ exists fs_q_dst_empty_resultnegative_body_steps_successor. fs_u_dst_empty_resultnegative = fs_q_dst_empty_resultnegative_body_steps_successor * S ((S (S fs_i_dst_empty_resultnegative_body_steps)) * fs_v_dst_empty_resultnegative) + (fs_s_dst_empty_resultnegative_body_steps))) /\ fs_s_dst_empty_resultnegative_body_steps = fs_r_dst_empty_resultnegative_body_steps + fs_a_dst_empty_resultnegative_body_steps)))))) /\ (exists ge_balance_positive_empty_resultresult ge_balance_negative_empty_resultresult. (((((0) = 2 * (ge_balance_positive_empty_resultresult) /\ (ge_balance_negative_empty_resultresult) = 0) \/ exists ge_signed_half_empty_resultresultdecode. (((0) = 2 * ge_signed_half_empty_resultresultdecode + 1 /\ (ge_balance_positive_empty_resultresult) = 0) /\ (ge_balance_negative_empty_resultresult) = S ge_signed_half_empty_resultresultdecode))) /\ ((dst_positive_sum_empty_result) + ge_balance_negative_empty_resultresult = (dst_negative_sum_empty_result) + ge_balance_positive_empty_resultresult)))))))))Constructive proof overview
Generated structural guide
The empty sum is constructed as an actual two-trace signed fold and only then identified with zero.
The unchanged tactic script uses 2 declared prerequisites and contains 24 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
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 (2)
01Fix variables and assumptionsL1–6
02Establish hzL7–15
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply divisor signed sum exists from components.
- L7
have hz : ∃ z. SignedPrefixSum(F,0,z)Definitions: SignedPrefixSum - L8
specialize divisor_signed_sum_exists_from_components (F) - L9
specialize divisor_signed_sum_exists_from_components (pb) - L10
specialize divisor_signed_sum_exists_from_components (pc) - L11
specialize divisor_signed_sum_exists_from_components (nb) - L12
specialize divisor_signed_sum_exists_from_components (nc) - L13
specialize divisor_signed_sum_exists_from_components (0) - L14
apply divisor_signed_sum_exists_from_components - L15
exact hrep
03Separate the logical casesL16–16
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L16
cases hz
04Establish heqL17–24
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply divisor signed sum empty value.
Original exact command ledger · 24 lines
- 0001
intro F - 0002
intro pb - 0003
intro pc - 0004
intro nb - 0005
intro nc - 0006
intro hrep - 0007
have hz : exists z. (exists dst_positive_code_empty_constructed dst_positive_scale_empty_constructed dst_negative_code_empty_constructed dst_negative_scale_empty_constructed dst_positive_sum_empty_constructed dst_negative_sum_empty_constructed. (((F) = (((((dst_positive_code_empty_constructed) + (dst_positive_scale_empty_constructed)) * S ((dst_positive_code_empty_constructed) + (dst_positive_scale_empty_constructed)) + ((dst_positive_scale_empty_constructed) + (dst_positive_scale_empty_constructed))) + (((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) * S ((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) + ((dst_negative_scale_empty_constructed) + (dst_negative_scale_empty_constructed)))) * S ((((dst_positive_code_empty_constructed) + (dst_positive_scale_empty_constructed)) * S ((dst_positive_code_empty_constructed) + (dst_positive_scale_empty_constructed)) + ((dst_positive_scale_empty_constructed) + (dst_positive_scale_empty_constructed))) + (((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) * S ((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) + ((dst_negative_scale_empty_constructed) + (dst_negative_scale_empty_constructed)))) + ((((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) * S ((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) + ((dst_negative_scale_empty_constructed) + (dst_negative_scale_empty_constructed))) + (((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) * S ((dst_negative_code_empty_constructed) + (dst_negative_scale_empty_constructed)) + ((dst_negative_scale_empty_constructed) + (dst_negative_scale_empty_constructed)))))) /\ (((exists fs_u_dst_empty_constructedpositive fs_v_dst_empty_constructedpositive. ((((exists fs_h_dst_empty_constructedpositive_body_start. fs_h_dst_empty_constructedpositive_body_start + S (0) = S ((S (0)) * fs_v_dst_empty_constructedpositive)) /\ exists fs_q_dst_empty_constructedpositive_body_start. fs_u_dst_empty_constructedpositive = fs_q_dst_empty_constructedpositive_body_start * S ((S (0)) * fs_v_dst_empty_constructedpositive) + (0))) /\ ((((exists fs_h_dst_empty_constructedpositive_body_terminal. fs_h_dst_empty_constructedpositive_body_terminal + S (dst_positive_sum_empty_constructed) = S ((S (0)) * fs_v_dst_empty_constructedpositive)) /\ exists fs_q_dst_empty_constructedpositive_body_terminal. fs_u_dst_empty_constructedpositive = fs_q_dst_empty_constructedpositive_body_terminal * S ((S (0)) * fs_v_dst_empty_constructedpositive) + (dst_positive_sum_empty_constructed))) /\ forall fs_i_dst_empty_constructedpositive_body_steps. (exists fs_lt_dst_empty_constructedpositive_body_steps_bound. fs_lt_dst_empty_constructedpositive_body_steps_bound + S fs_i_dst_empty_constructedpositive_body_steps = 0) -> exists fs_a_dst_empty_constructedpositive_body_steps fs_r_dst_empty_constructedpositive_body_steps fs_s_dst_empty_constructedpositive_body_steps. ((((exists fs_h_dst_empty_constructedpositive_body_steps_summand. fs_h_dst_empty_constructedpositive_body_steps_summand + S (fs_a_dst_empty_constructedpositive_body_steps) = S ((S (fs_i_dst_empty_constructedpositive_body_steps)) * dst_positive_scale_empty_constructed)) /\ exists fs_q_dst_empty_constructedpositive_body_steps_summand. dst_positive_code_empty_constructed = fs_q_dst_empty_constructedpositive_body_steps_summand * S ((S (fs_i_dst_empty_constructedpositive_body_steps)) * dst_positive_scale_empty_constructed) + (fs_a_dst_empty_constructedpositive_body_steps))) /\ ((((exists fs_h_dst_empty_constructedpositive_body_steps_partial. fs_h_dst_empty_constructedpositive_body_steps_partial + S (fs_r_dst_empty_constructedpositive_body_steps) = S ((S (fs_i_dst_empty_constructedpositive_body_steps)) * fs_v_dst_empty_constructedpositive)) /\ exists fs_q_dst_empty_constructedpositive_body_steps_partial. fs_u_dst_empty_constructedpositive = fs_q_dst_empty_constructedpositive_body_steps_partial * S ((S (fs_i_dst_empty_constructedpositive_body_steps)) * fs_v_dst_empty_constructedpositive) + (fs_r_dst_empty_constructedpositive_body_steps))) /\ ((((exists fs_h_dst_empty_constructedpositive_body_steps_successor. fs_h_dst_empty_constructedpositive_body_steps_successor + S (fs_s_dst_empty_constructedpositive_body_steps) = S ((S (S fs_i_dst_empty_constructedpositive_body_steps)) * fs_v_dst_empty_constructedpositive)) /\ exists fs_q_dst_empty_constructedpositive_body_steps_successor. fs_u_dst_empty_constructedpositive = fs_q_dst_empty_constructedpositive_body_steps_successor * S ((S (S fs_i_dst_empty_constructedpositive_body_steps)) * fs_v_dst_empty_constructedpositive) + (fs_s_dst_empty_constructedpositive_body_steps))) /\ fs_s_dst_empty_constructedpositive_body_steps = fs_r_dst_empty_constructedpositive_body_steps + fs_a_dst_empty_constructedpositive_body_steps)))))) /\ (((exists fs_u_dst_empty_constructednegative fs_v_dst_empty_constructednegative. ((((exists fs_h_dst_empty_constructednegative_body_start. fs_h_dst_empty_constructednegative_body_start + S (0) = S ((S (0)) * fs_v_dst_empty_constructednegative)) /\ exists fs_q_dst_empty_constructednegative_body_start. fs_u_dst_empty_constructednegative = fs_q_dst_empty_constructednegative_body_start * S ((S (0)) * fs_v_dst_empty_constructednegative) + (0))) /\ ((((exists fs_h_dst_empty_constructednegative_body_terminal. fs_h_dst_empty_constructednegative_body_terminal + S (dst_negative_sum_empty_constructed) = S ((S (0)) * fs_v_dst_empty_constructednegative)) /\ exists fs_q_dst_empty_constructednegative_body_terminal. fs_u_dst_empty_constructednegative = fs_q_dst_empty_constructednegative_body_terminal * S ((S (0)) * fs_v_dst_empty_constructednegative) + (dst_negative_sum_empty_constructed))) /\ forall fs_i_dst_empty_constructednegative_body_steps. (exists fs_lt_dst_empty_constructednegative_body_steps_bound. fs_lt_dst_empty_constructednegative_body_steps_bound + S fs_i_dst_empty_constructednegative_body_steps = 0) -> exists fs_a_dst_empty_constructednegative_body_steps fs_r_dst_empty_constructednegative_body_steps fs_s_dst_empty_constructednegative_body_steps. ((((exists fs_h_dst_empty_constructednegative_body_steps_summand. fs_h_dst_empty_constructednegative_body_steps_summand + S (fs_a_dst_empty_constructednegative_body_steps) = S ((S (fs_i_dst_empty_constructednegative_body_steps)) * dst_negative_scale_empty_constructed)) /\ exists fs_q_dst_empty_constructednegative_body_steps_summand. dst_negative_code_empty_constructed = fs_q_dst_empty_constructednegative_body_steps_summand * S ((S (fs_i_dst_empty_constructednegative_body_steps)) * dst_negative_scale_empty_constructed) + (fs_a_dst_empty_constructednegative_body_steps))) /\ ((((exists fs_h_dst_empty_constructednegative_body_steps_partial. fs_h_dst_empty_constructednegative_body_steps_partial + S (fs_r_dst_empty_constructednegative_body_steps) = S ((S (fs_i_dst_empty_constructednegative_body_steps)) * fs_v_dst_empty_constructednegative)) /\ exists fs_q_dst_empty_constructednegative_body_steps_partial. fs_u_dst_empty_constructednegative = fs_q_dst_empty_constructednegative_body_steps_partial * S ((S (fs_i_dst_empty_constructednegative_body_steps)) * fs_v_dst_empty_constructednegative) + (fs_r_dst_empty_constructednegative_body_steps))) /\ ((((exists fs_h_dst_empty_constructednegative_body_steps_successor. fs_h_dst_empty_constructednegative_body_steps_successor + S (fs_s_dst_empty_constructednegative_body_steps) = S ((S (S fs_i_dst_empty_constructednegative_body_steps)) * fs_v_dst_empty_constructednegative)) /\ exists fs_q_dst_empty_constructednegative_body_steps_successor. fs_u_dst_empty_constructednegative = fs_q_dst_empty_constructednegative_body_steps_successor * S ((S (S fs_i_dst_empty_constructednegative_body_steps)) * fs_v_dst_empty_constructednegative) + (fs_s_dst_empty_constructednegative_body_steps))) /\ fs_s_dst_empty_constructednegative_body_steps = fs_r_dst_empty_constructednegative_body_steps + fs_a_dst_empty_constructednegative_body_steps)))))) /\ (exists ge_balance_positive_empty_constructedresult ge_balance_negative_empty_constructedresult. (((((z) = 2 * (ge_balance_positive_empty_constructedresult) /\ (ge_balance_negative_empty_constructedresult) = 0) \/ exists ge_signed_half_empty_constructedresultdecode. (((z) = 2 * ge_signed_half_empty_constructedresultdecode + 1 /\ (ge_balance_positive_empty_constructedresult) = 0) /\ (ge_balance_negative_empty_constructedresult) = S ge_signed_half_empty_constructedresultdecode))) /\ ((dst_positive_sum_empty_constructed) + ge_balance_negative_empty_constructedresult = (dst_negative_sum_empty_constructed) + ge_balance_positive_empty_constructedresult))))))))) - 0008
specialize divisor_signed_sum_exists_from_components (F) - 0009
specialize divisor_signed_sum_exists_from_components (pb) - 0010
specialize divisor_signed_sum_exists_from_components (pc) - 0011
specialize divisor_signed_sum_exists_from_components (nb) - 0012
specialize divisor_signed_sum_exists_from_components (nc) - 0013
specialize divisor_signed_sum_exists_from_components (0) - 0014
apply divisor_signed_sum_exists_from_components - 0015
exact hrep - 0016
cases hz - 0017
have heq : x = 0 - 0018
specialize divisor_signed_sum_empty_value (F) - 0019
specialize divisor_signed_sum_empty_value (x) - 0020
apply divisor_signed_sum_empty_value - 0021
exact hz_witness - 0022
rewrite heq at hz_witness - 0023
rewrite heq at hz_witness - 0024
exact hz_witness