algebra.continued_fractions.computation.basicMathlib.Algebra.ContinuedFractions.Computation.Basic

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,8 +3,8 @@ 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.Order.Floor
-import Mathbin.Algebra.ContinuedFractions.Basic
+import Algebra.Order.Floor
+import Algebra.ContinuedFractions.Basic
 
 #align_import algebra.continued_fractions.computation.basic from "leanprover-community/mathlib"@"b5ad141426bb005414324f89719c77c0aa3ec612"
 
Diff
@@ -2,15 +2,12 @@
 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.computation.basic
-! 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.Order.Floor
 import Mathbin.Algebra.ContinuedFractions.Basic
 
+#align_import algebra.continued_fractions.computation.basic from "leanprover-community/mathlib"@"b5ad141426bb005414324f89719c77c0aa3ec612"
+
 /-!
 # Computable Continued Fractions
 
Diff
@@ -123,11 +123,13 @@ instance coe : Coe (IntFractPair K) (IntFractPair β) :=
 #align generalized_continued_fraction.int_fract_pair.has_coe_to_int_fract_pair GeneralizedContinuedFraction.IntFractPair.coe
 -/
 
+#print GeneralizedContinuedFraction.IntFractPair.coe_to_intFractPair /-
 @[simp, norm_cast]
 theorem coe_to_intFractPair {b : ℤ} {fr : K} :
     (↑(IntFractPair.mk b fr) : IntFractPair β) = IntFractPair.mk b (↑fr : β) :=
   rfl
 #align generalized_continued_fraction.int_fract_pair.coe_to_int_fract_pair GeneralizedContinuedFraction.IntFractPair.coe_to_intFractPair
+-/
 
 end coe
 
Diff
@@ -123,12 +123,6 @@ instance coe : Coe (IntFractPair K) (IntFractPair β) :=
 #align generalized_continued_fraction.int_fract_pair.has_coe_to_int_fract_pair GeneralizedContinuedFraction.IntFractPair.coe
 -/
 
-/- warning: generalized_continued_fraction.int_fract_pair.coe_to_int_fract_pair -> GeneralizedContinuedFraction.IntFractPair.coe_to_intFractPair is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u_1}} {β : Type.{u_2}} [_inst_1 : Coe.{succ u_1, succ u_2} K β] {b : Int} {fr : K}, Eq.{succ u_2} (GeneralizedContinuedFraction.IntFractPair.{u_2} β) ((fun (a : Type.{u_1}) (b : Type.{u_2}) [self : HasLiftT.{succ u_1, succ u_2} a b] => self.0) (GeneralizedContinuedFraction.IntFractPair.{u_1} K) (GeneralizedContinuedFraction.IntFractPair.{u_2} β) (HasLiftT.mk.{succ u_1, succ u_2} (GeneralizedContinuedFraction.IntFractPair.{u_1} K) (GeneralizedContinuedFraction.IntFractPair.{u_2} β) (CoeTCₓ.coe.{succ u_1, succ u_2} (GeneralizedContinuedFraction.IntFractPair.{u_1} K) (GeneralizedContinuedFraction.IntFractPair.{u_2} β) (coeBase.{succ u_1, succ u_2} (GeneralizedContinuedFraction.IntFractPair.{u_1} K) (GeneralizedContinuedFraction.IntFractPair.{u_2} β) (GeneralizedContinuedFraction.IntFractPair.coe.{u_1, u_2} K β _inst_1)))) (GeneralizedContinuedFraction.IntFractPair.mk.{u_1} K b fr)) (GeneralizedContinuedFraction.IntFractPair.mk.{u_2} β b ((fun (a : Type.{u_1}) (b : Type.{u_2}) [self : HasLiftT.{succ u_1, succ u_2} a b] => self.0) K β (HasLiftT.mk.{succ u_1, succ u_2} K β (CoeTCₓ.coe.{succ u_1, succ u_2} K β (coeBase.{succ u_1, succ u_2} K β _inst_1))) fr))
-but is expected to have type
-  forall {K : Type.{u_1}} {β : Type.{u_1}} [_inst_1 : Coe.{succ u_1, succ u_1} K β] {b : Int} {fr : K}, Eq.{succ u_1} (GeneralizedContinuedFraction.IntFractPair.{u_1} β) (GeneralizedContinuedFraction.IntFractPair.coeFn.{u_1, u_1} K β _inst_1 (GeneralizedContinuedFraction.IntFractPair.mk.{u_1} K b fr)) (GeneralizedContinuedFraction.IntFractPair.mk.{u_1} β b (Coe.coe.{succ u_1, succ u_1} K β _inst_1 fr))
-Case conversion may be inaccurate. Consider using '#align generalized_continued_fraction.int_fract_pair.coe_to_int_fract_pair GeneralizedContinuedFraction.IntFractPair.coe_to_intFractPairₓ'. -/
 @[simp, norm_cast]
 theorem coe_to_intFractPair {b : ℤ} {fr : K} :
     (↑(IntFractPair.mk b fr) : IntFractPair β) = IntFractPair.mk b (↑fr : β) :=
