PA00EL

beta_repeat_sum_exists_exact

Alpha v16 checked-use theorem · independently closed; not Stable

Every value and length admit a constant prefix with its exact sum.

Exact expanded PA statement

forall a l. exists b c n. (forall ff_i_repeatsum_exists_repeat. (exists ff_lt_repeatsum_exists_repeat_bound. ff_lt_repeatsum_exists_repeat_bound + S ff_i_repeatsum_exists_repeat = l) -> (((exists ff_h_repeatsum_exists_repeat_decoded. ff_h_repeatsum_exists_repeat_decoded + S (a) = S ((S (ff_i_repeatsum_exists_repeat)) * c)) /\ exists ff_q_repeatsum_exists_repeat_decoded. b = ff_q_repeatsum_exists_repeat_decoded * S ((S (ff_i_repeatsum_exists_repeat)) * c) + (a)))) /\ ((exists ff_u_repeatsum_exists_sum ff_v_repeatsum_exists_sum. ((((exists ff_h_repeatsum_exists_sum_start. ff_h_repeatsum_exists_sum_start + S (0) = S ((S (0)) * ff_v_repeatsum_exists_sum)) /\ exists ff_q_repeatsum_exists_sum_start. ff_u_repeatsum_exists_sum = ff_q_repeatsum_exists_sum_start * S ((S (0)) * ff_v_repeatsum_exists_sum) + (0))) /\ ((((exists ff_h_repeatsum_exists_sum_terminal. ff_h_repeatsum_exists_sum_terminal + S (n) = S ((S (l)) * ff_v_repeatsum_exists_sum)) /\ exists ff_q_repeatsum_exists_sum_terminal. ff_u_repeatsum_exists_sum = ff_q_repeatsum_exists_sum_terminal * S ((S (l)) * ff_v_repeatsum_exists_sum) + (n))) /\ forall ff_i_repeatsum_exists_sum. (exists ff_lt_repeatsum_exists_sum_bound. ff_lt_repeatsum_exists_sum_bound + S ff_i_repeatsum_exists_sum = l) -> exists ff_a_repeatsum_exists_sum ff_r_repeatsum_exists_sum ff_s_repeatsum_exists_sum. ((((exists ff_h_repeatsum_exists_sum_summand. ff_h_repeatsum_exists_sum_summand + S (ff_a_repeatsum_exists_sum) = S ((S (ff_i_repeatsum_exists_sum)) * c)) /\ exists ff_q_repeatsum_exists_sum_summand. b = ff_q_repeatsum_exists_sum_summand * S ((S (ff_i_repeatsum_exists_sum)) * c) + (ff_a_repeatsum_exists_sum))) /\ ((((exists ff_h_repeatsum_exists_sum_partial. ff_h_repeatsum_exists_sum_partial + S (ff_r_repeatsum_exists_sum) = S ((S (ff_i_repeatsum_exists_sum)) * ff_v_repeatsum_exists_sum)) /\ exists ff_q_repeatsum_exists_sum_partial. ff_u_repeatsum_exists_sum = ff_q_repeatsum_exists_sum_partial * S ((S (ff_i_repeatsum_exists_sum)) * ff_v_repeatsum_exists_sum) + (ff_r_repeatsum_exists_sum))) /\ ((((exists ff_h_repeatsum_exists_sum_successor. ff_h_repeatsum_exists_sum_successor + S (ff_s_repeatsum_exists_sum) = S ((S (S ff_i_repeatsum_exists_sum)) * ff_v_repeatsum_exists_sum)) /\ exists ff_q_repeatsum_exists_sum_successor. ff_u_repeatsum_exists_sum = ff_q_repeatsum_exists_sum_successor * S ((S (S ff_i_repeatsum_exists_sum)) * ff_v_repeatsum_exists_sum) + (ff_s_repeatsum_exists_sum))) /\ ff_s_repeatsum_exists_sum = ff_r_repeatsum_exists_sum + ff_a_repeatsum_exists_sum)))))) /\ n = l * a)

Structural proof guide

Generated structural guide

Every value and length admit a constant prefix with its exact sum.

Use the direct prerequisites beta_repeat_exists, beta_sum_exists, beta_repeat_sum_exact as previously established PA formulas.

The proof proceeds by case analysis (3), intermediate claims (3).

Referenced ingredients

Proof neighborhood

Direct dependencies

