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
Helper for Lemma 4.6.2: the imaginary unit squares to -1.
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
Componentwise addition on ordered pairs of real numbers.
Instances For
Componentwise negation on ordered pairs of real numbers.
Instances For
The zero ordered pair (0, 0) in ℝ × ℝ.
Equations
- complexPairZero = (0, 0)
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).
Instances For
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
- realToComplexEmbedding x = ↑x
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
- imaginaryUnit = { re := 0, im := 1 }
Instances For
A complex number is real when its imaginary part vanishes.
Equations
- IsRealComplex z = (z.im = 0)
Instances For
A complex number is purely imaginary when its real part vanishes.
Equations
- IsPurelyImaginaryComplex z = (z.re = 0)
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 Lemma 4.6.3: fixed points of conjugation are exactly the real complex numbers.
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.
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
Partial complex reciprocal: undefined at 0, and otherwise given by
|z|^{-2} \overline{z}.
Equations
Instances For
Partial complex quotient: for z w : ℂ, this is defined by mapping
w to its partial reciprocal and multiplying by z.
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.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.
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.
Helper for Proposition 4.6.5: if i is negative, negation sends negatives
to positives, and positivity is multiplicatively closed, then -1 is positive.
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.
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.
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.
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).
Helper for Lemma 4.6.14: bundled arithmetic limit laws in ℂ
for sum, difference, scalar multiplication, and product.
Helper for Lemma 4.6.14: conjugation preserves sequence limits in ℂ.
Helper for Lemma 4.6.14: quotient limit law in ℂ under nonzero limit.
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.