BA0053

continued_fraction_convergent_best_approximation

Alpha v34 independently verified · alpha_closed; checked-use authorized; not Stable

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.

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 expanded first-order arithmetic 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)))

Constructive proof overview

Generated structural guide

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.

The unchanged tactic script uses 2 declared prerequisites and contains 42 exact native proof lines.

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

Proof neighborhood

Direct dependencies

Direct dependents

none

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. This exact body belongs to a complete independently kernel-checked constructive proof bundle and has Alpha checked-use authority; it does not imply Stable membership.

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.

Named ingredients (2)

Long local formulas use this family’s existing definitions. Each new abbreviation was expanded back to the identical native formula, including its free-variable context. The original edition is preserved below.

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
  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 exact 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 : forall cfc_numerator_natural_from_signed cfc_negative_numerator_natural_from_signed cfc_denominator_natural_from_signed cfc_current_error_natural_from_signed cfc_candidate_error_natural_from_signed. ~(cfc_denominator_natural_from_signed = 0) -> (exists cfba_gap_natural_from_signeddenominator. cfba_gap_natural_from_signeddenominator + S (cfc_denominator_natural_from_signed) = (v)) -> ((((a) * (v)) = ((b) * (u)) + (cfc_current_error_natural_from_signed)) \/ (((b) * (u)) = ((a) * (v)) + (cfc_current_error_natural_from_signed))) -> ((((a) * cfc_denominator_natural_from_signed + (b) * cfc_negative_numerator_natural_from_signed) = ((b) * cfc_numerator_natural_from_signed) + (cfc_candidate_error_natural_from_signed)) \/ (((b) * cfc_numerator_natural_from_signed) = ((a) * cfc_denominator_natural_from_signed + (b) * cfc_negative_numerator_natural_from_signed) + (cfc_candidate_error_natural_from_signed))) -> (exists cfba_bound_natural_from_signedresult. cfba_bound_natural_from_signedresult + (cfc_current_error_natural_from_signed) = (cfc_candidate_error_natural_from_signed))
  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