Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved. Exact original first-admission records.
Exact theorem in conservative defined notation
∀ B. ∀ b. b ≤ B → ∀ x. ∃ y. ∃ z. ∃ n. ∃ m. ContinuedFractionTrace(x,b,y,z,n,m)
Every linked abbreviation expands hygienically to the identical original native formula.
Definition DAG
Actual proof prerequisites
Complete unchanged native tactic proof
All 100 lines are the exact independently kernel-checked original script.
Read the argument
Proof checkpoints
This is a reading aid, not a new proof or a proof-tree certificate. Checkpoint groups are consecutive commands, not inferred branch boundaries. Every step links to the preserved script.
Named ingredients (2)
01Fix variables and assumptionsL1–1
Work with arbitrary variables or the premises of the current implication.
- L1
intro B
02Induction on BL2–5
03Establish hb0L6–9
04Separate the logical casesL10–11
05Construct an explicit witnessL12–15
06Calculate and transport equalitiesL16–25
07Calculate and transport equalitiesL26–31
08Use earlier factsL32–32
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L32
exact continued_fraction_empty_trace_exists_witness_witness
09Fix variables and assumptionsL33–35
10Use earlier factsL36–37
11Establish hsplitL38–40
12Separate the logical casesL41–41
Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.
- L41
cases hsplit
13Establish hb0L42–48
14Establish hdivisionL49–51
15Separate the logical casesL52–54
16Establish hrBL55–58
17Establish hsmallL59–60
Establish this local claim before using it. It is not an additional assumption.
- L59
have hsmall : ∃ s. ∃ h. ∃ e. ∃ l. ContinuedFractionTrace(b,x1,s,h,e,l)Definitions: ContinuedFractionTraceOriginal native command in the exact edition - L60
specialize IH x1
18Establish hallL61–65
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply IH.
- L61
have hall : ∀ z. ∃ x. ∃ y. ∃ n. ∃ m. ContinuedFractionTrace(z,x1,x,y,n,m)Definitions: ContinuedFractionTraceOriginal native command in the exact edition - L62
apply IH - L63
exact hrB - L64
specialize hall b - L65
exact hall
19Separate the logical casesL66–69
20Establish hextendL70–79
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply continued fraction trace extend.
- L70
have hextend : ∃ s. ∃ z. ∃ c. ListCell(s,x,x2) ∧ ContinuedFractionTrace(a,b,s,z,c,S x5)Definitions: ListCellContinuedFractionTraceOriginal native command in the exact edition - L71
specialize continued_fraction_trace_extend a - L72
specialize continued_fraction_trace_extend b - L73
specialize continued_fraction_trace_extend x - L74
specialize continued_fraction_trace_extend x1 - L75
specialize continued_fraction_trace_extend x2 - L76
specialize continued_fraction_trace_extend x3 - L77
specialize continued_fraction_trace_extend x4 - L78
specialize continued_fraction_trace_extend x5 - L79
apply continued_fraction_trace_extend
21Use earlier factsL80–82
22Separate the logical casesL83–86
23Construct an explicit witnessL87–90
24Use earlier factsL91–91
Instantiate or apply named facts and discharge the corresponding proof obligations.
- L91
exact hextend_witness_witness_witness_right
25Establish hbBL92–95
26Establish hallL96–100
Establish this local claim before using it. It is not an additional assumption. The following proof commands apply IH.
- L96
have hall : ∀ z. ∃ x. ∃ y. ∃ n. ∃ m. ContinuedFractionTrace(z,b,x,y,n,m)Definitions: ContinuedFractionTraceOriginal native command in the exact edition - L97
apply IH - L98
exact hbB - L99
specialize hall a - L100
exact hall
Original defined command ledger · 100 lines
- 0001
intro B - 0002
induction B - 0003
intro b - 0004
intro hb - 0005
intro a - 0006
have hb0 : b = 0 - 0007
apply le_zero - 0008
exact hb - 0009
specialize continued_fraction_empty_trace_exists a - 0010
cases continued_fraction_empty_trace_exists - 0011
cases continued_fraction_empty_trace_exists_witness - 0012
exists 0 - 0013
exists x - 0014
exists x1 - 0015
exists 0 - 0016
rewrite hb0 - 0017
rewrite hb0 - 0018
rewrite hb0 - 0019
rewrite hb0 - 0020
rewrite hb0 - 0021
rewrite hb0 - 0022
rewrite hb0 - 0023
rewrite hb0 - 0024
rewrite hb0 - 0025
rewrite hb0 - 0026
rewrite hb0 - 0027
rewrite hb0 - 0028
rewrite hb0 - 0029
rewrite hb0 - 0030
rewrite hb0 - 0031
rewrite hb0 - 0032
exact continued_fraction_empty_trace_exists_witness_witness - 0033
intro b - 0034
intro hb - 0035
intro a - 0036
specialize le_eq_or_lt b - 0037
specialize le_eq_or_lt (S B) - 0038
have hsplit : b = S B \/ exists gap. gap + S b = S B - 0039
apply le_eq_or_lt - 0040
exact hb - 0041
cases hsplit - 0042
have hb0 : ~(b = 0) - 0043
intro hzero - 0044
apply PA1 - 0045
trans b - 0046
symm - 0047
exact hsplit_left - 0048
exact hzero - 0049
have hdivision : exists q r. a = b * q + r /\ exists gap. gap + S r = b - 0050
apply division_remainder_exists - 0051
exact hb0 - 0052
cases hdivision - 0053
cases hdivision_witness - 0054
cases hdivision_witness_witness - 0055
have hrB : exists gap. gap + x1 = B - 0056
apply le_of_succ_le_succ - 0057
rewrite hsplit_left at hdivision_witness_witness_right - 0058
exact hdivision_witness_witness_right - 0059
have hsmall : exists s h e l. (exists cf_gcd_bounded_reduced. ((((exists ff_h_cf_bounded_reduced_initial_state. ff_h_cf_bounded_reduced_initial_state + S (((cf_gcd_bounded_reduced) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) * S ((cf_gcd_bounded_reduced) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) + ((((0) + (0)) * S ((0) + (0)) + ((0) + (0))) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0))))) = S ((S (0)) * e)) /\ exists ff_q_cf_bounded_reduced_initial_state. h = ff_q_cf_bounded_reduced_initial_state * S ((S (0)) * e) + (((cf_gcd_bounded_reduced) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) * S ((cf_gcd_bounded_reduced) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) + ((((0) + (0)) * S ((0) + (0)) + ((0) + (0))) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0))))))) /\ ((((exists ff_h_cf_bounded_reduced_terminal_state. ff_h_cf_bounded_reduced_terminal_state + S (((b) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s)))) * S ((b) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s)))) + ((((x1) + (s)) * S ((x1) + (s)) + ((s) + (s))) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s))))) = S ((S (l)) * e)) /\ exists ff_q_cf_bounded_reduced_terminal_state. h = ff_q_cf_bounded_reduced_terminal_state * S ((S (l)) * e) + (((b) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s)))) * S ((b) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s)))) + ((((x1) + (s)) * S ((x1) + (s)) + ((s) + (s))) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s))))))) /\ forall cf_index_bounded_reduced. (exists ff_lt_cf_bounded_reduced_index. ff_lt_cf_bounded_reduced_index + S cf_index_bounded_reduced = l) -> exists cf_old_a_bounded_reduced cf_old_b_bounded_reduced cf_tail_bounded_reduced cf_new_a_bounded_reduced cf_new_b_bounded_reduced cf_head_bounded_reduced cf_quotient_bounded_reduced. ((((exists ff_h_cf_bounded_reduced_previous_state. ff_h_cf_bounded_reduced_previous_state + S (((cf_old_a_bounded_reduced) + (((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) * S ((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) + ((cf_tail_bounded_reduced) + (cf_tail_bounded_reduced)))) * S ((cf_old_a_bounded_reduced) + (((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) * S ((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) + ((cf_tail_bounded_reduced) + (cf_tail_bounded_reduced)))) + ((((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) * S ((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) + ((cf_tail_bounded_reduced) + (cf_tail_bounded_reduced))) + (((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) * S ((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) + ((cf_tail_bounded_reduced) + (cf_tail_bounded_reduced))))) = S ((S (cf_index_bounded_reduced)) * e)) /\ exists ff_q_cf_bounded_reduced_previous_state. h = ff_q_cf_bounded_reduced_previous_state * S ((S (cf_index_bounded_reduced)) * e) + (((cf_old_a_bounded_reduced) + (((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) * S ((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) + ((cf_tail_bounded_reduced) + (cf_tail_bounded_reduced)))) * S ((cf_old_a_bounded_reduced) + (((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) * S ((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) + ((cf_tail_bounded_reduced) + (cf_tail_bounded_reduced)))) + ((((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) * S ((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) + ((cf_tail_bounded_reduced) + (cf_tail_bounded_reduced))) + (((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) * S ((cf_old_b_bounded_reduced) + (cf_tail_bounded_reduced)) + ((cf_tail_bounded_reduced) + (cf_tail_bounded_reduced))))))) /\ ((((exists ff_h_cf_bounded_reduced_following_state. ff_h_cf_bounded_reduced_following_state + S (((cf_new_a_bounded_reduced) + (((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) * S ((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) + ((cf_head_bounded_reduced) + (cf_head_bounded_reduced)))) * S ((cf_new_a_bounded_reduced) + (((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) * S ((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) + ((cf_head_bounded_reduced) + (cf_head_bounded_reduced)))) + ((((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) * S ((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) + ((cf_head_bounded_reduced) + (cf_head_bounded_reduced))) + (((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) * S ((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) + ((cf_head_bounded_reduced) + (cf_head_bounded_reduced))))) = S ((S (S cf_index_bounded_reduced)) * e)) /\ exists ff_q_cf_bounded_reduced_following_state. h = ff_q_cf_bounded_reduced_following_state * S ((S (S cf_index_bounded_reduced)) * e) + (((cf_new_a_bounded_reduced) + (((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) * S ((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) + ((cf_head_bounded_reduced) + (cf_head_bounded_reduced)))) * S ((cf_new_a_bounded_reduced) + (((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) * S ((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) + ((cf_head_bounded_reduced) + (cf_head_bounded_reduced)))) + ((((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) * S ((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) + ((cf_head_bounded_reduced) + (cf_head_bounded_reduced))) + (((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) * S ((cf_new_b_bounded_reduced) + (cf_head_bounded_reduced)) + ((cf_head_bounded_reduced) + (cf_head_bounded_reduced))))))) /\ (cf_new_b_bounded_reduced = cf_old_a_bounded_reduced /\ (cf_new_a_bounded_reduced = cf_new_b_bounded_reduced * cf_quotient_bounded_reduced + cf_old_b_bounded_reduced /\ ((exists ff_lt_cf_bounded_reduced_remainder. ff_lt_cf_bounded_reduced_remainder + S cf_old_b_bounded_reduced = cf_new_b_bounded_reduced) /\ (cf_head_bounded_reduced = S ((cf_quotient_bounded_reduced + cf_tail_bounded_reduced) * S (cf_quotient_bounded_reduced + cf_tail_bounded_reduced) + (cf_tail_bounded_reduced + cf_tail_bounded_reduced))))))))))) - 0060
specialize IH x1 - 0061
have hall : forall z. (exists s h e l. (exists cf_gcd_bounded_reduced_all. ((((exists ff_h_cf_bounded_reduced_all_initial_state. ff_h_cf_bounded_reduced_all_initial_state + S (((cf_gcd_bounded_reduced_all) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) * S ((cf_gcd_bounded_reduced_all) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) + ((((0) + (0)) * S ((0) + (0)) + ((0) + (0))) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0))))) = S ((S (0)) * e)) /\ exists ff_q_cf_bounded_reduced_all_initial_state. h = ff_q_cf_bounded_reduced_all_initial_state * S ((S (0)) * e) + (((cf_gcd_bounded_reduced_all) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) * S ((cf_gcd_bounded_reduced_all) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) + ((((0) + (0)) * S ((0) + (0)) + ((0) + (0))) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0))))))) /\ ((((exists ff_h_cf_bounded_reduced_all_terminal_state. ff_h_cf_bounded_reduced_all_terminal_state + S (((z) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s)))) * S ((z) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s)))) + ((((x1) + (s)) * S ((x1) + (s)) + ((s) + (s))) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s))))) = S ((S (l)) * e)) /\ exists ff_q_cf_bounded_reduced_all_terminal_state. h = ff_q_cf_bounded_reduced_all_terminal_state * S ((S (l)) * e) + (((z) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s)))) * S ((z) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s)))) + ((((x1) + (s)) * S ((x1) + (s)) + ((s) + (s))) + (((x1) + (s)) * S ((x1) + (s)) + ((s) + (s))))))) /\ forall cf_index_bounded_reduced_all. (exists ff_lt_cf_bounded_reduced_all_index. ff_lt_cf_bounded_reduced_all_index + S cf_index_bounded_reduced_all = l) -> exists cf_old_a_bounded_reduced_all cf_old_b_bounded_reduced_all cf_tail_bounded_reduced_all cf_new_a_bounded_reduced_all cf_new_b_bounded_reduced_all cf_head_bounded_reduced_all cf_quotient_bounded_reduced_all. ((((exists ff_h_cf_bounded_reduced_all_previous_state. ff_h_cf_bounded_reduced_all_previous_state + S (((cf_old_a_bounded_reduced_all) + (((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) * S ((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) + ((cf_tail_bounded_reduced_all) + (cf_tail_bounded_reduced_all)))) * S ((cf_old_a_bounded_reduced_all) + (((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) * S ((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) + ((cf_tail_bounded_reduced_all) + (cf_tail_bounded_reduced_all)))) + ((((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) * S ((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) + ((cf_tail_bounded_reduced_all) + (cf_tail_bounded_reduced_all))) + (((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) * S ((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) + ((cf_tail_bounded_reduced_all) + (cf_tail_bounded_reduced_all))))) = S ((S (cf_index_bounded_reduced_all)) * e)) /\ exists ff_q_cf_bounded_reduced_all_previous_state. h = ff_q_cf_bounded_reduced_all_previous_state * S ((S (cf_index_bounded_reduced_all)) * e) + (((cf_old_a_bounded_reduced_all) + (((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) * S ((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) + ((cf_tail_bounded_reduced_all) + (cf_tail_bounded_reduced_all)))) * S ((cf_old_a_bounded_reduced_all) + (((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) * S ((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) + ((cf_tail_bounded_reduced_all) + (cf_tail_bounded_reduced_all)))) + ((((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) * S ((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) + ((cf_tail_bounded_reduced_all) + (cf_tail_bounded_reduced_all))) + (((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) * S ((cf_old_b_bounded_reduced_all) + (cf_tail_bounded_reduced_all)) + ((cf_tail_bounded_reduced_all) + (cf_tail_bounded_reduced_all))))))) /\ ((((exists ff_h_cf_bounded_reduced_all_following_state. ff_h_cf_bounded_reduced_all_following_state + S (((cf_new_a_bounded_reduced_all) + (((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) * S ((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) + ((cf_head_bounded_reduced_all) + (cf_head_bounded_reduced_all)))) * S ((cf_new_a_bounded_reduced_all) + (((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) * S ((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) + ((cf_head_bounded_reduced_all) + (cf_head_bounded_reduced_all)))) + ((((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) * S ((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) + ((cf_head_bounded_reduced_all) + (cf_head_bounded_reduced_all))) + (((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) * S ((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) + ((cf_head_bounded_reduced_all) + (cf_head_bounded_reduced_all))))) = S ((S (S cf_index_bounded_reduced_all)) * e)) /\ exists ff_q_cf_bounded_reduced_all_following_state. h = ff_q_cf_bounded_reduced_all_following_state * S ((S (S cf_index_bounded_reduced_all)) * e) + (((cf_new_a_bounded_reduced_all) + (((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) * S ((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) + ((cf_head_bounded_reduced_all) + (cf_head_bounded_reduced_all)))) * S ((cf_new_a_bounded_reduced_all) + (((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) * S ((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) + ((cf_head_bounded_reduced_all) + (cf_head_bounded_reduced_all)))) + ((((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) * S ((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) + ((cf_head_bounded_reduced_all) + (cf_head_bounded_reduced_all))) + (((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) * S ((cf_new_b_bounded_reduced_all) + (cf_head_bounded_reduced_all)) + ((cf_head_bounded_reduced_all) + (cf_head_bounded_reduced_all))))))) /\ (cf_new_b_bounded_reduced_all = cf_old_a_bounded_reduced_all /\ (cf_new_a_bounded_reduced_all = cf_new_b_bounded_reduced_all * cf_quotient_bounded_reduced_all + cf_old_b_bounded_reduced_all /\ ((exists ff_lt_cf_bounded_reduced_all_remainder. ff_lt_cf_bounded_reduced_all_remainder + S cf_old_b_bounded_reduced_all = cf_new_b_bounded_reduced_all) /\ (cf_head_bounded_reduced_all = S ((cf_quotient_bounded_reduced_all + cf_tail_bounded_reduced_all) * S (cf_quotient_bounded_reduced_all + cf_tail_bounded_reduced_all) + (cf_tail_bounded_reduced_all + cf_tail_bounded_reduced_all)))))))))))) - 0062
apply IH - 0063
exact hrB - 0064
specialize hall b - 0065
exact hall - 0066
cases hsmall - 0067
cases hsmall_witness - 0068
cases hsmall_witness_witness - 0069
cases hsmall_witness_witness_witness - 0070
have hextend : exists s z c. ((s = S ((x + x2) * S (x + x2) + (x2 + x2))) /\ (exists cf_gcd_bounded_extension. ((((exists ff_h_cf_bounded_extension_initial_state. ff_h_cf_bounded_extension_initial_state + S (((cf_gcd_bounded_extension) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) * S ((cf_gcd_bounded_extension) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) + ((((0) + (0)) * S ((0) + (0)) + ((0) + (0))) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0))))) = S ((S (0)) * c)) /\ exists ff_q_cf_bounded_extension_initial_state. z = ff_q_cf_bounded_extension_initial_state * S ((S (0)) * c) + (((cf_gcd_bounded_extension) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) * S ((cf_gcd_bounded_extension) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) + ((((0) + (0)) * S ((0) + (0)) + ((0) + (0))) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0))))))) /\ ((((exists ff_h_cf_bounded_extension_terminal_state. ff_h_cf_bounded_extension_terminal_state + S (((a) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s)))) * S ((a) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s)))) + ((((b) + (s)) * S ((b) + (s)) + ((s) + (s))) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s))))) = S ((S (S x5)) * c)) /\ exists ff_q_cf_bounded_extension_terminal_state. z = ff_q_cf_bounded_extension_terminal_state * S ((S (S x5)) * c) + (((a) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s)))) * S ((a) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s)))) + ((((b) + (s)) * S ((b) + (s)) + ((s) + (s))) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s))))))) /\ forall cf_index_bounded_extension. (exists ff_lt_cf_bounded_extension_index. ff_lt_cf_bounded_extension_index + S cf_index_bounded_extension = S x5) -> exists cf_old_a_bounded_extension cf_old_b_bounded_extension cf_tail_bounded_extension cf_new_a_bounded_extension cf_new_b_bounded_extension cf_head_bounded_extension cf_quotient_bounded_extension. ((((exists ff_h_cf_bounded_extension_previous_state. ff_h_cf_bounded_extension_previous_state + S (((cf_old_a_bounded_extension) + (((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) * S ((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) + ((cf_tail_bounded_extension) + (cf_tail_bounded_extension)))) * S ((cf_old_a_bounded_extension) + (((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) * S ((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) + ((cf_tail_bounded_extension) + (cf_tail_bounded_extension)))) + ((((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) * S ((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) + ((cf_tail_bounded_extension) + (cf_tail_bounded_extension))) + (((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) * S ((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) + ((cf_tail_bounded_extension) + (cf_tail_bounded_extension))))) = S ((S (cf_index_bounded_extension)) * c)) /\ exists ff_q_cf_bounded_extension_previous_state. z = ff_q_cf_bounded_extension_previous_state * S ((S (cf_index_bounded_extension)) * c) + (((cf_old_a_bounded_extension) + (((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) * S ((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) + ((cf_tail_bounded_extension) + (cf_tail_bounded_extension)))) * S ((cf_old_a_bounded_extension) + (((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) * S ((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) + ((cf_tail_bounded_extension) + (cf_tail_bounded_extension)))) + ((((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) * S ((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) + ((cf_tail_bounded_extension) + (cf_tail_bounded_extension))) + (((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) * S ((cf_old_b_bounded_extension) + (cf_tail_bounded_extension)) + ((cf_tail_bounded_extension) + (cf_tail_bounded_extension))))))) /\ ((((exists ff_h_cf_bounded_extension_following_state. ff_h_cf_bounded_extension_following_state + S (((cf_new_a_bounded_extension) + (((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) * S ((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) + ((cf_head_bounded_extension) + (cf_head_bounded_extension)))) * S ((cf_new_a_bounded_extension) + (((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) * S ((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) + ((cf_head_bounded_extension) + (cf_head_bounded_extension)))) + ((((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) * S ((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) + ((cf_head_bounded_extension) + (cf_head_bounded_extension))) + (((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) * S ((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) + ((cf_head_bounded_extension) + (cf_head_bounded_extension))))) = S ((S (S cf_index_bounded_extension)) * c)) /\ exists ff_q_cf_bounded_extension_following_state. z = ff_q_cf_bounded_extension_following_state * S ((S (S cf_index_bounded_extension)) * c) + (((cf_new_a_bounded_extension) + (((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) * S ((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) + ((cf_head_bounded_extension) + (cf_head_bounded_extension)))) * S ((cf_new_a_bounded_extension) + (((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) * S ((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) + ((cf_head_bounded_extension) + (cf_head_bounded_extension)))) + ((((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) * S ((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) + ((cf_head_bounded_extension) + (cf_head_bounded_extension))) + (((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) * S ((cf_new_b_bounded_extension) + (cf_head_bounded_extension)) + ((cf_head_bounded_extension) + (cf_head_bounded_extension))))))) /\ (cf_new_b_bounded_extension = cf_old_a_bounded_extension /\ (cf_new_a_bounded_extension = cf_new_b_bounded_extension * cf_quotient_bounded_extension + cf_old_b_bounded_extension /\ ((exists ff_lt_cf_bounded_extension_remainder. ff_lt_cf_bounded_extension_remainder + S cf_old_b_bounded_extension = cf_new_b_bounded_extension) /\ (cf_head_bounded_extension = S ((cf_quotient_bounded_extension + cf_tail_bounded_extension) * S (cf_quotient_bounded_extension + cf_tail_bounded_extension) + (cf_tail_bounded_extension + cf_tail_bounded_extension)))))))))))) - 0071
specialize continued_fraction_trace_extend a - 0072
specialize continued_fraction_trace_extend b - 0073
specialize continued_fraction_trace_extend x - 0074
specialize continued_fraction_trace_extend x1 - 0075
specialize continued_fraction_trace_extend x2 - 0076
specialize continued_fraction_trace_extend x3 - 0077
specialize continued_fraction_trace_extend x4 - 0078
specialize continued_fraction_trace_extend x5 - 0079
apply continued_fraction_trace_extend - 0080
exact hdivision_witness_witness_left - 0081
exact hdivision_witness_witness_right - 0082
exact hsmall_witness_witness_witness_witness - 0083
cases hextend - 0084
cases hextend_witness - 0085
cases hextend_witness_witness - 0086
cases hextend_witness_witness_witness - 0087
exists x6 - 0088
exists x7 - 0089
exists x8 - 0090
exists S x5 - 0091
exact hextend_witness_witness_witness_right - 0092
have hbB : exists gap. gap + b = B - 0093
apply le_of_succ_le_succ - 0094
exact hsplit_right - 0095
specialize IH b - 0096
have hall : forall z. (exists s h e l. (exists cf_gcd_bounded_smaller_all. ((((exists ff_h_cf_bounded_smaller_all_initial_state. ff_h_cf_bounded_smaller_all_initial_state + S (((cf_gcd_bounded_smaller_all) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) * S ((cf_gcd_bounded_smaller_all) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) + ((((0) + (0)) * S ((0) + (0)) + ((0) + (0))) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0))))) = S ((S (0)) * e)) /\ exists ff_q_cf_bounded_smaller_all_initial_state. h = ff_q_cf_bounded_smaller_all_initial_state * S ((S (0)) * e) + (((cf_gcd_bounded_smaller_all) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) * S ((cf_gcd_bounded_smaller_all) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) + ((((0) + (0)) * S ((0) + (0)) + ((0) + (0))) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0))))))) /\ ((((exists ff_h_cf_bounded_smaller_all_terminal_state. ff_h_cf_bounded_smaller_all_terminal_state + S (((z) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s)))) * S ((z) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s)))) + ((((b) + (s)) * S ((b) + (s)) + ((s) + (s))) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s))))) = S ((S (l)) * e)) /\ exists ff_q_cf_bounded_smaller_all_terminal_state. h = ff_q_cf_bounded_smaller_all_terminal_state * S ((S (l)) * e) + (((z) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s)))) * S ((z) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s)))) + ((((b) + (s)) * S ((b) + (s)) + ((s) + (s))) + (((b) + (s)) * S ((b) + (s)) + ((s) + (s))))))) /\ forall cf_index_bounded_smaller_all. (exists ff_lt_cf_bounded_smaller_all_index. ff_lt_cf_bounded_smaller_all_index + S cf_index_bounded_smaller_all = l) -> exists cf_old_a_bounded_smaller_all cf_old_b_bounded_smaller_all cf_tail_bounded_smaller_all cf_new_a_bounded_smaller_all cf_new_b_bounded_smaller_all cf_head_bounded_smaller_all cf_quotient_bounded_smaller_all. ((((exists ff_h_cf_bounded_smaller_all_previous_state. ff_h_cf_bounded_smaller_all_previous_state + S (((cf_old_a_bounded_smaller_all) + (((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) * S ((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) + ((cf_tail_bounded_smaller_all) + (cf_tail_bounded_smaller_all)))) * S ((cf_old_a_bounded_smaller_all) + (((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) * S ((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) + ((cf_tail_bounded_smaller_all) + (cf_tail_bounded_smaller_all)))) + ((((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) * S ((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) + ((cf_tail_bounded_smaller_all) + (cf_tail_bounded_smaller_all))) + (((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) * S ((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) + ((cf_tail_bounded_smaller_all) + (cf_tail_bounded_smaller_all))))) = S ((S (cf_index_bounded_smaller_all)) * e)) /\ exists ff_q_cf_bounded_smaller_all_previous_state. h = ff_q_cf_bounded_smaller_all_previous_state * S ((S (cf_index_bounded_smaller_all)) * e) + (((cf_old_a_bounded_smaller_all) + (((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) * S ((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) + ((cf_tail_bounded_smaller_all) + (cf_tail_bounded_smaller_all)))) * S ((cf_old_a_bounded_smaller_all) + (((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) * S ((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) + ((cf_tail_bounded_smaller_all) + (cf_tail_bounded_smaller_all)))) + ((((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) * S ((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) + ((cf_tail_bounded_smaller_all) + (cf_tail_bounded_smaller_all))) + (((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) * S ((cf_old_b_bounded_smaller_all) + (cf_tail_bounded_smaller_all)) + ((cf_tail_bounded_smaller_all) + (cf_tail_bounded_smaller_all))))))) /\ ((((exists ff_h_cf_bounded_smaller_all_following_state. ff_h_cf_bounded_smaller_all_following_state + S (((cf_new_a_bounded_smaller_all) + (((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) * S ((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) + ((cf_head_bounded_smaller_all) + (cf_head_bounded_smaller_all)))) * S ((cf_new_a_bounded_smaller_all) + (((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) * S ((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) + ((cf_head_bounded_smaller_all) + (cf_head_bounded_smaller_all)))) + ((((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) * S ((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) + ((cf_head_bounded_smaller_all) + (cf_head_bounded_smaller_all))) + (((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) * S ((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) + ((cf_head_bounded_smaller_all) + (cf_head_bounded_smaller_all))))) = S ((S (S cf_index_bounded_smaller_all)) * e)) /\ exists ff_q_cf_bounded_smaller_all_following_state. h = ff_q_cf_bounded_smaller_all_following_state * S ((S (S cf_index_bounded_smaller_all)) * e) + (((cf_new_a_bounded_smaller_all) + (((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) * S ((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) + ((cf_head_bounded_smaller_all) + (cf_head_bounded_smaller_all)))) * S ((cf_new_a_bounded_smaller_all) + (((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) * S ((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) + ((cf_head_bounded_smaller_all) + (cf_head_bounded_smaller_all)))) + ((((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) * S ((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) + ((cf_head_bounded_smaller_all) + (cf_head_bounded_smaller_all))) + (((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) * S ((cf_new_b_bounded_smaller_all) + (cf_head_bounded_smaller_all)) + ((cf_head_bounded_smaller_all) + (cf_head_bounded_smaller_all))))))) /\ (cf_new_b_bounded_smaller_all = cf_old_a_bounded_smaller_all /\ (cf_new_a_bounded_smaller_all = cf_new_b_bounded_smaller_all * cf_quotient_bounded_smaller_all + cf_old_b_bounded_smaller_all /\ ((exists ff_lt_cf_bounded_smaller_all_remainder. ff_lt_cf_bounded_smaller_all_remainder + S cf_old_b_bounded_smaller_all = cf_new_b_bounded_smaller_all) /\ (cf_head_bounded_smaller_all = S ((cf_quotient_bounded_smaller_all + cf_tail_bounded_smaller_all) * S (cf_quotient_bounded_smaller_all + cf_tail_bounded_smaller_all) + (cf_tail_bounded_smaller_all + cf_tail_bounded_smaller_all)))))))))))) - 0097
apply IH - 0098
exact hbB - 0099
specialize hall a - 0100
exact hall