Diff
@@ -175,9 +175,7 @@ protected def stream (v : K) : Stream' <| Option (IntFractPair K)
 /-- Shows that `int_fract_pair.stream` has the sequence property, that is once we return `none` at
 position `n`, we also return `none` at `n + 1`.
 -/
-theorem stream_isSeq (v : K) : (IntFractPair.stream v).IsSeq :=
-  by
-  intro _ hyp
+theorem stream_isSeq (v : K) : (IntFractPair.stream v).IsSeq := by intro _ hyp;
   simp [int_fract_pair.stream, hyp]
 #align generalized_continued_fraction.int_fract_pair.stream_is_seq GeneralizedContinuedFraction.IntFractPair.stream_isSeq
 -/
Diff
@@ -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.computation.basic
-! 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.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Algebra.ContinuedFractions.Basic
 /-!
 # Computable Continued Fractions
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 ## Summary
 
 We formalise the standard computation of (regular) continued fractions for linear ordered floor
Diff
@@ -70,6 +70,7 @@ namespace GeneralizedContinuedFraction
 -- Fix a carrier `K`.
 variable (K : Type _)
 
+#print GeneralizedContinuedFraction.IntFractPair /-
 /-- We collect an integer part `b = ⌊v⌋` and fractional part `fr = v - ⌊v⌋` of a value `v` in a pair
 `⟨b, fr⟩`.
 -/
@@ -77,6 +78,7 @@ structure IntFractPair where
   b : ℤ
   fr : K
 #align generalized_continued_fraction.int_fract_pair GeneralizedContinuedFraction.IntFractPair
+-/
 
 variable {K}
 
@@ -89,15 +91,19 @@ namespace IntFractPair
 instance [Repr K] : Repr (IntFractPair K) :=
   ⟨fun p => "(b : " ++ repr p.b ++ ", fract : " ++ repr p.fr ++ ")"⟩
 
+#print GeneralizedContinuedFraction.IntFractPair.inhabited /-
 instance inhabited [Inhabited K] : Inhabited (IntFractPair K) :=
   ⟨⟨0, default⟩⟩
 #align generalized_continued_fraction.int_fract_pair.inhabited GeneralizedContinuedFraction.IntFractPair.inhabited
+-/
 
+#print GeneralizedContinuedFraction.IntFractPair.mapFr /-
 /-- Maps a function `f` on the fractional components of a given pair.
 -/
 def mapFr {β : Type _} (f : K → β) (gp : IntFractPair K) : IntFractPair β :=
   ⟨gp.b, f gp.fr⟩
 #align generalized_continued_fraction.int_fract_pair.mapFr GeneralizedContinuedFraction.IntFractPair.mapFr
+-/
 
 section coe
 
@@ -107,11 +113,19 @@ section coe
 -- Fix another type `β` which we will convert to.
 variable {β : Type _} [Coe K β]
 
+#print GeneralizedContinuedFraction.IntFractPair.coe /-
 /-- Coerce a pair by coercing the fractional component. -/
-instance hasCoeToIntFractPair : Coe (IntFractPair K) (IntFractPair β) :=
+instance coe : Coe (IntFractPair K) (IntFractPair β) :=
   ⟨mapFr coe⟩
-#align generalized_continued_fraction.int_fract_pair.has_coe_to_int_fract_pair GeneralizedContinuedFraction.IntFractPair.hasCoeToIntFractPair
+#align generalized_continued_fraction.int_fract_pair.has_coe_to_int_fract_pair GeneralizedContinuedFraction.IntFractPair.coe
+-/
 
