Documentation

Mathlib.Data.Complex.Exponential

Exponential, trigonometric and hyperbolic trigonometric functions #

This file contains the definitions of the real and complex exponential, sine, cosine, tangent, hyperbolic sine, hyperbolic cosine, and hyperbolic tangent functions.

theorem Complex.isCauSeq_abs_exp (z : ℂ) :
IsCauSeq abs fun (n : ℕ) => Finset.sum (Finset.range n) fun (m : ℕ) => Complex.abs (z ^ m / ↑(Nat.factorial m))
theorem Complex.isCauSeq_exp (z : ℂ) :
IsCauSeq ⇑Complex.abs fun (n : ℕ) => Finset.sum (Finset.range n) fun (m : ℕ) => z ^ m / ↑(Nat.factorial m)

The Cauchy sequence consisting of partial sums of the Taylor series of the complex exponential function

Equations
Instances For
    def Complex.exp (z : ℂ) :

    The complex exponential function, defined via its Taylor series

    Equations
    Instances For
      def Complex.sin (z : ℂ) :

      The complex sine function, defined via exp

      Equations
      Instances For
        def Complex.cos (z : ℂ) :

        The complex cosine function, defined via exp

        Equations
        Instances For
          def Complex.tan (z : ℂ) :

          The complex tangent function, defined as sin z / cos z

          Equations
          Instances For
            def Complex.sinh (z : ℂ) :

            The complex hyperbolic sine function, defined via exp

            Equations
            Instances For
              def Complex.cosh (z : ℂ) :

              The complex hyperbolic cosine function, defined via exp

              Equations
              Instances For
                def Complex.tanh (z : ℂ) :

                The complex hyperbolic tangent function, defined as sinh z / cosh z

                Equations
                Instances For

                  scoped notation for the complex exponential function

                  Equations
                  Instances For
                    def Real.exp (x : ℝ) :

                    The real exponential function, defined as the real part of the complex exponential

                    Equations
                    Instances For
                      def Real.sin (x : ℝ) :

                      The real sine function, defined as the real part of the complex sine

                      Equations
                      Instances For
                        def Real.cos (x : ℝ) :

                        The real cosine function, defined as the real part of the complex cosine

                        Equations
                        Instances For
                          def Real.tan (x : ℝ) :

                          The real tangent function, defined as the real part of the complex tangent

                          Equations
                          Instances For
                            def Real.sinh (x : ℝ) :

                            The real hypebolic sine function, defined as the real part of the complex hyperbolic sine

                            Equations
                            Instances For
                              def Real.cosh (x : ℝ) :

                              The real hypebolic cosine function, defined as the real part of the complex hyperbolic cosine

                              Equations
                              Instances For
                                def Real.tanh (x : ℝ) :

                                The real hypebolic tangent function, defined as the real part of the complex hyperbolic tangent

                                Equations
                                Instances For

                                  scoped notation for the real exponential function

                                  Equations
                                  Instances For
                                    @[simp]

                                    the exponential function as a monoid hom from Multiplicative ℂ to ℂ

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      theorem Complex.exp_sum {α : Type u_1} (s : Finset α) (f : α → ℂ) :
                                      Complex.exp (Finset.sum s fun (x : α) => f x) = Finset.prod s fun (x : α) => Complex.exp (f x)
                                      theorem Complex.exp_nsmul (x : ℂ) (n : ℕ) :
                                      theorem Complex.exp_nat_mul (x : ℂ) (n : ℕ) :
                                      Complex.exp (↑n * x) = Complex.exp x ^ n
                                      theorem Complex.exp_int_mul (z : ℂ) (n : ℤ) :
                                      Complex.exp (↑n * z) = Complex.exp z ^ n
                                      @[simp]
                                      theorem Complex.ofReal_exp_ofReal_re (x : ℝ) :
                                      ↑(Complex.exp ↑x).re = Complex.exp ↑x
                                      @[simp]
                                      theorem Complex.ofReal_exp (x : ℝ) :
                                      ↑(Real.exp x) = Complex.exp ↑x
                                      @[simp]
                                      theorem Complex.exp_ofReal_im (x : ℝ) :
                                      (Complex.exp ↑x).im = 0
                                      @[simp]
                                      @[simp]
                                      theorem Complex.ofReal_sinh (x : ℝ) :
                                      @[simp]
                                      theorem Complex.sinh_ofReal_im (x : ℝ) :
                                      (Complex.sinh ↑x).im = 0
                                      @[simp]
                                      theorem Complex.ofReal_cosh (x : ℝ) :
                                      @[simp]
                                      theorem Complex.cosh_ofReal_im (x : ℝ) :
                                      (Complex.cosh ↑x).im = 0
                                      @[simp]
                                      @[simp]
                                      @[simp]
                                      theorem Complex.ofReal_tanh (x : ℝ) :
                                      @[simp]
                                      theorem Complex.tanh_ofReal_im (x : ℝ) :
                                      (Complex.tanh ↑x).im = 0
                                      @[simp]
                                      @[simp]
                                      @[simp]
                                      @[simp]
                                      theorem Complex.sin_sub_sin (x : ℂ) (y : ℂ) :
                                      Complex.sin x - Complex.sin y = 2 * Complex.sin ((x - y) / 2) * Complex.cos ((x + y) / 2)
                                      theorem Complex.cos_sub_cos (x : ℂ) (y : ℂ) :
                                      Complex.cos x - Complex.cos y = -2 * Complex.sin ((x + y) / 2) * Complex.sin ((x - y) / 2)
                                      theorem Complex.cos_add_cos (x : ℂ) (y : ℂ) :
                                      Complex.cos x + Complex.cos y = 2 * Complex.cos ((x + y) / 2) * Complex.cos ((x - y) / 2)
                                      @[simp]
                                      theorem Complex.ofReal_sin_ofReal_re (x : ℝ) :
                                      ↑(Complex.sin ↑x).re = Complex.sin ↑x
                                      @[simp]
                                      theorem Complex.ofReal_sin (x : ℝ) :
                                      ↑(Real.sin x) = Complex.sin ↑x
                                      @[simp]
                                      theorem Complex.sin_ofReal_im (x : ℝ) :
                                      (Complex.sin ↑x).im = 0
                                      @[simp]
                                      theorem Complex.ofReal_cos_ofReal_re (x : ℝ) :
                                      ↑(Complex.cos ↑x).re = Complex.cos ↑x
                                      @[simp]
                                      theorem Complex.ofReal_cos (x : ℝ) :
                                      ↑(Real.cos x) = Complex.cos ↑x
                                      @[simp]
                                      theorem Complex.cos_ofReal_im (x : ℝ) :
                                      (Complex.cos ↑x).im = 0
                                      @[simp]
                                      @[simp]
                                      @[simp]
                                      theorem Complex.ofReal_tan_ofReal_re (x : ℝ) :
                                      ↑(Complex.tan ↑x).re = Complex.tan ↑x
                                      @[simp]
                                      theorem Complex.ofReal_tan (x : ℝ) :
                                      ↑(Real.tan x) = Complex.tan ↑x
                                      @[simp]
                                      theorem Complex.tan_ofReal_im (x : ℝ) :
                                      (Complex.tan ↑x).im = 0
                                      @[simp]
                                      @[simp]
                                      theorem Complex.cos_two_mul (x : ℂ) :
                                      Complex.cos (2 * x) = 2 * Complex.cos x ^ 2 - 1
                                      theorem Complex.cos_sq (x : ℂ) :
                                      Complex.cos x ^ 2 = 1 / 2 + Complex.cos (2 * x) / 2
                                      theorem Complex.exp_re (x : ℂ) :
                                      (Complex.exp x).re = Real.exp x.re * Real.cos x.im
                                      theorem Complex.exp_im (x : ℂ) :
                                      (Complex.exp x).im = Real.exp x.re * Real.sin x.im

                                      De Moivre's formula

                                      @[simp]
                                      theorem Real.exp_zero :
                                      theorem Real.exp_add (x : ℝ) (y : ℝ) :

                                      the exponential function as a monoid hom from Multiplicative ℝ to ℝ

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        theorem Real.exp_sum {α : Type u_1} (s : Finset α) (f : α → ℝ) :
                                        Real.exp (Finset.sum s fun (x : α) => f x) = Finset.prod s fun (x : α) => Real.exp (f x)
                                        theorem Real.exp_nsmul (x : ℝ) (n : ℕ) :
                                        Real.exp (n • x) = Real.exp x ^ n
                                        theorem Real.exp_nat_mul (x : ℝ) (n : ℕ) :
                                        Real.exp (↑n * x) = Real.exp x ^ n
                                        theorem Real.exp_sub (x : ℝ) (y : ℝ) :
                                        @[simp]
                                        theorem Real.sin_zero :
                                        @[simp]
                                        theorem Real.sin_neg (x : ℝ) :
                                        theorem Real.sin_add (x : ℝ) (y : ℝ) :
                                        @[simp]
                                        theorem Real.cos_zero :
                                        @[simp]
                                        theorem Real.cos_neg (x : ℝ) :
                                        @[simp]
                                        theorem Real.cos_abs (x : ℝ) :
                                        theorem Real.cos_add (x : ℝ) (y : ℝ) :
                                        theorem Real.sin_sub (x : ℝ) (y : ℝ) :
                                        theorem Real.cos_sub (x : ℝ) (y : ℝ) :
                                        theorem Real.sin_sub_sin (x : ℝ) (y : ℝ) :
                                        Real.sin x - Real.sin y = 2 * Real.sin ((x - y) / 2) * Real.cos ((x + y) / 2)
                                        theorem Real.cos_sub_cos (x : ℝ) (y : ℝ) :
                                        Real.cos x - Real.cos y = -2 * Real.sin ((x + y) / 2) * Real.sin ((x - y) / 2)
                                        theorem Real.cos_add_cos (x : ℝ) (y : ℝ) :
                                        Real.cos x + Real.cos y = 2 * Real.cos ((x + y) / 2) * Real.cos ((x - y) / 2)
                                        @[simp]
                                        theorem Real.tan_zero :
                                        @[simp]
                                        theorem Real.tan_neg (x : ℝ) :
                                        @[simp]
                                        theorem Real.sin_sq_add_cos_sq (x : ℝ) :
                                        Real.sin x ^ 2 + Real.cos x ^ 2 = 1
                                        @[simp]
                                        theorem Real.cos_sq_add_sin_sq (x : ℝ) :
                                        Real.cos x ^ 2 + Real.sin x ^ 2 = 1
                                        theorem Real.cos_two_mul (x : ℝ) :
                                        Real.cos (2 * x) = 2 * Real.cos x ^ 2 - 1
                                        theorem Real.cos_two_mul' (x : ℝ) :
                                        Real.cos (2 * x) = Real.cos x ^ 2 - Real.sin x ^ 2
                                        theorem Real.cos_sq (x : ℝ) :
                                        Real.cos x ^ 2 = 1 / 2 + Real.cos (2 * x) / 2
                                        theorem Real.cos_sq' (x : ℝ) :
                                        Real.cos x ^ 2 = 1 - Real.sin x ^ 2
                                        theorem Real.sin_sq (x : ℝ) :
                                        Real.sin x ^ 2 = 1 - Real.cos x ^ 2
                                        theorem Real.sin_sq_eq_half_sub (x : ℝ) :
                                        Real.sin x ^ 2 = 1 / 2 - Real.cos (2 * x) / 2
                                        theorem Real.inv_one_add_tan_sq {x : ℝ} (hx : Real.cos x ≠ 0) :
                                        (1 + Real.tan x ^ 2)⁻¹ = Real.cos x ^ 2
                                        theorem Real.tan_sq_div_one_add_tan_sq {x : ℝ} (hx : Real.cos x ≠ 0) :
                                        Real.tan x ^ 2 / (1 + Real.tan x ^ 2) = Real.sin x ^ 2
                                        theorem Real.cos_three_mul (x : ℝ) :
                                        Real.cos (3 * x) = 4 * Real.cos x ^ 3 - 3 * Real.cos x
                                        theorem Real.sin_three_mul (x : ℝ) :
                                        Real.sin (3 * x) = 3 * Real.sin x - 4 * Real.sin x ^ 3
                                        theorem Real.sinh_eq (x : ℝ) :

                                        The definition of sinh in terms of exp.

                                        @[simp]
                                        @[simp]
                                        theorem Real.sinh_neg (x : ℝ) :
                                        theorem Real.cosh_eq (x : ℝ) :

                                        The definition of cosh in terms of exp.

                                        @[simp]
                                        @[simp]
                                        theorem Real.cosh_neg (x : ℝ) :
                                        @[simp]
                                        theorem Real.cosh_abs (x : ℝ) :
                                        @[simp]
                                        @[simp]
                                        theorem Real.tanh_neg (x : ℝ) :
                                        @[simp]
                                        theorem Real.cosh_sq (x : ℝ) :
                                        Real.cosh x ^ 2 = Real.sinh x ^ 2 + 1
                                        theorem Real.cosh_sq' (x : ℝ) :
                                        Real.cosh x ^ 2 = 1 + Real.sinh x ^ 2
                                        theorem Real.sinh_sq (x : ℝ) :
                                        Real.sinh x ^ 2 = Real.cosh x ^ 2 - 1
                                        theorem Real.cosh_three_mul (x : ℝ) :
                                        Real.cosh (3 * x) = 4 * Real.cosh x ^ 3 - 3 * Real.cosh x
                                        theorem Real.sinh_three_mul (x : ℝ) :
                                        Real.sinh (3 * x) = 4 * Real.sinh x ^ 3 + 3 * Real.sinh x
                                        theorem Real.sum_le_exp_of_nonneg {x : ℝ} (hx : 0 ≤ x) (n : ℕ) :
                                        (Finset.sum (Finset.range n) fun (i : ℕ) => x ^ i / ↑(Nat.factorial i)) ≤ Real.exp x
                                        theorem Real.pow_div_factorial_le_exp (x : ℝ) (hx : 0 ≤ x) (n : ℕ) :
                                        theorem Real.quadratic_le_exp_of_nonneg {x : ℝ} (hx : 0 ≤ x) :
                                        1 + x + x ^ 2 / 2 ≤ Real.exp x
                                        theorem Real.one_le_exp {x : ℝ} (hx : 0 ≤ x) :
                                        theorem Real.exp_pos (x : ℝ) :
                                        @[simp]
                                        theorem Real.abs_exp (x : ℝ) :
                                        theorem Real.exp_lt_exp_of_lt {x : ℝ} {y : ℝ} (h : x < y) :
                                        theorem Real.exp_le_exp_of_le {x : ℝ} {y : ℝ} (h : x ≤ y) :
                                        @[simp]
                                        theorem Real.exp_lt_exp {x : ℝ} {y : ℝ} :
                                        @[simp]
                                        theorem Real.exp_le_exp {x : ℝ} {y : ℝ} :
                                        @[simp]
                                        theorem Real.exp_eq_exp {x : ℝ} {y : ℝ} :
                                        @[simp]
                                        theorem Real.exp_eq_one_iff (x : ℝ) :
                                        Real.exp x = 1 ↔ x = 0
                                        @[simp]
                                        theorem Real.one_lt_exp_iff {x : ℝ} :
                                        1 < Real.exp x ↔ 0 < x
                                        @[simp]
                                        theorem Real.exp_lt_one_iff {x : ℝ} :
                                        Real.exp x < 1 ↔ x < 0
                                        @[simp]
                                        theorem Real.exp_le_one_iff {x : ℝ} :
                                        @[simp]
                                        theorem Real.one_le_exp_iff {x : ℝ} :
                                        theorem Real.cosh_pos (x : ℝ) :

                                        Real.cosh is always positive

                                        theorem Complex.sum_div_factorial_le {α : Type u_1} [LinearOrderedField α] (n : ℕ) (j : ℕ) (hn : 0 < n) :
                                        (Finset.sum (Finset.filter (fun (k : ℕ) => n ≤ k) (Finset.range j)) fun (m : ℕ) => 1 / ↑(Nat.factorial m)) ≤ ↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n)
                                        theorem Complex.exp_bound {x : ℂ} (hx : Complex.abs x ≤ 1) {n : ℕ} (hn : 0 < n) :
                                        Complex.abs (Complex.exp x - Finset.sum (Finset.range n) fun (m : ℕ) => x ^ m / ↑(Nat.factorial m)) ≤ Complex.abs x ^ n * (↑(Nat.succ n) * (↑(Nat.factorial n) * ↑n)⁻¹)
                                        theorem Complex.exp_bound' {x : ℂ} {n : ℕ} (hx : Complex.abs x / ↑(Nat.succ n) ≤ 1 / 2) :
                                        Complex.abs (Complex.exp x - Finset.sum (Finset.range n) fun (m : ℕ) => x ^ m / ↑(Nat.factorial m)) ≤ Complex.abs x ^ n / ↑(Nat.factorial n) * 2
                                        theorem Complex.abs_exp_sub_one_le {x : ℂ} (hx : Complex.abs x ≤ 1) :
                                        Complex.abs (Complex.exp x - 1) ≤ 2 * Complex.abs x
                                        theorem Complex.abs_exp_sub_one_sub_id_le {x : ℂ} (hx : Complex.abs x ≤ 1) :
                                        Complex.abs (Complex.exp x - 1 - x) ≤ Complex.abs x ^ 2
                                        theorem Real.exp_bound {x : ℝ} (hx : |x| ≤ 1) {n : ℕ} (hn : 0 < n) :
                                        |Real.exp x - Finset.sum (Finset.range n) fun (m : ℕ) => x ^ m / ↑(Nat.factorial m)| ≤ |x| ^ n * (↑(Nat.succ n) / (↑(Nat.factorial n) * ↑n))
                                        theorem Real.exp_bound' {x : ℝ} (h1 : 0 ≤ x) (h2 : x ≤ 1) {n : ℕ} (hn : 0 < n) :
                                        Real.exp x ≤ (Finset.sum (Finset.range n) fun (m : ℕ) => x ^ m / ↑(Nat.factorial m)) + x ^ n * (↑n + 1) / (↑(Nat.factorial n) * ↑n)
                                        theorem Real.abs_exp_sub_one_le {x : ℝ} (hx : |x| ≤ 1) :
                                        |Real.exp x - 1| ≤ 2 * |x|
                                        theorem Real.abs_exp_sub_one_sub_id_le {x : ℝ} (hx : |x| ≤ 1) :
                                        |Real.exp x - 1 - x| ≤ x ^ 2
                                        noncomputable def Real.expNear (n : ℕ) (x : ℝ) (r : ℝ) :

                                        A finite initial segment of the exponential series, followed by an arbitrary tail. For fixed n this is just a linear map wrt r, and each map is a simple linear function of the previous (see expNear_succ), with expNear n x r ⟶ exp x as n ⟶ ∞, for any r.

                                        Equations
                                        Instances For
                                          @[simp]
                                          theorem Real.expNear_zero (x : ℝ) (r : ℝ) :
                                          Real.expNear 0 x r = r
                                          @[simp]
                                          theorem Real.expNear_succ (n : ℕ) (x : ℝ) (r : ℝ) :
                                          Real.expNear (n + 1) x r = Real.expNear n x (1 + x / (↑n + 1) * r)
                                          theorem Real.expNear_sub (n : ℕ) (x : ℝ) (r₁ : ℝ) (r₂ : ℝ) :
                                          Real.expNear n x r₁ - Real.expNear n x r₂ = x ^ n / ↑(Nat.factorial n) * (r₁ - r₂)
                                          theorem Real.exp_approx_end (n : ℕ) (m : ℕ) (x : ℝ) (e₁ : n + 1 = m) (h : |x| ≤ 1) :
                                          |Real.exp x - Real.expNear m x 0| ≤ |x| ^ m / ↑(Nat.factorial m) * ((↑m + 1) / ↑m)
                                          theorem Real.exp_approx_succ {n : ℕ} {x : ℝ} {a₁ : ℝ} {b₁ : ℝ} (m : ℕ) (e₁ : n + 1 = m) (a₂ : ℝ) (b₂ : ℝ) (e : |1 + x / ↑m * a₂ - a₁| ≤ b₁ - |x| / ↑m * b₂) (h : |Real.exp x - Real.expNear m x a₂| ≤ |x| ^ m / ↑(Nat.factorial m) * b₂) :
                                          |Real.exp x - Real.expNear n x a₁| ≤ |x| ^ n / ↑(Nat.factorial n) * b₁
                                          theorem Real.exp_approx_end' {n : ℕ} {x : ℝ} {a : ℝ} {b : ℝ} (m : ℕ) (e₁ : n + 1 = m) (rm : ℝ) (er : ↑m = rm) (h : |x| ≤ 1) (e : |1 - a| ≤ b - |x| / rm * ((rm + 1) / rm)) :
                                          |Real.exp x - Real.expNear n x a| ≤ |x| ^ n / ↑(Nat.factorial n) * b
                                          theorem Real.exp_1_approx_succ_eq {n : ℕ} {a₁ : ℝ} {b₁ : ℝ} {m : ℕ} (en : n + 1 = m) {rm : ℝ} (er : ↑m = rm) (h : |Real.exp 1 - Real.expNear m 1 ((a₁ - 1) * rm)| ≤ |1| ^ m / ↑(Nat.factorial m) * (b₁ * rm)) :
                                          |Real.exp 1 - Real.expNear n 1 a₁| ≤ |1| ^ n / ↑(Nat.factorial n) * b₁
                                          theorem Real.exp_approx_start (x : ℝ) (a : ℝ) (b : ℝ) (h : |Real.exp x - Real.expNear 0 x a| ≤ |x| ^ 0 / ↑(Nat.factorial 0) * b) :
                                          |Real.exp x - a| ≤ b
                                          theorem Real.cos_bound {x : ℝ} (hx : |x| ≤ 1) :
                                          |Real.cos x - (1 - x ^ 2 / 2)| ≤ |x| ^ 4 * (5 / 96)
                                          theorem Real.sin_bound {x : ℝ} (hx : |x| ≤ 1) :
                                          |Real.sin x - (x - x ^ 3 / 6)| ≤ |x| ^ 4 * (5 / 96)
                                          theorem Real.cos_pos_of_le_one {x : ℝ} (hx : |x| ≤ 1) :
                                          theorem Real.sin_pos_of_pos_of_le_one {x : ℝ} (hx0 : 0 < x) (hx : x ≤ 1) :
                                          theorem Real.sin_pos_of_pos_of_le_two {x : ℝ} (hx0 : 0 < x) (hx : x ≤ 2) :
                                          theorem Real.exp_bound_div_one_sub_of_interval' {x : ℝ} (h1 : 0 < x) (h2 : x < 1) :
                                          Real.exp x < 1 / (1 - x)
                                          theorem Real.exp_bound_div_one_sub_of_interval {x : ℝ} (h1 : 0 ≤ x) (h2 : x < 1) :
                                          Real.exp x ≤ 1 / (1 - x)
                                          theorem Real.add_one_lt_exp {x : ℝ} (hx : x ≠ 0) :
                                          x + 1 < Real.exp x
                                          theorem Real.one_sub_lt_exp_neg {x : ℝ} (hx : x ≠ 0) :
                                          1 - x < Real.exp (-x)
                                          theorem Real.one_sub_div_pow_le_exp_neg {n : ℕ} {t : ℝ} (ht' : t ≤ ↑n) :
                                          (1 - t / ↑n) ^ n ≤ Real.exp (-t)

                                          Extension for the positivity tactic: Real.exp is always positive.

                                          Instances For

                                            Extension for the positivity tactic: Real.cosh is always positive.

                                            Instances For
                                              @[simp]
                                              theorem Complex.abs_cos_add_sin_mul_I (x : ℝ) :
                                              Complex.abs (Complex.cos ↑x + Complex.sin ↑x * Complex.I) = 1
                                              @[simp]
                                              theorem Complex.abs_exp_ofReal (x : ℝ) :
                                              Complex.abs (Complex.exp ↑x) = Real.exp x
                                              @[simp]
                                              theorem Complex.abs_exp_ofReal_mul_I (x : ℝ) :
                                              Complex.abs (Complex.exp (↑x * Complex.I)) = 1
                                              theorem Complex.abs_exp (z : ℂ) :
                                              Complex.abs (Complex.exp z) = Real.exp z.re
                                              theorem Complex.abs_exp_eq_iff_re_eq {x : ℂ} {y : ℂ} :
                                              Complex.abs (Complex.exp x) = Complex.abs (Complex.exp y) ↔ x.re = y.re