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.
- 0001
intro b - 0002
intro c - 0003
intro z - 0004
intro d - 0005
intro l - 0006
intro n - 0007
intro a - 0008
intro e - 0009
intro htrace - 0010
intro hold_nonendpoint - 0011
intro hfirst_nonendpoint - 0012
intro hsecond_nonendpoint - 0013
intro q - 0014
intro s - 0015
intro hq - 0016
intro hentry - 0017
have 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))))))) - 0018
specialize beta_prefix_append_two_reflect b - 0019
specialize beta_prefix_append_two_reflect c - 0020
specialize beta_prefix_append_two_reflect z - 0021
specialize beta_prefix_append_two_reflect d - 0022
specialize beta_prefix_append_two_reflect l - 0023
specialize beta_prefix_append_two_reflect a - 0024
specialize beta_prefix_append_two_reflect e - 0025
apply beta_prefix_append_two_reflect - 0026
exact htrace - 0027
have 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)))))) - 0028
specialize hreflect_all q - 0029
specialize hreflect_all s - 0030
apply hreflect_all - 0031
exact hq - 0032
exact hentry - 0033
cases hreflect - 0034
cases hreflect_left - 0035
rewrite hreflect_left_right - 0036
rewrite hreflect_left_right - 0037
exact hsecond_nonendpoint - 0038
cases hreflect_right - 0039
cases hreflect_right_left - 0040
rewrite hreflect_right_left_right - 0041
rewrite hreflect_right_left_right - 0042
exact hfirst_nonendpoint - 0043
cases hreflect_right_right - 0044
specialize hold_nonendpoint q - 0045
specialize hold_nonendpoint s - 0046
apply hold_nonendpoint - 0047
exact hreflect_right_right_left - 0048
exact hreflect_right_right_right