K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
ppredB predB : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
nth_denom_eq : denominators g n = ppredB
succ_nth_denom_eq : denominators g (n + 1) = predB
⊢ ∃ conts, continuants g n = conts ∧ conts.b = ppredB

case intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predB : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
succ_nth_denom_eq : denominators g (n + 1) = predB
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_denom_eq : denominators g n = ppredConts.b
⊢ denominators g (n + 2) = gp.b * predB + gp.a * ppredConts.b
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
ppredB predB : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
nth_denom_eq : denominators g n = ppredB
succ_nth_denom_eq : denominators g (n + 1) = predB
⊢ denominators g (n + 2) = gp.b * predB + gp.a * ppredB
obtain ⟨ppredConts, nth_conts_eq, ⟨rfl⟩⟩ : ∃ conts, g.continuants n = conts ∧ conts.b = ppredB
case intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predB : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
succ_nth_denom_eq : denominators g (n + 1) = predB
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_denom_eq : denominators g n = ppredConts.b
⊢ denominators g (n + 2) = gp.b * predB + gp.a * ppredConts.b
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
ppredB predB : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
nth_denom_eq : denominators g n = ppredB
succ_nth_denom_eq : denominators g (n + 1) = predB
⊢ ∃ conts, continuants g n = conts ∧ conts.b = ppredB

case intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predB : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
succ_nth_denom_eq : denominators g (n + 1) = predB
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_denom_eq : denominators g n = ppredConts.b
⊢ denominators g (n + 2) = gp.b * predB + gp.a * ppredConts.b
exact exists_conts_b_of_denom nth_denom_eq
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predB : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
succ_nth_denom_eq : denominators g (n + 1) = predB
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_denom_eq : denominators g n = ppredConts.b
⊢ ∃ conts, continuants g (n + 1) = conts ∧ conts.b = predB

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_denom_eq : denominators g n = ppredConts.b
predConts : Pair K
succ_nth_conts_eq : continuants g (n + 1) = predConts
succ_nth_denom_eq : denominators g (n + 1) = predConts.b
⊢ denominators g (n + 2) = gp.b * predConts.b + gp.a * ppredConts.b
case intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predB : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
succ_nth_denom_eq : denominators g (n + 1) = predB
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_denom_eq : denominators g n = ppredConts.b
⊢ denominators g (n + 2) = gp.b * predB + gp.a * ppredConts.b
obtain ⟨predConts, succ_nth_conts_eq, ⟨rfl⟩⟩ :
  ∃ conts, g.continuants (n + 1) = conts ∧ conts.b = predB
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_denom_eq : denominators g n = ppredConts.b
predConts : Pair K
succ_nth_conts_eq : continuants g (n + 1) = predConts
succ_nth_denom_eq : denominators g (n + 1) = predConts.b
⊢ denominators g (n + 2) = gp.b * predConts.b + gp.a * ppredConts.b
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predB : K
succ_nth_s_eq : Stream'.Seq.get? g.s (n + 1) = some gp
succ_nth_denom_eq : denominators g (n + 1) = predB
ppredConts : Pair K
nth_conts_eq : continuants g n = ppredConts
nth_denom_eq : denominators g n = ppredConts.b
⊢ ∃ conts, continuants g (n + 1) = conts ∧ conts.b = predB

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_denom_eq : denominators g n = ppredConts.b
predConts : Pair K
succ_nth_conts_eq : continuants g (n + 1) = predConts
succ_nth_denom_eq : denominators g (n + 1) = predConts.b
⊢ denominators g (n + 2) = gp.b * predConts.b + gp.a * ppredConts.b
exact exists_conts_b_of_denom succ_nth_denom_eq
no goals
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_denom_eq : denominators g n = ppredConts.b
predConts : Pair K
succ_nth_conts_eq : continuants g (n + 1) = predConts
succ_nth_denom_eq : denominators g (n + 1) = predConts.b
⊢ denominators g (n + 2) = gp.b * predConts.b + gp.a * ppredConts.b
rw [denom_eq_conts_b, continuants_recurrence succ_nth_s_eq nth_conts_eq succ_nth_conts_eq]