PA00AU

beta_prefix_append_two_nonendpoint

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

A two-entry append preserves the nonendpoint invariant when both appended values satisfy it.

Exact expanded PA statement

forall b c z d l n a e. (((((exists wpo_beta_height_nonendpoint_trace_first. wpo_beta_height_nonendpoint_trace_first + S (a) = S ((S (l)) * d)) /\ exists wpo_beta_quotient_nonendpoint_trace_first. z = wpo_beta_quotient_nonendpoint_trace_first * S ((S (l)) * d) + (a))) /\ ((((exists wpo_beta_height_nonendpoint_trace_second. wpo_beta_height_nonendpoint_trace_second + S (e) = S ((S (S (l))) * d)) /\ exists wpo_beta_quotient_nonendpoint_trace_second. z = wpo_beta_quotient_nonendpoint_trace_second * S ((S (S (l))) * d) + (e))) /\ (forall wpo_old_index_nonendpoint_trace wpo_old_value_nonendpoint_trace. (exists wpo_gap_nonendpoint_trace_old_bound. wpo_gap_nonendpoint_trace_old_bound + S (wpo_old_index_nonendpoint_trace) = l) -> (((exists wpo_beta_height_nonendpoint_trace_old_entry. wpo_beta_height_nonendpoint_trace_old_entry + S (wpo_old_value_nonendpoint_trace) = S ((S (wpo_old_index_nonendpoint_trace)) * c)) /\ exists wpo_beta_quotient_nonendpoint_trace_old_entry. b = wpo_beta_quotient_nonendpoint_trace_old_entry * S ((S (wpo_old_index_nonendpoint_trace)) * c) + (wpo_old_value_nonendpoint_trace))) -> (((exists wpo_beta_height_nonendpoint_trace_new_entry. wpo_beta_height_nonendpoint_trace_new_entry + S (wpo_old_value_nonendpoint_trace) = S ((S (wpo_old_index_nonendpoint_trace)) * d)) /\ exists wpo_beta_quotient_nonendpoint_trace_new_entry. z = wpo_beta_quotient_nonendpoint_trace_new_entry * S ((S (wpo_old_index_nonendpoint_trace)) * d) + (wpo_old_value_nonendpoint_trace))))))) -> (forall wpo_position_nonendpoint_before wpo_value_nonendpoint_before. (exists wpo_gap_nonendpoint_before_position_bound. wpo_gap_nonendpoint_before_position_bound + S (wpo_position_nonendpoint_before) = l) -> (((exists wpo_beta_height_nonendpoint_before_entry. wpo_beta_height_nonendpoint_before_entry + S (wpo_value_nonendpoint_before) = S ((S (wpo_position_nonendpoint_before)) * c)) /\ exists wpo_beta_quotient_nonendpoint_before_entry. b = wpo_beta_quotient_nonendpoint_before_entry * S ((S (wpo_position_nonendpoint_before)) * c) + (wpo_value_nonendpoint_before))) -> (~(wpo_value_nonendpoint_before = 0) /\ ~((S wpo_value_nonendpoint_before) = n))) -> ((~(a = 0) /\ ~((S a) = n))) -> ((~(e = 0) /\ ~((S e) = n))) -> (forall wpo_position_nonendpoint_after wpo_value_nonendpoint_after. (exists wpo_gap_nonendpoint_after_position_bound. wpo_gap_nonendpoint_after_position_bound + S (wpo_position_nonendpoint_after) = S (S l)) -> (((exists wpo_beta_height_nonendpoint_after_entry. wpo_beta_height_nonendpoint_after_entry + S (wpo_value_nonendpoint_after) = S ((S (wpo_position_nonendpoint_after)) * d)) /\ exists wpo_beta_quotient_nonendpoint_after_entry. z = wpo_beta_quotient_nonendpoint_after_entry * S ((S (wpo_position_nonendpoint_after)) * d) + (wpo_value_nonendpoint_after))) -> (~(wpo_value_nonendpoint_after = 0) /\ ~((S wpo_value_nonendpoint_after) = n)))

