The complex numbers
The complex numbers are modelled as ℝ^2 in the obvious way.
Definition and basic arithmmetic
@[instance]
Equations
The equivalence between the complex numbers and ℝ × ℝ
.
@[simp]
theorem
complex.equiv_real_prod_symm_re
(x y : ℝ) :
(⇑(complex.equiv_real_prod.symm) (x, y)).re = x
theorem
complex.equiv_real_prod_symm_im
(x y : ℝ) :
(⇑(complex.equiv_real_prod.symm) (x, y)).im = y
@[instance]
Equations
- complex.inhabited = {default := 0}
The imaginary unit, I
Commutative ring instance and lemmas
@[instance]
Equations
- complex.comm_ring = {add := has_add.add complex.has_add, add_assoc := complex.comm_ring._proof_1, zero := 0, zero_add := complex.comm_ring._proof_2, add_zero := complex.comm_ring._proof_3, neg := has_neg.neg complex.has_neg, add_left_neg := complex.comm_ring._proof_4, add_comm := complex.comm_ring._proof_5, mul := has_mul.mul complex.has_mul, mul_assoc := complex.comm_ring._proof_6, one := 1, one_mul := complex.comm_ring._proof_7, mul_one := complex.comm_ring._proof_8, left_distrib := complex.comm_ring._proof_9, right_distrib := complex.comm_ring._proof_10, mul_comm := complex.comm_ring._proof_11}
@[instance]
Equations
@[instance]
Equations
Complex conjugation
Norm squared
@[simp]
@[simp]
theorem
complex.norm_sq_mul
(z w : ℂ) :
complex.norm_sq (z * w) = complex.norm_sq z * complex.norm_sq w
theorem
complex.norm_sq_add
(z w : ℂ) :
complex.norm_sq (z + w) = complex.norm_sq z + complex.norm_sq w + 2 * (z * ⇑complex.conj w).re
The coercion ℝ → ℂ
as a ring_hom
.
Equations
theorem
complex.norm_sq_sub
(z w : ℂ) :
complex.norm_sq (z - w) = complex.norm_sq z + complex.norm_sq w - 2 * (z * ⇑complex.conj w).re
Inversion
@[instance]
Equations
- complex.has_inv = {inv := λ (z : ℂ), ⇑complex.conj z * ↑(complex.norm_sq z)⁻¹}
Field instance and lemmas
@[instance]
Equations
- complex.field = {add := comm_ring.add complex.comm_ring, add_assoc := _, zero := comm_ring.zero complex.comm_ring, zero_add := _, add_zero := _, neg := comm_ring.neg complex.comm_ring, add_left_neg := _, add_comm := _, mul := comm_ring.mul complex.comm_ring, mul_assoc := _, one := comm_ring.one complex.comm_ring, one_mul := _, mul_one := _, left_distrib := _, right_distrib := _, mul_comm := _, inv := has_inv.inv complex.has_inv, exists_pair_ne := complex.field._proof_1, mul_inv_cancel := complex.mul_inv_cancel, inv_zero := complex.inv_zero}
@[simp]
theorem
complex.norm_sq_div
(z w : ℂ) :
complex.norm_sq (z / w) = complex.norm_sq z / complex.norm_sq w
Cast lemmas
Characteristic zero
@[instance]
Equations
Absolute value
The complex absolute value function, defined as the square root of the norm squared.
Equations
- complex.abs z = real.sqrt (complex.norm_sq z)
@[simp]
@[instance]
Equations
theorem
complex.abs_sub_le
(a b c : ℂ) :
complex.abs (a - c) ≤ complex.abs (a - b) + complex.abs (b - c)
@[simp]
theorem
complex.abs_abs_sub_le_abs_sub
(z w : ℂ) :
abs (complex.abs z - complex.abs w) ≤ complex.abs (z - w)
Cauchy sequences
The real part of a complex Cauchy sequence, as a real Cauchy sequence.
The imaginary part of a complex Cauchy sequence, as a real Cauchy sequence.
theorem
complex.is_cau_seq_abs
{f : ℕ → ℂ} :
is_cau_seq complex.abs f → is_cau_seq abs (complex.abs ∘ f)
The limit of a Cauchy sequence of complex numbers.
Equations
- complex.lim_aux f = {re := (complex.cau_seq_re f).lim, im := (complex.cau_seq_im f).lim}
@[instance]
Equations
- complex.cau_seq.is_complete = {is_complete := complex.cau_seq.is_complete._proof_1}
theorem
complex.is_cau_seq_conj
(f : cau_seq ℂ complex.abs) :
is_cau_seq complex.abs (λ (n : ℕ), ⇑complex.conj (⇑f n))
The complex conjugate of a complex Cauchy sequence, as a complex Cauchy sequence.
Equations
- complex.cau_seq_conj f = ⟨λ (n : ℕ), ⇑complex.conj (⇑f n), _⟩
theorem
complex.lim_conj
(f : cau_seq ℂ complex.abs) :
(complex.cau_seq_conj f).lim = ⇑complex.conj f.lim
The absolute value of a complex Cauchy sequence, as a real Cauchy sequence.
Equations
- complex.cau_seq_abs f = ⟨complex.abs ∘ f.val, _⟩
theorem
complex.lim_abs
(f : cau_seq ℂ complex.abs) :
(complex.cau_seq_abs f).lim = complex.abs f.lim