+/- warning: generalized_continued_fraction.int_fract_pair.coe_to_int_fract_pair -> GeneralizedContinuedFraction.IntFractPair.coe_to_intFractPair is a dubious translation:
+lean 3 declaration is
+  forall {K : Type.{u_1}} {β : Type.{u_2}} [_inst_1 : Coe.{succ u_1, succ u_2} K β] {b : Int} {fr : K}, Eq.{succ u_2} (GeneralizedContinuedFraction.IntFractPair.{u_2} β) ((fun (a : Type.{u_1}) (b : Type.{u_2}) [self : HasLiftT.{succ u_1, succ u_2} a b] => self.0) (GeneralizedContinuedFraction.IntFractPair.{u_1} K) (GeneralizedContinuedFraction.IntFractPair.{u_2} β) (HasLiftT.mk.{succ u_1, succ u_2} (GeneralizedContinuedFraction.IntFractPair.{u_1} K) (GeneralizedContinuedFraction.IntFractPair.{u_2} β) (CoeTCₓ.coe.{succ u_1, succ u_2} (GeneralizedContinuedFraction.IntFractPair.{u_1} K) (GeneralizedContinuedFraction.IntFractPair.{u_2} β) (coeBase.{succ u_1, succ u_2} (GeneralizedContinuedFraction.IntFractPair.{u_1} K) (GeneralizedContinuedFraction.IntFractPair.{u_2} β) (GeneralizedContinuedFraction.IntFractPair.coe.{u_1, u_2} K β _inst_1)))) (GeneralizedContinuedFraction.IntFractPair.mk.{u_1} K b fr)) (GeneralizedContinuedFraction.IntFractPair.mk.{u_2} β b ((fun (a : Type.{u_1}) (b : Type.{u_2}) [self : HasLiftT.{succ u_1, succ u_2} a b] => self.0) K β (HasLiftT.mk.{succ u_1, succ u_2} K β (CoeTCₓ.coe.{succ u_1, succ u_2} K β (coeBase.{succ u_1, succ u_2} K β _inst_1))) fr))
+but is expected to have type
+  forall {K : Type.{u_1}} {β : Type.{u_1}} [_inst_1 : Coe.{succ u_1, succ u_1} K β] {b : Int} {fr : K}, Eq.{succ u_1} (GeneralizedContinuedFraction.IntFractPair.{u_1} β) (GeneralizedContinuedFraction.IntFractPair.coeFn.{u_1, u_1} K β _inst_1 (GeneralizedContinuedFraction.IntFractPair.mk.{u_1} K b fr)) (GeneralizedContinuedFraction.IntFractPair.mk.{u_1} β b (Coe.coe.{succ u_1, succ u_1} K β _inst_1 fr))
+Case conversion may be inaccurate. Consider using '#align generalized_continued_fraction.int_fract_pair.coe_to_int_fract_pair GeneralizedContinuedFraction.IntFractPair.coe_to_intFractPairₓ'. -/
 @[simp, norm_cast]
 theorem coe_to_intFractPair {b : ℤ} {fr : K} :
     (↑(IntFractPair.mk b fr) : IntFractPair β) = IntFractPair.mk b (↑fr : β) :=
@@ -125,11 +139,14 @@ end coe
 -- Fix a discrete linear ordered field with `floor` function.
 variable [LinearOrderedField K] [FloorRing K]
 
+#print GeneralizedContinuedFraction.IntFractPair.of /-
 /-- Creates the integer and fractional part of a value `v`, i.e. `⟨⌊v⌋, v - ⌊v⌋⟩`. -/
 protected def of (v : K) : IntFractPair K :=
   ⟨⌊v⌋, Int.fract v⟩
 #align generalized_continued_fraction.int_fract_pair.of GeneralizedContinuedFraction.IntFractPair.of
+-/
 
+#print GeneralizedContinuedFraction.IntFractPair.stream /-
 /-- Creates the stream of integer and fractional parts of a value `v` needed to obtain the continued
 fraction representation of `v` in `generalized_continued_fraction.of`. More precisely, given a value
 `v : K`, it recursively computes a stream of option `ℤ × K` pairs as follows:
@@ -149,7 +166,9 @@ protected def stream (v : K) : Stream' <| Option (IntFractPair K)
   | n + 1 =>
     (Stream' n).bind fun ap_n => if ap_n.fr = 0 then none else some (IntFractPair.of ap_n.fr⁻¹)
 #align generalized_continued_fraction.int_fract_pair.stream GeneralizedContinuedFraction.IntFractPair.stream
+-/
 
+#print GeneralizedContinuedFraction.IntFractPair.stream_isSeq /-
 /-- Shows that `int_fract_pair.stream` has the sequence property, that is once we return `none` at
 position `n`, we also return `none` at `n + 1`.
 -/
@@ -158,7 +177,9 @@ theorem stream_isSeq (v : K) : (IntFractPair.stream v).IsSeq :=
   intro _ hyp
   simp [int_fract_pair.stream, hyp]
 #align generalized_continued_fraction.int_fract_pair.stream_is_seq GeneralizedContinuedFraction.IntFractPair.stream_isSeq
+-/
 
+#print GeneralizedContinuedFraction.IntFractPair.seq1 /-
 /--
 Uses `int_fract_pair.stream` to create a sequence with head (i.e. `seq1`) of integer and fractional
 parts of a value `v`. The first value of `int_fract_pair.stream` is never `none`, so we can safely
@@ -177,10 +198,12 @@ protected def seq1 (v : K) : Stream'.Seq1 <| IntFractPair K :=
           @stream_isSeq
           _ _ _ v⟩⟩
 #align generalized_continued_fraction.int_fract_pair.seq1 GeneralizedContinuedFraction.IntFractPair.seq1
+-/
 
 -- the proof that the stream is a sequence
 end IntFractPair
 
+#print GeneralizedContinuedFraction.of /-
 /-- Returns the `generalized_continued_fraction` of a value. In fact, the returned gcf is also
 a `continued_fraction` that terminates if and only if `v` is rational (those proofs will be
 added in a future commit).
@@ -199,6 +222,7 @@ protected def of [LinearOrderedField K] [FloorRing K] (v : K) : GeneralizedConti
         s.map
       fun p => ⟨1, p.b⟩⟩
 #align generalized_continued_fraction.of GeneralizedContinuedFraction.of
+-/
 
 -- the sequence consists of the remaining integer parts as the partial
 -- denominators; all partial numerators are simply 1
Diff
@@ -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.computation.basic
-! leanprover-community/mathlib commit 10d887272d1a72b99da88bcb301d1da9d9d33696
+! leanprover-community/mathlib commit a7e36e48519ab281320c4d192da6a7b348ce40ad
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -168,10 +168,11 @@ This is just an intermediate representation and users should not (need to) direc
 it. The setup of rewriting/simplification lemmas that make the definitions easy to use is done in
 `algebra.continued_fractions.computation.translations`.
 -/
-protected def seq1 (v : K) : Seq1 <| IntFractPair K :=
+protected def seq1 (v : K) : Stream'.Seq1 <| IntFractPair K :=
   ⟨IntFractPair.of v,--the head
-      SeqCat.tail-- take the tail of `int_fract_pair.stream` since the first element is already in the
-      -- head create a sequence from `int_fract_pair.stream`
+      Stream'.Seq.tail-- take the tail of `int_fract_pair.stream` since the first element is already in
+      -- the head
+      -- create a sequence from `int_fract_pair.stream`
       ⟨IntFractPair.stream v,-- the underlying stream
           @stream_isSeq
           _ _ _ v⟩⟩

Changes in mathlib4

mathlib3
mathlib4
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -65,7 +65,7 @@ numerics, number theory, approximations, fractions
 namespace GeneralizedContinuedFraction
 
 -- Fix a carrier `K`.
-variable (K : Type _)
+variable (K : Type*)
 
 /-- We collect an integer part `b = ⌊v⌋` and fractional part `fr = v - ⌊v⌋` of a value `v` in a pair
 `⟨b, fr⟩`.
@@ -92,7 +92,7 @@ instance inhabited [Inhabited K] : Inhabited (IntFractPair K) :=
 
 /-- Maps a function `f` on the fractional components of a given pair.
 -/
-def mapFr {β : Type _} (f : K → β) (gp : IntFractPair K) : IntFractPair β :=
+def mapFr {β : Type*} (f : K → β) (gp : IntFractPair K) : IntFractPair β :=
   ⟨gp.b, f gp.fr⟩
 set_option linter.uppercaseLean3 false in
 #align generalized_continued_fraction.int_fract_pair.mapFr GeneralizedContinuedFraction.IntFractPair.mapFr
@@ -103,7 +103,7 @@ section coe
 
 
 -- Fix another type `β` which we will convert to.
-variable {β : Type _} [Coe K β]
+variable {β : Type*} [Coe K β]
 
 -- Porting note: added so we can add the `@[coe]` attribute
 /-- The coercion between integer-fraction pairs happens componentwise. -/
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 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.computation.basic
-! 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.Order.Floor
 import Mathlib.Algebra.ContinuedFractions.Basic
 
+#align_import algebra.continued_fractions.computation.basic from "leanprover-community/mathlib"@"a7e36e48519ab281320c4d192da6a7b348ce40ad"
+
 /-!
 # Computable Continued Fractions
 
chore: tidy various files (#3848)
Diff
@@ -126,7 +126,7 @@ theorem coe_to_intFractPair {b : ℤ} {fr : K} :
 
 end coe
 
--- Note: this could be relaxed to something like `linear_ordered_division_ring` in the future.
+-- Note: this could be relaxed to something like `LinearOrderedDivisionRing` in the future.
 -- Fix a discrete linear ordered field with `floor` function.
 variable [LinearOrderedField K] [FloorRing K]
 
feat: port Algebra.ContinuedFractions.Computation.Basic (#3788)

Co-authored-by: Moritz Firsching <firsching@google.com>

Dependencies 4 + 151

152 files ported (97.4%)
68483 lines ported (98.3%)
Show graph

The unported dependencies are