Direct dependents

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Linked names are exact direct references. This Alpha-v16 checked-use theorem is independently kernel-checked when replayed; it is not a Stable theorem.

  1. 0001intro a
  2. 0002intro l
  3. 0003have hrepeat : exists b c. (forall ff_i_repeatsum_exists_repeat. (exists ff_lt_repeatsum_exists_repeat_bound. ff_lt_repeatsum_exists_repeat_bound + S ff_i_repeatsum_exists_repeat = l) -> (((exists ff_h_repeatsum_exists_repeat_decoded. ff_h_repeatsum_exists_repeat_decoded + S (a) = S ((S (ff_i_repeatsum_exists_repeat)) * c)) /\ exists ff_q_repeatsum_exists_repeat_decoded. b = ff_q_repeatsum_exists_repeat_decoded * S ((S (ff_i_repeatsum_exists_repeat)) * c) + (a))))
  4. 0004specialize beta_repeat_exists a
  5. 0005specialize beta_repeat_exists l
  6. 0006exact beta_repeat_exists
  7. 0007cases hrepeat
  8. 0008cases hrepeat_witness
  9. 0009have hsum : exists n. (exists ff_u_repeatsum_exists_trace ff_v_repeatsum_exists_trace. ((((exists ff_h_repeatsum_exists_trace_start. ff_h_repeatsum_exists_trace_start + S (0) = S ((S (0)) * ff_v_repeatsum_exists_trace)) /\ exists ff_q_repeatsum_exists_trace_start. ff_u_repeatsum_exists_trace = ff_q_repeatsum_exists_trace_start * S ((S (0)) * ff_v_repeatsum_exists_trace) + (0))) /\ ((((exists ff_h_repeatsum_exists_trace_terminal. ff_h_repeatsum_exists_trace_terminal + S (n) = S ((S (l)) * ff_v_repeatsum_exists_trace)) /\ exists ff_q_repeatsum_exists_trace_terminal. ff_u_repeatsum_exists_trace = ff_q_repeatsum_exists_trace_terminal * S ((S (l)) * ff_v_repeatsum_exists_trace) + (n))) /\ forall ff_i_repeatsum_exists_trace. (exists ff_lt_repeatsum_exists_trace_bound. ff_lt_repeatsum_exists_trace_bound + S ff_i_repeatsum_exists_trace = l) -> exists ff_a_repeatsum_exists_trace ff_r_repeatsum_exists_trace ff_s_repeatsum_exists_trace. ((((exists ff_h_repeatsum_exists_trace_summand. ff_h_repeatsum_exists_trace_summand + S (ff_a_repeatsum_exists_trace) = S ((S (ff_i_repeatsum_exists_trace)) * x1)) /\ exists ff_q_repeatsum_exists_trace_summand. x = ff_q_repeatsum_exists_trace_summand * S ((S (ff_i_repeatsum_exists_trace)) * x1) + (ff_a_repeatsum_exists_trace))) /\ ((((exists ff_h_repeatsum_exists_trace_partial. ff_h_repeatsum_exists_trace_partial + S (ff_r_repeatsum_exists_trace) = S ((S (ff_i_repeatsum_exists_trace)) * ff_v_repeatsum_exists_trace)) /\ exists ff_q_repeatsum_exists_trace_partial. ff_u_repeatsum_exists_trace = ff_q_repeatsum_exists_trace_partial * S ((S (ff_i_repeatsum_exists_trace)) * ff_v_repeatsum_exists_trace) + (ff_r_repeatsum_exists_trace))) /\ ((((exists ff_h_repeatsum_exists_trace_successor. ff_h_repeatsum_exists_trace_successor + S (ff_s_repeatsum_exists_trace) = S ((S (S ff_i_repeatsum_exists_trace)) * ff_v_repeatsum_exists_trace)) /\ exists ff_q_repeatsum_exists_trace_successor. ff_u_repeatsum_exists_trace = ff_q_repeatsum_exists_trace_successor * S ((S (S ff_i_repeatsum_exists_trace)) * ff_v_repeatsum_exists_trace) + (ff_s_repeatsum_exists_trace))) /\ ff_s_repeatsum_exists_trace = ff_r_repeatsum_exists_trace + ff_a_repeatsum_exists_trace))))))
  10. 0010specialize beta_sum_exists x
  11. 0011specialize beta_sum_exists x1
  12. 0012specialize beta_sum_exists l
  13. 0013exact beta_sum_exists
  14. 0014cases hsum
  15. 0015have hexact : x2 = l * a
  16. 0016specialize beta_repeat_sum_exact x
  17. 0017specialize beta_repeat_sum_exact x1
  18. 0018specialize beta_repeat_sum_exact a
  19. 0019specialize beta_repeat_sum_exact l
  20. 0020specialize beta_repeat_sum_exact x2
  21. 0021apply beta_repeat_sum_exact
  22. 0022exact hrepeat_witness_witness
  23. 0023exact hsum_witness
  24. 0024exists x
  25. 0025exists x1
  26. 0026exists x2
  27. 0027split
  28. 0028exact hrepeat_witness_witness
  29. 0029split
  30. 0030exact hsum_witness
  31. 0031exact hexact