Theorem: GeneralizedContinuedFraction.numerators_recurrence
File: Mathlib/Algebra/ContinuedFractions/ContinuantsRecurrence.lean

tactic: obtain ⟨ppredConts, nth_conts_eq, ⟨rfl⟩⟩ : ∃ conts, g.continuants n = conts ∧ conts.a = ppredA
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
ppredA predA : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
nth_num_eq : numerators g n = ppredA
succ_nth_num_eq : numerators g (n + 1) = predA
⊢ numerators g (n + 2) = gp.b * predA + gp.a * ppredA

tactic: exact exists_conts_a_of_num nth_num_eq
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
ppredA predA : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
nth_num_eq : numerators g n = ppredA
succ_nth_num_eq : numerators g (n + 1) = predA
⊢ ∃ conts, continuants g n = conts ∧ conts.a = ppredA

case intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predA : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
succ_nth_num_eq : numerators g (n + 1) = predA
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_num_eq : numerators g n = ppredConts.a
⊢ numerators g (n + 2) = gp.b * predA + gp.a * ppredConts.a

tactic: obtain ⟨predConts, succ_nth_conts_eq, ⟨rfl⟩⟩ :
  ∃ conts, g.continuants (n + 1) = conts ∧ conts.a = predA
state_before: case intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predA : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
succ_nth_num_eq : numerators g (n + 1) = predA
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_num_eq : numerators g n = ppredConts.a
⊢ numerators g (n + 2) = gp.b * predA + gp.a * ppredConts.a

tactic: exact exists_conts_a_of_num succ_nth_num_eq
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predA : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
succ_nth_num_eq : numerators g (n + 1) = predA
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_num_eq : numerators g n = ppredConts.a
⊢ ∃ conts, continuants g (n + 1) = conts ∧ conts.a = predA

case intro.intro.refl.intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_num_eq : numerators g n = ppredConts.a
predConts : Pair K
succ_nth_conts_eq : continuants g (n + 1) = predConts
succ_nth_num_eq : numerators g (n + 1) = predConts.a
⊢ numerators g (n + 2) = gp.b * predConts.a + gp.a * ppredConts.a

tactic: rw [num_eq_conts_a, continuants_recurrence succ_nth_s_eq nth_conts_eq succ_nth_conts_eq]
state_before: case intro.intro.refl.intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_num_eq : numerators g n = ppredConts.a
predConts : Pair K
succ_nth_conts_eq : continuants g (n + 1) = predConts
succ_nth_num_eq : numerators g (n + 1) = predConts.a
⊢ numerators g (n + 2) = gp.b * predConts.a + gp.a * ppredConts.a