The complex numbers #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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 #
Complex numbers consist of two real
s: a real part re
and an imaginary part im
.
Instances for complex
- complex.has_sizeof_inst
- complex.has_coe
- complex.can_lift
- complex.has_zero
- complex.inhabited
- complex.has_one
- complex.has_add
- complex.has_neg
- complex.has_sub
- complex.has_mul
- complex.nontrivial
- complex.add_comm_group
- complex.add_group_with_one
- complex.comm_ring
- complex.ring
- complex.comm_semiring
- complex.star_ring
- complex.has_inv
- complex.field
- complex.char_zero_complex
- complex.abs.cau_seq.is_complete
- complex.has_smul
- complex.smul_comm_class
- complex.is_scalar_tower
- complex.is_central_scalar
- complex.mul_action
- complex.distrib_smul
- complex.distrib_mul_action
- complex.module
- complex.algebra
- complex.star_module
- complex.finite_dimensional
- module.real_complex_tower
- complex.has_norm
- complex.normed_add_comm_group
- complex.normed_field
- complex.densely_normed_field
- complex.normed_algebra
- complex.complete_space
- complex.proper_space
- complex.has_continuous_star
- complex.is_R_or_C
- complex.has_pow
- module.dual.is_faithful_pos_map.inner_product_space
- module.dual.pi.inner_product_space
- pi.tensor_product_finite_dimensional
- _private.2809975849.pi_matrix_tensor_is_algebra
- matrix.is_fd
- matrix.is_star_module
- pi.matrix.is_fd
- pi.matrix.is_star_module
- pi.matrix.has_continuous_smul
- quantum_set.to_inner_product_space
- quantum_set.to_has_smul_comm_class
- quantum_set.to_is_scalar_tower
- quantum_set.to_finite_dimensional
- _private.3537585351.smul_comm_class_aux
- multiset.has_smul
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.add_comm_group = {add := has_add.add complex.has_add, add_assoc := complex.add_comm_group._proof_1, zero := 0, zero_add := complex.add_comm_group._proof_2, add_zero := complex.add_comm_group._proof_3, nsmul := λ (n : ℕ) (z : ℂ), {re := n • z.re - 0 * z.im, im := n • z.im + 0 * z.re}, nsmul_zero' := complex.add_comm_group._proof_4, nsmul_succ' := complex.add_comm_group._proof_5, neg := has_neg.neg complex.has_neg, sub := has_sub.sub complex.has_sub, sub_eq_add_neg := complex.add_comm_group._proof_6, zsmul := λ (n : ℤ) (z : ℂ), {re := n • z.re - 0 * z.im, im := n • z.im + 0 * z.re}, zsmul_zero' := complex.add_comm_group._proof_7, zsmul_succ' := complex.add_comm_group._proof_8, zsmul_neg' := complex.add_comm_group._proof_9, add_left_neg := complex.add_comm_group._proof_10, add_comm := complex.add_comm_group._proof_11}
Equations
- complex.add_group_with_one = {int_cast := λ (n : ℤ), {re := ↑n, im := 0}, add := add_comm_group.add complex.add_comm_group, add_assoc := _, zero := add_comm_group.zero complex.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul complex.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg complex.add_comm_group, sub := add_comm_group.sub complex.add_comm_group, sub_eq_add_neg := _, zsmul := add_comm_group.zsmul complex.add_comm_group, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, nat_cast := λ (n : ℕ), {re := ↑n, im := 0}, one := 1, nat_cast_zero := complex.add_group_with_one._proof_1, nat_cast_succ := complex.add_group_with_one._proof_2, int_cast_of_nat := complex.add_group_with_one._proof_3, int_cast_neg_succ_of_nat := complex.add_group_with_one._proof_4}
Equations
- complex.comm_ring = {add := has_add.add complex.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, nsmul := add_group_with_one.nsmul complex.add_group_with_one, nsmul_zero' := _, nsmul_succ' := _, neg := add_group_with_one.neg complex.add_group_with_one, sub := add_group_with_one.sub complex.add_group_with_one, sub_eq_add_neg := _, zsmul := add_group_with_one.zsmul complex.add_group_with_one, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := complex.comm_ring._proof_1, int_cast := add_group_with_one.int_cast complex.add_group_with_one, nat_cast := add_group_with_one.nat_cast complex.add_group_with_one, one := 1, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := has_mul.mul complex.has_mul, mul_assoc := complex.comm_ring._proof_2, one_mul := complex.comm_ring._proof_3, mul_one := complex.comm_ring._proof_4, npow := npow_rec {mul := has_mul.mul complex.has_mul}, npow_zero' := complex.comm_ring._proof_5, npow_succ' := complex.comm_ring._proof_6, left_distrib := complex.comm_ring._proof_7, right_distrib := complex.comm_ring._proof_8, mul_comm := complex.comm_ring._proof_9}
This shortcut instance ensures we do not find ring
via the noncomputable complex.field
instance.
Equations
This shortcut instance ensures we do not find comm_semiring
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 #
Equations
- complex.has_inv = {inv := λ (z : ℂ), ⇑(star_ring_end ℂ) z * ↑(⇑complex.norm_sq z)⁻¹}
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 := _, int_cast := comm_ring.int_cast complex.comm_ring, nat_cast := comm_ring.nat_cast complex.comm_ring, one := comm_ring.one complex.comm_ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := comm_ring.mul complex.comm_ring, mul_assoc := _, 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 := division_ring.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 := division_ring.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 := _, rat_cast := division_ring.rat_cast._default comm_ring.add comm_ring.add_assoc comm_ring.zero comm_ring.zero_add comm_ring.add_zero comm_ring.nsmul comm_ring.nsmul_zero' comm_ring.nsmul_succ' comm_ring.neg comm_ring.sub comm_ring.sub_eq_add_neg comm_ring.zsmul comm_ring.zsmul_zero' comm_ring.zsmul_succ' comm_ring.zsmul_neg' comm_ring.add_left_neg comm_ring.add_comm comm_ring.int_cast comm_ring.nat_cast comm_ring.one comm_ring.nat_cast_zero comm_ring.nat_cast_succ comm_ring.int_cast_of_nat comm_ring.int_cast_neg_succ_of_nat comm_ring.mul comm_ring.mul_assoc comm_ring.one_mul comm_ring.mul_one comm_ring.npow comm_ring.npow_zero' comm_ring.npow_succ' comm_ring.left_distrib comm_ring.right_distrib has_inv.inv (division_ring.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) complex.field._proof_5 (division_ring.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) complex.field._proof_6 complex.field._proof_7 complex.field._proof_8, mul_inv_cancel := complex.mul_inv_cancel, inv_zero := complex.inv_zero, rat_cast_mk := complex.field._proof_9, qsmul := division_ring.qsmul._default (… comm_ring.zsmul_zero' comm_ring.zsmul_succ' comm_ring.zsmul_neg' comm_ring.add_left_neg comm_ring.add_comm comm_ring.int_cast comm_ring.nat_cast comm_ring.one comm_ring.nat_cast_zero comm_ring.nat_cast_succ comm_ring.int_cast_of_nat comm_ring.int_cast_neg_succ_of_nat comm_ring.mul comm_ring.mul_assoc comm_ring.one_mul comm_ring.mul_one comm_ring.npow comm_ring.npow_zero' comm_ring.npow_succ' comm_ring.left_distrib comm_ring.right_distrib has_inv.inv (division_ring.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) complex.field._proof_5 (division_ring.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) complex.field._proof_6 complex.field._proof_7 complex.field._proof_8) comm_ring.add comm_ring.add_assoc comm_ring.zero comm_ring.zero_add comm_ring.add_zero comm_ring.nsmul comm_ring.nsmul_zero' comm_ring.nsmul_succ' comm_ring.neg comm_ring.sub comm_ring.sub_eq_add_neg comm_ring.zsmul comm_ring.zsmul_zero' comm_ring.zsmul_succ' comm_ring.zsmul_neg' comm_ring.add_left_neg comm_ring.add_comm comm_ring.int_cast comm_ring.nat_cast comm_ring.one comm_ring.nat_cast_zero comm_ring.nat_cast_succ comm_ring.int_cast_of_nat comm_ring.int_cast_neg_succ_of_nat comm_ring.mul comm_ring.mul_assoc comm_ring.one_mul comm_ring.mul_one comm_ring.npow comm_ring.npow_zero' comm_ring.npow_succ' comm_ring.left_distrib comm_ring.right_distrib, qsmul_eq_mul' := complex.field._proof_10}
Cast lemmas #
Characteristic zero #
Absolute value #
The complex absolute value function, defined as the square root of the norm squared.
Equations
- complex.abs = {to_mul_hom := {to_fun := λ (x : ℂ), real.sqrt (⇑complex.norm_sq x), map_mul' := abs_mul}, nonneg' := abs_nonneg', eq_zero' := complex.abs._proof_1, add_le' := abs_add}
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 a strictly ordered ring.
Equations
- complex.strict_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 := _, int_cast := comm_ring.int_cast complex.comm_ring, nat_cast := comm_ring.nat_cast complex.comm_ring, one := comm_ring.one complex.comm_ring, nat_cast_zero := _, nat_cast_succ := _, int_cast_of_nat := _, int_cast_neg_succ_of_nat := _, mul := comm_ring.mul complex.comm_ring, mul_assoc := _, 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.strict_ordered_comm_ring._proof_1, exists_pair_ne := _, zero_le_one := complex.strict_ordered_comm_ring._proof_2, mul_pos := complex.strict_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 = star_ordered_ring.of_nonneg_iff' complex.star_ordered_ring._proof_1 complex.star_ordered_ring._proof_2
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.
Equations
- complex.cau_seq_conj f = ⟨λ (n : ℕ), ⇑(star_ring_end ℂ) (⇑f n), _⟩
The absolute value of a complex Cauchy sequence, as a real Cauchy sequence.
Equations
- complex.cau_seq_abs f = ⟨⇑complex.abs ∘ f.val, _⟩