Exact expanded PA statement
forall bb bc sb sc w r. (forall bcf_row_index_bptpe_before. (exists bcf_lt_gap_bptpe_before_row_bound. bcf_lt_gap_bptpe_before_row_bound + S (bcf_row_index_bptpe_before) = r) -> exists bcf_row_code_bptpe_before bcf_row_scale_bptpe_before. ((((exists bcf_height_bptpe_before_decoded_row_code. bcf_height_bptpe_before_decoded_row_code + S (bcf_row_code_bptpe_before) = S ((S (bcf_row_index_bptpe_before)) * bc)) /\ exists bcf_quotient_bptpe_before_decoded_row_code. bb = bcf_quotient_bptpe_before_decoded_row_code * S ((S (bcf_row_index_bptpe_before)) * bc) + (bcf_row_code_bptpe_before))) /\ ((((exists bcf_height_bptpe_before_decoded_row_scale. bcf_height_bptpe_before_decoded_row_scale + S (bcf_row_scale_bptpe_before) = S ((S (bcf_row_index_bptpe_before)) * sc)) /\ exists bcf_quotient_bptpe_before_decoded_row_scale. sb = bcf_quotient_bptpe_before_decoded_row_scale * S ((S (bcf_row_index_bptpe_before)) * sc) + (bcf_row_scale_bptpe_before))) /\ ((bcf_row_index_bptpe_before = 0 /\ (forall bcf_index_bptpe_before_zero_row. (exists bcf_lt_gap_bptpe_before_zero_row_bound. bcf_lt_gap_bptpe_before_zero_row_bound + S (bcf_index_bptpe_before_zero_row) = w) -> exists bcf_value_bptpe_before_zero_row. ((((exists bcf_height_bptpe_before_zero_row_entry. bcf_height_bptpe_before_zero_row_entry + S (bcf_value_bptpe_before_zero_row) = S ((S (bcf_index_bptpe_before_zero_row)) * bcf_row_scale_bptpe_before)) /\ exists bcf_quotient_bptpe_before_zero_row_entry. bcf_row_code_bptpe_before = bcf_quotient_bptpe_before_zero_row_entry * S ((S (bcf_index_bptpe_before_zero_row)) * bcf_row_scale_bptpe_before) + (bcf_value_bptpe_before_zero_row))) /\ ((bcf_index_bptpe_before_zero_row = 0 /\ bcf_value_bptpe_before_zero_row = 1) \/ exists bcf_predecessor_bptpe_before_zero_row. bcf_index_bptpe_before_zero_row = S bcf_predecessor_bptpe_before_zero_row /\ bcf_value_bptpe_before_zero_row = 0)))) \/ exists bcf_predecessor_bptpe_before bcf_previous_code_bptpe_before bcf_previous_scale_bptpe_before. bcf_row_index_bptpe_before = S bcf_predecessor_bptpe_before /\ ((((exists bcf_height_bptpe_before_decoded_previous_code. bcf_height_bptpe_before_decoded_previous_code + S (bcf_previous_code_bptpe_before) = S ((S (bcf_predecessor_bptpe_before)) * bc)) /\ exists bcf_quotient_bptpe_before_decoded_previous_code. bb = bcf_quotient_bptpe_before_decoded_previous_code * S ((S (bcf_predecessor_bptpe_before)) * bc) + (bcf_previous_code_bptpe_before))) /\ ((((exists bcf_height_bptpe_before_decoded_previous_scale. bcf_height_bptpe_before_decoded_previous_scale + S (bcf_previous_scale_bptpe_before) = S ((S (bcf_predecessor_bptpe_before)) * sc)) /\ exists bcf_quotient_bptpe_before_decoded_previous_scale. sb = bcf_quotient_bptpe_before_decoded_previous_scale * S ((S (bcf_predecessor_bptpe_before)) * sc) + (bcf_previous_scale_bptpe_before))) /\ (forall bcf_index_bptpe_before_row_step. (exists bcf_lt_gap_bptpe_before_row_step_bound. bcf_lt_gap_bptpe_before_row_step_bound + S (bcf_index_bptpe_before_row_step) = w) -> exists bcf_value_bptpe_before_row_step. ((((exists bcf_height_bptpe_before_row_step_entry. bcf_height_bptpe_before_row_step_entry + S (bcf_value_bptpe_before_row_step) = S ((S (bcf_index_bptpe_before_row_step)) * bcf_row_scale_bptpe_before)) /\ exists bcf_quotient_bptpe_before_row_step_entry. bcf_row_code_bptpe_before = bcf_quotient_bptpe_before_row_step_entry * S ((S (bcf_index_bptpe_before_row_step)) * bcf_row_scale_bptpe_before) + (bcf_value_bptpe_before_row_step))) /\ ((bcf_index_bptpe_before_row_step = 0 /\ bcf_value_bptpe_before_row_step = 1) \/ exists bcf_predecessor_bptpe_before_row_step bcf_left_bptpe_before_row_step bcf_right_bptpe_before_row_step. bcf_index_bptpe_before_row_step = S bcf_predecessor_bptpe_before_row_step /\ ((((exists bcf_height_bptpe_before_row_step_previous_left. bcf_height_bptpe_before_row_step_previous_left + S (bcf_left_bptpe_before_row_step) = S ((S (bcf_predecessor_bptpe_before_row_step)) * bcf_previous_scale_bptpe_before)) /\ exists bcf_quotient_bptpe_before_row_step_previous_left. bcf_previous_code_bptpe_before = bcf_quotient_bptpe_before_row_step_previous_left * S ((S (bcf_predecessor_bptpe_before_row_step)) * bcf_previous_scale_bptpe_before) + (bcf_left_bptpe_before_row_step))) /\ ((((exists bcf_height_bptpe_before_row_step_previous_right. bcf_height_bptpe_before_row_step_previous_right + S (bcf_right_bptpe_before_row_step) = S ((S (S (bcf_predecessor_bptpe_before_row_step))) * bcf_previous_scale_bptpe_before)) /\ exists bcf_quotient_bptpe_before_row_step_previous_right. bcf_previous_code_bptpe_before = bcf_quotient_bptpe_before_row_step_previous_right * S ((S (S (bcf_predecessor_bptpe_before_row_step))) * bcf_previous_scale_bptpe_before) + (bcf_right_bptpe_before_row_step))) /\ bcf_value_bptpe_before_row_step = bcf_left_bptpe_before_row_step + bcf_right_bptpe_before_row_step))))))))))) -> exists db dc eb ec. (forall bcf_row_index_bptpe_after. (exists bcf_lt_gap_bptpe_after_row_bound. bcf_lt_gap_bptpe_after_row_bound + S (bcf_row_index_bptpe_after) = S (r)) -> exists bcf_row_code_bptpe_after bcf_row_scale_bptpe_after. ((((exists bcf_height_bptpe_after_decoded_row_code. bcf_height_bptpe_after_decoded_row_code + S (bcf_row_code_bptpe_after) = S ((S (bcf_row_index_bptpe_after)) * dc)) /\ exists bcf_quotient_bptpe_after_decoded_row_code. db = bcf_quotient_bptpe_after_decoded_row_code * S ((S (bcf_row_index_bptpe_after)) * dc) + (bcf_row_code_bptpe_after))) /\ ((((exists bcf_height_bptpe_after_decoded_row_scale. bcf_height_bptpe_after_decoded_row_scale + S (bcf_row_scale_bptpe_after) = S ((S (bcf_row_index_bptpe_after)) * ec)) /\ exists bcf_quotient_bptpe_after_decoded_row_scale. eb = bcf_quotient_bptpe_after_decoded_row_scale * S ((S (bcf_row_index_bptpe_after)) * ec) + (bcf_row_scale_bptpe_after))) /\ ((bcf_row_index_bptpe_after = 0 /\ (forall bcf_index_bptpe_after_zero_row. (exists bcf_lt_gap_bptpe_after_zero_row_bound. bcf_lt_gap_bptpe_after_zero_row_bound + S (bcf_index_bptpe_after_zero_row) = w) -> exists bcf_value_bptpe_after_zero_row. ((((exists bcf_height_bptpe_after_zero_row_entry. bcf_height_bptpe_after_zero_row_entry + S (bcf_value_bptpe_after_zero_row) = S ((S (bcf_index_bptpe_after_zero_row)) * bcf_row_scale_bptpe_after)) /\ exists bcf_quotient_bptpe_after_zero_row_entry. bcf_row_code_bptpe_after = bcf_quotient_bptpe_after_zero_row_entry * S ((S (bcf_index_bptpe_after_zero_row)) * bcf_row_scale_bptpe_after) + (bcf_value_bptpe_after_zero_row))) /\ ((bcf_index_bptpe_after_zero_row = 0 /\ bcf_value_bptpe_after_zero_row = 1) \/ exists bcf_predecessor_bptpe_after_zero_row. bcf_index_bptpe_after_zero_row = S bcf_predecessor_bptpe_after_zero_row /\ bcf_value_bptpe_after_zero_row = 0)))) \/ exists bcf_predecessor_bptpe_after bcf_previous_code_bptpe_after bcf_previous_scale_bptpe_after. bcf_row_index_bptpe_after = S bcf_predecessor_bptpe_after /\ ((((exists bcf_height_bptpe_after_decoded_previous_code. bcf_height_bptpe_after_decoded_previous_code + S (bcf_previous_code_bptpe_after) = S ((S (bcf_predecessor_bptpe_after)) * dc)) /\ exists bcf_quotient_bptpe_after_decoded_previous_code. db = bcf_quotient_bptpe_after_decoded_previous_code * S ((S (bcf_predecessor_bptpe_after)) * dc) + (bcf_previous_code_bptpe_after))) /\ ((((exists bcf_height_bptpe_after_decoded_previous_scale. bcf_height_bptpe_after_decoded_previous_scale + S (bcf_previous_scale_bptpe_after) = S ((S (bcf_predecessor_bptpe_after)) * ec)) /\ exists bcf_quotient_bptpe_after_decoded_previous_scale. eb = bcf_quotient_bptpe_after_decoded_previous_scale * S ((S (bcf_predecessor_bptpe_after)) * ec) + (bcf_previous_scale_bptpe_after))) /\ (forall bcf_index_bptpe_after_row_step. (exists bcf_lt_gap_bptpe_after_row_step_bound. bcf_lt_gap_bptpe_after_row_step_bound + S (bcf_index_bptpe_after_row_step) = w) -> exists bcf_value_bptpe_after_row_step. ((((exists bcf_height_bptpe_after_row_step_entry. bcf_height_bptpe_after_row_step_entry + S (bcf_value_bptpe_after_row_step) = S ((S (bcf_index_bptpe_after_row_step)) * bcf_row_scale_bptpe_after)) /\ exists bcf_quotient_bptpe_after_row_step_entry. bcf_row_code_bptpe_after = bcf_quotient_bptpe_after_row_step_entry * S ((S (bcf_index_bptpe_after_row_step)) * bcf_row_scale_bptpe_after) + (bcf_value_bptpe_after_row_step))) /\ ((bcf_index_bptpe_after_row_step = 0 /\ bcf_value_bptpe_after_row_step = 1) \/ exists bcf_predecessor_bptpe_after_row_step bcf_left_bptpe_after_row_step bcf_right_bptpe_after_row_step. bcf_index_bptpe_after_row_step = S bcf_predecessor_bptpe_after_row_step /\ ((((exists bcf_height_bptpe_after_row_step_previous_left. bcf_height_bptpe_after_row_step_previous_left + S (bcf_left_bptpe_after_row_step) = S ((S (bcf_predecessor_bptpe_after_row_step)) * bcf_previous_scale_bptpe_after)) /\ exists bcf_quotient_bptpe_after_row_step_previous_left. bcf_previous_code_bptpe_after = bcf_quotient_bptpe_after_row_step_previous_left * S ((S (bcf_predecessor_bptpe_after_row_step)) * bcf_previous_scale_bptpe_after) + (bcf_left_bptpe_after_row_step))) /\ ((((exists bcf_height_bptpe_after_row_step_previous_right. bcf_height_bptpe_after_row_step_previous_right + S (bcf_right_bptpe_after_row_step) = S ((S (S (bcf_predecessor_bptpe_after_row_step))) * bcf_previous_scale_bptpe_after)) /\ exists bcf_quotient_bptpe_after_row_step_previous_right. bcf_previous_code_bptpe_after = bcf_quotient_bptpe_after_row_step_previous_right * S ((S (S (bcf_predecessor_bptpe_after_row_step))) * bcf_previous_scale_bptpe_after) + (bcf_right_bptpe_after_row_step))) /\ bcf_value_bptpe_after_row_step = bcf_left_bptpe_after_row_step + bcf_right_bptpe_after_row_step)))))))))))Structural proof guide
Append one semantic Pascal row to both outer beta prefixes.
Direct prerequisites: zero_or_succ, le_refl, lt_to_le, beta_prefix_extend, finite_lt_succ_eq_or_lt, beta_pascal_zero_row_exists, beta_pascal_row_step_exists. The authored body proceeds by case analysis (46), intermediate claims (17), equality transport (12).
Proof neighborhood
Direct dependencies
BT000Q zero_or_succ BT000E le_refl BT0019 lt_to_le BT005D beta_prefix_extend BT00AA finite_lt_succ_eq_or_lt BT00T3 beta_pascal_zero_row_exists BT00T5 beta_pascal_row_step_existsDirect dependents
Formal native tactic body
Dependencies are hypotheses of this body receipt. The focused endpoint audits separately check the complete empty-context certificates.
- 0001
intro bb - 0002
intro bc - 0003
intro sb - 0004
intro sc - 0005
intro w - 0006
intro r - 0007
intro htable - 0008
specialize zero_or_succ r - 0009
cases zero_or_succ - 0010
have hzero : exists b c. (forall j. (exists gap. gap + S j = w) -> exists value. (((exists h. h + S value = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + value) /\ ((j = 0 /\ value = 1) \/ exists p. j = S p /\ value = 0))) - 0011
specialize beta_pascal_zero_row_exists w - 0012
exact beta_pascal_zero_row_exists - 0013
cases hzero - 0014
cases hzero_witness - 0015
have hcode_extend : exists db dc. ((((exists bcf_height_bptpe_code_append. bcf_height_bptpe_code_append + S (x) = S ((S (r)) * dc)) /\ exists bcf_quotient_bptpe_code_append. db = bcf_quotient_bptpe_code_append * S ((S (r)) * dc) + (x))) /\ forall i a. (exists bcf_lt_gap_bptpe_code_old_bound. bcf_lt_gap_bptpe_code_old_bound + S (i) = r) -> (((exists bcf_height_bptpe_code_old. bcf_height_bptpe_code_old + S (a) = S ((S (i)) * bc)) /\ exists bcf_quotient_bptpe_code_old. bb = bcf_quotient_bptpe_code_old * S ((S (i)) * bc) + (a))) -> (((exists bcf_height_bptpe_code_new. bcf_height_bptpe_code_new + S (a) = S ((S (i)) * dc)) /\ exists bcf_quotient_bptpe_code_new. db = bcf_quotient_bptpe_code_new * S ((S (i)) * dc) + (a)))) - 0016
specialize beta_prefix_extend r - 0017
specialize beta_prefix_extend bb - 0018
specialize beta_prefix_extend bc - 0019
specialize beta_prefix_extend x - 0020
exact beta_prefix_extend - 0021
cases hcode_extend - 0022
cases hcode_extend_witness - 0023
cases hcode_extend_witness_witness - 0024
have hscale_extend : exists eb ec. ((((exists bcf_height_bptpe_scale_append. bcf_height_bptpe_scale_append + S (x1) = S ((S (r)) * ec)) /\ exists bcf_quotient_bptpe_scale_append. eb = bcf_quotient_bptpe_scale_append * S ((S (r)) * ec) + (x1))) /\ forall i a. (exists bcf_lt_gap_bptpe_scale_old_bound. bcf_lt_gap_bptpe_scale_old_bound + S (i) = r) -> (((exists bcf_height_bptpe_scale_old. bcf_height_bptpe_scale_old + S (a) = S ((S (i)) * sc)) /\ exists bcf_quotient_bptpe_scale_old. sb = bcf_quotient_bptpe_scale_old * S ((S (i)) * sc) + (a))) -> (((exists bcf_height_bptpe_scale_new. bcf_height_bptpe_scale_new + S (a) = S ((S (i)) * ec)) /\ exists bcf_quotient_bptpe_scale_new. eb = bcf_quotient_bptpe_scale_new * S ((S (i)) * ec) + (a)))) - 0025
specialize beta_prefix_extend r - 0026
specialize beta_prefix_extend sb - 0027
specialize beta_prefix_extend sc - 0028
specialize beta_prefix_extend x1 - 0029
exact beta_prefix_extend - 0030
cases hscale_extend - 0031
cases hscale_extend_witness - 0032
cases hscale_extend_witness_witness - 0033
exists x2 - 0034
exists x3 - 0035
exists x4 - 0036
exists x5 - 0037
intro i - 0038
intro hi - 0039
have hsplit : i = r \/ exists gap. gap + S i = r - 0040
specialize finite_lt_succ_eq_or_lt r - 0041
specialize finite_lt_succ_eq_or_lt i - 0042
apply finite_lt_succ_eq_or_lt - 0043
exact hi - 0044
cases hsplit - 0045
exists x - 0046
exists x1 - 0047
split - 0048
rewrite hsplit_left - 0049
rewrite hsplit_left - 0050
exact hcode_extend_witness_witness_left - 0051
split - 0052
rewrite hsplit_left - 0053
rewrite hsplit_left - 0054
exact hscale_extend_witness_witness_left - 0055
left - 0056
split - 0057
trans r - 0058
exact hsplit_left - 0059
exact zero_or_succ_left - 0060
exact hzero_witness_witness - 0061
specialize htable i - 0062
have hold : exists b c. (((exists h. h + S b = S ((S i) * bc)) /\ exists q. bb = q * S ((S i) * bc) + b) /\ (((exists h. h + S c = S ((S i) * sc)) /\ exists q. sb = q * S ((S i) * sc) + c) /\ (((i = 0 /\ (forall j. (exists gap. gap + S j = w) -> exists value. (((exists h. h + S value = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + value) /\ ((j = 0 /\ value = 1) \/ exists p. j = S p /\ value = 0)))) \/ exists predecessor previous_code previous_scale. i = S predecessor /\ (((exists h. h + S previous_code = S ((S predecessor) * bc)) /\ exists q. bb = q * S ((S predecessor) * bc) + previous_code) /\ (((exists h. h + S previous_scale = S ((S predecessor) * sc)) /\ exists q. sb = q * S ((S predecessor) * sc) + previous_scale) /\ forall j. (exists gap. gap + S j = w) -> exists value. (((exists h. h + S value = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + value) /\ ((j = 0 /\ value = 1) \/ exists p u v. j = S p /\ (((exists h. h + S u = S ((S p) * previous_scale)) /\ exists q. previous_code = q * S ((S p) * previous_scale) + u) /\ (((exists h. h + S v = S ((S (S p)) * previous_scale)) /\ exists q. previous_code = q * S ((S (S p)) * previous_scale) + v) /\ value = u + v)))))))))) - 0063
apply htable - 0064
exact hsplit_right - 0065
cases hold - 0066
cases hold_witness - 0067
cases hold_witness_witness - 0068
cases hold_witness_witness_right - 0069
exists x6 - 0070
exists x7 - 0071
split - 0072
specialize hcode_extend_witness_witness_right i - 0073
specialize hcode_extend_witness_witness_right x6 - 0074
apply hcode_extend_witness_witness_right - 0075
exact hsplit_right - 0076
exact hold_witness_witness_left - 0077
split - 0078
specialize hscale_extend_witness_witness_right i - 0079
specialize hscale_extend_witness_witness_right x7 - 0080
apply hscale_extend_witness_witness_right - 0081
exact hsplit_right - 0082
exact hold_witness_witness_right_left - 0083
cases hold_witness_witness_right_right - 0084
left - 0085
exact hold_witness_witness_right_right_left - 0086
cases hold_witness_witness_right_right_right - 0087
cases hold_witness_witness_right_right_right_witness - 0088
cases hold_witness_witness_right_right_right_witness_witness - 0089
cases hold_witness_witness_right_right_right_witness_witness_witness - 0090
cases hold_witness_witness_right_right_right_witness_witness_witness_right - 0091
cases hold_witness_witness_right_right_right_witness_witness_witness_right_right - 0092
right - 0093
exists x8 - 0094
exists x9 - 0095
exists x10 - 0096
split - 0097
exact hold_witness_witness_right_right_right_witness_witness_witness_left - 0098
have hpred_bound : exists gap. gap + S x8 = r - 0099
have hi_le : exists gap. gap + i = r - 0100
specialize lt_to_le i - 0101
specialize lt_to_le r - 0102
apply lt_to_le - 0103
exact hsplit_right - 0104
rewrite hold_witness_witness_right_right_right_witness_witness_witness_left at hi_le - 0105
exact hi_le - 0106
split - 0107
specialize hcode_extend_witness_witness_right x8 - 0108
specialize hcode_extend_witness_witness_right x9 - 0109
apply hcode_extend_witness_witness_right - 0110
exact hpred_bound - 0111
exact hold_witness_witness_right_right_right_witness_witness_witness_right_left - 0112
split - 0113
specialize hscale_extend_witness_witness_right x8 - 0114
specialize hscale_extend_witness_witness_right x10 - 0115
apply hscale_extend_witness_witness_right - 0116
exact hpred_bound - 0117
exact hold_witness_witness_right_right_right_witness_witness_witness_right_right_left - 0118
exact hold_witness_witness_right_right_right_witness_witness_witness_right_right_right - 0119
cases zero_or_succ_right - 0120
have hbound : exists gap. gap + S x = r - 0121
rewrite zero_or_succ_right_witness - 0122
specialize le_refl (S x) - 0123
exact le_refl - 0124
have hprevious : exists pb pc. (((exists h. h + S pb = S ((S x) * bc)) /\ exists q. bb = q * S ((S x) * bc) + pb) /\ (((exists h. h + S pc = S ((S x) * sc)) /\ exists q. sb = q * S ((S x) * sc) + pc) /\ (((x = 0 /\ (forall j. (exists gap. gap + S j = w) -> exists value. (((exists h. h + S value = S ((S j) * pc)) /\ exists q. pb = q * S ((S j) * pc) + value) /\ ((j = 0 /\ value = 1) \/ exists p. j = S p /\ value = 0)))) \/ exists predecessor previous_code previous_scale. x = S predecessor /\ (((exists h. h + S previous_code = S ((S predecessor) * bc)) /\ exists q. bb = q * S ((S predecessor) * bc) + previous_code) /\ (((exists h. h + S previous_scale = S ((S predecessor) * sc)) /\ exists q. sb = q * S ((S predecessor) * sc) + previous_scale) /\ forall j. (exists gap. gap + S j = w) -> exists value. (((exists h. h + S value = S ((S j) * pc)) /\ exists q. pb = q * S ((S j) * pc) + value) /\ ((j = 0 /\ value = 1) \/ exists p u v. j = S p /\ (((exists h. h + S u = S ((S p) * previous_scale)) /\ exists q. previous_code = q * S ((S p) * previous_scale) + u) /\ (((exists h. h + S v = S ((S (S p)) * previous_scale)) /\ exists q. previous_code = q * S ((S (S p)) * previous_scale) + v) /\ value = u + v)))))))))) - 0125
specialize htable x - 0126
apply htable - 0127
exact hbound - 0128
cases hprevious - 0129
cases hprevious_witness - 0130
cases hprevious_witness_witness - 0131
cases hprevious_witness_witness_right - 0132
have hstep : exists b c. (forall j. (exists gap. gap + S j = w) -> exists value. (((exists h. h + S value = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + value) /\ ((j = 0 /\ value = 1) \/ exists predecessor u v. j = S predecessor /\ (((exists h. h + S u = S ((S predecessor) * x2)) /\ exists q. x1 = q * S ((S predecessor) * x2) + u) /\ (((exists h. h + S v = S ((S (S predecessor)) * x2)) /\ exists q. x1 = q * S ((S (S predecessor)) * x2) + v) /\ value = u + v))))) - 0133
specialize beta_pascal_row_step_exists x1 - 0134
specialize beta_pascal_row_step_exists x2 - 0135
specialize beta_pascal_row_step_exists w - 0136
exact beta_pascal_row_step_exists - 0137
cases hstep - 0138
cases hstep_witness - 0139
have hcode_extend : exists db dc. ((((exists bcf_height_bptpe_code_append. bcf_height_bptpe_code_append + S (x3) = S ((S (r)) * dc)) /\ exists bcf_quotient_bptpe_code_append. db = bcf_quotient_bptpe_code_append * S ((S (r)) * dc) + (x3))) /\ forall i a. (exists bcf_lt_gap_bptpe_code_old_bound. bcf_lt_gap_bptpe_code_old_bound + S (i) = r) -> (((exists bcf_height_bptpe_code_old. bcf_height_bptpe_code_old + S (a) = S ((S (i)) * bc)) /\ exists bcf_quotient_bptpe_code_old. bb = bcf_quotient_bptpe_code_old * S ((S (i)) * bc) + (a))) -> (((exists bcf_height_bptpe_code_new. bcf_height_bptpe_code_new + S (a) = S ((S (i)) * dc)) /\ exists bcf_quotient_bptpe_code_new. db = bcf_quotient_bptpe_code_new * S ((S (i)) * dc) + (a)))) - 0140
specialize beta_prefix_extend r - 0141
specialize beta_prefix_extend bb - 0142
specialize beta_prefix_extend bc - 0143
specialize beta_prefix_extend x3 - 0144
exact beta_prefix_extend - 0145
cases hcode_extend - 0146
cases hcode_extend_witness - 0147
cases hcode_extend_witness_witness - 0148
have hscale_extend : exists eb ec. ((((exists bcf_height_bptpe_scale_append. bcf_height_bptpe_scale_append + S (x4) = S ((S (r)) * ec)) /\ exists bcf_quotient_bptpe_scale_append. eb = bcf_quotient_bptpe_scale_append * S ((S (r)) * ec) + (x4))) /\ forall i a. (exists bcf_lt_gap_bptpe_scale_old_bound. bcf_lt_gap_bptpe_scale_old_bound + S (i) = r) -> (((exists bcf_height_bptpe_scale_old. bcf_height_bptpe_scale_old + S (a) = S ((S (i)) * sc)) /\ exists bcf_quotient_bptpe_scale_old. sb = bcf_quotient_bptpe_scale_old * S ((S (i)) * sc) + (a))) -> (((exists bcf_height_bptpe_scale_new. bcf_height_bptpe_scale_new + S (a) = S ((S (i)) * ec)) /\ exists bcf_quotient_bptpe_scale_new. eb = bcf_quotient_bptpe_scale_new * S ((S (i)) * ec) + (a)))) - 0149
specialize beta_prefix_extend r - 0150
specialize beta_prefix_extend sb - 0151
specialize beta_prefix_extend sc - 0152
specialize beta_prefix_extend x4 - 0153
exact beta_prefix_extend - 0154
cases hscale_extend - 0155
cases hscale_extend_witness - 0156
cases hscale_extend_witness_witness - 0157
exists x5 - 0158
exists x6 - 0159
exists x7 - 0160
exists x8 - 0161
intro i - 0162
intro hi - 0163
have hsplit : i = r \/ exists gap. gap + S i = r - 0164
specialize finite_lt_succ_eq_or_lt r - 0165
specialize finite_lt_succ_eq_or_lt i - 0166
apply finite_lt_succ_eq_or_lt - 0167
exact hi - 0168
cases hsplit - 0169
exists x3 - 0170
exists x4 - 0171
split - 0172
rewrite hsplit_left - 0173
rewrite hsplit_left - 0174
exact hcode_extend_witness_witness_left - 0175
split - 0176
rewrite hsplit_left - 0177
rewrite hsplit_left - 0178
exact hscale_extend_witness_witness_left - 0179
right - 0180
exists x - 0181
exists x1 - 0182
exists x2 - 0183
split - 0184
trans r - 0185
exact hsplit_left - 0186
exact zero_or_succ_right_witness - 0187
have hpred_bound : exists gap. gap + S x = r - 0188
rewrite zero_or_succ_right_witness - 0189
specialize le_refl (S x) - 0190
exact le_refl - 0191
split - 0192
specialize hcode_extend_witness_witness_right x - 0193
specialize hcode_extend_witness_witness_right x1 - 0194
apply hcode_extend_witness_witness_right - 0195
exact hpred_bound - 0196
exact hprevious_witness_witness_left - 0197
split - 0198
specialize hscale_extend_witness_witness_right x - 0199
specialize hscale_extend_witness_witness_right x2 - 0200
apply hscale_extend_witness_witness_right - 0201
exact hpred_bound - 0202
exact hprevious_witness_witness_right_left - 0203
exact hstep_witness_witness - 0204
specialize htable i - 0205
have hold : exists b c. (((exists h. h + S b = S ((S i) * bc)) /\ exists q. bb = q * S ((S i) * bc) + b) /\ (((exists h. h + S c = S ((S i) * sc)) /\ exists q. sb = q * S ((S i) * sc) + c) /\ (((i = 0 /\ (forall j. (exists gap. gap + S j = w) -> exists value. (((exists h. h + S value = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + value) /\ ((j = 0 /\ value = 1) \/ exists p. j = S p /\ value = 0)))) \/ exists predecessor previous_code previous_scale. i = S predecessor /\ (((exists h. h + S previous_code = S ((S predecessor) * bc)) /\ exists q. bb = q * S ((S predecessor) * bc) + previous_code) /\ (((exists h. h + S previous_scale = S ((S predecessor) * sc)) /\ exists q. sb = q * S ((S predecessor) * sc) + previous_scale) /\ forall j. (exists gap. gap + S j = w) -> exists value. (((exists h. h + S value = S ((S j) * c)) /\ exists q. b = q * S ((S j) * c) + value) /\ ((j = 0 /\ value = 1) \/ exists p u v. j = S p /\ (((exists h. h + S u = S ((S p) * previous_scale)) /\ exists q. previous_code = q * S ((S p) * previous_scale) + u) /\ (((exists h. h + S v = S ((S (S p)) * previous_scale)) /\ exists q. previous_code = q * S ((S (S p)) * previous_scale) + v) /\ value = u + v)))))))))) - 0206
apply htable - 0207
exact hsplit_right - 0208
cases hold - 0209
cases hold_witness - 0210
cases hold_witness_witness - 0211
cases hold_witness_witness_right - 0212
exists x9 - 0213
exists x10 - 0214
split - 0215
specialize hcode_extend_witness_witness_right i - 0216
specialize hcode_extend_witness_witness_right x9 - 0217
apply hcode_extend_witness_witness_right - 0218
exact hsplit_right - 0219
exact hold_witness_witness_left - 0220
split - 0221
specialize hscale_extend_witness_witness_right i - 0222
specialize hscale_extend_witness_witness_right x10 - 0223
apply hscale_extend_witness_witness_right - 0224
exact hsplit_right - 0225
exact hold_witness_witness_right_left - 0226
cases hold_witness_witness_right_right - 0227
left - 0228
exact hold_witness_witness_right_right_left - 0229
cases hold_witness_witness_right_right_right - 0230
cases hold_witness_witness_right_right_right_witness - 0231
cases hold_witness_witness_right_right_right_witness_witness - 0232
cases hold_witness_witness_right_right_right_witness_witness_witness - 0233
cases hold_witness_witness_right_right_right_witness_witness_witness_right - 0234
cases hold_witness_witness_right_right_right_witness_witness_witness_right_right - 0235
right - 0236
exists x11 - 0237
exists x12 - 0238
exists x13 - 0239
split - 0240
exact hold_witness_witness_right_right_right_witness_witness_witness_left - 0241
have hpred_bound : exists gap. gap + S x11 = r - 0242
have hi_le : exists gap. gap + i = r - 0243
specialize lt_to_le i - 0244
specialize lt_to_le r - 0245
apply lt_to_le - 0246
exact hsplit_right - 0247
rewrite hold_witness_witness_right_right_right_witness_witness_witness_left at hi_le - 0248
exact hi_le - 0249
split - 0250
specialize hcode_extend_witness_witness_right x11 - 0251
specialize hcode_extend_witness_witness_right x12 - 0252
apply hcode_extend_witness_witness_right - 0253
exact hpred_bound - 0254
exact hold_witness_witness_right_right_right_witness_witness_witness_right_left - 0255
split - 0256
specialize hscale_extend_witness_witness_right x11 - 0257
specialize hscale_extend_witness_witness_right x13 - 0258
apply hscale_extend_witness_witness_right - 0259
exact hpred_bound - 0260
exact hold_witness_witness_right_right_right_witness_witness_witness_right_right_left - 0261
exact hold_witness_witness_right_right_right_witness_witness_witness_right_right_right