Exact expanded PA statement
forall b c l. exists fs_u_trace fs_v_trace. ((((exists fs_h_trace_start. fs_h_trace_start + S (0) = S ((S (0)) * fs_v_trace)) /\ exists fs_q_trace_start. fs_u_trace = fs_q_trace_start * S ((S (0)) * fs_v_trace) + (0))) /\ forall fs_i_trace_steps. (exists fs_lt_trace_steps_bound. fs_lt_trace_steps_bound + S fs_i_trace_steps = l) -> exists fs_a_trace_steps fs_r_trace_steps fs_s_trace_steps. ((((exists fs_h_trace_steps_summand. fs_h_trace_steps_summand + S (fs_a_trace_steps) = S ((S (fs_i_trace_steps)) * c)) /\ exists fs_q_trace_steps_summand. b = fs_q_trace_steps_summand * S ((S (fs_i_trace_steps)) * c) + (fs_a_trace_steps))) /\ ((((exists fs_h_trace_steps_partial. fs_h_trace_steps_partial + S (fs_r_trace_steps) = S ((S (fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_partial. fs_u_trace = fs_q_trace_steps_partial * S ((S (fs_i_trace_steps)) * fs_v_trace) + (fs_r_trace_steps))) /\ ((((exists fs_h_trace_steps_successor. fs_h_trace_steps_successor + S (fs_s_trace_steps) = S ((S (S fs_i_trace_steps)) * fs_v_trace)) /\ exists fs_q_trace_steps_successor. fs_u_trace = fs_q_trace_steps_successor * S ((S (S fs_i_trace_steps)) * fs_v_trace) + (fs_s_trace_steps))) /\ fs_s_trace_steps = fs_r_trace_steps + fs_a_trace_steps))))Structural proof guide
Generated structural guide
Every decoded beta prefix admits an exact beta-coded prefix-sum trace.
Use the direct prerequisites beta_at_self_of_bound, add_eq_zero_right, succ_ne_zero, beta_at_exists, beta_prefix_extend, zero_le, succ_le_succ, le_refl, le_of_succ_le_succ, le_eq_or_lt, one_mul as previously established PA formulas.
The proof proceeds by structural induction (1), case analysis (16), intermediate claims (10), equality transport (7).
Referenced ingredients
Proof neighborhood
Direct dependencies
PA003E beta_at_self_of_bound PA0004 add_eq_zero_right PA0005 succ_ne_zero PA0029 beta_at_exists PA002X beta_prefix_extend PA003F zero_le PA002K succ_le_succ PA001A le_refl PA000V le_of_succ_le_succ PA000W le_eq_or_lt PA000M one_mulDirect dependents
Formal native tactic body
Dependencies are introduced as named hypotheses before line 1. Linked names are exact direct references. This Stable checked-use theorem is independently kernel-checked when replayed.
- 0001
intro b - 0002
intro c - 0003
induction l - 0004
exists 0 - 0005
exists 1 - 0006
split - 0007
specialize beta_at_self_of_bound 1 - 0008
specialize beta_at_self_of_bound 0 - 0009
specialize beta_at_self_of_bound 0 - 0010
apply beta_at_self_of_bound - 0011
specialize one_mul 1 - 0012
rewrite one_mul - 0013
specialize succ_le_succ 0 - 0014
specialize succ_le_succ (S 0) - 0015
apply succ_le_succ - 0016
specialize zero_le (S 0) - 0017
exact zero_le - 0018
intro i - 0019
intro hi - 0020
exfalso - 0021
cases hi - 0022
have hsi0 : S i = 0 - 0023
specialize add_eq_zero_right x - 0024
specialize add_eq_zero_right (S i) - 0025
apply add_eq_zero_right - 0026
exact hi_witness - 0027
specialize succ_ne_zero i - 0028
apply succ_ne_zero - 0029
exact hsi0 - 0030
have htrace : exists fs_u_induction fs_v_induction. ((((exists fs_h_induction_start. fs_h_induction_start + S (0) = S ((S (0)) * fs_v_induction)) /\ exists fs_q_induction_start. fs_u_induction = fs_q_induction_start * S ((S (0)) * fs_v_induction) + (0))) /\ forall fs_i_induction_steps. (exists fs_lt_induction_steps_bound. fs_lt_induction_steps_bound + S fs_i_induction_steps = l) -> exists fs_a_induction_steps fs_r_induction_steps fs_s_induction_steps. ((((exists fs_h_induction_steps_summand. fs_h_induction_steps_summand + S (fs_a_induction_steps) = S ((S (fs_i_induction_steps)) * c)) /\ exists fs_q_induction_steps_summand. b = fs_q_induction_steps_summand * S ((S (fs_i_induction_steps)) * c) + (fs_a_induction_steps))) /\ ((((exists fs_h_induction_steps_partial. fs_h_induction_steps_partial + S (fs_r_induction_steps) = S ((S (fs_i_induction_steps)) * fs_v_induction)) /\ exists fs_q_induction_steps_partial. fs_u_induction = fs_q_induction_steps_partial * S ((S (fs_i_induction_steps)) * fs_v_induction) + (fs_r_induction_steps))) /\ ((((exists fs_h_induction_steps_successor. fs_h_induction_steps_successor + S (fs_s_induction_steps) = S ((S (S fs_i_induction_steps)) * fs_v_induction)) /\ exists fs_q_induction_steps_successor. fs_u_induction = fs_q_induction_steps_successor * S ((S (S fs_i_induction_steps)) * fs_v_induction) + (fs_s_induction_steps))) /\ fs_s_induction_steps = fs_r_induction_steps + fs_a_induction_steps)))) - 0031
apply IH - 0032
cases htrace - 0033
cases htrace_witness - 0034
cases htrace_witness_witness - 0035
have hfactor : exists p. ((exists fs_h_trace_factor. fs_h_trace_factor + S (p) = S ((S (l)) * c)) /\ exists fs_q_trace_factor. b = fs_q_trace_factor * S ((S (l)) * c) + (p)) - 0036
specialize beta_at_exists b - 0037
specialize beta_at_exists c - 0038
specialize beta_at_exists l - 0039
exact beta_at_exists - 0040
cases hfactor - 0041
have hlast : exists r. ((exists fs_h_trace_last. fs_h_trace_last + S (r) = S ((S (l)) * x1)) /\ exists fs_q_trace_last. x = fs_q_trace_last * S ((S (l)) * x1) + (r)) - 0042
specialize beta_at_exists x - 0043
specialize beta_at_exists x1 - 0044
specialize beta_at_exists l - 0045
exact beta_at_exists - 0046
cases hlast - 0047
have hext : exists z v. ((((exists fs_h_trace_extension. fs_h_trace_extension + S (x3 + x2) = S ((S (S l)) * v)) /\ exists fs_q_trace_extension. z = fs_q_trace_extension * S ((S (S l)) * v) + (x3 + x2))) /\ forall i a. (exists h. h + S i = S l) -> (((exists fs_h_trace_old. fs_h_trace_old + S (a) = S ((S (i)) * x1)) /\ exists fs_q_trace_old. x = fs_q_trace_old * S ((S (i)) * x1) + (a))) -> (((exists fs_h_trace_new. fs_h_trace_new + S (a) = S ((S (i)) * v)) /\ exists fs_q_trace_new. z = fs_q_trace_new * S ((S (i)) * v) + (a)))) - 0048
specialize beta_prefix_extend (S l) - 0049
specialize beta_prefix_extend x - 0050
specialize beta_prefix_extend x1 - 0051
specialize beta_prefix_extend (x3 + x2) - 0052
exact beta_prefix_extend - 0053
cases hext - 0054
cases hext_witness - 0055
cases hext_witness_witness - 0056
exists x4 - 0057
exists x5 - 0058
split - 0059
specialize hext_witness_witness_right 0 - 0060
specialize hext_witness_witness_right 0 - 0061
apply hext_witness_witness_right - 0062
have h0 : exists h. h + S 0 = S l - 0063
have hzero : exists h. h + 0 = l - 0064
specialize zero_le l - 0065
exact zero_le - 0066
specialize succ_le_succ 0 - 0067
specialize succ_le_succ l - 0068
apply succ_le_succ - 0069
exact hzero - 0070
exact h0 - 0071
exact htrace_witness_witness_left - 0072
intro i - 0073
intro hi - 0074
have hil : exists h. h + i = l - 0075
specialize le_of_succ_le_succ i - 0076
specialize le_of_succ_le_succ l - 0077
apply le_of_succ_le_succ - 0078
exact hi - 0079
have hsplit : i = l \/ exists h. h + S i = l - 0080
specialize le_eq_or_lt i - 0081
specialize le_eq_or_lt l - 0082
apply le_eq_or_lt - 0083
exact hil - 0084
cases hsplit - 0085
exists x2 - 0086
exists x3 - 0087
exists x3 + x2 - 0088
split - 0089
rewrite hsplit_left - 0090
rewrite hsplit_left - 0091
exact hfactor_witness - 0092
split - 0093
rewrite hsplit_left - 0094
rewrite hsplit_left - 0095
specialize hext_witness_witness_right l - 0096
specialize hext_witness_witness_right x3 - 0097
apply hext_witness_witness_right - 0098
specialize le_refl (S l) - 0099
exact le_refl - 0100
exact hlast_witness - 0101
split - 0102
rewrite hsplit_left - 0103
rewrite hsplit_left - 0104
exact hext_witness_witness_left - 0105
refl - 0106
have hold : exists p r s. ((((exists fs_h_trace_hold_factor. fs_h_trace_hold_factor + S (p) = S ((S (i)) * c)) /\ exists fs_q_trace_hold_factor. b = fs_q_trace_hold_factor * S ((S (i)) * c) + (p))) /\ ((((exists fs_h_trace_hold_partial. fs_h_trace_hold_partial + S (r) = S ((S (i)) * x1)) /\ exists fs_q_trace_hold_partial. x = fs_q_trace_hold_partial * S ((S (i)) * x1) + (r))) /\ ((((exists fs_h_trace_hold_successor. fs_h_trace_hold_successor + S (s) = S ((S (S i)) * x1)) /\ exists fs_q_trace_hold_successor. x = fs_q_trace_hold_successor * S ((S (S i)) * x1) + (s))) /\ s = r + p))) - 0107
specialize htrace_witness_witness_right i - 0108
apply htrace_witness_witness_right - 0109
exact hsplit_right - 0110
cases hold - 0111
cases hold_witness - 0112
cases hold_witness_witness - 0113
cases hold_witness_witness_witness - 0114
cases hold_witness_witness_witness_right - 0115
cases hold_witness_witness_witness_right_right - 0116
exists x6 - 0117
exists x7 - 0118
exists x8 - 0119
split - 0120
exact hold_witness_witness_witness_left - 0121
split - 0122
specialize hext_witness_witness_right i - 0123
specialize hext_witness_witness_right x7 - 0124
apply hext_witness_witness_right - 0125
exact hi - 0126
exact hold_witness_witness_witness_right_left - 0127
split - 0128
specialize hext_witness_witness_right (S i) - 0129
specialize hext_witness_witness_right x8 - 0130
apply hext_witness_witness_right - 0131
specialize succ_le_succ (S i) - 0132
specialize succ_le_succ l - 0133
apply succ_le_succ - 0134
exact hsplit_right - 0135
exact hold_witness_witness_witness_right_right_left - 0136
exact hold_witness_witness_witness_right_right_right