Documentation

Books.IntroductiontoRealAnalysisVolumeI_JiriLebl_2025.Chapters.Chap03.section01

def IsClusterPoint (S : Set ) (x : ) :

Definition 3.1.1: For a set S ⊆ ℝ, a real number x is a cluster point of S if for every ε > 0 the punctured neighborhood (x - ε, x + ε) ∩ S \ {x} is nonempty.

Equations
Instances For

    Mathlib expresses cluster points via closure of punctured sets.

    theorem isClusterPoint_iff_exists_seq_tendsto (S : Set ) (x : ) :
    IsClusterPoint S x ∃ (u : ), (∀ (n : ), u n S u n x) Filter.Tendsto u Filter.atTop (nhds x)

    Proposition 3.1.2: A real number x is a cluster point of S ⊆ ℝ iff there exists a sequence (xₙ) with each xₙ ∈ S, xₙ ≠ x, and xₙ → x.

    def LimitWithin (S : Set ) (f : ) (c L : ) :

    Definition 3.1.3: A function f : ℝ → ℝ converges to L as x approaches c within a set S if c is a cluster point of S and for every ε > 0 there is δ > 0 such that for all x ∈ S with x ≠ c and |x - c| < δ we have |f x - L| < ε.

    Equations
    Instances For
      theorem exists_mem_near_cluster {S : Set } {c δ : } (hc : IsClusterPoint S c) ( : 0 < δ) :
      xS, x c |x - c| < δ

      Given a cluster point and a radius, we can find a point of the set that lies within that radius yet differs from the center.

      theorem abs_sub_lt_of_add {a b c ε : } (h₁ : |a - b| < ε / 2) (h₂ : |b - c| < ε / 2) :
      |a - c| < ε

      A quantitative triangle inequality specialized to halving an epsilon.

      theorem mem_diff_singleton_iff {S : Set } {x c : } :
      x S \ {c} x S x c

      Membership in S \ {c} means membership in S and inequality to c.

      theorem limitWithin_to_tendsto {S : Set } {f : } {c L : } :
      LimitWithin S f c LFilter.Tendsto f (nhdsWithin c (S \ {c})) (nhds L)

      Convert LimitWithin to a Tendsto statement on S \ {c}.

      theorem tendsto_to_limitWithin_epsdelta {S : Set } {f : } {c L : } :
      Filter.Tendsto f (nhdsWithin c (S \ {c})) (nhds L)∀ ⦃ε : ⦄, 0 < εδ > 0, ∀ ⦃x : ⦄, x Sx c|x - c| < δ|f x - L| < ε

      Repackage a Tendsto statement on S \ {c} into eps-delta form.

      theorem limitWithin_iff_tendsto (S : Set ) (f : ) (c L : ) :

      Mathlib expresses this limit as a Tendsto statement toward the nhdsWithin filter that omits the point c.

      theorem limitWithin_unique (S : Set ) (f : ) (c L₁ L₂ : ) (h₁ : LimitWithin S f c L₁) (h₂ : LimitWithin S f c L₂) :
      L₁ = L₂

      Proposition 3.1.4: If c is a cluster point of S ⊆ ℝ and a function f : ℝ → ℝ converges to some real number as x approaches c within S, then that limit value is unique.

      theorem abs_le_of_abs_sub_lt_one {x c : } (h : |x - c| < 1) :
      |x| |c| + 1

      Bounding |x| when x lies within 1 of c.

      theorem abs_sq_sub_bound {x c : } (h : |x - c| < 1) :
      |x ^ 2 - c ^ 2| (2 * |c| + 1) * |x - c|

      Bounding |x^2 - c^2| by |x - c| when x is within 1 of c.

      theorem tendsto_sq (c : ) :
      Filter.Tendsto (fun (x : ) => x ^ 2) (nhds c) (nhds (c ^ 2))

      Example 3.1.5: For the function f x = x^2 and any real c, the limit as x → c is c^2.

      noncomputable def limitValueDiff (x : ) :

      Example 3.1.6: The piecewise function on [0, 1) given by f x = x for x > 0 and f 0 = 1 satisfies f ⟶ 0 as x → 0 within [0, 1), even though f 0 = 1.

      Equations
      Instances For

        The limit of limitValueDiff at 0 within (0, 1) (the punctured part of [0, 1)) is 0.

        The value of limitValueDiff at 0 is 1, differing from the limit.

        theorem limitWithin_iff_seq_tendsto (S : Set ) (f : ) (c L : ) :
        LimitWithin S f c L IsClusterPoint S c ∀ (u : ), (∀ (n : ), u n S \ {c})Filter.Tendsto u Filter.atTop (nhds c)Filter.Tendsto (fun (n : ) => f (u n)) Filter.atTop (nhds L)

        Lemma 3.1.7: For S ⊆ ℝ, a cluster point c of S, a function f : S → ℝ, and L : ℝ, we have f(x) → L as x → c iff for every sequence (xₙ) with xₙ ∈ S \ {c} and xₙ → c, the sequence (f xₙ) converges to L.

        noncomputable def sinInvSeq (n : ) :

        The sequence uₙ = 1 / (π n + π / 2) used in Example 3.1.8.

        Equations
        Instances For
          theorem sinInvSeq_den_pos (n : ) :
          0 < Real.pi * n + Real.pi / 2
          theorem sinInvSeq_pos (n : ) :
          theorem sinInvSeq_eq (n : ) :
          sinInvSeq n = 1 / Real.pi * (1 / (n + 1 / 2))
          theorem sin_inv_seq_values (n : ) :
          Real.sin (1 / sinInvSeq n) = (-1) ^ n
          theorem pow_neg_one_not_convergent :
          ¬∃ (L : ), Filter.Tendsto (fun (n : ) => (-1) ^ n) Filter.atTop (nhds L)
          theorem seq_mul_sin_inv_tendsto_zero {v : } (hv_zero : Filter.Tendsto v Filter.atTop (nhds 0)) :
          Filter.Tendsto (fun (n : ) => v n * Real.sin (1 / v n)) Filter.atTop (nhds 0)
          theorem sin_inv_no_limit :
          ¬∃ (L : ), LimitWithin Set.univ (fun (x : ) => Real.sin (1 / x)) 0 L

          Example 3.1.8: The limit of sin (1 / x) as x → 0 does not exist, but the limit of x * sin (1 / x) as x → 0 equals 0.

          theorem limit_mul_sin_inv :
          LimitWithin Set.univ (fun (x : ) => x * Real.sin (1 / x)) 0 0

          The product x * sin (1 / x) converges to 0 as x → 0.

          theorem seq_limit_le {a b : } {L₁ L₂ : } (ha : Filter.Tendsto a Filter.atTop (nhds L₁)) (hb : Filter.Tendsto b Filter.atTop (nhds L₂)) (hmono : ∀ (n : ), a n b n) :
          L₁ L₂

          If two real sequences converge and one bounds the other termwise, then their limits respect the same inequality.

          theorem limitWithin_le_of_le {S : Set } {c Lf Lg : } {f g : } (hf : LimitWithin S f c Lf) (hg : LimitWithin S g c Lg) (hfg : ∀ ⦃x : ⦄, x Sx cf x g x) :
          Lf Lg

          Corollary 3.1.9: If c is a cluster point of S ⊆ ℝ, f, g : ℝ → ℝ have limits L_f, L_g as x → c within S, and f x ≤ g x for all x ∈ S \ {c}, then L_f ≤ L_g.

          theorem limitWithin_mem_interval {S : Set } {c L a b : } {f : } (hlim : LimitWithin S f c L) (hbounds : ∀ ⦃x : ⦄, x S \ {c}a f x f x b) :
          a L L b

          Corollary 3.1.10: If c is a cluster point of S ⊆ ℝ, f : ℝ → ℝ has a limit L as x → c within S, and a ≤ f x ≤ b for all x ∈ S \ {c}, then a ≤ L ≤ b.

          theorem limitWithin_squeeze {S : Set } {c L : } {f g h : } (hf : LimitWithin S f c L) (hh : LimitWithin S h c L) (hfg : ∀ ⦃x : ⦄, x Sx cf x g x) (hgh : ∀ ⦃x : ⦄, x Sx cg x h x) :
          LimitWithin S g c L

          Corollary 3.1.11 (squeeze theorem): Let S ⊆ ℝ and c be a cluster point of S. If f, g, h : ℝ → ℝ satisfy f x ≤ g x ≤ h x for all x ∈ S \ {c} and f and h both have limit L as x → c within S, then g also has limit L as x → c within S.

          theorem limitWithin_add {S : Set } {c Lf Lg : } {f g : } (hf : LimitWithin S f c Lf) (hg : LimitWithin S g c Lg) :
          LimitWithin S (fun (x : ) => f x + g x) c (Lf + Lg)

          Corollary 3.1.12: Let S ⊆ ℝ and c be a cluster point of S. If f, g : ℝ → ℝ have limits as x → c within S, then (i) the limit of f + g equals the sum of the limits, (ii) the limit of f - g equals the difference of the limits, (iii) the limit of f * g equals the product of the limits, and (iv) if the limit of g is nonzero and g x ≠ 0 for all x ∈ S \ {c}, then the limit of f / g equals the quotient of the limits.

          theorem limitWithin_sub {S : Set } {c Lf Lg : } {f g : } (hf : LimitWithin S f c Lf) (hg : LimitWithin S g c Lg) :
          LimitWithin S (fun (x : ) => f x - g x) c (Lf - Lg)
          theorem limitWithin_mul {S : Set } {c Lf Lg : } {f g : } (hf : LimitWithin S f c Lf) (hg : LimitWithin S g c Lg) :
          LimitWithin S (fun (x : ) => f x * g x) c (Lf * Lg)
          theorem limitWithin_div {S : Set } {c Lf Lg : } {f g : } (hf : LimitWithin S f c Lf) (hg : LimitWithin S g c Lg) (hg0 : ∀ ⦃x : ⦄, x Sx cg x 0) (hL0 : Lg 0) :
          LimitWithin S (fun (x : ) => f x / g x) c (Lf / Lg)
          theorem limitWithin_abs {S : Set } {c L : } {f : } (hlim : LimitWithin S f c L) :
          LimitWithin S (fun (x : ) => |f x|) c |L|

          Corollary 3.1.13: If S ⊆ ℝ, c is a cluster point of S, and the limit lim_{x → c, x ∈ S} f x exists for a function f : ℝ → ℝ, then the limit of |f x| as x → c within S equals the absolute value of the limit of f.

          def restrictToSubset {S A : Set } (f : S) (hAS : A S) :
          A

          Definition 3.1.14: For a function f : S → ℝ and a subset A ⊆ S, the restriction f|_A : A → ℝ is given by f|_A x = f x for x ∈ A.

          Equations
          Instances For
            theorem clusterPoint_iff_of_local_agree {S A : Set } {c α : } ( : 0 < α) (hA : A \ {c} Set.Ioo (c - α) (c + α) = S \ {c} Set.Ioo (c - α) (c + α)) :

            Proposition 3.1.15(i): If A ⊆ S ⊆ ℝ agree with S on a punctured neighborhood of c (i.e., there exists α > 0 with (A \ {c}) ∩ (c-α, c+α) = (S \ {c}) ∩ (c-α, c+α)), then c is a cluster point of A iff it is a cluster point of S.

            theorem limitWithin_imp_of_local_agree {S A : Set } {c α L : } {f : } ( : 0 < α) (hA : A \ {c} Set.Ioo (c - α) (c + α) = S \ {c} Set.Ioo (c - α) (c + α)) (hlim : ∀ ⦃ε : ⦄, 0 < εδ > 0, ∀ ⦃x : ⦄, x Sx c|x - c| < δ|f x - L| < ε) ε : :
            0 < εδ > 0, ∀ ⦃x : ⦄, x Ax c|x - c| < δ|f x - L| < ε

            The ε–δ condition for the limit within S implies the corresponding condition within A provided the sets coincide on a punctured neighborhood of c.

            theorem limitWithin_iff_of_local_agree {S A : Set } {c α L : } {f : } ( : 0 < α) (hA : A \ {c} Set.Ioo (c - α) (c + α) = S \ {c} Set.Ioo (c - α) (c + α)) :
            IsClusterPoint S c → (LimitWithin S f c L LimitWithin A f c L)

            Proposition 3.1.15(ii): Under the same local agreement near c and assuming c is a cluster point of S, the limit of f along S at c equals that of its restriction to A.

            def RightLimitWithin (S : Set ) (f : ) (c L : ) :

            Definition 3.1.16: For a function f : ℝ → ℝ, the right-hand limit of f at c along a set S is the limit of the restriction of f to S ∩ (c, ∞) as x → c. The left-hand limit is defined analogously using S ∩ (-∞, c).

            Equations
            Instances For
              def LeftLimitWithin (S : Set ) (f : ) (c L : ) :

              The left-hand limit of f at c along S, given by restricting to S ∩ (-∞, c) and taking the limit as x → c.

              Equations
              Instances For

                Right-hand limits coincide with mathlib's Tendsto along the 𝓝 within the right half-neighborhood.

                Left-hand limits coincide with mathlib's Tendsto along the 𝓝 within the left half-neighborhood.

                theorem limitWithin_iff_left_right {S : Set } {c L : } {f : } (hleft : IsClusterPoint (S Set.Iio c) c) (hright : IsClusterPoint (S Set.Ioi c) c) :

                Proposition 3.1.17: If c is a cluster point of both S ∩ (-∞, c) and S ∩ (c, ∞), then c is a cluster point of S, and f(x) → L as x → c within S iff both the left-hand and right-hand limits along S equal L.