Documentation

Analysis.Section_5_1

Analysis I, Section 5.1 #

I have attempted to make the translation as faithful a paraphrasing as possible of the original text. When there is a choice between a more idiomatic Lean solution and a more faithful translation, I have generally chosen the latter. In particular, there will be places where the Lean code could be "golfed" to be more elegant and idiomatic, but I have consciously avoided doing so.

Main constructions and results of this section:

Definition 5.1.1 (Sequence). To avoid some technicalities involving dependent types, we extend sequences by zero to the left of the starting point n₀.

Instances For
    theorem Chapter5.Sequence.ext {x y : Sequence} (n₀ : x.n₀ = y.n₀) (seq : x.seq = y.seq) :
    x = y

    Sequence can be thought of as functions from ℤ to ℚ.

    Equations

    Functions from ℕ to ℚ can be thought of as sequences.

    Equations
    @[reducible, inline]
    abbrev Chapter5.Sequence.mk' (n₀ : ) (a : { n : // n n₀ }) :
    Equations
    Instances For
      theorem Chapter5.Sequence.eval_mk {n n₀ : } (a : { n : // n n₀ }) (h : n n₀) :
      (mk' n₀ a).seq n = a n, h
      @[simp]
      theorem Chapter5.Sequence.eval_coe (n : ) (a : ) :
      { n₀ := 0, seq := fun (n : ) => if n 0 then a n.toNat else 0, vanish := }.seq n = a n
      @[reducible, inline]

      Example 5.1.2

      Equations
      Instances For
        @[reducible, inline]

        Example 5.1.2

        Equations
        Instances For
          @[reducible, inline]

          Example 5.1.2

          Equations
          Instances For
            @[reducible, inline]
            abbrev Rat.steady (ε : ) (a : Chapter5.Sequence) :
            Equations
            Instances For
              theorem Chapter5.Rat.steady_def (ε : ) (a : Sequence) :
              ε.steady a ∀ (n m : ), ε.close (a.seq n) (a.seq m)
              theorem Chapter5.Rat.steady_def' (ε : ) (a : Sequence) :
              ε.steady a ∀ (n m : ), n a.n₀ m a.n₀ε.close (a.seq n) (a.seq m)
              @[reducible, inline]

              a.from n₁ starts a:Sequence from n₁. It is intended for use when n₁ ≥ n₀, but returns the "junk" value of the original sequence a otherwise.

              Equations
              Instances For
                theorem Chapter5.Sequence.from_eval (a : Sequence) {n₁ n : } (hn : n n₁) :
                (a.from n₁).seq n = a.seq n
                @[reducible, inline]

                Definition 5.1.6 (Eventually ε-steady)

                Equations
                Instances For
                  theorem Chapter5.Rat.eventuallySteady_def (ε : ) (a : Sequence) :
                  ε.eventuallySteady a Na.n₀, ε.steady (a.from N)
                  theorem Chapter5.Sequence.ex_5_1_7_a :
                  ¬Rat.steady 0.1 { n₀ := 0, seq := fun (n : ) => if n 0 then (fun (n : ) => (n + 1)⁻¹) n.toNat else 0, vanish := }

                  Example 5.1.7

                  theorem Chapter5.Sequence.ex_5_1_7_b :
                  Rat.steady 0.1 ({ n₀ := 0, seq := fun (n : ) => if n 0 then (fun (n : ) => (n + 1)⁻¹) n.toNat else 0, vanish := }.from 10)
                  theorem Chapter5.Sequence.ex_5_1_7_c :
                  Rat.eventuallySteady 0.1 { n₀ := 0, seq := fun (n : ) => if n 0 then (fun (n : ) => (n + 1)⁻¹) n.toNat else 0, vanish := }
                  theorem Chapter5.Sequence.ex_5_1_7_d {ε : } ( : ε > 0) :
                  ε.eventuallySteady { n₀ := 0, seq := fun (n : ) => if n 0 then (fun (n : ) => if n = 0 then 10 else 0) n.toNat else 0, vanish := }
                  @[reducible, inline]
                  Equations
                  Instances For
                    theorem Chapter5.Sequence.isCauchy_of_coe (a : ) :
                    { n₀ := 0, seq := fun (n : ) => if n 0 then a n.toNat else 0, vanish := }.isCauchy ε > 0, ∃ (N : ), ∀ (j k : ), j N k NSection_4_3.dist (a j) (a k) ε
                    theorem Chapter5.Sequence.isCauchy_of_mk {n₀ : } (a : { n : // n n₀ }) :
                    (mk' n₀ a).isCauchy ε > 0, Nn₀, ∀ (j k : ), j N k NSection_4_3.dist ((mk' n₀ a).seq j) ((mk' n₀ a).seq k) ε
                    Equations
                    Instances For

                      Example 5.1.10. (This requires extensive familiarity with Mathlib's API for the real numbers. )

                      Example 5.1.10. (This requires extensive familiarity with Mathlib's API for the real numbers. )

                      theorem Chapter5.Sequence.harmonic_steady :
                      (mk' 1 fun (n : { n : // n 1 }) => 1 / n).isCauchy

                      Proposition 5.1.11

                      @[reducible, inline]
                      abbrev Chapter5.BoundedBy {n : } (a : Fin n) (M : ) :
                      Equations
                      Instances For
                        theorem Chapter5.BoundedBy_def {n : } (a : Fin n) (M : ) :
                        BoundedBy a M ∀ (i : Fin n), |a i| M

                        Definition 5.1.12 (bounded sequences). Here we start sequences from 0 rather than 1 to align better with Mathlib conventions.

                        @[reducible, inline]
                        Equations
                        Instances For
                          theorem Chapter5.Sequence.BoundedBy_def (a : Sequence) (M : ) :
                          a.BoundedBy M ∀ (n : ), |a.seq n| M

                          Definition 5.1.12 (bounded sequences)

                          @[reducible, inline]
                          Equations
                          Instances For

                            Definition 5.1.12 (bounded sequences)

                            theorem Chapter5.bounded_of_finite {n : } (a : Fin n) :
                            M0, BoundedBy a M

                            Lemma 5.1.14

                            Lemma 5.1.15 (Cauchy sequences are bounded) / Exercise 5.1.1