mathlib documentation

data.complex.is_R_or_C

is_R_or_C: a typeclass for ℝ or ℂ

This file defines the typeclass is_R_or_C intended to have only two instances: ℝ and ℂ. It is meant for definitions and theorems which hold for both the real and the complex case, and in particular when the real case follows directly from the complex case by setting re to id, im to zero and so on. Its API follows closely that of ℂ.

Possible applications include defining inner products and Hilbert spaces for both the real and complex case. One would produce the definitions and proof for an arbitrary field of this typeclass, which basically amounts to doing the complex case, and the two cases then fall out immediately from the two instances of the class.

@[class]
structure is_R_or_C (K : Type u_1) [nondiscrete_normed_field K] [algebra K] :
Type u_1

This typeclass captures properties shared by ℝ and ℂ, with an API that closely matches that of ℂ.

Instances
theorem is_R_or_C.ext {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] {z w : K} (a : is_R_or_C.re z = is_R_or_C.re w) (a_1 : is_R_or_C.im z = is_R_or_C.im w) :
z = w

@[simp]

@[simp]
theorem is_R_or_C.one_re {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] :

@[simp]
theorem is_R_or_C.one_im {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] :

@[simp]

@[simp]

@[simp]

@[simp]

@[simp]

@[simp]
theorem is_R_or_C.of_real_eq_zero {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] {z : } :

theorem is_R_or_C.two_ne_zero {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] :
2 0

theorem is_R_or_C.smul_re' {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (r : ) (z : K) :

theorem is_R_or_C.smul_im' {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (r : ) (z : K) :

The imaginary unit, I

@[simp]

The imaginary unit.

@[simp]

@[simp]

@[simp]

@[simp]
theorem is_R_or_C.conj_eq_zero {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] {z : K} :

theorem is_R_or_C.eq_conj_iff_real {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] {z : K} :

def is_R_or_C.norm_sq {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (z : K) :

The norm squared function.

Equations
@[simp]

@[simp]

@[simp]
theorem is_R_or_C.norm_sq_eq_zero {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] {z : K} :

@[simp]
theorem is_R_or_C.norm_sq_pos {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] {z : K} :

The pseudo-coercion of_real as a ring_hom.

Equations
@[simp]
theorem is_R_or_C.of_real_pow {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (r : ) (n : ) :

Inversion

theorem is_R_or_C.inv_zero {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] :
0⁻¹ = 0

theorem is_R_or_C.mul_inv_cancel {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] {z : K} (h : z 0) :
z * z⁻¹ = 1

@[simp]
theorem is_R_or_C.of_real_fpow {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (r : ) (n : ) :

@[simp]
theorem is_R_or_C.div_I {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (z : K) :

Cast lemmas

@[simp]

@[simp]

@[simp]

@[simp]

@[simp]

@[simp]

Characteristic zero

ℝ and ℂ are both of characteristic zero.

Note: This is not registered as an instance to avoid having multiple instances on ℝ and ℂ.

Absolute value

def is_R_or_C.abs {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (z : K) :

The complex absolute value function, defined as the square root of the norm squared.

Equations
@[simp]
theorem is_R_or_C.abs_zero {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] :

@[simp]
theorem is_R_or_C.abs_one {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] :

@[simp]
theorem is_R_or_C.abs_two {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] :

theorem is_R_or_C.abs_nonneg {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (z : K) :

@[simp]
theorem is_R_or_C.abs_eq_zero {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] {z : K} :

theorem is_R_or_C.abs_ne_zero {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] {z : K} :

@[simp]
theorem is_R_or_C.abs_mul {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (z w : K) :

@[simp]
theorem is_R_or_C.abs_abs {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (z : K) :

@[simp]
theorem is_R_or_C.abs_pos {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] {z : K} :

@[simp]
theorem is_R_or_C.abs_neg {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (z : K) :

theorem is_R_or_C.abs_sub {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (z w : K) :

theorem is_R_or_C.abs_sub_le {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (a b c : K) :

@[simp]

@[simp]
theorem is_R_or_C.abs_div {K : Type u_1} [nondiscrete_normed_field K] [algebra K] [is_R_or_C K] (z w : K) :

@[simp]

Cauchy sequences

The real part of a K Cauchy sequence, as a real Cauchy sequence.

Equations

The imaginary part of a K Cauchy sequence, as a real Cauchy sequence.

Equations
@[instance]

Equations
@[instance]

Equations
@[simp]
theorem is_R_or_C.re_to_real {x : } :

@[simp]
theorem is_R_or_C.im_to_real {x : } :

@[simp]

@[simp]

@[simp]

@[simp]

@[simp]

@[simp]

@[simp]