algebra.continued_fractions.terminated_stable
⟷
Mathlib.Algebra.ContinuedFractions.TerminatedStable
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -38,7 +38,7 @@ variable [DivisionRing K]
theorem continuantsAux_stable_step_of_terminated (terminated_at_n : g.TerminatedAt n) :
g.continuantsAux (n + 2) = g.continuantsAux (n + 1) :=
by
- rw [terminated_at_iff_s_none] at terminated_at_n
+ rw [terminated_at_iff_s_none] at terminated_at_n
simp only [terminated_at_n, continuants_aux]
#align generalized_continued_fraction.continuants_aux_stable_step_of_terminated GeneralizedContinuedFraction.continuantsAux_stable_step_of_terminated
-/
@@ -58,7 +58,7 @@ theorem continuantsAux_stable_of_terminated (n_lt_m : n < m) (terminated_at_n :
theorem convergents'Aux_stable_step_of_terminated {s : Seq <| Pair K}
(terminated_at_n : s.TerminatedAt n) : convergents'Aux s (n + 1) = convergents'Aux s n :=
by
- change s.nth n = none at terminated_at_n
+ change s.nth n = none at terminated_at_n
induction' n with n IH generalizing s
case zero => simp only [convergents'_aux, terminated_at_n, seq.head]
case succ =>
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2020 Kevin Kappelmann. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Kappelmann
-/
-import Mathbin.Algebra.ContinuedFractions.Translations
+import Algebra.ContinuedFractions.Translations
#align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"b5ad141426bb005414324f89719c77c0aa3ec612"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2020 Kevin Kappelmann. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Kappelmann
-
-! This file was ported from Lean 3 source module algebra.continued_fractions.terminated_stable
-! leanprover-community/mathlib commit b5ad141426bb005414324f89719c77c0aa3ec612
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.ContinuedFractions.Translations
+#align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"b5ad141426bb005414324f89719c77c0aa3ec612"
+
/-!
# Stabilisation of gcf Computations Under Termination
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -24,7 +24,7 @@ We show that the continuants and convergents of a gcf stabilise once the gcf ter
namespace GeneralizedContinuedFraction
-/- ./././Mathport/Syntax/Translate/Command.lean:229:11: unsupported: unusual advanced open style -/
+/- ./././Mathport/Syntax/Translate/Command.lean:230:11: unsupported: unusual advanced open style -/
variable {K : Type _} {g : GeneralizedContinuedFraction K} {n m : ℕ}
#print GeneralizedContinuedFraction.terminated_stable /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -41,7 +41,7 @@ variable [DivisionRing K]
theorem continuantsAux_stable_step_of_terminated (terminated_at_n : g.TerminatedAt n) :
g.continuantsAux (n + 2) = g.continuantsAux (n + 1) :=
by
- rw [terminated_at_iff_s_none] at terminated_at_n
+ rw [terminated_at_iff_s_none] at terminated_at_n
simp only [terminated_at_n, continuants_aux]
#align generalized_continued_fraction.continuants_aux_stable_step_of_terminated GeneralizedContinuedFraction.continuantsAux_stable_step_of_terminated
-/
@@ -61,7 +61,7 @@ theorem continuantsAux_stable_of_terminated (n_lt_m : n < m) (terminated_at_n :
theorem convergents'Aux_stable_step_of_terminated {s : Seq <| Pair K}
(terminated_at_n : s.TerminatedAt n) : convergents'Aux s (n + 1) = convergents'Aux s n :=
by
- change s.nth n = none at terminated_at_n
+ change s.nth n = none at terminated_at_n
induction' n with n IH generalizing s
case zero => simp only [convergents'_aux, terminated_at_n, seq.head]
case succ =>
mathlib commit https://github.com/leanprover-community/mathlib/commit/08e1d8d4d989df3a6df86f385e9053ec8a372cc1
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Kappelmann
! This file was ported from Lean 3 source module algebra.continued_fractions.terminated_stable
-! leanprover-community/mathlib commit a7e36e48519ab281320c4d192da6a7b348ce40ad
+! leanprover-community/mathlib commit b5ad141426bb005414324f89719c77c0aa3ec612
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -13,6 +13,9 @@ import Mathbin.Algebra.ContinuedFractions.Translations
/-!
# Stabilisation of gcf Computations Under Termination
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
## Summary
We show that the continuants and convergents of a gcf stabilise once the gcf terminates.
mathlib commit https://github.com/leanprover-community/mathlib/commit/92c69b77c5a7dc0f7eeddb552508633305157caa
@@ -24,21 +24,26 @@ namespace GeneralizedContinuedFraction
/- ./././Mathport/Syntax/Translate/Command.lean:229:11: unsupported: unusual advanced open style -/
variable {K : Type _} {g : GeneralizedContinuedFraction K} {n m : ℕ}
+#print GeneralizedContinuedFraction.terminated_stable /-
/-- If a gcf terminated at position `n`, it also terminated at `m ≥ n`.-/
theorem terminated_stable (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
g.TerminatedAt m :=
g.s.terminated_stable n_le_m terminated_at_n
#align generalized_continued_fraction.terminated_stable GeneralizedContinuedFraction.terminated_stable
+-/
variable [DivisionRing K]
+#print GeneralizedContinuedFraction.continuantsAux_stable_step_of_terminated /-
theorem continuantsAux_stable_step_of_terminated (terminated_at_n : g.TerminatedAt n) :
g.continuantsAux (n + 2) = g.continuantsAux (n + 1) :=
by
rw [terminated_at_iff_s_none] at terminated_at_n
simp only [terminated_at_n, continuants_aux]
#align generalized_continued_fraction.continuants_aux_stable_step_of_terminated GeneralizedContinuedFraction.continuantsAux_stable_step_of_terminated
+-/
+#print GeneralizedContinuedFraction.continuantsAux_stable_of_terminated /-
theorem continuantsAux_stable_of_terminated (n_lt_m : n < m) (terminated_at_n : g.TerminatedAt n) :
g.continuantsAux m = g.continuantsAux (n + 1) :=
by
@@ -47,7 +52,9 @@ theorem continuantsAux_stable_of_terminated (n_lt_m : n < m) (terminated_at_n :
refine' (continuants_aux_stable_step_of_terminated _).trans hk
exact terminated_stable (Nat.le_add_right _ _) terminated_at_n
#align generalized_continued_fraction.continuants_aux_stable_of_terminated GeneralizedContinuedFraction.continuantsAux_stable_of_terminated
+-/
+#print GeneralizedContinuedFraction.convergents'Aux_stable_step_of_terminated /-
theorem convergents'Aux_stable_step_of_terminated {s : Seq <| Pair K}
(terminated_at_n : s.TerminatedAt n) : convergents'Aux s (n + 1) = convergents'Aux s n :=
by
@@ -62,7 +69,9 @@ theorem convergents'Aux_stable_step_of_terminated {s : Seq <| Pair K}
have : s.tail.terminated_at n := by simp only [seq.terminated_at, s.nth_tail, terminated_at_n]
simp only [convergents'_aux, s_head_eq, IH this]
#align generalized_continued_fraction.convergents'_aux_stable_step_of_terminated GeneralizedContinuedFraction.convergents'Aux_stable_step_of_terminated
+-/
+#print GeneralizedContinuedFraction.convergents'Aux_stable_of_terminated /-
theorem convergents'Aux_stable_of_terminated {s : Seq <| Pair K} (n_le_m : n ≤ m)
(terminated_at_n : s.TerminatedAt n) : convergents'Aux s m = convergents'Aux s n :=
by
@@ -71,33 +80,44 @@ theorem convergents'Aux_stable_of_terminated {s : Seq <| Pair K} (n_le_m : n ≤
· refine' (convergents'_aux_stable_step_of_terminated _).trans IH
exact s.terminated_stable n_le_m terminated_at_n
#align generalized_continued_fraction.convergents'_aux_stable_of_terminated GeneralizedContinuedFraction.convergents'Aux_stable_of_terminated
+-/
+#print GeneralizedContinuedFraction.continuants_stable_of_terminated /-
theorem continuants_stable_of_terminated (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
g.continuants m = g.continuants n := by
simp only [nth_cont_eq_succ_nth_cont_aux,
continuants_aux_stable_of_terminated (nat.pred_le_iff.elim_left n_le_m) terminated_at_n]
#align generalized_continued_fraction.continuants_stable_of_terminated GeneralizedContinuedFraction.continuants_stable_of_terminated
+-/
+#print GeneralizedContinuedFraction.numerators_stable_of_terminated /-
theorem numerators_stable_of_terminated (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
g.numerators m = g.numerators n := by
simp only [num_eq_conts_a, continuants_stable_of_terminated n_le_m terminated_at_n]
#align generalized_continued_fraction.numerators_stable_of_terminated GeneralizedContinuedFraction.numerators_stable_of_terminated
+-/
+#print GeneralizedContinuedFraction.denominators_stable_of_terminated /-
theorem denominators_stable_of_terminated (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
g.denominators m = g.denominators n := by
simp only [denom_eq_conts_b, continuants_stable_of_terminated n_le_m terminated_at_n]
#align generalized_continued_fraction.denominators_stable_of_terminated GeneralizedContinuedFraction.denominators_stable_of_terminated
+-/
+#print GeneralizedContinuedFraction.convergents_stable_of_terminated /-
theorem convergents_stable_of_terminated (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
g.convergents m = g.convergents n := by
simp only [convergents, denominators_stable_of_terminated n_le_m terminated_at_n,
numerators_stable_of_terminated n_le_m terminated_at_n]
#align generalized_continued_fraction.convergents_stable_of_terminated GeneralizedContinuedFraction.convergents_stable_of_terminated
+-/
+#print GeneralizedContinuedFraction.convergents'_stable_of_terminated /-
theorem convergents'_stable_of_terminated (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
g.convergents' m = g.convergents' n := by
simp only [convergents', convergents'_aux_stable_of_terminated n_le_m terminated_at_n]
#align generalized_continued_fraction.convergents'_stable_of_terminated GeneralizedContinuedFraction.convergents'_stable_of_terminated
+-/
end GeneralizedContinuedFraction
mathlib commit https://github.com/leanprover-community/mathlib/commit/09079525fd01b3dda35e96adaa08d2f943e1648c
@@ -21,7 +21,7 @@ We show that the continuants and convergents of a gcf stabilise once the gcf ter
namespace GeneralizedContinuedFraction
-/- ./././Mathport/Syntax/Translate/Command.lean:224:11: unsupported: unusual advanced open style -/
+/- ./././Mathport/Syntax/Translate/Command.lean:229:11: unsupported: unusual advanced open style -/
variable {K : Type _} {g : GeneralizedContinuedFraction K} {n m : ℕ}
/-- If a gcf terminated at position `n`, it also terminated at `m ≥ n`.-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/b685f506164f8d17a6404048bc4d696739c5d976
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Kappelmann
! This file was ported from Lean 3 source module algebra.continued_fractions.terminated_stable
-! leanprover-community/mathlib commit 134625f523e737f650a6ea7f0c82a6177e45e622
+! leanprover-community/mathlib commit a7e36e48519ab281320c4d192da6a7b348ce40ad
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -21,6 +21,7 @@ We show that the continuants and convergents of a gcf stabilise once the gcf ter
namespace GeneralizedContinuedFraction
+/- ./././Mathport/Syntax/Translate/Command.lean:224:11: unsupported: unusual advanced open style -/
variable {K : Type _} {g : GeneralizedContinuedFraction K} {n m : ℕ}
/-- If a gcf terminated at position `n`, it also terminated at `m ≥ n`.-/
@@ -47,23 +48,22 @@ theorem continuantsAux_stable_of_terminated (n_lt_m : n < m) (terminated_at_n :
exact terminated_stable (Nat.le_add_right _ _) terminated_at_n
#align generalized_continued_fraction.continuants_aux_stable_of_terminated GeneralizedContinuedFraction.continuantsAux_stable_of_terminated
-theorem convergents'Aux_stable_step_of_terminated {s : SeqCat <| Pair K}
+theorem convergents'Aux_stable_step_of_terminated {s : Seq <| Pair K}
(terminated_at_n : s.TerminatedAt n) : convergents'Aux s (n + 1) = convergents'Aux s n :=
by
change s.nth n = none at terminated_at_n
induction' n with n IH generalizing s
- case zero => simp only [convergents'_aux, terminated_at_n, SeqCat.head]
+ case zero => simp only [convergents'_aux, terminated_at_n, seq.head]
case succ =>
cases' s_head_eq : s.head with gp_head
case none => simp only [convergents'_aux, s_head_eq]
case
some =>
- have : s.tail.terminated_at n := by
- simp only [SeqCat.TerminatedAt, s.nth_tail, terminated_at_n]
+ have : s.tail.terminated_at n := by simp only [seq.terminated_at, s.nth_tail, terminated_at_n]
simp only [convergents'_aux, s_head_eq, IH this]
#align generalized_continued_fraction.convergents'_aux_stable_step_of_terminated GeneralizedContinuedFraction.convergents'Aux_stable_step_of_terminated
-theorem convergents'Aux_stable_of_terminated {s : SeqCat <| Pair K} (n_le_m : n ≤ m)
+theorem convergents'Aux_stable_of_terminated {s : Seq <| Pair K} (n_le_m : n ≤ m)
(terminated_at_n : s.TerminatedAt n) : convergents'Aux s m = convergents'Aux s n :=
by
induction' n_le_m with m n_le_m IH
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.
@@ -20,7 +20,7 @@ namespace GeneralizedContinuedFraction
variable {K : Type*} {g : GeneralizedContinuedFraction K} {n m : ℕ}
-/-- If a gcf terminated at position `n`, it also terminated at `m ≥ n`.-/
+/-- If a gcf terminated at position `n`, it also terminated at `m ≥ n`. -/
theorem terminated_stable (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
g.TerminatedAt m :=
g.s.terminated_stable n_le_m terminated_at_n
Make use of Nat
-specific lemmas from Std rather than the general ones provided by mathlib. Also reverse the dependency between Multiset.Nodup
/Multiset.dedup
and Multiset.sum
since only the latter needs algebra. Also rename Algebra.BigOperators.Multiset.Abs
to Algebra.BigOperators.Multiset.Order
and move some lemmas from Algebra.BigOperators.Multiset.Basic
to it.
The ultimate goal here is to carve out Data
, Algebra
and Order
sublibraries.
@@ -31,7 +31,7 @@ variable [DivisionRing K]
theorem continuantsAux_stable_step_of_terminated (terminated_at_n : g.TerminatedAt n) :
g.continuantsAux (n + 2) = g.continuantsAux (n + 1) := by
rw [terminatedAt_iff_s_none] at terminated_at_n
- simp only [continuantsAux, Nat.add_eq, add_zero, terminated_at_n]
+ simp only [continuantsAux, Nat.add_eq, Nat.add_zero, terminated_at_n]
#align generalized_continued_fraction.continuants_aux_stable_step_of_terminated GeneralizedContinuedFraction.continuantsAux_stable_step_of_terminated
theorem continuantsAux_stable_of_terminated (n_lt_m : n < m) (terminated_at_n : g.TerminatedAt n) :
Move basic Nat
lemmas from Data.Nat.Order.Basic
and Data.Nat.Pow
to Data.Nat.Defs
. Most proofs need adapting, but that's easily solved by replacing the general mathlib lemmas by the new Std Nat
-specific lemmas and using omega
.
Data.Nat.Pow
to Algebra.GroupPower.Order
Data.Nat.Pow
to Algebra.GroupPower.Order
bit
/bit0
/bit1
lemmas from Data.Nat.Order.Basic
to Data.Nat.Bits
Data.Nat.Order.Basic
anymoreNat
-specific lemmas to help fix the fallout (look for nolint simpNF
)Nat.mul_self_le_mul_self_iff
and Nat.mul_self_lt_mul_self_iff
around (they were misnamed)Nat.one_lt_pow
implicit@@ -4,7 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Kappelmann
-/
import Mathlib.Algebra.ContinuedFractions.Translations
-import Mathlib.Data.Nat.Order.Basic
#align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
Use Nat
specialized theorems, and omega
, where necessary to avoid needing to import the abstract ordered algebra hierarchy for basic results about List
.
Import graph between Mathlib.Order.Basic
and Mathlib.Data.List.Basic
:
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Kappelmann
-/
import Mathlib.Algebra.ContinuedFractions.Translations
+import Mathlib.Data.Nat.Order.Basic
#align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
cases x with | ...
instead of cases x; case => ...
(#9321)
This converts usages of the pattern
cases h
case inl h' => ...
case inr h' => ...
which derive from mathported code, to the "structured cases
" syntax:
cases h with
| inl h' => ...
| inr h' => ...
The case where the subgoals are handled with ·
instead of case
is more contentious (and much more numerous) so I left those alone. This pattern also appears with cases'
, induction
, induction'
, and rcases
. Furthermore, there is a similar transformation for by_cases
:
by_cases h : cond
case pos => ...
case neg => ...
is replaced by:
if h : cond then
...
else
...
Co-authored-by: Mario Carneiro <di.gama@gmail.com>
@@ -45,12 +45,12 @@ theorem continuantsAux_stable_of_terminated (n_lt_m : n < m) (terminated_at_n :
theorem convergents'Aux_stable_step_of_terminated {s : Stream'.Seq <| Pair K}
(terminated_at_n : s.TerminatedAt n) : convergents'Aux s (n + 1) = convergents'Aux s n := by
change s.get? n = none at terminated_at_n
- induction' n with n IH generalizing s
- case zero => simp only [convergents'Aux, terminated_at_n, Stream'.Seq.head]
- case succ =>
- cases' s_head_eq : s.head with gp_head
- case none => simp only [convergents'Aux, s_head_eq]
- case some =>
+ induction n generalizing s with
+ | zero => simp only [convergents'Aux, terminated_at_n, Stream'.Seq.head]
+ | succ n IH =>
+ cases s_head_eq : s.head with
+ | none => simp only [convergents'Aux, s_head_eq]
+ | some gp_head =>
have : s.tail.TerminatedAt n := by
simp only [Stream'.Seq.TerminatedAt, s.get?_tail, terminated_at_n]
have := IH this
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -18,7 +18,7 @@ We show that the continuants and convergents of a gcf stabilise once the gcf ter
namespace GeneralizedContinuedFraction
-variable {K : Type _} {g : GeneralizedContinuedFraction K} {n m : ℕ}
+variable {K : Type*} {g : GeneralizedContinuedFraction K} {n m : ℕ}
/-- If a gcf terminated at position `n`, it also terminated at `m ≥ n`.-/
theorem terminated_stable (n_le_m : n ≤ m) (terminated_at_n : g.TerminatedAt n) :
@@ -2,14 +2,11 @@
Copyright (c) 2020 Kevin Kappelmann. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kevin Kappelmann
-
-! This file was ported from Lean 3 source module algebra.continued_fractions.terminated_stable
-! leanprover-community/mathlib commit a7e36e48519ab281320c4d192da6a7b348ce40ad
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.ContinuedFractions.Translations
+#align_import algebra.continued_fractions.terminated_stable from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
+
/-!
# Stabilisation of gcf Computations Under Termination
The unported dependencies are