The complex numbers #
The complex numbers are modelled as ℝ^2 in the obvious way and it is shown that they form a field
of characteristic zero. The result that the complex numbers are algebraically closed, see
field_theory.algebraic_closure
.
Definition and basic arithmmetic #
Equations
The equivalence between the complex numbers and ℝ × ℝ
.
The product of a set on the real axis and a set on the imaginary axis of the complex plane,
denoted by s ×ℂ t
.
Equations
- s ×ℂ t = complex.re ⁻¹' s ∩ complex.im ⁻¹' t
Equations
- complex.has_zero = {zero := ↑0}
Equations
- complex.inhabited = {default := 0}
Equations
- complex.has_one = {one := ↑1}
The imaginary unit, I
#
Commutative ring instance and lemmas #
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, nsmul := λ (n : ℕ) (z : ℂ), {re := n • z.re - 0 * z.im, im := n • z.im + 0 * z.re}, nsmul_zero' := complex.comm_ring._proof_4, nsmul_succ' := complex.comm_ring._proof_5, neg := has_neg.neg complex.has_neg, sub := has_sub.sub complex.has_sub, sub_eq_add_neg := complex.comm_ring._proof_6, zsmul := λ (n : ℤ) (z : ℂ), {re := n • z.re - 0 * z.im, im := n • z.im + 0 * z.re}, zsmul_zero' := complex.comm_ring._proof_7, zsmul_succ' := complex.comm_ring._proof_8, zsmul_neg' := complex.comm_ring._proof_9, add_left_neg := complex.comm_ring._proof_10, add_comm := complex.comm_ring._proof_11, mul := has_mul.mul complex.has_mul, mul_assoc := complex.comm_ring._proof_12, one := 1, one_mul := complex.comm_ring._proof_13, mul_one := complex.comm_ring._proof_14, npow := npow_rec {mul := has_mul.mul complex.has_mul}, npow_zero' := complex.comm_ring._proof_15, npow_succ' := complex.comm_ring._proof_16, left_distrib := complex.comm_ring._proof_17, right_distrib := complex.comm_ring._proof_18, mul_comm := complex.comm_ring._proof_19}
This shortcut instance ensures we do not find ring
via the noncomputable complex.field
instance.
Equations
The "real part" map, considered as an additive group homomorphism.
Equations
The "imaginary part" map, considered as an additive group homomorphism.
Equations
Complex conjugation #
This defines the complex conjugate as the star
operation of the star_ring ℂ
. It
is recommended to use the ring endomorphism version star_ring_end
, available under the
notation conj
in the locale complex_conjugate
.
Equations
- complex.star_ring = {to_star_semigroup := {to_has_involutive_star := {to_has_star := {star := λ (z : ℂ), {re := z.re, im := -z.im}}, star_involutive := complex.star_ring._proof_1}, star_mul := complex.star_ring._proof_2}, star_add := complex.star_ring._proof_3}
Norm squared #
The coercion ℝ → ℂ
as a ring_hom
.
Equations
Inversion #
Field instance and lemmas #
Equations
- complex.field = {add := comm_ring.add complex.comm_ring, add_assoc := _, zero := comm_ring.zero complex.comm_ring, zero_add := _, add_zero := _, nsmul := comm_ring.nsmul complex.comm_ring, nsmul_zero' := _, nsmul_succ' := _, neg := comm_ring.neg complex.comm_ring, sub := comm_ring.sub complex.comm_ring, sub_eq_add_neg := _, zsmul := comm_ring.zsmul complex.comm_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, 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 := _, npow := comm_ring.npow complex.comm_ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, mul_comm := _, inv := has_inv.inv complex.has_inv, div := div_inv_monoid.div._default comm_ring.mul comm_ring.mul_assoc comm_ring.one comm_ring.one_mul comm_ring.mul_one comm_ring.npow comm_ring.npow_zero' comm_ring.npow_succ' has_inv.inv, div_eq_mul_inv := complex.field._proof_1, zpow := div_inv_monoid.zpow._default comm_ring.mul comm_ring.mul_assoc comm_ring.one comm_ring.one_mul comm_ring.mul_one comm_ring.npow comm_ring.npow_zero' comm_ring.npow_succ' has_inv.inv, zpow_zero' := complex.field._proof_2, zpow_succ' := complex.field._proof_3, zpow_neg' := complex.field._proof_4, exists_pair_ne := complex.field._proof_5, mul_inv_cancel := complex.mul_inv_cancel, inv_zero := complex.inv_zero}
Cast lemmas #
Characteristic zero #
Absolute value #
The complex absolute value function, defined as the square root of the norm squared.
Equations
complex.abs
as a monoid_with_zero_hom
.
Equations
The triangle inequality for complex numbers.
We put a partial order on ℂ so that z ≤ w
exactly if w - z
is real and nonnegative.
Complex numbers with different imaginary parts are incomparable.
Equations
- complex.partial_order = {le := λ (z w : ℂ), z.re ≤ w.re ∧ z.im = w.im, lt := λ (z w : ℂ), z.re < w.re ∧ z.im = w.im, le_refl := complex.partial_order._proof_1, le_trans := complex.partial_order._proof_2, lt_iff_le_not_le := complex.partial_order._proof_3, le_antisymm := complex.partial_order._proof_4}
With z ≤ w
iff w - z
is real and nonnegative, ℂ
is an ordered ring.
Equations
- complex.ordered_comm_ring = {add := comm_ring.add complex.comm_ring, add_assoc := _, zero := comm_ring.zero complex.comm_ring, zero_add := _, add_zero := _, nsmul := comm_ring.nsmul complex.comm_ring, nsmul_zero' := _, nsmul_succ' := _, neg := comm_ring.neg complex.comm_ring, sub := comm_ring.sub complex.comm_ring, sub_eq_add_neg := _, zsmul := comm_ring.zsmul complex.comm_ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, 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 := _, npow := comm_ring.npow complex.comm_ring, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, le := partial_order.le complex.partial_order, lt := partial_order.lt complex.partial_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := complex.ordered_comm_ring._proof_1, zero_le_one := complex.ordered_comm_ring._proof_2, mul_pos := complex.ordered_comm_ring._proof_3, mul_comm := _}
With z ≤ w
iff w - z
is real and nonnegative, ℂ
is a star ordered ring.
(That is, a star ring in which the nonnegative elements are those of the form star z * z
.)
Equations
- complex.star_ordered_ring = {to_star_ring := complex.star_ring, add_le_add_left := _, nonneg_iff := complex.star_ordered_ring._proof_1}
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.
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}
The complex conjugate of a complex Cauchy sequence, as a complex Cauchy sequence.
The absolute value of a complex Cauchy sequence, as a real Cauchy sequence.
Equations
- complex.cau_seq_abs f = ⟨complex.abs ∘ f.val, _⟩