Documentation

Books.Analysis2_Tao_2022.Chapters.Chap04.section06

@[reducible, inline]

Definition 4.6.1 (Complex numbers): the set of complex numbers is {a + b i | a, b ∈ ℝ}, where i is a symbol satisfying i^2 = -1. In Lean, this is identified with the existing type .

Equations
Instances For
    theorem complexNumbers_exists_real_imag (z : ) :
    ∃ (a : ) (b : ), z = a + b * Complex.I

    Every complex number can be written in the form a + b i with a b : ℝ.

    theorem helperForLemma_4_6_2_canonicalDecompositionExists (z : ) :
    ∃ (p : × ), z = p.1 + p.2 * Complex.I

    Helper for Lemma 4.6.2: every complex number admits a real-imaginary pair representation z = a + bi.

    theorem helperForLemma_4_6_2_coordinatesFromRepresentation {z : } {p : × } (h : z = p.1 + p.2 * Complex.I) :
    p.1 = z.re p.2 = z.im

    Helper for Lemma 4.6.2: any representation z = a + bi must use a = Re(z) and b = Im(z).

    theorem helperForLemma_4_6_2_uniqueDecompositionPair (z : ) (p : × ) (h : z = p.1 + p.2 * Complex.I) :
    p = (z.re, z.im)

    Helper for Lemma 4.6.2: the pair (Re z, Im z) is the unique coefficient pair in a decomposition z = a + bi.

    Helper for Lemma 4.6.2: the imaginary unit squares to -1.

    Helper for Lemma 4.6.2: negation agrees with multiplication by -1.

    theorem complex_unique_decomposition_i_sq_and_neg_mul :
    (∀ (z : ), ∃! p : × , z = p.1 + p.2 * Complex.I) Complex.I ^ 2 = -1 ∀ (z : ), -z = -1 * z

    Lemma 4.6.2: every z : ℂ has a unique decomposition z = a + b i with a, b : ℝ; moreover i^2 = -1 and -z = (-1)z for all z : ℂ.

    @[reducible, inline]

    Definition 4.6.2 (Complex numbers): (i) a complex number is an ordered pair (a, b) with a, b ∈ ℝ; (ii) equality is componentwise, i.e. (a, b) = (c, d) iff a = c and b = d; (iii) the set of all such complex numbers is ℝ × ℝ.

    Equations
    Instances For
      @[reducible, inline]

      Componentwise addition on ordered pairs of real numbers.

      Equations
      Instances For
        @[reducible, inline]

        Componentwise negation on ordered pairs of real numbers.

        Equations
        Instances For
          @[reducible, inline]

          The zero ordered pair (0, 0) in ℝ × ℝ.

          Equations
          Instances For

            Definition 4.6.3 (Complex addition, negation, and zero): let be the set of ordered pairs of real numbers. For z = (a, b) and w = (c, d), define z + w := (a + c, b + d), -z := (-a, -b), and 0_C := (0, 0).

            Equations
            Instances For
              theorem complex_addition_abelian_group_axioms :
              (∀ (z₁ z₂ : ), z₁ + z₂ = z₂ + z₁) (∀ (z₁ z₂ z₃ : ), z₁ + z₂ + z₃ = z₁ + (z₂ + z₃)) (∀ (z₁ : ), z₁ + 0 = z₁ 0 + z₁ = z₁) ∀ (z₁ : ), z₁ + -z₁ = 0 -z₁ + z₁ = 0

              Lemma 4.6.1 (Addition on satisfies the abelian group axioms): for all z₁ z₂ z₃ : ℂ, (i) z₁ + z₂ = z₂ + z₁, (ii) (z₁ + z₂) + z₃ = z₁ + (z₂ + z₃), (iii) z₁ + 0 = 0 + z₁ = z₁, and (iv) z₁ + (-z₁) = (-z₁) + z₁ = 0. In particular, (ℂ, +) is an abelian group with identity element 0.

              Definition 4.6.4 (Complex multiplication): for complex numbers viewed as ordered pairs z = (a, b) and w = (c, d), their product is zw = (ac - bd, ad + bc), and the complex multiplicative identity is 1_C = (1, 0).

              Equations
              Instances For

                Definition 4.6.5 (Embedding of real numbers into complex numbers): define ι : ℝ → ℂ by identifying x : ℝ with (x, 0) in .

                Equations
                Instances For

                  The embedding of real numbers into complex numbers preserves equality, addition, negation, and multiplication.

                  Definition 4.6.6 (Imaginary unit): the imaginary unit is the complex number i ∈ ℂ defined by i := (0, 1).

                  Equations
                  Instances For

                    A complex number is real when its imaginary part vanishes.

                    Equations
                    Instances For

                      A complex number is purely imaginary when its real part vanishes.

                      Equations
                      Instances For

                        Definition 4.6.7 (Real and imaginary parts; complex conjugate): for z : ℂ, z = Re(z) + i Im(z), a number is real iff Im(z) = 0, a number is purely imaginary iff Re(z) = 0, and the complex conjugate is conj z = Re(z) - i Im(z).

                        Helper for Proposition 4.6.2: Re(z) equals (z + \bar z)/2 written with star.

                        Helper for Proposition 4.6.2: Im(z) equals (z - \bar z)/(2i) written with star.

                        theorem complex_re_and_im_eq_conjugate_formulas (z : ) :
                        z.re = (z + star z) / 2 z.im = (z - star z) / (2 * Complex.I)

                        Proposition 4.6.2: for every complex number z ∈ ℂ, Re(z) = (z + \overline{z}) / 2 and Im(z) = (z - \overline{z}) / (2i).

                        theorem helperForLemma_4_6_3_conj_add_neg_mul (z w : ) :
                        star (z + w) = star z + star w star (-z) = -star z star (z * w) = star z * star w

                        Helper for Lemma 4.6.3: complex conjugation preserves addition, negation, and multiplication.

                        Helper for Lemma 4.6.3: complex conjugation is involutive.

                        Helper for Lemma 4.6.3: complex conjugation is injective.

                        Helper for Lemma 4.6.3: fixed points of conjugation are exactly the real complex numbers.

                        theorem complex_conjugation_involution (z w : ) :
                        star (z + w) = star z + star w star (-z) = -star z star (z * w) = star z * star w star (star z) = z (star z = star w z = w) (star z = z IsRealComplex z)

                        Lemma 4.6.3 (Complex conjugation is an involution): for z w : ℂ, complex conjugation satisfies \overline{z + w} = \bar z + \bar w, \overline{-z} = -\bar z, \overline{z w} = \bar z \, \bar w, \overline{\bar z} = z, ` and moreover \bar z = \bar w iff z = w, while \bar z = z iff z is real.

                        @[reducible, inline]
                        noncomputable abbrev complexAbsoluteValue (z : ) :

                        Definition 4.6.8 (Complex absolute value): for z = a + bi with a b : ℝ, the complex absolute value is the nonnegative real number |z| = sqrt (a^2 + b^2) = (a^2 + b^2)^(1/2). In Lean this is represented by the complex norm ‖z‖.

                        Equations
                        Instances For

                          Lemma 4.6.4: for every z ∈ ℂ, the complex absolute value |z| is a non-negative real number.

                          Lemma 4.6.5: for every z ∈ ℂ, we have |z| = 0 if and only if z = 0.

                          Helper for Lemma 4.6.6: z * conjugate(z) is the real scalar Complex.normSq z, viewed in .

                          Helper for Lemma 4.6.6: the real part of z * conjugate(z) is Complex.normSq z.

                          Helper for Lemma 4.6.6: (z * conjugate(z)).re equals |z|^2.

                          Helper for Lemma 4.6.6: √(|z|^2) = |z|.

                          Lemma 4.6.6: for every z ∈ ℂ, we have z * \overline{z} = |z|^2. In particular, |z| = sqrt (z * \overline{z}), interpreted in Lean as |z| = sqrt ((z * \overline{z}).re).

                          Lemma 4.6.7: for all z, w ∈ ℂ, the complex absolute value is multiplicative: |zw| = |z| |w|.

                          Lemma 4.6.8: for every z ∈ ℂ, the complex absolute value is invariant under complex conjugation: |\overline{z}| = |z|.

                          Proposition 4.6.3: if z, w ∈ ℂ and w ≠ 0, then |z / w| = |z| / |w|.

                          Definition 4.6.9 (Complex reciprocal and quotient): for z : ℂ, the reciprocal is undefined at 0 and is |z|^{-2} \overline{z} otherwise; for z w : ℂ, the quotient z / w is defined when w ≠ 0 by z * w^{-1}.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            noncomputable def complexReciprocalPartial (z : ) :

                            Partial complex reciprocal: undefined at 0, and otherwise given by |z|^{-2} \overline{z}.

                            Equations
                            Instances For
                              noncomputable def complexQuotientPartial (z w : ) :

                              Partial complex quotient: for z w : ℂ, this is defined by mapping w to its partial reciprocal and multiplying by z.

                              Equations
                              Instances For
                                noncomputable def complexExponential (z : ) :

                                Definition 4.6.10 (Complex exponential): for each z ∈ ℂ, the complex exponential is defined by the power series exp(z) = ∑' n : ℕ, z^n / n!.

                                Equations
                                Instances For

                                  Theorem 4.6.1: for all z, w ∈ ℂ, one has exp(z + w) = exp(z) exp(w).

                                  Proposition 4.6.1: for every z ∈ ℂ, the complex exponential commutes with complex conjugation, i.e. exp(conj z) = conj (exp z).

                                  Helper for Lemma 4.6.9: the absolute value of the real part is bounded by the complex absolute value.

                                  Helper for Lemma 4.6.9: the real part is bounded below by the negated complex absolute value.

                                  Helper for Lemma 4.6.9: the real part is bounded above by the complex absolute value.

                                  Lemma 4.6.9: for every complex number z, its real part is bounded by its complex absolute value: -|z| ≤ Re(z) ≤ |z|.

                                  Helper for Lemma 4.6.10: the absolute value of the imaginary part is bounded by the complex absolute value.

                                  Helper for Lemma 4.6.10: the imaginary part is bounded below by the negated complex absolute value.

                                  Helper for Lemma 4.6.10: the imaginary part is bounded above by the complex absolute value.

                                  Lemma 4.6.10: for every z ∈ ℂ, the imaginary part is bounded by the complex absolute value: -|z| ≤ Im(z) ≤ |z|.

                                  Lemma 4.6.11: for every z ∈ ℂ, the complex absolute value is bounded by the sum of the absolute values of its real and imaginary parts: |z| ≤ |Re(z)| + |Im(z)|.

                                  Lemma 4.6.12: for all z, w ∈ ℂ, the complex absolute value satisfies the triangle inequality |z + w| ≤ |z| + |w|.

                                  Helper for Proposition 4.6.4: equality in the triangle inequality for complex norm is equivalent to the two numbers lying on the same real ray.

                                  theorem helperForProposition_4_6_4_sameRay_to_existsPosMul (z w : ) (hz : z 0) (hw : w 0) (hzw : SameRay z w) :
                                  ∃ (c : ), 0 < c z = c * w

                                  Helper for Proposition 4.6.4: two nonzero complex numbers on the same real ray differ by multiplication by a positive real scalar.

                                  Helper for Proposition 4.6.4: if one complex number is a positive real multiple of another, then equality holds in the triangle inequality.

                                  Proposition 4.6.4: for nonzero complex numbers z and w, |z + w| = |z| + |w| if and only if there exists a real number c > 0 such that z = c w.

                                  theorem helperForProposition_4_6_5_posNegOne_from_posI (Pos : Prop) (hMulPos : ∀ (z w : ), Pos zPos wPos (z * w)) (hPosI : Pos Complex.I) :
                                  Pos (-1)

                                  Helper for Proposition 4.6.5: if i is positive and positivity is closed under multiplication, then -1 is positive.

                                  theorem helperForProposition_4_6_5_posNegOne_from_negI (Pos Neg : Prop) (hNegToPos : ∀ (z : ), Neg zPos (-z)) (hMulPos : ∀ (z w : ), Pos zPos wPos (z * w)) (hNegI : Neg Complex.I) :
                                  Pos (-1)

                                  Helper for Proposition 4.6.5: if i is negative, negation sends negatives to positives, and positivity is multiplicatively closed, then -1 is positive.

                                  theorem helperForProposition_4_6_5_posNegOne (Pos Neg : Prop) (hTrichotomy : ∀ (z : ), Pos z Neg z z = 0) (hNegToPos : ∀ (z : ), Neg zPos (-z)) (hMulPos : ∀ (z w : ), Pos zPos wPos (z * w)) :
                                  Pos (-1)

                                  Helper for Proposition 4.6.5: trichotomy at i, together with the negation rule Neg z → Pos (-z) and multiplicative closure of positivity, forces -1 to be positive.

                                  theorem helperForProposition_4_6_5_contradiction_from_posNegOne (Pos Neg : Prop) (hPosNegExclusive : ∀ (z : ), ¬(Pos z Neg z)) (hPosToNeg : ∀ (z : ), Pos zNeg (-z)) (hMulPos : ∀ (z w : ), Pos zPos wPos (z * w)) (hPosNegOne : Pos (-1)) :

                                  Helper for Proposition 4.6.5: if -1 is positive, positivity is closed under multiplication, and positives negate to negatives, then exclusivity of positive/negative classes yields a contradiction.

                                  theorem no_complex_positive_negative_zero_partition :
                                  ¬∃ (Pos : Prop) (Neg : Prop), (∀ (z : ), (Pos z Neg z z = 0) ¬(Pos z Neg z) ¬(Pos z z = 0) ¬(Neg z z = 0)) (∀ (z : ), Pos zNeg (-z)) (∀ (z : ), Neg zPos (-z)) (∀ (z w : ), Pos zPos wPos (z + w)) ∀ (z w : ), Pos zPos wPos (z * w)

                                  Proposition 4.6.5: there does not exist a partition of into positive, negative, and zero classes such that for every z, w : ℂ: (i) exactly one of Pos z, Neg z, or z = 0 holds, (ii) positivity/negativity are exchanged by negation, (iii) positive numbers are closed under addition, and (iv) positive numbers are closed under multiplication.

                                  theorem complex_tendsto_iff_re_im_tendsto (zSeq : ) (z : ) :
                                  have d := fun (z₁ z₂ : ) => z₁ - z₂; ((∀ (z₁ z₂ : ), 0 d z₁ z₂) (∀ (z₁ z₂ : ), d z₁ z₂ = 0 z₁ = z₂) (∀ (z₁ z₂ : ), d z₁ z₂ = d z₂ z₁) ∀ (z₁ z₂ z₃ : ), d z₁ z₃ d z₁ z₂ + d z₂ z₃) ((∀ ε > 0, ∃ (N : ), nN, d (zSeq n) z < ε) Filter.Tendsto (fun (n : ) => (zSeq n).re) Filter.atTop (nhds z.re) Filter.Tendsto (fun (n : ) => (zSeq n).im) Filter.atTop (nhds z.im))

                                  Lemma 4.6.13: with d(z,w) = |z - w| on , this gives the usual metric on ; moreover, a sequence z_n converges to z in this metric iff both real and imaginary parts converge, i.e. Re(z_n) → Re(z) and Im(z_n) → Im(z).

                                  theorem helperForLemma_4_6_14_arith_tendsto_bundle (zSeq wSeq : ) (z w c : ) (hz : Filter.Tendsto zSeq Filter.atTop (nhds z)) (hw : Filter.Tendsto wSeq Filter.atTop (nhds w)) :
                                  Filter.Tendsto (fun (n : ) => zSeq n + wSeq n) Filter.atTop (nhds (z + w)) Filter.Tendsto (fun (n : ) => zSeq n - wSeq n) Filter.atTop (nhds (z - w)) Filter.Tendsto (fun (n : ) => c * zSeq n) Filter.atTop (nhds (c * z)) Filter.Tendsto (fun (n : ) => zSeq n * wSeq n) Filter.atTop (nhds (z * w))

                                  Helper for Lemma 4.6.14: bundled arithmetic limit laws in for sum, difference, scalar multiplication, and product.

                                  theorem helperForLemma_4_6_14_star_tendsto (zSeq : ) (z : ) (hz : Filter.Tendsto zSeq Filter.atTop (nhds z)) :
                                  Filter.Tendsto (fun (n : ) => star (zSeq n)) Filter.atTop (nhds (star z))

                                  Helper for Lemma 4.6.14: conjugation preserves sequence limits in .

                                  theorem helperForLemma_4_6_14_div_tendsto (zSeq wSeq : ) (z w : ) (hz : Filter.Tendsto zSeq Filter.atTop (nhds z)) (hw : Filter.Tendsto wSeq Filter.atTop (nhds w)) :
                                  (∀ (n : ), wSeq n 0)w 0Filter.Tendsto (fun (n : ) => zSeq n / wSeq n) Filter.atTop (nhds (z / w))

                                  Helper for Lemma 4.6.14: quotient limit law in under nonzero limit.

                                  theorem complex_limit_laws (zSeq wSeq : ) (z w c : ) (hz : Filter.Tendsto zSeq Filter.atTop (nhds z)) (hw : Filter.Tendsto wSeq Filter.atTop (nhds w)) :
                                  Filter.Tendsto (fun (n : ) => zSeq n + wSeq n) Filter.atTop (nhds (z + w)) Filter.Tendsto (fun (n : ) => zSeq n - wSeq n) Filter.atTop (nhds (z - w)) Filter.Tendsto (fun (n : ) => c * zSeq n) Filter.atTop (nhds (c * z)) Filter.Tendsto (fun (n : ) => zSeq n * wSeq n) Filter.atTop (nhds (z * w)) Filter.Tendsto (fun (n : ) => star (zSeq n)) Filter.atTop (nhds (star z)) ((∀ (n : ), wSeq n 0)w 0Filter.Tendsto (fun (n : ) => zSeq n / wSeq n) Filter.atTop (nhds (z / w)))

                                  Lemma 4.6.14 (Complex limit laws): if zₙ → z and wₙ → w in , then zₙ + wₙ → z + w, zₙ - wₙ → z - w, c zₙ → c z, zₙ wₙ → z w, and conj zₙ → conj z; moreover, if wₙ ≠ 0 for all n and w ≠ 0, then zₙ / wₙ → z / w.