BA0053

continued_fraction_convergent_best_approximation

Exact natural-domain G072: actual G071 fraction and actual indexed convergent imply |a*v-b*u|≤|a*t-b*r| for every natural numerator r and every 0<t<v, with no assumed approximation premise.

Alpha v34 checked-use · first admitted v29 · independently kernel and Lean verified; not Stable

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.

The initial 0/1 convergent is included: u is natural, not necessarily positive. Comparison denominators are strictly smaller and positive. Signed competitors are represented by an arbitrary difference rp−rn. Approximation inequalities are proved from the trace, never stored as assumptions in Convergent.

Exact theorem in conservative defined notation

∀ a. ∀ b. ∀ s. ∀ i. ∀ u. ∀ v. ContinuedFraction(a,b,s)Convergent(s,i,u,v)BestApproximationSecondKind(a,b,u,v)

Every linked abbreviation expands hygienically to the identical original native formula.

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall a b s i u v. (((exists cf_a_pred_best_actual_fraction cf_b_pred_best_actual_fraction cf_code_best_actual_fraction cf_scale_best_actual_fraction cf_length_pred_best_actual_fraction. (a = S cf_a_pred_best_actual_fraction /\ (b = S cf_b_pred_best_actual_fraction /\ (exists cf_gcd_best_actual_fraction_trace. ((((exists ff_h_cf_best_actual_fraction_trace_initial_state. ff_h_cf_best_actual_fraction_trace_initial_state + S (((cf_gcd_best_actual_fraction_trace) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) * S ((cf_gcd_best_actual_fraction_trace) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) + ((((0) + (0)) * S ((0) + (0)) + ((0) + (0))) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0))))) = S ((S (0)) * cf_scale_best_actual_fraction)) /\ exists ff_q_cf_best_actual_fraction_trace_initial_state. cf_code_best_actual_fraction = ff_q_cf_best_actual_fraction_trace_initial_state * S ((S (0)) * cf_scale_best_actual_fraction) + (((cf_gcd_best_actual_fraction_trace) + (((0) + (0)) * S ((0) + (0)) + ((0) + (0)))) * S ((cf_gcd_best_actual_fraction_trace) + (((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_best_actual_fraction_trace_terminal_state. ff_h_cf_best_actual_fraction_trace_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 cf_length_pred_best_actual_fraction)) * cf_scale_best_actual_fraction)) /\ exists ff_q_cf_best_actual_fraction_trace_terminal_state. cf_code_best_actual_fraction = ff_q_cf_best_actual_fraction_trace_terminal_state * S ((S (S cf_length_pred_best_actual_fraction)) * cf_scale_best_actual_fraction) + (((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_best_actual_fraction_trace. (exists ff_lt_cf_best_actual_fraction_trace_index. ff_lt_cf_best_actual_fraction_trace_index + S cf_index_best_actual_fraction_trace = S cf_length_pred_best_actual_fraction) -> exists cf_old_a_best_actual_fraction_trace cf_old_b_best_actual_fraction_trace cf_tail_best_actual_fraction_trace cf_new_a_best_actual_fraction_trace cf_new_b_best_actual_fraction_trace cf_head_best_actual_fraction_trace cf_quotient_best_actual_fraction_trace. ((((exists ff_h_cf_best_actual_fraction_trace_previous_state. ff_h_cf_best_actual_fraction_trace_previous_state + S (((cf_old_a_best_actual_fraction_trace) + (((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) * S ((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) + ((cf_tail_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)))) * S ((cf_old_a_best_actual_fraction_trace) + (((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) * S ((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) + ((cf_tail_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)))) + ((((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) * S ((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) + ((cf_tail_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace))) + (((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) * S ((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) + ((cf_tail_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace))))) = S ((S (cf_index_best_actual_fraction_trace)) * cf_scale_best_actual_fraction)) /\ exists ff_q_cf_best_actual_fraction_trace_previous_state. cf_code_best_actual_fraction = ff_q_cf_best_actual_fraction_trace_previous_state * S ((S (cf_index_best_actual_fraction_trace)) * cf_scale_best_actual_fraction) + (((cf_old_a_best_actual_fraction_trace) + (((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) * S ((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) + ((cf_tail_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)))) * S ((cf_old_a_best_actual_fraction_trace) + (((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) * S ((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) + ((cf_tail_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)))) + ((((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) * S ((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) + ((cf_tail_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace))) + (((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) * S ((cf_old_b_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace)) + ((cf_tail_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace))))))) /\ ((((exists ff_h_cf_best_actual_fraction_trace_following_state. ff_h_cf_best_actual_fraction_trace_following_state + S (((cf_new_a_best_actual_fraction_trace) + (((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) * S ((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) + ((cf_head_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)))) * S ((cf_new_a_best_actual_fraction_trace) + (((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) * S ((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) + ((cf_head_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)))) + ((((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) * S ((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) + ((cf_head_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace))) + (((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) * S ((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) + ((cf_head_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace))))) = S ((S (S cf_index_best_actual_fraction_trace)) * cf_scale_best_actual_fraction)) /\ exists ff_q_cf_best_actual_fraction_trace_following_state. cf_code_best_actual_fraction = ff_q_cf_best_actual_fraction_trace_following_state * S ((S (S cf_index_best_actual_fraction_trace)) * cf_scale_best_actual_fraction) + (((cf_new_a_best_actual_fraction_trace) + (((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) * S ((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) + ((cf_head_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)))) * S ((cf_new_a_best_actual_fraction_trace) + (((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) * S ((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) + ((cf_head_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)))) + ((((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) * S ((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) + ((cf_head_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace))) + (((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) * S ((cf_new_b_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace)) + ((cf_head_best_actual_fraction_trace) + (cf_head_best_actual_fraction_trace))))))) /\ (cf_new_b_best_actual_fraction_trace = cf_old_a_best_actual_fraction_trace /\ (cf_new_a_best_actual_fraction_trace = cf_new_b_best_actual_fraction_trace * cf_quotient_best_actual_fraction_trace + cf_old_b_best_actual_fraction_trace /\ ((exists ff_lt_cf_best_actual_fraction_trace_remainder. ff_lt_cf_best_actual_fraction_trace_remainder + S cf_old_b_best_actual_fraction_trace = cf_new_b_best_actual_fraction_trace) /\ (cf_head_best_actual_fraction_trace = S ((cf_quotient_best_actual_fraction_trace + cf_tail_best_actual_fraction_trace) * S (cf_quotient_best_actual_fraction_trace + cf_tail_best_actual_fraction_trace) + (cf_tail_best_actual_fraction_trace + cf_tail_best_actual_fraction_trace)))))))))))))) /\ (exists cfc_previous_numerator_best_actual_convergent cfc_previous_denominator_best_actual_convergent cfc_code_best_actual_convergent cfc_scale_best_actual_convergent. ((~(v = 0)) /\ (exists cfc_tail_best_actual_convergentcomputation. ((exists cfc_state_best_actual_convergentcomputationinitial. ((exists cfc_left_best_actual_convergentcomputationinitialcode cfc_right_best_actual_convergentcomputationinitialcode cfc_matrix_best_actual_convergentcomputationinitialcode. ((cfc_left_best_actual_convergentcomputationinitialcode = ((1) + (0)) * S ((1) + (0)) + ((0) + (0))) /\ ((cfc_right_best_actual_convergentcomputationinitialcode = ((0) + (1)) * S ((0) + (1)) + ((1) + (1))) /\ ((cfc_matrix_best_actual_convergentcomputationinitialcode = ((cfc_left_best_actual_convergentcomputationinitialcode) + (cfc_right_best_actual_convergentcomputationinitialcode)) * S ((cfc_left_best_actual_convergentcomputationinitialcode) + (cfc_right_best_actual_convergentcomputationinitialcode)) + ((cfc_right_best_actual_convergentcomputationinitialcode) + (cfc_right_best_actual_convergentcomputationinitialcode))) /\ ((cfc_state_best_actual_convergentcomputationinitial) = ((cfc_tail_best_actual_convergentcomputation) + (cfc_matrix_best_actual_convergentcomputationinitialcode)) * S ((cfc_tail_best_actual_convergentcomputation) + (cfc_matrix_best_actual_convergentcomputationinitialcode)) + ((cfc_matrix_best_actual_convergentcomputationinitialcode) + (cfc_matrix_best_actual_convergentcomputationinitialcode))))))) /\ (((exists ff_h_best_actual_convergentcomputationinitialentry. ff_h_best_actual_convergentcomputationinitialentry + S (cfc_state_best_actual_convergentcomputationinitial) = S ((S (0)) * cfc_scale_best_actual_convergent)) /\ exists ff_q_best_actual_convergentcomputationinitialentry. cfc_code_best_actual_convergent = ff_q_best_actual_convergentcomputationinitialentry * S ((S (0)) * cfc_scale_best_actual_convergent) + (cfc_state_best_actual_convergentcomputationinitial))))) /\ ((exists cfc_state_best_actual_convergentcomputationterminal. ((exists cfc_left_best_actual_convergentcomputationterminalcode cfc_right_best_actual_convergentcomputationterminalcode cfc_matrix_best_actual_convergentcomputationterminalcode. ((cfc_left_best_actual_convergentcomputationterminalcode = ((u) + (cfc_previous_numerator_best_actual_convergent)) * S ((u) + (cfc_previous_numerator_best_actual_convergent)) + ((cfc_previous_numerator_best_actual_convergent) + (cfc_previous_numerator_best_actual_convergent))) /\ ((cfc_right_best_actual_convergentcomputationterminalcode = ((v) + (cfc_previous_denominator_best_actual_convergent)) * S ((v) + (cfc_previous_denominator_best_actual_convergent)) + ((cfc_previous_denominator_best_actual_convergent) + (cfc_previous_denominator_best_actual_convergent))) /\ ((cfc_matrix_best_actual_convergentcomputationterminalcode = ((cfc_left_best_actual_convergentcomputationterminalcode) + (cfc_right_best_actual_convergentcomputationterminalcode)) * S ((cfc_left_best_actual_convergentcomputationterminalcode) + (cfc_right_best_actual_convergentcomputationterminalcode)) + ((cfc_right_best_actual_convergentcomputationterminalcode) + (cfc_right_best_actual_convergentcomputationterminalcode))) /\ ((cfc_state_best_actual_convergentcomputationterminal) = ((s) + (cfc_matrix_best_actual_convergentcomputationterminalcode)) * S ((s) + (cfc_matrix_best_actual_convergentcomputationterminalcode)) + ((cfc_matrix_best_actual_convergentcomputationterminalcode) + (cfc_matrix_best_actual_convergentcomputationterminalcode))))))) /\ (((exists ff_h_best_actual_convergentcomputationterminalentry. ff_h_best_actual_convergentcomputationterminalentry + S (cfc_state_best_actual_convergentcomputationterminal) = S ((S (S (i))) * cfc_scale_best_actual_convergent)) /\ exists ff_q_best_actual_convergentcomputationterminalentry. cfc_code_best_actual_convergent = ff_q_best_actual_convergentcomputationterminalentry * S ((S (S (i))) * cfc_scale_best_actual_convergent) + (cfc_state_best_actual_convergentcomputationterminal))))) /\ (forall cfc_index_best_actual_convergentcomputation. (exists cfba_gap_best_actual_convergentcomputationbound. cfba_gap_best_actual_convergentcomputationbound + S (cfc_index_best_actual_convergentcomputation) = (S (i))) -> exists cfc_old_best_actual_convergentcomputation cfc_a_best_actual_convergentcomputation cfc_b_best_actual_convergentcomputation cfc_c_best_actual_convergentcomputation cfc_d_best_actual_convergentcomputation cfc_new_best_actual_convergentcomputation cfc_quotient_best_actual_convergentcomputation. ((exists cfc_state_best_actual_convergentcomputationprevious. ((exists cfc_left_best_actual_convergentcomputationpreviouscode cfc_right_best_actual_convergentcomputationpreviouscode cfc_matrix_best_actual_convergentcomputationpreviouscode. ((cfc_left_best_actual_convergentcomputationpreviouscode = ((cfc_a_best_actual_convergentcomputation) + (cfc_b_best_actual_convergentcomputation)) * S ((cfc_a_best_actual_convergentcomputation) + (cfc_b_best_actual_convergentcomputation)) + ((cfc_b_best_actual_convergentcomputation) + (cfc_b_best_actual_convergentcomputation))) /\ ((cfc_right_best_actual_convergentcomputationpreviouscode = ((cfc_c_best_actual_convergentcomputation) + (cfc_d_best_actual_convergentcomputation)) * S ((cfc_c_best_actual_convergentcomputation) + (cfc_d_best_actual_convergentcomputation)) + ((cfc_d_best_actual_convergentcomputation) + (cfc_d_best_actual_convergentcomputation))) /\ ((cfc_matrix_best_actual_convergentcomputationpreviouscode = ((cfc_left_best_actual_convergentcomputationpreviouscode) + (cfc_right_best_actual_convergentcomputationpreviouscode)) * S ((cfc_left_best_actual_convergentcomputationpreviouscode) + (cfc_right_best_actual_convergentcomputationpreviouscode)) + ((cfc_right_best_actual_convergentcomputationpreviouscode) + (cfc_right_best_actual_convergentcomputationpreviouscode))) /\ ((cfc_state_best_actual_convergentcomputationprevious) = ((cfc_old_best_actual_convergentcomputation) + (cfc_matrix_best_actual_convergentcomputationpreviouscode)) * S ((cfc_old_best_actual_convergentcomputation) + (cfc_matrix_best_actual_convergentcomputationpreviouscode)) + ((cfc_matrix_best_actual_convergentcomputationpreviouscode) + (cfc_matrix_best_actual_convergentcomputationpreviouscode))))))) /\ (((exists ff_h_best_actual_convergentcomputationpreviousentry. ff_h_best_actual_convergentcomputationpreviousentry + S (cfc_state_best_actual_convergentcomputationprevious) = S ((S (cfc_index_best_actual_convergentcomputation)) * cfc_scale_best_actual_convergent)) /\ exists ff_q_best_actual_convergentcomputationpreviousentry. cfc_code_best_actual_convergent = ff_q_best_actual_convergentcomputationpreviousentry * S ((S (cfc_index_best_actual_convergentcomputation)) * cfc_scale_best_actual_convergent) + (cfc_state_best_actual_convergentcomputationprevious))))) /\ ((exists cfc_state_best_actual_convergentcomputationfollowing. ((exists cfc_left_best_actual_convergentcomputationfollowingcode cfc_right_best_actual_convergentcomputationfollowingcode cfc_matrix_best_actual_convergentcomputationfollowingcode. ((cfc_left_best_actual_convergentcomputationfollowingcode = (((cfc_quotient_best_actual_convergentcomputation * cfc_a_best_actual_convergentcomputation + cfc_c_best_actual_convergentcomputation)) + ((cfc_quotient_best_actual_convergentcomputation * cfc_b_best_actual_convergentcomputation + cfc_d_best_actual_convergentcomputation))) * S (((cfc_quotient_best_actual_convergentcomputation * cfc_a_best_actual_convergentcomputation + cfc_c_best_actual_convergentcomputation)) + ((cfc_quotient_best_actual_convergentcomputation * cfc_b_best_actual_convergentcomputation + cfc_d_best_actual_convergentcomputation))) + (((cfc_quotient_best_actual_convergentcomputation * cfc_b_best_actual_convergentcomputation + cfc_d_best_actual_convergentcomputation)) + ((cfc_quotient_best_actual_convergentcomputation * cfc_b_best_actual_convergentcomputation + cfc_d_best_actual_convergentcomputation)))) /\ ((cfc_right_best_actual_convergentcomputationfollowingcode = ((cfc_a_best_actual_convergentcomputation) + (cfc_b_best_actual_convergentcomputation)) * S ((cfc_a_best_actual_convergentcomputation) + (cfc_b_best_actual_convergentcomputation)) + ((cfc_b_best_actual_convergentcomputation) + (cfc_b_best_actual_convergentcomputation))) /\ ((cfc_matrix_best_actual_convergentcomputationfollowingcode = ((cfc_left_best_actual_convergentcomputationfollowingcode) + (cfc_right_best_actual_convergentcomputationfollowingcode)) * S ((cfc_left_best_actual_convergentcomputationfollowingcode) + (cfc_right_best_actual_convergentcomputationfollowingcode)) + ((cfc_right_best_actual_convergentcomputationfollowingcode) + (cfc_right_best_actual_convergentcomputationfollowingcode))) /\ ((cfc_state_best_actual_convergentcomputationfollowing) = ((cfc_new_best_actual_convergentcomputation) + (cfc_matrix_best_actual_convergentcomputationfollowingcode)) * S ((cfc_new_best_actual_convergentcomputation) + (cfc_matrix_best_actual_convergentcomputationfollowingcode)) + ((cfc_matrix_best_actual_convergentcomputationfollowingcode) + (cfc_matrix_best_actual_convergentcomputationfollowingcode))))))) /\ (((exists ff_h_best_actual_convergentcomputationfollowingentry. ff_h_best_actual_convergentcomputationfollowingentry + S (cfc_state_best_actual_convergentcomputationfollowing) = S ((S (S cfc_index_best_actual_convergentcomputation)) * cfc_scale_best_actual_convergent)) /\ exists ff_q_best_actual_convergentcomputationfollowingentry. cfc_code_best_actual_convergent = ff_q_best_actual_convergentcomputationfollowingentry * S ((S (S cfc_index_best_actual_convergentcomputation)) * cfc_scale_best_actual_convergent) + (cfc_state_best_actual_convergentcomputationfollowing))))) /\ (cfc_new_best_actual_convergentcomputation = S ((cfc_quotient_best_actual_convergentcomputation + cfc_old_best_actual_convergentcomputation) * S (cfc_quotient_best_actual_convergentcomputation + cfc_old_best_actual_convergentcomputation) + (cfc_old_best_actual_convergentcomputation + cfc_old_best_actual_convergentcomputation))))))))))))) -> (forall cfc_numerator_best_natural cfc_denominator_best_natural cfc_current_error_best_natural cfc_candidate_error_best_natural. ~(cfc_denominator_best_natural = 0) -> (exists cfba_gap_best_naturaldenominator. cfba_gap_best_naturaldenominator + S (cfc_denominator_best_natural) = (v)) -> ((((a) * (v)) = ((b) * (u)) + (cfc_current_error_best_natural)) \/ (((b) * (u)) = ((a) * (v)) + (cfc_current_error_best_natural))) -> ((((a) * cfc_denominator_best_natural) = ((b) * cfc_numerator_best_natural) + (cfc_candidate_error_best_natural)) \/ (((b) * cfc_numerator_best_natural) = ((a) * cfc_denominator_best_natural) + (cfc_candidate_error_best_natural))) -> (exists cfba_bound_best_naturalresult. cfba_bound_best_naturalresult + (cfc_current_error_best_natural) = (cfc_candidate_error_best_natural)))

Complete tactic proof in conservative notation

All 42 original proof lines are preserved. Only local proposition formulas are abbreviated; every abbreviation has an exact binder-safe expansion check. The linked exact edition contains the unchanged replay script.

Read the argument

Proof checkpoints

42 script commands · 6 reading checkpoints · 1 local claims

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.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

Named ingredients (2)
01Fix variables and assumptionsL1–7

Work with arbitrary variables or the premises of the current implication.

  1. L1
    intro a
  2. L2
    intro b
  3. L3
    intro s
  4. L4
    intro i
  5. L5
    intro u
  6. L6
    intro v
  7. L7
    intro h
02Separate the logical casesL8–8

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L8
    cases h
03Establish hbestL9–18

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply continued fraction convergent best approximation signed.

  1. L9
    have hbest : SignedBestApproximationSecondKind(a,b,u,v)Definitions: SignedBestApproximationSecondKind(a,b,u,v)Original native command in the exact edition
  2. L10
    specialize continued_fraction_convergent_best_approximation_signed (a)
  3. L11
    specialize continued_fraction_convergent_best_approximation_signed (b)
  4. L12
    specialize continued_fraction_convergent_best_approximation_signed (s)
  5. L13
    specialize continued_fraction_convergent_best_approximation_signed (i)
  6. L14
    specialize continued_fraction_convergent_best_approximation_signed (u)
  7. L15
    specialize continued_fraction_convergent_best_approximation_signed (v)
  8. L16
    apply continued_fraction_convergent_best_approximation_signed
  9. L17
    exact h_left
  10. L18
    exact h_right
04Fix variables and assumptionsL19–26

Work with arbitrary variables or the premises of the current implication.

  1. L19
    intro r
  2. L20
    intro t
  3. L21
    intro C
  4. L22
    intro D
  5. L23
    intro ht
  6. L24
    intro hlt
  7. L25
    intro hc
  8. L26
    intro hd
05Use earlier factsL27–36

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L27
    specialize hbest (r)
  2. L28
    specialize hbest (0)
  3. L29
    specialize hbest (t)
  4. L30
    specialize hbest (C)
  5. L31
    specialize hbest (D)
  6. L32
    apply hbest
  7. L33
    exact ht
  8. L34
    exact hlt
  9. L35
    exact hc
  10. L36
    specialize cf_approximation_natural_error_as_signed (a)
06Use earlier factsL37–42

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L37
    specialize cf_approximation_natural_error_as_signed (b)
  2. L38
    specialize cf_approximation_natural_error_as_signed (r)
  3. L39
    specialize cf_approximation_natural_error_as_signed (t)
  4. L40
    specialize cf_approximation_natural_error_as_signed (D)
  5. L41
    apply cf_approximation_natural_error_as_signed
  6. L42
    exact hd

Library-wide reading audit

Original defined command ledger · 42 lines
  1. 0001intro a
  2. 0002intro b
  3. 0003intro s
  4. 0004intro i
  5. 0005intro u
  6. 0006intro v
  7. 0007intro h
  8. 0008cases h
  9. 0009have hbest : SignedBestApproximationSecondKind(a,b,u,v)
  10. 0010specialize continued_fraction_convergent_best_approximation_signed (a)
  11. 0011specialize continued_fraction_convergent_best_approximation_signed (b)
  12. 0012specialize continued_fraction_convergent_best_approximation_signed (s)
  13. 0013specialize continued_fraction_convergent_best_approximation_signed (i)
  14. 0014specialize continued_fraction_convergent_best_approximation_signed (u)
  15. 0015specialize continued_fraction_convergent_best_approximation_signed (v)
  16. 0016apply continued_fraction_convergent_best_approximation_signed
  17. 0017exact h_left
  18. 0018exact h_right
  19. 0019intro r
  20. 0020intro t
  21. 0021intro C
  22. 0022intro D
  23. 0023intro ht
  24. 0024intro hlt
  25. 0025intro hc
  26. 0026intro hd
  27. 0027specialize hbest (r)
  28. 0028specialize hbest (0)
  29. 0029specialize hbest (t)
  30. 0030specialize hbest (C)
  31. 0031specialize hbest (D)
  32. 0032apply hbest
  33. 0033exact ht
  34. 0034exact hlt
  35. 0035exact hc
  36. 0036specialize cf_approximation_natural_error_as_signed (a)
  37. 0037specialize cf_approximation_natural_error_as_signed (b)
  38. 0038specialize cf_approximation_natural_error_as_signed (r)
  39. 0039specialize cf_approximation_natural_error_as_signed (t)
  40. 0040specialize cf_approximation_natural_error_as_signed (D)
  41. 0041apply cf_approximation_natural_error_as_signed
  42. 0042exact hd