Structural proof guide

Generated structural guide

A two-entry append preserves the nonendpoint invariant when both appended values satisfy it.

Use the direct prerequisites beta_prefix_append_two_reflect as previously established PA formulas.

The proof proceeds by case analysis (5), intermediate claims (2), equality transport (4).

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 b
  2. 0002intro c
  3. 0003intro z
  4. 0004intro d
  5. 0005intro l
  6. 0006intro n
  7. 0007intro a
  8. 0008intro e
  9. 0009intro htrace
  10. 0010intro hold_nonendpoint
  11. 0011intro hfirst_nonendpoint
  12. 0012intro hsecond_nonendpoint
  13. 0013intro q
  14. 0014intro s
  15. 0015intro hq
  16. 0016intro hentry
  17. 0017have hreflect_all : forall q s. (exists wpo_gap_nonendpoint_reflection_bound. wpo_gap_nonendpoint_reflection_bound + S (q) = S (S l)) -> (((exists wpo_beta_height_nonendpoint_reflection_entry. wpo_beta_height_nonendpoint_reflection_entry + S (s) = S ((S (q)) * d)) /\ exists wpo_beta_quotient_nonendpoint_reflection_entry. z = wpo_beta_quotient_nonendpoint_reflection_entry * S ((S (q)) * d) + (s))) -> (((q = S (l) /\ s = e) \/ ((q = l /\ s = a) \/ ((exists wpo_gap_nonendpoint_reflection_old_bound. wpo_gap_nonendpoint_reflection_old_bound + S (q) = l) /\ (((exists wpo_beta_height_nonendpoint_reflection_old_entry. wpo_beta_height_nonendpoint_reflection_old_entry + S (s) = S ((S (q)) * c)) /\ exists wpo_beta_quotient_nonendpoint_reflection_old_entry. b = wpo_beta_quotient_nonendpoint_reflection_old_entry * S ((S (q)) * c) + (s)))))))
  18. 0018specialize beta_prefix_append_two_reflect b
  19. 0019specialize beta_prefix_append_two_reflect c
  20. 0020specialize beta_prefix_append_two_reflect z
  21. 0021specialize beta_prefix_append_two_reflect d
  22. 0022specialize beta_prefix_append_two_reflect l
  23. 0023specialize beta_prefix_append_two_reflect a
  24. 0024specialize beta_prefix_append_two_reflect e
  25. 0025apply beta_prefix_append_two_reflect
  26. 0026exact htrace
  27. 0027have hreflect : ((q = S (l) /\ s = e) \/ ((q = l /\ s = a) \/ ((exists wpo_gap_nonendpoint_reflection_old_bound. wpo_gap_nonendpoint_reflection_old_bound + S (q) = l) /\ (((exists wpo_beta_height_nonendpoint_reflection_old_entry. wpo_beta_height_nonendpoint_reflection_old_entry + S (s) = S ((S (q)) * c)) /\ exists wpo_beta_quotient_nonendpoint_reflection_old_entry. b = wpo_beta_quotient_nonendpoint_reflection_old_entry * S ((S (q)) * c) + (s))))))
  28. 0028specialize hreflect_all q
  29. 0029specialize hreflect_all s
  30. 0030apply hreflect_all
  31. 0031exact hq
  32. 0032exact hentry
  33. 0033cases hreflect
  34. 0034cases hreflect_left
  35. 0035rewrite hreflect_left_right
  36. 0036rewrite hreflect_left_right
  37. 0037exact hsecond_nonendpoint
  38. 0038cases hreflect_right
  39. 0039cases hreflect_right_left
  40. 0040rewrite hreflect_right_left_right
  41. 0041rewrite hreflect_right_left_right
  42. 0042exact hfirst_nonendpoint
  43. 0043cases hreflect_right_right
  44. 0044specialize hold_nonendpoint q
  45. 0045specialize hold_nonendpoint s
  46. 0046apply hold_nonendpoint
  47. 0047exact hreflect_right_right_left
  48. 0048exact hreflect_right_right_right